Rockchip Device Tree
Pinctrl, GPIO, regulators, PCIe/PHY modes and overlays on Rockchip platforms.
Almost every Rockchip bring-up task is a device-tree task: routing pins with pinctrl, powering peripherals with regulators, choosing combo-PHY modes (PCIe vs SATA vs USB3), describing camera graphs and panels. Getting fluent with rk3xxx.dtsi and the Rockchip pinctrl macros saves days.
Key points
- Rockchip pins are named GPIOx_Yz; in DTS use <&gpioX RK_PYz flags> and RK_FUNC_GPIO for pinctrl.
- Linux GPIO number = bank × 32 + (letter index × 8) + pin, e.g. GPIO3_B5 = 3×32 + 1×8 + 5 = 109.
- Use overlays (.dtbo) for optional hardware so one base DTB serves every product variant.
- Decompile the running tree with dtc -I fs /proc/device-tree to see what the kernel actually got.