[PATCH] arm64: dts: rockchip: Set gpioN aliases on RK3576

Alexey Charkov posted 1 patch 1 week, 4 days ago
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 5 +++++
1 file changed, 5 insertions(+)
[PATCH] arm64: dts: rockchip: Set gpioN aliases on RK3576
Posted by Alexey Charkov 1 week, 4 days ago
With no alias, the OS is free to number the GPIO chips arbitrarily, such
as in probe order, which is what Linux kernel's rockchip_gpio_probe() does
if its of_alias_get_id(np, "gpio") fails.

This results in GPIO chip numbers arbitrarily shuffled in userspace,
causing confusion and pain.

Set gpioN aliases in the SoC .dtsi, just like other SoC versions do.

Signed-off-by: Alexey Charkov <alchark@flipper.net>
---
 arch/arm64/boot/dts/rockchip/rk3576.dtsi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
index d418bfc04097..e87ace5d05e6 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
@@ -21,6 +21,11 @@ / {
 	#size-cells = <2>;
 
 	aliases {
+		gpio0 = &gpio0;
+		gpio1 = &gpio1;
+		gpio2 = &gpio2;
+		gpio3 = &gpio3;
+		gpio4 = &gpio4;
 		i2c0 = &i2c0;
 		i2c1 = &i2c1;
 		i2c2 = &i2c2;

---
base-commit: 68142f986ff04b2b70b31db00f719bf690f64a9a
change-id: 20260914-rk3576-gpio-aliases-9c0a6088b59f

Best regards,
--  
Alexey Charkov <alchark@flipper.net>
Re: [PATCH] arm64: dts: rockchip: Set gpioN aliases on RK3576
Posted by Heiko Stuebner 3 days, 12 hours ago
On Mon, 14 Sep 2026 12:47:15 +0400, Alexey Charkov wrote:
> With no alias, the OS is free to number the GPIO chips arbitrarily, such
> as in probe order, which is what Linux kernel's rockchip_gpio_probe() does
> if its of_alias_get_id(np, "gpio") fails.
> 
> This results in GPIO chip numbers arbitrarily shuffled in userspace,
> causing confusion and pain.
> 
> [...]

Applied, thanks!

[1/1] arm64: dts: rockchip: Set gpioN aliases on RK3576
      commit: c818f4a85a40c12a5536d6016395a7eff5b44f8a

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>