Porting ODROID-XU HW features into mainline kernel

Post Reply
doggisbag
Posts: 36
Joined: Wed Nov 20, 2019 7:46 am
languages_spoken: english, spanish
ODROIDs: 2x Odroid-XU
Location: Chile
Has thanked: 24 times
Been thanked: 9 times
Contact:

Porting ODROID-XU HW features into mainline kernel

Post by doggisbag »

Hi!

I'm currently trying to enable some features of XU that had worked when Hardkernel supported it. Despite samsung SoC maintainers did a great job for XU working in mainline, there's still a lot of HW capabilities not enabled yet, and probably Exynos5410 is very low priority for them as its an EOL product.

Anyways, Exynos5410 shares a lot of the other Exynos54xx SoCs, this is extremely helpful as some things that are working on mainline can be ported without further changes.

For now, through kernel modification i've managed to get some dmesg related with mfc codec detected from device tree thanks to adding some clocks definitions into clk-exynos5410.c, exynos5410.h and exynos5410.dtsi. Values and style definitions were ported between kernel 3.4y branch and mainline exynos5420 sources. Finally, those changes were put in my custom archlinux ARM PKGBUILD which gave me linux-headers and firmware patched. All this work is done following cargo-cult and copy-paste programming styles as still being new to linux kernel and drivers implementation.

dmesg:

Code: Select all

[    8.118678] s5p-secss 10830000.sss: s5p-sss driver registered
[    8.257742] s5p-mfc 11000000.codec: Adding to iommu group 0
[    8.309681] s5p-mfc 11000000.codec: preallocated 8 MiB buffer for the firmware and context buffers
[    8.351043] s5p-mfc 11000000.codec: decoder registered as /dev/video0
[    8.359553] s5p-mfc 11000000.codec: encoder registered as /dev/video1
checking with v4l2 utility:

Code: Select all

[root@alarm alarm]# v4l2-ctl -d /dev/video0 --list-formats
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture Multiplanar

        [0]: 'VM12' (Y/CbCr 4:2:0 (16x16 MB, N-C))
        [1]: 'NM12' (Y/CbCr 4:2:0 (N-C))
        [2]: 'NM21' (Y/CrCb 4:2:0 (N-C))

[root@alarm alarm]# v4l2-ctl -d /dev/video1 --list-formats
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture Multiplanar

        [0]: 'H264' (H.264, compressed)
        [1]: 'MPG4' (MPEG-4 Part 2 ES, compressed)
        [2]: 'H263' (H.263, compressed)

Unfortunately, there's a lot of things missing that needs to be fixed. A reason for that is some debug info that might be related with video4linux2 driver interface.

When writing v4l2-ctl -d /dev/video0 --all, dmesg outputs the following

Code: Select all

[  160.053369] vidioc_g_selection:764: Can not get compose information
[  160.058679] vidioc_g_selection:764: Can not get compose information
[  163.963070] vidioc_g_selection:764: Can not get compose information
[  163.968496] s5p-mfc 11000000.codec: Decoding not initialised
[  163.974979] vidioc_g_selection:764: Can not get compose information
[  189.723807] vidioc_g_selection:764: Can not get compose information
[  189.729231] s5p-mfc 11000000.codec: Decoding not initialised
[  189.735741] vidioc_g_selection:764: Can not get compose information
[  199.629942] vidioc_g_selection:764: Can not get compose information
[  199.635702] vidioc_g_selection:764: Can not get compose information
[  214.312226] vidioc_g_selection:764: Can not get compose information
[  214.317373] vidioc_g_selection:764: Can not get compose information
[  252.043241] vidioc_g_selection:764: Can not get compose information
[  252.055011] vidioc_g_fmt:347: Format could not be read
[  252.063471] vidioc_g_selection:764: Can not get compose information
[  252.068300] vidioc_g_selection:764: Can not get compose information
[  252.074542] vidioc_g_selection:764: Can not get compose information
[  252.080786] vidioc_g_selection:764: Can not get compose information
[  252.087025] vidioc_g_selection:764: Can not get compose information
[  252.093272] vidioc_g_selection:764: Can not get compose information
[  252.099508] vidioc_g_selection:764: Can not get compose information
[  252.105752] vidioc_g_selection:764: Can not get compose information
[  252.111999] vidioc_g_selection:764: Can not get compose information
[  252.118894] s5p-mfc 11000000.codec: Decoding not initialised
[  252.124489] vidioc_g_selection:764: Can not get compose information
Now, for v4l2-ctl -d /dev/video1 --all, dmesg outputs:

Code: Select all

[  965.203994] vidioc_g_parm:2262: Setting FPS is only possible for the output queue
[  965.210138] s5p-mfc 11000000.codec: Encoding not initialised
Anyways, i'm pretty optimist that this will going to work.
These users thanked the author doggisbag for the post (total 2):
odroid (Tue Nov 17, 2020 2:36 pm) • Nuems (Sun Nov 22, 2020 9:50 pm)

doggisbag
Posts: 36
Joined: Wed Nov 20, 2019 7:46 am
languages_spoken: english, spanish
ODROIDs: 2x Odroid-XU
Location: Chile
Has thanked: 24 times
Been thanked: 9 times
Contact:

Re: Porting ODROID-XU HW features into mainline kernel

Post by doggisbag »

Update

this roughly summarizes the inserted changes in exynos5410/odroid-xu related dependencies.
  • Added HDMI related stuffs
  • Added Multi-Format Codec related stuffs
  • Added Clock bindings related stuffs
Anyways, let the kernel logs show what changes were done. These are still not working, so it needs more debugging. At least logs tells us that linux is mostly happy with things inserted.

Code: Select all

[alarm@alarm ~]$ dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.8.0-1-ARCH (alarm@alarm) (armv7l-unknown-linux-gnueabihf-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35) #45 SMP PREEMPT Thu Dec 24 19:50:24 UTC 2020
[    0.000000] CPU: ARMv7 Processor [412fc0f3] revision 3 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: Hardkernel Odroid XU
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] cma: Reserved 64 MiB at 0xbb800000
[    0.000000] Samsung CPU ID: 0xe5410023
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000006fffffff]
[    0.000000]   Normal   empty
[    0.000000]   HighMem  [mem 0x0000000070000000-0x00000000bfdfffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x00000000bfdfffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfdfffff]
[    0.000000] On node 0 totalpages: 523776
[    0.000000]   DMA zone: 1728 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 196608 pages, LIFO batch:63
[    0.000000]   HighMem zone: 327168 pages, LIFO batch:63
[    0.000000] Running under secure firmware.
[    0.000000] percpu: Embedded 16 pages/cpu s34764 r8192 d22580 u65536
[    0.000000] pcpu-alloc: s34764 r8192 d22580 u65536 alloc=16*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 522048
[    0.000000] Kernel command line: console=ttySAC2,115200n8 root=/dev/mmcblk1p2 rootwait rw loglevel=7 left=56 right=24 upper=3 lower=3 vsync=3 hsync=14 fb_x_res=1920 fb_y_res=1080 vout=dvi hdmi_phy_res=1080p60hz led_blink=1
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1984260K/2095104K available (14336K kernel code, 1210K rwdata, 6360K rodata, 2048K init, 881K bss, 45308K reserved, 65536K cma-reserved, 1243136K highmem)
[    0.000000] random: get_random_u32 called from __kmem_cache_create+0x28/0x3b4 with crng_init=0
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] 	Trampoline variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] Switching to timer-based delay loop, resolution 41ns
[    0.000000] clocksource: mct-frc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000005] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000024] genirq: irq_chip COMBINER did not update eff. affinity mask of irq 49
[    0.002149] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[    0.002165] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.002182] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.002193] Ignoring duplicate/late registration of read_current_timer delay
[    0.002659] Console: colour dummy device 80x30
[    0.002703] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[    0.002716] pid_max: default: 32768 minimum: 301
[    0.002893] LSM: Security Framework initializing
[    0.003013] Smack:  Initializing.
[    0.003022] Smack:  IPv6 port labeling enabled.
[    0.003160] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.003176] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.004074] CPU: Testing write buffer coherency: ok
[    0.004108] CPU0: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
[    0.004326] CPU0: update cpu_capacity 1024
[    0.004337] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.004988] Setting up static identity map for 0x40300000 - 0x403000ac
[    0.006068] rcu: Hierarchical SRCU implementation.
[    0.009160] soc soc0: Exynos: CPU[EXYNOS5410] PRO_ID[0xe5410023] REV[0x23] Detected
[    0.010349] smp: Bringing up secondary CPUs ...
[    0.012217] CPU1: update cpu_capacity 1024
[    0.012225] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.012232] CPU1: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
[    0.013862] CPU2: update cpu_capacity 1024
[    0.013869] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
[    0.013876] CPU2: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
[    0.015458] CPU3: update cpu_capacity 1024
[    0.015464] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.015471] CPU3: Spectre v2: firmware did not set auxiliary control register IBE bit, system vulnerable
[    0.015627] smp: Brought up 1 node, 4 CPUs
[    0.015639] SMP: Total of 4 processors activated (192.00 BogoMIPS).
[    0.015648] CPU: All CPU(s) started in SVC mode.
[    0.016278] devtmpfs: initialized
[    0.024865] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
[    0.025345] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.025364] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.026703] xor: measuring software checksum speed
[    0.063983]    arm4regs  :  1980.000 MB/sec
[    0.103982]    8regs     :  1561.000 MB/sec
[    0.143980]    32regs    :  1476.000 MB/sec
[    0.183982]    neon      :  3008.000 MB/sec
[    0.183991] xor: using function: neon (3008.000 MB/sec)
[    0.184039] pinctrl core: initialized pinctrl subsystem
[    0.185252] thermal_sys: Registered thermal governor 'fair_share'
[    0.185256] thermal_sys: Registered thermal governor 'bang_bang'
[    0.185266] thermal_sys: Registered thermal governor 'step_wise'
[    0.185274] thermal_sys: Registered thermal governor 'user_space'
[    0.186299] NET: Registered protocol family 16
[    0.188532] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.189848] audit: initializing netlink subsys (disabled)
[    0.190028] audit: type=2000 audit(0.188:1): state=initialized audit_enabled=0 res=1
[    0.191101] cpuidle: using governor menu
[    0.191489] No ATAGs?
[    0.191518] hw-breakpoint: Failed to enable monitor mode on CPU 0.
[    0.192544] Serial: AMBA PL011 UART driver
[    0.271466] random: fast init done
[    0.347991] raid6: neonx8   gen()  1642 MB/s
[    0.415996] raid6: neonx8   xor()  1170 MB/s
[    0.483992] raid6: neonx4   gen()  2334 MB/s
[    0.551996] raid6: neonx4   xor()  1553 MB/s
[    0.619995] raid6: neonx2   gen()  2086 MB/s
[    0.687999] raid6: neonx2   xor()  1602 MB/s
[    0.755995] raid6: neonx1   gen()  1693 MB/s
[    0.824002] raid6: neonx1   xor()  1396 MB/s
[    0.892062] raid6: int32x8  gen()   502 MB/s
[    0.960009] raid6: int32x8  xor()   297 MB/s
[    1.028023] raid6: int32x4  gen()   573 MB/s
[    1.096004] raid6: int32x4  xor()   307 MB/s
[    1.164033] raid6: int32x2  gen()   517 MB/s
[    1.232005] raid6: int32x2  xor()   288 MB/s
[    1.299997] raid6: int32x1  gen()   488 MB/s
[    1.367997] raid6: int32x1  xor()   241 MB/s
[    1.368006] raid6: using algorithm neonx4 gen() 2334 MB/s
[    1.368014] raid6: .... xor() 1553 MB/s, rmw enabled
[    1.368023] raid6: using neon recovery algorithm
[    1.373325] iommu: Default domain type: Translated 
[    1.374148] vgaarb: loaded
[    1.374773] SCSI subsystem initialized
[    1.374952] libata version 3.00 loaded.
[    1.375153] usbcore: registered new interface driver usbfs
[    1.375198] usbcore: registered new interface driver hub
[    1.375260] usbcore: registered new device driver usb
[    1.376499] s3c-i2c 12c70000.i2c: slave address 0x00
[    1.376515] s3c-i2c 12c70000.i2c: bus frequency set to 64 KHz
[    1.377487] s3c-i2c 12c70000.i2c: i2c-1: S3C I2C adapter
[    1.377663] s3c-i2c 12c80000.i2c: slave address 0x00
[    1.377678] s3c-i2c 12c80000.i2c: bus frequency set to 64 KHz
[    1.377869] s3c-i2c 12c80000.i2c: i2c-2: S3C I2C adapter
[    1.378213] mc: Linux media interface: v0.10
[    1.378247] videodev: Linux video capture interface: v2.00
[    1.378329] pps_core: LinuxPPS API ver. 1 registered
[    1.378338] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.378357] PTP clock support registered
[    1.378396] EDAC MC: Ver: 3.0.0
[    1.379623] Advanced Linux Sound Architecture Driver Initialized.
[    1.380098] NetLabel: Initializing
[    1.380108] NetLabel:  domain hash size = 128
[    1.380116] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    1.380173] NetLabel:  unlabeled traffic allowed by default
[    1.380678] clocksource: Switched to clocksource mct-frc
[    1.380910] VFS: Disk quotas dquot_6.6.0
[    1.380970] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.391289] NET: Registered protocol family 2
[    1.391873] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    1.391904] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    1.391974] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    1.392113] TCP: Hash tables configured (established 8192 bind 8192)
[    1.392429] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    1.392469] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    1.392651] NET: Registered protocol family 1
[    1.393236] RPC: Registered named UNIX socket transport module.
[    1.393246] RPC: Registered udp transport module.
[    1.393254] RPC: Registered tcp transport module.
[    1.393262] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.393274] NET: Registered protocol family 44
[    1.393288] PCI: CLS 0 bytes, default 64
[    1.394645] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
[    1.395987] Initialise system trusted keyrings
[    1.396147] workingset: timestamp_bits=14 max_order=19 bucket_order=5
[    1.400495] zbud: loaded
[    1.402130] NFS: Registering the id_resolver key type
[    1.402160] Key type id_resolver registered
[    1.402169] Key type id_legacy registered
[    1.402187] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    1.476359] Key type asymmetric registered
[    1.476370] Asymmetric key parser 'x509' registered
[    1.476421] bounce: pool size: 64 pages
[    1.476461] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    1.476654] io scheduler mq-deadline registered
[    1.476665] io scheduler kyber registered
[    1.476875] io scheduler bfq registered
[    1.482039] samsung-usb2-phy 12130000.phy: supply vbus not found, using dummy regulator
[    1.482670] exynos5_usb3drd_phy 12100000.phy: supply vbus not found, using dummy regulator
[    1.482739] exynos5_usb3drd_phy 12100000.phy: supply vbus-boost not found, using dummy regulator
[    1.483038] exynos5_usb3drd_phy 12500000.phy: supply vbus not found, using dummy regulator
[    1.483120] exynos5_usb3drd_phy 12500000.phy: supply vbus-boost not found, using dummy regulator
[    1.499480] dma-pl330 121a0000.pdma: Loaded driver for PL330 DMAC-241330
[    1.499496] dma-pl330 121a0000.pdma: 	DBUFF-32x4bytes Num_Chans-8 Num_Peri-32 Num_Events-32
[    1.501456] dma-pl330 121b0000.pdma: Loaded driver for PL330 DMAC-241330
[    1.501470] dma-pl330 121b0000.pdma: 	DBUFF-32x4bytes Num_Chans-8 Num_Peri-32 Num_Events-32
[    1.502118] dma-pl330 10800000.mdma: Loaded driver for PL330 DMAC-241330
[    1.502131] dma-pl330 10800000.mdma: 	DBUFF-64x8bytes Num_Chans-8 Num_Peri-1 Num_Events-32
[    1.508416] Serial: 8250/16550 driver, 6 ports, IRQ sharing enabled
[    1.511467] Serial: AMBA driver
[    1.511638] samsung-uart 12c00000.serial: IRQ index 1 not found
[    1.511701] 12c00000.serial: ttySAC0 at MMIO 0x12c00000 (irq = 62, base_baud = 0) is a S3C6400/10
[    1.512131] samsung-uart 12c10000.serial: IRQ index 1 not found
[    1.512202] 12c10000.serial: ttySAC1 at MMIO 0x12c10000 (irq = 63, base_baud = 0) is a S3C6400/10
[    1.512631] samsung-uart 12c20000.serial: IRQ index 1 not found
[    1.512753] 12c20000.serial: ttySAC2 at MMIO 0x12c20000 (irq = 64, base_baud = 0) is a S3C6400/10
[    2.600464] printk: console [ttySAC2] enabled
[    2.605210] samsung-uart 12c30000.serial: IRQ index 1 not found
[    2.610725] 12c30000.serial: ttySAC3 at MMIO 0x12c30000 (irq = 65, base_baud = 0) is a S3C6400/10
[    2.635664] loop: module loaded
[    2.638811] Loading iSCSI transport class v2.0-870.
[    2.642775] iscsi: registered transport (tcp)
[    2.651979] libphy: Fixed MDIO Bus: probed
[    2.658832] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.663930] ehci-pci: EHCI PCI platform driver
[    2.668361] ehci-platform: EHCI generic platform driver
[    2.673709] ehci-mxc: Freescale On-Chip EHCI Host driver
[    2.678904] ehci-omap: OMAP-EHCI Host Controller driver
[    2.684157] ehci-orion: EHCI orion driver
[    2.688160] ehci-exynos: EHCI Exynos driver
[    2.692520] exynos-ehci 12110000.usb: EHCI Host Controller
[    2.697668] exynos-ehci 12110000.usb: new USB bus registered, assigned bus number 1
[    2.705495] exynos-ehci 12110000.usb: irq 82, io mem 0x12110000
[    2.724736] exynos-ehci 12110000.usb: USB 2.0 started, EHCI 1.00
[    2.729517] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.08
[    2.737531] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.744722] usb usb1: Product: EHCI Host Controller
[    2.749577] usb usb1: Manufacturer: Linux 5.8.0-1-ARCH ehci_hcd
[    2.755473] usb usb1: SerialNumber: 12110000.usb
[    2.760639] hub 1-0:1.0: USB hub found
[    2.763833] hub 1-0:1.0: 3 ports detected
[    2.768395] tegra-ehci: Tegra EHCI driver
[    2.771942] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    2.777947] ohci-pci: OHCI PCI platform driver
[    2.782392] ohci-platform: OHCI generic platform driver
[    2.787721] ohci-exynos: OHCI Exynos driver
[    2.791896] exynos-ohci 12120000.usb: USB Host Controller
[    2.797122] exynos-ohci 12120000.usb: new USB bus registered, assigned bus number 2
[    2.804826] exynos-ohci 12120000.usb: irq 82, io mem 0x12120000
[    2.873384] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.08
[    2.880199] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.887391] usb usb2: Product: USB Host Controller
[    2.892159] usb usb2: Manufacturer: Linux 5.8.0-1-ARCH ohci_hcd
[    2.898056] usb usb2: SerialNumber: 12120000.usb
[    2.903122] hub 2-0:1.0: USB hub found
[    2.906413] hub 2-0:1.0: 3 ports detected
[    2.911501] usbcore: registered new interface driver uas
[    2.915732] usbcore: registered new interface driver usb-storage
[    2.921672] usbcore: registered new interface driver ums-cypress
[    2.927656] usbcore: registered new interface driver ums_eneub6250
[    2.933814] usbcore: registered new interface driver ums-freecom
[    2.939793] usbcore: registered new interface driver ums-isd200
[    2.945688] usbcore: registered new interface driver ums-usbat
[    2.957526] i2c /dev entries driver
[    2.983365] usb3503 4-0008: switched to HUB mode
[    2.986534] usb3503 4-0008: usb3503_probe: probed in hub mode
[    2.996239] BUCK1: supplied by regulator-dummy
[    3.000583] BUCK2: supplied by regulator-dummy
[    3.004861] BUCK3: supplied by regulator-dummy
[    3.009311] BUCK4: supplied by regulator-dummy
[    3.013850] BUCK5: supplied by regulator-dummy
[    3.018189] BUCK6: supplied by regulator-dummy
[    3.022619] BUCK7: supplied by regulator-dummy
[    3.027037] BUCK8: supplied by regulator-dummy
[    3.031481] BUCK9: supplied by regulator-dummy
[    3.035885] BUCK10: supplied by regulator-dummy
[    3.040325] LDO1: supplied by buck7
[    3.043332] LDO2: supplied by buck7
[    3.046807] LDO3: supplied by buck9
[    3.050262] LDO4: supplied by buck10
[    3.053849] LDO5: supplied by buck9
[    3.057297] LDO6: supplied by buck9
[    3.060786] LDO7: supplied by buck9
[    3.064202] LDO8: supplied by vdd_mem
[    3.067900] LDO9: supplied by buck9
[    3.071348] LDO10: supplied by buck9
[    3.074915] LDO11: supplied by buck9
[    3.078562] LDO12: supplied by regulator-dummy
[    3.082885] LDO13: supplied by buck9
[    3.086462] LDO14: supplied by buck9
[    3.090008] LDO15: supplied by vdd_mem
[    3.093791] LDO17: supplied by buck7
[    3.097309] LDO18: supplied by buck9
[    3.100818] LDO19: supplied by buck9
[    3.104378] LDO20: supplied by buck9
[    3.107973] LDO21: supplied by buck10
[    3.111707] LDO23: supplied by regulator-dummy
[    3.116048] LDO24: supplied by buck10
[    3.119780] LDO25: supplied by regulator-dummy
[    3.124550] LDO26: supplied by regulator-dummy
[    3.128519] LDO27: supplied by buck7
[    3.132100] LDO28: supplied by buck9
[    3.135628] LDO29: supplied by buck9
[    3.139212] LDO30: supplied by buck7
[    3.142858] LDO32: supplied by regulator-dummy
[    3.147194] LDO33: supplied by buck10
[    3.150913] LDO34: supplied by regulator-dummy
[    3.155247] LDO35: supplied by buck7
[    3.172259] rtc rtc0: invalid alarm value: 1900-01-01T00:00:00
[    3.177108] max77686-rtc max77802-rtc: registered as rtc0
[    3.184308] max77686-rtc max77802-rtc: setting system clock to 2020-12-24T20:41:50 UTC (1608842510)
[    3.202482] sdhci: Secure Digital Host Controller Interface driver
[    3.207257] sdhci: Copyright(c) Pierre Ossman
[    3.212561] Synopsys Designware Multimedia Card Interface Driver
[    3.218332] dwmmc_exynos 12200000.mmc: IDMAC supports 32-bit address mode.
[    3.220777] usb 1-3: new high-speed USB device number 2 using exynos-ehci
[    3.224452] dwmmc_exynos 12200000.mmc: Using internal DMA controller.
[    3.237579] dwmmc_exynos 12200000.mmc: Version ID is 241a
[    3.242978] dwmmc_exynos 12200000.mmc: DW MMC controller at irq 87,64 bit host data width,128 deep fifo
[    3.252559] dwmmc_exynos 12200000.mmc: Got CD GPIO
[    3.257140] dwmmc_exynos 12200000.mmc: allocated mmc-pwrseq
[    3.275660] mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 400000Hz, actual 396825HZ div = 63)
[    3.297029] dwmmc_exynos 12220000.mmc: IDMAC supports 32-bit address mode.
[    3.302519] dwmmc_exynos 12220000.mmc: Using internal DMA controller.
[    3.308894] dwmmc_exynos 12220000.mmc: Version ID is 241a
[    3.314276] dwmmc_exynos 12220000.mmc: DW MMC controller at irq 88,64 bit host data width,128 deep fifo
[    3.336895] mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 400000Hz, actual 396825HZ div = 63)
[    3.358096] VUB300 Driver rom wait states = 1C irqpoll timeout = 0400
[    3.358685] usbcore: registered new interface driver vub300
[    3.369423] usbcore: registered new interface driver ushc
[    3.375342] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.382954] ledtrig-cpu: registered to indicate activity on CPUs
[    3.385335] usb 1-3: New USB device found, idVendor=0424, idProduct=3503, bcdDevice=a1.a0
[    3.389134] hid: raw HID events driver (C) Jiri Kosina
[    3.395723] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.401259] usbcore: registered new interface driver usbhid
[    3.408969] hub 1-3:1.0: USB hub found
[    3.413441] usbhid: USB HID core driver
[    3.421172] hub 1-3:1.0: 3 ports detected
[    3.425289] NET: Registered protocol family 10
[    3.431876] Segment Routing with IPv6
[    3.434160] mip6: Mobile IPv6
[    3.437046] NET: Registered protocol family 17
[    3.441668] Key type dns_resolver registered
[    3.443647] mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0)
[    3.446443] Failed to find PMU node
[    3.455664] mmc1: new high speed SDHC card at address b368
[    3.458927] ThumbEE CPU extension supported.
[    3.465488] mmcblk1: mmc1:b368 CBADS 15.0 GiB 
[    3.468757] Registering SWP/SWPB emulation handler
[    3.475997]  mmcblk1: p1 p2
[    3.478318] registered taskstats version 1
[    3.484657] Loading compiled-in X.509 certificates
[    3.489497] zswap: loaded using pool lzo/zbud
[    3.494344] Key type ._fscrypt registered
[    3.497997] Key type .fscrypt registered
[    3.501676] Key type fscrypt-provisioning registered
[    3.509244] Btrfs loaded, crc32c=crc32c-generic
[    3.535878] dwc3 12000000.dwc3: changing max_speed on rev 5533200a
[    3.546955] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    3.551065] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 3
[    3.558939] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x0000000002010010
[    3.568147] xhci-hcd xhci-hcd.1.auto: irq 133, io mem 0x12400000
[    3.574367] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.08
[    3.582238] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.589428] usb usb3: Product: xHCI Host Controller
[    3.594279] usb usb3: Manufacturer: Linux 5.8.0-1-ARCH xhci-hcd
[    3.600158] usb usb3: SerialNumber: xhci-hcd.1.auto
[    3.605605] hub 3-0:1.0: USB hub found
[    3.608807] hub 3-0:1.0: 1 port detected
[    3.612990] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    3.618152] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 4
[    3.625795] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[    3.632342] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    3.640459] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.08
[    3.648575] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    3.655768] usb usb4: Product: xHCI Host Controller
[    3.660624] usb usb4: Manufacturer: Linux 5.8.0-1-ARCH xhci-hcd
[    3.666535] usb usb4: SerialNumber: xhci-hcd.1.auto
[    3.671933] hub 4-0:1.0: USB hub found
[    3.675141] hub 4-0:1.0: 1 port detected
[    3.679326] mmc_host mmc0: Bus speed (slot 0) = 200000000Hz (slot req 200000000Hz, actual 200000000HZ div = 0)
[    3.690384] s3c-rtc 101e0000.rtc: registered as rtc1
[    3.695881] mmc0: new HS200 MMC card at address 0001
[    3.696769] usb 1-2: new high-speed USB device number 3 using exynos-ehci
[    3.705189] ALSA device list:
[    3.709505] mmcblk0: mmc0:0001 008G92 7.28 GiB 
[    3.714031] mmcblk0boot0: mmc0:0001 008G92 partition 1 4.00 MiB
[    3.719527]   No soundcards found.
[    3.723710] mmcblk0boot1: mmc0:0001 008G92 partition 2 4.00 MiB
[    3.729070] mmcblk0rpmb: mmc0:0001 008G92 partition 3 512 KiB, chardev (241:0)
[    3.737776]  mmcblk0: p1 p2
[    3.760509] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.767222] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    3.781507] devtmpfs: mounted
[    3.784839] Freeing unused kernel memory: 2048K
[    3.793035] Run /sbin/init as init process
[    3.795663]   with arguments:
[    3.795669]     /sbin/init
[    3.795674]   with environment:
[    3.795680]     HOME=/
[    3.795685]     TERM=linux
[    3.795690]     left=56
[    3.795695]     right=24
[    3.795700]     upper=3
[    3.795705]     lower=3
[    3.795710]     vsync=3
[    3.795714]     hsync=14
[    3.795720]     fb_x_res=1920
[    3.795724]     fb_y_res=1080
[    3.795729]     vout=dvi
[    3.795734]     hdmi_phy_res=1080p60hz
[    3.795739]     led_blink=1
[    3.861045] usb 1-2: New USB device found, idVendor=0424, idProduct=9730, bcdDevice= 1.00
[    3.867905] usb 1-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    4.012829] usb 4-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[    4.038116] usb 4-1: New USB device found, idVendor=0bc2, idProduct=3312, bcdDevice= 7.40
[    4.044870] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.051960] usb 4-1: Product: Expansion Desk
[    4.056205] usb 4-1: Manufacturer: Seagate 
[    4.060361] usb 4-1: SerialNumber: NA4K9RCS
[    4.075045] scsi host0: uas
[    4.079071] scsi 0:0:0:0: Direct-Access     Seagate  Expansion Desk   0740 PQ: 0 ANSI: 6
[    4.088036] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    4.090209] sd 0:0:0:0: [sda] Spinning up disk...
[    4.645815] systemd[1]: systemd 246.2-1-arch running in system mode. (+PAM +AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
[    4.667620] systemd[1]: Detected architecture arm.
[    4.721745] systemd[1]: Set hostname to <alarm>.
[    5.459692] systemd[1]: Queued start job for default target Graphical Interface.
[    5.469539] random: systemd: uninitialized urandom read (16 bytes read)
[    5.480106] systemd[1]: Created slice system-getty.slice.
[    5.500877] random: systemd: uninitialized urandom read (16 bytes read)
[    5.507379] systemd[1]: Created slice system-modprobe.slice.
[    5.528867] random: systemd: uninitialized urandom read (16 bytes read)
[    5.535385] systemd[1]: Created slice system-serial\x2dgetty.slice.
[    5.558391] systemd[1]: Created slice User and Session Slice.
[    5.581340] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[    5.605116] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    5.629810] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    5.657074] systemd[1]: Reached target Local Encrypted Volumes.
[    5.681098] systemd[1]: Reached target Paths.
[    5.700920] systemd[1]: Reached target Remote File Systems.
[    5.720887] systemd[1]: Reached target Slices.
[    5.740970] systemd[1]: Reached target Swap.
[    5.757298] systemd[1]: Listening on Device-mapper event daemon FIFOs.
[    5.798457] systemd[1]: Listening on Process Core Dump Socket.
[    5.821585] systemd[1]: Listening on Journal Audit Socket.
[    5.841446] systemd[1]: Listening on Journal Socket (/dev/log).
[    5.865463] systemd[1]: Listening on Journal Socket.
[    5.885536] systemd[1]: Listening on Network Service Netlink Socket.
[    5.909539] systemd[1]: Listening on udev Control Socket.
[    5.929299] systemd[1]: Listening on udev Kernel Socket.
[    5.949405] systemd[1]: Condition check resulted in Huge Pages File System being skipped.
[    5.961335] systemd[1]: Mounting POSIX Message Queue File System...
[    5.986101] systemd[1]: Mounting Kernel Debug File System...
[    6.005240] systemd[1]: Condition check resulted in Kernel Trace File System being skipped.
[    6.025198] systemd[1]: Mounting Temporary Directory (/tmp)...
[    6.050555] systemd[1]: Starting Create list of static device nodes for the current kernel...
[    6.077047] systemd[1]: Condition check resulted in Load Kernel Module drm being skipped.
[    6.085974] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[    6.096267] systemd[1]: Condition check resulted in Load Kernel Modules being skipped.
[    6.103384] systemd[1]: Condition check resulted in FUSE Control File System being skipped.
[    6.116247] systemd[1]: Mounting Kernel Configuration File System...
[    6.142690] systemd[1]: Starting Remount Root and Kernel File Systems...
[    6.165257] systemd[1]: Condition check resulted in Repartition Root Disk being skipped.
[    6.178320] systemd[1]: Starting Apply Kernel Variables...
[    6.203155] systemd[1]: Starting Coldplug All udev Devices...
[    6.235084] systemd[1]: Mounted POSIX Message Queue File System.
[    6.262093] systemd[1]: Mounted Kernel Debug File System.
[    6.281699] systemd[1]: Mounted Temporary Directory (/tmp).
[    6.304649] systemd[1]: Finished Create list of static device nodes for the current kernel.
[    6.330622] systemd[1]: Mounted Kernel Configuration File System.
[    6.356541] systemd[1]: Finished Remount Root and Kernel File Systems.
[    6.385591] systemd[1]: Finished Apply Kernel Variables.
[    6.407271] systemd[1]: Condition check resulted in First Boot Wizard being skipped.
[    6.415652] systemd[1]: Condition check resulted in Rebuild Hardware Database being skipped.
[    6.428106] systemd[1]: Starting Load/Save Random Seed...
[    6.449417] systemd[1]: Condition check resulted in Create System Users being skipped.
[    6.462425] systemd[1]: Starting Create Static Device Nodes in /dev...
[    6.562409] systemd[1]: Finished Create Static Device Nodes in /dev.
[    6.585948] systemd[1]: Reached target Local File Systems (Pre).
[    6.609321] systemd[1]: Condition check resulted in Virtual Machine and Container Storage (Compatibility) being skipped.
[    6.625872] systemd[1]: Started Entropy Daemon based on the HAVEGE algorithm.
[    6.659190] systemd[1]: Starting Journal Service...
[    6.684577] systemd[1]: Starting Rule-based Manager for Device Events and Files...
[    6.952368] systemd[1]: Started Rule-based Manager for Device Events and Files.
[    6.969537] audit: type=1130 audit(1608842514.284:2): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=_ msg='unit=systemd-udevd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    7.022501] systemd[1]: Starting Network Service...
[    7.242723] systemd[1]: Started Journal Service.
[    7.261329] audit: type=1130 audit(1608842514.576:3): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=_ msg='unit=systemd-journald comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    7.393116] audit: type=1130 audit(1608842514.708:4): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=_ msg='unit=systemd-udev-trigger comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    7.457121] audit: type=1130 audit(1608842514.772:5): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=_ msg='unit=systemd-networkd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    7.929019] audit: type=1130 audit(1608842515.244:6): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=_ msg='unit=systemd-journal-flush comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    7.976759] random: crng init done
[    7.978687] random: 7 urandom warning(s) missed due to ratelimiting
[    8.029049] audit: type=1130 audit(1608842515.344:7): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=_ msg='unit=systemd-random-seed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    8.104097] s3c2410-wdt 101d0000.watchdog: watchdog inactive, reset disabled, irq disabled
[    8.173429] s5p-secss 10830000.sss: s5p-sss driver registered
[    8.177803] exynos-trng 10830600.rng: Exynos True Random Number Generator.
[    8.278509] s5p-mfc 11000000.codec: Adding to iommu group 0
[    8.358688] s5p-mfc 11000000.codec: preallocated 8 MiB buffer for the firmware and context buffers
[    8.381059] smsc95xx v1.0.6
[    8.399723] s5p-mfc 11000000.codec: decoder registered as /dev/video0
[    8.421906] s5p-mfc 11000000.codec: encoder registered as /dev/video1
[    8.487707] smsc95xx 1-2:1.0 eth0: register 'smsc95xx' at usb-12110000.usb-2, smsc95xx USB 2.0 Ethernet, 32:4e:c2:6b:35:f7
[    8.524078] usbcore: registered new interface driver smsc95xx
[    8.639259] exynos-adc 12d10000.adc: IRQ index 1 not found
[    8.851405] exynos-gsc 13e00000.video-scaler: Adding to iommu group 1
[    8.862749] exynos-mixer 14450000.mixer: Adding to iommu group 2
[    8.887644] exynos-gsc 13e10000.video-scaler: Adding to iommu group 3
[    8.889441] OF: graph: no port node found in /soc/hdmi@14530000
[    8.940592] samsung-i2s 3830000.i2s-sec: DMA channels sourced from device 3830000.i2s
[    8.963041] [drm] Exynos DRM: using 14450000.mixer device for DMA mapping operations
[    9.023939] exynos-drm exynos-drm: bound 14450000.mixer (ops mixer_component_ops [exynosdrm])
[    9.035544] exynos-drm exynos-drm: bound 14530000.hdmi (ops hdmi_component_ops [exynosdrm])
[    9.045475] max98090 1-0010: MAX98090 REVID=0x43
[    9.047388] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    9.069150] audit: type=1130 audit(1608842516.384:8): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=_ msg='unit=systemd-tmpfiles-setup comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    9.073424] max98090 1-0010: use default 2.8v micbias
[    9.176249] asoc-simple-card sound: HiFi <-> samsung-i2s mapping ok
[    9.204132] audit: type=1127 audit(1608842516.516:9): pid=215 uid=0 auid=4294967295 ses=4294967295 subj=_ msg=' comm="systemd-update-utmp" exe="/usr/lib/systemd/systemd-update-utmp" hostname=? addr=? terminal=? res=success'
[    9.392868] Console: switching to colour frame buffer device 240x67
[    9.592659] exynos-drm exynos-drm: fb0: exynosdrmfb frame buffer device
[    9.596805] .
[    9.608925] audit: type=1130 audit(1608842516.924:10): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=_ msg='unit=systemd-update-utmp comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[    9.641703] [drm] Initialized exynos 1.1.0 20180330 for exynos-drm on minor 0
[    9.704992] audit: type=1130 audit(1608842517.020:11): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=_ msg='unit=systemd-timesyncd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   10.620741] .
[   11.175219] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   11.186161] smsc95xx 1-2:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xCDE1
[   11.644735] ....ready
[   14.718646] sd 0:0:0:0: [sda] 976754645 4096-byte logical blocks: (4.00 TB/3.64 TiB)
[   14.725894] sd 0:0:0:0: [sda] Write Protect is off
[   14.730268] sd 0:0:0:0: [sda] Mode Sense: 2b 00 10 08
[   14.731210] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
[   14.823294]  sda: sda1 sda2
[   14.830260] sd 0:0:0:0: [sda] Attached SCSI disk
If this works, then I'll upload the changes to github, unless someone wants to start collaborating.
These users thanked the author doggisbag for the post:
Nuems (Sun Dec 27, 2020 6:30 pm)

doggisbag
Posts: 36
Joined: Wed Nov 20, 2019 7:46 am
languages_spoken: english, spanish
ODROIDs: 2x Odroid-XU
Location: Chile
Has thanked: 24 times
Been thanked: 9 times
Contact:

Re: Porting ODROID-XU HW features into mainline kernel

Post by doggisbag »

After plugging the hdmi cable into a screen, i found that i'm having image through it, so it is a success.

There is still some issues regarding to clock frequencies propagation into the SoC itself.

This is the actual clock output from debugfs

Code: Select all

[root@alarm clk]# cat clk_summary 
                                 enable  prepare  protect                                duty
   clock                          count    count    count        rate   accuracy phase  cycle
---------------------------------------------------------------------------------------------
 32khz_cp                             0        0        0       32768          0     0  50000
 32khz_ap                             0        1        0       32768          0     0  50000
 sclk_dptxphy                         0        0        0    24000000          0     0  50000
 sclk_hdmi27m                         0        0        0    24000000          0     0  50000
 sclk_hdmi24m                         0        0        0    24000000          0     0  50000
 sclk_hdmiphy                         0        0        0    24000000          0     0  50000
 fin_pll                              6        7        0    24000000          0     0  50000
    mout_pwm                          0        0        0    24000000          0     0  50000
       dout_pwm                       0        0        0    24000000          0     0  50000
          sclk_pwm                    0        0        0    24000000          0     0  50000
    mout_usbd301                      1        1        0    24000000          0     0  50000
       dout_usbd301                   0        0        0    24000000          0     0  50000
          sclk_usbd301                0        0        0    24000000          0     0  50000
       dout_usbphy301                 1        1        0    24000000          0     0  50000
          sclk_usbphy301              2        2        0    24000000          0     0  50000
    mout_usbd300                      1        1        0    24000000          0     0  50000
       dout_usbd300                   0        0        0    24000000          0     0  50000
          sclk_usbd300                0        0        0    24000000          0     0  50000
       dout_usbphy300                 1        1        0    24000000          0     0  50000
          sclk_usbphy300              3        3        0    24000000          0     0  50000
    mout_g3d_hydra_sub                0        0        0    24000000          0     0  50000
    mout_g3d_core_sub                 0        0        0    24000000          0     0  50000
    mout_aclk300_jpeg                 0        0        0    24000000          0     0  50000
    mout_aclk333_432_gscl             0        0        0    24000000          0     0  50000
    mout_aclk333_sub                  0        0        0    24000000          0     0  50000
       smmu_mfcl                      0        0        0    24000000          0     0  50000
       smmu_mfcr                      0        0        0    24000000          0     0  50000
       mfc                            0        0        0    24000000          0     0  50000
    mout_aclk300_disp1                0        0        0    24000000          0     0  50000
       smmu_gscl1                     0        0        0    24000000          0     0  50000
       smmu_gscl0                     0        0        0    24000000          0     0  50000
       gscl4                          0        0        0    24000000          0     0  50000
       gscl3                          0        0        0    24000000          0     0  50000
       gscl2                          0        0        0    24000000          0     0  50000
       gscl1                          0        0        0    24000000          0     0  50000
       gscl0                          0        0        0    24000000          0     0  50000
       dsim1                          0        0        0    24000000          0     0  50000
       mie1                           0        0        0    24000000          0     0  50000
       fimd1                          0        0        0    24000000          0     0  50000
    mout_aclk300_disp0                0        0        0    24000000          0     0  50000
       sclk_dp1                       0        0        0    24000000          0     0  50000
    mout_aclk300_gscl                 0        0        0    24000000          0     0  50000
    mout_acl266_gscl                  0        0        0    24000000          0     0  50000
    mout_fimd1                        0        0        0    24000000          0     0  50000
       div_fimd1                      0        0        0    24000000          0     0  50000
          sclk_fimd1                  0        0        0    24000000          0     0  50000
    mout_aclk200_disp1                0        0        0    24000000          0     0  50000
       smmu_mixer                     0        0        0    24000000          0     0  50000
       mixer                          0        0        0    24000000          0     0  50000
       dout_disp1_blk                 0        0        0    12000000          0     0  50000
          smmu_fimd1m1                0        0        0    12000000          0     0  50000
          smmu_fimd1m0                0        0        0    12000000          0     0  50000
    mout_aclk200_disp0                0        0        0    24000000          0     0  50000
    sclk_ipll                         0        0        0    24000000          0     0  50000
    mout_dpll                         0        0        0    24000000          0     0  50000
       div_aclk300_jpeg               0        0        0    12000000          0     0  50000
       div_aclk300_disp1              0        0        0    12000000          0     0  50000
       div_aclk300_disp0              0        0        0    12000000          0     0  50000
       div_aclk300_gscl               0        0        0    12000000          0     0  50000
    sclk_epll                         0        0        0    24000000          0     0  50000
    mout_vpllsrc                      0        0        0    24000000          0     0  50000
       mout_vpll                      0        0        0    24000000          0     0  50000
          div_hdmi_pixel              0        0        0    24000000          0     0  50000
             sclk_pixel               0        0        0    24000000          0     0  50000
             mout_hdmi                0        0        0    24000000          0     0  50000
                sclk_hdmi             0        0        0    24000000          0     0  50000
       fout_vpll                      0        0        0    66000000          0     0  50000
    fout_mpll                         1        1        0   532000000          0     0  50000
       sclk_mpll                      1        1        0   532000000          0     0  50000
          sclk_mpll_muxed             3        3        0   532000000          0     0  50000
             aclk266                  1        2        0   266000000          0     0  50000
                mdma1                 0        0        0   266000000          0     0  50000
                mdma0                 0        1        0   266000000          0     0  50000
                sss                   2        2        0   266000000          0     0  50000
             aclk66_pre               1        1        0   266000000          0     0  50000
                aclk66                5       10        0    66500000          0     0  50000
                   hdmi               0        0        0    66500000          0     0  50000
                   pwm                1        1        0    66500000          0     0  50000
                   tsadc              1        1        0    66500000          0     0  50000
                   usi3               0        0        0    66500000          0     0  50000
                   usi2               0        0        0    66500000          0     0  50000
                   usi1               0        0        0    66500000          0     0  50000
                   usi0               0        1        0    66500000          0     0  50000
                   i2c_hdmi           0        0        0    66500000          0     0  50000
                   i2c3               0        0        0    66500000          0     0  50000
                   i2c2               0        1        0    66500000          0     0  50000
                   i2c1               0        1        0    66500000          0     0  50000
                   i2c0               0        0        0    66500000          0     0  50000
                   uart3              0        0        0    66500000          0     0  50000
                   uart2              1        1        0    66500000          0     0  50000
                   uart1              0        0        0    66500000          0     0  50000
                   uart0              0        0        0    66500000          0     0  50000
                   tmu                0        4        0    66500000          0     0  50000
                   rtc                0        1        0    66500000          0     0  50000
                   wdt                1        1        0    66500000          0     0  50000
                   mct                1        1        0    66500000          0     0  50000
             mout_aclk400_isp         0        0        0   532000000          0     0  50000
             mout_aclk166             0        0        0   532000000          0     0  50000
                aclk166               0        0        0   133000000          0     0  50000
             mout_aclk200             1        1        0   532000000          0     0  50000
                aclk200               2        4        0   177333334          0     0  50000
                   dp                 0        0        0   177333334          0     0  50000
                   pdma0              0        1        0   177333334          0     0  50000
                   pdma1              0        1        0   177333334          0     0  50000
                   sdmmc2             1        1        0   177333334          0     0  50000
                   sdmmc1             0        0        0   177333334          0     0  50000
                   sdmmc0             1        1        0   177333334          0     0  50000
             mout_aclk400             0        0        0   532000000          0     0  50000
                aclk400               0        0        0   177333334          0     0  50000
             mout_aclk266_gscl_pre       0        0        0   532000000          0     0  50000
                div_aclk266_gscl_pre       0        0        0   266000000          0     0  50000
    fout_kpll                         0        0        0   600000000          0     0  50000
       mout_kpll                      0        0        0   600000000          0     0  50000
          mout_kfc                    0        0        0   600000000          0     0  50000
             div_kfc                  0        0        0   600000000          0     0  50000
                div_pclk              0        0        0   120000000          0     0  50000
                div_aclk              0        0        0    75000000          0     0  50000
    fout_ipll                         0        0        0    66000000          0     0  50000
    fout_epll                         0        0        0   192000000          0     0  50000
       mout_audss                     0        0        0   192000000          0     0  50000
          dout_srp                    0        0        0    96000000          0     0  50000
             srp_clk                  0        0        0    96000000          0     0  50000
             dout_aud_bus             0        0        0    19200000          0     0  50000
                i2s_bus               0        0        0    19200000          0     0  50000
                   3830000.i2s_rclk_src       0        0        0    19200000          0     0  50000
                      3830000.i2s_prescaler       0        0        0    19200000          0     0  50000
                         3830000.i2s_cdclk       0        0        0    19200000          0     0  50000
          mout_i2s                    0        0        0   192000000          0     0  50000
             dout_i2s                 0        0        0   192000000          0     0  50000
                sclk_i2s              0        0        0   192000000          0     0  50000
    fout_dpll                         0        0        0    66000000          0     0  50000
    fout_cpll                         1        1        0   640000000          0     0  50000
       sclk_cpll                      1        1        0   640000000          0     0  50000
          div_sclk_jpeg               0        0        0   640000000          0     0  50000
          mout_uart3                  0        0        0   640000000          0     0  50000
             div_uart3                0        0        0    64000000          0     0  50000
                sclk_uart3            0        0        0    64000000          0     0  50000
          mout_uart2                  1        1        0   640000000          0     0  50000
             div_uart2                1        1        0    64000000          0     0  50000
                sclk_uart2            1        1        0    64000000          0     0  50000
          mout_uart1                  0        0        0   640000000          0     0  50000
             div_uart1                0        0        0    64000000          0     0  50000
                sclk_uart1            0        0        0    64000000          0     0  50000
          mout_uart0                  0        0        0   640000000          0     0  50000
             div_uart0                0        0        0    64000000          0     0  50000
                sclk_uart0            0        0        0    64000000          0     0  50000
          mout_aclk333                0        0        0   640000000          0     0  50000
             aclk333                  0        0        0   320000000          0     0  50000
          mout_g3d                    0        0        0   640000000          0     0  50000
             div_g3d_hydra            0        0        0   320000000          0     0  50000
             div_g3d_core             0        0        0   320000000          0     0  50000
    fout_bpll                         1        1        0   800000000          0     0  50000
       sclk_bpll                      1        1        0   800000000          0     0  50000
          sclk_bpll_muxed             1        1        0   800000000          0     0  50000
             sclk_mpll_bpll           2        2        0   800000000          0     0  50000
                mout_mmc2             1        1        0   800000000          0     0  50000
                   div_mmc2           1        1        0   800000000          0     0  50000
                      div_mmc_pre2       1        1        0   200000000          0     0  50000
                         sclk_mmc2       1        1        0   200000000          0     0  50000
                mout_mmc1             0        0        0   800000000          0     0  50000
                   div_mmc1           0        0        0    72727273          0     0  50000
                      div_mmc_pre1       0        0        0    72727273          0     0  50000
                         sclk_mmc1       0        0        0    72727273          0     0  50000
                mout_mmc0             1        1        0   800000000          0     0  50000
                   div_mmc0           1        1        0   800000000          0     0  50000
                      div_mmc_pre0       1        1        0   200000000          0     0  50000
                         sclk_mmc0       1        1        0   200000000          0     0  50000
    fout_apll                         0        0        0   900000000          0     0  50000
       mout_apll                      0        0        0   900000000          0     0  50000
          mout_cpu                    0        0        0   900000000          0     0  50000
             div_arm                  0        0        0   900000000          0     0  50000
                div_arm2              0        0        0   900000000          0     0  50000
                   pclk_dbg           0        0        0   128571429          0     0  50000
                   div_atb            0        0        0   128571429          0     0  50000
                   div_cpud           0        0        0   112500000          0     0  50000
                   div_acp            0        0        0   900000000          0     0  50000
    clkout                            1        1        0    24000000          0     0  50000
 sclk_pcm                             0        0        0           0          0     0  50000
    pcm_bus                           0        0        0           0          0     0  50000
 usbd301                              1        1        0           0          0     0  50000
 usbd300                              1        1        0           0          0     0  50000
 usbh20                               3        3        0           0          0     0  50000
 div_aclk_acp                         0        0        0           0          0     0  50000
    div_pclk_acp                      0        0        0           0          0     0  50000
 div_aclk333_432_gscl                 0        0        0           0          0     0  50000
If you can see, there's a lot of clocks that have 24 MHz as current frequency. So maybe trying to adjust frequencies through device tree fixes the problem.

From hsnaves kernel 3.13 clk-exynos5410.c, there are some modifications to some frequencies and parent-child relationships, so i think this is where is the solution:

Code: Select all

	/* Initialize VPLL, DPLL and some other associated clocks
	 * I've added this initialization code here because I do not
	 * know where else to put it.
	 */
	_set_parent("mout_vpll", "mout_vpllsrc");
	_set_rate("fout_vpll", 350000000);
	_set_parent("mout_vpll", "fout_vpll");

	_set_rate("fout_cpll", 640000000);
	_set_parent("mout_cpll", "fout_cpll");

	_set_rate("fout_dpll", 600000000);
	_set_parent("mout_dpll", "fout_dpll");

	_set_rate("fout_ipll", 432000000);
	_set_parent("mout_ipll", "fout_ipll");

	_set_rate("fout_epll", 200000000);
	_set_parent("mout_epll", "fout_epll");

	_set_rate("div_aclk200", 200000000);
	_set_parent("mout_aclk200_disp1", "div_aclk200");
	_set_parent("mout_aclk300_disp1", "div_aclk300_disp1");

	_set_rate("div_pcm0", 4000000);
	_set_rate("div_pcm1", 4000000);
	_set_rate("div_pcm2", 4000000);

	_set_rate("div_aclk_acp", 267000000);
	_set_rate("div_pclk_acp", 134000000);

Nuems
Posts: 181
Joined: Thu Sep 19, 2013 3:50 am
languages_spoken: english, german
ODROIDs: xu, c1, n2
Has thanked: 5 times
Been thanked: 19 times
Contact:

Re: Porting ODROID-XU HW features into mainline kernel

Post by Nuems »

doggisbag wrote:
Fri Dec 25, 2020 6:09 am
(...)
If this works, then I'll upload the changes to github, unless someone wants to start collaborating.
I absolutely love what you're doing but all I can offer is testing - programming hardware related stuff is simply out of my scope. As far as I understand your log, MFC seems to be in good shape - have you tested it in any way (e.g. ffmpeg) yet?
In the meantime I've got nextcloud, fhem, vdr, nfs and samba up and running on my XU (Debian 10).

doggisbag
Posts: 36
Joined: Wed Nov 20, 2019 7:46 am
languages_spoken: english, spanish
ODROIDs: 2x Odroid-XU
Location: Chile
Has thanked: 24 times
Been thanked: 9 times
Contact:

Re: Porting ODROID-XU HW features into mainline kernel

Post by doggisbag »

Don't worry, honestly i'm really new to all of this. Most of this efforts are through navigating in old threads and doing research into portions of the kernel, naturally is complicated but with enough time (that i actually have right now hehe) and patience it's possible.

Anyways, i could post the modified kernel source.c and .h files related with Exynos5410 and then you could find how to recompile them inside your current build :). The way i'm actually doing this is changing the sources, creating a diff patch and with the PKGBUILD tool used in archlinux distro i manage to build and create linux-header and linux packages which updates the kernel.

About using FFmpeg, i've tried with the current modifications, but it doesn't work. I think there's a few things that need to be changed. First i'm going to try solving the clock issue, which is critical to a lot of the Exynos5410 SoC functions :)

PS: Nice setup you have with XU. Hope it is working nice! You should post some tutorial on how to create it and upload your current debian image for someone willing to test it :)

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 1 guest