rockchip: Add RK3572 and Forlinx OK3572-C support
Subsystems (20)
cover rockchip: Add RK3572 and Forlinx OK3572-C support
This series adds initial support for the RK3572 SoC and the Forlinx OK3572-C board. It includes the bindings, drivers, and device trees needed to bring up a minimal system.
The RK3572 SoC has eight CPU cores: two Cortex-A73 cores and six Cortex-A53 cores. It also integrates an Arm Mali-G310V2 MC1 GPU. The OK3572-C board provides two Gigabit Ethernet ports, three USB3 Type-A ports, a Type-C dual-role port, eMMC, microSD, and UART.
Testing was performed with Debian 13 minimal and Linux 7.3 on the OK3572-C with the FET3572-C module. Shared peripheral tests were run with the system booted from SD, while eMMC validation covered the complete boot chain.
Passed functionality:
- SD and eMMC complete the firmware, kernel, and root filesystem boot chain.
- UART console works at 1500000 baud.
- SD read/write and data persistence checks pass.
- All eight CPUs start; CPU frequency scaling and hotplug checks pass.
- Both Ethernet ports obtain IPv4 addresses and pass bidirectional file transfers.
- All three Type-A ports pass USB2 and USB3 enumeration, data transfers, and reconnect persistence checks.
- Type-C host and device modes pass in both plug orientations. Physical reconnects correctly select the expected device, host, and device roles in sequence.
Stability:
- Repeated cold and software reboots complete on SD and eMMC without data integrity failures.
- A combined CPU, memory, network, SD, and USB3 stress test completes without a crash, lockup, CPU offline event, or thermal shutdown.
- Ethernet error and drop counters do not increase during bidirectional network tests.
Build and checks:
- The kernel, modules, and board DTB build successfully.
- The series passes checkpatch with --strict; only generic reminders about new MAINTAINERS entries remain.
Untested hardware and paths:
- NPU
- PCIe
- GPU, video output, and audio
- CPU rates above 1.2 GHz and voltage scaling
- Other low-speed external interfaces
Some files in this series are derived from the Forlinx OK3572-C BSP Alpha1. Thanks to Forlinx for their support.
AI assistance:
- Codex / DeepSeek V4.1 Flash were used for:
- Collecting data
- Automating tests
- Reviewing and adjusting code to follow community conventions
---
Raw dmesg from the OK3572-C boot:
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 7.3.0-bleedingedge-rk3572 (build@armbian) (aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1 SMP PREEMPT Wed Oct 21 14:04:07 CST 2026 [ 0.000000] Machine model: Forlinx OK3572-C [ 0.000000] efi: UEFI not found. [ 0.000000] OF: reserved mem: Reserved memory: No reserved-memory node in the DT [ 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.5 [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000040200000-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 0x0000000040200000-0x000000013fffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000040200000-0x000000013fffffff] [ 0.000000] On node 0, zone DMA: 512 pages in unavailable ranges [ 0.000000] percpu: Embedded 30 pages/cpu s82136 r8192 d32552 u122880 [ 0.000000] pcpu-alloc: s82136 r8192 d32552 u122880 alloc=30*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 [0] 5 [0] 6 [0] 7 [ 0.000000] CPU features: detected: ARM erratum 845719 [ 0.000000] alternatives: applying boot alternatives [ 0.000000] Kernel command line: root=UUID=2520cc50-b3ea-430f-ba9b-552afa4b6f82 rootwait rootfstype=ext4 splash=verbose console=ttyS0,1500000 console=tty1 consoleblank=0 loglevel=1 ubootpart=48cd0da4-4dfb-4b7c-b03f-e4a0c57ddacd usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory [ 0.000000] Unknown kernel command line parameters "splash=verbose ubootpart=48cd0da4-4dfb-4b7c-b03f-e4a0c57ddacd cgroup_enable=memory cgroup_memory=1", will be passed to user space. [ 0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes [ 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] software IO TLB: area num 8. [ 0.000000] software IO TLB: mapped [mem 0x00000000f7f47000-0x00000000fbf47000] (64MB) [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1048064 [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1 [ 0.000000] ftrace: allocating 40216 entries in 158 pages [ 0.000000] ftrace: allocated 158 pages with 5 groups [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] Rude variant of Tasks RCU enabled. [ 0.000000] Tracing variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] RCU Tasks: Setting shift to 3 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=8. [ 0.000000] RCU Tasks Rude: Setting shift to 3 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=8. [ 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.000502] Console: colour dummy device 80x25 [ 0.000516] printk: legacy console [tty1] enabled [ 0.000637] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000) [ 0.000652] pid_max: default: 32768 minimum: 301 [ 0.000874] Yama: becoming mindful. [ 0.001075] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.001097] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.001450] VFS: Finished mounting rootfs on nullfs [ 0.004025] rcu: Hierarchical SRCU implementation. [ 0.004042] rcu: Max phase no-delay instances is 1000. [ 0.004294] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level [ 0.004820] EFI services will not be available. [ 0.005261] smp: Bringing up secondary CPUs ... [ 0.006096] CPU1: Booted secondary processor 0x0000000001 [0x410fd034] [ 0.006991] CPU2: Booted secondary processor 0x0000000002 [0x410fd034] [ 0.007847] CPU3: Booted secondary processor 0x0000000003 [0x410fd034] [ 0.008787] CPU4: Booted secondary processor 0x0000000100 [0x410fd034] [ 0.009715] CPU5: Booted secondary processor 0x0000000101 [0x410fd034] [ 0.010446] CPU features: detected: Spectre-BHB [ 0.010459] CPU features: detected: ARM erratum 858921 [ 0.010576] arch_timer: Enabling local workaround for ARM erratum 858921 [ 0.010590] arch_timer: CPU6: Trapping CNTVCT access [ 0.010600] CPU6: Booted secondary processor 0x0000000200 [0x411fd090] [ 0.011335] arch_timer: Enabling local workaround for ARM erratum 858921 [ 0.011346] arch_timer: CPU7: Trapping CNTVCT access [ 0.011354] CPU7: Booted secondary processor 0x0000000201 [0x411fd090] [ 0.011443] smp: Brought up 1 node, 8 CPUs [ 0.011468] SMP: Total of 8 processors activated. [ 0.011473] CPU: All CPU(s) started at EL2 [ 0.011480] CPU features: detected: 32-bit EL0 Support [ 0.011487] CPU features: detected: CRC32 instructions [ 0.011563] alternatives: applying system-wide alternatives [ 0.013503] Memory: 3994400K/4192256K available (12800K kernel code, 1804K rwdata, 8020K rodata, 4800K init, 367K bss, 188600K reserved, 0K cma-reserved) [ 0.014586] devtmpfs: initialized [ 0.023256] posixtimers hash table entries: 4096 (order: 4, 65536 bytes, linear) [ 0.023390] futex hash table entries: 2048 (131072 bytes on 1 NUMA nodes, total 128 KiB, linear). [ 0.023497] 25760 pages in range for non-PLT usage [ 0.023504] 517280 pages in range for PLT usage [ 0.024485] DMI: not present or invalid. [ 0.027105] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.027775] DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations [ 0.027873] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations [ 0.027917] audit: initializing netlink subsys (disabled) [ 0.028106] audit: type=2000 audit(0.024:1): state=initialized audit_enabled=0 res=1 [ 0.063844] thermal_sys: Registered thermal governor 'step_wise' [ 0.063969] ASID allocator initialised with 65536 entries [ 0.066221] /soc/i2c@2c040000/usb-typec@22/connector: Fixed dependency cycle(s) with /soc/usb@24000000 [ 0.066238] /soc/usb@24000000: Fixed dependency cycle(s) with /soc/i2c@2c040000/usb-typec@22/connector [ 0.066401] /soc/interrupt-controller@2a601000: Fixed dependency cycle(s) with /soc/interrupt-controller@2a601000 [ 0.074302] rockchip-gpio 26300000.gpio: probed /pinctrl/gpio@26300000 [ 0.074859] rockchip-gpio 2b200000.gpio: probed /pinctrl/gpio@2b200000 [ 0.075467] rockchip-gpio 2b300000.gpio: probed /pinctrl/gpio@2b300000 [ 0.076065] rockchip-gpio 2b400000.gpio: probed /pinctrl/gpio@2b400000 [ 0.076577] rockchip-gpio 2b500000.gpio: probed /pinctrl/gpio@2b500000 [ 0.079569] iommu: Default domain type: Translated [ 0.079581] iommu: DMA domain TLB invalidation policy: strict mode [ 0.087665] SCSI subsystem initialized [ 0.087800] usbcore: registered new interface driver usbfs [ 0.087825] usbcore: registered new interface driver hub [ 0.087851] usbcore: registered new device driver usb [ 0.087962] pps_core: LinuxPPS API ver. 1 registered [ 0.087967] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]> [ 0.087977] PTP clock support registered [ 0.088046] scmi_core: SCMI protocol bus registered [ 0.088816] vgaarb: loaded [ 0.089111] clocksource: Switched to clocksource arch_sys_counter [ 0.095252] NET: Registered PF_INET protocol family [ 0.095435] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear) [ 0.098401] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear) [ 0.098444] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.098456] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear) [ 0.098599] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear) [ 0.099208] TCP: Hash tables configured (established 32768 bind 32768) [ 0.099320] UDP hash table entries: 2048 (order: 5, 131072 bytes, linear) [ 0.099566] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.099609] PCI: CLS 0 bytes, default 64 [ 0.099809] Unpacking initramfs... [ 0.113777] Initialise system trusted keyrings [ 0.114004] workingset: timestamp_bits=46 (anon: 41) max_order=20 bucket_order=0 (anon: 0) [ 0.114534] fuse: init (API version 7.46) [ 0.114817] NET: Registered PF_ALG protocol family [ 0.114828] Key type asymmetric registered [ 0.114833] Asymmetric key parser 'x509' registered [ 0.114866] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249) [ 0.115027] io scheduler mq-deadline registered [ 0.115033] io scheduler kyber registered [ 0.115065] io scheduler bfq registered [ 0.603726] Freeing initrd memory: 13024K [ 0.641317] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 0.642938] printk: console [ttyS0] disabled [ 0.643204] 2c130000.serial: ttyS0 MMIO32:0x000000002c130000 (irq = 36, base_baud = 1500000) is a 16550A [ 0.643447] printk: console [ttyS0] enabled [ 0.649403] loop: module loaded [ 0.650488] tun: Universal TUN/TAP device driver, 1.6 [ 0.657994] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller [ 0.658022] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1 [ 0.658098] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x0000808002000010 [ 0.658139] xhci-hcd xhci-hcd.0.auto: irq 38, io mem 0x24400000 [ 0.658251] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller [ 0.658261] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2 [ 0.658273] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed [ 0.658925] hub 1-0:1.0: USB hub found [ 0.658955] hub 1-0:1.0: 1 port detected [ 0.659569] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. [ 0.659953] hub 2-0:1.0: USB hub found [ 0.659977] hub 2-0:1.0: 1 port detected [ 0.660444] usbcore: registered new interface driver uas [ 0.660501] usbcore: registered new interface driver usb-storage [ 0.660521] usbcore: registered new device driver onboard-usb-dev [ 0.677538] vdda_hdmi_s0: Bringing 750000uV into 837500-837500uV [ 0.691929] pca953x 2-0023: using auto increment [ 0.704405] dwmmc_rockchip 2a090000.mmc: IDMAC supports 32-bit address mode. [ 0.704405] arm-scmi arm-scmi.4.auto: Using scmi_smc_transport [ 0.704420] arm-scmi arm-scmi.4.auto: SCMI max-rx-timeout: 30ms / max-msg-size: 104bytes / max-msg: 20 [ 0.704437] dwmmc_rockchip 2a090000.mmc: Using internal DMA controller. [ 0.704446] dwmmc_rockchip 2a090000.mmc: Version ID is 270a [ 0.704482] dwmmc_rockchip 2a090000.mmc: DW MMC controller at irq 62,32 bit host data width,256 deep fifo [ 0.704546] scmi_protocol scmi_dev.1: Enabled polling mode TX channel - prot_id:16 [ 0.704919] arm-scmi arm-scmi.4.auto: SCMI Notifications - Core Enabled. [ 0.704981] arm-scmi arm-scmi.4.auto: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0 [ 0.705018] arm-scmi arm-scmi.4.auto: Enabling SCMI Quirk [quirk_clock_rates_triplet_out_of_spec] [ 0.705787] mmc0: CQHCI version 5.10 [ 0.708680] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping .... [ 0.708975] usbcore: registered new interface driver usbhid [ 0.708982] usbhid: USB HID core driver [ 0.709386] NET: Registered PF_INET6 protocol family [ 0.710254] Segment Routing with IPv6 [ 0.710294] In-situ OAM (IOAM) with IPv6 [ 0.710341] NET: Registered PF_PACKET protocol family [ 0.710370] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this. [ 0.715466] Loading compiled-in X.509 certificates [ 0.717882] mmc_host mmc1: Bus speed = 400000Hz (req 400000Hz, actual 400000HZ div = 0) [ 0.721073] Key type encrypted registered [ 0.732592] mmc0: SDHCI controller on 2a010000.mmc [2a010000.mmc] using ADMA 64-bit [ 0.737594] dwc3-generic-plat 24400000.usb: Failed to create device link (0x180) with supplier regulator-usb-hub-1v2 for /soc/usb@24400000/hub@2 [ 0.737903] rk_gmac-dwmac 29d20000.ethernet: IRQ sfty not found [ 0.738262] rk_gmac-dwmac 29d20000.ethernet: clock input or output? (output). [ 0.738271] rk_gmac-dwmac 29d20000.ethernet: TX delay(0x21). [ 0.738279] rk_gmac-dwmac 29d20000.ethernet: Can not read property: rx_delay. [ 0.738284] rk_gmac-dwmac 29d20000.ethernet: set rx_delay to 0x10 [ 0.738298] rk_gmac-dwmac 29d20000.ethernet: integrated PHY? (no). [ 0.743326] rk_gmac-dwmac 29d20000.ethernet: init for RGMII_RXID [ 0.743496] rk_gmac-dwmac 29d20000.ethernet: User ID: 0x50, Synopsys ID: 0x51 [ 0.743506] rk_gmac-dwmac 29d20000.ethernet: DWMAC4/5 [ 0.743513] rk_gmac-dwmac 29d20000.ethernet: DMA HW capability register supported [ 0.743519] rk_gmac-dwmac 29d20000.ethernet: Active PHY interface: RGMII (1) [ 0.743525] rk_gmac-dwmac 29d20000.ethernet: RX Checksum Offload Engine supported [ 0.743530] rk_gmac-dwmac 29d20000.ethernet: TX Checksum insertion supported [ 0.743535] rk_gmac-dwmac 29d20000.ethernet: Wake-Up On Lan supported [ 0.743580] rk_gmac-dwmac 29d20000.ethernet: Enable RX Mitigation via HW Watchdog Timer [ 0.743587] rk_gmac-dwmac 29d20000.ethernet: Enabled L3L4 Flow TC (entries=2) [ 0.743594] rk_gmac-dwmac 29d20000.ethernet: Enabled RFS Flow TC (entries=10) [ 0.743599] rk_gmac-dwmac 29d20000.ethernet: TSO supported [ 0.743604] rk_gmac-dwmac 29d20000.ethernet: TSO feature enabled [ 0.743609] rk_gmac-dwmac 29d20000.ethernet: SPH feature enabled [ 0.743614] rk_gmac-dwmac 29d20000.ethernet: Using 40/40 bits DMA host/device width [ 0.801924] sdhci-dwcmshc 2a010000.mmc: Can't reduce the clock below 52MHz in HS200/HS400 mode [ 0.802190] mmc0: Command Queue Engine enabled [ 0.802216] mmc0: new HS400 Enhanced strobe MMC card at address 0001 [ 0.802867] mmcblk0: mmc0:0001 C9A611 58.3 GiB [ 0.806837] mmcblk0: p1 [ 0.807374] mmcblk0boot0: mmc0:0001 C9A611 4.00 MiB [ 0.809014] mmcblk0boot1: mmc0:0001 C9A611 4.00 MiB [ 0.810526] mmcblk0rpmb: mmc0:0001 C9A611 16.0 MiB, chardev (248:0) [ 0.884811] rk_gmac-dwmac 2a040000.ethernet: IRQ sfty not found [ 0.885249] rk_gmac-dwmac 2a040000.ethernet: clock input or output? (output). [ 0.885262] rk_gmac-dwmac 2a040000.ethernet: TX delay(0x20). [ 0.885269] rk_gmac-dwmac 2a040000.ethernet: Can not read property: rx_delay. [ 0.885275] rk_gmac-dwmac 2a040000.ethernet: set rx_delay to 0x10 [ 0.885362] rk_gmac-dwmac 2a040000.ethernet: integrated PHY? (no). [ 0.890392] rk_gmac-dwmac 2a040000.ethernet: init for RGMII_RXID [ 0.890584] rk_gmac-dwmac 2a040000.ethernet: User ID: 0x50, Synopsys ID: 0x51 [ 0.890595] rk_gmac-dwmac 2a040000.ethernet: DWMAC4/5 [ 0.890603] rk_gmac-dwmac 2a040000.ethernet: DMA HW capability register supported [ 0.890608] rk_gmac-dwmac 2a040000.ethernet: Active PHY interface: RGMII (1) [ 0.890615] rk_gmac-dwmac 2a040000.ethernet: RX Checksum Offload Engine supported [ 0.890620] rk_gmac-dwmac 2a040000.ethernet: TX Checksum insertion supported [ 0.890625] rk_gmac-dwmac 2a040000.ethernet: Wake-Up On Lan supported [ 0.890675] rk_gmac-dwmac 2a040000.ethernet: Enable RX Mitigation via HW Watchdog Timer [ 0.890682] rk_gmac-dwmac 2a040000.ethernet: Enabled L3L4 Flow TC (entries=2) [ 0.890693] rk_gmac-dwmac 2a040000.ethernet: Enabled RFS Flow TC (entries=10) [ 0.890699] rk_gmac-dwmac 2a040000.ethernet: TSO supported [ 0.890704] rk_gmac-dwmac 2a040000.ethernet: TSO feature enabled [ 0.890709] rk_gmac-dwmac 2a040000.ethernet: SPH feature enabled [ 0.890714] rk_gmac-dwmac 2a040000.ethernet: Using 40/40 bits DMA host/device width [ 0.913126] usb 1-1: new high-speed USB device number 2 using xhci-hcd [ 1.048394] clk: Disabling unused clocks [ 1.048873] PM: genpd: Disabling unused power domains [ 1.051000] Freeing unused kernel memory: 4800K [ 1.051125] Run /init as init process [ 1.051130] with arguments: [ 1.051134] /init [ 1.051137] with environment: [ 1.051139] HOME=/ [ 1.051141] TERM=linux [ 1.051144] splash=verbose [ 1.051146] ubootpart=48cd0da4-4dfb-4b7c-b03f-e4a0c57ddacd [ 1.051149] cgroup_enable=memory [ 1.051151] cgroup_memory=1 [ 1.106465] hub 1-1:1.0: USB hub found [ 1.106513] hub 1-1:1.0: 4 ports detected [ 1.177969] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd [ 1.218522] hub 2-1:1.0: USB hub found [ 1.218968] hub 2-1:1.0: 4 ports detected [ 1.505447] usb 2-1.2: new SuperSpeed USB device number 3 using xhci-hcd [ 1.528547] usb-storage 2-1.2:1.0: USB Mass Storage device detected [ 1.529653] scsi host0: usb-storage 2-1.2:1.0 [ 1.536346] rk_gmac-dwmac 29d20000.ethernet end0: renamed from eth0 [ 1.537766] rk_gmac-dwmac 2a040000.ethernet end1: renamed from eth1 [ 1.686075] raid6: using neon recovery algorithm [ 1.717069] raid6: int64x1 gen() 847 MB/s [ 1.737837] raid6: int64x2 gen() 1264 MB/s [ 1.752864] raid6: int64x4 gen() 1747 MB/s [ 1.763929] raid6: int64x8 gen() 2371 MB/s [ 1.773319] raid6: neonx1 gen() 2796 MB/s [ 1.781011] raid6: neonx2 gen() 3409 MB/s [ 1.786289] raid6: neonx4 gen() 4970 MB/s [ 1.791806] raid6: neonx8 gen() 4753 MB/s [ 1.791809] raid6: using algorithm neonx4 gen() 4970 MB/s [ 1.794906] raid6: .... xor() 4236 MB/s, rmw enabled [ 1.796085] xor: measuring software checksum speed [ 1.797076] neon : 13380 MB/sec [ 1.798330] 32regs : 10491 MB/sec [ 1.799540] 8regs : 10874 MB/sec [ 1.799542] xor: using function: neon (13380 MB/sec) [ 1.849991] Btrfs loaded, zoned=no, fsverity=no [ 1.937396] EXT4-fs (mmcblk0p1): mounted filesystem 2520cc50-b3ea-430f-ba9b-552afa4b6f82 ro with writeback data mode. Quota mode: disabled. [ 2.097144] usb 1-1.3: new high-speed USB device number 3 using xhci-hcd [ 2.124255] systemd[1]: System time advanced to timestamp on /var/lib/systemd/timesync/clock: Wed 2026-10-21 09:39:33 UTC [ 2.159722] systemd[1]: systemd 257.13-1~deb13u1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +IPE +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBCRYPTSETUP_PLUGINS +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +BTF -XKBCOMMON -UTMP +SYSVINIT +LIBARCHIVE) [ 2.159752] systemd[1]: Detected architecture arm64. [ 2.187497] usb-storage 1-1.3:1.0: USB Mass Storage device detected [ 2.187840] scsi host1: usb-storage 1-1.3:1.0 [ 2.304474] systemd[1]: bpf-restrict-fs: BPF LSM hook not enabled in the kernel, BPF LSM not supported. [ 2.333489] dw-apb-uart 2c130000.serial: forbid DMA for kernel console [ 2.561278] scsi 0:0:0:0: Direct-Access Generic MassStorageClass 2962 PQ: 0 ANSI: 6 [ 2.562581] sd 0:0:0:0: [sda] Media removed, stopped polling [ 2.563353] systemd[1]: Queued start job for default target graphical.target. [ 2.564595] scsi 0:0:0:1: Direct-Access Generic MassStorageClass 2962 PQ: 0 ANSI: 6 [ 2.568510] systemd[1]: Created slice system-getty.slice - Slice /system/getty. [ 2.570149] systemd[1]: Created slice system-modprobe.slice - Slice /system/modprobe. [ 2.571561] systemd[1]: Created slice system-serial\x2dgetty.slice - Slice /system/serial-getty. [ 2.572692] systemd[1]: Created slice user.slice - User and Session Slice. [ 2.573163] systemd[1]: Started systemd-ask-password-console.path - Dispatch Password Requests to Console Directory Watch. [ 2.573510] systemd[1]: Started systemd-ask-password-wall.path - Forward Password Requests to Wall Directory Watch. [ 2.573797] systemd[1]: proc-sys-fs-binfmt_misc.automount - Arbitrary Executable File Formats File System Automount Point skipped, unmet condition check ConditionPathExists=/proc/sys/fs/binfmt_misc [ 2.573881] systemd[1]: Expecting device dev-ttyS0.device - /dev/ttyS0... [ 2.574097] systemd[1]: Reached target paths.target - Path Units. [ 2.574254] systemd[1]: Reached target remote-fs.target - Remote File Systems. [ 2.574386] systemd[1]: Reached target slices.target - Slice Units. [ 2.574522] systemd[1]: Reached target swap.target - Swaps. [ 2.575001] systemd[1]: Listening on syslog.socket - Syslog Socket. [ 2.577411] systemd[1]: Listening on systemd-creds.socket - Credential Encryption/Decryption. [ 2.577941] systemd[1]: Listening on systemd-initctl.socket - initctl Compatibility Named Pipe. [ 2.578412] systemd[1]: Listening on systemd-journald-dev-log.socket - Journal Socket (/dev/log). [ 2.578959] systemd[1]: Listening on systemd-journald.socket - Journal Sockets. [ 2.579632] systemd[1]: Listening on systemd-networkd.socket - Network Service Netlink Socket. [ 2.579893] systemd[1]: systemd-pcrextend.socket - TPM PCR Measurements skipped, unmet condition check ConditionSecurity=measured-uki [ 2.579945] systemd[1]: systemd-pcrlock.socket - Make TPM PCR Policy skipped, unmet condition check ConditionSecurity=measured-uki [ 2.580276] systemd[1]: Listening on systemd-udevd-control.socket - udev Control Socket. [ 2.580707] systemd[1]: Listening on systemd-udevd-kernel.socket - udev Kernel Socket. [ 2.581241] systemd[1]: dev-hugepages.mount - Huge Pages File System skipped, unmet condition check ConditionPathExists=/sys/kernel/mm/hugepages [ 2.584057] systemd[1]: Mounting dev-mqueue.mount - POSIX Message Queue File System... [ 2.586938] systemd[1]: Mounting run-lock.mount - Legacy Locks Directory /run/lock... [ 2.589826] systemd[1]: Mounting sys-kernel-debug.mount - Kernel Debug File System... [ 2.592783] systemd[1]: Mounting sys-kernel-tracing.mount - Kernel Trace File System... [ 2.593548] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 2.596003] systemd[1]: Starting fake-hwclock-load.service - Restore the current clock... [ 2.600570] systemd[1]: Starting keyboard-setup.service - Set the console keyboard layout... [ 2.604814] systemd[1]: Starting kmod-static-nodes.service - Create List of Static Device Nodes... [ 2.613686] systemd[1]: Starting [email protected] - Load Kernel Module configfs... [ 2.617598] systemd[1]: Starting [email protected] - Load Kernel Module drm... [ 2.626158] systemd[1]: Starting modprobe@efi_pstore.service - Load Kernel Module efi_pstore... [ 2.633752] systemd[1]: Starting [email protected] - Load Kernel Module fuse... [ 2.634121] systemd[1]: netplan-ovs-cleanup.service - OpenVSwitch configuration for cleanup skipped, unmet condition check ConditionFileIsExecutable=/usr/bin/ovs-vsctl [ 2.634358] systemd[1]: systemd-hibernate-clear.service - Clear Stale Hibernate Storage Info skipped, unmet condition check ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67 [ 2.639834] systemd[1]: Starting systemd-modules-load.service - Load Kernel Modules... [ 2.643700] systemd[1]: Starting systemd-network-generator.service - Generate Network Units from Kernel Command Line... [ 2.644139] systemd[1]: systemd-pcrmachine.service - TPM PCR Machine ID Measurement skipped, unmet condition check ConditionSecurity=measured-uki [ 2.644383] systemd[1]: systemd-tpm2-setup-early.service - Early TPM SRK Setup skipped, unmet condition check ConditionSecurity=measured-uki [ 2.648310] systemd[1]: Starting systemd-udev-load-credentials.service - Load udev Rules from Credentials... [ 2.652281] systemd[1]: Starting systemd-udev-trigger.service - Coldplug All udev Devices... [ 2.661621] systemd[1]: Mounted dev-mqueue.mount - POSIX Message Queue File System. [ 2.663368] systemd[1]: Mounted run-lock.mount - Legacy Locks Directory /run/lock. [ 2.664501] systemd[1]: Mounted sys-kernel-debug.mount - Kernel Debug File System. [ 2.665462] systemd[1]: Mounted sys-kernel-tracing.mount - Kernel Trace File System. [ 2.666583] systemd[1]: fake-hwclock-load.service: Deactivated successfully. [ 2.667169] systemd[1]: Finished fake-hwclock-load.service - Restore the current clock. [ 2.668734] systemd[1]: Finished kmod-static-nodes.service - Create List of Static Device Nodes. [ 2.669954] systemd[1]: [email protected]: Deactivated successfully. [ 2.670577] systemd[1]: Finished [email protected] - Load Kernel Module configfs. [ 2.671875] systemd[1]: [email protected]: Deactivated successfully. [ 2.672499] systemd[1]: Finished [email protected] - Load Kernel Module drm. [ 2.673859] systemd[1]: modprobe@efi_pstore.service: Deactivated successfully. [ 2.674460] systemd[1]: Finished modprobe@efi_pstore.service - Load Kernel Module efi_pstore. [ 2.675669] systemd[1]: [email protected]: Deactivated successfully. [ 2.676291] systemd[1]: Finished [email protected] - Load Kernel Module fuse. [ 2.683474] systemd[1]: Mounting sys-fs-fuse-connections.mount - FUSE Control File System... [ 2.686792] systemd[1]: Mounting sys-kernel-config.mount - Kernel Configuration File System... [ 2.687022] systemd[1]: systemd-fsck-root.service - File System Check on Root Device skipped, unmet condition check ConditionPathExists=!/run/initramfs/fsck-root [ 2.697694] systemd[1]: Starting systemd-remount-fs.service - Remount Root and Kernel File Systems... [ 2.705654] systemd[1]: Starting systemd-tmpfiles-setup-dev-early.service - Create Static Device Nodes in /dev gracefully... [ 2.708619] systemd[1]: Finished systemd-modules-load.service - Load Kernel Modules. [ 2.714637] systemd[1]: Finished systemd-network-generator.service - Generate Network Units from Kernel Command Line. [ 2.719008] systemd[1]: Finished systemd-udev-load-credentials.service - Load udev Rules from Credentials. [ 2.721423] systemd[1]: Mounted sys-fs-fuse-connections.mount - FUSE Control File System. [ 2.722109] systemd[1]: Reached target network-pre.target - Preparation for Network. [ 2.725804] systemd[1]: Starting systemd-sysctl.service - Apply Kernel Variables... [ 2.727801] systemd[1]: Mounted sys-kernel-config.mount - Kernel Configuration File System. [ 2.772223] systemd[1]: Finished systemd-tmpfiles-setup-dev-early.service - Create Static Device Nodes in /dev gracefully. [ 2.773872] EXT4-fs (mmcblk0p1): re-mounted 2520cc50-b3ea-430f-ba9b-552afa4b6f82 r/w. [ 2.777912] systemd[1]: Finished systemd-remount-fs.service - Remount Root and Kernel File Systems. [ 2.779673] systemd[1]: systemd-hwdb-update.service - Rebuild Hardware Database skipped, unmet condition check ConditionNeedsUpdate=/etc [ 2.779919] systemd[1]: systemd-pstore.service - Platform Persistent Storage Archival skipped, unmet condition check ConditionDirectoryNotEmpty=/sys/fs/pstore [ 2.783365] systemd[1]: Starting systemd-random-seed.service - Load/Save OS Random Seed... [ 2.783733] systemd[1]: systemd-sysusers.service - Create System Users skipped, no trigger condition checks were met. [ 2.790652] systemd[1]: Starting systemd-timesyncd.service - Network Time Synchronization... [ 2.793619] systemd[1]: Starting systemd-tmpfiles-setup-dev.service - Create Static Device Nodes in /dev... [ 2.793932] systemd[1]: systemd-tpm2-setup.service - TPM SRK Setup skipped, unmet condition check ConditionSecurity=measured-uki [ 2.795274] systemd[1]: Finished keyboard-setup.service - Set the console keyboard layout. [ 2.796841] systemd[1]: Finished systemd-sysctl.service - Apply Kernel Variables. [ 2.803118] systemd[1]: Starting systemd-resolved.service - Network Name Resolution... [ 2.852608] systemd[1]: Finished systemd-tmpfiles-setup-dev.service - Create Static Device Nodes in /dev. [ 2.853310] systemd[1]: Reached target local-fs-pre.target - Preparation for Local File Systems. [ 2.857305] systemd[1]: Starting systemd-udevd.service - Rule-based Manager for Device Events and Files... [ 2.956019] systemd[1]: Started systemd-timesyncd.service - Network Time Synchronization. [ 2.957257] systemd[1]: Reached target time-set.target - System Time Set. [ 3.028829] systemd[1]: Started systemd-udevd.service - Rule-based Manager for Device Events and Files. [ 3.037801] systemd[1]: Starting systemd-networkd.service - Network Configuration... [ 3.108456] sd 0:0:0:1: [sdb] Spinning up disk... [ 3.157455] systemd[1]: Finished systemd-udev-trigger.service - Coldplug All udev Devices. [ 3.185174] random: crng init done [ 3.193688] systemd[1]: Finished systemd-random-seed.service - Load/Save OS Random Seed. [ 3.194566] systemd[1]: first-boot-complete.target - First Boot Complete skipped, unmet condition check ConditionFirstBoot=yes [ 3.204351] scsi 1:0:0:0: Direct-Access HIKSEMI PSSD 0100 PQ: 0 ANSI: 6 [ 3.210912] sd 1:0:0:0: [sdc] 2000409264 512-byte logical blocks: (1.02 TB/954 GiB) [ 3.212772] sd 1:0:0:0: [sdc] Write Protect is off [ 3.212811] sd 1:0:0:0: [sdc] Mode Sense: 43 00 00 00 [ 3.213208] sd 1:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 3.234251] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 3.239605] systemd[1]: Found device dev-ttyS0.device - /dev/ttyS0. [ 3.270004] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 3.271763] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600' [ 3.277656] systemd[1]: Started systemd-resolved.service - Network Name Resolution. [ 3.288182] sdc: sdc1 sdc2 [ 3.288736] sd 1:0:0:0: [sdc] Attached SCSI disk [ 3.857154] systemd[1]: Reached target nss-lookup.target - Host and Network Name Lookups. [ 3.857424] systemd[1]: Reached target usb-gadget.target - Hardware activated USB gadget. [ 3.862630] systemd[1]: Mounting tmp.mount - /tmp... [ 3.891645] systemd[1]: Mounted tmp.mount - /tmp. [ 3.892193] systemd[1]: Reached target local-fs.target - Local File Systems. [ 3.894856] systemd[1]: Listening on systemd-sysext.socket - System Extension Image Management. [ 3.897761] systemd[1]: Starting armbian-zram-config.service - Armbian ZRAM config... [ 3.900711] systemd[1]: Starting console-setup.service - Set console font and keymap... [ 3.901703] systemd[1]: systemd-binfmt.service - Set Up Additional Binary Formats skipped, unmet condition check ConditionPathIsMountPoint=/proc/sys/fs/binfmt_misc [ 3.901895] systemd[1]: systemd-machine-id-commit.service - Save Transient machine-id to Disk skipped, unmet condition check ConditionPathIsMountPoint=/etc/machine-id [ 3.935051] systemd[1]: Finished console-setup.service - Set console font and keymap. [ 4.125129] .ready [ 4.496526] sd 0:0:0:1: [sdb] 122167296 512-byte logical blocks: (62.5 GB/58.3 GiB) [ 4.497199] sd 0:0:0:1: [sdb] Write Protect is off [ 4.497208] sd 0:0:0:1: [sdb] Mode Sense: 21 00 00 00 [ 4.497863] sd 0:0:0:1: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 4.526869] sdb: sdb1 [ 4.527177] sd 0:0:0:1: [sdb] Attached SCSI removable disk [ 4.536274] zram: Added device: zram0 [ 4.536958] zram: Added device: zram1 [ 4.537502] zram: Added device: zram2 [ 4.560724] zswap: loaded using pool lzo [ 4.583622] zram0: detected capacity change from 0 to 4021480 [ 4.602878] Adding 2010736k swap on /dev/zram0. Priority:5 extents:1 across:2010736k SS [ 4.618289] systemd[1]: Started systemd-networkd.service - Network Configuration. [ 4.620664] rk_gmac-dwmac 2a040000.ethernet end1: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 4.623308] systemd[1]: Starting systemd-networkd-persistent-storage.service - Enable Persistent Storage in systemd-networkd... [ 4.635307] zram1: detected capacity change from 0 to 102400 [ 4.649148] rk_gmac-dwmac 2a040000.ethernet end1: PHY [stmmac-1:01] driver [RTL8211F Gigabit Ethernet] (irq=POLL) [ 4.651091] dwmac4: Master AXI performs any burst length [ 4.651105] rk_gmac-dwmac 2a040000.ethernet end1: No Safety Features support found [ 4.651449] rk_gmac-dwmac 2a040000.ethernet end1: IEEE 1588-2008 Advanced Timestamp supported [ 4.651645] rk_gmac-dwmac 2a040000.ethernet end1: registered PTP clock [ 4.651652] rk_gmac-dwmac 2a040000.ethernet end1: configuring for phy/rgmii-rxid link mode [ 4.672612] systemd[1]: Finished armbian-zram-config.service - Armbian ZRAM config. [ 4.675764] systemd[1]: Starting armbian-ramlog.service - Armbian memory supported logging... [ 4.679240] rk_gmac-dwmac 29d20000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 4.705167] rk_gmac-dwmac 29d20000.ethernet end0: PHY [stmmac-0:02] driver [RTL8211F Gigabit Ethernet] (irq=POLL) [ 4.717129] dwmac4: Master AXI performs any burst length [ 4.717166] rk_gmac-dwmac 29d20000.ethernet end0: No Safety Features support found [ 4.717690] rk_gmac-dwmac 29d20000.ethernet end0: IEEE 1588-2008 Advanced Timestamp supported [ 4.718006] rk_gmac-dwmac 29d20000.ethernet end0: registered PTP clock [ 4.718031] rk_gmac-dwmac 29d20000.ethernet end0: configuring for phy/rgmii-rxid link mode [ 4.747457] systemd[1]: Finished systemd-networkd-persistent-storage.service - Enable Persistent Storage in systemd-networkd. [ 4.748565] EXT4-fs (zram1): mounted filesystem 839fe5ef-a8e2-4adc-b9a0-0c76a7cc60b4 r/w without journal. Quota mode: disabled. [ 5.000713] systemd[1]: Finished armbian-ramlog.service - Armbian memory supported logging. [ 5.007005] systemd[1]: Starting systemd-journald.service - Journal Service... [ 5.093778] systemd-journald[438]: Collecting audit messages is disabled. [ 5.173135] systemd[1]: Started systemd-journald.service - Journal Service. [ 5.231994] systemd-journald[438]: Received client request to flush runtime journal. [ 5.588283] systemd-journald[438]: Received client request to relinquish /var/log/journal/958cd540f0e041c6b855006cbba7667a access. [ 6.241260] NOTICE: Automounting of tracing to debugfs is deprecated and will be removed in 2030 [ 7.806604] rk_gmac-dwmac 29d20000.ethernet end0: Link is Up - 1Gbps/Full - flow control rx/tx [ 8.766543] rk_gmac-dwmac 2a040000.ethernet end1: Link is Up - 1Gbps/Full - flow control rx/tx [ 31.709317] vdd_npu_s0: disabling
To: Stephen Boyd <[email protected]>
To: Brian Masney <[email protected]>
To: Jerome Brunet <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Heiko Stuebner <[email protected]>
To: Philipp Zabel <[email protected]>
To: Elaine Zhang <[email protected]>
To: Lee Jones <[email protected]>
To: Linus Walleij <[email protected]>
To: Bartosz Golaszewski <[email protected]>
To: Richard Cochran <[email protected]>
To: Ulf Hansson <[email protected]>
To: Andi Shyti <[email protected]>
To: Greg Kroah-Hartman <[email protected]>
To: Jiri Slaby <[email protected]>
To: Jisheng Zhang <[email protected]>
To: Andrew Lunn <[email protected]>
To: "David S. Miller" <[email protected]>
To: Eric Dumazet <[email protected]>
To: Jakub Kicinski <[email protected]>
To: Paolo Abeni <[email protected]>
To: David Wu <[email protected]>
To: "Rafael J. Wysocki" <[email protected]>
To: Daniel Lezcano <[email protected]>
To: Zhang Rui <[email protected]>
To: Lukasz Luba <[email protected]>
To: Maxime Chevallier <[email protected]>
To: Maxime Coquelin <[email protected]>
To: Alexandre Torgue <[email protected]>
To: Vinod Koul <[email protected]>
To: Neil Armstrong <[email protected]>
To: Manivannan Sadhasivam <[email protected]>
To: Cunhao Lu <[email protected]>
To: Thinh Nguyen <[email protected]>
To: Jaehoon Chung <[email protected]>
To: Shawn Lin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
Cunhao Lu (27):
dt-bindings: clock: rockchip: Add RK3572 CRU
dt-bindings: power: rockchip: Add RK3572 power domains
dt-bindings: soc: rockchip: Add RK3572 PMU and GRF
dt-bindings: mfd: syscon: Add RK3572 QoS register compatible
dt-bindings: pinctrl: rockchip: Add RK3572
dt-bindings: gpio: rockchip: Add RK3572 GPIO banks
clk: rockchip: Add RK3572 clock and reset support
pinctrl: rockchip: Add RK3572 support
gpio: rockchip: Add RK3572 GPIO support
pmdomain: rockchip: Add RK3572 boot peripheral domains
dt-bindings: i2c: rk3x: Add RK3572
dt-bindings: serial: snps-dw-apb-uart: Add RK3572
dt-bindings: mmc: rockchip: Add RK3572 controllers
dt-bindings: net: rockchip-dwmac: Add RK3572
dt-bindings: thermal: rockchip: Add RK3572
net: stmmac: dwmac-rk: Add RK3572 support
thermal: rockchip: Add RK3572 support
dt-bindings: phy: rockchip-inno-usb2: Add RK3572
dt-bindings: phy: rockchip-naneng-combphy: Add RK3572
dt-bindings: usb: rockchip: Add RK3572 DWC3 controller
phy: rockchip-inno-usb2: Add RK3572 support
phy: rockchip-naneng-combphy: Add RK3572 support
usb: dwc3: Configure RK3572 PIPE port before discovery
mmc: dw_mmc-rockchip: Keep RK3572 NVM domain powered
dt-bindings: arm: rockchip: Add Forlinx OK3572-C
arm64: dts: rockchip: Add RK3572 SoC
arm64: dts: rockchip: Add initial support for Forlinx OK3572-C
.../devicetree/bindings/arm/rockchip.yaml | 6 + .../devicetree/bindings/arm/rockchip/pmu.yaml | 2 + .../bindings/clock/rockchip,rk3572-cru.yaml | 57 + .../bindings/gpio/rockchip,gpio-bank.yaml | 24 +- .../devicetree/bindings/i2c/i2c-rk3x.yaml | 1 + Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + .../devicetree/bindings/mmc/rockchip-dw-mshc.yaml | 1 + .../bindings/mmc/snps,dwcmshc-sdhci.yaml | 3 + .../devicetree/bindings/net/rockchip-dwmac.yaml | 3 + .../bindings/phy/phy-rockchip-naneng-combphy.yaml | 23 + .../bindings/phy/rockchip,inno-usb2phy.yaml | 14 + .../bindings/pinctrl/rockchip,pinctrl.yaml | 1 + .../bindings/power/rockchip,power-controller.yaml | 17 + .../bindings/serial/snps-dw-apb-uart.yaml | 1 + .../devicetree/bindings/soc/rockchip/grf.yaml | 12 + .../bindings/thermal/rockchip-thermal.yaml | 2 + .../bindings/usb/rockchip,rk3572-dwc3.yaml | 100 + arch/arm64/boot/dts/rockchip/Makefile | 1 + .../dts/rockchip/rk3572-forlinx-fet3572-c.dtsi | 369 ++ .../boot/dts/rockchip/rk3572-forlinx-ok3572-c.dts | 286 ++ arch/arm64/boot/dts/rockchip/rk3572-opp.dtsi | 165 + arch/arm64/boot/dts/rockchip/rk3572-pinctrl.dtsi | 3935 ++++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk3572.dtsi | 1325 +++++++ drivers/clk/rockchip/Kconfig | 7 + drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-rk3572.c | 1972 ++++++++++ drivers/clk/rockchip/clk.h | 36 + drivers/clk/rockchip/rst-rk3572.c | 739 ++++ drivers/gpio/gpio-rockchip.c | 91 +- drivers/mmc/host/dw_mmc-rockchip.c | 24 + drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 53 + drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 136 + drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 201 + drivers/pinctrl/pinctrl-rockchip.c | 230 +- drivers/pinctrl/pinctrl-rockchip.h | 9 +- drivers/pmdomain/rockchip/pm-domains.c | 141 +- drivers/thermal/rockchip_thermal.c | 28 + drivers/usb/dwc3/dwc3-generic-plat.c | 31 + include/dt-bindings/clock/rockchip,rk3572-cru.h | 560 +++ .../power/rockchip,rk3572-power-controller.h | 30 + include/dt-bindings/reset/rockchip,rk3572-cru.h | 713 ++++ include/soc/rockchip/rockchip_sip.h | 5 + 42 files changed, 11332 insertions(+), 24 deletions(-)
---
base-commit: a804c5742bff224d4cb4d25dd383554d598be32b
change-id: 20261021-add-board-ok3572-c-8ed18b9065da
Best regards,
Signature · 1 line
Cunhao Lu <[email protected]>
PATCH 1/27 dt-bindings: clock: rockchip: Add RK3572 CRU
The CRU uses the PMU0 GRF for PLL status and the AUPLL reference mux. Describe the controller and define its clock and reset IDs.
--- .../bindings/clock/rockchip,rk3572-cru.yaml | 57 ++ include/dt-bindings/clock/rockchip,rk3572-cru.h | 560 ++++++++++++++++ include/dt-bindings/reset/rockchip,rk3572-cru.h | 713 +++++++++++++++++++++ 3 files changed, 1330 insertions(+)
Documentation/devicetree/bindings/clock/rockchip,rk3572-cru.yaml new file +57 -0
@@ -0,0 +1,57 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/rockchip,rk3572-cru.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip RK3572 Family Clock and Reset Control Module + +maintainers: + - Elaine Zhang <[email protected]> + - Heiko Stuebner <[email protected]> + +description: + The RK3572 CRU supplies peripheral clocks and resets. + +properties: + compatible: + const: rockchip,rk3572-cru + + reg: + maxItems: 1 + + "#clock-cells": + const: 1 + + "#reset-cells": + const: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: xin24m + + rockchip,grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: PMU0 GRF register block. + +required: + - compatible + - reg + - "#clock-cells" + - "#reset-cells" + - rockchip,grf + +additionalProperties: false + +examples: + - | + clock-controller@26090000 { + compatible = "rockchip,rk3572-cru"; + reg = <0x26090000 0x60000>; + #clock-cells = <1>; + #reset-cells = <1>; + rockchip,grf = <&pmu0_grf>; + };
include/dt-bindings/clock/rockchip,rk3572-cru.h new file +560 -0
560 lines not on this page · raw message
include/dt-bindings/reset/rockchip,rk3572-cru.h new file +713 -0
713 lines not on this page · raw message
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 01/27] dt-bindings: clock: rockchip: Add RK3572 CRU
Sashiko has reviewed this patch and found no issues.
Quoted 6 lines
From: Cunhao Lu <[email protected]>
The CRU uses the PMU0 GRF for PLL status and the AUPLL reference mux. Describe the controller and define its clock and reset IDs.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Re: [PATCH 01/27] dt-bindings: clock: rockchip: Add RK3572 CRU
In reply to Cunhao LuQuoted 10 lines · Cunhao Lu
The CRU uses the PMU0 GRF for PLL status and the AUPLL reference mux. Describe the controller and define its clock and reset IDs.
Signed-off-by Cunhao Lu <[email protected]>--- .../bindings/clock/rockchip,rk3572-cru.yaml | 57 ++ include/dt-bindings/clock/rockchip,rk3572-cru.h | 560 ++++++++++++++++ include/dt-bindings/reset/rockchip,rk3572-cru.h | 713 +++++++++++++++++++++ 3 files changed, 1330 insertions(+)
PATCH 2/27 dt-bindings: power: rockchip: Add RK3572 power domains
In reply to Cunhao LuDefine the RK3572 power-domain IDs and require the system GRF used to check firewall status.
--- .../bindings/power/rockchip,power-controller.yaml | 17 ++++++++++++ .../power/rockchip,rk3572-power-controller.h | 30 ++++++++++++++++++++++ 2 files changed, 47 insertions(+)
Documentation/devicetree/bindings/power/rockchip,power-controller.yaml +17 -0
@@ -43,6 +43,7 @@ properties: - rockchip,rk3528-power-controller - rockchip,rk3562-power-controller - rockchip,rk3568-power-controller + - rockchip,rk3572-power-controller - rockchip,rk3576-power-controller - rockchip,rk3588-power-controller - rockchip,rv1126-power-controller
@@ -57,6 +58,22 @@ properties: "#size-cells": const: 0 + rockchip,grf: + $ref: /schemas/types.yaml#/definitions/phandle + description: System GRF with firewall readiness status. + +allOf: + - if: + properties: + compatible: + const: rockchip,rk3572-power-controller + then: + required: + - rockchip,grf + else: + properties: + rockchip,grf: false + required: - compatible - "#power-domain-cells"
include/dt-bindings/power/rockchip,rk3572-power-controller.h new file +30 -0
@@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* +* Copyright (c) 2026 Rockchip Electronics Co., Ltd. +* Author: Finley Xiao <[email protected]> +*/ + +#ifndef __DT_BINDINGS_POWER_RK3572_POWER_CONTROLLER_H__ +#define __DT_BINDINGS_POWER_RK3572_POWER_CONTROLLER_H__ + +/* VD_NPU */ +#define RK3572_PD_NPU 0 + +/* VD_GPU */ +#define RK3572_PD_GPU 1 + +/* VD_LOGIC */ +#define RK3572_PD_NVM0 2 +#define RK3572_PD_NVM1 3 +#define RK3572_PD_DSMC 4 +#define RK3572_PD_PHP 5 +#define RK3572_PD_AUDIO 6 +#define RK3572_PD_IMG 7 +#define RK3572_PD_VDEC 8 +#define RK3572_PD_VI 9 +#define RK3572_PD_VENC 10 +#define RK3572_PD_VO 11 +#define RK3572_PD_VOP 12 +#define RK3572_PD_VOP_PRE 13 + +#endif
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 02/27] dt-bindings: power: rockchip: Add RK3572 power domains
Sashiko has reviewed this patch and found no issues.
Quoted 6 lines
From: Cunhao Lu <[email protected]>
Define the RK3572 power-domain IDs and require the system GRF used to check firewall status.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Re: [PATCH 02/27] dt-bindings: power: rockchip: Add RK3572 power domains
In reply to Cunhao LuQuoted 9 lines · Cunhao Lu
Define the RK3572 power-domain IDs and require the system GRF used to check firewall status.
Signed-off-by Cunhao Lu <[email protected]>--- .../bindings/power/rockchip,power-controller.yaml | 17 ++++++++++++ .../power/rockchip,rk3572-power-controller.h | 30 ++++++++++++++++++++++ 2 files changed, 47 insertions(+)
PATCH 3/27 dt-bindings: soc: rockchip: Add RK3572 PMU and GRF
In reply to Cunhao LuThe RK3572 PMU and GRF blocks are system controllers shared with the clock, power-domain, and USB PHY drivers.
--- Documentation/devicetree/bindings/arm/rockchip/pmu.yaml | 2 ++ Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 12 ++++++++++++ 2 files changed, 14 insertions(+)
Documentation/devicetree/bindings/arm/rockchip/pmu.yaml +2 -0
@@ -28,6 +28,7 @@ select: - rockchip,rk3528-pmu - rockchip,rk3562-pmu - rockchip,rk3568-pmu + - rockchip,rk3572-pmu - rockchip,rk3576-pmu - rockchip,rk3588-pmu - rockchip,rv1126-pmu
@@ -48,6 +49,7 @@ properties: - rockchip,rk3528-pmu - rockchip,rk3562-pmu - rockchip,rk3568-pmu + - rockchip,rk3572-pmu - rockchip,rk3576-pmu - rockchip,rk3588-pmu - rockchip,rv1126-pmu
Documentation/devicetree/bindings/soc/rockchip/grf.yaml +12 -0
@@ -30,6 +30,12 @@ properties: - rockchip,rk3568-pipe-grf - rockchip,rk3568-pipe-phy-grf - rockchip,rk3568-usb2phy-grf + - rockchip,rk3572-ioc-grf + - rockchip,rk3572-nvm0-grf + - rockchip,rk3572-php-grf + - rockchip,rk3572-pipe-phy-grf + - rockchip,rk3572-pmu0-grf + - rockchip,rk3572-sys-grf - rockchip,rk3576-bigcore-grf - rockchip,rk3576-cci-grf - rockchip,rk3576-dcphy-grf
@@ -95,6 +101,7 @@ properties: - rockchip,rk3562-pmu-grf - rockchip,rk3568-grf - rockchip,rk3568-pmugrf + - rockchip,rk3572-usb2phy-grf - rockchip,rk3576-ioc-grf - rockchip,rk3576-pmu0-grf - rockchip,rk3576-usb2phy-grf
@@ -258,6 +265,7 @@ allOf: - rockchip,rk3308-usb2phy-grf - rockchip,rk3328-usb2phy-grf - rockchip,rk3399-grf + - rockchip,rk3572-usb2phy-grf - rockchip,rk3576-usb2phy-grf - rockchip,rk3588-usb2phy-grf - rockchip,rv1108-grf
@@ -309,6 +317,10 @@ allOf: compatible: contains: enum: + - rockchip,rk3572-nvm0-grf + - rockchip,rk3572-php-grf + - rockchip,rk3572-pipe-phy-grf + - rockchip,rk3572-usb2phy-grf - rockchip,rk3576-dcphy-grf - rockchip,rk3576-vo1-grf - rockchip,rk3588-vo-grf
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 03/27] dt-bindings: soc: rockchip: Add RK3572 PMU and GRF
Sashiko has reviewed this patch and found no issues.
Quoted 6 lines
From: Cunhao Lu <[email protected]>
The RK3572 PMU and GRF blocks are system controllers shared with the clock, power-domain, and USB PHY drivers.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
Re: [PATCH 03/27] dt-bindings: soc: rockchip: Add RK3572 PMU and GRF
In reply to Cunhao LuQuoted 9 lines · Cunhao Lu
The RK3572 PMU and GRF blocks are system controllers shared with the clock, power-domain, and USB PHY drivers.
Signed-off-by Cunhao Lu <[email protected]>--- Documentation/devicetree/bindings/arm/rockchip/pmu.yaml | 2 ++ Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 12 ++++++++++++ 2 files changed, 14 insertions(+)
PATCH 4/27 dt-bindings: mfd: syscon: Add RK3572 QoS register compatible
In reply to Cunhao LuAdd rockchip,rk3572-qos to the syscon compatible list.
--- Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mfd/syscon.yaml +1 -0
@@ -118,6 +118,7 @@ properties: - rockchip,rk3528-qos - rockchip,rk3562-qos - rockchip,rk3568-qos + - rockchip,rk3572-qos - rockchip,rk3576-qos - rockchip,rk3588-qos - rockchip,rv1126-qos
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 04/27] dt-bindings: mfd: syscon: Add RK3572 QoS register compatible
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
From: Cunhao Lu <[email protected]>
Add rockchip,rk3572-qos to the syscon compatible list.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
Re: [PATCH 04/27] dt-bindings: mfd: syscon: Add RK3572 QoS register compatible
In reply to Cunhao LuQuoted 6 lines · Cunhao Lu
Add rockchip,rk3572-qos to the syscon compatible list.
Signed-off-by Cunhao Lu <[email protected]>--- Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + 1 file changed, 1 insertion(+)
Re: (subset) [PATCH 04/27] dt-bindings: mfd: syscon: Add RK3572 QoS register compatible
In reply to Cunhao LuQuoted 1 line · Cunhao Lu
Add rockchip,rk3572-qos to the syscon compatible list.
Applied, thanks!
[04/27] dt-bindings: mfd: syscon: Add RK3572 QoS register compatible
commit: 9776fbb47d6c9d0928c66734ed565d870d8fdfe9
--
Lee Jones [李琼斯]
PATCH 5/27 dt-bindings: pinctrl: rockchip: Add RK3572
In reply to Cunhao LuAdd the RK3572 pinctrl compatible.
--- Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml +1 -0
@@ -48,6 +48,7 @@ properties: - rockchip,rk3528-pinctrl - rockchip,rk3562-pinctrl - rockchip,rk3568-pinctrl + - rockchip,rk3572-pinctrl - rockchip,rk3576-pinctrl - rockchip,rk3588-pinctrl - rockchip,rv1103b-pinctrl
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 05/27] dt-bindings: pinctrl: rockchip: Add RK3572
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
From: Cunhao Lu <[email protected]>
Add the RK3572 pinctrl compatible.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
Re: [PATCH 05/27] dt-bindings: pinctrl: rockchip: Add RK3572
In reply to Cunhao LuQuoted 7 lines · Cunhao Lu
Add the RK3572 pinctrl compatible.
Signed-off-by Cunhao Lu <[email protected]>--- Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.yaml | 1 + 1 file changed, 1 insertion(+)
Linus Walleij
maintainerRe: [PATCH 05/27] dt-bindings: pinctrl: rockchip: Add RK3572
In reply to Cunhao LuQuoted 5 lines · On Wed, Oct 21, 2026 at 6:12 PM Cunhao Lu via B4 Relay…
From: Cunhao Lu <[email protected]>
Add the RK3572 pinctrl compatible.
Signed-off-by Cunhao Lu <[email protected]>
This patch 5/27 applied to the pinctrl tree.
Yours,
Linus Walleij
PATCH 6/27 dt-bindings: gpio: rockchip: Add RK3572 GPIO banks
In reply to Cunhao LuRK3572 GPIO banks have four parent interrupts and a separate debounce clock.
--- .../bindings/gpio/rockchip,gpio-bank.yaml | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/gpio/rockchip,gpio-bank.yaml +23 -1
@@ -14,12 +14,14 @@ properties: enum: - rockchip,gpio-bank - rockchip,rk3188-gpio-bank0 + - rockchip,rk3572-gpio-bank reg: maxItems: 1 interrupts: - maxItems: 1 + minItems: 1 + maxItems: 4 clocks: minItems: 1
@@ -51,6 +53,26 @@ properties: of this bank, on SoCs such as the RV1106 where each GPIO bank has its own IOC block. +allOf: + - if: + properties: + compatible: + const: rockchip,rk3572-gpio-bank + then: + properties: + interrupts: + items: + - description: GPIO group 0 + - description: GPIO group 1 + - description: GPIO group 2 + - description: GPIO group 3 + clocks: + minItems: 2 + else: + properties: + interrupts: + maxItems: 1 + patternProperties: "^.+-hog(-[0-9]+)?$": type: object
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 06/27] dt-bindings: gpio: rockchip: Add RK3572 GPIO banks
Sashiko has reviewed this patch and found no issues.
Quoted 6 lines
From: Cunhao Lu <[email protected]>
RK3572 GPIO banks have four parent interrupts and a separate debounce clock.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
Re: [PATCH 06/27] dt-bindings: gpio: rockchip: Add RK3572 GPIO banks
In reply to Cunhao LuQuoted 8 lines · Cunhao Lu
RK3572 GPIO banks have four parent interrupts and a separate debounce clock.
Signed-off-by Cunhao Lu <[email protected]>--- .../bindings/gpio/rockchip,gpio-bank.yaml | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
Re: [PATCH 06/27] dt-bindings: gpio: rockchip: Add RK3572 GPIO banks
In reply to Cunhao LuQuoted 6 lines · On Wed, Oct 21, 2026 at 6:12 PM Cunhao Lu via B4 Relay…
From: Cunhao Lu <[email protected]>
RK3572 GPIO banks have four parent interrupts and a separate debounce clock.
Signed-off-by Cunhao Lu <[email protected]>
Perhaps Bartosz can just apply this one patch to shrink the series?
Yours,
Linus Walleij
PATCH 7/27 clk: rockchip: Add RK3572 clock and reset support
In reply to Cunhao LuCPU clocks are managed by SCMI. Keep BPLL and LPLL enabled for firmware consumers.
--- drivers/clk/rockchip/Kconfig | 7 + drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-rk3572.c | 1972 +++++++++++++++++++++++++++++++++++++ drivers/clk/rockchip/clk.h | 36 + drivers/clk/rockchip/rst-rk3572.c | 739 ++++++++++++++ 5 files changed, 2755 insertions(+)
drivers/clk/rockchip/Kconfig +7 -0
@@ -142,6 +142,13 @@ config CLK_RK3568 help Build the driver for RK3568 Clock Driver. +config CLK_RK3572 + bool "Rockchip RK3572 clock controller support" + depends on ARM64 || COMPILE_TEST + default y + help + Build the driver for RK3572 Clock Driver. + config CLK_RK3576 bool "Rockchip RK3576 clock controller support" depends on ARM64 || COMPILE_TEST
drivers/clk/rockchip/Makefile +1 -0
@@ -36,5 +36,6 @@ obj-$(CONFIG_CLK_RK3506) += clk-rk3506.o rst-rk3506.o obj-$(CONFIG_CLK_RK3528) += clk-rk3528.o rst-rk3528.o obj-$(CONFIG_CLK_RK3562) += clk-rk3562.o rst-rk3562.o obj-$(CONFIG_CLK_RK3568) += clk-rk3568.o +obj-$(CONFIG_CLK_RK3572) += clk-rk3572.o rst-rk3572.o obj-$(CONFIG_CLK_RK3576) += clk-rk3576.o rst-rk3576.o obj-$(CONFIG_CLK_RK3588) += clk-rk3588.o rst-rk3588.o
drivers/clk/rockchip/clk-rk3572.c new file +1972 -0
1,972 lines not on this page · raw message
drivers/clk/rockchip/clk.h +36 -0
@@ -426,6 +426,41 @@ struct clk;#define RK3568_PMU_CLKGATE_CON (x) ((x) * 0x4 + 0x180)#define RK3568_PMU_SOFTRST_CON (x) ((x) * 0x4 + 0x200) +#define RK3572_PHP_CRU_BASE 0x8000 +#define RK3572_SECURE_NS_CRU_BASE 0x10000 +#define RK3572_PMU_CRU_BASE 0x20000 +#define RK3572_BIGCORE_CRU_BASE 0x40000 +#define RK3572_LITCORE0_CRU_BASE 0x48000 +#define RK3572_LITCORE1_CRU_BASE 0x50000 +#define RK3572_CCI_CRU_BASE 0x58000 + +#define RK3572_PLL_CON (x) (RK2928_PLL_CON(x) + 0x4000) +#define RK3572_MODE_CON0 0x4280 +#define RK3572_MODE_CON1 0x4284 +#define RK3572_CLKSEL_CON (x) ((x) * 0x4 + 0x300) +#define RK3572_CLKGATE_CON (x) ((x) * 0x4 + 0x800) +#define RK3572_SOFTRST_CON (x) ((x) * 0x4 + 0xa00) +#define RK3572_GLB_SRST_FST 0xc08 +#define RK3572_NON_SECURE_GATING_CON00 0xc48 + +#define RK3572_PPLL_CON (x) ((x) * 0x4 + RK3572_PHP_CRU_BASE) +#define RK3572_PHP_CLKSEL_CON (x) ((x) * 0x4 + RK3572_PHP_CRU_BASE + 0x300) +#define RK3572_PHP_CLKGATE_CON (x) ((x) * 0x4 + RK3572_PHP_CRU_BASE + 0x800) + +#define RK3572_PMU_CLKSEL_CON (x) ((x) * 0x4 + RK3572_PMU_CRU_BASE + 0x300) +#define RK3572_PMU_CLKGATE_CON (x) ((x) * 0x4 + RK3572_PMU_CRU_BASE + 0x800) + +#define RK3572_SECURE_NS_CLKSEL_CON (x) ((x) * 0x4 + RK3572_SECURE_NS_CRU_BASE + 0x300) +#define RK3572_SECURE_NS_CLKGATE_CON (x) ((x) * 0x4 + RK3572_SECURE_NS_CRU_BASE + 0x800) + +#define RK3572_LPLL_CON (x) ((x) * 0x4 + RK3572_CCI_CRU_BASE) +#define RK3572_LPLL_MODE_CON0 (0x280 + RK3572_CCI_CRU_BASE) +#define RK3572_CCI_CLKSEL_CON (x) ((x) * 0x4 + RK3572_CCI_CRU_BASE + 0x300) + +#define RK3572_BIGCORE_CLKSEL_CON (x) ((x) * 0x4 + RK3572_BIGCORE_CRU_BASE + 0x300) +#define RK3572_LITCORE0_CLKSEL_CON (x) ((x) * 0x4 + RK3572_LITCORE0_CRU_BASE + 0x300) +#define RK3572_LITCORE1_CLKSEL_CON (x) ((x) * 0x4 + RK3572_LITCORE1_CRU_BASE + 0x300) +#define RK3576_PHP_CRU_BASE 0x8000#define RK3576_SECURE_NS_CRU_BASE 0x10000#define RK3576_PMU_CRU_BASE 0x20000
@@ -1396,6 +1431,7 @@ void rv1126b_rst_init(struct device_node *np, void __iomem *reg_base);void rk3506_rst_init (struct device_node *np,void __iomem *reg_base);void rk3528_rst_init (struct device_node *np,void __iomem *reg_base);void rk3562_rst_init (struct device_node *np,void __iomem *reg_base); +void rk3572_rst_init (struct device_node *np,void __iomem *reg_base);void rk3576_rst_init (struct device_node *np,void __iomem *reg_base);void rk3588_rst_init (struct device_node *np,void __iomem *reg_base);
drivers/clk/rockchip/rst-rk3572.c new file +739 -0
739 lines not on this page · raw message
Signature · 1 line
2.34.1
Heiko Stübner
maintainerRe: [PATCH 07/27] clk: rockchip: Add RK3572 clock and reset support
Hi,
Am Mittwoch, 21. Oktober 2026, 18:11:04 Mitteleuropäische Sommerzeit schrieb Cunhao Lu via B4 Relay:
Quoted 6 lines
From: Cunhao Lu <[email protected]>
CPU clocks are managed by SCMI. Keep BPLL and LPLL enabled for firmware consumers.
Signed-off-by Cunhao Lu <[email protected]>
[...]
drivers/clk/rockchip/clk-rk3572.c line 5
Quoted 11 lines
drivers/clk/rockchip/clk-rk3572.c new file +5
-0@@ -0,0 +1,1972 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (c) 2025 Rockchip Electronics Co., Ltd. +* Author: Elaine Zhang <[email protected]> +*/
As you didn't write this driver on your own and even kept the original author, please also credit the original author in the commit itself.
This can be done for example with something like
git commit --amend --author="Elaine Zhang <[email protected]>"
and in the commit also have both signed-offs-by, aka Elaine first then yours below as the submitter, i.e. like
+++++++++++
+++++++++++
The same applies to all commits coming from the Rockchip vendor kernel.
Thanks
Heiko
Re: [PATCH 07/27] clk: rockchip: Add RK3572 clock and reset support
Hi Heiko,
Quoted 8 lines
As you didn't write this driver on your own and even kept the original author, please also credit the original author in the commit itself.
This can be done for example with something like
git commit --amend --author="Elaine Zhang <[email protected]>" and in the commit also have both signed-offs-by, aka Elaine first then yours below as the submitter, i.e. like
Quoted 7 lines
+++++++++++
Signed-off-by Elaine Zhang <[email protected]>[document what changes you did inside the brackets]Signed-off-by Cunhao Lu <[email protected]>+++++++++++
The same applies to all commits coming from the Rockchip vendor kernel.
Thanks for pointing this out, and sorry for missing the commit authorship.
I'll review all patches and add the original authors' names where necessary. However, because the BSP I received does not include Git commit history, I can only identify them from the names noted in the file headers.
Best regards,
Cunhao
Heiko Stübner
maintainerRe: [PATCH 07/27] clk: rockchip: Add RK3572 clock and reset support
Hi,
Am Donnerstag, 22. Oktober 2026, 08:09:02 Mitteleuropäische Sommerzeit schrieb Cunhao Lu:
Quoted 16 lines
Hi Heiko,
Quoted 14 lines
As you didn't write this driver on your own and even kept the original author, please also credit the original author in the commit itself.
This can be done for example with something like
git commit --amend --author="Elaine Zhang <[email protected]>" and in the commit also have both signed-offs-by, aka Elaine first then yours below as the submitter, i.e. like+++++++++++
Signed-off-by Elaine Zhang <[email protected]>[document what changes you did inside the brackets]Signed-off-by Cunhao Lu <[email protected]>+++++++++++
Quoted 7 lines
Quoted 1 line
The same applies to all commits coming from the Rockchip vendor kernel.
Thanks for pointing this out, and sorry for missing the commit authorship.
I'll review all patches and add the original authors' names where necessary. However, because the BSP I received does not include Git commit history, I can only identify them from the names noted in the file headers.
Rockchip has published a development branch based on 6.12 on github [0] . This includes this clock driver [1] and most likely all the other parts as well. You can use this to cross-reference.
If there are multiple authors changing the rk3572-specific parts of a file, please use the first patch author from that history for your patch, as we don't want to replicate the development history from that vendor kernel tree.
Thanks
Heiko
[0] https://github.com/rockchip-linux/kernel/tree/develop-6.12
[1] https://github.com/rockchip-linux/kernel/blob/develop-6.12/drivers/clk/rockchip/clk-rk3572.c
Re: [PATCH 07/27] clk: rockchip: Add RK3572 clock and reset support
Hi Heiko,
Quoted 8 lines
Rockchip has published a development branch based on 6.12 on github [0] . This includes this clock driver [1] and most likely all the other parts as well. You can use this to cross-reference.
If there are multiple authors changing the rk3572-specific parts of a file, please use the first patch author from that history for your patch, as we don't want to replicate the development history from that vendor kernel tree.
Thank you for the link and clarification.
I'll cross-reference the RK3572 changes with:
rockchip-linux/kernel:develop-6.12
Best regards,
Cunhao
kernel test robot
build botRe: [PATCH 07/27] clk: rockchip: Add RK3572 clock and reset support
In reply to Cunhao Lukernel test robot noticed the following build warnings:
Hi Cunhao,
kernel test robot noticed the following build warnings:
[auto build test WARNING on a804c5742bff224d4cb4d25dd383554d598be32b]
url: https://github.com/intel-lab-lkp/linux/commits/Cunhao-Lu-via-B4-Relay/dt-bindings-clock-rockchip-Add-RK3572-CRU/20261022-001058 base: a804c5742bff224d4cb4d25dd383554d598be32b patch link: https://lore.kernel.org/r/20261022-add-board-ok3572-c-v1-7-0b0fd85a31ee%40qq.com patch subject: [PATCH 07/27] clk: rockchip: Add RK3572 clock and reset support config: arm-randconfig-1001-20261022 (https://download.01.org/0day-ci/archive/20261022/[email protected]/config) compiler: clang version 21.1.8 (https://github.com/llvm/llvm-project 2078da43e25a4623cab2d0d60decddf709aaea28) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261022/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
>> drivers/clk/rockchip/clk-rk3572.c:121:40: warning: implicit conversion from 'int' to 's16' (aka 'short') changes value from 47185 to -18351 [-Wconstant-conversion]
121 | RK3588_PLL_RATE(266580000, 1, 178, 4, 47185),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
drivers/clk/rockchip/clk.h:607:7: note: expanded from macro 'RK3588_PLL_RATE'
604 | .p = _p, \
| ~
605 | .m = _m, \
606 | .s = _s, \
607 | .k = _k, \
| ^~
drivers/clk/rockchip/clk-rk3572.c:116:40: warning: implicit conversion from 'int' to 's16' (aka 'short') changes value from 52428 to -13108 [-Wconstant-conversion]
116 | RK3588_PLL_RATE(604800000, 1, 101, 2, 52428),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
drivers/clk/rockchip/clk.h:607:7: note: expanded from macro 'RK3588_PLL_RATE'
604 | .p = _p, \
| ~
605 | .m = _m, \
606 | .s = _s, \
607 | .k = _k, \
| ^~
drivers/clk/rockchip/clk-rk3572.c:112:40: warning: implicit conversion from 'int' to 's16' (aka 'short') changes value from 43690 to -21846 [-Wconstant-conversion]
112 | RK3588_PLL_RATE(773000000, 2, 258, 2, 43690),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
drivers/clk/rockchip/clk.h:607:7: note: expanded from macro 'RK3588_PLL_RATE'
604 | .p = _p, \
| ~
605 | .m = _m, \
606 | .s = _s, \
607 | .k = _k, \
| ^~
drivers/clk/rockchip/clk-rk3572.c:98:41: warning: implicit conversion from 'int' to 's16' (aka 'short') changes value from 52559 to -12977 [-Wconstant-conversion]
98 | RK3588_PLL_RATE(1186812000, 2, 198, 1, 52559),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
drivers/clk/rockchip/clk.h:607:7: note: expanded from macro 'RK3588_PLL_RATE'
604 | .p = _p, \
| ~
605 | .m = _m, \
606 | .s = _s, \
607 | .k = _k, \
| ^~
drivers/clk/rockchip/clk-rk3572.c:97:41: warning: implicit conversion from 'int' to 's16' (aka 'short') changes value from 52581 to -12955 [-Wconstant-conversion]
97 | RK3588_PLL_RATE(1186814000, 2, 198, 1, 52581),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
drivers/clk/rockchip/clk.h:607:7: note: expanded from macro 'RK3588_PLL_RATE'
604 | .p = _p, \
| ~
605 | .m = _m, \
606 | .s = _s, \
607 | .k = _k, \
| ^~5 warnings generated.
vim +121 drivers/clk/rockchip/clk-rk3572.c
43
44 static struct rockchip_pll_rate_table rk3572_pll_rates[] = {
45 /* _mhz, _p, _m, _s, _k */
46 RK3588_PLL_RATE(2520000000, 2, 210, 0, 0),
47 RK3588_PLL_RATE(2496000000, 2, 208, 0, 0),
48 RK3588_PLL_RATE(2472000000, 2, 206, 0, 0),
49 RK3588_PLL_RATE(2448000000, 2, 204, 0, 0),
50 RK3588_PLL_RATE(2424000000, 2, 202, 0, 0),
51 RK3588_PLL_RATE(2400000000, 2, 200, 0, 0),
52 RK3588_PLL_RATE(2376000000, 2, 198, 0, 0),
53 RK3588_PLL_RATE(2352000000, 2, 196, 0, 0),
54 RK3588_PLL_RATE(2328000000, 2, 194, 0, 0),
55 RK3588_PLL_RATE(2304000000, 2, 192, 0, 0),
56 RK3588_PLL_RATE(2280000000, 2, 190, 0, 0),
57 RK3588_PLL_RATE(2256000000, 2, 376, 1, 0),
58 RK3588_PLL_RATE(2232000000, 2, 372, 1, 0),
59 RK3588_PLL_RATE(2208000000, 2, 368, 1, 0),
60 RK3588_PLL_RATE(2184000000, 2, 364, 1, 0),
61 RK3588_PLL_RATE(2160000000, 2, 360, 1, 0),
62 RK3588_PLL_RATE(2136000000, 2, 356, 1, 0),
63 RK3588_PLL_RATE(2112000000, 2, 352, 1, 0),
64 RK3588_PLL_RATE(2088000000, 2, 348, 1, 0),
65 RK3588_PLL_RATE(2064000000, 2, 344, 1, 0),
66 RK3588_PLL_RATE(2040000000, 2, 340, 1, 0),
67 RK3588_PLL_RATE(2016000000, 2, 336, 1, 0),
68 RK3588_PLL_RATE(1992000000, 2, 332, 1, 0),
69 RK3588_PLL_RATE(1968000000, 2, 328, 1, 0),
70 RK3588_PLL_RATE(1944000000, 2, 324, 1, 0),
71 RK3588_PLL_RATE(1920000000, 2, 320, 1, 0),
72 RK3588_PLL_RATE(1896000000, 2, 316, 1, 0),
73 RK3588_PLL_RATE(1872000000, 2, 312, 1, 0),
74 RK3588_PLL_RATE(1848000000, 2, 308, 1, 0),
75 RK3588_PLL_RATE(1824000000, 2, 304, 1, 0),
76 RK3588_PLL_RATE(1800000000, 2, 300, 1, 0),
77 RK3588_PLL_RATE(1776000000, 2, 296, 1, 0),
78 RK3588_PLL_RATE(1752000000, 2, 292, 1, 0),
79 RK3588_PLL_RATE(1728000000, 2, 288, 1, 0),
80 RK3588_PLL_RATE(1704000000, 2, 284, 1, 0),
81 RK3588_PLL_RATE(1680000000, 2, 280, 1, 0),
82 RK3588_PLL_RATE(1656000000, 2, 276, 1, 0),
83 RK3588_PLL_RATE(1632000000, 2, 272, 1, 0),
84 RK3588_PLL_RATE(1608000000, 2, 268, 1, 0),
85 RK3588_PLL_RATE(1584000000, 2, 264, 1, 0),
86 RK3588_PLL_RATE(1560000000, 2, 260, 1, 0),
87 RK3588_PLL_RATE(1536000000, 2, 256, 1, 0),
88 RK3588_PLL_RATE(1512000000, 2, 252, 1, 0),
89 RK3588_PLL_RATE(1488000000, 2, 248, 1, 0),
90 RK3588_PLL_RATE(1464000000, 2, 244, 1, 0),
91 RK3588_PLL_RATE(1440000000, 2, 240, 1, 0),
92 RK3588_PLL_RATE(1416000000, 2, 236, 1, 0),
93 RK3588_PLL_RATE(1392000000, 2, 232, 1, 0),
94 RK3588_PLL_RATE(1320000000, 2, 220, 1, 0),
95 RK3588_PLL_RATE(1200000000, 2, 200, 1, 0),
96 RK3588_PLL_RATE(1188000000, 2, 198, 1, 0),
97 RK3588_PLL_RATE(1186814000, 2, 198, 1, 52581),
98 RK3588_PLL_RATE(1186812000, 2, 198, 1, 52559),
99 RK3588_PLL_RATE(1109000000, 3, 554, 2, 32767),
100 RK3588_PLL_RATE(1100000000, 3, 550, 2, 0),
101 RK3588_PLL_RATE(1051000000, 3, 525, 2, 32767),
102 RK3588_PLL_RATE(1008000000, 2, 336, 2, 0),
103 RK3588_PLL_RATE(1000000000, 3, 500, 2, 0),
104 RK3588_PLL_RATE(983040000, 4, 655, 2, 23592),
105 RK3588_PLL_RATE(955520000, 3, 478, 2, -15730),
106 RK3588_PLL_RATE(903168000, 6, 903, 2, 11009),
107 RK3588_PLL_RATE(900000000, 2, 300, 2, 0),
108 RK3588_PLL_RATE(816000000, 2, 272, 2, 0),
109 RK3588_PLL_RATE(786432000, 2, 262, 2, 9437),
110 RK3588_PLL_RATE(786000000, 1, 131, 2, 0),
111 RK3588_PLL_RATE(785560000, 3, 393, 2, -14419),
112 RK3588_PLL_RATE(773000000, 2, 258, 2, 43690),
113 RK3588_PLL_RATE(722534400, 8, 963, 2, 24850),
114 RK3588_PLL_RATE(697000000, 2, 232, 2, 21845),
115 RK3588_PLL_RATE(610400000, 3, 305, 2, 13107),
116 RK3588_PLL_RATE(604800000, 1, 101, 2, 52428),
117 RK3588_PLL_RATE(600000000, 2, 200, 2, 0),
118 RK3588_PLL_RATE(594000000, 2, 198, 2, 0),
119 RK3588_PLL_RATE(408000000, 2, 272, 3, 0),
120 RK3588_PLL_RATE(312000000, 2, 208, 3, 0),
> 121 RK3588_PLL_RATE(266580000, 1, 178, 4, 47185), 122 RK3588_PLL_RATE(216000000, 2, 288, 4, 0),
123 RK3588_PLL_RATE(96000000, 2, 256, 5, 0),
124 { /* sentinel */ },
125 };
126
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
[email protected]
AI reviewRe: [PATCH 07/27] clk: rockchip: Add RK3572 clock and reset support
In reply to Cunhao LuThank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] clk: rockchip: missing CLK_AUDIO_FRAC_0..2 in rk3572_clk_branches - [Medium] clk: rockchip…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] clk: rockchip: missing CLK_AUDIO_FRAC_0..2 in rk3572_clk_branches
- [Medium] clk: rockchip: internal FACTOR(0) branches overwrite PLL_PPLL in rk3572_clk_init() --
commit 9602441daaa896927eb56cc9b1d0e4d99173c907
Author: Cunhao Lu <[email protected]>
clk: rockchip: Add RK3572 clock and reset support
This commit adds clock and soft-reset controller driver support for the Rockchip rk3572 SoC.
Quoted 5 lines
drivers/clk/rockchip/clk-rk3572.c new file +0
-0
[ ... ]
Quoted 5 lines
drivers/clk/rockchip/clk-rk3572.c new file +5
-0+PNAME (mux_24m_frac_int_mclk4_p) = { +"xin24m" ,"clk_audio_frac_0" ,"clk_audio_frac_1" ,"clk_audio_frac_2" , +"clk_audio_frac_3" ,"clk_audio_int_0" ,"clk_audio_int_1" ,"clk_audio_int_2" , +"sai0_mclk_in" ,"sai1_mclk_in" ,"sai2_mclk_in" ,"sai3_mclk_in" , +};
[ ... ]
Quoted 12 lines
drivers/clk/rockchip/clk-rk3572.c new file +12
-0+PNAME (mux_24m_frac_int_mclki_p) = { +"xin24m" ,"clk_audio_int_0" ,"clk_audio_int_1" ,"clk_audio_int_2" ,"clk_audio_frac_0" , +"clk_audio_frac_1" ,"clk_audio_frac_2" ,"clk_audio_frac_3" ,"sai0_mclk_in" , +"sai1_mclk_in" ,"sai2_mclk_in" ,"sai3_mclk_in" ,"sai4_mclk_in" , +}; + +PNAME (mux_24m_frac_int_mclki_sclki_p) = { +"xin24m" ,"clk_audio_int_0" ,"clk_audio_int_1" ,"clk_audio_int_2" ,"clk_audio_frac_0" , +"clk_audio_frac_1" ,"clk_audio_frac_2" ,"clk_audio_frac_3" ,"sai0_mclk_in" , +"sai1_mclk_in" ,"sai2_mclk_in" ,"sai3_mclk_in" ,"sai4_mclk_in" ,"sai0_sclk_in" , +"sai1_sclk_in" ,"sai2_sclk_in" ,"sai3_sclk_in" ,"sai4_sclk_in" , +};
[ ... ]
Quoted 27 lines
drivers/clk/rockchip/clk-rk3572.c new file +27
-0+static struct rockchip_pll_clock rk3572_pll_clks[]__initdata = { +/* Keep BPLL and LPLL enabled for firmware consumers. */ + [bpll] =PLL (pll_rk3588_core,PLL_BPLL ,"bpll" , mux_pll_p, +CLK_IGNORE_UNUSED ,RK3572_PLL_CON (0 ), +RK3572_MODE_CON1 ,0 ,15 ,0 , rk3572_pll_rates), + [lpll] =PLL (pll_rk3588_core,PLL_LPLL ,"lpll" , mux_pll_p, +CLK_IGNORE_UNUSED ,RK3572_LPLL_CON (16 ), +RK3572_LPLL_MODE_CON0 ,0 ,15 ,0 , rk3572_pll_rates), + [vpll] =PLL (pll_rk3588,PLL_VPLL ,"vpll" , mux_pll_p, +0 ,RK3572_PLL_CON (88 ), +RK3572_MODE_CON0 ,4 ,15 ,0 , rk3572_pll_rates), + [aupll] =PLL (pll_rk3588,PLL_AUPLL ,"aupll" , mux_aupll_p, +0 ,RK3572_PLL_CON (96 ), +RK3572_MODE_CON0 ,6 ,15 ,0 , rk3572_aupll_rates), + [cpll] =PLL (pll_rk3588,PLL_CPLL ,"cpll" , mux_pll_p, +0 ,RK3572_PLL_CON (104 ), +RK3572_MODE_CON0 ,8 ,15 ,0 , rk3572_pll_rates), + [gpll] =PLL (pll_rk3588,PLL_GPLL ,"gpll" , mux_pll_p, +CLK_IGNORE_UNUSED ,RK3572_PLL_CON (112 ), +RK3572_MODE_CON0 ,2 ,15 ,0 , rk3572_pll_rates), + [ppll] =PLL (pll_rk3588_ddr,PLL_PPLL ,"ppll" , mux_pll_p, +0 ,RK3572_PPLL_CON (128 ), +RK3572_PPLL_CON (134 ),15 ,15 ,0 , rk3572_ppll_rates), +}; + +static struct rockchip_clk_branch rk3572_clk_branches[]__initdata = { +/* fixed */
drivers/clk/rockchip/clk-rk3572.c line 593
Quoted 10 lines
drivers/clk/rockchip/clk-rk3572.c new file +10
-0+FACTOR (0 ,"xin12m" ,"xin24m" ,0 ,1 ,2 ), + +COMPOSITE_FRACMUX (CLK_32K ,"clk_32k" ,"xin24m" ,CLK_IS_CRITICAL , +RK3572_PMU_CLKSEL_CON (21 ),0 , +RK3572_PMU_CLKGATE_CON (7 ),14 ,GFLAGS ,NULL ), + +FACTOR (0 ,"clk_spll_div12" ,"spll" ,0 ,1 ,12 ), +FACTOR (0 ,"clk_spll_div6" ,"spll" ,0 ,1 ,6 ), +FACTOR (0 ,"clk_spll_div4" ,"spll" ,0 ,1 ,4 ), + FACTOR(0, "clk_spll_div2", "spll", 0, 1, 2),
[Severity: Medium]
Will registering these fixed-factor branches with an id of 0 overwrite the ppll entry in ctx->clk_data.clks[0]?
In include/dt-bindings/clock/rockchip,rk3572-cru.h, the binding id for ppll is 0:
#define PLL_PPLL 0
During rk3572_clk_init() in drivers/clk/rockchip/clk-rk3572.c, rockchip_clk_register_plls() runs before rockchip_clk_register_branches():
rockchip_clk_register_plls(ctx, rk3572_pll_clks,
ARRAY_SIZE(rk3572_pll_clks),
RK3572_GRF_SOC_STATUS0);
...
rockchip_clk_register_branches(ctx, rk3572_clk_branches,
ARRAY_SIZE(rk3572_clk_branches));When rockchip_clk_register_branches() iterates over rk3572_clk_branches[], it unconditionally calls rockchip_clk_set_lookup(ctx, clk, list->id) in drivers/clk/rockchip/clk.h:
static inline void rockchip_clk_set_lookup(struct rockchip_clk_provider *ctx,
struct clk *clk, unsigned int id)
{
ctx->clk_data.clks[id] = clk;
}Because xin12m (which also has no consumers in this file) and clk_spll_div12, clk_spll_div6, clk_spll_div4, and clk_spll_div2 all pass 0 as their id, rockchip_clk_register_branches() overwrites ctx->clk_data.clks[0] with clk_spll_div2. Any device tree consumer requesting ppll will receive clk_spll_div2 instead.
[ ... ]
drivers/clk/rockchip/clk-rk3572.c line 654
Quoted 11 lines
drivers/clk/rockchip/clk-rk3572.c new file +11
-0+MUX (CLK_AUDIO_FRAC_0_SRC ,"clk_audio_frac_0_src" , gpll_cpll_aupll_24m_p,0 , +RK3572_CLKSEL_CON (13 ),0 ,2 ,MFLAGS ), +MUX (CLK_AUDIO_FRAC_1_SRC ,"clk_audio_frac_1_src" , gpll_cpll_aupll_24m_p,0 , +RK3572_CLKSEL_CON (15 ),0 ,2 ,MFLAGS ), +MUX (CLK_AUDIO_FRAC_2_SRC ,"clk_audio_frac_2_src" , gpll_cpll_aupll_24m_p,0 , +RK3572_CLKSEL_CON (17 ),0 ,2 ,MFLAGS ), +MUX (CLK_AUDIO_FRAC_3_SRC ,"clk_audio_frac_3_src" , gpll_cpll_aupll_24m_p,0 , +RK3572_CLKSEL_CON (19 ),0 ,2 ,MFLAGS ), +COMPOSITE_FRAC (CLK_AUDIO_FRAC_3 ,"clk_audio_frac_3" ,"clk_audio_frac_3_src" ,0 , +RK3572_CLKSEL_CON (18 ),0 , + RK3572_CLKGATE_CON(1), 14, GFLAGS),
[Severity: Medium]
Are the fractional divider definitions for clk_audio_frac_0, clk_audio_frac_1, and clk_audio_frac_2 missing from rk3572_clk_branches[] here?
In include/dt-bindings/clock/rockchip,rk3572-cru.h, all four fractional audio clocks and their parent muxes are defined:
#define CLK_AUDIO_FRAC_0 25
#define CLK_AUDIO_FRAC_1 26
#define CLK_AUDIO_FRAC_2 27
#define CLK_AUDIO_FRAC_3 28
#define CLK_AUDIO_FRAC_0_SRC 29
#define CLK_AUDIO_FRAC_1_SRC 30
#define CLK_AUDIO_FRAC_2_SRC 31
#define CLK_AUDIO_FRAC_3_SRC 32However, rk3572_clk_branches[] in drivers/clk/rockchip/clk-rk3572.c only registers the four source muxes (clk_audio_frac_0_src through clk_audio_frac_3_src) and clk_audio_frac_3, omitting clk_audio_frac_0, clk_audio_frac_1, and clk_audio_frac_2.
Because mux_24m_frac_int_mclk4_p, mux_24m_frac_int_mclki_p, and mux_24m_frac_int_mclki_sclki_p list clk_audio_frac_0, clk_audio_frac_1, and clk_audio_frac_2 as parents, 13 downstream audio clocks (clk_pdm0_src_top, mclk_asrc0_src_0, mclk_asrc1_src_1, mclk_pdm0_src_top, mclk_sai0 through mclk_sai5, and mclk_spdif_tx0 through mclk_spdif_tx2) will fail to resolve those parents when rk3572_clk_init() -> rockchip_clk_register_branches() runs, and device tree lookups for those three clock ids will fail to find a registered clock.
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=7
PATCH 8/27 pinctrl: rockchip: Add RK3572 support
In reply to Cunhao LuSupport RK3572 pinmux, bias, drive-strength, and Schmitt controls. Enable input buffers during mux changes for the RGMII receive clocks.
--- drivers/pinctrl/pinctrl-rockchip.c | 230 ++++++++++++++++++++++++++++++++++++- drivers/pinctrl/pinctrl-rockchip.h | 1 + 2 files changed, 230 insertions(+), 1 deletion(-)
drivers/pinctrl/pinctrl-rockchip.c +229 -1
@@ -1363,6 +1363,10 @@ static int rockchip_get_mux(struct rockchip_pin_bank *bank, int pin)if (bank->recalced_mask &BIT (pin))rockchip_get_recalced_mux (bank, pin, ®, &bit, &mask); +if (ctrl->type ==RK3572 && bank->bank_num ==0 && + pin >=RK_PB4 && pin <=RK_PB7 ) + reg +=0x2000 ; +if (ctrl->type ==RK3576 ) {if ((bank->bank_num ==0 ) && (pin >=RK_PB4 ) && (pin <=RK_PB7 )) reg +=0x1ff4 ;/* GPIO0_IOC_GPIO0B_IOMUX_SEL_H */
@@ -1421,6 +1425,24 @@ static int rockchip_verify_mux(struct rockchip_pin_bank *bank,return 0 ; } +static int rk3572_enable_input (struct rockchip_pin_bank *bank,int pin) +{ +static const u32 offsets[] = {0x300 ,0x10310 ,0x12320 ,0x14330 ,0x14340 }; +struct rockchip_pinctrl *info = bank->drvdata; +u32 reg, bit = pin %8 ; + +if (bank->bank_num >=ARRAY_SIZE (offsets)) +return -EINVAL ; + + reg = offsets[bank->bank_num] + pin /8 *4 ; +if (bank->bank_num ==0 && pin >=RK_PB4 ) + reg +=0x2000 ; +else if (bank->bank_num ==4 && pin >=RK_PC0 ) + reg -=0x10000 ; + +return regmap_write (info->regmap_base, reg,BIT (bit +16 ) |BIT (bit)); +} +/* * Set a new mux function for a pin. *
@@ -1498,6 +1520,10 @@ static int rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux)if (bank->recalced_mask &BIT (pin))rockchip_get_recalced_mux (bank, pin, ®, &bit, &mask); +if (ctrl->type ==RK3572 && bank->bank_num ==0 && + pin >=RK_PB4 && pin <=RK_PB7 ) + reg +=0x2000 ; +if (ctrl->type ==RK3576 ) {if ((bank->bank_num ==0 ) && (pin >=RK_PB4 ) && (pin <=RK_PB7 )) reg +=0x1ff4 ;/* GPIO0_IOC_GPIO0B_IOMUX_SEL_H */
@@ -1568,8 +1594,13 @@ static int rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux) rmask = data | (data >>16 ); data |= (mux & mask) << bit; ret =regmap_update_bits (regmap, reg, rmask, data); +if (ret) +return ret; -return ret; +if (ctrl->type ==RK3572 ) +return rk3572_enable_input (bank, pin); + +return 0 ; }#define PX30_PULL_PMU_OFFSET 0x10
@@ -3097,6 +3128,151 @@ static int rk3568_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank,return 0 ; } +#define RK3572_DRV_BITS_PER_PIN 4 +#define RK3572_DRV_PINS_PER_REG 4 +#define RK3572_DRV_GPIO0_OFFSET 0x100 +#define RK3572_DRV_GPIO1_OFFSET 0x10120 +#define RK3572_DRV_GPIO2_OFFSET 0x12140 +#define RK3572_DRV_GPIO3_OFFSET 0x14160 +#define RK3572_DRV_GPIO4_OFFSET 0x14180 + +static int rk3572_calc_drv_reg_and_bit (struct rockchip_pin_bank *bank, +int pin_num,struct regmap **regmap, +int *reg,u8 *bit) +{ +struct rockchip_pinctrl *info = bank->drvdata; + + *regmap = info->regmap_base; + +switch (bank->bank_num) { +case 0 : + *reg =RK3572_DRV_GPIO0_OFFSET ; +if (pin_num >=12 ) + *reg +=0x2000 ; +break ; +case 1 : + *reg =RK3572_DRV_GPIO1_OFFSET ; +break ; +case 2 : + *reg =RK3572_DRV_GPIO2_OFFSET ; +break ; +case 3 : + *reg =RK3572_DRV_GPIO3_OFFSET ; +break ; +case 4 : + *reg =RK3572_DRV_GPIO4_OFFSET ; +if (pin_num >=16 ) + *reg -=0x10000 ; +break ; +default : +dev_err (info->dev,"unsupported bank_num %d\n" , bank->bank_num); +return -EINVAL ; + } + + *reg += ((pin_num /RK3572_DRV_PINS_PER_REG ) *4 ); + *bit = pin_num %RK3572_DRV_PINS_PER_REG ; + *bit *=RK3572_DRV_BITS_PER_PIN ; + +return 0 ; +} + +#define RK3572_PULL_BITS_PER_PIN 2 +#define RK3572_PULL_PINS_PER_REG 8 +#define RK3572_PULL_GPIO0_OFFSET 0x200 +#define RK3572_PULL_GPIO1_OFFSET 0x10210 +#define RK3572_PULL_GPIO2_OFFSET 0x12220 +#define RK3572_PULL_GPIO3_OFFSET 0x14230 +#define RK3572_PULL_GPIO4_OFFSET 0x14240 + +static int rk3572_calc_pull_reg_and_bit (struct rockchip_pin_bank *bank, +int pin_num,struct regmap **regmap, +int *reg,u8 *bit) +{ +struct rockchip_pinctrl *info = bank->drvdata; + + *regmap = info->regmap_base; + +switch (bank->bank_num) { +case 0 : + *reg =RK3572_PULL_GPIO0_OFFSET ; +if (pin_num >=12 ) + *reg +=0x2000 ; +break ; +case 1 : + *reg =RK3572_PULL_GPIO1_OFFSET ; +break ; +case 2 : + *reg =RK3572_PULL_GPIO2_OFFSET ; +break ; +case 3 : + *reg =RK3572_PULL_GPIO3_OFFSET ; +break ; +case 4 : + *reg =RK3572_PULL_GPIO4_OFFSET ; +if (pin_num >=16 ) + *reg -=0x10000 ; +break ; +default : +dev_err (info->dev,"unsupported bank_num %d\n" , bank->bank_num); +return -EINVAL ; + } + + *reg += ((pin_num /RK3572_PULL_PINS_PER_REG ) *4 ); + *bit = pin_num %RK3572_PULL_PINS_PER_REG ; + *bit *=RK3572_PULL_BITS_PER_PIN ; + +return 0 ; +} + +#define RK3572_SMT_BITS_PER_PIN 1 +#define RK3572_SMT_PINS_PER_REG 8 +#define RK3572_SMT_GPIO0_OFFSET 0x400 +#define RK3572_SMT_GPIO1_OFFSET 0x10410 +#define RK3572_SMT_GPIO2_OFFSET 0x12420 +#define RK3572_SMT_GPIO3_OFFSET 0x14430 +#define RK3572_SMT_GPIO4_OFFSET 0x14440 + +static int rk3572_calc_schmitt_reg_and_bit (struct rockchip_pin_bank *bank, +int pin_num, +struct regmap **regmap, +int *reg,u8 *bit) +{ +struct rockchip_pinctrl *info = bank->drvdata; + + *regmap = info->regmap_base; + +switch (bank->bank_num) { +case 0 : + *reg =RK3572_SMT_GPIO0_OFFSET ; +if (pin_num >=12 ) + *reg +=0x2000 ; +break ; +case 1 : + *reg =RK3572_SMT_GPIO1_OFFSET ; +break ; +case 2 : + *reg =RK3572_SMT_GPIO2_OFFSET ; +break ; +case 3 : + *reg =RK3572_SMT_GPIO3_OFFSET ; +break ; +case 4 : + *reg =RK3572_SMT_GPIO4_OFFSET ; +if (pin_num >=16 ) + *reg -=0x10000 ; +break ; +default : +dev_err (info->dev,"unsupported bank_num %d\n" , bank->bank_num); +return -EINVAL ; + } + + *reg += ((pin_num /RK3572_SMT_PINS_PER_REG ) *4 ); + *bit = pin_num %RK3572_SMT_PINS_PER_REG ; + *bit *=RK3572_SMT_BITS_PER_PIN ; + +return 0 ; +} +#define RK3576_DRV_BITS_PER_PIN 4#define RK3576_DRV_PINS_PER_REG 4#define RK3576_DRV_GPIO0_AL_OFFSET 0x10
@@ -3441,6 +3617,18 @@ static int rockchip_get_drive_perpin(struct rockchip_pin_bank *bank,if (ret)return ret; +if (ctrl->type ==RK3572 ) { + ret =regmap_read (regmap, reg, &data); +if (ret) +return ret; + data >>= bit; +if ((bank->bank_num ==0 && pin_num <12 ) || + (bank->bank_num ==4 && (pin_num ==24 || pin_num ==25 ))) +return ((data &BIT (1 )) >>1 ) | ((data &BIT (0 )) <<1 ); +return ((data &BIT (2 )) >>2 ) | ((data &BIT (0 )) <<2 ) | + (data &BIT (1 )); + } +switch (drv_type) {case DRV_TYPE_IO_1V8_3V0_AUTO :case DRV_TYPE_IO_3V3_ONLY :
@@ -3559,6 +3747,22 @@ static int rockchip_set_drive_perpin(struct rockchip_pin_bank *bank, rmask_bits =RK3568_DRV_BITS_PER_PIN ; ret = (1 << (strength +1 )) -1 ; goto config; + }else if (ctrl->type ==RK3572 ) { +if (strength <0 || strength >7 ) +return -EINVAL ; + rmask_bits =RK3572_DRV_BITS_PER_PIN ; +if ((bank->bank_num ==0 && pin_num <12 ) || + (bank->bank_num ==4 && (pin_num ==24 || pin_num ==25 ))) { +/* Only four drive-strength levels are supported. */ +if (strength >3 ) +return -EINVAL ; + ret = ((strength &BIT (1 )) >>1 ) | ((strength &BIT (0 )) <<1 ); + }else { + ret = ((strength &BIT (2 )) >>2 ) | + ((strength &BIT (0 )) <<2 ) | + (strength &BIT (1 )); + } + goto config; }else if (ctrl->type ==RK3576 ) { rmask_bits =RK3576_DRV_BITS_PER_PIN ; ret = ((strength &BIT (2 )) >>2 ) | ((strength &BIT (0 )) <<2 ) | (strength &BIT (1 ));
@@ -3717,6 +3921,7 @@ static int rockchip_get_pull(struct rockchip_pin_bank *bank, int pin_num)case RK3528 :case RK3562 :case RK3568 : +case RK3572 :case RK3576 :case RK3588 : pull_type = bank->pull_type[pin_num /8 ];
@@ -3786,6 +3991,7 @@ static int rockchip_set_pull(struct rockchip_pin_bank *bank,case RK3528 :case RK3562 :case RK3568 : +case RK3572 :case RK3576 :case RK3588 : pull_type = bank->pull_type[pin_num /8 ];
@@ -4084,6 +4290,7 @@ static bool rockchip_pinconf_pull_valid(struct rockchip_pin_ctrl *ctrl,case RK3528 :case RK3562 :case RK3568 : +case RK3572 :case RK3576 :case RK3588 :return (pull !=PIN_CONFIG_BIAS_PULL_PIN_DEFAULT );
@@ -4296,6 +4503,7 @@ static const struct pinconf_ops rockchip_pinconf_ops = {static const struct of_device_id rockchip_bank_match[] = { { .compatible ="rockchip,gpio-bank" }, + { .compatible ="rockchip,rk3572-gpio-bank" }, { .compatible ="rockchip,rk3188-gpio-bank0" }, {}, };
@@ -5643,6 +5851,24 @@ static struct rockchip_pin_ctrl rk3568_pin_ctrl = { PULL_TYPE_IO_1V8_ONLY, \ PULL_TYPE_IO_1V8_ONLY) +static struct rockchip_pin_bank rk3572_pin_banks[] = { +RK3576_PIN_BANK (0 ,"gpio0" ,0 ,0x8 ,0x2010 ,0x2018 ), +RK3576_PIN_BANK (1 ,"gpio1" ,0x10020 ,0x10028 ,0x10030 ,0x10038 ), +RK3576_PIN_BANK (2 ,"gpio2" ,0x12040 ,0x12048 ,0x12050 ,0x12058 ), +RK3576_PIN_BANK (3 ,"gpio3" ,0x14060 ,0x14068 ,0x14070 ,0x14078 ), +RK3576_PIN_BANK (4 ,"gpio4" ,0x14080 ,0x14088 ,0x4090 ,0x4098 ), +}; + +static struct rockchip_pin_ctrl rk3572_pin_ctrl__maybe_unused = { + .pin_banks = rk3572_pin_banks, + .nr_banks =ARRAY_SIZE (rk3572_pin_banks), + .label ="RK3572-GPIO" , + .type =RK3572 , + .pull_calc_reg = rk3572_calc_pull_reg_and_bit, + .drv_calc_reg = rk3572_calc_drv_reg_and_bit, + .schmitt_calc_reg = rk3572_calc_schmitt_reg_and_bit, +}; +static struct rockchip_pin_bank rk3576_pin_banks[] = {RK3576_PIN_BANK (0 ,"gpio0" ,0 ,0x8 ,0x2004 ,0x200C ),RK3576_PIN_BANK (1 ,"gpio1" ,0x4020 ,0x4028 ,0x4030 ,0x4038 ),
@@ -5727,6 +5953,8 @@ static const struct of_device_id rockchip_pinctrl_dt_match[] = { .data = &rk3562_pin_ctrl }, { .compatible = "rockchip,rk3568-pinctrl", .data = &rk3568_pin_ctrl }, + { .compatible = "rockchip,rk3572-pinctrl", + .data = &rk3572_pin_ctrl }, { .compatible = "rockchip,rk3576-pinctrl", .data = &rk3576_pin_ctrl }, { .compatible = "rockchip,rk3588-pinctrl",
drivers/pinctrl/pinctrl-rockchip.h +1 -0
@@ -203,6 +203,7 @@ enum rockchip_pinctrl_type {RK3528 ,RK3562 ,RK3568 , +RK3572 ,RK3576 , RK3588, };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 08/27] pinctrl: rockchip: Add RK3572 support
Sashiko has reviewed this patch and found no issues.
Quoted 6 lines
From: Cunhao Lu <[email protected]>
Support RK3572 pinmux, bias, drive-strength, and Schmitt controls. Enable input buffers during mux changes for the RGMII receive clocks.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=8
Re: [PATCH 08/27] pinctrl: rockchip: Add RK3572 support
In reply to Cunhao LuAm Mittwoch, 21. Oktober 2026, 18:11:05 Mitteleuropäische Normalzeit schrieb Cunhao Lu via B4 Relay:
Quoted 6 lines
From: Cunhao Lu <[email protected]>
Support RK3572 pinmux, bias, drive-strength, and Schmitt controls. Enable input buffers during mux changes for the RGMII receive clocks.
Signed-off-by Cunhao Lu <[email protected]>
Quoted 345 lines
--- drivers/pinctrl/pinctrl-rockchip.c | 230 ++++++++++++++++++++++++++++++++++++- drivers/pinctrl/pinctrl-rockchip.h | 1 + 2 files changed, 230 insertions(+), 1 deletion(-)drivers/pinctrl/pinctrl-rockchip.c +229
-1@@ -1363,6 +1363,10 @@ static int rockchip_get_mux(struct rockchip_pin_bank *bank, int pin)if (bank->recalced_mask &BIT (pin))rockchip_get_recalced_mux (bank, pin, ®, &bit, &mask); +if (ctrl->type ==RK3572 && bank->bank_num ==0 && + pin >=RK_PB4 && pin <=RK_PB7 ) + reg +=0x2000 ; +if (ctrl->type ==RK3576 ) {if ((bank->bank_num ==0 ) && (pin >=RK_PB4 ) && (pin <=RK_PB7 )) reg +=0x1ff4 ;/* GPIO0_IOC_GPIO0B_IOMUX_SEL_H */ @@ -1421,6 +1425,24 @@ static int rockchip_verify_mux(struct rockchip_pin_bank *bank,return 0 ; } +static int rk3572_enable_input (struct rockchip_pin_bank *bank,int pin) +{ +static const u32 offsets[] = {0x300 ,0x10310 ,0x12320 ,0x14330 ,0x14340 }; +struct rockchip_pinctrl *info = bank->drvdata; +u32 reg, bit = pin %8 ; + +if (bank->bank_num >=ARRAY_SIZE (offsets)) +return -EINVAL ; + + reg = offsets[bank->bank_num] + pin /8 *4 ; +if (bank->bank_num ==0 && pin >=RK_PB4 ) + reg +=0x2000 ; +else if (bank->bank_num ==4 && pin >=RK_PC0 ) + reg -=0x10000 ; + +return regmap_write (info->regmap_base, reg,BIT (bit +16 ) |BIT (bit)); +} +/* * Set a new mux function for a pin. * @@ -1498,6 +1520,10 @@ static int rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux)if (bank->recalced_mask &BIT (pin))rockchip_get_recalced_mux (bank, pin, ®, &bit, &mask); +if (ctrl->type ==RK3572 && bank->bank_num ==0 && + pin >=RK_PB4 && pin <=RK_PB7 ) + reg +=0x2000 ; +if (ctrl->type ==RK3576 ) {if ((bank->bank_num ==0 ) && (pin >=RK_PB4 ) && (pin <=RK_PB7 )) reg +=0x1ff4 ;/* GPIO0_IOC_GPIO0B_IOMUX_SEL_H */ @@ -1568,8 +1594,13 @@ static int rockchip_set_mux(struct rockchip_pin_bank *bank, int pin, int mux) rmask = data | (data >>16 ); data |= (mux & mask) << bit; ret =regmap_update_bits (regmap, reg, rmask, data); +if (ret) +return ret; -return ret; +if (ctrl->type ==RK3572 ) +return rk3572_enable_input (bank, pin); + +return 0 ; }#define PX30_PULL_PMU_OFFSET 0x10@@ -3097,6 +3128,151 @@ static int rk3568_calc_drv_reg_and_bit(struct rockchip_pin_bank *bank,return 0 ; } +#define RK3572_DRV_BITS_PER_PIN 4 +#define RK3572_DRV_PINS_PER_REG 4 +#define RK3572_DRV_GPIO0_OFFSET 0x100 +#define RK3572_DRV_GPIO1_OFFSET 0x10120 +#define RK3572_DRV_GPIO2_OFFSET 0x12140 +#define RK3572_DRV_GPIO3_OFFSET 0x14160 +#define RK3572_DRV_GPIO4_OFFSET 0x14180 + +static int rk3572_calc_drv_reg_and_bit (struct rockchip_pin_bank *bank, +int pin_num,struct regmap **regmap, +int *reg,u8 *bit) +{ +struct rockchip_pinctrl *info = bank->drvdata; + + *regmap = info->regmap_base; + +switch (bank->bank_num) { +case 0 : + *reg =RK3572_DRV_GPIO0_OFFSET ; +if (pin_num >=12 ) + *reg +=0x2000 ; +break ; +case 1 : + *reg =RK3572_DRV_GPIO1_OFFSET ; +break ; +case 2 : + *reg =RK3572_DRV_GPIO2_OFFSET ; +break ; +case 3 : + *reg =RK3572_DRV_GPIO3_OFFSET ; +break ; +case 4 : + *reg =RK3572_DRV_GPIO4_OFFSET ; +if (pin_num >=16 ) + *reg -=0x10000 ; +break ; +default : +dev_err (info->dev,"unsupported bank_num %d\n" , bank->bank_num); +return -EINVAL ; + } + + *reg += ((pin_num /RK3572_DRV_PINS_PER_REG ) *4 ); + *bit = pin_num %RK3572_DRV_PINS_PER_REG ; + *bit *=RK3572_DRV_BITS_PER_PIN ; + +return 0 ; +} + +#define RK3572_PULL_BITS_PER_PIN 2 +#define RK3572_PULL_PINS_PER_REG 8 +#define RK3572_PULL_GPIO0_OFFSET 0x200 +#define RK3572_PULL_GPIO1_OFFSET 0x10210 +#define RK3572_PULL_GPIO2_OFFSET 0x12220 +#define RK3572_PULL_GPIO3_OFFSET 0x14230 +#define RK3572_PULL_GPIO4_OFFSET 0x14240 + +static int rk3572_calc_pull_reg_and_bit (struct rockchip_pin_bank *bank, +int pin_num,struct regmap **regmap, +int *reg,u8 *bit) +{ +struct rockchip_pinctrl *info = bank->drvdata; + + *regmap = info->regmap_base; + +switch (bank->bank_num) { +case 0 : + *reg =RK3572_PULL_GPIO0_OFFSET ; +if (pin_num >=12 ) + *reg +=0x2000 ; +break ; +case 1 : + *reg =RK3572_PULL_GPIO1_OFFSET ; +break ; +case 2 : + *reg =RK3572_PULL_GPIO2_OFFSET ; +break ; +case 3 : + *reg =RK3572_PULL_GPIO3_OFFSET ; +break ; +case 4 : + *reg =RK3572_PULL_GPIO4_OFFSET ; +if (pin_num >=16 ) + *reg -=0x10000 ; +break ; +default : +dev_err (info->dev,"unsupported bank_num %d\n" , bank->bank_num); +return -EINVAL ; + } + + *reg += ((pin_num /RK3572_PULL_PINS_PER_REG ) *4 ); + *bit = pin_num %RK3572_PULL_PINS_PER_REG ; + *bit *=RK3572_PULL_BITS_PER_PIN ; + +return 0 ; +} + +#define RK3572_SMT_BITS_PER_PIN 1 +#define RK3572_SMT_PINS_PER_REG 8 +#define RK3572_SMT_GPIO0_OFFSET 0x400 +#define RK3572_SMT_GPIO1_OFFSET 0x10410 +#define RK3572_SMT_GPIO2_OFFSET 0x12420 +#define RK3572_SMT_GPIO3_OFFSET 0x14430 +#define RK3572_SMT_GPIO4_OFFSET 0x14440 + +static int rk3572_calc_schmitt_reg_and_bit (struct rockchip_pin_bank *bank, +int pin_num, +struct regmap **regmap, +int *reg,u8 *bit) +{ +struct rockchip_pinctrl *info = bank->drvdata; + + *regmap = info->regmap_base; + +switch (bank->bank_num) { +case 0 : + *reg =RK3572_SMT_GPIO0_OFFSET ; +if (pin_num >=12 ) + *reg +=0x2000 ; +break ; +case 1 : + *reg =RK3572_SMT_GPIO1_OFFSET ; +break ; +case 2 : + *reg =RK3572_SMT_GPIO2_OFFSET ; +break ; +case 3 : + *reg =RK3572_SMT_GPIO3_OFFSET ; +break ; +case 4 : + *reg =RK3572_SMT_GPIO4_OFFSET ; +if (pin_num >=16 ) + *reg -=0x10000 ; +break ; +default : +dev_err (info->dev,"unsupported bank_num %d\n" , bank->bank_num); +return -EINVAL ; + } + + *reg += ((pin_num /RK3572_SMT_PINS_PER_REG ) *4 ); + *bit = pin_num %RK3572_SMT_PINS_PER_REG ; + *bit *=RK3572_SMT_BITS_PER_PIN ; + +return 0 ; +} +#define RK3576_DRV_BITS_PER_PIN 4#define RK3576_DRV_PINS_PER_REG 4#define RK3576_DRV_GPIO0_AL_OFFSET 0x10@@ -3441,6 +3617,18 @@ static int rockchip_get_drive_perpin(struct rockchip_pin_bank *bank,if (ret)return ret; +if (ctrl->type ==RK3572 ) { + ret =regmap_read (regmap, reg, &data); +if (ret) +return ret; + data >>= bit; +if ((bank->bank_num ==0 && pin_num <12 ) || + (bank->bank_num ==4 && (pin_num ==24 || pin_num ==25 ))) +return ((data &BIT (1 )) >>1 ) | ((data &BIT (0 )) <<1 ); +return ((data &BIT (2 )) >>2 ) | ((data &BIT (0 )) <<2 ) | + (data &BIT (1 )); + } +switch (drv_type) {case DRV_TYPE_IO_1V8_3V0_AUTO :case DRV_TYPE_IO_3V3_ONLY :@@ -3559,6 +3747,22 @@ static int rockchip_set_drive_perpin(struct rockchip_pin_bank *bank, rmask_bits =RK3568_DRV_BITS_PER_PIN ; ret = (1 << (strength +1 )) -1 ; goto config; + }else if (ctrl->type ==RK3572 ) { +if (strength <0 || strength >7 ) +return -EINVAL ; + rmask_bits =RK3572_DRV_BITS_PER_PIN ; +if ((bank->bank_num ==0 && pin_num <12 ) || + (bank->bank_num ==4 && (pin_num ==24 || pin_num ==25 ))) { +/* Only four drive-strength levels are supported. */ +if (strength >3 ) +return -EINVAL ; + ret = ((strength &BIT (1 )) >>1 ) | ((strength &BIT (0 )) <<1 ); + }else { + ret = ((strength &BIT (2 )) >>2 ) | + ((strength &BIT (0 )) <<2 ) | + (strength &BIT (1 )); + } + goto config; }else if (ctrl->type ==RK3576 ) { rmask_bits =RK3576_DRV_BITS_PER_PIN ; ret = ((strength &BIT (2 )) >>2 ) | ((strength &BIT (0 )) <<2 ) | (strength &BIT (1 ));@@ -3717,6 +3921,7 @@ static int rockchip_get_pull(struct rockchip_pin_bank *bank, int pin_num)case RK3528 :case RK3562 :case RK3568 : +case RK3572 :case RK3576 :case RK3588 : pull_type = bank->pull_type[pin_num /8 ];@@ -3786,6 +3991,7 @@ static int rockchip_set_pull(struct rockchip_pin_bank *bank,case RK3528 :case RK3562 :case RK3568 : +case RK3572 :case RK3576 :case RK3588 : pull_type = bank->pull_type[pin_num /8 ];@@ -4084,6 +4290,7 @@ static bool rockchip_pinconf_pull_valid(struct rockchip_pin_ctrl *ctrl,case RK3528 :case RK3562 :case RK3568 : +case RK3572 :case RK3576 :case RK3588 :return (pull !=PIN_CONFIG_BIAS_PULL_PIN_DEFAULT );@@ -4296,6 +4503,7 @@ static const struct pinconf_ops rockchip_pinconf_ops = {static const struct of_device_id rockchip_bank_match[] = { { .compatible ="rockchip,gpio-bank" }, + { .compatible ="rockchip,rk3572-gpio-bank" }, { .compatible ="rockchip,rk3188-gpio-bank0" }, {}, };@@ -5643,6 +5851,24 @@ static struct rockchip_pin_ctrl rk3568_pin_ctrl = { PULL_TYPE_IO_1V8_ONLY, \ PULL_TYPE_IO_1V8_ONLY) +static struct rockchip_pin_bank rk3572_pin_banks[] = { +RK3576_PIN_BANK (0 ,"gpio0" ,0 ,0x8 ,0x2010 ,0x2018 ), +RK3576_PIN_BANK (1 ,"gpio1" ,0x10020 ,0x10028 ,0x10030 ,0x10038 ), +RK3576_PIN_BANK (2 ,"gpio2" ,0x12040 ,0x12048 ,0x12050 ,0x12058 ), +RK3576_PIN_BANK (3 ,"gpio3" ,0x14060 ,0x14068 ,0x14070 ,0x14078 ), +RK3576_PIN_BANK (4 ,"gpio4" ,0x14080 ,0x14088 ,0x4090 ,0x4098 ), +}; + +static struct rockchip_pin_ctrl rk3572_pin_ctrl__maybe_unused = { + .pin_banks = rk3572_pin_banks, + .nr_banks =ARRAY_SIZE (rk3572_pin_banks), + .label ="RK3572-GPIO" , + .type =RK3572 , + .pull_calc_reg = rk3572_calc_pull_reg_and_bit, + .drv_calc_reg = rk3572_calc_drv_reg_and_bit, + .schmitt_calc_reg = rk3572_calc_schmitt_reg_and_bit, +}; +static struct rockchip_pin_bank rk3576_pin_banks[] = {RK3576_PIN_BANK (0 ,"gpio0" ,0 ,0x8 ,0x2004 ,0x200C ),RK3576_PIN_BANK (1 ,"gpio1" ,0x4020 ,0x4028 ,0x4030 ,0x4038 ),@@ -5727,6 +5953,8 @@ static const struct of_device_id rockchip_pinctrl_dt_match[] = { .data = &rk3562_pin_ctrl }, { .compatible = "rockchip,rk3568-pinctrl", .data = &rk3568_pin_ctrl }, + { .compatible = "rockchip,rk3572-pinctrl", + .data = &rk3572_pin_ctrl }, { .compatible = "rockchip,rk3576-pinctrl", .data = &rk3576_pin_ctrl }, { .compatible = "rockchip,rk3588-pinctrl",drivers/pinctrl/pinctrl-rockchip.h +1
-0@@ -203,6 +203,7 @@ enum rockchip_pinctrl_type {RK3528 ,RK3562 ,RK3568 , +RK3572 ,RK3576 , RK3588, };
Linus Walleij
maintainerRe: [PATCH 08/27] pinctrl: rockchip: Add RK3572 support
In reply to Cunhao LuQuoted 6 lines · On Wed, Oct 21, 2026 at 6:12 PM Cunhao Lu via B4 Relay…
From: Cunhao Lu <[email protected]>
Support RK3572 pinmux, bias, drive-strength, and Schmitt controls. Enable input buffers during mux changes for the RGMII receive clocks.
Signed-off-by Cunhao Lu <[email protected]>
This patch 8/27 applied to the pinctrl tree.
Yours,
Linus Walleij
PATCH 9/27 gpio: rockchip: Add RK3572 GPIO support
In reply to Cunhao LuSupport GPIO V2.7, four parent interrupts, and firmware-provided interrupt-group masks. Keep all pins on the primary interrupt when group queries are unavailable.
--- drivers/gpio/gpio-rockchip.c | 91 +++++++++++++++++++++++++++++++++---- drivers/pinctrl/pinctrl-rockchip.h | 8 +++- include/soc/rockchip/rockchip_sip.h | 5 ++ 3 files changed, 92 insertions(+), 12 deletions(-)
drivers/gpio/gpio-rockchip.c +81 -10
@@ -6,6 +6,7 @@* Copyright (c) 2021 Rockchip Electronics Co. Ltd. */ +#include <linux/arm-smccc.h> #include <linux/bitops.h> #include <linux/clk.h> #include <linux/device.h>
@@ -21,6 +22,7 @@#include <linux/pinctrl/pinconf-generic.h> #include <linux/platform_device.h> #include <linux/regmap.h> +#include <soc/rockchip/rockchip_sip.h> #include "../pinctrl/core.h" #include "../pinctrl/pinctrl-rockchip.h"
@@ -35,6 +37,7 @@#define GPIO_TYPE_V2 (0x01000C2B)#define GPIO_TYPE_V2_1 (0x0101157C)#define GPIO_TYPE_V2_2 (0x010219C8) +#define GPIO_TYPE_V2_7 (0x01074D2E)static const struct rockchip_gpio_regs gpio_regs_v1 = { .port_dr =0x00 ,
@@ -209,12 +212,27 @@ static int rockchip_gpio_set_debounce(struct gpio_chip *gc,if (bank->gpio_type ==GPIO_TYPE_V2 && !IS_ERR (bank->db_clk)) { div_debounce_support = true; freq =clk_get_rate (bank->db_clk); - max_debounce = (GENMASK (23 ,0 ) +1 ) *2 *1000000 / freq; -if (debounce > max_debounce) -return -EINVAL ; - div = debounce * freq; - div_reg =DIV_ROUND_CLOSEST_ULL (div,2 *USEC_PER_SEC ) -1 ; +if (of_device_is_compatible (bank->of_node,"rockchip,rk3572-gpio-bank" )) { +if (!freq) +return -EINVAL ; + + div = (u64)(GENMASK (23 ,0 ) +1 ) *USEC_PER_SEC ; + max_debounce =div_u64 (div,2 * freq); +if (debounce > max_debounce) +return -EINVAL ; + + div = (u64 )debounce * freq *2 ; + div_reg =DIV_ROUND_CLOSEST_ULL (div,USEC_PER_SEC ); + div_reg = div_reg ? div_reg -1 :0 ; + }else { + max_debounce = (GENMASK (23 ,0 ) +1 ) *2 *1000000 / freq; +if (debounce > max_debounce) +return -EINVAL ; + + div = debounce * freq; + div_reg =DIV_ROUND_CLOSEST_ULL (div,2 *USEC_PER_SEC ) -1 ; + } }else { div_debounce_support = false; }
@@ -342,6 +360,12 @@ static void rockchip_irq_demux(struct irq_desc *desc)chained_irq_enter (chip, desc); pending =readl_relaxed (bank->reg_base + bank->gpio_regs->int_status); +for (unsigned int i =0 ; i < bank->nr_irqs; i++) { +if (bank->irqs[i] ==irq_desc_get_irq (desc)) { + pending &= bank->irq_masks[i]; +break ; + } + }for_each_set_bit (irq, &pending,32 ) {dev_dbg (bank->dev,"handling irq %d\n" , irq);
@@ -568,8 +592,9 @@ static int rockchip_interrupts_register(struct rockchip_pin_bank *bank)rockchip_gpio_writel (bank,0xffffffff , bank->gpio_regs->int_en); gc->mask_cache =0xffffffff ; -irq_set_chained_handler_and_data (bank->irq, - rockchip_irq_demux, bank); +for (unsigned int i =0 ; i < bank->nr_irqs; i++) +irq_set_chained_handler_and_data (bank->irqs[i], + rockchip_irq_demux, bank);return 0 ; }
@@ -645,6 +670,36 @@ static void rockchip_clk_put(void *data)clk_put (clk); } +static int rockchip_gpio_read_irq_groups (struct rockchip_pin_bank *bank) +{ +struct arm_smccc_res res; +u32 assigned =0 ; +int status; + +for (unsigned int i =1 ; i < bank->nr_irqs; i++) { +arm_smccc_smc (ROCKCHIP_SIP_GPIO_CONFIG ,ROCKCHIP_SIP_GPIO_GET_GROUP , + bank->bank_num, i,0 ,0 ,0 ,0 , &res); + status = (int )res.a0; +if (i ==1 && (status ==SMCCC_RET_NOT_SUPPORTED || + status ==ROCKCHIP_SIP_RET_NOT_SUPPORTED )) { +/* Older firmware leaves all pins on the primary IRQ. */ +dev_dbg (bank->dev,"GPIO group query unsupported: %d\n" , + status); +break ; + } +if (status) +return dev_err_probe (bank->dev, -EIO , +"cannot read interrupt group %u: %d\n" , + i, status); + bank->irq_masks[i] = res.a1; +if (assigned & bank->irq_masks[i]) +return -EINVAL ; + assigned |= bank->irq_masks[i]; + } + bank->irq_masks[0 ] = ~assigned; +return 0 ; +} +static int rockchip_get_bank_data (struct rockchip_pin_bank *bank) {struct platform_device *pdev =to_platform_device (bank->dev);
@@ -654,10 +709,23 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank)if (IS_ERR (bank->reg_base))return PTR_ERR (bank->reg_base); - ret =platform_get_irq (pdev,0 ); + ret =platform_irq_count (pdev);if (ret <0 )return ret; - bank->irq = ret; +if (ret != (of_device_is_compatible (bank->of_node, +"rockchip,rk3572-gpio-bank" ) ?4 :1 )) +return -EINVAL ; + bank->nr_irqs = ret; +for (unsigned int i =0 ; i < bank->nr_irqs; i++) { + ret =platform_get_irq (pdev, i); +if (ret <0 ) +return ret; + bank->irqs[i] = ret; + } + + ret =rockchip_gpio_read_irq_groups (bank); +if (ret) +return ret; bank->clk =devm_clk_get_enabled (bank->dev,NULL );if (IS_ERR (bank->clk))
@@ -669,6 +737,7 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank)case GPIO_TYPE_V2 :case GPIO_TYPE_V2_1 :case GPIO_TYPE_V2_2 : +case GPIO_TYPE_V2_7 : bank->gpio_regs = &gpio_regs_v2; bank->gpio_type =GPIO_TYPE_V2 ; bank->db_clk =of_clk_get (bank->of_node,1 );
@@ -797,7 +866,8 @@ static void rockchip_gpio_remove(struct platform_device *pdev) {struct rockchip_pin_bank *bank =platform_get_drvdata (pdev); -irq_set_chained_handler_and_data (bank->irq,NULL ,NULL ); +for (unsigned int i =0 ; i < bank->nr_irqs; i++) +irq_set_chained_handler_and_data (bank->irqs[i],NULL ,NULL );if (bank->domain) {irq_domain_remove_generic_chips (bank->domain);irq_domain_remove (bank->domain);
@@ -807,6 +877,7 @@ static void rockchip_gpio_remove(struct platform_device *pdev)static const struct of_device_id rockchip_gpio_match[] = { { .compatible ="rockchip,gpio-bank" , }, + { .compatible ="rockchip,rk3572-gpio-bank" }, { .compatible ="rockchip,rk3188-gpio-bank0" }, { }, };
drivers/pinctrl/pinctrl-rockchip.h +6 -2
@@ -302,7 +302,9 @@ struct rockchip_drv {* bank has its own IOC block * @clk: clock of the gpio bank * @db_clk: clock of the gpio debounce -* @irq: interrupt of the gpio bank +* @irqs: parent interrupts of the GPIO bank +* @irq_masks: pins assigned to each parent interrupt +* @nr_irqs: number of parent interrupts * @saved_masks: Saved content of GPIO_INTEN at suspend time. * @pin_base: first pin number * @nr_pins: number of pins in this bank
@@ -331,7 +333,9 @@ struct rockchip_pin_bank {struct regmap *regmap_ioc;struct clk *clk;struct clk *db_clk; -int irq; +unsigned int irqs[4 ]; +u32 irq_masks[4 ]; +unsigned int nr_irqs;u32 saved_masks;u32 pin_base;u8 nr_pins;
include/soc/rockchip/rockchip_sip.h +5 -0
@@ -20,4 +20,9 @@#define ROCKCHIP_SIP_CONFIG_DRAM_SET_PARAM 0x07#define ROCKCHIP_SIP_CONFIG_DRAM_SET_ODT_PD 0x08 +#define ROCKCHIP_SIP_RET_NOT_SUPPORTED -2 + +#define ROCKCHIP_SIP_GPIO_CONFIG 0x8200002c +#define ROCKCHIP_SIP_GPIO_GET_GROUP 0 +#endif
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 09/27] gpio: rockchip: Add RK3572 GPIO support
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] gpio: rockchip: inverted factor of 2 in rockchip_gpio_set_debounce() --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] gpio: rockchip: inverted factor of 2 in rockchip_gpio_set_debounce() --
commit 779e47c3ede057555631e4f8433e01c234d3e7e3
Author: Cunhao Lu <[email protected]>
gpio: rockchip: Add RK3572 GPIO support
This commit adds support for the rk3572 gpio controller (version 2.7), including handling four parent interrupts per bank and querying firmware for interrupt-group pin masks via smccc.
Quoted 4 lines
drivers/gpio/gpio-rockchip.c +0
-0
[ ... ]
Quoted 20 lines
drivers/gpio/gpio-rockchip.c +10
-5@@ -209,12 +212,27 @@ static int rockchip_gpio_set_debounce(struct gpio_chip *gc,if (bank->gpio_type ==GPIO_TYPE_V2 && !IS_ERR (bank->db_clk)) { div_debounce_support = true; freq =clk_get_rate (bank->db_clk); - max_debounce = (GENMASK (23 ,0 ) +1 ) *2 *1000000 / freq; -if (debounce > max_debounce) -return -EINVAL ; - div = debounce * freq; - div_reg =DIV_ROUND_CLOSEST_ULL (div,2 *USEC_PER_SEC ) -1 ; +if (of_device_is_compatible (bank->of_node,"rockchip,rk3572-gpio-bank" )) { +if (!freq) +return -EINVAL ; + + div = (u64)(GENMASK (23 ,0 ) +1 ) *USEC_PER_SEC ; + max_debounce =div_u64 (div,2 * freq); +if (debounce > max_debounce) +return -EINVAL ; + + div = (u64 )debounce * freq *2 ;
drivers/gpio/gpio-rockchip.c static int rockchip_gpio_set_debounce(struct gpio_chip *gc, · line 235
Quoted 10 lines
drivers/gpio/gpio-rockchip.c +10
-0+ div_reg =DIV_ROUND_CLOSEST_ULL (div,USEC_PER_SEC ); + div_reg = div_reg ? div_reg -1 :0 ; + }else { + max_debounce = (GENMASK (23 ,0 ) +1 ) *2 *1000000 / freq; +if (debounce > max_debounce) +return -EINVAL ; + + div = debounce * freq; + div_reg =DIV_ROUND_CLOSEST_ULL (div,2 *USEC_PER_SEC ) -1 ; + }
[Severity: Medium]
Is the factor of 2 inverted in the new "rockchip,rk3572-gpio-bank" branch of rockchip_gpio_set_debounce()?
In the existing v2 debounce calculation in the else branch, each step of the 24-bit debounce clock divider divides db_clk by 2 * (div_reg + 1), giving a period of 2 * (div_reg + 1) / freq seconds:
max_debounce = (GENMASK(23, 0) + 1) * 2 * 1000000 / freq; ... div = debounce * freq; div_reg = DIV_ROUND_CLOSEST_ULL(div, 2 * USEC_PER_SEC) - 1;
In the new branch for "rockchip,rk3572-gpio-bank", max_debounce divides by 2 * freq instead of multiplying by 2 (making max_debounce 4x smaller), and div_reg multiplies debounce * freq by 2 instead of dividing by
2 * USEC_PER_SEC (making the programmed divider 4x larger, which can also truncate the 24-bit divider for larger debounce values and implies a half-cycle resolution of 1 / (2 * freq) at div_reg == 0). The commit message also does not mention a different hardware debounce divider formula for this variant.
Note that in the existing else branch, the reason div_reg underflows when db_clk is slow (such as 32.768 kHz) is that rockchip_gpio_set_config() passes true (1 us) as the debounce argument:
drivers/gpio/gpio-rockchip.c:rockchip_gpio_set_config() {
switch (param) {
case PIN_CONFIG_INPUT_DEBOUNCE:
rockchip_gpio_set_debounce(gc, offset, true);causing DIV_ROUND_CLOSEST_ULL(div, 2 * USEC_PER_SEC) to evaluate to 0 before subtracting 1 (while (GENMASK(23, 0) + 1) * 2 * 1000000 also overflows a 32-bit unsigned long, and the register update below in rockchip_gpio_set_debounce() uses raw readl() and writel() on reg->dbclk_div_con instead of rockchip_gpio_readl() and rockchip_gpio_writel()).
Should the 64-bit calculation and the div_reg ? div_reg - 1 : 0 clamp keep the non-inverted 2 * (div_reg + 1) divider formula?
Quoted 3 lines
drivers/gpio/gpio-rockchip.c +0
-0}else { div_debounce_support = false; }
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=9
Bartosz Golaszewski
maintainerRe: [PATCH 09/27] gpio: rockchip: Add RK3572 GPIO support
In reply to Cunhao LuQuoted 75 lines · On Wed, 21 Oct 2026 18:11:06 +0200, Cunhao Lu via B4 Relay…
From: Cunhao Lu <[email protected]>
Support GPIO V2.7, four parent interrupts, and firmware-provided interrupt-group masks. Keep all pins on the primary interrupt when group queries are unavailable.
Signed-off-by Cunhao Lu <[email protected]>--- drivers/gpio/gpio-rockchip.c | 91 +++++++++++++++++++++++++++++++++---- drivers/pinctrl/pinctrl-rockchip.h | 8 +++- include/soc/rockchip/rockchip_sip.h | 5 ++ 3 files changed, 92 insertions(+), 12 deletions(-)drivers/gpio/gpio-rockchip.c +23
-5@@ -6,6 +6,7 @@* Copyright (c) 2021 Rockchip Electronics Co. Ltd. */ +#include <linux/arm-smccc.h> #include <linux/bitops.h> #include <linux/clk.h> #include <linux/device.h> @@ -21,6 +22,7 @@#include <linux/pinctrl/pinconf-generic.h> #include <linux/platform_device.h> #include <linux/regmap.h> +#include <soc/rockchip/rockchip_sip.h> #include "../pinctrl/core.h" #include "../pinctrl/pinctrl-rockchip.h" @@ -35,6 +37,7 @@#define GPIO_TYPE_V2 (0x01000C2B)#define GPIO_TYPE_V2_1 (0x0101157C)#define GPIO_TYPE_V2_2 (0x010219C8) +#define GPIO_TYPE_V2_7 (0x01074D2E)static const struct rockchip_gpio_regs gpio_regs_v1 = { .port_dr =0x00 ,@@ -209,12 +212,27 @@ static int rockchip_gpio_set_debounce(struct gpio_chip *gc,if (bank->gpio_type ==GPIO_TYPE_V2 && !IS_ERR (bank->db_clk)) { div_debounce_support = true; freq =clk_get_rate (bank->db_clk); - max_debounce = (GENMASK (23 ,0 ) +1 ) *2 *1000000 / freq; -if (debounce > max_debounce) -return -EINVAL ; - div = debounce * freq; - div_reg =DIV_ROUND_CLOSEST_ULL (div,2 *USEC_PER_SEC ) -1 ; +if (of_device_is_compatible (bank->of_node,"rockchip,rk3572-gpio-bank" )) { +if (!freq) +return -EINVAL ; + + div = (u64)(GENMASK (23 ,0 ) +1 ) *USEC_PER_SEC ; + max_debounce =div_u64 (div,2 * freq); +if (debounce > max_debounce) +return -EINVAL ; + + div = (u64 )debounce * freq *2 ; + div_reg =DIV_ROUND_CLOSEST_ULL (div,USEC_PER_SEC ); + div_reg = div_reg ? div_reg -1 :0 ; + }else { + max_debounce = (GENMASK (23 ,0 ) +1 ) *2 *1000000 / freq; +if (debounce > max_debounce) +return -EINVAL ; + + div = debounce * freq; + div_reg =DIV_ROUND_CLOSEST_ULL (div,2 *USEC_PER_SEC ) -1 ; + } }else { div_debounce_support = false; }
drivers/gpio/gpio-rockchip.c static void rockchip_irq_demux(struct irq_desc *desc) · line 362
Quoted 3 lines
drivers/gpio/gpio-rockchip.c +0
-0@@ -342,6 +360,12 @@ static void rockchip_irq_demux(struct irq_desc *desc)chained_irq_enter (chip, desc); pending =readl_relaxed (bank->reg_base + bank->gpio_regs->int_status);
Please sprinkle in some newlines for readability here...
drivers/gpio/gpio-rockchip.c static void rockchip_irq_demux(struct irq_desc *desc) · line 368
Quoted 6 lines
drivers/gpio/gpio-rockchip.c +6
-0+for (unsigned int i =0 ; i < bank->nr_irqs; i++) { +if (bank->irqs[i] ==irq_desc_get_irq (desc)) { + pending &= bank->irq_masks[i]; +break ; + } + }
... here ...
Quoted 35 lines
drivers/gpio/gpio-rockchip.c +19
-2for_each_set_bit (irq, &pending,32 ) {dev_dbg (bank->dev,"handling irq %d\n" , irq);@@ -568,8 +592,9 @@ static int rockchip_interrupts_register(struct rockchip_pin_bank *bank)rockchip_gpio_writel (bank,0xffffffff , bank->gpio_regs->int_en); gc->mask_cache =0xffffffff ; -irq_set_chained_handler_and_data (bank->irq, - rockchip_irq_demux, bank); +for (unsigned int i =0 ; i < bank->nr_irqs; i++) +irq_set_chained_handler_and_data (bank->irqs[i], + rockchip_irq_demux, bank);return 0 ; }@@ -645,6 +670,36 @@ static void rockchip_clk_put(void *data)clk_put (clk); } +static int rockchip_gpio_read_irq_groups (struct rockchip_pin_bank *bank) +{ +struct arm_smccc_res res; +u32 assigned =0 ; +int status; + +for (unsigned int i =1 ; i < bank->nr_irqs; i++) { +arm_smccc_smc (ROCKCHIP_SIP_GPIO_CONFIG ,ROCKCHIP_SIP_GPIO_GET_GROUP , + bank->bank_num, i,0 ,0 ,0 ,0 , &res); + status = (int )res.a0; +if (i ==1 && (status ==SMCCC_RET_NOT_SUPPORTED || + status ==ROCKCHIP_SIP_RET_NOT_SUPPORTED )) { +/* Older firmware leaves all pins on the primary IRQ. */ +dev_dbg (bank->dev,"GPIO group query unsupported: %d\n" , + status); +break ;
drivers/gpio/gpio-rockchip.c static void rockchip_clk_put(void *data) · line 698
Quoted 10 lines
drivers/gpio/gpio-rockchip.c +10
-0+ } +if (status) +return dev_err_probe (bank->dev, -EIO , +"cannot read interrupt group %u: %d\n" , + i, status); + bank->irq_masks[i] = res.a1; +if (assigned & bank->irq_masks[i]) +return -EINVAL ; + assigned |= bank->irq_masks[i]; + }
... here, etc.
include/soc/rockchip/rockchip_sip.h
Quoted 86 lines
drivers/gpio/gpio-rockchip.c +23
-3+ bank->irq_masks[0 ] = ~assigned; +return 0 ; +} +static int rockchip_get_bank_data (struct rockchip_pin_bank *bank) {struct platform_device *pdev =to_platform_device (bank->dev);@@ -654,10 +709,23 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank)if (IS_ERR (bank->reg_base))return PTR_ERR (bank->reg_base); - ret =platform_get_irq (pdev,0 ); + ret =platform_irq_count (pdev);if (ret <0 )return ret; - bank->irq = ret; +if (ret != (of_device_is_compatible (bank->of_node, +"rockchip,rk3572-gpio-bank" ) ?4 :1 )) +return -EINVAL ; + bank->nr_irqs = ret; +for (unsigned int i =0 ; i < bank->nr_irqs; i++) { + ret =platform_get_irq (pdev, i); +if (ret <0 ) +return ret; + bank->irqs[i] = ret; + } + + ret =rockchip_gpio_read_irq_groups (bank); +if (ret) +return ret; bank->clk =devm_clk_get_enabled (bank->dev,NULL );if (IS_ERR (bank->clk))@@ -669,6 +737,7 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank)case GPIO_TYPE_V2 :case GPIO_TYPE_V2_1 :case GPIO_TYPE_V2_2 : +case GPIO_TYPE_V2_7 : bank->gpio_regs = &gpio_regs_v2; bank->gpio_type =GPIO_TYPE_V2 ; bank->db_clk =of_clk_get (bank->of_node,1 );@@ -797,7 +866,8 @@ static void rockchip_gpio_remove(struct platform_device *pdev) {struct rockchip_pin_bank *bank =platform_get_drvdata (pdev); -irq_set_chained_handler_and_data (bank->irq,NULL ,NULL ); +for (unsigned int i =0 ; i < bank->nr_irqs; i++) +irq_set_chained_handler_and_data (bank->irqs[i],NULL ,NULL );if (bank->domain) {irq_domain_remove_generic_chips (bank->domain);irq_domain_remove (bank->domain);@@ -807,6 +877,7 @@ static void rockchip_gpio_remove(struct platform_device *pdev)static const struct of_device_id rockchip_gpio_match[] = { { .compatible ="rockchip,gpio-bank" , }, + { .compatible ="rockchip,rk3572-gpio-bank" }, { .compatible ="rockchip,rk3188-gpio-bank0" }, { }, };drivers/pinctrl/pinctrl-rockchip.h +6
-2@@ -302,7 +302,9 @@ struct rockchip_drv {* bank has its own IOC block * @clk: clock of the gpio bank * @db_clk: clock of the gpio debounce -* @irq: interrupt of the gpio bank +* @irqs: parent interrupts of the GPIO bank +* @irq_masks: pins assigned to each parent interrupt +* @nr_irqs: number of parent interrupts * @saved_masks: Saved content of GPIO_INTEN at suspend time. * @pin_base: first pin number * @nr_pins: number of pins in this bank @@ -331,7 +333,9 @@ struct rockchip_pin_bank {struct regmap *regmap_ioc;struct clk *clk;struct clk *db_clk; -int irq; +unsigned int irqs[4 ]; +u32 irq_masks[4 ]; +unsigned int nr_irqs;u32 saved_masks;u32 pin_base;u8 nr_pins;include/soc/rockchip/rockchip_sip.h +0
-0
The changes in headers in other subsystems should be in separate patches.
Quoted 15 lines
index
501ad1fedb201..984272ede3baf100644include/soc/rockchip/rockchip_sip.h +5
-1@@ -20,4 +20,9 @@#define ROCKCHIP_SIP_CONFIG_DRAM_SET_PARAM 0x07#define ROCKCHIP_SIP_CONFIG_DRAM_SET_ODT_PD 0x08 +#define ROCKCHIP_SIP_RET_NOT_SUPPORTED -2 + +#define ROCKCHIP_SIP_GPIO_CONFIG 0x8200002c +#define ROCKCHIP_SIP_GPIO_GET_GROUP 0 +#endif --
Quoted 4 lines
2.34.1
Bart
Re: [PATCH 09/27] gpio: rockchip: Add RK3572 GPIO support
Hi,
Quoted 11 lines
Quoted 1 line
pending = readl_relaxed(bank->reg_base + bank->gpio_regs->int_status);Please sprinkle in some newlines for readability here...
Quoted 6 lines
+ for (unsigned int i = 0; i <
bank->nr_irqs; i++) {
+ if (bank->irqs[i] ==irq_desc_get_irq(desc)) {
+ pending &= bank->irq_masks[i];
+ break;
+ }
+ }
Quoted 10 lines
... here ...
Quoted 4 lines
for_each_set_bit(irq, &pending, 32){
...
+ assigned |= bank->irq_masks[i];
+ }... here, etc.
Quoted 1 line
+ bank->irq_masks[0] = ~assigned;
I will add blank lines at these places to improve readability in the next version.
Quoted 3 lines
include/soc/rockchip/rockchip_sip.h
Quoted 1 line
include/soc/rockchip/rockchip_sip.h +0
-0The changes in headers in other subsystems should be in separate patches.
I am already working on splitting the patches by subsystem, and I will put these header changes into separate patches. I will resubmit the GPIO part later with these changes addressed.
Thank you for taking the time to review my patch!
Best regards,
Cunhao Lu
PATCH 10/27 pmdomain: rockchip: Add RK3572 boot peripheral domains
In reply to Cunhao LuAdd the NVM0, NVM1, PHP, and VOP power domains. Wait for the GRF firewall before restoring consumers and retry power-on failures without cycling the domain again.
--- drivers/pmdomain/rockchip/pm-domains.c | 141 ++++++++++++++++++++++++++++++--- 1 file changed, 131 insertions(+), 10 deletions(-)
drivers/pmdomain/rockchip/pm-domains.c +131 -10
@@ -39,6 +39,7 @@#include <dt-bindings/power/rockchip,rk3528-power.h> #include <dt-bindings/power/rockchip,rk3562-power.h> #include <dt-bindings/power/rk3568-power.h> +#include <dt-bindings/power/rockchip,rk3572-power-controller.h> #include <dt-bindings/power/rockchip,rk3576-power.h> #include <dt-bindings/power/rk3588-power.h>
@@ -59,6 +60,9 @@ struct rockchip_domain_info {u32 pwr_offset;u32 mem_offset;u32 req_offset; +u32 status_offset; +u32 firewall_mask; +u32 clk_ungate_offset; };struct rockchip_pmu_info {
@@ -72,6 +76,8 @@ struct rockchip_pmu_info {u32 mem_status_offset;u32 repair_status_offset;u32 clk_ungate_offset; +u32 firewall_status_offset; +bool chain_status_inverted;u32 core_pwrcnt_offset;u32 gpu_pwrcnt_offset;
@@ -101,11 +107,13 @@ struct rockchip_pm_domain {struct clk_bulk_data *clks;struct device_node *node;struct regulator *supply; +bool power_on_pending; };struct rockchip_pmu {struct device *dev;struct regmap *regmap; +struct regmap *grf;const struct rockchip_pmu_info *info;struct mutex mutex;/* mutex lock for pmu */ struct genpd_onecell_data genpd_data;
@@ -373,15 +381,16 @@ static bool rockchip_pmu_domain_is_idle(struct rockchip_pm_domain *pd)const struct rockchip_domain_info *pd_info = pd->info;unsigned int val; -regmap_read (pmu->regmap, pmu->info->idle_offset, &val); +regmap_read (pmu->regmap, pmu->info->idle_offset + pd_info->status_offset, &val);return (val & pd_info->idle_mask) == pd_info->idle_mask; } -static unsigned int rockchip_pmu_read_ack (struct rockchip_pmu *pmu) +static unsigned int rockchip_pmu_read_ack (struct rockchip_pm_domain *pd) { +struct rockchip_pmu *pmu = pd->pmu;unsigned int val; -regmap_read (pmu->regmap, pmu->info->ack_offset, &val); +regmap_read (pmu->regmap, pmu->info->ack_offset + pd->info->status_offset, &val);return val; }
@@ -400,7 +409,8 @@ static int rockchip_pmu_ungate_clk(struct rockchip_pm_domain *pd, bool ungate) val = ungate ? (pd_info->clk_ungate_mask | clk_ungate_w_mask) : clk_ungate_w_mask; -regmap_write (pmu->regmap, pmu->info->clk_ungate_offset, val); +regmap_write (pmu->regmap, pmu->info->clk_ungate_offset + + pd_info->clk_ungate_offset, val);return 0 ; }
@@ -431,7 +441,7 @@ static int rockchip_pmu_set_idle_request(struct rockchip_pm_domain *pd,/* Wait util idle_ack = 1 */ target_ack = idle ? pd_info->ack_mask :0 ; - ret =readx_poll_timeout_atomic (rockchip_pmu_read_ack, pmu, val, + ret =readx_poll_timeout_atomic (rockchip_pmu_read_ack, pd, val, (val & pd_info->ack_mask) == target_ack,0 ,10000 );if (ret) {
@@ -543,6 +553,9 @@ static bool rockchip_pmu_domain_is_chain_on(struct rockchip_pm_domain *pd)regmap_read (pmu->regmap, pmu->info->chain_status_offset + pd->info->mem_offset, &val); +if (pmu->info->chain_status_inverted) +return !(val & pd->info->mem_status_mask); +/* 1'b1: power on, 1'b0: power off */ return val & pd->info->mem_status_mask; }
@@ -644,14 +657,29 @@ static int rockchip_do_pmu_set_power_domain(struct rockchip_pm_domain *pd,return 0 ; } +static int rockchip_pmu_wait_firewall (struct rockchip_pm_domain *pd) +{ +struct rockchip_pmu *pmu = pd->pmu; +u32 mask = pd->info->firewall_mask; +u32 val; + +if (!mask) +return 0 ; + +return regmap_read_poll_timeout (pmu->grf, pmu->info->firewall_status_offset, + val, (val & mask) == mask,0 ,10000 ); +} +static int rockchip_pd_power (struct rockchip_pm_domain *pd,bool power_on) {struct rockchip_pmu *pmu = pd->pmu; +bool is_on;int ret;guard (mutex)(&pmu->mutex); -if (rockchip_pmu_domain_is_on (pd) == power_on) + is_on =rockchip_pmu_domain_is_on (pd); +if (is_on == power_on && !pd->power_on_pending)return 0 ; ret =clk_bulk_enable (pd->num_clks, pd->clks);
@@ -663,7 +691,8 @@ static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool power_on)rockchip_pmu_ungate_clk (pd, true);if (!power_on) { -rockchip_pmu_save_qos (pd); +if (!pd->power_on_pending) +rockchip_pmu_save_qos (pd);/* if powering down, idle request to NIU first */ ret =rockchip_pmu_set_idle_request (pd, true);
@@ -671,18 +700,29 @@ static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool power_on) goto out; } - ret =rockchip_do_pmu_set_power_domain (pd, power_on); -if (ret <0 ) - goto out; +/* A failed firewall wait must not restart powered memory on retry. */ +if (is_on != power_on) { + ret =rockchip_do_pmu_set_power_domain (pd, power_on); +if (ret <0 ) + goto out; + }if (power_on) { +if (pd->info->firewall_mask) + pd->power_on_pending = true; +/* if powering up, leave idle mode */ ret =rockchip_pmu_set_idle_request (pd, false);if (ret <0 ) goto out; + ret =rockchip_pmu_wait_firewall (pd); +if (ret) + goto out; +rockchip_pmu_restore_qos (pd); } + pd->power_on_pending = false; out:rockchip_pmu_ungate_clk (pd, false);
@@ -1064,6 +1104,11 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)mutex_init (&pmu->mutex); pmu->info = pmu_info; +if (pmu_info->firewall_status_offset) { + pmu->grf =syscon_regmap_lookup_by_phandle (np,"rockchip,grf" ); +if (IS_ERR (pmu->grf)) +return dev_err_probe (dev,PTR_ERR (pmu->grf),"failed to get system GRF\n" ); + } pmu->genpd_data.domains = pmu->domains; pmu->genpd_data.num_domains = pmu_info->num_domains;
@@ -1313,6 +1358,62 @@ static const struct rockchip_domain_info rk3568_pm_domains[] = { [RK3568_PD_PIPE] = DOMAIN_RK3568("pipe", BIT(8), BIT(11), false, false), }; +static const struct rockchip_domain_info rk3572_pm_domains[] = { + [RK3572_PD_NVM1 ] = { + .name ="nvm1" , + .pwr_mask =BIT (4 ), + .pwr_w_mask =BIT (20 ), + .mem_status_mask =BIT (4 ), + .repair_status_mask =BIT (3 ), + .req_mask =BIT (6 ), + .req_w_mask =BIT (22 ), + .idle_mask =BIT (6 ), + .ack_mask =BIT (6 ), + .clk_ungate_mask =BIT (6 ), + }, + [RK3572_PD_PHP ] = { + .name ="php" , + .pwr_mask =BIT (7 ), + .pwr_w_mask =BIT (23 ), + .mem_status_mask =BIT (7 ), + .repair_status_mask =BIT (5 ), + .req_mask =BIT (9 ), + .req_w_mask =BIT (25 ), + .idle_mask =BIT (9 ), + .ack_mask =BIT (9 ), + .clk_ungate_mask =BIT (9 ), + .firewall_mask =BIT (28 ), + }, + [RK3572_PD_VOP ] = { + .name ="vop" , + .pwr_mask =BIT (12 ), + .pwr_w_mask =BIT (28 ), + .mem_status_mask =BIT (12 ), + .repair_status_mask =BIT (10 ), + .req_mask =BIT (14 ), + .req_w_mask =BIT (30 ), + .idle_mask =BIT (14 ), + .ack_mask =BIT (14 ), + .clk_ungate_mask =BIT (14 ), + .firewall_mask =BIT (23 ), + }, + [RK3572_PD_NVM0 ] = { + .name ="nvm0" , + .pwr_mask =BIT (15 ), + .pwr_w_mask =BIT (31 ), + .mem_status_mask =BIT (15 ), + .repair_status_mask =BIT (13 ), + .req_mask =BIT (0 ), + .req_w_mask =BIT (16 ), + .idle_mask =BIT (0 ), + .ack_mask =BIT (0 ), + .clk_ungate_mask =BIT (0 ), + .req_offset =4 , + .status_offset =4 , + .clk_ungate_offset =4 , + }, +}; +static const struct rockchip_domain_info rk3576_pm_domains[] = { [RK3576_PD_NPU ] =DOMAIN_RK3576 ("npu" ,0x0 ,BIT (0 ),BIT (0 ),0 ,0x0 ,0 ,0 ,0 , false), [RK3576_PD_NVM ] =DOMAIN_RK3576 ("nvm" ,0x0 ,BIT (6 ),0 ,BIT (6 ),0x4 ,BIT (2 ),BIT (18 ),BIT (2 ), false),
@@ -1536,6 +1637,23 @@ static const struct rockchip_pmu_info rk3568_pmu = { .domain_info = rk3568_pm_domains, }; +static const struct rockchip_pmu_info rk3572_pmu = { + .pwr_offset =0x210 , + .status_offset =0x230 , + .chain_status_offset =0x250 , + .chain_status_inverted = true, + .mem_status_offset =0x260 , + .mem_pwr_offset =0x300 , + .req_offset =0x110 , + .idle_offset =0x130 , + .ack_offset =0x120 , + .repair_status_offset =0x570 , + .clk_ungate_offset =0x150 , + .firewall_status_offset =0x140 , + .num_domains =ARRAY_SIZE (rk3572_pm_domains), + .domain_info = rk3572_pm_domains, +}; +static const struct rockchip_pmu_info rk3576_pmu = { .pwr_offset =0x210 , .status_offset =0x230 ,
@@ -1648,6 +1766,9 @@ static const struct of_device_id rockchip_pm_domain_dt_match[] = { .data = (void *)&rk3568_pmu, }, { + .compatible = "rockchip,rk3572-power-controller", + .data = &rk3572_pmu, + }, { .compatible = "rockchip,rk3576-power-controller", .data = (void *)&rk3576_pmu, },
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 10/27] pmdomain: rockchip: Add RK3572 boot peripheral domains
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] pmdomain: rockchip: incomplete power-on retry tracking in rockchip_pd_power() --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] pmdomain: rockchip: incomplete power-on retry tracking in rockchip_pd_power() --
commit c324244eacf06dcfc61ec2e5830623efbacb5d15
Author: Cunhao Lu <[email protected]>
pmdomain: rockchip: Add RK3572 boot peripheral domains
This commit adds the rk3572 boot peripheral power domains (nvm0, nvm1, php, and vop), waits for the grf firewall before restoring consumers, and tracks pending power-on transitions to retry failures without power-cycling the domain.
Quoted 4 lines
drivers/pmdomain/rockchip/pm-domains.c +0
-0
[ ... ]
Quoted 53 lines
drivers/pmdomain/rockchip/pm-domains.c +23
-5@@ -644,14 +657,29 @@ static int rockchip_do_pmu_set_power_domain(struct rockchip_pm_domain *pd,return 0 ; } +static int rockchip_pmu_wait_firewall (struct rockchip_pm_domain *pd) +{ +struct rockchip_pmu *pmu = pd->pmu; +u32 mask = pd->info->firewall_mask; +u32 val; + +if (!mask) +return 0 ; + +return regmap_read_poll_timeout (pmu->grf, pmu->info->firewall_status_offset, + val, (val & mask) == mask,0 ,10000 ); +} +static int rockchip_pd_power (struct rockchip_pm_domain *pd,bool power_on) {struct rockchip_pmu *pmu = pd->pmu; +bool is_on;int ret;guard (mutex)(&pmu->mutex); -if (rockchip_pmu_domain_is_on (pd) == power_on) + is_on =rockchip_pmu_domain_is_on (pd); +if (is_on == power_on && !pd->power_on_pending)return 0 ; ret =clk_bulk_enable (pd->num_clks, pd->clks);@@ -663,7 +691,8 @@ static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool power_on)rockchip_pmu_ungate_clk (pd, true);if (!power_on) { -rockchip_pmu_save_qos (pd); +if (!pd->power_on_pending) +rockchip_pmu_save_qos (pd);/* if powering down, idle request to NIU first */ ret =rockchip_pmu_set_idle_request (pd, true);@@ -671,18 +700,29 @@ static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool power_on) goto out; } - ret =rockchip_do_pmu_set_power_domain (pd, power_on); -if (ret <0 ) - goto out; +/* A failed firewall wait must not restart powered memory on retry. */ +if (is_on != power_on) { + ret =rockchip_do_pmu_set_power_domain (pd, power_on); +if (ret <0 ) + goto out;
drivers/pmdomain/rockchip/pm-domains.c static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool power_on) · line 717
Quoted 10 lines
drivers/pmdomain/rockchip/pm-domains.c +4
-0+ }if (power_on) { +if (pd->info->firewall_mask) + pd->power_on_pending = true; +/* if powering up, leave idle mode */ ret =rockchip_pmu_set_idle_request (pd, false);if (ret <0 ) goto out;
[Severity: High]
In drivers/pmdomain/rockchip/pm-domains.c, does setting pd->power_on_pending only when pd->info->firewall_mask is non-zero and only after rockchip_do_pmu_set_power_domain() succeeds leave partial power-on states untracked in rockchip_pd_power()?
When genpd_power_on() -> rockchip_pd_power_on() -> rockchip_pd_power(pd, true) is called for a domain that is initially off (is_on == false), rockchip_do_pmu_set_power_domain(pd, true) enables the hardware power switch in pmu->info->pwr_offset + pd_pwr_offset, making rockchip_pmu_domain_is_on(pd) return true.
If rockchip_pmu_set_idle_request(pd, false) subsequently fails on a domain where pd->info->firewall_mask is 0 (such as the "nvm0" and "nvm1" domains on rk3572, or domains on other SoCs), or if rockchip_do_pmu_set_power_domain() fails in rockchip_pmu_domain_mem_reset() after enabling the power switch, pd->power_on_pending remains false when jumping to out.
If a later power-on retry calls rockchip_pd_power(pd, true), rockchip_pmu_domain_is_on(pd) will return true while pd->power_on_pending is false:
is_on = rockchip_pmu_domain_is_on(pd); if (is_on == power_on && !pd->power_on_pending) return 0;
Wouldn't rockchip_pd_power(pd, true) then return 0 immediately without deasserting the bus idle request, resetting memory, waiting for the firewall, or restoring QoS registers via rockchip_pmu_restore_qos()? Furthermore, if rockchip_pd_power(pd, false) is called in that state, wouldn't the !pd->power_on_pending check allow rockchip_pmu_save_qos(pd) to overwrite pd->qos_save_regs with unrestored values while the domain is still idle?
Should pd->power_on_pending be set unconditionally before rockchip_do_pmu_set_power_domain(pd, true) when powering on a domain?
Quoted 11 lines
drivers/pmdomain/rockchip/pm-domains.c +5
-0+ ret =rockchip_pmu_wait_firewall (pd); +if (ret) + goto out; +rockchip_pmu_restore_qos (pd); } + pd->power_on_pending = false; out:rockchip_pmu_ungate_clk (pd, false);
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=10
PATCH 11/27 dt-bindings: i2c: rk3x: Add RK3572
In reply to Cunhao LuAdd the RK3572 I2C compatible using the RK3399 fallback.
--- Documentation/devicetree/bindings/i2c/i2c-rk3x.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/i2c/i2c-rk3x.yaml +1 -0
@@ -41,6 +41,7 @@ properties: - rockchip,rk3528-i2c - rockchip,rk3562-i2c - rockchip,rk3568-i2c + - rockchip,rk3572-i2c - rockchip,rk3576-i2c - rockchip,rk3588-i2c - rockchip,rv1126-i2c
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 11/27] dt-bindings: i2c: rk3x: Add RK3572
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
From: Cunhao Lu <[email protected]>
Add the RK3572 I2C compatible using the RK3399 fallback.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=11
Re: [PATCH 11/27] dt-bindings: i2c: rk3x: Add RK3572
In reply to Cunhao LuHi Cunhao,
Quoted 5 lines · On Thu, Oct 22, 2026 at 12:11:08AM +0800, Cunhao Lu via B4 Relay wrote:
From: Cunhao Lu <[email protected]>
Add the RK3572 I2C compatible using the RK3399 fallback.
Signed-off-by Cunhao Lu <[email protected]>
Thanks,
Andi
Re: [PATCH 11/27] dt-bindings: i2c: rk3x: Add RK3572
In reply to Cunhao LuQuoted 7 lines · Cunhao Lu
Add the RK3572 I2C compatible using the RK3399 fallback.
Signed-off-by Cunhao Lu <[email protected]>--- Documentation/devicetree/bindings/i2c/i2c-rk3x.yaml | 1 + 1 file changed, 1 insertion(+)
PATCH 12/27 dt-bindings: serial: snps-dw-apb-uart: Add RK3572
In reply to Cunhao LuAdd the RK3572 UART compatible using the Synopsys fallback.
--- Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml +1 -0
@@ -70,6 +70,7 @@ properties: - rockchip,rk3528-uart - rockchip,rk3562-uart - rockchip,rk3568-uart + - rockchip,rk3572-uart - rockchip,rk3576-uart - rockchip,rk3588-uart - rockchip,rv1103b-uart
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 12/27] dt-bindings: serial: snps-dw-apb-uart: Add RK3572
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
From: Cunhao Lu <[email protected]>
Add the RK3572 UART compatible using the Synopsys fallback.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=12
Re: [PATCH 12/27] dt-bindings: serial: snps-dw-apb-uart: Add RK3572
In reply to Cunhao LuQuoted 7 lines · Cunhao Lu
Add the RK3572 UART compatible using the Synopsys fallback.
Signed-off-by Cunhao Lu <[email protected]>--- Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 1 + 1 file changed, 1 insertion(+)
PATCH 13/27 dt-bindings: mmc: rockchip: Add RK3572 controllers
In reply to Cunhao LuAdd the RK3572 SD and eMMC compatibles using the RK3576 fallbacks.
--- Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml | 1 + Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 3 +++ 2 files changed, 4 insertions(+)
Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml +1 -0
@@ -50,6 +50,7 @@ properties: # for Rockchip RK3576 with phase tuning inside the controller - items: - enum: + - rockchip,rk3572-dw-mshc - rockchip,rv1103b-dw-mshc - const: rockchip,rk3576-dw-mshc - const: rockchip,rk3576-dw-mshc
Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +3 -0
@@ -13,6 +13,9 @@ maintainers: properties: compatible: oneOf: + - items: + - const: rockchip,rk3572-dwcmshc + - const: rockchip,rk3576-dwcmshc - items: - enum: - rockchip,rk3528-dwcmshc
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 13/27] dt-bindings: mmc: rockchip: Add RK3572 controllers
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
From: Cunhao Lu <[email protected]>
Add the RK3572 SD and eMMC compatibles using the RK3576 fallbacks.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=13
Re: [PATCH 13/27] dt-bindings: mmc: rockchip: Add RK3572 controllers
In reply to Cunhao LuQuoted 8 lines · Cunhao Lu
Add the RK3572 SD and eMMC compatibles using the RK3576 fallbacks.
Signed-off-by Cunhao Lu <[email protected]>--- Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml | 1 + Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 3 +++ 2 files changed, 4 insertions(+)
PATCH 14/27 dt-bindings: net: rockchip-dwmac: Add RK3572
In reply to Cunhao LuAdd the RK3572 GMAC compatible using the snps,dwmac-4.20a fallback.
--- Documentation/devicetree/bindings/net/rockchip-dwmac.yaml | 3 +++ 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/net/rockchip-dwmac.yaml +3 -0
@@ -27,6 +27,7 @@ select: - rockchip,rk3506-gmac - rockchip,rk3528-gmac - rockchip,rk3568-gmac + - rockchip,rk3572-gmac - rockchip,rk3576-gmac - rockchip,rk3588-gmac - rockchip,rv1108-gmac
@@ -54,6 +55,7 @@ properties: - rockchip,rk3506-gmac - rockchip,rk3528-gmac - rockchip,rk3568-gmac + - rockchip,rk3572-gmac - rockchip,rk3576-gmac - rockchip,rk3588-gmac - rockchip,rv1126-gmac
@@ -137,6 +139,7 @@ allOf: compatible: contains: enum: + - rockchip,rk3572-gmac - rockchip,rk3576-gmac - rockchip,rk3588-gmac then:
Signature · 1 line
2.34.1
Re: [PATCH 14/27] dt-bindings: net: rockchip-dwmac: Add RK3572
Quoted 3 lines · On Thu, Oct 22, 2026 at 12:11:11AM +0800, Cunhao Lu via B4 Relay wrote:
From: Cunhao Lu <[email protected]>
Add the RK3572 GMAC compatible using the snps,dwmac-4.20a fallback.
Since this is a new device, please don't allow tx_delay and rx_delay, which should be considered deprecated, replaced by rx-internal-delay-ps and tx-internal-delay-ps.
We have to keep tx_delay and rx_delay for older devices because of backwards compatibility, but there is no reason new devices should use them.
Andrew
Re: [PATCH 14/27] dt-bindings: net: rockchip-dwmac: Add RK3572
Hi Andrew,
Quoted 3 lines
Since this is a new device, please don't allow
tx_delayandrx_delay, which should be considered deprecated, replaced by rx-internal-delay-ps and tx-internal-delay-ps.
Thanks for the feedback. I ran a matrix test and found that rgmii-id had lower packet loss. For v2, I'll use rgmii-id without the delay properties.
Best regards,
Cunhao
[email protected]
AI reviewRe: [PATCH 14/27] dt-bindings: net: rockchip-dwmac: Add RK3572
In reply to Cunhao LuThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] dt-bindings: net: rockchip,rk3572-gmac missing from snps,dwmac.yaml --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: net: rockchip,rk3572-gmac missing from snps,dwmac.yaml --
commit d49e116eebf8a880b2905b76936e70d57c74d68e
Author: Cunhao Lu <[email protected]>
dt-bindings: net: rockchip-dwmac: Add RK3572
This commit adds the rockchip,rk3572-gmac compatible string with the snps,dwmac-4.20a fallback to the Rockchip dwmac device tree binding schema.
Quoted 4 lines
Documentation/devicetree/bindings/net/rockchip-dwmac.yaml +0
-0
[ ... ]
Documentation/devicetree/bindings/net/rockchip-dwmac.yaml properties: · line 61
Quoted 8 lines
Documentation/devicetree/bindings/net/rockchip-dwmac.yaml +1
-0@@ -54,6 +55,7 @@ properties: - rockchip,rk3506-gmac - rockchip,rk3528-gmac - rockchip,rk3568-gmac + - rockchip,rk3572-gmac - rockchip,rk3576-gmac - rockchip,rk3588-gmac - rockchip,rv1126-gmac
[Severity: Low]
Should rockchip,rk3572-gmac also be added to properties:compatible in Documentation/devicetree/bindings/net/snps,dwmac.yaml?
Documentation/devicetree/bindings/net/rockchip-dwmac.yaml references snps,dwmac.yaml# under allOf:
allOf:
- $ref: snps,dwmac.yaml#
In Documentation/devicetree/bindings/net/snps,dwmac.yaml, properties:compatible lists all Rockchip gmac compatibles from rockchip-dwmac.yaml so that schemas including it can validate properly:
properties:
# We need to include all the compatibles from schemas that will # include that schemas, otherwise compatible won't validate for # those.
compatible:
contains:
enum:
...
- rockchip,rk3506-gmac
- rockchip,rk3528-gmac
- rockchip,rk3568-gmac
- rockchip,rk3576-gmac
- rockchip,rk3588-gmac
- rockchip,rv1108-gmac
- rockchip,rv1126-gmac
Prior commits adding or syncing Rockchip gmac compatibles (such as commit 4a667bec74b3 for rk3506, commit 299e2aefb159 for rk3576, and commit e774c91dca45) updated snps,dwmac.yaml alongside rockchip-dwmac.yaml, whereas omitting rockchip,rk3572-gmac leaves the two schemas out of sync.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=14
PATCH 15/27 dt-bindings: thermal: rockchip: Add RK3572
In reply to Cunhao LuAdd the RK3572 thermal sensor compatible.
--- Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml +2 -0
@@ -21,6 +21,7 @@ properties: - rockchip,rk3368-tsadc - rockchip,rk3399-tsadc - rockchip,rk3568-tsadc + - rockchip,rk3572-tsadc - rockchip,rk3576-tsadc - rockchip,rk3588-tsadc - rockchip,rv1108-tsadc
@@ -151,6 +152,7 @@ allOf: contains: enum: - rockchip,rk3568-tsadc + - rockchip,rk3572-tsadc - rockchip,rk3576-tsadc then: patternProperties:
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 15/27] dt-bindings: thermal: rockchip: Add RK3572
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
From: Cunhao Lu <[email protected]>
Add the RK3572 thermal sensor compatible.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=15
Re: [PATCH 15/27] dt-bindings: thermal: rockchip: Add RK3572
In reply to Cunhao LuQuoted 7 lines · Cunhao Lu
Add the RK3572 thermal sensor compatible.
Signed-off-by Cunhao Lu <[email protected]>--- Documentation/devicetree/bindings/thermal/rockchip-thermal.yaml | 2 ++ 1 file changed, 2 insertions(+)
PATCH 16/27 net: stmmac: dwmac-rk: Add RK3572 support
In reply to Cunhao LuConfigure RGMII delays and clocks for both RK3572 GMAC controllers, using GMAC-specific GRF registers.
--- drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 53 ++++++++++++++++++++++++++ 1 file changed, 53 insertions(+)
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +53 -0
@@ -872,6 +872,58 @@ static const struct rk_gmac_ops rk3568_ops = { }, }; +#define RK3572_VCCIO0_3_VO_IOC_CON1 0x10608 +#define RK3572_VCCIO1_2_4_VI_IOC_CON1 0x12604 +#define RK3572_VCCIO5_6_IOC_MISC0 0x14630 +#define RK3572_PHP_GRF_GMAC0_CON 0x0070 +#define RK3572_NVM0_GRF_GMAC1_CON 0x0020 + +static int rk3572_init (struct rk_priv_data *bsp_priv) +{ +switch (bsp_priv->id) { +case 0 : + bsp_priv->gmac_grf_reg =RK3572_PHP_GRF_GMAC0_CON ; +break ; +case 1 : + bsp_priv->gmac_grf_reg =RK3572_NVM0_GRF_GMAC1_CON ; +break ; +default : +return -EINVAL ; + } + + bsp_priv->clock_grf_reg = bsp_priv->gmac_grf_reg; +return 0 ; +} + +static void rk3572_set_to_rgmii (struct rk_priv_data *bsp_priv, +int tx_delay,int rx_delay) +{ +u32 val =GRF_FIELD (14 ,8 , rx_delay) |GRF_FIELD (6 ,0 , tx_delay) | +GRF_FIELD (15 ,15 , !!rx_delay) |GRF_FIELD (7 ,7 , !!tx_delay); + +if (bsp_priv->id ==1 ) { +regmap_write (bsp_priv->php_grf,RK3572_VCCIO0_3_VO_IOC_CON1 , val); +regmap_write (bsp_priv->php_grf,RK3572_VCCIO5_6_IOC_MISC0 , val); + }else { +regmap_write (bsp_priv->php_grf,RK3572_VCCIO1_2_4_VI_IOC_CON1 , val); + } +} + +static const struct rk_gmac_ops rk3572_ops = { + .init = rk3572_init, + .set_to_rgmii = rk3572_set_to_rgmii, + .gmac_phy_intf_sel_mask =GENMASK_U16 (11 ,9 ), + .gmac_rmii_mode_mask =BIT_U16 (3 ), + .clock.io_clksel_io_mask =BIT_U16 (7 ), + .clock.gmii_clk_sel_mask =GENMASK_U16 (6 ,5 ), + .clock.rmii_clk_sel_mask =BIT_U16 (5 ), + .clock.rmii_gate_en_mask =BIT_U16 (4 ), + .supports_rmii = true, + .php_grf_required = true, + .regs_valid = true, + .regs = {0x29d20000 ,0x2a040000 ,0 }, +}; +/* VCCIO0_1_3_IOC */ #define RK3576_VCCIO0_1_3_IOC_CON2 0X6408#define RK3576_VCCIO0_1_3_IOC_CON3 0X640c
@@ -1629,6 +1681,7 @@ static const struct of_device_id rk_gmac_dwmac_match[] = { { .compatible = "rockchip,rk3506-gmac", .data = &rk3506_ops }, { .compatible = "rockchip,rk3528-gmac", .data = &rk3528_ops }, { .compatible = "rockchip,rk3568-gmac", .data = &rk3568_ops }, + { .compatible = "rockchip,rk3572-gmac", .data = &rk3572_ops }, { .compatible = "rockchip,rk3576-gmac", .data = &rk3576_ops }, { .compatible = "rockchip,rk3588-gmac", .data = &rk3588_ops }, { .compatible = "rockchip,rv1108-gmac", .data = &rv1108_ops },
Signature · 1 line
2.34.1
Re: [PATCH 16/27] net: stmmac: dwmac-rk: Add RK3572 support
Quoted 4 lines · On Thu, Oct 22, 2026 at 12:11:13AM +0800, Cunhao Lu via B4 Relay wrote:
From: Cunhao Lu <[email protected]>
Configure RGMII delays and clocks for both RK3572 GMAC controllers, using GMAC-specific GRF registers.
You need to split this patches per subsystem. Please send all networking patches to netdev, once the merge window closes.
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
Andrew
---
pw-bot: cr
Re: [PATCH 16/27] net: stmmac: dwmac-rk: Add RK3572 support
Hi Andrew,
Quoted 4 lines
You need to split this patches per subsystem. Please send all networking patches to netdev, once the merge window closes.
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
Thank you for the guidance. I apologize for the inconvenience. I'll split the series by subsystem and send the RK3572 Ethernet binding and dwmac-rk driver changes together as a separate series to netdev after November 9, 2026.
Best regards,
Cunhao
[email protected]
AI reviewRe: [PATCH 16/27] net: stmmac: dwmac-rk: Add RK3572 support
In reply to Cunhao LuSashiko has reviewed this patch and found no issues.
Quoted 6 lines
From: Cunhao Lu <[email protected]>
Configure RGMII delays and clocks for both RK3572 GMAC controllers, using GMAC-specific GRF registers.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=16
PATCH 17/27 thermal: rockchip: Add RK3572 support
In reply to Cunhao LuSupport all five RK3572 thermal sensor channels.
--- drivers/thermal/rockchip_thermal.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
drivers/thermal/rockchip_thermal.c +28 -0
@@ -1303,6 +1303,31 @@ static const struct rockchip_tsadc_chip rk3568_tsadc_data = { }, }; +static const struct rockchip_tsadc_chip rk3572_tsadc_data = { +/* center, gpu_npu, ddr, little_core, big_core */ + .chn_offset =0 , + .chn_num =5 , + .grf_required = false, + .tshut_mode =TSHUT_MODE_GPIO , + .tshut_polarity =TSHUT_LOW_ACTIVE , + .tshut_temp =95000 , + .initialize = rk_tsadcv8_initialize, + .irq_ack = rk_tsadcv4_irq_ack, + .control = rk_tsadcv4_control, + .get_temp = rk_tsadcv4_get_temp, + .set_alarm_temp = rk_tsadcv3_alarm_temp, + .set_tshut_temp = rk_tsadcv3_tshut_temp, + .set_tshut_mode = rk_tsadcv4_tshut_mode, + .get_trim_code = rk_tsadcv2_get_trim_code, + .trim_slope =923 , + .table = { + .id = rk3588_code_table, + .length =ARRAY_SIZE (rk3588_code_table), + .data_mask =TSADCV4_DATA_MASK , + .mode =ADC_INCREMENT , + }, +}; +static const struct rockchip_tsadc_chip rk3576_tsadc_data = {/* top, big_core, little_core, ddr, npu, gpu */ .chn_offset =0 ,
@@ -1388,6 +1413,9 @@ static const struct of_device_id of_rockchip_thermal_match[] = { .data = (void *)&rk3568_tsadc_data, }, { + .compatible = "rockchip,rk3572-tsadc", + .data = &rk3572_tsadc_data, + }, { .compatible = "rockchip,rk3576-tsadc", .data = (void *)&rk3576_tsadc_data, },
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 17/27] thermal: rockchip: Add RK3572 support
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
From: Cunhao Lu <[email protected]>
Support all five RK3572 thermal sensor channels.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=17
PATCH 18/27 dt-bindings: phy: rockchip-inno-usb2: Add RK3572
In reply to Cunhao LuAdd the RK3572 USB2 PHY compatible.
--- .../devicetree/bindings/phy/rockchip,inno-usb2phy.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Documentation/devicetree/bindings/phy/rockchip,inno-usb2phy.yaml +14 -0
@@ -23,6 +23,7 @@ properties: - rockchip,rk3528-usb2phy - rockchip,rk3562-usb2phy - rockchip,rk3568-usb2phy + - rockchip,rk3572-usb2phy - rockchip,rk3576-usb2phy - rockchip,rk3588-usb2phy - rockchip,rv1108-usb2phy
@@ -253,6 +254,19 @@ allOf: clock-names: minItems: 3 + - if: + properties: + compatible: + const: rockchip,rk3572-usb2phy + then: + properties: + clocks: + minItems: 2 + maxItems: 2 + clock-names: + minItems: 2 + maxItems: 2 + additionalProperties: false examples:
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 18/27] dt-bindings: phy: rockchip-inno-usb2: Add RK3572
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
From: Cunhao Lu <[email protected]>
Add the RK3572 USB2 PHY compatible.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=18
Re: [PATCH 18/27] dt-bindings: phy: rockchip-inno-usb2: Add RK3572
In reply to Cunhao LuQuoted 7 lines · Cunhao Lu
Add the RK3572 USB2 PHY compatible.
Signed-off-by Cunhao Lu <[email protected]>--- .../devicetree/bindings/phy/rockchip,inno-usb2phy.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
PATCH 19/27 dt-bindings: phy: rockchip-naneng-combphy: Add RK3572
In reply to Cunhao LuThe RK3572 combo PHY uses two input clocks and one reset.
--- .../bindings/phy/phy-rockchip-naneng-combphy.yaml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)
Documentation/devicetree/bindings/phy/phy-rockchip-naneng-combphy.yaml +23 -0
@@ -15,6 +15,7 @@ properties: - rockchip,rk3528-naneng-combphy - rockchip,rk3562-naneng-combphy - rockchip,rk3568-naneng-combphy + - rockchip,rk3572-naneng-combphy - rockchip,rk3576-naneng-combphy - rockchip,rk3588-naneng-combphy
@@ -22,12 +23,14 @@ properties: maxItems: 1 clocks: + minItems: 2 items: - description: reference clock - description: apb clock - description: pipe clock clock-names: + minItems: 2 items: - const: ref - const: apb
@@ -94,6 +97,26 @@ required: - "#phy-cells" allOf: + - if: + properties: + compatible: + const: rockchip,rk3572-naneng-combphy + then: + properties: + clocks: + maxItems: 2 + clock-names: + maxItems: 2 + resets: + maxItems: 1 + reset-names: + maxItems: 1 + else: + properties: + clocks: + minItems: 3 + clock-names: + minItems: 3 - if: properties: compatible:
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 19/27] dt-bindings: phy: rockchip-naneng-combphy: Add RK3572
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
From: Cunhao Lu <[email protected]>
The RK3572 combo PHY uses two input clocks and one reset.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=19
Re: [PATCH 19/27] dt-bindings: phy: rockchip-naneng-combphy: Add RK3572
In reply to Cunhao LuQuoted 7 lines · Cunhao Lu
The RK3572 combo PHY uses two input clocks and one reset.
Signed-off-by Cunhao Lu <[email protected]>--- .../bindings/phy/phy-rockchip-naneng-combphy.yaml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+)
PATCH 20/27 dt-bindings: usb: rockchip: Add RK3572 DWC3 controller
In reply to Cunhao LuDescribe the PHP GRF register used to configure the DWC3 PIPE port before controller discovery.
--- .../bindings/usb/rockchip,rk3572-dwc3.yaml | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+)
Documentation/devicetree/bindings/usb/rockchip,rk3572-dwc3.yaml new file +100 -0
@@ -0,0 +1,100 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/rockchip,rk3572-dwc3.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip RK3572 DWC3 USB controller + +maintainers: + - Heiko Stuebner <[email protected]> + - Cunhao Lu <[email protected]> + +allOf: + - $ref: snps,dwc3-common.yaml# + +properties: + compatible: + const: rockchip,rk3572-dwc3 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + dma-coherent: true + + clocks: + minItems: 3 + maxItems: 3 + + clock-names: + items: + - const: ref_clk + - const: suspend_clk + - const: bus_clk + + phys: + minItems: 1 + items: + - description: USB2 PHY + - description: USB3 PHY + + phy-names: + minItems: 1 + items: + - const: usb2-phy + - const: usb3-phy + + power-domains: + maxItems: 1 + + resets: + maxItems: 1 + + rockchip,grf: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: + PHP GRF and the controller's PIPE configuration register offset. + items: + - items: + - description: PHP GRF phandle + - enum: [0x14, 0x34] + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - phys + - phy-names + - power-domains + - resets + - rockchip,grf + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/clock/rockchip,rk3572-cru.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/phy/phy.h> + #include <dt-bindings/power/rockchip,rk3572-power-controller.h> + #include <dt-bindings/reset/rockchip,rk3572-cru.h> + + usb@24400000 { + compatible = "rockchip,rk3572-dwc3"; + reg = <0x24400000 0x400000>; + interrupts = <GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&cru CLK_REF_USB3OTG1>, <&cru CLK_SUSPEND_USB3OTG1>, + <&cru ACLK_USB3OTG1>; + clock-names = "ref_clk", "suspend_clk", "bus_clk"; + phys = <&u2phy1_otg>, <&combphy1 PHY_TYPE_USB3>; + phy-names = "usb2-phy", "usb3-phy"; + power-domains = <&power RK3572_PD_PHP>; + resets = <&cru SRST_ARESETN_USB3OTG1>; + rockchip,grf = <&php_grf 0x34>; + dr_mode = "host"; + };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 20/27] dt-bindings: usb: rockchip: Add RK3572 DWC3 controller
Sashiko has reviewed this patch and found no issues.
Quoted 6 lines
From: Cunhao Lu <[email protected]>
Describe the PHP GRF register used to configure the DWC3 PIPE port before controller discovery.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=20
Re: [PATCH 20/27] dt-bindings: usb: rockchip: Add RK3572 DWC3 controller
In reply to Cunhao LuQuoted 8 lines · Cunhao Lu
Describe the PHP GRF register used to configure the DWC3 PIPE port before controller discovery.
Signed-off-by Cunhao Lu <[email protected]>--- .../bindings/usb/rockchip,rk3572-dwc3.yaml | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+)
PATCH 21/27 phy: rockchip-inno-usb2: Add RK3572 support
In reply to Cunhao LuSupport both RK3572 USB2 PHY instances.
--- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 136 ++++++++++++++++++++++++++ 1 file changed, 136 insertions(+)
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +136 -0
@@ -1544,6 +1544,49 @@ static int rk3528_usb2phy_tuning(struct rockchip_usb2phy *rphy)return 0 ; } +static int rk3572_usb2phy_tuning (struct rockchip_usb2phy *rphy) +{ +u32 reg = rphy->phy_cfg->reg; +struct clk *refclk; +unsigned long rate; +u32 val; +int ret; + + refclk =devm_clk_get (rphy->dev,"phyclk" ); +if (IS_ERR (refclk)) +return PTR_ERR (refclk); + rate =clk_get_rate (refclk); +if (rate !=24000000 && rate !=26000000 ) +return -EINVAL ; + + ret =regmap_write (rphy->grf, reg +0x0004 , +GENMASK (18 ,16 ) | (rate ==24000000 ?2 :6 )); +if (ret) +return ret; + + ret =regmap_read (rphy->grf, reg +0x0010 , &val); +if (ret) +return ret; +if (val &BIT (13 )) { + ret =regmap_write (rphy->grf, reg +0x0010 ,BIT (29 )); +if (ret) +return ret; + ret =rockchip_usb2phy_reset (rphy); +if (ret) +return ret; + } + +/* Set the normal line-state filter interval. */ + ret =regmap_write (rphy->grf, reg +0x0020 ,0x30100 ); +if (ret) +return ret; +/* Increase HS voltage by 5.89% and double pre-emphasis current. */ + ret =regmap_write (rphy->grf, reg +0x000c ,GENMASK (27 ,24 ) |0x0900 ); +if (ret) +return ret; +return regmap_write (rphy->grf, reg +0x0010 ,GENMASK (20 ,19 ) |0x0010 ); +} +static int rk3576_usb2phy_tuning (struct rockchip_usb2phy *rphy) {int ret;
@@ -2126,6 +2169,98 @@ static const struct rockchip_usb2phy_cfg rk3568_phy_cfgs[] = { {/* sentinel */ } }; +static const struct rockchip_usb2phy_cfg rk3572_phy_cfgs[] = { + { + .reg =0x0 , + .num_ports =1 , + .phy_tuning = rk3572_usb2phy_tuning, + .clkout_ctl = {0x0008 ,0 ,0 ,1 ,0 }, + .port_cfgs = { + [USB2PHY_PORT_OTG ] = { + .phy_sus = {0x0000 ,8 ,0 ,0 ,0x1d1 }, + .bvalid_det_en = {0x00c0 ,1 ,1 ,0 ,1 }, + .bvalid_det_st = {0x00c4 ,1 ,1 ,0 ,1 }, + .bvalid_det_clr = {0x00c8 ,1 ,1 ,0 ,1 }, + .idfall_det_en = {0x00c0 ,4 ,4 ,0 ,1 }, + .idfall_det_st = {0x00c4 ,4 ,4 ,0 ,1 }, + .idfall_det_clr = {0x00c8 ,4 ,4 ,0 ,1 }, + .idrise_det_en = {0x00c0 ,3 ,3 ,0 ,1 }, + .idrise_det_st = {0x00c4 ,3 ,3 ,0 ,1 }, + .idrise_det_clr = {0x00c8 ,3 ,3 ,0 ,1 }, + .ls_det_en = {0x00c0 ,0 ,0 ,0 ,1 }, + .ls_det_st = {0x00c4 ,0 ,0 ,0 ,1 }, + .ls_det_clr = {0x00c8 ,0 ,0 ,0 ,1 }, + .disfall_en = {0x00c0 ,6 ,6 ,0 ,1 }, + .disfall_st = {0x00c4 ,6 ,6 ,0 ,1 }, + .disfall_clr = {0x00c8 ,6 ,6 ,0 ,1 }, + .disrise_en = {0x00c0 ,5 ,5 ,0 ,1 }, + .disrise_st = {0x00c4 ,5 ,5 ,0 ,1 }, + .disrise_clr = {0x00c8 ,5 ,5 ,0 ,1 }, + .utmi_avalid = {0x0080 ,1 ,1 ,0 ,1 }, + .utmi_bvalid = {0x0080 ,0 ,0 ,0 ,1 }, + .utmi_id = {0x0080 ,6 ,6 ,0 ,1 }, + .utmi_ls = {0x0080 ,5 ,4 ,0 ,1 }, + } + }, + .chg_det = { + .cp_det = {0x0080 ,8 ,8 ,0 ,1 }, + .dcp_det = {0x0080 ,8 ,8 ,0 ,1 }, + .dp_det = {0x0080 ,9 ,9 ,1 ,0 }, + .idm_sink_en = {0x0010 ,5 ,5 ,1 ,0 }, + .idp_sink_en = {0x0010 ,5 ,5 ,0 ,1 }, + .idp_src_en = {0x0010 ,14 ,14 ,0 ,1 }, + .rdm_pdwn_en = {0x0010 ,14 ,14 ,0 ,1 }, + .vdm_src_en = {0x0010 ,7 ,6 ,0 ,3 }, + .vdp_src_en = {0x0010 ,7 ,6 ,0 ,3 }, + }, + }, + { + .reg =0x2000 , + .num_ports =1 , + .phy_tuning = rk3572_usb2phy_tuning, + .clkout_ctl = {0x2008 ,0 ,0 ,1 ,0 }, + .port_cfgs = { + [USB2PHY_PORT_OTG ] = { + .phy_sus = {0x2000 ,8 ,0 ,0 ,0x1d1 }, + .bvalid_det_en = {0x20c0 ,1 ,1 ,0 ,1 }, + .bvalid_det_st = {0x20c4 ,1 ,1 ,0 ,1 }, + .bvalid_det_clr = {0x20c8 ,1 ,1 ,0 ,1 }, + .idfall_det_en = {0x20c0 ,4 ,4 ,0 ,1 }, + .idfall_det_st = {0x20c4 ,4 ,4 ,0 ,1 }, + .idfall_det_clr = {0x20c8 ,4 ,4 ,0 ,1 }, + .idrise_det_en = {0x20c0 ,3 ,3 ,0 ,1 }, + .idrise_det_st = {0x20c4 ,3 ,3 ,0 ,1 }, + .idrise_det_clr = {0x20c8 ,3 ,3 ,0 ,1 }, + .ls_det_en = {0x20c0 ,0 ,0 ,0 ,1 }, + .ls_det_st = {0x20c4 ,0 ,0 ,0 ,1 }, + .ls_det_clr = {0x20c8 ,0 ,0 ,0 ,1 }, + .disfall_en = {0x20c0 ,6 ,6 ,0 ,1 }, + .disfall_st = {0x20c4 ,6 ,6 ,0 ,1 }, + .disfall_clr = {0x20c8 ,6 ,6 ,0 ,1 }, + .disrise_en = {0x20c0 ,5 ,5 ,0 ,1 }, + .disrise_st = {0x20c4 ,5 ,5 ,0 ,1 }, + .disrise_clr = {0x20c8 ,5 ,5 ,0 ,1 }, + .utmi_avalid = {0x2080 ,1 ,1 ,0 ,1 }, + .utmi_bvalid = {0x2080 ,0 ,0 ,0 ,1 }, + .utmi_id = {0x2080 ,6 ,6 ,0 ,1 }, + .utmi_ls = {0x2080 ,5 ,4 ,0 ,1 }, + } + }, + .chg_det = { + .cp_det = {0x2080 ,8 ,8 ,0 ,1 }, + .dcp_det = {0x2080 ,8 ,8 ,0 ,1 }, + .dp_det = {0x2080 ,9 ,9 ,1 ,0 }, + .idm_sink_en = {0x2010 ,5 ,5 ,1 ,0 }, + .idp_sink_en = {0x2010 ,5 ,5 ,0 ,1 }, + .idp_src_en = {0x2010 ,14 ,14 ,0 ,1 }, + .rdm_pdwn_en = {0x2010 ,14 ,14 ,0 ,1 }, + .vdm_src_en = {0x2010 ,7 ,6 ,0 ,3 }, + .vdp_src_en = {0x2010 ,7 ,6 ,0 ,3 }, + }, + }, + {/* sentinel */ } +}; +static const struct rockchip_usb2phy_cfg rk3576_phy_cfgs[] = { { .reg =0x0 ,
@@ -2378,6 +2513,7 @@ static const struct of_device_id rockchip_usb2phy_dt_match[] = { { .compatible = "rockchip,rk3528-usb2phy", .data = &rk3528_phy_cfgs }, { .compatible = "rockchip,rk3562-usb2phy", .data = &rk3562_phy_cfgs }, { .compatible = "rockchip,rk3568-usb2phy", .data = &rk3568_phy_cfgs }, + { .compatible = "rockchip,rk3572-usb2phy", .data = &rk3572_phy_cfgs }, { .compatible = "rockchip,rk3576-usb2phy", .data = &rk3576_phy_cfgs }, { .compatible = "rockchip,rk3588-usb2phy", .data = &rk3588_phy_cfgs }, { .compatible = "rockchip,rv1108-usb2phy", .data = &rv1108_phy_cfgs },
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 21/27] phy: rockchip-inno-usb2: Add RK3572 support
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
From: Cunhao Lu <[email protected]>
Support both RK3572 USB2 PHY instances.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=21
Re: [PATCH 21/27] phy: rockchip-inno-usb2: Add RK3572 support
In reply to Cunhao LuQuoted 3 lines · Cunhao Lu
Support both RK3572 USB2 PHY instances.
Signed-off-by Cunhao Lu <[email protected]>
Nitpicks below. With those fixed,
Quoted 13 lines
--- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 136 ++++++++++++++++++++++++++ 1 file changed, 136 insertions(+)drivers/phy/rockchip/phy-rockchip-inno-usb2.c +1
-0@@ -1544,6 +1544,49 @@ static int rk3528_usb2phy_tuning(struct rockchip_usb2phy *rphy)return 0 ; } +static int rk3572_usb2phy_tuning (struct rockchip_usb2phy *rphy)
drivers/phy/rockchip/phy-rockchip-inno-usb2.c static int rk3528_usb2phy_tuning(struct rockchip_usb2phy *rphy) · line 1557
Quoted 10 lines
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +10
-0+{ +u32 reg = rphy->phy_cfg->reg; +struct clk *refclk; +unsigned long rate; +u32 val; +int ret; + + refclk =devm_clk_get (rphy->dev,"phyclk" ); +if (IS_ERR (refclk)) +return PTR_ERR (refclk);
Please insert a newline between each operation to improve readability.
Quoted 15 lines
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +15
-0+ rate =clk_get_rate (refclk); +if (rate !=24000000 && rate !=26000000 ) +return -EINVAL ; + + ret =regmap_write (rphy->grf, reg +0x0004 , +GENMASK (18 ,16 ) | (rate ==24000000 ?2 :6 )); +if (ret) +return ret; + + ret =regmap_read (rphy->grf, reg +0x0010 , &val); +if (ret) +return ret; +if (val &BIT (13 )) { + ret =regmap_write (rphy->grf, reg +0x0010 ,BIT (29 )); +if (ret)
drivers/phy/rockchip/phy-rockchip-inno-usb2.c static int rk3528_usb2phy_tuning(struct rockchip_usb2phy *rphy) · line 1582
Quoted 10 lines
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +10
-0+return ret; + ret =rockchip_usb2phy_reset (rphy); +if (ret) +return ret; + } + +/* Set the normal line-state filter interval. */ + ret =regmap_write (rphy->grf, reg +0x0020 ,0x30100 ); +if (ret) +return ret;
Here.
drivers/phy/rockchip/phy-rockchip-inno-usb2.c static int rk3528_usb2phy_tuning(struct rockchip_usb2phy *rphy) · line 1586
Quoted 4 lines
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +4
-0+/* Increase HS voltage by 5.89% and double pre-emphasis current. */ + ret =regmap_write (rphy->grf, reg +0x000c ,GENMASK (27 ,24 ) |0x0900 ); +if (ret) +return ret;
And here.
- Mani
Re: [PATCH 21/27] phy: rockchip-inno-usb2: Add RK3572 support
Hi,
Quoted 9 lines
Quoted 3 lines
+ refclk =
devm_clk_get(rphy->dev, "phyclk");
+ if (IS_ERR(refclk))
+ returnPTR_ERR(refclk);Please insert a newline between each operation to improve readability.
Quoted 3 lines
+ rate =
clk_get_rate(refclk);
+ if (rate != 24000000 && rate != 26000000)
+ return-EINVAL;
I will add a blank line here and between the other operations to improve readability.
Quoted 5 lines
Quoted 4 lines
+ /* Set the normal line-state filter interval. */
+ ret =regmap_write(rphy->grf, reg + 0x0020, 0x30100);
+ if (ret)
+ return ret;
Quoted 8 lines
Here.
Quoted 4 lines
+ /* Increase HS voltage by 5.89% and double pre-emphasis current. */
+ ret =regmap_write(rphy->grf, reg + 0x000c, GENMASK(27, 24) | 0x0900);
+ if (ret)
+ return ret;And here.
I will add blank lines at these places too.
I am working on splitting the patches by subsystem, and I will resubmit this patch as part of v2 after addressing these comments.
Thank you for your review!
Best regards,
Cunhao Lu
PATCH 22/27 phy: rockchip-naneng-combphy: Add RK3572 support
In reply to Cunhao LuSupport PCIe, USB3, and SATA operation on the RK3572 combo PHY.
--- drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 201 +++++++++++++++++++++ 1 file changed, 201 insertions(+)
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +201 -0
@@ -1000,6 +1000,204 @@ static const struct rockchip_combphy_cfg rk3568_combphy_cfgs = { .combphy_cfg = rk3568_combphy_cfg, }; +static int rk3572_combphy_cfg (struct rockchip_combphy_priv *priv) +{ +const struct rockchip_combphy_grfcfg *cfg = priv->cfg->grfcfg; +unsigned long rate; + +switch (priv->type) { +case PHY_TYPE_PCIE : +/* Set SSC downward spread spectrum */ +rockchip_combphy_updatel (priv,GENMASK (5 ,4 ),BIT (4 ),0x7c ); + +rockchip_combphy_param_write (priv->phy_grf, &cfg->con0_for_pcie, true); +rockchip_combphy_param_write (priv->phy_grf, &cfg->con1_for_pcie, true); +rockchip_combphy_param_write (priv->phy_grf, &cfg->con2_for_pcie, true); +rockchip_combphy_param_write (priv->phy_grf, &cfg->con3_for_pcie, true); +break ; +case PHY_TYPE_USB3 : +/* Set SSC downward spread spectrum */ +rockchip_combphy_updatel (priv,GENMASK (5 ,4 ),BIT (4 ),0x7c ); + +/* Enable adaptive CTLE for USB3.0 Rx */ +rockchip_combphy_updatel (priv,GENMASK (0 ,0 ),BIT (0 ),0x38 ); + +/* Set PLL KVCO fine tuning signals */ +rockchip_combphy_updatel (priv,GENMASK (4 ,2 ),BIT (3 ),0x80 ); + +/* Set PLL LPF R1 to su_trim[10:7]=1001 */ +writel (0x4 , priv->mmio + (0xb <<2 )); + +/* Set PLL input clock divider 1/2 */ +rockchip_combphy_updatel (priv,GENMASK (7 ,6 ),BIT (6 ),0x14 ); + +writel (0x32 , priv->mmio + (0x11 <<2 )); + +/* Set PLL KVCO to min and set PLL charge pump current to max */ +writel (0xf0 , priv->mmio + (0xa <<2 )); + +/* Set Rx squelch input filter bandwidth */ +writel (0x0d , priv->mmio + (0x14 <<2 )); + +rockchip_combphy_param_write (priv->phy_grf, &cfg->pipe_txcomp_sel, false); +rockchip_combphy_param_write (priv->phy_grf, &cfg->pipe_txelec_sel, false); +rockchip_combphy_param_write (priv->phy_grf, &cfg->usb_mode_set, true); +break ; +case PHY_TYPE_SATA : +/* Enable adaptive CTLE for SATA Rx */ +rockchip_combphy_updatel (priv,GENMASK (0 ,0 ),BIT (0 ),0x38 ); + +/* Set tx_rterm = 50 ohm and rx_rterm = 43.5 ohm */ +writel (0x8f , priv->mmio + (0x06 <<2 )); + +rockchip_combphy_param_write (priv->phy_grf, &cfg->con0_for_sata, true); +rockchip_combphy_param_write (priv->phy_grf, &cfg->con1_for_sata, true); +rockchip_combphy_param_write (priv->phy_grf, &cfg->con2_for_sata, true); +rockchip_combphy_param_write (priv->phy_grf, &cfg->con3_for_sata, true); +rockchip_combphy_param_write (priv->pipe_grf, &cfg->pipe_con0_for_sata, true); +rockchip_combphy_param_write (priv->pipe_grf, &cfg->pipe_con1_for_sata, true); +break ; +default : +dev_err (priv->dev,"incompatible PHY type\n" ); +return -EINVAL ; + } + + rate =clk_get_rate (priv->refclk); + +switch (rate) { +case 24000000 : +rockchip_combphy_param_write (priv->phy_grf, &cfg->pipe_clk_24m, true); +if (priv->type ==PHY_TYPE_USB3 || priv->type ==PHY_TYPE_SATA ) { +/* Set ssc_cnt[9:0]=0101111101 & 31.5KHz */ +rockchip_combphy_updatel (priv,GENMASK (7 ,6 ),BIT (6 ),0xe <<2 ); + +rockchip_combphy_updatel (priv,GENMASK (7 ,0 ),0x5f ,0xf <<2 ); + }else if (priv->type ==PHY_TYPE_PCIE ) { +/* PLL KVCO tuning fine */ +rockchip_combphy_updatel (priv,GENMASK (4 ,2 ),0x4 <<2 ,0x20 <<2 ); + +writel (0x0 , priv->mmio + (0x1b <<2 )); + +/* Set up su_trim: T0_1 */ +writel (0x90 , priv->mmio + (0xa <<2 )); +writel (0x02 , priv->mmio + (0xb <<2 )); +writel (0x57 , priv->mmio + (0xd <<2 )); + +writel (0x5f , priv->mmio + (0xf <<2 )); + } +break ; +case 25000000 : +rockchip_combphy_param_write (priv->phy_grf, &cfg->pipe_clk_25m, true); +break ; +case 100000000 : +rockchip_combphy_param_write (priv->phy_grf, &cfg->pipe_clk_100m, true); +if (priv->type ==PHY_TYPE_PCIE ) { +/* gate_tx_pck_sel length select work for L1SS */ +writel (0xc0 , priv->mmio +0x74 ); + +/* PLL KVCO tuning fine */ +rockchip_combphy_updatel (priv,GENMASK (4 ,2 ),0x4 <<2 ,0x20 <<2 ); + +/* Set up rx_trim: PLL LPF C1 85pf R1 1.25kohm */ +writel (0x4c , priv->mmio + (0x1b <<2 )); + +/* Set up su_trim: T3_P1 650mv */ +writel (0x90 , priv->mmio + (0xa <<2 )); +writel (0x43 , priv->mmio + (0xb <<2 )); +writel (0x88 , priv->mmio + (0xc <<2 )); +writel (0x56 , priv->mmio + (0xd <<2 )); + }else if (priv->type ==PHY_TYPE_SATA ) { +/* downward spread spectrum +500ppm */ +rockchip_combphy_updatel (priv,GENMASK (7 ,4 ),0x50 ,0x1f <<2 ); + +/* ssc ppm adjust to 3500ppm */ +rockchip_combphy_updatel (priv,GENMASK (3 ,0 ),0x7 ,0x9 <<2 ); + } +break ; +default : +dev_err (priv->dev,"Unsupported rate: %lu\n" , rate); +return -EINVAL ; + } + +if (priv->ext_refclk) { +rockchip_combphy_param_write (priv->phy_grf, &cfg->pipe_clk_ext, true); +if (priv->type ==PHY_TYPE_PCIE && rate ==100000000 ) { +writel (0x10 , priv->mmio + (0x20 <<2 )); + +writel (0x0c , priv->mmio + (0x1b <<2 )); + +/* +* Set up su_trim: T3_P1 650mv +* CKRCV termination resistor adjust 11: Hi-Z +*/ +writel (0x90 , priv->mmio + (0xa <<2 )); +writel (0x43 , priv->mmio + (0xb <<2 )); +writel (0xb8 , priv->mmio + (0xc <<2 )); +writel (0x56 , priv->mmio + (0xd <<2 )); + } + } + +if (priv->enable_ssc) { +rockchip_combphy_updatel (priv,GENMASK (4 ,4 ),BIT (4 ),0x7 <<2 ); +/* PLL control SSC module period should be set */ +rockchip_combphy_updatel (priv,GENMASK (5 ,5 ),BIT (5 ),0x20 <<2 ); + +if (priv->type ==PHY_TYPE_PCIE && rate ==24000000 ) { +/* xin24m T0_1 650mV */ +writel (0x00 , priv->mmio + (0x10 <<2 )); +writel (0x32 , priv->mmio + (0x11 <<2 )); +writel (0x00 , priv->mmio + (0x1b <<2 )); +writel (0x90 , priv->mmio + (0x0a <<2 )); +writel (0x02 , priv->mmio + (0x0b <<2 )); +writel (0x08 , priv->mmio + (0x0c <<2 )); +writel (0x57 , priv->mmio + (0x0d <<2 )); +writel (0x40 , priv->mmio + (0x0e <<2 )); +writel (0x5f , priv->mmio + (0x0f <<2 )); +writel (0x10 , priv->mmio + (0x20 <<2 )); +/* ssc_cnt: 0101111101 & 31.5KHz */ +rockchip_combphy_updatel (priv,GENMASK (7 ,6 ),BIT (6 ),0xe <<2 ); +rockchip_combphy_updatel (priv,GENMASK (7 ,0 ),0x5f ,0xf <<2 ); + }else if (priv->type ==PHY_TYPE_PCIE && rate ==100000000 ) { +/* ssc_cnt: 1000110001 & 31.5KHz */ +rockchip_combphy_updatel (priv,GENMASK (7 ,6 ),BIT (6 ),0xe <<2 ); +rockchip_combphy_updatel (priv,GENMASK (7 ,0 ),0x8c ,0xf <<2 ); + } + } + +if (priv->type ==PHY_TYPE_PCIE ) +rockchip_combphy_updatel (priv,BIT (5 ),BIT (5 ),0x64 ); + +return 0 ; +} + +static const struct rockchip_combphy_grfcfg rk3572_combphy_grfcfgs = { +/* pipe-phy-grf */ + .usb_mode_set = {0x0000 ,5 ,0 ,0x00 ,0x04 }, + .pipe_clk_24m = {0x0004 ,14 ,13 ,0x00 ,0x00 }, + .pipe_clk_25m = {0x0004 ,14 ,13 ,0x00 ,0x01 }, + .pipe_clk_100m = {0x0004 ,14 ,13 ,0x00 ,0x02 }, + .pipe_txelec_sel = {0x0008 ,12 ,12 ,0x00 ,0x01 }, + .pipe_txcomp_sel = {0x0008 ,15 ,15 ,0x00 ,0x01 }, + .pipe_clk_ext = {0x000c ,9 ,8 ,0x02 ,0x01 }, + .pipe_phy_status = {0x0034 ,6 ,6 ,0x01 ,0x00 }, + .con0_for_pcie = {0x0000 ,15 ,0 ,0x00 ,0x1000 }, + .con1_for_pcie = {0x0004 ,15 ,0 ,0x00 ,0x0000 }, + .con2_for_pcie = {0x0008 ,15 ,0 ,0x00 ,0x0101 }, + .con3_for_pcie = {0x000c ,15 ,0 ,0x00 ,0x0200 }, + .con0_for_sata = {0x0000 ,15 ,0 ,0x00 ,0x0129 }, + .con1_for_sata = {0x0004 ,15 ,0 ,0x00 ,0x0000 }, + .con2_for_sata = {0x0008 ,15 ,0 ,0x00 ,0x80c1 }, + .con3_for_sata = {0x000c ,15 ,0 ,0x00 ,0x0407 }, +/* php-grf */ + .pipe_con0_for_sata = {0x0058 ,2 ,0 ,0x00 ,0x2 }, + .pipe_con1_for_sata = {0x005c ,2 ,0 ,0x00 ,0x2 }, +}; + +static const struct rockchip_combphy_cfg rk3572_combphy_cfgs = { + .grfcfg = &rk3572_combphy_grfcfgs, + .combphy_cfg = rk3572_combphy_cfg, +}; +static int rk3576_combphy_cfg (struct rockchip_combphy_priv *priv) {const struct rockchip_combphy_grfcfg *cfg = priv->cfg->grfcfg;
@@ -1407,6 +1605,9 @@ static const struct of_device_id rockchip_combphy_of_match[] = { .data = &rk3568_combphy_cfgs, }, { + .compatible = "rockchip,rk3572-naneng-combphy", + .data = &rk3572_combphy_cfgs, + }, { .compatible = "rockchip,rk3576-naneng-combphy", .data = &rk3576_combphy_cfgs, },
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 22/27] phy: rockchip-naneng-combphy: Add RK3572 support
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] phy: rockchip-naneng-combphy: writel() clobbers SSC bit in rk3572_combphy_cfg() --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] phy: rockchip-naneng-combphy: writel() clobbers SSC bit in rk3572_combphy_cfg() --
commit 9ca36a68e2ebd41ee7e126faeae68aae4fa05eae
Author: Cunhao Lu <[email protected]>
phy: rockchip-naneng-combphy: Add RK3572 support
This commit adds configuration tables, register programming, and device tree matching support for the RK3572 combo PHY operating in PCIe, USB3, and SATA modes.
Quoted 10 lines
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +2
-0@@ -1000,6 +1000,204 @@ static const struct rockchip_combphy_cfg rk3568_combphy_cfgs = { .combphy_cfg = rk3568_combphy_cfg, }; +static int rk3572_combphy_cfg (struct rockchip_combphy_priv *priv) +{
[ ... ]
Quoted 11 lines
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +11
-0+switch (rate) { +case 24000000 : +rockchip_combphy_param_write (priv->phy_grf, &cfg->pipe_clk_24m, true); +if (priv->type ==PHY_TYPE_USB3 || priv->type ==PHY_TYPE_SATA ) { +/* Set ssc_cnt[9:0]=0101111101 & 31.5KHz */ +rockchip_combphy_updatel (priv,GENMASK (7 ,6 ),BIT (6 ),0xe <<2 ); + +rockchip_combphy_updatel (priv,GENMASK (7 ,0 ),0x5f ,0xf <<2 ); + }else if (priv->type ==PHY_TYPE_PCIE ) { +/* PLL KVCO tuning fine */ +rockchip_combphy_updatel (priv,GENMASK (4 ,2 ),0x4 <<2 ,0x20 <<2 );
[ ... ]
Quoted 25 lines
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +25
-0+if (priv->ext_refclk) { +rockchip_combphy_param_write (priv->phy_grf, &cfg->pipe_clk_ext, true); +if (priv->type ==PHY_TYPE_PCIE && rate ==100000000 ) { +writel (0x10 , priv->mmio + (0x20 <<2 )); + +writel (0x0c , priv->mmio + (0x1b <<2 )); + +/* +* Set up su_trim: T3_P1 650mv +* CKRCV termination resistor adjust 11: Hi-Z +*/ +writel (0x90 , priv->mmio + (0xa <<2 )); +writel (0x43 , priv->mmio + (0xb <<2 )); +writel (0xb8 , priv->mmio + (0xc <<2 )); +writel (0x56 , priv->mmio + (0xd <<2 )); + } + } + +if (priv->enable_ssc) { +rockchip_combphy_updatel (priv,GENMASK (4 ,4 ),BIT (4 ),0x7 <<2 ); +/* PLL control SSC module period should be set */ +rockchip_combphy_updatel (priv,GENMASK (5 ,5 ),BIT (5 ),0x20 <<2 ); + +if (priv->type ==PHY_TYPE_PCIE && rate ==24000000 ) { +/* xin24m T0_1 650mV */
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c static const struct rockchip_combphy_cfg rk3568_combphy_cfgs = { · line 1156
Quoted 10 lines
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +10
-0+writel (0x00 , priv->mmio + (0x10 <<2 )); +writel (0x32 , priv->mmio + (0x11 <<2 )); +writel (0x00 , priv->mmio + (0x1b <<2 )); +writel (0x90 , priv->mmio + (0x0a <<2 )); +writel (0x02 , priv->mmio + (0x0b <<2 )); +writel (0x08 , priv->mmio + (0x0c <<2 )); +writel (0x57 , priv->mmio + (0x0d <<2 )); +writel (0x40 , priv->mmio + (0x0e <<2 )); +writel (0x5f , priv->mmio + (0x0f <<2 )); +writel (0x10 , priv->mmio + (0x20 <<2 ));
[Severity: Medium]
Does this writel(0x10, priv->mmio + (0x20 << 2)) in rk3572_combphy_cfg() clobber the SSC period control bit that was just set above?
When priv->enable_ssc is true, rk3572_combphy_cfg() sets BIT(5) in register offset 0x20 << 2 via rockchip_combphy_updatel(). Immediately afterwards, when priv->type == PHY_TYPE_PCIE and rate == 24000000, this writel() overwrites the entire register at 0x20 << 2 with 0x10, clearing BIT(5) back to 0.
Should both this write and the writel(0x10, priv->mmio + (0x20 << 2)) in the priv->ext_refclk block above use rockchip_combphy_updatel() with GENMASK(4, 2) instead, matching how the 24 MHz and 100 MHz PHY_TYPE_PCIE cases update the PLL KVCO tuning field earlier in rk3572_combphy_cfg()?
[ ... ]
Quoted 1 line
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=22
Manivannan Sadhasivam
reviewerRe: [PATCH 22/27] phy: rockchip-naneng-combphy: Add RK3572 support
Quoted 85 lines · On 2026-10-22 16:13 +0000, [email protected] wrote:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] phy: rockchip-naneng-combphy:writel()clobbers SSC bit inrk3572_combphy_cfg()--commit
9ca36a68e2ebd41ee7e126faeae68aae4fa05eae
Author: Cunhao Lu <[email protected]>phy: rockchip-naneng-combphy: Add RK3572 support
This commit adds configuration tables, register programming, and device tree matching support for the RK3572 combo PHY operating in PCIe, USB3, and SATA modes.
Quoted 10 lines
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +2
-0@@ -1000,6 +1000,204 @@ static const struct rockchip_combphy_cfg rk3568_combphy_cfgs = { .combphy_cfg = rk3568_combphy_cfg, }; +static int rk3572_combphy_cfg (struct rockchip_combphy_priv *priv) +{[ ... ]
Quoted 11 lines
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +11
-0+switch (rate) { +case 24000000 : +rockchip_combphy_param_write (priv->phy_grf, &cfg->pipe_clk_24m, true); +if (priv->type ==PHY_TYPE_USB3 || priv->type ==PHY_TYPE_SATA ) { +/* Set ssc_cnt[9:0]=0101111101 & 31.5KHz */ +rockchip_combphy_updatel (priv,GENMASK (7 ,6 ),BIT (6 ),0xe <<2 ); + +rockchip_combphy_updatel (priv,GENMASK (7 ,0 ),0x5f ,0xf <<2 ); + }else if (priv->type ==PHY_TYPE_PCIE ) { +/* PLL KVCO tuning fine */ +rockchip_combphy_updatel (priv,GENMASK (4 ,2 ),0x4 <<2 ,0x20 <<2 );[ ... ]
Quoted 25 lines
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +25
-0+if (priv->ext_refclk) { +rockchip_combphy_param_write (priv->phy_grf, &cfg->pipe_clk_ext, true); +if (priv->type ==PHY_TYPE_PCIE && rate ==100000000 ) { +writel (0x10 , priv->mmio + (0x20 <<2 )); + +writel (0x0c , priv->mmio + (0x1b <<2 )); + +/* +* Set up su_trim: T3_P1 650mv +* CKRCV termination resistor adjust 11: Hi-Z +*/ +writel (0x90 , priv->mmio + (0xa <<2 )); +writel (0x43 , priv->mmio + (0xb <<2 )); +writel (0xb8 , priv->mmio + (0xc <<2 )); +writel (0x56 , priv->mmio + (0xd <<2 )); + } + } + +if (priv->enable_ssc) { +rockchip_combphy_updatel (priv,GENMASK (4 ,4 ),BIT (4 ),0x7 <<2 ); +/* PLL control SSC module period should be set */ +rockchip_combphy_updatel (priv,GENMASK (5 ,5 ),BIT (5 ),0x20 <<2 ); + +if (priv->type ==PHY_TYPE_PCIE && rate ==24000000 ) { +/* xin24m T0_1 650mV */ drivers/phy/rockchip/phy-rockchip-naneng-combphy.c static const struct rockchip_combphy_cfg rk3568_combphy_cfgs = { · line 1156
Quoted 10 lines
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +10
-0+writel (0x00 , priv->mmio + (0x10 <<2 )); +writel (0x32 , priv->mmio + (0x11 <<2 )); +writel (0x00 , priv->mmio + (0x1b <<2 )); +writel (0x90 , priv->mmio + (0x0a <<2 )); +writel (0x02 , priv->mmio + (0x0b <<2 )); +writel (0x08 , priv->mmio + (0x0c <<2 )); +writel (0x57 , priv->mmio + (0x0d <<2 )); +writel (0x40 , priv->mmio + (0x0e <<2 )); +writel (0x5f , priv->mmio + (0x0f <<2 )); +writel (0x10 , priv->mmio + (0x20 <<2 ));[Severity: Medium]
Does thiswritel(0x10, priv->mmio + (0x20 << 2))inrk3572_combphy_cfg()clobber the SSC period control bit that was just set above?When
priv->enable_sscis true,rk3572_combphy_cfg()sets BIT(5) in register offset0x20<< 2 viarockchip_combphy_updatel(). Immediately afterwards, whenpriv->type==PHY_TYPE_PCIEand rate == 24000000, thiswritel()overwrites the entire register at0x20<< 2 with0x10, clearing BIT(5) back to 0.
Quoted 5 lines
Should both this write and the
writel(0x10, priv->mmio + (0x20 << 2))in thepriv->ext_refclkblock above userockchip_combphy_updatel()withGENMASK(4, 2)instead, matching how the 24 MHz and 100 MHzPHY_TYPE_PCIEcases update the PLL KVCO tuning field earlier inrk3572_combphy_cfg()?
Looks valid.
- Mani
PATCH 23/27 usb: dwc3: Configure RK3572 PIPE port before discovery
In reply to Cunhao LuFirmware may leave the USB3 PIPE port disabled, causing DWC3 to discover only USB2. Configure the port before reading controller capabilities.
--- drivers/usb/dwc3/dwc3-generic-plat.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
drivers/usb/dwc3/dwc3-generic-plat.c +31 -0
@@ -22,6 +22,10 @@#define EIC7700_HSP_AXI_LP_XM_CSYSREQ BIT(0)#define EIC7700_HSP_AXI_LP_XS_CSYSREQ BIT(16) +#define RK3572_PIPE_USB3 0x1100 +#define RK3572_PIPE_USB2_ONLY 0x0189 +#define RK3572_PIPE_WRITE_MASK GENMASK(31, 16) +struct dwc3_generic {struct device *dev;struct dwc3 dwc;
@@ -85,6 +89,27 @@ static int dwc3_spacemit_k1_init(struct dwc3_generic *dwc3g)return 0 ; } +static int dwc3_rk3572_init (struct dwc3_generic *dwc3g) +{ +struct device *dev = dwc3g->dev; +enum usb_device_speed speed =usb_get_maximum_speed (dev); +struct regmap *grf; +u32 offset, value =RK3572_PIPE_USB2_ONLY ; + + grf =syscon_regmap_lookup_by_phandle_args (dev->of_node,"rockchip,grf" , +1 , &offset); +if (IS_ERR (grf)) +return dev_err_probe (dev,PTR_ERR (grf),"failed to get PHP GRF\n" ); + +if (device_property_match_string (dev,"phy-names" ,"usb3-phy" ) >=0 && + speed !=USB_SPEED_LOW && speed !=USB_SPEED_FULL && + speed !=USB_SPEED_HIGH ) + value =RK3572_PIPE_USB3 ; + +/* Configure the PIPE port before the core reads its port count. */ +return regmap_write (grf, offset,RK3572_PIPE_WRITE_MASK | value); +} +static int dwc3_generic_probe (struct platform_device *pdev) {const struct dwc3_generic_config *plat_config;
@@ -231,11 +256,17 @@ static const struct dwc3_generic_config eic7700_dwc3 = { .properties = DWC3_DEFAULT_PROPERTIES, }; +static const struct dwc3_generic_config rk3572_dwc3 = { + .init = dwc3_rk3572_init, + .properties =DWC3_DEFAULT_PROPERTIES , +}; +static const struct of_device_id dwc3_generic_of_match[] = { { .compatible ="spacemit,k1-dwc3" , &spacemit_k1_dwc3}, { .compatible ="spacemit,k3-dwc3" , }, { .compatible ="fsl,ls1028a-dwc3" , &fsl_ls1028_dwc3}, { .compatible ="eswin,eic7700-dwc3" , &eic7700_dwc3}, + { .compatible ="rockchip,rk3572-dwc3" , &rk3572_dwc3 }, { .compatible ="starfive,jhb100-dwc3" , }, {/* sentinel */ } };
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 23/27] usb: dwc3: Configure RK3572 PIPE port before discovery
Sashiko has reviewed this patch and found no issues.
Quoted 6 lines
From: Cunhao Lu <[email protected]>
Firmware may leave the USB3 PIPE port disabled, causing DWC3 to discover only USB2. Configure the port before reading controller capabilities.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=23
Thinh Nguyen
maintainerRe: [PATCH 23/27] usb: dwc3: Configure RK3572 PIPE port before discovery
In reply to Cunhao LuQuoted 34 lines · On Thu, Oct 22, 2026, Cunhao Lu via B4 Relay wrote:
From: Cunhao Lu <[email protected]>
Firmware may leave the USB3 PIPE port disabled, causing DWC3 to discover only USB2. Configure the port before reading controller capabilities.
Signed-off-by Cunhao Lu <[email protected]>--- drivers/usb/dwc3/dwc3-generic-plat.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)drivers/usb/dwc3/dwc3-generic-plat.c +9
-0@@ -22,6 +22,10 @@#define EIC7700_HSP_AXI_LP_XM_CSYSREQ BIT(0)#define EIC7700_HSP_AXI_LP_XS_CSYSREQ BIT(16) +#define RK3572_PIPE_USB3 0x1100 +#define RK3572_PIPE_USB2_ONLY 0x0189 +#define RK3572_PIPE_WRITE_MASK GENMASK(31, 16) +struct dwc3_generic {struct device *dev;struct dwc3 dwc;@@ -85,6 +89,27 @@ static int dwc3_spacemit_k1_init(struct dwc3_generic *dwc3g)return 0 ; } +static int dwc3_rk3572_init (struct dwc3_generic *dwc3g) +{ +struct device *dev = dwc3g->dev; +enum usb_device_speed speed =usb_get_maximum_speed (dev); +struct regmap *grf;
drivers/usb/dwc3/dwc3-generic-plat.c static int dwc3_spacemit_k1_init(struct dwc3_generic *dwc3g) · line 106
Quoted 10 lines
drivers/usb/dwc3/dwc3-generic-plat.c +10
-0+u32 offset, value =RK3572_PIPE_USB2_ONLY ; + + grf =syscon_regmap_lookup_by_phandle_args (dev->of_node,"rockchip,grf" , +1 , &offset); +if (IS_ERR (grf)) +return dev_err_probe (dev,PTR_ERR (grf),"failed to get PHP GRF\n" ); + +if (device_property_match_string (dev,"phy-names" ,"usb3-phy" ) >=0 && + speed !=USB_SPEED_LOW && speed !=USB_SPEED_FULL && + speed !=USB_SPEED_HIGH )
This can just be:
if (device_property_match_string(dev, "phy-names", "usb3-phy") >= 0 && (speed == USB_SPEED_UNKNOWN || speed >= USB_SPEED_SUPER))
drivers/usb/dwc3/dwc3-generic-plat.c static int dwc3_spacemit_k1_init(struct dwc3_generic *dwc3g) · line 112
Quoted 6 lines
drivers/usb/dwc3/dwc3-generic-plat.c +6
-0+ value =RK3572_PIPE_USB3 ; + +/* Configure the PIPE port before the core reads its port count. */ +return regmap_write (grf, offset,RK3572_PIPE_WRITE_MASK | value); +} +
This looks like something that can be done in the phy driver. The other Rockchip platforms such as RK3588 do this in the phy right? Why it must be here?
BR,
Thinh
Re: [PATCH 23/27] usb: dwc3: Configure RK3572 PIPE port before discovery
Hi,
Quoted 3 lines
This can just be:
if (device_property_match_string(dev, "phy-names", "usb3-phy")>= 0 &&(speed == USB_SPEED_UNKNOWN || speed >= USB_SPEED_SUPER))
Agreed. This glue-side check will be removed with the helper when the configuration moves to the PHY drivers.
Quoted 3 lines
This looks like something that can be done in the phy driver. The other Rockchip platforms such as RK3588 do this in the phy right? Why it must be here?
You are right. I checked the RK3572 hardware capabilities and tested a PHY-based implementation on the OK3572-C. Both controllers report DRD capability, so DWC3 uses one USB2 and one USB3 port rather than taking the host-only port-discovery path. On USB1, USB3 PHY initialization is still called with the PIPE port disabled. My original reason for placing this before DWC3 core probe was incorrect.
I will fix this issue in v2.
Best regards,
Cunhao Lu
PATCH 24/27 mmc: dw_mmc-rockchip: Keep RK3572 NVM domain powered
In reply to Cunhao LuPower cycling the RK3572 NVM domain causes repeated SD recovery. Keep it powered during runtime suspend without disabling controller runtime PM.
--- drivers/mmc/host/dw_mmc-rockchip.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
drivers/mmc/host/dw_mmc-rockchip.c +24 -0
@@ -10,6 +10,7 @@#include <linux/mmc/host.h> #include <linux/of_address.h> #include <linux/mmc/slot-gpio.h> +#include <linux/pm_domain.h> #include <linux/pm_runtime.h> #include <linux/slab.h>
@@ -528,6 +529,19 @@ static int dw_mci_rockchip_init(struct dw_mci *host)return 0 ; } +static int dw_mci_rk3572_init (struct dw_mci *host) +{ +int ret; + +/* Power cycling the NVM domain disrupts SDMMC recovery. */ + ret =dev_pm_genpd_rpm_always_on (host->dev, true); +if (ret && ret != -EOPNOTSUPP ) +dev_warn (host->dev,"failed to keep power domain on: %pe\n" , +ERR_PTR (ret)); + +return dw_mci_rockchip_init (host); +} +static const struct dw_mci_drv_data rk2928_drv_data = { .init = dw_mci_rockchip_init, .parse_dt = dw_mci_rk2928_parse_dt,
@@ -541,6 +555,14 @@ static const struct dw_mci_drv_data rk3288_drv_data = { .init = dw_mci_rockchip_init, }; +static const struct dw_mci_drv_data rk3572_drv_data = { + .common_caps =MMC_CAP_CMD23 , + .set_ios = dw_mci_rk3288_set_ios, + .execute_tuning = dw_mci_rk3288_execute_tuning, + .parse_dt = dw_mci_rk3576_parse_dt, + .init = dw_mci_rk3572_init, +}; +static const struct dw_mci_drv_data rk3576_drv_data = { .common_caps =MMC_CAP_CMD23 , .set_ios = dw_mci_rk3288_set_ios,
@@ -554,6 +576,8 @@ static const struct of_device_id dw_mci_rockchip_match[] = { .data = &rk2928_drv_data }, { .compatible = "rockchip,rk3288-dw-mshc", .data = &rk3288_drv_data }, + { .compatible = "rockchip,rk3572-dw-mshc", + .data = &rk3572_drv_data }, { .compatible = "rockchip,rk3576-dw-mshc", .data = &rk3576_drv_data }, {},
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 24/27] mmc: dw_mmc-rockchip: Keep RK3572 NVM domain powered
Sashiko has reviewed this patch and found no issues.
Quoted 6 lines
From: Cunhao Lu <[email protected]>
Power cycling the RK3572 NVM domain causes repeated SD recovery. Keep it powered during runtime suspend without disabling controller runtime PM.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=24
Shawn Lin
maintainerRe: [PATCH 24/27] mmc: dw_mmc-rockchip: Keep RK3572 NVM domain powered
In reply to Cunhao LuHi Cunhao,
Quoted 5 lines · 在 2026/10/22 星期四 0:11, Cunhao Lu via B4 Relay 写道:
From: Cunhao Lu <[email protected]>
Power cycling the RK3572 NVM domain causes repeated SD recovery. Keep it powered during runtime suspend without disabling controller runtime PM.
Before your v2 about this path, I would like to ask why you need this? The dw_mmc-rockchip controller is always under A power domain on every SoC, none of the predecessors need this kind of change. If you see some errors during RPM, perhaps you should have a look[1] and check your DTS.
[1] https://lore.kernel.org/linux-mmc/[email protected]/
Quoted 62 lines
Signed-off-by Cunhao Lu <[email protected]>--- drivers/mmc/host/dw_mmc-rockchip.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)drivers/mmc/host/dw_mmc-rockchip.c +24
-0@@ -10,6 +10,7 @@#include <linux/mmc/host.h> #include <linux/of_address.h> #include <linux/mmc/slot-gpio.h> +#include <linux/pm_domain.h> #include <linux/pm_runtime.h> #include <linux/slab.h> @@ -528,6 +529,19 @@ static int dw_mci_rockchip_init(struct dw_mci *host)return 0 ; } +static int dw_mci_rk3572_init (struct dw_mci *host) +{ +int ret; + +/* Power cycling the NVM domain disrupts SDMMC recovery. */ + ret =dev_pm_genpd_rpm_always_on (host->dev, true); +if (ret && ret != -EOPNOTSUPP ) +dev_warn (host->dev,"failed to keep power domain on: %pe\n" , +ERR_PTR (ret)); + +return dw_mci_rockchip_init (host); +} +static const struct dw_mci_drv_data rk2928_drv_data = { .init = dw_mci_rockchip_init, .parse_dt = dw_mci_rk2928_parse_dt,@@ -541,6 +555,14 @@ static const struct dw_mci_drv_data rk3288_drv_data = { .init = dw_mci_rockchip_init, }; +static const struct dw_mci_drv_data rk3572_drv_data = { + .common_caps =MMC_CAP_CMD23 , + .set_ios = dw_mci_rk3288_set_ios, + .execute_tuning = dw_mci_rk3288_execute_tuning, + .parse_dt = dw_mci_rk3576_parse_dt, + .init = dw_mci_rk3572_init, +}; +static const struct dw_mci_drv_data rk3576_drv_data = { .common_caps =MMC_CAP_CMD23 , .set_ios = dw_mci_rk3288_set_ios,@@ -554,6 +576,8 @@ static const struct of_device_id dw_mci_rockchip_match[] = { .data = &rk2928_drv_data }, { .compatible = "rockchip,rk3288-dw-mshc", .data = &rk3288_drv_data }, + { .compatible = "rockchip,rk3572-dw-mshc", + .data = &rk3572_drv_data }, { .compatible = "rockchip,rk3576-dw-mshc", .data = &rk3576_drv_data }, {},
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Re: [PATCH 24/27] mmc: dw_mmc-rockchip: Keep RK3572 NVM domain powered
Hi Shawn,
Quoted 5 lines
Before your v2 about this path, I would like to ask why you need this? The dw_mmc-rockchip controller is always under A power domain on every SoC, none of the predecessors need this kind of change. If you see some errors during RPM, perhaps you should have a look[1] and check your DTS.
Thank you very much for pointing out my mistake.
I wrote this patch after observing repeated SD card resets and recovery. After several tests, I found that keeping NVM1 powered prevented the problem. I checked the SD supply and pin settings against Forlinx's vendor DTS. The settings matched.
I then searched the mainline history for RK3576 and found its SDHCI workaround that keeps PD_NVM powered. I therefore assumed this was a shared design issue in the RK357x family.
After your email, I carefully reviewed and compared the Forlinx OK3572-C schematic and DTS.
The OK3572-C_Linux6.12.58_Alpha1 BSP incorrectly references RK806 PLDO4 as the SD card supply. The card actually uses a separate 3.3 V supply through a switch controlled by GPIO0_B6. The original DTS uses native PWREN, which loses the enable state when NVM1 powers down.
I incorrectly assumed that Forlinx had validated its vendor kernel and the corresponding device tree.
I am very sorry for this incorrect assumption.
I will report this issue to Forlinx and replace this patch with the DTS fix in the next revision.
Best regards,
Cunhao
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
PATCH 25/27 dt-bindings: arm: rockchip: Add Forlinx OK3572-C
In reply to Cunhao LuThe board uses the FET3572-C system-on-module and falls back to the RK3572 SoC compatible.
--- Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.yaml +6 -0
@@ -331,6 +331,12 @@ properties: - const: forlinx,fet3588-c - const: rockchip,rk3588 + - description: Forlinx OK3572-C with FET3572-C + items: + - const: forlinx,ok3572-c + - const: forlinx,fet3572-c + - const: rockchip,rk3572 + - description: FriendlyElec NanoPi R2 series boards items: - enum:
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 25/27] dt-bindings: arm: rockchip: Add Forlinx OK3572-C
Sashiko has reviewed this patch and found no issues.
Quoted 6 lines
From: Cunhao Lu <[email protected]>
The board uses the FET3572-C system-on-module and falls back to the RK3572 SoC compatible.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=25
Re: [PATCH 25/27] dt-bindings: arm: rockchip: Add Forlinx OK3572-C
In reply to Cunhao LuQuoted 8 lines · Cunhao Lu
The board uses the FET3572-C system-on-module and falls back to the RK3572 SoC compatible.
Signed-off-by Cunhao Lu <[email protected]>--- Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
PATCH 26/27 arm64: dts: rockchip: Add RK3572 SoC
In reply to Cunhao LuDescribe the RK3572 CPU, SCMI, thermal, pinctrl, and boot-peripheral blocks.
--- arch/arm64/boot/dts/rockchip/rk3572-opp.dtsi | 165 + arch/arm64/boot/dts/rockchip/rk3572-pinctrl.dtsi | 3935 ++++++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk3572.dtsi | 1325 ++++++++ 3 files changed, 5425 insertions(+)
arch/arm64/boot/dts/rockchip/rk3572-opp.dtsi new file +165 -0
@@ -0,0 +1,165 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2025 Rockchip Electronics Co., Ltd. + */ + +/ { + cluster0_opp_table: opp-table-cluster0 { + compatible = "operating-points-v2"; + opp-shared; + + opp-600000000 { + clock-latency-ns = <40000>; + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <850000 850000 950000>; + }; + + opp-816000000 { + clock-latency-ns = <40000>; + opp-hz = /bits/ 64 <816000000>; + opp-microvolt = <850000 850000 950000>; + }; + + opp-1008000000 { + clock-latency-ns = <40000>; + opp-hz = /bits/ 64 <1008000000>; + opp-microvolt = <850000 850000 950000>; + }; + + opp-1200000000 { + clock-latency-ns = <40000>; + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <850000 850000 950000>; + }; + }; + + cluster1_opp_table: opp-table-cluster1 { + compatible = "operating-points-v2"; + opp-shared; + + opp-600000000 { + clock-latency-ns = <40000>; + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <850000 850000 950000>; + }; + + opp-816000000 { + clock-latency-ns = <40000>; + opp-hz = /bits/ 64 <816000000>; + opp-microvolt = <850000 850000 950000>; + }; + + opp-1008000000 { + clock-latency-ns = <40000>; + opp-hz = /bits/ 64 <1008000000>; + opp-microvolt = <850000 850000 950000>; + }; + + opp-1200000000 { + clock-latency-ns = <40000>; + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <850000 850000 950000>; + }; + }; + + cluster2_opp_table: opp-table-cluster2 { + compatible = "operating-points-v2"; + opp-shared; + + opp-600000000 { + clock-latency-ns = <40000>; + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <850000 850000 950000>; + }; + + opp-816000000 { + clock-latency-ns = <40000>; + opp-hz = /bits/ 64 <816000000>; + opp-microvolt = <850000 850000 950000>; + }; + + opp-1008000000 { + clock-latency-ns = <40000>; + opp-hz = /bits/ 64 <1008000000>; + opp-microvolt = <850000 850000 950000>; + }; + + opp-1200000000 { + clock-latency-ns = <40000>; + opp-hz = /bits/ 64 <1200000000>; + opp-microvolt = <850000 850000 950000>; + }; + }; +}; + +&cpu_b0 { + #cooling-cells = <2>; + operating-points-v2 = <&cluster2_opp_table>; +}; + +&cpu_b1 { + operating-points-v2 = <&cluster2_opp_table>; +}; + +&cpu_l0 { + #cooling-cells = <2>; + operating-points-v2 = <&cluster0_opp_table>; +}; + +&cpu_l1 { + operating-points-v2 = <&cluster0_opp_table>; +}; + +&cpu_l2 { + operating-points-v2 = <&cluster0_opp_table>; +}; + +&cpu_l3 { + operating-points-v2 = <&cluster0_opp_table>; +}; + +&cpu_l4 { + #cooling-cells = <2>; + operating-points-v2 = <&cluster1_opp_table>; +}; + +&cpu_l5 { + operating-points-v2 = <&cluster1_opp_table>; +}; + +&big_core_thermal { + cooling-maps { + map0 { + cooling-device = + <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + trip = <&big_core_hot>; + }; + }; + + trips { + big_core_hot: big-core-hot { + hysteresis = <2000>; + temperature = <85000>; + type = "passive"; + }; + }; +}; + +&little_core_thermal { + cooling-maps { + map0 { + cooling-device = + <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu_l4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + trip = <&little_core_hot>; + }; + }; + + trips { + little_core_hot: little-core-hot { + hysteresis = <2000>; + temperature = <85000>; + type = "passive"; + }; + }; +};
arch/arm64/boot/dts/rockchip/rk3572-pinctrl.dtsi new file +3935 -0
2,835 lines not on this page · raw message
arch/arm64/boot/dts/rockchip/rk3572.dtsi new file +1325 -0
1,325 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.34.1
Part of the diff is not shown here. View the raw message.
[email protected]
AI reviewRe: [PATCH 26/27] arm64: dts: rockchip: Add RK3572 SoC
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] arm64: dts: rockchip: duplicate pdmm1-clk*-idle node names in rk3572-pinctrl - [Medium] arm64…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] arm64: dts: rockchip: duplicate pdmm1-clk*-idle node names in rk3572-pinctrl
- [Medium] arm64: dts: rockchip: missing pixel clock pin in rk3572 rgb3x8_pins_m1 --
commit 187a63c766133c9d7856a97e9575a5f3703cf119
Author: Cunhao Lu <[email protected]>
arm64: dts: rockchip: Add RK3572 SoC
This commit adds the base device tree files for the Rockchip rk3572, including the operating points, pinctrl definitions, and peripheral nodes.
Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3572-pinctrl.dtsi new file +0
-0@@ -0,0 +1,3935 @@
[ ... ]
Quoted 51 lines
arch/arm64/boot/dts/rockchip/rk3572-pinctrl.dtsi new file +51
-0+ pdm { + /omit-if-no-ref/ + pdmm0_clk0_idle: pdmm0-clk0-idle { + rockchip,pins = + <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + pdmm0_clk1_idle: pdmm0-clk1-idle { + rockchip,pins = + <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + pdmm1_clk0_idle: pdmm1-clk0-idle { + rockchip,pins = + <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + pdmm1_clk1_idle: pdmm1-clk1-idle { + rockchip,pins = + <2 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + pdmm2_clk0_idle: pdmm1-clk0-idle { + rockchip,pins = + <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + pdmm2_clk1_idle: pdmm1-clk1-idle { + rockchip,pins = + <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + pdmm3_clk0_idle: pdmm1-clk0-idle { + rockchip,pins = + <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + pdmm3_clk1_idle: pdmm1-clk1-idle { + rockchip,pins = + <2 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + pdmm4_clk0_idle: pdmm1-clk0-idle {
arch/arm64/boot/dts/rockchip/rk3572-pinctrl.dtsi line 3770
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3572-pinctrl.dtsi new file +10
-0+ rockchip,pins = + <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + pdmm4_clk1_idle: pdmm1-clk1-idle { + rockchip,pins = + <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + };
[Severity: Medium]
Should the node names for pdmm2_clk0_idle, pdmm3_clk0_idle, and pdmm4_clk0_idle under the pdm node in rk3572-pinctrl.dtsi be pdmm2-clk0-idle, pdmm3-clk0-idle, and pdmm4-clk0-idle (and likewise for the clk1-idle nodes), rather than repeating pdmm1-clk0-idle and pdmm1-clk1-idle?
Because these sibling nodes share the same node names under the pdm parent, dtc merges them into a single pdmm1-clk0-idle node and a single pdmm1-clk1-idle node, overwriting rockchip,pins with the values from pdmm4_clk0_idle and pdmm4_clk1_idle when any of the pdmm1, pdmm2, or pdmm3 idle clock pinctrl phandles are referenced.
[ ... ]
Quoted 1 line
arch/arm64/boot/dts/rockchip/rk3572-pinctrl.dtsi new file +1
-0+ vo {
[ ... ]
Quoted 22 lines
arch/arm64/boot/dts/rockchip/rk3572-pinctrl.dtsi new file +22
-0+ /omit-if-no-ref/ + rgb3x8_pins_m0: rgb3x8-pins-m0 { + rockchip,pins = + <3 RK_PD7 3 &pcfg_pull_none>, + <3 RK_PD0 3 &pcfg_pull_none>, + <3 RK_PC7 3 &pcfg_pull_none>, + <3 RK_PC6 3 &pcfg_pull_none>, + <3 RK_PC5 3 &pcfg_pull_none>, + <3 RK_PC4 3 &pcfg_pull_none>, + <3 RK_PC1 3 &pcfg_pull_none>, + <3 RK_PC0 3 &pcfg_pull_none>, + <3 RK_PB7 3 &pcfg_pull_none>, + <3 RK_PD4 3 &pcfg_pull_none>, + <3 RK_PD5 3 &pcfg_pull_none>, + <3 RK_PD6 3 &pcfg_pull_none>; + }; + + /omit-if-no-ref/ + rgb3x8_pins_m1: rgb3x8-pins-m1 { + rockchip,pins = + <3 RK_PB6 3 &pcfg_pull_none>, + <3 RK_PB5 3 &pcfg_pull_none>,
arch/arm64/boot/dts/rockchip/rk3572-pinctrl.dtsi line 3848
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3572-pinctrl.dtsi new file +10
-0+ <3 RK_PB4 3 &pcfg_pull_none>, + <3 RK_PB0 3 &pcfg_pull_none>, + <3 RK_PA7 3 &pcfg_pull_none>, + <3 RK_PA6 3 &pcfg_pull_none>, + <3 RK_PA5 3 &pcfg_pull_none>, + <3 RK_PA4 3 &pcfg_pull_none>, + <3 RK_PD4 3 &pcfg_pull_none>, + <3 RK_PD5 3 &pcfg_pull_none>, + <3 RK_PD6 3 &pcfg_pull_none>; + };
[Severity: Medium]
Is rgb3x8_pins_m1 under the vo node in rk3572-pinctrl.dtsi missing the <3 RK_PD7 3 &pcfg_pull_none> pixel clock pin?
rgb3x8_pins_m0 and the other display pin groups (vo_lcdc_pins, bt1120_pins, bt656_pins, rgb565_pins, rgb666_pins, and rgb888_pins) all include this pin alongside their data and sync pins, whereas rgb3x8_pins_m1 only lists the 8 data pins and 3 sync pins.
[ ... ]
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=26
PATCH 27/27 arm64: dts: rockchip: Add initial support for Forlinx OK3572-C
In reply to Cunhao LuDescribe the OK3572-C carrier board and FET3572-C system-on-module.
--- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../dts/rockchip/rk3572-forlinx-fet3572-c.dtsi | 369 +++++++++++++++++++++ .../boot/dts/rockchip/rk3572-forlinx-ok3572-c.dts | 286 ++++++++++++++++ 3 files changed, 656 insertions(+)
arch/arm64/boot/dts/rockchip/Makefile +1 -0
@@ -168,6 +168,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3b.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-display-vz.dtbo dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-wolfvision-pf5-io-expander.dtbo +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3572-forlinx-ok3572-c.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-100ask-dshanpi-a1.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-anbernic-rg-vita-pro.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3576-armsom-cm5-io.dtb
arch/arm64/boot/dts/rockchip/rk3572-forlinx-fet3572-c.dtsi new file +369 -0
369 lines not on this page · raw message
arch/arm64/boot/dts/rockchip/rk3572-forlinx-ok3572-c.dts new file +286 -0
286 lines not on this page · raw message
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH 27/27] arm64: dts: rockchip: Add initial support for Forlinx OK3572-C
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
From: Cunhao Lu <[email protected]>
Describe the OK3572-C carrier board and FET3572-C system-on-module.
Signed-off-by Cunhao Lu <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=27
Shawn Lin
maintainerHi Cunhao,
Quoted 4 lines · 在 2026/10/22 星期四 0:10, Cunhao Lu via B4 Relay 写道:
This series adds initial support for the RK3572 SoC and the Forlinx OK3572-C board. It includes the bindings, drivers, and device trees needed to bring up a minimal system.
Thanks for your patches. Typically, a series of this size covering SoC support should be split by subsystem,for instance, separate DT binding and driver patches for each subsystem,and only CC the relevant maintainers and mailing lists. The DTS patch can follow afterwards.
Quoted 653 lines
The RK3572 SoC has eight CPU cores: two Cortex-A73 cores and six Cortex-A53 cores. It also integrates an Arm Mali-G310V2 MC1 GPU. The OK3572-C board provides two Gigabit Ethernet ports, three USB3 Type-A ports, a Type-C dual-role port, eMMC, microSD, and UART.
Testing was performed with Debian 13 minimal and Linux 7.3 on the OK3572-C with the FET3572-C module. Shared peripheral tests were run with the system booted from SD, while eMMC validation covered the complete boot chain.
Passed functionality:unhao
- SD and eMMC complete the firmware, kernel, and root filesystem boot chain.
- UART console works at 1500000 baud.
- SD read/write and data persistence checks pass.
- All eight CPUs start; CPU frequency scaling and hotplug checks pass.
- Both Ethernet ports obtain IPv4 addresses and pass bidirectional file transfers.
- All three Type-A ports pass USB2 and USB3 enumeration, data transfers, and reconnect persistence checks.
- Type-C host and device modes pass in both plug orientations. Physical reconnects correctly select the expected device, host, and device roles in sequence.Stability:
- Repeated cold and software reboots complete on SD and eMMC without data integrity failures.
- A combined CPU, memory, network, SD, and USB3 stress test completes without a crash, lockup, CPU offline event, or thermal shutdown.
- Ethernet error and drop counters do not increase during bidirectional network tests.Build and checks:
- The kernel, modules, and board DTB build successfully.
- The series passes checkpatch with --strict; only generic reminders about newMAINTAINERSentries remain.Untested hardware and paths:
- NPU
- PCIe
- GPU, video output, and audio
- CPU rates above 1.2 GHz and voltage scaling
- Other low-speed external interfacesSome files in this series are derived from the Forlinx OK3572-C BSP Alpha1. Thanks to Forlinx for their support.
AI assistance:
- Codex / DeepSeek V4.1 Flash were used for:
- Collecting data
- Automating tests
- Reviewing and adjusting code to follow community conventionsSigned-off-by Cunhao Lu <[email protected]>---
Raw dmesg from the OK3572-C boot:[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 7.3.0-bleedingedge-rk3572 (build@armbian) (aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #1 SMP PREEMPT Wed Oct 21 14:04:07 CST 2026 [ 0.000000] Machine model: Forlinx OK3572-C [ 0.000000] efi: UEFI not found. [ 0.000000] OF: reserved mem: Reserved memory: No reserved-memory node in the DT [ 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.5 [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000040200000-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 0x0000000040200000-0x000000013fffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000040200000-0x000000013fffffff] [ 0.000000] On node 0, zone DMA: 512 pages in unavailable ranges [ 0.000000] percpu: Embedded 30 pages/cpu s82136 r8192 d32552 u122880 [ 0.000000] pcpu-alloc: s82136 r8192 d32552 u122880 alloc=30*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [0] 4 [0] 5 [0] 6 [0] 7 [ 0.000000] CPU features: detected: ARM erratum 845719 [ 0.000000] alternatives: applying boot alternatives [ 0.000000] Kernel command line: root=UUID=2520cc50-b3ea-430f-ba9b-552afa4b6f82 rootwait rootfstype=ext4 splash=verbose console=ttyS0,1500000 console=tty1 consoleblank=0 loglevel=1 ubootpart=48cd0da4-4dfb-4b7c-b03f-e4a0c57ddacd usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory [ 0.000000] Unknown kernel command line parameters "splash=verbose ubootpart=48cd0da4-4dfb-4b7c-b03f-e4a0c57ddacd cgroup_enable=memory cgroup_memory=1", will be passed to user space. [ 0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes [ 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] software IO TLB: area num 8. [ 0.000000] software IO TLB: mapped [mem 0x00000000f7f47000-0x00000000fbf47000] (64MB) [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 1048064 [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1 [ 0.000000] ftrace: allocating 40216 entries in 158 pages [ 0.000000] ftrace: allocated 158 pages with 5 groups [ 0.000000] rcu: Hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] Rude variant of Tasks RCU enabled. [ 0.000000] Tracing variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] RCU Tasks: Setting shift to 3 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=8. [ 0.000000] RCU Tasks Rude: Setting shift to 3 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=8. [ 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.000502] Console: colour dummy device 80x25 [ 0.000516] printk: legacy console [tty1] enabled [ 0.000637] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000) [ 0.000652] pid_max: default: 32768 minimum: 301 [ 0.000874] Yama: becoming mindful. [ 0.001075] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.001097] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear) [ 0.001450] VFS: Finished mounting rootfs on nullfs [ 0.004025] rcu: Hierarchical SRCU implementation. [ 0.004042] rcu: Max phase no-delay instances is 1000. [ 0.004294] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level [ 0.004820] EFI services will not be available. [ 0.005261] smp: Bringing up secondary CPUs ... [ 0.006096] CPU1: Booted secondary processor 0x0000000001 [0x410fd034] [ 0.006991] CPU2: Booted secondary processor 0x0000000002 [0x410fd034] [ 0.007847] CPU3: Booted secondary processor 0x0000000003 [0x410fd034] [ 0.008787] CPU4: Booted secondary processor 0x0000000100 [0x410fd034] [ 0.009715] CPU5: Booted secondary processor 0x0000000101 [0x410fd034] [ 0.010446] CPU features: detected: Spectre-BHB [ 0.010459] CPU features: detected: ARM erratum 858921 [ 0.010576] arch_timer: Enabling local workaround for ARM erratum 858921 [ 0.010590] arch_timer: CPU6: Trapping CNTVCT access [ 0.010600] CPU6: Booted secondary processor 0x0000000200 [0x411fd090] [ 0.011335] arch_timer: Enabling local workaround for ARM erratum 858921 [ 0.011346] arch_timer: CPU7: Trapping CNTVCT access [ 0.011354] CPU7: Booted secondary processor 0x0000000201 [0x411fd090] [ 0.011443] smp: Brought up 1 node, 8 CPUs [ 0.011468] SMP: Total of 8 processors activated. [ 0.011473] CPU: All CPU(s) started at EL2 [ 0.011480] CPU features: detected: 32-bit EL0 Support [ 0.011487] CPU features: detected: CRC32 instructions [ 0.011563] alternatives: applying system-wide alternatives [ 0.013503] Memory: 3994400K/4192256K available (12800K kernel code, 1804K rwdata, 8020K rodata, 4800K init, 367K bss, 188600K reserved, 0K cma-reserved) [ 0.014586] devtmpfs: initialized [ 0.023256] posixtimers hash table entries: 4096 (order: 4, 65536 bytes, linear) [ 0.023390] futex hash table entries: 2048 (131072 bytes on 1 NUMA nodes, total 128 KiB, linear). [ 0.023497] 25760 pages in range for non-PLT usage [ 0.023504] 517280 pages in range for PLT usage [ 0.024485] DMI: not present or invalid. [ 0.027105] NET: Registered PF_NETLINK/PF_ROUTE protocol family [ 0.027775] DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations [ 0.027873] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations [ 0.027917] audit: initializing netlink subsys (disabled) [ 0.028106] audit: type=2000 audit(0.024:1): state=initialized audit_enabled=0 res=1 [ 0.063844] thermal_sys: Registered thermal governor 'step_wise' [ 0.063969] ASID allocator initialised with 65536 entries [ 0.066221] /soc/i2c@2c040000/usb-typec@22/connector: Fixed dependency cycle(s) with /soc/usb@24000000 [ 0.066238] /soc/usb@24000000: Fixed dependency cycle(s) with /soc/i2c@2c040000/usb-typec@22/connector [ 0.066401] /soc/interrupt-controller@2a601000: Fixed dependency cycle(s) with /soc/interrupt-controller@2a601000 [ 0.074302] rockchip-gpio 26300000.gpio: probed /pinctrl/gpio@26300000 [ 0.074859] rockchip-gpio 2b200000.gpio: probed /pinctrl/gpio@2b200000 [ 0.075467] rockchip-gpio 2b300000.gpio: probed /pinctrl/gpio@2b300000 [ 0.076065] rockchip-gpio 2b400000.gpio: probed /pinctrl/gpio@2b400000 [ 0.076577] rockchip-gpio 2b500000.gpio: probed /pinctrl/gpio@2b500000 [ 0.079569] iommu: Default domain type: Translated [ 0.079581] iommu: DMA domain TLB invalidation policy: strict mode [ 0.087665] SCSI subsystem initialized [ 0.087800] usbcore: registered new interface driver usbfs [ 0.087825] usbcore: registered new interface driver hub [ 0.087851] usbcore: registered new device driver usb [ 0.087962] pps_core: LinuxPPS API ver. 1 registered [ 0.087967] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]> [ 0.087977] PTP clock support registered [ 0.088046] scmi_core: SCMI protocol bus registered [ 0.088816] vgaarb: loaded [ 0.089111] clocksource: Switched to clocksource arch_sys_counter [ 0.095252] NET: Registered PF_INET protocol family [ 0.095435] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear) [ 0.098401] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear) [ 0.098444] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.098456] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear) [ 0.098599] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear) [ 0.099208] TCP: Hash tables configured (established 32768 bind 32768) [ 0.099320] UDP hash table entries: 2048 (order: 5, 131072 bytes, linear) [ 0.099566] NET: Registered PF_UNIX/PF_LOCAL protocol family [ 0.099609] PCI: CLS 0 bytes, default 64 [ 0.099809] Unpacking initramfs... [ 0.113777] Initialise system trusted keyrings [ 0.114004] workingset: timestamp_bits=46 (anon: 41) max_order=20 bucket_order=0 (anon: 0) [ 0.114534] fuse: init (API version 7.46) [ 0.114817] NET: Registered PF_ALG protocol family [ 0.114828] Key type asymmetric registered [ 0.114833] Asymmetric key parser 'x509' registered [ 0.114866] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249) [ 0.115027] io scheduler mq-deadline registered [ 0.115033] io scheduler kyber registered [ 0.115065] io scheduler bfq registered [ 0.603726] Freeing initrd memory: 13024K [ 0.641317] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 0.642938] printk: console [ttyS0] disabled [ 0.643204] 2c130000.serial: ttyS0 MMIO32:0x000000002c130000 (irq = 36, base_baud = 1500000) is a 16550A [ 0.643447] printk: console [ttyS0] enabled [ 0.649403] loop: module loaded [ 0.650488] tun: Universal TUN/TAP device driver, 1.6 [ 0.657994] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller [ 0.658022] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1 [ 0.658098] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x0000808002000010 [ 0.658139] xhci-hcd xhci-hcd.0.auto: irq 38, io mem 0x24400000 [ 0.658251] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller [ 0.658261] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2 [ 0.658273] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed [ 0.658925] hub 1-0:1.0: USB hub found [ 0.658955] hub 1-0:1.0: 1 port detected [ 0.659569] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. [ 0.659953] hub 2-0:1.0: USB hub found [ 0.659977] hub 2-0:1.0: 1 port detected [ 0.660444] usbcore: registered new interface driver uas [ 0.660501] usbcore: registered new interface driver usb-storage [ 0.660521] usbcore: registered new device driver onboard-usb-dev [ 0.677538] vdda_hdmi_s0: Bringing 750000uV into 837500-837500uV [ 0.691929] pca953x 2-0023: using auto increment [ 0.704405] dwmmc_rockchip 2a090000.mmc: IDMAC supports 32-bit address mode. [ 0.704405] arm-scmi arm-scmi.4.auto: Using scmi_smc_transport [ 0.704420] arm-scmi arm-scmi.4.auto: SCMI max-rx-timeout: 30ms / max-msg-size: 104bytes / max-msg: 20 [ 0.704437] dwmmc_rockchip 2a090000.mmc: Using internal DMA controller. [ 0.704446] dwmmc_rockchip 2a090000.mmc: Version ID is 270a [ 0.704482] dwmmc_rockchip 2a090000.mmc: DW MMC controller at irq 62,32 bit host data width,256 deep fifo [ 0.704546] scmi_protocol scmi_dev.1: Enabled polling mode TX channel - prot_id:16 [ 0.704919] arm-scmi arm-scmi.4.auto: SCMI Notifications - Core Enabled. [ 0.704981] arm-scmi arm-scmi.4.auto: SCMI Protocol v2.0 'rockchip:' Firmware version 0x0 [ 0.705018] arm-scmi arm-scmi.4.auto: Enabling SCMI Quirk [quirk_clock_rates_triplet_out_of_spec] [ 0.705787] mmc0: CQHCI version 5.10 [ 0.708680] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping .... [ 0.708975] usbcore: registered new interface driver usbhid [ 0.708982] usbhid: USB HID core driver [ 0.709386] NET: Registered PF_INET6 protocol family [ 0.710254] Segment Routing with IPv6 [ 0.710294] In-situ OAM (IOAM) with IPv6 [ 0.710341] NET: Registered PF_PACKET protocol family [ 0.710370] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this. [ 0.715466] Loading compiled-in X.509 certificates [ 0.717882] mmc_host mmc1: Bus speed = 400000Hz (req 400000Hz, actual 400000HZ div = 0) [ 0.721073] Key type encrypted registered [ 0.732592] mmc0: SDHCI controller on 2a010000.mmc [2a010000.mmc] using ADMA 64-bit [ 0.737594] dwc3-generic-plat 24400000.usb: Failed to create device link (0x180) with supplier regulator-usb-hub-1v2 for /soc/usb@24400000/hub@2 [ 0.737903] rk_gmac-dwmac 29d20000.ethernet: IRQ sfty not found [ 0.738262] rk_gmac-dwmac 29d20000.ethernet: clock input or output? (output). [ 0.738271] rk_gmac-dwmac 29d20000.ethernet: TX delay(0x21). [ 0.738279] rk_gmac-dwmac 29d20000.ethernet: Can not read property: rx_delay. [ 0.738284] rk_gmac-dwmac 29d20000.ethernet: set rx_delay to 0x10 [ 0.738298] rk_gmac-dwmac 29d20000.ethernet: integrated PHY? (no). [ 0.743326] rk_gmac-dwmac 29d20000.ethernet: init for RGMII_RXID [ 0.743496] rk_gmac-dwmac 29d20000.ethernet: User ID: 0x50, Synopsys ID: 0x51 [ 0.743506] rk_gmac-dwmac 29d20000.ethernet: DWMAC4/5 [ 0.743513] rk_gmac-dwmac 29d20000.ethernet: DMA HW capability register supported [ 0.743519] rk_gmac-dwmac 29d20000.ethernet: Active PHY interface: RGMII (1) [ 0.743525] rk_gmac-dwmac 29d20000.ethernet: RX Checksum Offload Engine supported [ 0.743530] rk_gmac-dwmac 29d20000.ethernet: TX Checksum insertion supported [ 0.743535] rk_gmac-dwmac 29d20000.ethernet: Wake-Up On Lan supported [ 0.743580] rk_gmac-dwmac 29d20000.ethernet: Enable RX Mitigation via HW Watchdog Timer [ 0.743587] rk_gmac-dwmac 29d20000.ethernet: Enabled L3L4 Flow TC (entries=2) [ 0.743594] rk_gmac-dwmac 29d20000.ethernet: Enabled RFS Flow TC (entries=10) [ 0.743599] rk_gmac-dwmac 29d20000.ethernet: TSO supported [ 0.743604] rk_gmac-dwmac 29d20000.ethernet: TSO feature enabled [ 0.743609] rk_gmac-dwmac 29d20000.ethernet: SPH feature enabled [ 0.743614] rk_gmac-dwmac 29d20000.ethernet: Using 40/40 bits DMA host/device width [ 0.801924] sdhci-dwcmshc 2a010000.mmc: Can't reduce the clock below 52MHz in HS200/HS400 mode [ 0.802190] mmc0: Command Queue Engine enabled [ 0.802216] mmc0: new HS400 Enhanced strobe MMC card at address 0001 [ 0.802867] mmcblk0: mmc0:0001 C9A611 58.3 GiB [ 0.806837] mmcblk0: p1 [ 0.807374] mmcblk0boot0: mmc0:0001 C9A611 4.00 MiB [ 0.809014] mmcblk0boot1: mmc0:0001 C9A611 4.00 MiB [ 0.810526] mmcblk0rpmb: mmc0:0001 C9A611 16.0 MiB, chardev (248:0) [ 0.884811] rk_gmac-dwmac 2a040000.ethernet: IRQ sfty not found [ 0.885249] rk_gmac-dwmac 2a040000.ethernet: clock input or output? (output). [ 0.885262] rk_gmac-dwmac 2a040000.ethernet: TX delay(0x20). [ 0.885269] rk_gmac-dwmac 2a040000.ethernet: Can not read property: rx_delay. [ 0.885275] rk_gmac-dwmac 2a040000.ethernet: set rx_delay to 0x10 [ 0.885362] rk_gmac-dwmac 2a040000.ethernet: integrated PHY? (no). [ 0.890392] rk_gmac-dwmac 2a040000.ethernet: init for RGMII_RXID [ 0.890584] rk_gmac-dwmac 2a040000.ethernet: User ID: 0x50, Synopsys ID: 0x51 [ 0.890595] rk_gmac-dwmac 2a040000.ethernet: DWMAC4/5 [ 0.890603] rk_gmac-dwmac 2a040000.ethernet: DMA HW capability register supported [ 0.890608] rk_gmac-dwmac 2a040000.ethernet: Active PHY interface: RGMII (1) [ 0.890615] rk_gmac-dwmac 2a040000.ethernet: RX Checksum Offload Engine supported [ 0.890620] rk_gmac-dwmac 2a040000.ethernet: TX Checksum insertion supported [ 0.890625] rk_gmac-dwmac 2a040000.ethernet: Wake-Up On Lan supported [ 0.890675] rk_gmac-dwmac 2a040000.ethernet: Enable RX Mitigation via HW Watchdog Timer [ 0.890682] rk_gmac-dwmac 2a040000.ethernet: Enabled L3L4 Flow TC (entries=2) [ 0.890693] rk_gmac-dwmac 2a040000.ethernet: Enabled RFS Flow TC (entries=10) [ 0.890699] rk_gmac-dwmac 2a040000.ethernet: TSO supported [ 0.890704] rk_gmac-dwmac 2a040000.ethernet: TSO feature enabled [ 0.890709] rk_gmac-dwmac 2a040000.ethernet: SPH feature enabled [ 0.890714] rk_gmac-dwmac 2a040000.ethernet: Using 40/40 bits DMA host/device width [ 0.913126] usb 1-1: new high-speed USB device number 2 using xhci-hcd [ 1.048394] clk: Disabling unused clocks [ 1.048873] PM: genpd: Disabling unused power domains [ 1.051000] Freeing unused kernel memory: 4800K [ 1.051125] Run /init as init process [ 1.051130] with arguments: [ 1.051134] /init [ 1.051137] with environment: [ 1.051139] HOME=/ [ 1.051141] TERM=linux [ 1.051144] splash=verbose [ 1.051146] ubootpart=48cd0da4-4dfb-4b7c-b03f-e4a0c57ddacd [ 1.051149] cgroup_enable=memory [ 1.051151] cgroup_memory=1 [ 1.106465] hub 1-1:1.0: USB hub found [ 1.106513] hub 1-1:1.0: 4 ports detected [ 1.177969] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd [ 1.218522] hub 2-1:1.0: USB hub found [ 1.218968] hub 2-1:1.0: 4 ports detected [ 1.505447] usb 2-1.2: new SuperSpeed USB device number 3 using xhci-hcd [ 1.528547] usb-storage 2-1.2:1.0: USB Mass Storage device detected [ 1.529653] scsi host0: usb-storage 2-1.2:1.0 [ 1.536346] rk_gmac-dwmac 29d20000.ethernet end0: renamed from eth0 [ 1.537766] rk_gmac-dwmac 2a040000.ethernet end1: renamed from eth1 [ 1.686075] raid6: using neon recovery algorithm [ 1.717069] raid6: int64x1 gen() 847 MB/s [ 1.737837] raid6: int64x2 gen() 1264 MB/s [ 1.752864] raid6: int64x4 gen() 1747 MB/s [ 1.763929] raid6: int64x8 gen() 2371 MB/s [ 1.773319] raid6: neonx1 gen() 2796 MB/s [ 1.781011] raid6: neonx2 gen() 3409 MB/s [ 1.786289] raid6: neonx4 gen() 4970 MB/s [ 1.791806] raid6: neonx8 gen() 4753 MB/s [ 1.791809] raid6: using algorithm neonx4 gen() 4970 MB/s [ 1.794906] raid6: .... xor() 4236 MB/s, rmw enabled [ 1.796085] xor: measuring software checksum speed [ 1.797076] neon : 13380 MB/sec [ 1.798330] 32regs : 10491 MB/sec [ 1.799540] 8regs : 10874 MB/sec [ 1.799542] xor: using function: neon (13380 MB/sec) [ 1.849991] Btrfs loaded, zoned=no, fsverity=no [ 1.937396] EXT4-fs (mmcblk0p1): mounted filesystem 2520cc50-b3ea-430f-ba9b-552afa4b6f82 ro with writeback data mode. Quota mode: disabled. [ 2.097144] usb 1-1.3: new high-speed USB device number 3 using xhci-hcd [ 2.124255] systemd[1]: System time advanced to timestamp on /var/lib/systemd/timesync/clock: Wed 2026-10-21 09:39:33 UTC [ 2.159722] systemd[1]: systemd 257.13-1~deb13u1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +IPE +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBCRYPTSETUP_PLUGINS +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +BTF -XKBCOMMON -UTMP +SYSVINIT +LIBARCHIVE) [ 2.159752] systemd[1]: Detected architecture arm64. [ 2.187497] usb-storage 1-1.3:1.0: USB Mass Storage device detected [ 2.187840] scsi host1: usb-storage 1-1.3:1.0 [ 2.304474] systemd[1]: bpf-restrict-fs: BPF LSM hook not enabled in the kernel, BPF LSM not supported. [ 2.333489] dw-apb-uart 2c130000.serial: forbid DMA for kernel console [ 2.561278] scsi 0:0:0:0: Direct-Access Generic MassStorageClass 2962 PQ: 0 ANSI: 6 [ 2.562581] sd 0:0:0:0: [sda] Media removed, stopped polling [ 2.563353] systemd[1]: Queued start job for default target graphical.target. [ 2.564595] scsi 0:0:0:1: Direct-Access Generic MassStorageClass 2962 PQ: 0 ANSI: 6 [ 2.568510] systemd[1]: Created slice system-getty.slice - Slice /system/getty. [ 2.570149] systemd[1]: Created slice system-modprobe.slice - Slice /system/modprobe. [ 2.571561] systemd[1]: Created slice system-serial\x2dgetty.slice - Slice /system/serial-getty. [ 2.572692] systemd[1]: Created slice user.slice - User and Session Slice. [ 2.573163] systemd[1]: Started systemd-ask-password-console.path - Dispatch Password Requests to Console Directory Watch. [ 2.573510] systemd[1]: Started systemd-ask-password-wall.path - Forward Password Requests to Wall Directory Watch. [ 2.573797] systemd[1]: proc-sys-fs-binfmt_misc.automount - Arbitrary Executable File Formats File System Automount Point skipped, unmet condition check ConditionPathExists=/proc/sys/fs/binfmt_misc [ 2.573881] systemd[1]: Expecting device dev-ttyS0.device - /dev/ttyS0... [ 2.574097] systemd[1]: Reached target paths.target - Path Units. [ 2.574254] systemd[1]: Reached target remote-fs.target - Remote File Systems. [ 2.574386] systemd[1]: Reached target slices.target - Slice Units. [ 2.574522] systemd[1]: Reached target swap.target - Swaps. [ 2.575001] systemd[1]: Listening on syslog.socket - Syslog Socket. [ 2.577411] systemd[1]: Listening on systemd-creds.socket - Credential Encryption/Decryption. [ 2.577941] systemd[1]: Listening on systemd-initctl.socket - initctl Compatibility Named Pipe. [ 2.578412] systemd[1]: Listening on systemd-journald-dev-log.socket - Journal Socket (/dev/log). [ 2.578959] systemd[1]: Listening on systemd-journald.socket - Journal Sockets. [ 2.579632] systemd[1]: Listening on systemd-networkd.socket - Network Service Netlink Socket. [ 2.579893] systemd[1]: systemd-pcrextend.socket - TPM PCR Measurements skipped, unmet condition check ConditionSecurity=measured-uki [ 2.579945] systemd[1]: systemd-pcrlock.socket - Make TPM PCR Policy skipped, unmet condition check ConditionSecurity=measured-uki [ 2.580276] systemd[1]: Listening on systemd-udevd-control.socket - udev Control Socket. [ 2.580707] systemd[1]: Listening on systemd-udevd-kernel.socket - udev Kernel Socket. [ 2.581241] systemd[1]: dev-hugepages.mount - Huge Pages File System skipped, unmet condition check ConditionPathExists=/sys/kernel/mm/hugepages [ 2.584057] systemd[1]: Mounting dev-mqueue.mount - POSIX Message Queue File System... [ 2.586938] systemd[1]: Mounting run-lock.mount - Legacy Locks Directory /run/lock... [ 2.589826] systemd[1]: Mounting sys-kernel-debug.mount - Kernel Debug File System... [ 2.592783] systemd[1]: Mounting sys-kernel-tracing.mount - Kernel Trace File System... [ 2.593548] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 2.596003] systemd[1]: Starting fake-hwclock-load.service - Restore the current clock... [ 2.600570] systemd[1]: Starting keyboard-setup.service - Set the console keyboard layout... [ 2.604814] systemd[1]: Starting kmod-static-nodes.service - Create List of Static Device Nodes... [ 2.613686] systemd[1]: Starting [email protected] - Load Kernel Module configfs... [ 2.617598] systemd[1]: Starting [email protected] - Load Kernel Module drm... [ 2.626158] systemd[1]: Starting modprobe@efi_pstore.service - Load Kernel Module efi_pstore... [ 2.633752] systemd[1]: Starting [email protected] - Load Kernel Module fuse... [ 2.634121] systemd[1]: netplan-ovs-cleanup.service - OpenVSwitch configuration for cleanup skipped, unmet condition check ConditionFileIsExecutable=/usr/bin/ovs-vsctl [ 2.634358] systemd[1]: systemd-hibernate-clear.service - Clear Stale Hibernate Storage Info skipped, unmet condition check ConditionPathExists=/sys/firmware/efi/efivars/HibernateLocation-8cf2644b-4b0b-428f-9387-6d876050dc67 [ 2.639834] systemd[1]: Starting systemd-modules-load.service - Load Kernel Modules... [ 2.643700] systemd[1]: Starting systemd-network-generator.service - Generate Network Units from Kernel Command Line... [ 2.644139] systemd[1]: systemd-pcrmachine.service - TPM PCR Machine ID Measurement skipped, unmet condition check ConditionSecurity=measured-uki [ 2.644383] systemd[1]: systemd-tpm2-setup-early.service - Early TPM SRK Setup skipped, unmet condition check ConditionSecurity=measured-uki [ 2.648310] systemd[1]: Starting systemd-udev-load-credentials.service - Load udev Rules from Credentials... [ 2.652281] systemd[1]: Starting systemd-udev-trigger.service - Coldplug All udev Devices... [ 2.661621] systemd[1]: Mounted dev-mqueue.mount - POSIX Message Queue File System. [ 2.663368] systemd[1]: Mounted run-lock.mount - Legacy Locks Directory /run/lock. [ 2.664501] systemd[1]: Mounted sys-kernel-debug.mount - Kernel Debug File System. [ 2.665462] systemd[1]: Mounted sys-kernel-tracing.mount - Kernel Trace File System. [ 2.666583] systemd[1]: fake-hwclock-load.service: Deactivated successfully. [ 2.667169] systemd[1]: Finished fake-hwclock-load.service - Restore the current clock. [ 2.668734] systemd[1]: Finished kmod-static-nodes.service - Create List of Static Device Nodes. [ 2.669954] systemd[1]: [email protected]: Deactivated successfully. [ 2.670577] systemd[1]: Finished [email protected] - Load Kernel Module configfs. [ 2.671875] systemd[1]: [email protected]: Deactivated successfully. [ 2.672499] systemd[1]: Finished [email protected] - Load Kernel Module drm. [ 2.673859] systemd[1]: modprobe@efi_pstore.service: Deactivated successfully. [ 2.674460] systemd[1]: Finished modprobe@efi_pstore.service - Load Kernel Module efi_pstore. [ 2.675669] systemd[1]: [email protected]: Deactivated successfully. [ 2.676291] systemd[1]: Finished [email protected] - Load Kernel Module fuse. [ 2.683474] systemd[1]: Mounting sys-fs-fuse-connections.mount - FUSE Control File System... [ 2.686792] systemd[1]: Mounting sys-kernel-config.mount - Kernel Configuration File System... [ 2.687022] systemd[1]: systemd-fsck-root.service - File System Check on Root Device skipped, unmet condition check ConditionPathExists=!/run/initramfs/fsck-root [ 2.697694] systemd[1]: Starting systemd-remount-fs.service - Remount Root and Kernel File Systems... [ 2.705654] systemd[1]: Starting systemd-tmpfiles-setup-dev-early.service - Create Static Device Nodes in /dev gracefully... [ 2.708619] systemd[1]: Finished systemd-modules-load.service - Load Kernel Modules. [ 2.714637] systemd[1]: Finished systemd-network-generator.service - Generate Network Units from Kernel Command Line. [ 2.719008] systemd[1]: Finished systemd-udev-load-credentials.service - Load udev Rules from Credentials. [ 2.721423] systemd[1]: Mounted sys-fs-fuse-connections.mount - FUSE Control File System. [ 2.722109] systemd[1]: Reached target network-pre.target - Preparation for Network. [ 2.725804] systemd[1]: Starting systemd-sysctl.service - Apply Kernel Variables... [ 2.727801] systemd[1]: Mounted sys-kernel-config.mount - Kernel Configuration File System. [ 2.772223] systemd[1]: Finished systemd-tmpfiles-setup-dev-early.service - Create Static Device Nodes in /dev gracefully. [ 2.773872] EXT4-fs (mmcblk0p1): re-mounted 2520cc50-b3ea-430f-ba9b-552afa4b6f82 r/w. [ 2.777912] systemd[1]: Finished systemd-remount-fs.service - Remount Root and Kernel File Systems. [ 2.779673] systemd[1]: systemd-hwdb-update.service - Rebuild Hardware Database skipped, unmet condition check ConditionNeedsUpdate=/etc [ 2.779919] systemd[1]: systemd-pstore.service - Platform Persistent Storage Archival skipped, unmet condition check ConditionDirectoryNotEmpty=/sys/fs/pstore [ 2.783365] systemd[1]: Starting systemd-random-seed.service - Load/Save OS Random Seed... [ 2.783733] systemd[1]: systemd-sysusers.service - Create System Users skipped, no trigger condition checks were met. [ 2.790652] systemd[1]: Starting systemd-timesyncd.service - Network Time Synchronization... [ 2.793619] systemd[1]: Starting systemd-tmpfiles-setup-dev.service - Create Static Device Nodes in /dev... [ 2.793932] systemd[1]: systemd-tpm2-setup.service - TPM SRK Setup skipped, unmet condition check ConditionSecurity=measured-uki [ 2.795274] systemd[1]: Finished keyboard-setup.service - Set the console keyboard layout. [ 2.796841] systemd[1]: Finished systemd-sysctl.service - Apply Kernel Variables. [ 2.803118] systemd[1]: Starting systemd-resolved.service - Network Name Resolution... [ 2.852608] systemd[1]: Finished systemd-tmpfiles-setup-dev.service - Create Static Device Nodes in /dev. [ 2.853310] systemd[1]: Reached target local-fs-pre.target - Preparation for Local File Systems. [ 2.857305] systemd[1]: Starting systemd-udevd.service - Rule-based Manager for Device Events and Files... [ 2.956019] systemd[1]: Started systemd-timesyncd.service - Network Time Synchronization. [ 2.957257] systemd[1]: Reached target time-set.target - System Time Set. [ 3.028829] systemd[1]: Started systemd-udevd.service - Rule-based Manager for Device Events and Files. [ 3.037801] systemd[1]: Starting systemd-networkd.service - Network Configuration... [ 3.108456] sd 0:0:0:1: [sdb] Spinning up disk... [ 3.157455] systemd[1]: Finished systemd-udev-trigger.service - Coldplug All udev Devices. [ 3.185174] random: crng init done [ 3.193688] systemd[1]: Finished systemd-random-seed.service - Load/Save OS Random Seed. [ 3.194566] systemd[1]: first-boot-complete.target - First Boot Complete skipped, unmet condition check ConditionFirstBoot=yes [ 3.204351] scsi 1:0:0:0: Direct-Access HIKSEMI PSSD 0100 PQ: 0 ANSI: 6 [ 3.210912] sd 1:0:0:0: [sdc] 2000409264 512-byte logical blocks: (1.02 TB/954 GiB) [ 3.212772] sd 1:0:0:0: [sdc] Write Protect is off [ 3.212811] sd 1:0:0:0: [sdc] Mode Sense: 43 00 00 00 [ 3.213208] sd 1:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 3.234251] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 3.239605] systemd[1]: Found device dev-ttyS0.device - /dev/ttyS0. [ 3.270004] Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 3.271763] Loaded X.509 cert 'wens: 61c038651aabdcf94bd0ac7ff06c7248db18c600' [ 3.277656] systemd[1]: Started systemd-resolved.service - Network Name Resolution. [ 3.288182] sdc: sdc1 sdc2 [ 3.288736] sd 1:0:0:0: [sdc] Attached SCSI disk [ 3.857154] systemd[1]: Reached target nss-lookup.target - Host and Network Name Lookups. [ 3.857424] systemd[1]: Reached target usb-gadget.target - Hardware activated USB gadget. [ 3.862630] systemd[1]: Mounting tmp.mount - /tmp... [ 3.891645] systemd[1]: Mounted tmp.mount - /tmp. [ 3.892193] systemd[1]: Reached target local-fs.target - Local File Systems. [ 3.894856] systemd[1]: Listening on systemd-sysext.socket - System Extension Image Management. [ 3.897761] systemd[1]: Starting armbian-zram-config.service - Armbian ZRAM config... [ 3.900711] systemd[1]: Starting console-setup.service - Set console font and keymap... [ 3.901703] systemd[1]: systemd-binfmt.service - Set Up Additional Binary Formats skipped, unmet condition check ConditionPathIsMountPoint=/proc/sys/fs/binfmt_misc [ 3.901895] systemd[1]: systemd-machine-id-commit.service - Save Transient machine-id to Disk skipped, unmet condition check ConditionPathIsMountPoint=/etc/machine-id [ 3.935051] systemd[1]: Finished console-setup.service - Set console font and keymap. [ 4.125129] .ready [ 4.496526] sd 0:0:0:1: [sdb] 122167296 512-byte logical blocks: (62.5 GB/58.3 GiB) [ 4.497199] sd 0:0:0:1: [sdb] Write Protect is off [ 4.497208] sd 0:0:0:1: [sdb] Mode Sense: 21 00 00 00 [ 4.497863] sd 0:0:0:1: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 4.526869] sdb: sdb1 [ 4.527177] sd 0:0:0:1: [sdb] Attached SCSI removable disk [ 4.536274] zram: Added device: zram0 [ 4.536958] zram: Added device: zram1 [ 4.537502] zram: Added device: zram2 [ 4.560724] zswap: loaded using pool lzo [ 4.583622] zram0: detected capacity change from 0 to 4021480 [ 4.602878] Adding 2010736k swap on /dev/zram0. Priority:5 extents:1 across:2010736k SS [ 4.618289] systemd[1]: Started systemd-networkd.service - Network Configuration. [ 4.620664] rk_gmac-dwmac 2a040000.ethernet end1: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 4.623308] systemd[1]: Starting systemd-networkd-persistent-storage.service - Enable Persistent Storage in systemd-networkd... [ 4.635307] zram1: detected capacity change from 0 to 102400 [ 4.649148] rk_gmac-dwmac 2a040000.ethernet end1: PHY [stmmac-1:01] driver [RTL8211F Gigabit Ethernet] (irq=POLL) [ 4.651091] dwmac4: Master AXI performs any burst length [ 4.651105] rk_gmac-dwmac 2a040000.ethernet end1: No Safety Features support found [ 4.651449] rk_gmac-dwmac 2a040000.ethernet end1: IEEE 1588-2008 Advanced Timestamp supported [ 4.651645] rk_gmac-dwmac 2a040000.ethernet end1: registered PTP clock [ 4.651652] rk_gmac-dwmac 2a040000.ethernet end1: configuring for phy/rgmii-rxid link mode [ 4.672612] systemd[1]: Finished armbian-zram-config.service - Armbian ZRAM config. [ 4.675764] systemd[1]: Starting armbian-ramlog.service - Armbian memory supported logging... [ 4.679240] rk_gmac-dwmac 29d20000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-0 [ 4.705167] rk_gmac-dwmac 29d20000.ethernet end0: PHY [stmmac-0:02] driver [RTL8211F Gigabit Ethernet] (irq=POLL) [ 4.717129] dwmac4: Master AXI performs any burst length [ 4.717166] rk_gmac-dwmac 29d20000.ethernet end0: No Safety Features support found [ 4.717690] rk_gmac-dwmac 29d20000.ethernet end0: IEEE 1588-2008 Advanced Timestamp supported [ 4.718006] rk_gmac-dwmac 29d20000.ethernet end0: registered PTP clock [ 4.718031] rk_gmac-dwmac 29d20000.ethernet end0: configuring for phy/rgmii-rxid link mode [ 4.747457] systemd[1]: Finished systemd-networkd-persistent-storage.service - Enable Persistent Storage in systemd-networkd. [ 4.748565] EXT4-fs (zram1): mounted filesystem 839fe5ef-a8e2-4adc-b9a0-0c76a7cc60b4 r/w without journal. Quota mode: disabled. [ 5.000713] systemd[1]: Finished armbian-ramlog.service - Armbian memory supported logging. [ 5.007005] systemd[1]: Starting systemd-journald.service - Journal Service... [ 5.093778] systemd-journald[438]: Collecting audit messages is disabled. [ 5.173135] systemd[1]: Started systemd-journald.service - Journal Service. [ 5.231994] systemd-journald[438]: Received client request to flush runtime journal. [ 5.588283] systemd-journald[438]: Received client request to relinquish /var/log/journal/958cd540f0e041c6b855006cbba7667a access. [ 6.241260] NOTICE: Automounting of tracing to debugfs is deprecated and will be removed in 2030 [ 7.806604] rk_gmac-dwmac 29d20000.ethernet end0: Link is Up - 1Gbps/Full - flow control rx/tx [ 8.766543] rk_gmac-dwmac 2a040000.ethernet end1: Link is Up - 1Gbps/Full - flow control rx/tx [ 31.709317] vdd_npu_s0: disablingTo: Stephen Boyd <[email protected]>
To: Brian Masney <[email protected]>
To: Jerome Brunet <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Heiko Stuebner <[email protected]>
To: Philipp Zabel <[email protected]>
To: Elaine Zhang <[email protected]>
To: Lee Jones <[email protected]>
To: Linus Walleij <[email protected]>
To: Bartosz Golaszewski <[email protected]>
To: Richard Cochran <[email protected]>
To: Ulf Hansson <[email protected]>
To: Andi Shyti <[email protected]>
To: Greg Kroah-Hartman <[email protected]>
To: Jiri Slaby <[email protected]>
To: Jisheng Zhang <[email protected]>
To: Andrew Lunn <[email protected]>
To: "David S. Miller" <[email protected]>
To: Eric Dumazet <[email protected]>
To: Jakub Kicinski <[email protected]>
To: Paolo Abeni <[email protected]>
To: David Wu <[email protected]>
To: "Rafael J. Wysocki" <[email protected]>
To: Daniel Lezcano <[email protected]>
To: Zhang Rui <[email protected]>
To: Lukasz Luba <[email protected]>
To: Maxime Chevallier <[email protected]>
To: Maxime Coquelin <[email protected]>
To: Alexandre Torgue <[email protected]>
To: Vinod Koul <[email protected]>
To: Neil Armstrong <[email protected]>
To: Manivannan Sadhasivam <[email protected]>
To: Cunhao Lu <[email protected]>
To: Thinh Nguyen <[email protected]>
To: Jaehoon Chung <[email protected]>
To: Shawn Lin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]---
Cunhao Lu (27):
dt-bindings: clock: rockchip: Add RK3572 CRU
dt-bindings: power: rockchip: Add RK3572 power domains
dt-bindings: soc: rockchip: Add RK3572 PMU and GRF
dt-bindings: mfd: syscon: Add RK3572 QoS register compatible
dt-bindings: pinctrl: rockchip: Add RK3572
dt-bindings: gpio: rockchip: Add RK3572 GPIO banks
clk: rockchip: Add RK3572 clock and reset support
pinctrl: rockchip: Add RK3572 support
gpio: rockchip: Add RK3572 GPIO support
pmdomain: rockchip: Add RK3572 boot peripheral domains
dt-bindings: i2c: rk3x: Add RK3572
dt-bindings: serial: snps-dw-apb-uart: Add RK3572
dt-bindings: mmc: rockchip: Add RK3572 controllers
dt-bindings: net: rockchip-dwmac: Add RK3572
dt-bindings: thermal: rockchip: Add RK3572
net: stmmac: dwmac-rk: Add RK3572 support
thermal: rockchip: Add RK3572 support
dt-bindings: phy: rockchip-inno-usb2: Add RK3572
dt-bindings: phy: rockchip-naneng-combphy: Add RK3572
dt-bindings: usb: rockchip: Add RK3572 DWC3 controller
phy: rockchip-inno-usb2: Add RK3572 support
phy: rockchip-naneng-combphy: Add RK3572 support
usb: dwc3: Configure RK3572 PIPE port before discovery
mmc: dw_mmc-rockchip: Keep RK3572 NVM domain powered
dt-bindings: arm: rockchip: Add Forlinx OK3572-C
arm64: dts: rockchip: Add RK3572 SoC
arm64: dts: rockchip: Add initial support for Forlinx OK3572-C.../devicetree/bindings/arm/rockchip.yaml | 6 + .../devicetree/bindings/arm/rockchip/pmu.yaml | 2 + .../bindings/clock/rockchip,rk3572-cru.yaml | 57 + .../bindings/gpio/rockchip,gpio-bank.yaml | 24 +- .../devicetree/bindings/i2c/i2c-rk3x.yaml | 1 + Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + .../devicetree/bindings/mmc/rockchip-dw-mshc.yaml | 1 + .../bindings/mmc/snps,dwcmshc-sdhci.yaml | 3 + .../devicetree/bindings/net/rockchip-dwmac.yaml | 3 + .../bindings/phy/phy-rockchip-naneng-combphy.yaml | 23 + .../bindings/phy/rockchip,inno-usb2phy.yaml | 14 + .../bindings/pinctrl/rockchip,pinctrl.yaml | 1 + .../bindings/power/rockchip,power-controller.yaml | 17 + .../bindings/serial/snps-dw-apb-uart.yaml | 1 + .../devicetree/bindings/soc/rockchip/grf.yaml | 12 + .../bindings/thermal/rockchip-thermal.yaml | 2 + .../bindings/usb/rockchip,rk3572-dwc3.yaml | 100 + arch/arm64/boot/dts/rockchip/Makefile | 1 + .../dts/rockchip/rk3572-forlinx-fet3572-c.dtsi | 369 ++ .../boot/dts/rockchip/rk3572-forlinx-ok3572-c.dts | 286 ++ arch/arm64/boot/dts/rockchip/rk3572-opp.dtsi | 165 + arch/arm64/boot/dts/rockchip/rk3572-pinctrl.dtsi | 3935 ++++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk3572.dtsi | 1325 +++++++ drivers/clk/rockchip/Kconfig | 7 + drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-rk3572.c | 1972 ++++++++++ drivers/clk/rockchip/clk.h | 36 + drivers/clk/rockchip/rst-rk3572.c | 739 ++++ drivers/gpio/gpio-rockchip.c | 91 +- drivers/mmc/host/dw_mmc-rockchip.c | 24 + drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 53 + drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 136 + drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 201 + drivers/pinctrl/pinctrl-rockchip.c | 230 +- drivers/pinctrl/pinctrl-rockchip.h | 9 +- drivers/pmdomain/rockchip/pm-domains.c | 141 +- drivers/thermal/rockchip_thermal.c | 28 + drivers/usb/dwc3/dwc3-generic-plat.c | 31 + include/dt-bindings/clock/rockchip,rk3572-cru.h | 560 +++ .../power/rockchip,rk3572-power-controller.h | 30 + include/dt-bindings/reset/rockchip,rk3572-cru.h | 713 ++++ include/soc/rockchip/rockchip_sip.h | 5 + 42 files changed, 11332 insertions(+), 24 deletions(-)---
base-commit:a804c5742bff224d4cb4d25dd383554d598be32b
change-id: 20261021-add-board-ok3572-c-8ed18b9065daBest regards,
--
Cunhao Lu <[email protected]>
Hi,
Quoted 4 lines
Thanks for your patches. Typically, a series of this size covering SoC support should be split by subsystem,for instance, separate DT binding and driver patches for each subsystem,and only CC the relevant maintainers and mailing lists. The DTS patch can follow afterwards.
Thank you for the guidance. I apologize for the inconvenience. I'll split v2 by subsystem.
Best regards,
Cunhao