Linux-Rockchip Archive on lore.kernel.org
 help / color / mirror / Atom feed
* SError on usb2phy defer
@ 2026-11-22 14:11 Alexis Lothoré
  0 siblings, 0 replies; only message in thread
From: Alexis Lothoré @ 2026-11-22 14:11 UTC (permalink / raw)
  To: linux-rockchip; +Cc: Ulf Hansson, Heiko Stuebner, Sebastian Reichel, Shawn Lin

Hello Rockchip community,

I am currently playing with a Nanopi Zero 2 with a mainline kernel, as I
am interested in USB support. I am building and running the 7.3.5 kernel
from stable, with the upstream device tree for Nanopi Zero 2. I face a
systematic crash (SError) at boot with a 7.3.5 kernel:

  Starting kernel ...
  
  I/TC: Secondary CPU 1 initializing
  I/TC: Secondary CPU 1 switching to normal world boot
  I/TC: Secondary CPU 2 initializing
  I/TC: Secondary CPU 2 switching to normal world boot
  I/TC: Secondary CPU 3 initializing
  I/TC: Secondary CPU 3 switching to normal world boot
  [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
  [    0.000000] Linux version 7.3.5 (alexis@arch-bootlin-alexis) (aarch64-linux-gcc.br_real (Buildroot 2021.11-12449-g1bef613319) 14.2.0, GNU ld (GNU Binutils) 2.42) #96 SMP PREEMPT Sun Nov 22 13:43:15 CET 2026
  [    0.000000] KASLR disabled due to lack of seed
  [    0.000000] Machine model: FriendlyElec NanoPi Zero2
  [    0.000000] OF: reserved mem: 0x000000000010f000..0x000000000010f0ff (0 KiB) nomap non-reusable shmem@10f000
  [    0.000000] NUMA: Faking a node at [mem 0x0000000000200000-0x000000007fffffff]
  [    0.000000] NODE_DATA(0) allocated [mem 0x7fbc9a00-0x7fbcc0bf]
  [    0.000000] cma: Reserved 32 MiB at 0x000000007da00000
  [    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: Trusted OS migration not required
  [    0.000000] psci: SMC Calling Convention v1.2
  [    0.000000] Zone ranges:
  [    0.000000]   DMA      [mem 0x0000000000200000-0x000000007fffffff]
  [    0.000000]   DMA32    empty
  [    0.000000]   Normal   empty
  [    0.000000] Movable zone start for each node
  [    0.000000] Early memory node ranges
  [    0.000000]   node   0: [mem 0x0000000000200000-0x000000007fffffff]
  [    0.000000] Initmem setup node 0 [mem 0x0000000000200000-0x000000007fffffff]
  [    0.000000] On node 0, zone DMA: 512 pages in unavailable ranges
  [    0.000000] percpu: Embedded 21 pages/cpu s48984 r8192 d28840 u86016
  [    0.000000] Detected VIPT I-cache on CPU0
  [    0.000000] CPU features: detected: ARM erratum 845719
  [    0.000000] alternatives: applying boot alternatives
  [    0.000000] Kernel command line: root=/dev/nfs ip=192.168.2.2 nfsroot=192.168.2.1:/home/alexis/src/neon-beat/neon-beat-controller/nfsroot,nfsvers=3,tcp rw
  [    0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes
  [    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
  [    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
  [    0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 1MB
  [    0.000000] software IO TLB: area num 4.
  [    0.000000] software IO TLB: mapped [mem 0x000000007b400000-0x000000007b600000] (2MB)
  [    0.000000] Fallback order for Node 0: 0
  [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 523776
  [    0.000000] Policy zone: DMA
  [    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
  [    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 event tracing is enabled.
  [    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=4.
  [    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: 64, nr_irqs: 64, preallocated irqs: 0
  [    0.000000] Root IRQ handler: gic_handle_irq
  [    0.000000] GIC: Using split EOI/Deactivate mode
  [    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
  [    0.000000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
  [    0.000000] arch_timer: cp15 timer running at 24.00MHz (phys).
  [    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
  [    0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
  [    0.000416] Console: colour dummy device 80x25
  [    0.000427] printk: legacy console [tty0] enabled
  [    0.000828] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
  [    0.000849] pid_max: default: 32768 minimum: 301
  [    0.001064] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
  [    0.001088] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
  [    0.001377] VFS: Finished mounting rootfs on nullfs
  [    0.002735] rcu: Hierarchical SRCU implementation.
  [    0.002765] rcu: 	Max phase no-delay instances is 1000.
  [    0.002954] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level
  [    0.003856] smp: Bringing up secondary CPUs ...
  [    0.005097] Detected VIPT I-cache on CPU1
  [    0.005184] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
  [    0.006471] Detected VIPT I-cache on CPU2
  [    0.006553] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
  [    0.007822] Detected VIPT I-cache on CPU3
  [    0.007906] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
  [    0.008054] smp: Brought up 1 node, 4 CPUs
  [    0.008112] SMP: Total of 4 processors activated.
  [    0.008121] CPU: All CPU(s) started at EL2
  [    0.008132] CPU features: detected: 32-bit EL0 Support
  [    0.008143] CPU features: detected: CRC32 instructions
  [    0.008160] CPU features: detected: PMUv3
  [    0.008202] alternatives: applying system-wide alternatives
  [    0.009094] Memory: 1990880K/2095104K available (13952K kernel code, 1416K rwdata, 5628K rodata, 3648K init, 723K bss, 68280K reserved, 32768K cma-reserved)
  [    0.010077] devtmpfs: initialized
  [    0.015293] posixtimers hash table entries: 2048 (order: 3, 32768 bytes, linear)
  [    0.015384] futex hash table entries: 1024 (65536 bytes on 1 NUMA nodes, total 64 KiB, linear).
  [    0.015948] 26368 pages in range for non-PLT usage
  [    0.015965] 517888 pages in range for PLT usage
  [    0.017436] NET: Registered PF_NETLINK/PF_ROUTE protocol family
  [    0.018262] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
  [    0.019504] thermal_sys: Registered thermal governor 'step_wise'
  [    0.019515] thermal_sys: Registered thermal governor 'power_allocator'
  [    0.019602] cpuidle: using governor menu
  [    0.019793] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
  [    0.019880] ASID allocator initialised with 65536 entries
  [    0.024880] /soc/interrupt-controller@fed01000: Fixed dependency cycle(s) with /soc/interrupt-controller@fed01000
  [    0.029831] rockchip-pm-domain ff600000.power-management:power-controller: power-domain: failed to get clk at index 0: -517
  [    0.029911] ------------[ cut here ]------------
  [    0.029923] WARNING: drivers/clk/clk.c:4831 at __clk_put+0xf8/0x130, CPU#0: swapper/0/1
  [    0.029948] Modules linked in:
  [    0.029965] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 7.3.5 #96 PREEMPT
  [    0.029980] Hardware name: FriendlyElec NanoPi Zero2 (DT)
  [    0.029991] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
  [    0.030004] pc : __clk_put+0xf8/0x130
  [    0.030016] lr : clk_put+0x10/0x20
  [    0.030030] sp : ffff80008192b750
  [    0.030038] x29: ffff80008192b750 x28: ffff80008147aee0 x27: ffff8000813400bc
  [    0.030059] x26: 0000000000000000 x25: ffff800080e5d5c0 x24: ffff00000074f280
  [    0.030079] x23: ffff00007fbe6bc8 x22: 0000000000000000 x21: 0000000000000000
  [    0.030098] x20: ffff0000004f78b0 x19: fffffffffffffdfb x18: 0000000000000006
  [    0.030117] x17: 70203a72656c6c6f x16: 72746e6f632d7265 x15: 0720072007200720
  [    0.030138] x14: 0720072007200720 x13: 0720072007200720 x12: ffff8000816ee830
  [    0.030158] x11: 0000000000000058 x10: 0000000000000018 x9 : ffff8000816ee830
  [    0.030177] x8 : 000000000000005d x7 : 3ffffffffffff000 x6 : ffff800081746830
  [    0.030196] x5 : 0000000000017fe8 x4 : 0000000000000000 x3 : ffff0000004f78b0
  [    0.030216] x2 : 0000000000000010 x1 : ffff0000004f78c0 x0 : fffffffffffffdfb
  [    0.030237] Call trace:
  [    0.030245]  __clk_put+0xf8/0x130 (P)
  [    0.030260]  clk_put+0x10/0x20
  [    0.030273]  clk_bulk_put+0x3c/0x60
  [    0.030287]  rockchip_pm_add_one_domain+0x298/0x4a0
  [    0.030304]  rockchip_pm_domain_probe+0xd4/0x310
  [    0.030319]  platform_probe+0x5c/0xb0
  [    0.030336]  really_probe+0xc0/0x3e0
  [    0.030350]  __driver_probe_device+0x164/0x1d0
  [    0.030364]  driver_probe_device+0xb4/0x120
  [    0.030378]  __device_attach_driver+0xbc/0x190
  [    0.030392]  bus_for_each_drv+0x88/0xf0
  [    0.030405]  __device_attach+0xa0/0x1e0
  [    0.030418]  device_initial_probe+0x50/0x70
  [    0.030431]  __bus_probe_device+0x38/0xb0
  [    0.030444]  bus_probe_device+0x10/0x20
  [    0.030457]  device_add+0x604/0x850
  [    0.030472]  of_device_add+0x44/0x60
  [    0.030488]  of_platform_device_create_pdata+0x94/0x160
  [    0.030503]  of_platform_bus_create+0x198/0x520
  [    0.030517]  of_platform_bus_create+0x1f8/0x520
  [    0.030531]  of_platform_bus_create+0x1f8/0x520
  [    0.030545]  of_platform_populate+0x58/0x170
  [    0.030560]  of_platform_default_populate_init+0xe8/0x100
  [    0.030577]  do_one_initcall+0x60/0x1d0
  [    0.030593]  kernel_init_freeable+0x204/0x288
  [    0.030608]  kernel_init+0x2c/0x130
  [    0.030624]  ret_from_fork+0x10/0x20
  [    0.030641] ---[ end trace 0000000000000000 ]---
  [    0.030654] rockchip-pm-domain ff600000.power-management:power-controller: failed to handle node power-domain: -517
  [    0.036762] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
  [    0.036792] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
  [    0.036805] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages
  [    0.036815] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page
  [    0.036827] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
  [    0.036837] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
  [    0.036849] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages
  [    0.036860] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page
  [    0.038037] raid6: using neon recovery algorithm
  [    0.039042] iommu: Default domain type: Translated
  [    0.039077] iommu: DMA domain TLB invalidation policy: strict mode
  [    0.039926] usbcore: registered new interface driver usbfs
  [    0.039986] usbcore: registered new interface driver hub
  [    0.040025] usbcore: registered new device driver usb
  [    0.040312] pps_core: LinuxPPS API ver. 1 registered
  [    0.040325] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
  [    0.040347] PTP clock support registered
  [    0.040400] EDAC MC: Ver: 3.0.0
  [    0.040732] scmi_core: SCMI protocol bus registered
  [    0.041313] FPGA manager framework
  [    0.042664] clocksource: Switched to clocksource arch_sys_counter
  [    0.042940] VFS: Disk quotas dquot_6.6.0
  [    0.042967] VFS: Dquot-cache hash table entries: 512 (4096 bytes)
  [    0.049103] NET: Registered PF_INET protocol family
  [    0.049277] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
  [    0.050578] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
  [    0.050615] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
  [    0.050635] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
  [    0.050774] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear)
  [    0.051158] TCP: Hash tables configured (established 16384 bind 16384)
  [    0.051307] UDP hash table entries: 1024 (order: 4, 65536 bytes, linear)
  [    0.051515] NET: Registered PF_UNIX/PF_LOCAL protocol family
  [    0.051996] RPC: Registered named UNIX socket transport module.
  [    0.052024] RPC: Registered udp transport module.
  [    0.052034] RPC: Registered tcp transport module.
  [    0.052043] RPC: Registered tcp-with-tls transport module.
  [    0.052053] RPC: Registered tcp NFSv4.1 backchannel transport module.
  [    0.054156] Initialise system trusted keyrings
  [    0.054427] workingset: timestamp_bits=58 (anon: 53) max_order=19 bucket_order=0 (anon: 0)
  [    0.054791] squashfs: version 4.0 (2009/01/31) Phillip Lougher
  [    0.055109] NFS: Registering the id_resolver key type
  [    0.055145] Key type id_resolver registered
  [    0.055156] Key type id_legacy registered
  [    0.055185] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
  [    0.055199] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
  [    0.055409] fuse: init (API version 7.46)
  [    0.055963] NET: Registered PF_ALG protocol family
  [    0.056021] Key type asymmetric registered
  [    0.056031] Asymmetric key parser 'x509' registered
  [    0.056088] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
  [    0.056103] io scheduler mq-deadline registered
  [    0.056113] io scheduler kyber registered
  [    0.056142] io scheduler bfq registered
  [    0.056366] xor: measuring software checksum speed
  [    0.058896]    neon            :  5203 MB/sec
  [    0.061483]    32regs          :  5089 MB/sec
  [    0.064080]    8regs           :  5065 MB/sec
  [    0.064091] xor: using function: neon (5203 MB/sec)
  [    0.099258] raid6: int64x1  gen()   746 MB/s
  [    0.122978] raid6: int64x2  gen()  1106 MB/s
  [    0.141603] raid6: int64x4  gen()  1408 MB/s
  [    0.158014] raid6: int64x8  gen()  1598 MB/s
  [    0.180394] raid6: neonx1   gen()  1172 MB/s
  [    0.195366] raid6: neonx2   gen()  1752 MB/s
  [    0.206374] raid6: neonx4   gen()  2384 MB/s
  [    0.216620] raid6: neonx8   gen()  2561 MB/s
  [    0.216631] raid6: using algorithm neonx8 gen() 2561 MB/s
  [    0.222570] raid6: .... xor() 2211 MB/s, rmw enabled
  [    0.227743] ledtrig-cpu: registered to indicate activity on CPUs
  [    0.227779] IPMI message handler: version 39.2
  [    0.227841] ipmi device interface
  [    0.228031] ipmi_si: IPMI System Interface driver
  [    0.228307] ipmi_si: Unable to find any System Interface(s)
  [    0.233778] dma-pl330 ffd60000.dma-controller: Loaded driver for PL330 DMAC-241330
  [    0.233816] dma-pl330 ffd60000.dma-controller: 	DBUFF-128x8bytes Num_Chans-8 Num_Peri-32 Num_Events-16
  [    0.238592] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
  [    0.241131] ff9f0000.serial: ttyS0 MMIO32:0x00000000ff9f0000 (irq = 23, base_baud = 1500000) is a 16550A
  [    0.241391] printk: console [ttyS0] enabled
  [    0.252594] loop: module loaded
  [    0.309422] usbcore: registered new interface driver rtw88_8822bu
  [    0.311252] i2c_dev: i2c /dev entries driver
  [    0.318195] arm-scmi arm-scmi.0.auto: Using scmi_smc_transport
  [    0.318229] arm-scmi arm-scmi.0.auto: SCMI max-rx-timeout: 30ms / max-msg-size: 104bytes / max-msg: 20
  [    0.318374] scmi_protocol scmi_dev.1: Enabled polling mode TX channel - prot_id:16
  [    0.318623] arm-scmi arm-scmi.0.auto: SCMI Notifications - Core Enabled.
  [    0.318706] arm-scmi arm-scmi.0.auto: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0
  [    0.318764] arm-scmi arm-scmi.0.auto: Enabling SCMI Quirk [quirk_clock_rates_triplet_out_of_spec]
  [    0.319372] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping ....
  [    0.320115] usbcore: registered new interface driver usbhid
  [    0.320135] usbhid: USB HID core driver
  [    0.321152] SPI driver st-magn-spi has no spi_device_id for st,lis3mdl-magn
  [    0.321174] SPI driver st-magn-spi has no spi_device_id for st,lsm303agr-magn
  [    0.321187] SPI driver st-magn-spi has no spi_device_id for st,lsm9ds1-magn
  [    0.321199] SPI driver st-magn-spi has no spi_device_id for st,lsm303c-magn
  [    0.323278]  cs_system_cfg: CoreSight Configuration manager initialised
  [    0.326833] NET: Registered PF_INET6 protocol family
  [    0.327614] Segment Routing with IPv6
  [    0.327671] In-situ OAM (IOAM) with IPv6
  [    0.327718] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
  [    0.328177] NET: Registered PF_PACKET protocol family
  [    0.328287] Key type dns_resolver registered
  [    0.336818] Loading compiled-in X.509 certificates
  [    0.343954] Btrfs loaded, zoned=no, fsverity=no
  [
  ** replaying previous printk message **
  [    0.357028] rockchip-gpio ff610000.gpio: probed /p
  ** replaying previous printk message **
  [    0.357028] rockchip-gpio ff610000.gpio: probed /pinctrl/gpio@ff610000
  [    0.363499] Internal error: synchronous external abort: 0000000096000010 [#1]  SMP
  [    0.364066] SError Interrupt on CPU0, code 0x00000000bf000000 -- SError
  [    0.364081] CPU: 0 UID: 0 PID: 12 Comm: kworker/u16:0 Tainted: G   M    W           7.3.5 #96 PREEMPT
  [    0.364092] Tainted: [M]=MACHINE_CHECK, [W]=WARN
  [    0.364095] Hardware name: FriendlyElec NanoPi Zero2 (DT)
  [    0.364099] Workqueue: events_unbound deferred_probe_work_func
  [    0.364115] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
  [    0.364121] pc : _raw_spin_unlock_irqrestore+0x10/0x50
  [    0.364131] lr : clk_gate_endisable+0x84/0xe0
  [    0.364141] sp : ffff800081983a90
  [    0.364144] x29: ffff800081983a90 x28: 0000000000000000 x27: 0000000000000000
  [    0.364153] x26: ffff00000043ec28 x25: ffff80008122d800 x24: ffff8000817f99a0
  [    0.364162] x23: ffff0000004e7010 x22: ffff0000028fe3c0 x21: 0000000000000001
  [    0.364171] x20: 0000000000000001 x19: ffff0000031c0440 x18: ffff800081482ce0
  [    0.364179] x17: ffff0000032ce200 x16: ffff0000032ce400 x15: ffff0000007d2498
  [    0.364188] x14: ffffffffffffffff x13: 0000000000000020 x12: 0101010101010101
  [    0.364196] x11: 7f7f7f7f7f7f7f7f x10: 0000000000061610 x9 : 0000000000000003
  [    0.364205] x8 : ffff0000028fe360 x7 : 0000000000000000 x6 : 1d150c11f5f38080
  [    0.364214] x5 : 00000000000000c0 x4 : 0000000000200020 x3 : 0000000000000003
  [    0.364222] x2 : 0000000000200000 x1 : ffff000000508000 x0 : 0000000100000002
  [    0.364233] Kernel panic - not syncing: Asynchronous SError Interrupt
  [    0.377027] SMP: stopping secondary CPUs
  [    0.377380] Kernel Offset: disabled
  [    0.377687] CPU features: 0x0,00000000,08000020,00100000,0800820b
  [    0.378221] Memory Limit: none
  [    0.378640] ---[ end Kernel panic - not syncing: Asynchronous SError Interrupt ]---

The first warning from __clk_put looks unrelated, I have sent a separate
patch for it:
https://lore.kernel.org/linux-rockchip/20261122-rockchip-pm-defer-v1-1-5b41635e3410@bootlin.com/T/#u

I've investigated this SError for (quite) some time, and here is what I
observe:

- usb2phy fails to probe because it fails to create the struct phy for
  usb2phy_host, because the supply pointed by phy-supply isn't ready (on
  Nanopi Zero 2, it depends on a GPIO, and the corresponding GPIO
  controller hasn't been bound yet), so it is deferred.
- usb2phy is attached to the RK3528_PD_VO power domain, so in the failed
  (deferred) probe path, the rockchip pm domains driver is requested to
  turn off the VO domain (no other device needs it)
- VO domain can't really be powered off, but it can be set idle, so
  rockchip_pmu_set_idle_request is called to set the VO domain idle. The
  SError happens pretty much immediately after that.

From there, I am assuming that with VO being idle, the SError is due to
an access on this domain, but I struggle to pinpoint exactly which
access. I initially suspected some access attempt to the cru (when PWM
devices probe right after, they try to acquire CLK_PWM0), but trying to
set the pwm devices on the VO domain as well just moves the SError
elsewhere (now pointing to some regmap_read in the pmdomains driver
itself, so on the PMU).  However, I've tested preventing the driver from
setting the VO domain idle with the following diff:

diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c
index 2df85468a8b5..049833f3db4b 100644
--- a/drivers/pmdomain/rockchip/pm-domains.c
+++ b/drivers/pmdomain/rockchip/pm-domains.c
@@ -81,6 +81,7 @@ struct rockchip_pmu_info {

        int num_domains;
        const struct rockchip_domain_info *domain_info;
+       unsigned int always_on_mask;
 };

 #define MAX_QOS_REGS_NUM       5
@@ -953,6 +954,8 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
        pd->genpd.attach_dev = rockchip_pd_attach_dev;
        pd->genpd.detach_dev = rockchip_pd_detach_dev;
        pd->genpd.flags = GENPD_FLAG_PM_CLK | GENPD_FLAG_NO_STAY_ON;
+       if (pmu->info->always_on_mask & BIT(id))
+               pd->genpd.flags |= GENPD_FLAG_ALWAYS_ON;
        if (pd_info->active_wakeup)
                pd->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
        dev_dbg(pd->pmu->dev, "New PD %s is %s at registration", pd->info->name,
@@ -1553,6 +1556,7 @@ static const struct rockchip_pmu_info rk3528_pmu = {

        .num_domains = ARRAY_SIZE(rk3528_pm_domains),
        .domain_info = rk3528_pm_domains,
+       .always_on_mask = BIT(RK3528_PD_VO),
 };

 static const struct rockchip_pmu_info rk3562_pmu = {

With this diff, the system isn't crashing anymore, usb2phy re-probes and
binds the device.

Without proper programming documentation being available for the rk3528,
I won't be able to go much further on who is performing the faulting
access, but my fix makes me think that the VO domain can't really be set
idle at will, there may be more peripherals needing it than currently
described in rk3528.dtsi. Any inputs/opinions about this ? Has anyone
already faced this issue on this board or a similar one ? Should my diff
become a patch ?

Thanks,

Alexis

-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-22 14:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-22 14:11 SError on usb2phy defer Alexis Lothoré

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox