Bpi-r4 : problem with kernel

Hy. I have some problems with my kernel/dts.

1- I don’t see the emmc when i do the command fdisk -l, only the nand and the usb key (i boot from) 2- I don’t see the leds in /sys/class/leds. the folder is empty 3- I cannot use the ethtool -m command. My sfp modules doesn’t be recognized. I think a problem of i2c. I don’t see the modules sfp when i do the command i2cdetect -y 0 and 1. I tried with a lot of modules, which works with bpi-r3.

I use the kernel 6.5-r4 and i tried with the 6.6-r4. Same problems.

Here the dmesg:

dmesg

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd090]
[    0.000000] Linux version 6.5.0-rc3-diagbox_G00R00C00 (root@workstation) (aarch64-linux-gnu-gcc (Linaro GCC 7.5-2019.12) 7.5.0, GNU ld (Linaro_Binutils-2019.12) 2.28.2.20170706) #1 SMP Tue Dec 26 19:37:08 CET 2023
[    0.000000] Machine model: BananaPi-R4
[    0.000000] earlycon: uart8250 at MMIO32 0x0000000011000000 (options '')
[    0.000000] printk: bootconsole [uart8250] enabled
[    0.000000] OF: reserved mem: 0x0000000043000000..0x000000004307ffff (512 KiB) nomap non-reusable secmon@43000000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x00000000ffffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000013fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000042ffffff]
[    0.000000]   node   0: [mem 0x0000000043000000-0x000000004307ffff]
[    0.000000]   node   0: [mem 0x0000000043080000-0x000000013fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000013fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.1 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.4
[    0.000000] percpu: Embedded 18 pages/cpu s36136 r8192 d29400 u73728
[    0.000000] pcpu-alloc: s36136 r8192 d29400 u73728 alloc=18*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: detected: Spectre-BHB
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line: board=DiagBox rootfs=rootfs_alpha.cpio.gz console=ttyS0,115200n1 earlycon=uart8250,mmio32,0x11000000 debug=7 initrd=0x48000000,550M boot_usb=oui
[    0.000000] Unknown kernel command line parameters "board=DiagBox rootfs=rootfs_alpha.cpio.gz boot_usb=oui", will be passed to user space.
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 1032192
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: area num 4.
[    0.000000] software IO TLB: mapped [mem 0x00000000fbb23000-0x00000000ffb23000] (64MB)
[    0.000000] Memory: 3469292K/4194304K available (10176K kernel code, 1174K rwdata, 2364K rodata, 448K init, 297K bss, 725012K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: GIC: Using split EOI/Deactivate mode
[    0.000000] GICv3: 416 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] Root IRQ handler: 0xffffffc080010088
[    0.000000] GICv3: GICv3 features: 16 PPIs
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x000000000c080000
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 timer(s) running at 13.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2ff89eacb, max_idle_ns: 440795202429 ns
[    0.000000] sched_clock: 56 bits at 13MHz, resolution 76ns, wraps every 4398046511101ns
[    0.008296] Calibrating delay loop (skipped), value calculated using timer frequency.. 26.00 BogoMIPS (lpj=130000)
[    0.018786] pid_max: default: 32768 minimum: 301
[    0.023524] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.031030] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.039386] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.045738] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1.
[    0.053458] rcu: Hierarchical SRCU implementation.
[    0.058310] rcu:     Max phase no-delay instances is 1000.
[    0.063938] smp: Bringing up secondary CPUs ...
[    0.068698] Detected VIPT I-cache on CPU1
[    0.068734] GICv3: CPU1: found redistributor 1 region 0:0x000000000c0a0000
[    0.068756] CPU1: Booted secondary processor 0x0000000001 [0x411fd090]
[    0.068947] Detected VIPT I-cache on CPU2
[    0.068967] GICv3: CPU2: found redistributor 2 region 0:0x000000000c0c0000
[    0.068978] CPU2: Booted secondary processor 0x0000000002 [0x411fd090]
[    0.069149] Detected VIPT I-cache on CPU3
[    0.069169] GICv3: CPU3: found redistributor 3 region 0:0x000000000c0e0000
[    0.069179] CPU3: Booted secondary processor 0x0000000003 [0x411fd090]
[    0.069204] smp: Brought up 1 node, 4 CPUs
[    0.126211] SMP: Total of 4 processors activated.
[    0.130969] CPU features: detected: 32-bit EL0 Support
[    0.136169] CPU features: detected: CRC32 instructions
[    0.141398] CPU: All CPU(s) started at EL2
[    0.145539] alternatives: applying system-wide alternatives
[    0.151733] devtmpfs: initialized
[    0.156394] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.166365] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.173390] pinctrl core: initialized pinctrl subsystem
[    0.179173] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.185444] DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations
[    0.192682] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.200609] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.208845] thermal_sys: Registered thermal governor 'fair_share'
[    0.208848] thermal_sys: Registered thermal governor 'bang_bang'
[    0.215016] thermal_sys: Registered thermal governor 'step_wise'
[    0.221097] thermal_sys: Registered thermal governor 'user_space'
[    0.227229] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.240298] ASID allocator initialised with 65536 entries
[    0.250953] Modules: 29104 pages in range for non-PLT usage
[    0.250958] Modules: 520624 pages in range for PLT usage
[    0.257000] cryptd: max_cpu_qlen set to 1000
[    0.267056] SCSI subsystem initialized
[    0.270888] libata version 3.00 loaded.
[    0.274834] usbcore: registered new interface driver usbfs
[    0.280396] usbcore: registered new interface driver hub
[    0.285789] usbcore: registered new device driver usb
[    0.291032] i2c-gpio i2c-gpio-0: using lines 563 (SDA) and 565 (SCL)
[    0.297491] pps_core: LinuxPPS API ver. 1 registered
[    0.302514] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    0.311772] PTP clock support registered
[    0.316497] clocksource: Switched to clocksource arch_sys_counter
[    0.323128] NET: Registered PF_INET protocol family
[    0.328192] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.337445] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.346099] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.353949] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.362076] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear)
[    0.369974] TCP: Hash tables configured (established 32768 bind 32768)
[    0.376685] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.383520] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    0.390921] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.397216] PCI: CLS 0 bytes, default 64
[    0.401287] Unpacking initramfs...
[    0.416976] Initialise system trusted keyrings
[    0.421570] workingset: timestamp_bits=46 max_order=20 bucket_order=0
[    0.428353] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.434285] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.453118] jitterentropy: Initialization failed with host not compliant with requirements: 9
[    0.461778] Key type asymmetric registered
[    0.465926] Asymmetric key parser 'x509' registered
[    0.471861] mtk-xsphy soc:xphy@11e10000: failed to get ref_clk(id-1)
[    0.484415] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.491695] printk: console [ttyS0] disabled
[    0.516302] 11000000.serial: ttyS0 at MMIO 0x11000000 (irq = 99, base_baud = 2500000) is a ST16650V2
[    0.525598] printk: console [ttyS0] enabled
[    0.533974] printk: bootconsole [uart8250] disabled
[    0.544476] mtk_rng soc:trng@1020f000: registered RNG driver
[    0.544527] random: crng init done
[    0.555121] loop: module loaded
[    0.559221] spi-nand spi0.0: Winbond SPI NAND was found.
[    0.564532] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
[    2.941465] Initramfs unpacking failed: invalid magic at start of compressed archive
[    3.085765] Freeing initrd memory: 563200K
[    3.094886] 5 fixed-partitions partitions found on MTD device spi0.0
[    3.101268] Creating 5 MTD partitions on "spi0.0":
[    3.106049] 0x000000000000-0x000000100000 : "bl2"
[    3.112253] 0x000000100000-0x000000180000 : "u-boot-env"
[    3.118518] 0x000000180000-0x000000580000 : "factory"
[    3.127854] 0x000000580000-0x000000780000 : "fip"
[    3.134820] 0x000000780000-0x000007800000 : "ubi"
[    3.253623] sfp sfp2-lan: Host maximum power 3.0W
[    3.387655] mtk_soc_eth 15100000.ethernet: generated random MAC address 0e:2e:df:ea:9d:0a
[    3.395875] mtk_soc_eth 15100000.ethernet: generated random MAC address c6:34:17:b2:b7:b2
[    3.404061] mtk_soc_eth 15100000.ethernet: generated random MAC address 2a:2c:dd:30:cf:b8
[    4.446961] mtk_soc_eth 15100000.ethernet eth0: mediatek frame engine at 0xffffffc081d80000, irq 101
[    4.456512] mtk_soc_eth 15100000.ethernet eth1: mediatek frame engine at 0xffffffc081d80000, irq 101
[    4.466043] mtk_soc_eth 15100000.ethernet eth2: mediatek frame engine at 0xffffffc081d80000, irq 101
[    4.475528] usbcore: registered new interface driver usb-storage
[    4.481592] i2c_dev: i2c /dev entries driver
[    4.486420] i2c 1-0064: Fixed dependency cycle(s) with /soc/i2c@11003000/rt5190a@64/regulators/buck1
[    4.496013] mtk-wdt 1001c000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    4.504090] mtk-cpufreq mtk-cpufreq: failed to initialize dvfs info for cpu0
[    4.511502] armv8-pmu pmu: hw perfevents: no irqs for PMU, sampling events not supported
[    4.519743] hw perfevents: enabled with armv8_cortex_a73 PMU driver, 7 counters available
[    4.528792] xt_time: kernel timezone is -0000
[    4.533262] NET: Registered PF_INET6 protocol family
[    4.538659] Segment Routing with IPv6
[    4.542329] In-situ OAM (IOAM) with IPv6
[    4.546290] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    4.552537] NET: Registered PF_PACKET protocol family
[    4.641530] mmc0: Failed to initialize a non-removable card
[    5.436538] Bridge firewalling registered
[    5.446134] 8021q: 802.1Q VLAN Support v1.8
[    5.453683] Loading compiled-in X.509 certificates
[    5.467251] mtk-pcie-gen3 11290000.pcie: host bridge /soc/pcie@11290000 ranges:
[    5.474566] mtk-pcie-gen3 11290000.pcie: Parsing ranges property...
[    5.480841] mtk-pcie-gen3 11290000.pcie:       IO 0x0028000000..0x00281fffff -> 0x0028000000
[    5.489290] mtk-pcie-gen3 11290000.pcie:      MEM 0x0028200000..0x002fffffff -> 0x0028200000
[    5.716512] mtk-pcie-gen3 11290000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    5.725340] mtk-pcie-gen3: probe of 11290000.pcie failed with error -110
[    5.732435] mtk-pcie-gen3 11300000.pcie: host bridge /soc/pcie@11300000 ranges:
[    5.739765] mtk-pcie-gen3 11300000.pcie: Parsing ranges property...
[    5.746041] mtk-pcie-gen3 11300000.pcie:       IO 0x0030000000..0x00301fffff -> 0x0030000000
[    5.754485] mtk-pcie-gen3 11300000.pcie:      MEM 0x0030200000..0x0037ffffff -> 0x0030200000
[    5.976509] mtk-pcie-gen3 11300000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    5.985316] mtk-pcie-gen3: probe of 11300000.pcie failed with error -110
[    5.992296] mtk-pcie-gen3 11310000.pcie: host bridge /soc/pcie@11310000 ranges:
[    5.999622] mtk-pcie-gen3 11310000.pcie: Parsing ranges property...
[    6.005896] mtk-pcie-gen3 11310000.pcie:       IO 0x0038000000..0x00381fffff -> 0x0038000000
[    6.014342] mtk-pcie-gen3 11310000.pcie:      MEM 0x0038200000..0x003fffffff -> 0x0038200000
[    6.236510] mtk-pcie-gen3 11310000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x1)
[    6.245315] mtk-pcie-gen3: probe of 11310000.pcie failed with error -110
[    6.426523] mt7530-mmio 15020000.switch: configuring for fixed/internal link mode
[    6.434020] mt7530-mmio 15020000.switch: Link is Up - 10Gbps/Full - flow control rx/tx
[    6.434616] mt7530-mmio 15020000.switch wan (uninitialized): PHY [mt7530-0:00] driver [Generic PHY] (irq=POLL)
[    6.452918] mt7530-mmio 15020000.switch lan0 (uninitialized): PHY [mt7530-0:01] driver [Generic PHY] (irq=POLL)
[    6.463814] mt7530-mmio 15020000.switch lan1 (uninitialized): PHY [mt7530-0:02] driver [Generic PHY] (irq=POLL)
[    6.474817] mt7530-mmio 15020000.switch lan2 (uninitialized): PHY [mt7530-0:03] driver [Generic PHY] (irq=POLL)
[    6.485237] mtk_soc_eth 15100000.ethernet eth0: entered promiscuous mode
[    6.491951] DSA: tree 0 setup
[    6.495215] xhci-mtk 11190000.usb: supply vbus not found, using dummy regulator
[    6.502573] xhci-mtk 11190000.usb: supply vusb33 not found, using dummy regulator
[    6.510362] xhci-mtk 11190000.usb: xHCI Host Controller
[    6.515585] xhci-mtk 11190000.usb: new USB bus registered, assigned bus number 1
[    6.523191] xhci-mtk 11190000.usb: hcc params 0x01403f99 hci version 0x110 quirks 0x0000000000200010
[    6.532344] xhci-mtk 11190000.usb: irq 112, io mem 0x11190000
[    6.538148] xhci-mtk 11190000.usb: xHCI Host Controller
[    6.543363] xhci-mtk 11190000.usb: new USB bus registered, assigned bus number 2
[    6.550759] xhci-mtk 11190000.usb: Host supports USB 3.2 Enhanced SuperSpeed
[    6.558109] hub 1-0:1.0: USB hub found
[    6.561878] hub 1-0:1.0: 1 port detected
[    6.565965] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    6.574261] hub 2-0:1.0: USB hub found
[    6.578038] hub 2-0:1.0: 1 port detected
[    6.582313] xhci-mtk 11200000.usb: supply vbus not found, using dummy regulator
[    6.589689] xhci-mtk 11200000.usb: supply vusb33 not found, using dummy regulator
[    6.597581] xhci-mtk 11200000.usb: xHCI Host Controller
[    6.602812] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 3
[    6.613253] xhci-mtk 11200000.usb: hcc params 0x01403f99 hci version 0x110 quirks 0x0000000000200010
[    6.622416] xhci-mtk 11200000.usb: irq 113, io mem 0x11200000
[    6.628226] xhci-mtk 11200000.usb: xHCI Host Controller
[    6.633451] xhci-mtk 11200000.usb: new USB bus registered, assigned bus number 4
[    6.640853] xhci-mtk 11200000.usb: Host supports USB 3.2 Enhanced SuperSpeed
[    6.648149] hub 3-0:1.0: USB hub found
[    6.651910] hub 3-0:1.0: 1 port detected
[    6.655977] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    6.664266] hub 4-0:1.0: USB hub found
[    6.668035] hub 4-0:1.0: 1 port detected
[    6.674146] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    6.688861] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    6.694576] clk: Disabling unused clocks
[    6.716819] Freeing unused kernel memory: 448K
[    7.126498] usb 3-1: new high-speed USB device number 2 using xhci-mtk
[    7.216584] Run /init as init process
[    7.220247]   with arguments:
[    7.223216]     /init
[    7.225491]   with environment:
[    7.228636]     HOME=/
[    7.230997]     TERM=linux
[    7.233705]     board=DiagBox
[    7.236673]     rootfs=rootfs_alpha.cpio.gz
[    7.240855]     boot_usb=oui
[    7.309128] hub 3-1:1.0: USB hub found
[    7.313002] hub 3-1:1.0: 5 ports detected
[    7.365225] /dev/sda1: Can't open blockdev
[    7.369364] /dev/sda1: Can't open blockdev
[    7.373473] /dev/sda1: Can't open blockdev
[    7.377589] /dev/sda1: Can't open blockdev
[    7.576603] usb 4-1: new SuperSpeed USB device number 2 using xhci-mtk
[    7.609167] hub 4-1:1.0: USB hub found
[    7.613164] hub 4-1:1.0: 4 ports detected
[    8.056503] usb 3-1.4: new high-speed USB device number 3 using xhci-mtk
[    8.237722] usb-storage 3-1.4:1.0: USB Mass Storage device detected
[    8.244145] scsi host0: usb-storage 3-1.4:1.0
[    8.346499] usb 3-1.5: new high-speed USB device number 4 using xhci-mtk
[    8.393293] /dev/sda1: Can't open blockdev
[    8.397448] /dev/sda1: Can't open blockdev
[    8.401558] /dev/sda1: Can't open blockdev
[    8.405666] /dev/sda1: Can't open blockdev
[    9.406915] scsi 0:0:0:0: Direct-Access     Mass     Storage Device   1.00 PQ: 0 ANSI: 0 CCS
[    9.415954] sd 0:0:0:0: [sda] 15437824 512-byte logical blocks: (7.90 GB/7.36 GiB)
[    9.421364] /dev/sda1: Can't open blockdev
[    9.427674] /dev/sda1: Can't open blockdev
[    9.431776] /dev/sda1: Can't open blockdev
[    9.431786] sd 0:0:0:0: [sda] Write Protect is off
[    9.435870] /dev/sda1: Can't open blockdev
[    9.440641] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[    9.449888] sd 0:0:0:0: [sda] No Caching mode page found
[    9.456478] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    9.466044]  sda: sda1 sda2 sda3
[    9.470153] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   10.475580] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[   10.644716] EXT4-fs (sda2): warning: maximal mount count reached, running e2fsck is recommended
[   10.658231] EXT4-fs (sda2): recovery complete
[   10.664921] EXT4-fs (sda2): mounted filesystem 5706b3c5-2c29-4461-881f-a21c5c3ec2f4 r/w with ordered data mode. Quota mode: disabled.
[   10.693742] EXT4-fs (sda3): warning: maximal mount count reached, running e2fsck is recommended
[   10.707985] EXT4-fs (sda3): recovery complete
[   10.712346] EXT4-fs (sda3): mounted filesystem b161d208-d166-46ee-97f7-20fa612ab42a r/w with ordered data mode. Quota mode: disabled.
[   11.408061] udevd[998]: starting version 3.2.11
[   11.430875] udevd[999]: starting eudev-3.2.11
[   11.501219] mtdblock: MTD device 'bl2' is NAND, please consider using UBI block devices instead.
[   11.501273] mtdblock: MTD device 'u-boot-env' is NAND, please consider using UBI block devices instead.
[   11.512828] mtdblock: MTD device 'factory' is NAND, please consider using UBI block devices instead.
[   11.516179] mtdblock: MTD device 'ubi' is NAND, please consider using UBI block devices instead.
[   11.537347] mtdblock: MTD device 'fip' is NAND, please consider using UBI block devices instead.
[   13.386514] sfp sfp2-lan: please wait, module slow to respond
[   17.156825] platform sfp1-wan: deferred probe pending
[   29.089009] mtdblock: MTD device 'bl2' is NAND, please consider using UBI block devices instead.
[   29.089541] mtdblock: MTD device 'u-boot-env' is NAND, please consider using UBI block devices instead.
[   29.089748] mtdblock: MTD device 'factory' is NAND, please consider using UBI block devices instead.
[   29.098418] mtdblock: MTD device 'fip' is NAND, please consider using UBI block devices instead.
[   29.107374] mtdblock: MTD device 'ubi' is NAND, please consider using UBI block devices instead.
[   81.706509] sfp sfp2-lan: failed to read EEPROM: -ENXIO

Can someone help me please :slight_smile: ?

Thanks by advance

I guess you use my code…most r4 branches are for v0 where the sfp i2c was different. So please use latest codebase (6.7-dango or with _2). There should all sfp visible as v1.x use an i2c-mus which needs additional driver and dts changes compared with v0. I see in your dmesg,that a sw-i2c was registered so your dts is not for 1.x

I have not done tests with emmc,but you have to set hw switches in right order to access emmc as it shares mmc controller like r3. Had not much time recently and wanted to get network working first (after sdcard where i had some troubles).

Keep in mind that r4 is a new board which needs some time to get all running. Most work is currently done by @dangowrt which is currently upstreaming clock patches.

6.6-r4 should be right…6.5-r4 is v0

1 Like

Hy. Thanks you to Answer me. I will try After Work. :blush:

Hy again.

I tried with the 6.7 dango-2. It works. Thank you :slight_smile:

I can see my leds, my sfp and all i2C.

I noticed that my sfp gpon onu module can be hot-plugged :slight_smile:

I have just one litlle problem :

If i inclued the dtbo of the emmc in the fit, i have an error :

> ==>Boot M
> ## Loading kernel from FIT Image at 46000000 ...
>    Using 'conf-main-usb' configuration
>    Trying 'kernel' kernel subimage
>      Description:  Kernel
>      Type:         Kernel Image
>      Compression:  gzip compressed
>      Data Start:   0x460000b4
>      Data Size:    8967424 Bytes = 8.6 MiB
>      Architecture: AArch64
>      OS:           Linux
>      Load Address: 0x44000000
>      Entry Point:  0x44000000
>      Hash algo:    sha1
>      Hash value:   b445ed5cc20165cf52345332a38a0a966f231a03
>    Verifying Hash Integrity ... sha1+ OK
> ## Loading fdt from FIT Image at 46000000 ...
>    Using 'conf-main-usb' configuration
>    Trying 'fdt-main' fdt subimage
>      Description:  dtb principal
>      Type:         Flat Device Tree
>      Compression:  uncompressed
>      Data Start:   0x4688d6a4
>      Data Size:    27998 Bytes = 27.3 KiB
>      Architecture: AArch64
>      Load Address: 0x47000000
>      Hash algo:    sha1
>      Hash value:   b3dde6f85d5b54f79996550e53d79a8ae35f16f4
>    Verifying Hash Integrity ... sha1+ OK
>    Loading fdt from 0x4688d6a4 to 0x47000000
> ## Loading fdt from FIT Image at 46000000 ...
>    Trying 'fdt-emmc' fdt subimage
>      Description:  dtb : emmc
>      Type:         Flat Device Tree
>      Compression:  uncompressed
>      Data Start:   0x468944cc
>      Data Size:    1326 Bytes = 1.3 KiB
>      Architecture: Unknown Architecture
>    Verifying Hash Integrity ... OK
> failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
> base fdt does did not have a /__symbols__ node
> make sure you've compiled with -@
> Could not find a valid device tree
> DiagBox_uboot_nand>

If i remove the dtbo of the fit’s configuration, i boot very well.

Here my fit config :

/dts-v1/; / { description = “Kernel et dtb”;

#address-cells = <1>;
images {
	kernel {
		description = "Kernel";
		data = /incbin/("/etc/diagbox/binaries/Image.gz");
		type = "kernel";
		arch = "arm64";
		os = "linux";
		compression = "gzip";
		load = <0x44000000>;
		entry = <0x44000000>;
		hash-1 {
			algo = "sha1";
		};
	};
	fdt-main {
		description = "dtb principal";
		data = /incbin/("/etc/diagbox/binaries/diagbox.dtb");
		type = "flat_dt";
		arch = "arm64";
		load = <0x47000000>;
		compression = "none";
		hash-1 {
			algo = "sha1";
		};
	};
	fdt-emmc {
		description = "dtb : emmc";
		data = /incbin/("/etc/diagbox/binaries/diagbox_emmc.dtbo");
		type = "flat_dt";
		arch = "arm64";
		load = <0x47000000>;
		compression = "none";
		hash-1 {
			algo = "sha1";
		};
	};
	fdt-sd{
		description = "dtb : sd";
		data = /incbin/("/etc/diagbox/binaries/diagbox_sd.dtbo");
		type = "flat_dt";
		arch = "arm64";
		load = <0x47000000>;
		compression = "none";
		hash-1 {
			algo = "sha1";
		};
	};
	fdt-rtc{
		description = "dtbo : wifi";
		data = /incbin/("/etc/diagbox/binaries/diagbox_rtc.dtbo");
		type = "flat_dt";
		arch = "arm64";
		load = <0x47000000>;
		compression = "none";
		hash-1 {
			algo = "sha1";
		};
	};
};

configurations {
	default = "conf-main-emmc";
	conf-main-emmc {
		description = "Configuration support Emmc";
		kernel = "kernel";
		fdt = "fdt-main", "fdt-emmc", "fdt-rtc";
		hash-1 {
			algo = "sha1";
		};
	};
	conf-main-sd {
		description = "Configuration support SD";
		kernel = "kernel";
		fdt = "fdt-main", "fdt-sd", "fdt-rtc";
		hash-1 {
			algo = "sha1";
		};
	};
	conf-main-usb {
		description = "Configuration support USB";
		kernel = "kernel";
		fdt = "fdt-main", "fdt-emmc", "fdt-rtc";
		hash-1 {
			algo = "sha1";
		};
	};
};

};

Thank you again

I guess you did something different on compiling (omitting the -@ in DTCFLAGS) and the dtos is not the problem…as uboot tells about missing symbols node in base fdt

You have strange naming…using a configuration “usb” having a “rtc” dto which seems to contain something for wifi

Hy I will see my kernel config.

I don’t use the wifi dto but i use the dto rtc. If i understand, thé dto wifi is for the card wifi 7 I create a profile USB because sometine i boot on USB Key.

The wifi overlay was for v0 only as ther the wifi-regulator (12v) was enabled by software,on v1.0+ this is done in hardware with sw4,so not needed anymore…do you use my code as base (and build.sh)? How does rtc overlay looks like (and makefile)?

For usb boot i have the command run useusb in uboot which changes bootdevice and partition and loads the fit from there afterwards…i see no reason for changing something in resulting kernel via dt-overlay

As you have completely different filenames i guess you compile dtbs self and not with my buildscript

Hy. Thank you again to answer me. Thank you for the explications about the wifi dts.

I use the code as base ( except for the dts mt7988a.dtsi where i changed the names of rj45 ports).

I don’t use the build sh to build and compile. The dtb are build with the kernel when i do command line ARCH=… make -j8.

After research, i tried to compile the dtbs with the command line dtc -a -I dts -O dtb -o path of dtbo path of the dtso

But same problem.

Before using r4, i used a r3 and i done a buildscrit adapted for my Project ( yours give me all informations i needed). I modified this one for the r4. i change address for uboot uenv, name files etc…

Thnaks again

i talk about this, which is needed for dtbo to apply correctly:

Thank you to answer me and for your Patience.

The dtc flags can be apply in the kernel defconfig?

I have tried to do command

dtc -@ -I dts -O dtb -o path of dtbo path of the dtso

not dtc -a -I dts -O dtb -o path of dtbo path of the dtso

I put an error when i wrote the line.

Not defconfig afaik…but exporting the environment var (you can do also ‘DTC_FLAGS=“-@” make …’) will let you use kernels build-system so you do not get troubles with includes in dts files

i do the command line : make -j8 DTC_FLAGS=“-@” to compile my kernel i see you include the var CONFIG_INITRAMFS_SOURCE=“initramfs” to include the initram in the kernel files.

I tried it but now i have :

## Loading kernel from FIT Image at 46000000 ...
   Using 'conf-main-usb' configuration
   Trying 'kernel' kernel subimage
     Description:  Kernel
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x460000b4
     Data Size:    105101995 Bytes = 100.2 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   301aa3aa7206e368e12adc66062d1935817b9d5b
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 46000000 ...
   Using 'conf-main-usb' configuration
   Trying 'fdt-main' fdt subimage
     Description:  dtb principal
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4c43bc50
     Data Size:    37103 Bytes = 36.2 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   b464c0ebedadb212c63bd76f994ec82c12bdf600
   Verifying Hash Integrity ... sha1+ OK
Error: fdt overwritten
Could not find a valid device tree

i think it’s because my initrd compressed weighs about 95mo I think i must modify my uenv uboot now

Putting the initrd in fit is complex and requires changes in memory map. Try using external initrd and look for my way loading it (checkrd,useinitrd in uboot environment)

Wow…95mb initrd…what do you pack into it?? Mine is ~10mb

Hi. I put a lot of module kernel to enable the boot. When all will work, i will sort modules to decrease weigh. Thank to all your explications, i manage to boot with all dtbo (rtc,emmc and sd). When i activate the sd dtbo, i see the SD thanks to command fdisk -l.

But when i activate the emmc dtbo, i don’t see it.

Do you still use the 6.7-dango_2 tree? Maybe something for emmc changed too between v0 and v1

yes, always use 6.7 dango_2. it works fine for other things i need :slight_smile:

Mhm, on a quick look dts looks like the official source and there is no gpio like cd for sdcard and fixed regulators

And based on schematic there is no switch for bringing emmc down like on r3. You could try to play a bit with hardware switches but they should both only define the bootstrap itself