Development

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.

References

Device Tree guides

오류를 발견했거나 추가할 내용이 있나요? 개선 제안하기.

Rockchip 기반 제품을 개발 중이신가요?

하드웨어 설계부터 Linux, Android, AI 통합까지 Rockchip 프로젝트를 위한 엔지니어링 지원을 받으세요.