linux-sunxi / meta-sunxi

Official sunxi OpenEmbedded layer for Allwinner-based boards.
MIT License
145 stars 182 forks source link

bananapi-m2berry support #421

Closed vinsfortunato closed 1 week ago

vinsfortunato commented 1 month ago

I'm trying to build a yocto image (scarthgap) for the Bananapi M2 Berry Board.

I've added the following machine configuration file (bananapi-m2berry.conf):

#@TYPE: Machine
#@NAME: bananapi-m2berry
#@DESCRIPTION: Machine configuration for the Banana Pi M2 Berry, base on Allwinner V40 CPU

require conf/machine/include/sun8i.inc

KERNEL_DEVICETREE = "sun8i-v40-bananapi-m2-berry.dtb"
UBOOT_MACHINE = "bananapi_m2_berry_defconfig"

This board should be supported by mainline kernel/u-boot since those DTS and defconf files are present.

I've built the image using bitbake core-image-base

The image was flashed to an SD Card with dd. There is no eMMC on board. Just the SD card.

However when the kernel is booting it is getting stuck at: [ 1.382638] Waiting for root device /dev/mmcblk0p2...

The full boot log (The strange <0x83><0x08><0x9a>... sequence is due to my serial-to-usb device not working properly):

<break>

U-Bo<0x83><0x08><0x9a>A1<0x81>2024.01-g (Jan 08 2024 - 15:37:48 +0000)
DRAM: 1024 MiB
Trying to boot from MMC1

U,Boot 2024.01-g (Jan 08 2024 - 15:37:48 +0000) Allwinner Technology

CPU:   All<0x07>inner R40 (SUN8I 1701)
Model: Banana Pi M2 Berry
DRAM:  1 GiB
Core:  60 deWk<0x95><0xcd><0xb1> 23 uclasses, devicetree: separate
WDT:   Not starting watchdog@0c20c90
MMC:   mmc@0c0f000: 0, mmc@0c10000: 1
Loading Dnvironment from FAT... Unable to read "uboot.env" from mmc0:1... 
In:    serial@0c28000
Out:   serial@0c28000
Err:   serial@0c28000
Net:   eth0: ethernet@0c50000
starting USB...
Bus usb@0c19000: USB EHCI 1.00
scanning bus usb@0c19000 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  2 <0x08><0x08><0x08> 1 <0x08><0x08><0x08> 0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot<0x9a><0x8d><0xc9><0xa5><0xc1><0xd1><0x81>/boot.scr
724 bytes read in 1 ms (707 KiB/s)
## Executing script at 43100000
25218 bytes read in 3 ms (8 MiB/s)
Failed to load 'zImage'
Failed to load 'boot/zImage'
5405760 bytes read in 224 ms (23 MiB/s)
zimage: Bad magic!
## Booting kernel from Legacy Image at 42000000 ...
   Image Name:   Linux-6.6.28
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5405696 Bytes = 5.2 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
Working FDT set to 43000000
   Loading Kernel Image
   Loading Device Tree to 49ff6000, end 49fff281 ... OK
Working FDT set to 49ff6000

Starting kdrnel ...

<break>
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.6.28 (oe-user@`e-host) (arm-poky-linux-gnueabi-gcc (GCC) 13.3.0, GNU ld (GNU Binutils) 2.42.0.20240723) #1 SMP Wed Apr 17 09:19:38 UTC 2024
[    0.000000] CPU:<0xe0>ARMv7 <0x10>rocessor [410fc075] revision 5 (ARMv7), cr=10c5387d
[    0.000000] CPU: div instruc|ions available: patchin` division code
[    0.000000] CPU:<0xe0>PIPT <0x0f> VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Banana Pi M2 Berry
[    0.000000] Memory policy: Data <0xac><0x8d><0xa1><0x95><0x81>writealloc
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000040000000-0x000000006fffffff]
[    0.000000]   HighMem  [mem 0x0000000070000000-0x000000007fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000<0xdd> Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] percpu: Embedded 13 pages/cpu s22740 r8192 d22316 u53248
[    0.000000] Kernel command line: console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p2 rootwait panic=10
[    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] Built 1 zonelists, mobility grouping on.  Total pages: >60608
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] Memory: 1026848K/0048576K available (8192K kernel code, 849K rwdata, 1812K rodata, 1024K init, 281K bss, 21728K reserved, 0K cma-reserved, 262132K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUp=<0x04>, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUp from NR_CPUP=8 to n<0xae>5<0xc1><0xd5>}<0xa5><0x91><0xcd><0xf5>4.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_`pu_ids=4
[    0.000000] NR_HRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using spli| EOI/Deactivate mode
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contenti<0xcb><0xcb><0xa9>Hx+<0x02><0x02><0x02><0x82>r<0x82><0x82><0x82><0x82><0x82><0x82><0xea><0x02><0x1a><0xb1><0xbd><0x8d><0xad><0xcd><0xbd><0xd5><0xc9><0x8d><0x95><0xe9> timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_hdle_ns: 440795202592 ns
[    0.000002] sched_`lock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000015] Switching to timer-based delay loop, resolution 41ns
[    0.000288] Console: colour dummy device 80x30
[    0.000310] printk: console [tty1] enabled
[    0.000737] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.000774] CPU: Testing write buffer coherency: ok
[    0.000837] pid_max: default: 32768 minimum: 301
[    0.001018] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.001059] Mount<0xbd><0xa5><0xb9><0xd1><0xb5>cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.002077] /cpus/cpu@0 missing clock-frequency property
[    0.002139] /cpus/cpu@0 missing clock-frequency property
[    0.002170] /cpus/cpu@2 missing clock-frequency property
[    0.002200] /cpus/cpu@0 missing clock-frequency property
[    0.002223] C<0x10>U0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.003407] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_`djust=1.
[    0.003585] Setting up static identity map for 0x40100000 - 0x<0x13><0x8a><0x82><0x82><0x82><0xb2><0x82>j
[    0.003792] rcu: Hierarchical SRCU implementation.
[    0.003815] rcu:     Max phase no-delay instances is 1000.
[    0.004587] smp: Bringing up secondary CPUp ...
[    0.015537] CPU0: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.026521] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002<0xe1>[    0.037457] CPU0: thread -1, cpu 3, socket 0, mpidr 80000003
[    0.037576] smp: Brought up 1 node, 4 CPUp
[    0.037643] SMP: Total of 4 processor.
<0x8d><0xd1><0xa5><0xd9><0x85><0xd1><0x95><0x91><0x81>(192.00 BogoMIPS).
[    0.037663] @PU: A<0x0c>l CPU(s) s<0x04>arted in HYP mode.
[    0.030676] CPU: Vyrtualization extensions available.
[    0.038992] devtmpfs: initialized
[    0.044859] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    0.045159] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.045208] futex hash tablY*<0xb9><0xd1><0xc9><0xa5><0x95><0xcd><0xe9> 1024 (order: 4, 65536 bytes, linear)
[    0.045483] pinctrl core: initialized pinctrl subsystem
[    0.046828] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.047144] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.048241] thermal_sys: Registered thermal governor 'step_pise'
[    0.048342] cpuidle: using governor menu
[    0.048566] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[    0.048600] hw-breakpoint: maximum watchpoint size is 8 bytes.
[    0.054118] platform 1100000.mixer: Fixed dependency cycld(s) with /soc/tcon-top@0c70000
[    0.054411] platform 1200000.mixer: Fixed dependency cycle(s) with /soc/tcon-top@0c70000
[    0.057153] platform 1c20800.pinctrl: Fixed dependency cycle(s) with /soc/pinctrl@0`20800/clk-out-a-pin
[    0.059008] platform 1c2ac00.i2c: Fixed dependency cycle(s) with /soc/pinctrl@0c20800/i2c0-pins
[    0.059962] platform 1200000.mixer: Fixed dependency cycle(s) with /soc/tcon-top@0c70000
[    0.060069] platform 1100000.mixer: Fixed dependency cycle(s) with /soc/tcon-top@0c70000
[    0.060062] platform 1c70000.tcon-top: Fixed dependency cycle(s) with /soc/hdmi@0ee0000
[    0.060195] platform 1c70000.tcon-top: Fixed dependency cycle(s) with /soc/mixer@0200000
[    0.060281] platform 1c70000.tcon-top: Fixed dependency cycle(s) with /soc/lcd-controller@0c73000
[    0.060314] platform 1c70000.tcon-top: Fixed depenV<0x96>k<0xe5><0x81>cycle(s) with /soc/mixer@0100000
[    0.060616] platform 1c70000.tcon-top: Fixed dependency cycle(s) with /soc/lcd-controller@0c73000
[    0.060728] platform 1c73000.lcd-controller: Fixed dependency cycle(s) with /soc/tcon-top@0c70000
[    0.061041] platform 1c70000.tcon-top: Fixed dependency cycle(s) with /soc/hdmi@0ee0000
[    0.061141] platform 1ee0000.hdmi: Fixed dependency cycle(s) with /soc/tcon-top@0c70000
[    0.061987] platform 1ee0000.hdmi: Fixed dependency cycle(s) with /connector
[    0.062095] platform connector: Fixed dependency cycle(s) with /soc/hdmi@0ee0000
[    0.064272] cryptd: max_cpu_qlen set to 1000
[    0.065414] SCSI subsystem initialized
[    0.065855] usbcore: registered new interface driver usbfs
[    0.065911] usbcore: registered new interface driver hub
[    0.065970] usbcore: registered new device driver usb
[    0.066072] pps_core: LinuxPPS API ver. 1 registered
[    0.066090] pps_`ore: Softpare ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.066126] PTP clock support registered
[    0.067468] clocksource: Switched to clocksource arch_sys_counter
[    0.07S<0xba><0xba><0xea><0x02>r<0x15>Q<0xe9> Registered PF_INET protocol family
[    0.077283] IP idents hash table entries: 16384 (order: 4, 131072 bytes, linear)
[    0.079636] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.079702] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.079734] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.079819] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    0.080150] TCP: Hash tables configured (established 8192 bind 8192)
[    0.080300] UDP hash table entries: 512 (order: 2, 16384 by<0x04>es, linear)
[    0.080390] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.080639] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.081298] RPC: Registered named UNIX socket transport module.
[    0.081337] RPC: Registered udp transport module.
[    0.081352] RPC: Registered tcp transport module.
[    0.081366] RPC: Registered tcp-with-tls transport module.
[    0.081380] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.082714] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[    0.084091] Initialise system trusted keyrings
[    0.084355] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[    0.085059] NFS: Registering the id_resolver key type
[    0.085167] Key type id_resolver registered
[    0.085186] Key type id_legacy registered
[    0.085448] Key type asymmetric registered
[    0.085472] Asymmetric key parser 'x509' registered
[    0.085570] bounce: pool size: 64 pages
[    0.085646] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.085673] io scheduler mq-deadline registered
[    0.085690] io scheduler kyber registered
[    0.085722] io scheduler bfq registered
[    0.156959] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.162866] usbcore: registered new interface driver usb-storage
[    0.164144] sun6i-rtc 1c20400.rtc: registered as rt,j
[    0.164215] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01T00:00:55 UTC (55)
[    0.164715] i2c_dev: i2c /dev entries driver
[    0.165486] sunxi-wdt 1c20c90.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    0.166940] usbcore: registered new interface driver usbhid
[    0.166966] usbhid: USB HID core driver
[    0.167328] NET: Registered PF<0xdf>INET6 protocol family
[    0.168741] Segment Routing with IPv6
[    0.168847] In-situ OAM (IOAM) with IP<0x97>SH<0xb8>+<0x02><0x02><0x02><0x82>r<0x8a><0xb2><0xc2><0xca><0xa2><0x82><0xea><0x02><0x9a><0xa5><0xd1><0xe9> IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    0.169679] NET: Registered PF_PACKET protocol family
[    0.169796] Key type dns_resolver registered
[    0.169963] Registering SWP/SWPB emulation handler
[    0.178949] registered taskstats version 1
[    0.179183] Loading compiled-in X.509 certificates
[    0.186674] sun4i-pinctrl 1c20800.pinctrl: supply vcc-pi not found, using dummy regulator
[    0.186896] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    0.188788] sun4i-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.189477] sun4i-pinctrl 1c20800.pinctrl: supply vcc-pb not found, using dummy regulator
[    0.190380] sun4i-pinctrl 1c20800.pinctrl: supply vcc-ph not found, using dummy regulator
[    0.190627] printk: console [ttyS0] disabled
[    0.211272] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 70, base_baud = 1500000) is a U6_16550A
[    0.211371] printk: console [ttyS0] enabled
[    1.152887] sun4i-pinctrl 1c20800.pinctrl: request() failed for pin 198
[    1.159571] sun4i-pinctrl 1c20800.pinctrl: pin-198 (1c28c00.serial) status -517
[    1.166901] sun4i-pinctrl 1c20800.pinctrl: could not request pin 198 (PG6) from group PG6  on device 1c20800.pinctrl
[    1.177481] dw-apb-uart 1c28c00.serial: Error applying setting, reverse things back
[    1.187690] sun4i-pinctrl 1c20800.pinctrl: request() failed for<0x82><0xa5><0xb9><0x81>202
[    1.194347] sun4i-pinctrl 1c20800.pinctrl: pin-202 (1c20800.pinctrl:202) status -517
[    1.203778] sun4i-pinctrl 1c20800.pinctrl: request() failed for pin 198
[    1.210468] sun4i-pinctrl 1c20800.pinctrl: pin-198 (1c28c00.serial) status -517
[    1.217808] sun4i-pinctrl 1c20800.pinctrl: could not request pin 198 (PG6) from group PG6  on device 1c20800.pinctrl
[    1.228349] dw-apb-uart 1c28c00.serial: Error applying setting, reverse things back
[    1.236841] sun4i-pinctrl 1c20800.pinctrl: request() failed for pin 202
[    1.237987] ehci-platform 1c19000.usb: EHCI Host Controller
[    1.243494] sun4i-pinctrl 1c20800.pinctrl: pin-202 (1c20800.pinctrl:202) status -517
[    1.249086] ehci-platform 1c19000.usb: new USB bus registered, assigned bus number 1
[    1.264719] ehci-platform 1c19000.usb: irq 72, io mem 0x01c19000
[    1.265567] sun4i-pinctrl 1c20800.pinctrl: request() failed for pin 198
[    1.277408] sun4i-pinctrl 1c20800.pinctrl: pin-198 (1c28c00.serial) status -517
[    1.284759] sun4i-pinctrl 1c20800.pinctrl: could not request pin 198 (PG6) from group PG6  on device 1c20800.pinctrl
[    1.295308] dw-apb-uart 1c28c00.serial: Error applying setting, reverse things back
[    1.297477] ehci-platform 1c19000.usb: USB 2.0 started, EHCI 1.00
[    1.303616] sun4i-pinctrl 1c20800.pinctrl: request() failed for pin 202
[    1.310070] hub 1-0:1.0: USB hub found
[    1.315705] sun4i-pinctrl 1c20800.pinctrl: pin-202 (1c20800.pinctrl:202) status -517
[    1.315760] hub 1-0:1.0: 1 port detected
[    1.319804] clk: Disabling unused clocks
[    1.328505] sun4i-pinctrl 1c20800.pinctrl: request() failed for pin 198
[    1.341764] sun4i-pinctrl 1c20800.pinctrl: pin-198 (1c28c00.serial) status -517
[    1.349114] sun4i-pinctrl 1c20800.pinctrl: could not request pin 198 (PG6) from group PG6  on device 1c20800.pinctrl
[    1.349126] dw-apb-uart 1c28c00.serial: Q.<0xae>K<0x81>applying setting, reverse things back
[    1.368002] sun4i-pinctrl 1c20800.pinctrl: request() failed for pin 202
[    1.374636] sun4i-pinctrl 1c20800.pinctrl: pin-202 (1c20800.pinctrl:202) status -517
[    1.382638] Waiting for root device /dev/mmcblk0p2...
[    1.637479] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    1.838705] hub 1-1:1.0: USB hub found
[    1.842676] hub 1-1:1.0: 4 ports detected
[    1.848691] sun4i-pinctrl 1c20800.pinctrl: request() failed for pin 198
[    1.855343] sun4i-pinctrl 1c20800.pinctrl: pin-198 (1c28c00.serial) status -517
[    1.862700] sun4i-pinctrl 1c20800.pinctrl: could not request pin 198 (PG6) from group PG6  on device 1c20800.pinctrl
[    1.873256] dw-apb-u`rt 1c28c00.serial: Error applying setting, reverse things back
[    1.881559] sun4i-pinctrl 1c20800.pinctrl: request() failed for pin 202
[    1.888227] sun4i-pinctrl 1c20800.pinctrl: pin-202 (1c20800.pinctrl:202) status -517
[   11.358264] sun4i-pinctrl 1c20800.pinctrl: request() failed for pin 198
[   11.364904] sun4i-pinctrl<0x8a><0x1a><0xc9>0800.pinctrl: pin-198 (1c28c00.serial) status -517
[   11.372259] sun4i-pinctrl 1c20800.pinctrl: could not request pin 198 (PG6) from group PG6  on device 1c20800.pinctrl
[   11.382828] dw-apb-uart 1c28c00.serial: Error applying setting, reverse things back
[   11.391099] sun4i-pinctrl 1c20800.pinctrl: request() failed for pin 202
[   11.397757] pun4i-pinctrl 1c20800.pinctrl: pin-202 (1c20800.pinctrl:202) status -517
[   11.405561] platform 1c0f000.mmc: deferred probe pending
[   11.410902] platform 1c10000.mmc: deferred probe pending
[   11.416222] platform 1c28c00.serial<0x02> deferred probe pending
[   11.421808] platform 1c18000.sXW<0xe9> deferred probe pending
[   11.427213] platform 1c50000.ethernet: deferred probe pending
[   11.432976] platform cpufreq-dt: deferred probe pending
[   11.438217] platform wifi_pwrseq: deferred probe pending

I suspected there was something wrong with the mainline .dts so I tried to decompile the DTB of Armbian which is working on this board and noticed some differences.

I noticed that the Armbian DTB defined additional clock configurations. So I tried adding those by patching the mainline kernel .dts using the following .patch:

From 20c28e73c6d58b91f30dab01f355f2efef8a8a18 Mon Sep 17 00:00:00 2001
From: OpenEmbedded <oe.patch@oe>
Date: Sun, 20 Oct 2024 19:53:39 +0000
Subject: [PATCH] arm:dts: sun8i-r40 add clk_out_a fix bananam2berry

---
 arch/arm/boot/dts/allwinner/sun8i-r40.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm/boot/dts/allwinner/sun8i-r40.dtsi b/arch/arm/boot/dts/allwinner/sun8i-r40.dtsi
index 4ef26d8f5..7325cffee 100644
--- a/arch/arm/boot/dts/allwinner/sun8i-r40.dtsi
+++ b/arch/arm/boot/dts/allwinner/sun8i-r40.dtsi
@@ -75,6 +75,23 @@ osc32k: osc32k {
            clock-accuracy = <20000>;
            clock-output-names = "ext-osc32k";
        };
+
+       osc24M_32k: clk@1 {
+           #clock-cells = <0>;
+           compatible = "fixed-factor-clock";
+           clock-div = <732>;
+           clock-mult = <1>;
+           clocks = <&osc24M>;
+           clock-output-names = "osc24M_32k";
+       };
+
+       clk_out_a: clk@01c201f0 {
+           #clock-cells = <0>;
+           compatible = "allwinner,sun7i-a20-out-clk";
+           reg = <0x01c201f0 0x4>;
+           clocks = <&osc24M_32k>, <&osc32k>, <&osc24M>;
+           clock-output-names = "clk_out_a";
+       };
    };

    cpus {
-- 
2.44.1

Didn't solve anything. I don't know what to try next. Unfortunately I'm also pretty new to yocto/linux.

vinsfortunato commented 1 month ago

I solved the issue by adding the following configs to recipes-kernel/linux/linux-mainline/arm/defconfig:

CONFIG_MFD_AXP20X=y
CONFIG_MFD_AXP20X_I2C=y
CONFIG_MFD_AXP20X_RSB=y
CONFIG_REGULATOR_AXP20X=y
CONFIG_LEDS_AXP20X=m
CONFIG_AXP20X_ADC=m
CONFIG_INPUT_AXP20X_PEK=y
CONFIG_BATTERY_AXP20X=m
CONFIG_AXP20X_POWER=m

I discovered the issue by modifying the kernel to print the reason behind deferred probe pending and got this on boot:

[   12.046144] platform 1c0f000.mmc: deferred probe pending: platform: wait for supplier /soc/i2c@0c2ac00/pmic@04/regulators/dcdc1
[   12.057646] platform 1c10000.mmc: deferred probe pending: platform: wait for supplier /soc/i2c@0c2ac00/pmic@04/regulators/dldo1

And looking into the DTS I noticed that this required the AXP20X driver for I2C.

&i2c0 {
    status = "okay";

    axp22x: pmic@34 {
        compatible = "x-powers,axp221";
        reg = <0x34>;
        interrupt-parent = <&nmi_intc>;
        interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
    };
};

The kernel boots. But now the HDMI is not working.

nandra commented 4 weeks ago

:+1: thanks for sharing. If you resolve it you can post pull request and we can add this machine to supported ones by yocto. Thansk.