Skip to contentSkip to conversation

arm64: dts: rockchip: Fix the PinePhone Pro DTS' panel description

PATCH Superseded Olivier Benjamin 3 participants 5 messages Jun 19, 2025

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm64: dts: rockchip: Fix the PinePhone Pro DTS' panel description

Fix a few issues in the panel section of the PinePhone Pro DTS:
- add the second part of the Himax HX8394 LCD panel controller compatible
- as proposed by Diederik de Haas, reuse the mipi_out and ports definitions from rk3399-base.dtsi instead of redefining them
- add a pinctrl for the LCD_RST signal for LCD1, derived from LCD1_RST, which is on GPIO4_D1, as documented on pages 11 and 16 of the PinePhone Pro schematic

---
Small fixes to the PinePhone Pro DTS to fit bindings and
suppress warnings at build.
---
Changes in v2:
- Added the pinctrl definition for GPIO4_D1/LCD1_RST
- Incorporated Diederik de Haas' suggestion for defining mipi_out
- Squashed multiple patches into one
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 .../boot/dts/rockchip/rk3399-pinephone-pro.dts     | 33 +++++++++++-----------
 1 file changed, 17 insertions(+), 16 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +17 -16
index 04ba4c4565d0a205e2e46d7535c6a3190993621d..98aba146749998dd5a798aabed0fe844c474d1cf 100644
@@ -463,29 +463,18 @@ &io_domains {
 };
 
 &mipi_dsi {
-	status = "okay";
 	clock-master;
-
-	ports {
-		mipi_out: port@1 {
-			#address-cells = <0>;
-			#size-cells = <0>;
-			reg = <1>;
-
-			mipi_out_panel: endpoint {
-				remote-endpoint = <&mipi_in_panel>;
-			};
-		};
-	};
+	status = "okay";
 
 	panel@0 {
-		compatible = "hannstar,hsd060bhw4";
+		compatible = "hannstar,hsd060bhw4", "himax,hx8394";
 		reg = <0>;
 		backlight = <&backlight>;
-		reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>;
-		vcc-supply = <&vcc2v8_lcd>;
 		iovcc-supply = <&vcc1v8_lcd>;
 		pinctrl-names = "default";
+		pinctrl-0 = <&lcd_reset_pin>;
+		reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>;
+		vcc-supply = <&vcc2v8_lcd>;
 
 		port {
 			mipi_in_panel: endpoint {
@@ -495,6 +484,12 @@ mipi_in_panel: endpoint {
 	};
 };
 
+&mipi_out {
+	mipi_out_panel: endpoint {
+		remote-endpoint = <&mipi_in_panel>;
+	};
+};
+
 &pmu_io_domains {
 	pmu1830-supply = <&vcc_1v8>;
 	status = "okay";
@@ -507,6 +502,12 @@ pwrbtn_pin: pwrbtn-pin {
 		};
 	};
 
+	lcd {
+		lcd_reset_pin: reset-pin {
+			rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	leds {
 		red_led_pin: red-led-pin {
 			rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
Signature · 1 line
Olivier Benjamin <[email protected]>
Reviewed-by on v2 1/1
#1 lore raw

Hi,

Thanks for working on upstreaming PPP things :-)

Quoted 76 lines · Olivier Benjamin

Fix a few issues in the panel section of the PinePhone Pro DTS:
- add the second part of the Himax HX8394 LCD panel controller compatible
- as proposed by Diederik de Haas, reuse the mipi_out and ports definitions from rk3399-base.dtsi instead of redefining them
- add a pinctrl for the LCD_RST signal for LCD1, derived from LCD1_RST, which is on GPIO4_D1, as documented on pages 11 and 16 of the PinePhone Pro schematic

---
Small fixes to the PinePhone Pro DTS to fit bindings and
suppress warnings at build.
---
Changes in v2:
- Added the pinctrl definition for GPIO4_D1/LCD1_RST
- Incorporated Diederik de Haas' suggestion for defining mipi_out
- Squashed multiple patches into one
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 .../boot/dts/rockchip/rk3399-pinephone-pro.dts     | 33 +++++++++++-----------
 1 file changed, 17 insertions(+), 16 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +11 -16
index 04ba4c4565d0a205e2e46d7535c6a3190993621d..98aba146749998dd5a798aabed0fe844c474d1cf 100644
@@ -463,29 +463,18 @@ &io_domains {
 };
 
 &mipi_dsi {
-	status = "okay";
 	clock-master;
-
-	ports {
-		mipi_out: port@1 {
-			#address-cells = <0>;
-			#size-cells = <0>;
-			reg = <1>;
-
-			mipi_out_panel: endpoint {
-				remote-endpoint = <&mipi_in_panel>;
-			};
-		};
-	};
+	status = "okay";
 
 	panel@0 {
-		compatible = "hannstar,hsd060bhw4";
+		compatible = "hannstar,hsd060bhw4", "himax,hx8394";
 		reg = <0>;
 		backlight = <&backlight>;
-		reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>;
-		vcc-supply = <&vcc2v8_lcd>;
 		iovcc-supply = <&vcc1v8_lcd>;
 		pinctrl-names = "default";
+		pinctrl-0 = <&lcd_reset_pin>;
+		reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>;
+		vcc-supply = <&vcc2v8_lcd>;
 
 		port {
 			mipi_in_panel: endpoint {
@@ -495,6 +484,12 @@ mipi_in_panel: endpoint {
 	};
 };
 
+&mipi_out {
+	mipi_out_panel: endpoint {
+		remote-endpoint = <&mipi_in_panel>;
+	};
+};
+
 &pmu_io_domains {
 	pmu1830-supply = <&vcc_1v8>;
 	status = "okay";

arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts pwrbtn_pin: pwrbtn-pin { · line 506

Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +2 -0
@@ -507,6 +502,12 @@ pwrbtn_pin: pwrbtn-pin {
 		};
 	};
 
+	lcd {
+		lcd_reset_pin: reset-pin {

I don't know if there's a 'hard rule' for it, but I'd recommend to use ``lcd1_rst_pin: lcd1-rst-pin {`` as that would match the naming from the schematics. I realize that some but not all (other) pinctrl nodes follow that 'rule', but it helps with traceability.

arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts pwrbtn_pin: pwrbtn-pin { · line 513

Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +4 -0
+			rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	leds {
 		red_led_pin: red-led-pin {
 			rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;

Otherwise,

Cheers,
Diederik

maintainer
#2 lore raw

Am Donnerstag, 19. Juni 2025, 11:46:15 Mitteleuropäische Sommerzeit schrieb Diederik de Haas:

Quoted 16 lines

Hi,

Thanks for working on upstreaming PPP things :-)

Quoted 10 lines · Olivier Benjamin

Fix a few issues in the panel section of the PinePhone Pro DTS:
- add the second part of the Himax HX8394 LCD panel controller compatible
- as proposed by Diederik de Haas, reuse the mipi_out and ports definitions from rk3399-base.dtsi instead of redefining them
- add a pinctrl for the LCD_RST signal for LCD1, derived from LCD1_RST, which is on GPIO4_D1, as documented on pages 11 and 16 of the PinePhone Pro schematic

Quoted 7 lines

arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts pwrbtn_pin: pwrbtn-pin { · line 506

Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +2 -0
+	lcd {
+		lcd_reset_pin: reset-pin {

I don't know if there's a 'hard rule' for it, but I'd recommend to use ``lcd1_rst_pin: lcd1-rst-pin {`` as that would match the naming from the schematics. I realize that some but not all (other) pinctrl nodes follow that 'rule', but it helps with traceability.

not a "hard" rule, but a strong preference.
I.e. we want people to ideally be able to just hit search in the schematics PDFs for the name they saw in the devicetree.

Sometimes that is not possible, because of naming conventions or overly strange schematic-names ... and sometimes things slip through as well.

But following the schematic names, is the general goal.

If this stays the only suggestion though, I can fix that when applying. Or you can send a v3 - up to you :-)

Heiko

Quoted 16 lines

arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts pwrbtn_pin: pwrbtn-pin { · line 513

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +4 -0
+			rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
 	leds {
 		red_led_pin: red-led-pin {
 			rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;

Otherwise,

Cheers,
Diederik

#3 lore raw
Quoted 5 lines · Heiko Stuebner

Am Donnerstag, 19. Juni 2025, 11:46:15 Mitteleuropäische Sommerzeit schrieb Diederik de Haas:

Quoted 4 lines

Hi,

Thanks for working on upstreaming PPP things :-)

My pleasure. I also have https://lore.kernel.org/linux-rockchip/[email protected]/ pending = )

Quoted 24 lines
Quoted 12 lines · Olivier Benjamin
Quoted 10 lines

Fix a few issues in the panel section of the PinePhone Pro DTS:
- add the second part of the Himax HX8394 LCD panel controller compatible
- as proposed by Diederik de Haas, reuse the mipi_out and ports definitions from rk3399-base.dtsi instead of redefining them
- add a pinctrl for the LCD_RST signal for LCD1, derived from LCD1_RST, which is on GPIO4_D1, as documented on pages 11 and 16 of the PinePhone Pro schematic

Quoted 7 lines

arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts pwrbtn_pin: pwrbtn-pin { · line 506

Quoted 2 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +2 -0
+	lcd {
+		lcd_reset_pin: reset-pin {

I don't know if there's a 'hard rule' for it, but I'd recommend to use ``lcd1_rst_pin: lcd1-rst-pin {`` as that would match the naming from the schematics. I realize that some but not all (other) pinctrl nodes follow that 'rule', but it helps with traceability.

not a "hard" rule, but a strong preference.
I.e. we want people to ideally be able to just hit search in the schematics PDFs for the name they saw in the devicetree.

Quoted 6 lines

Sometimes that is not possible, because of naming conventions or overly strange schematic-names ... and sometimes things slip through as well.

But following the schematic names, is the general goal.

Very fair. I used "lcd_reset" because even the schematic is not super clear: it uses "LCD_RST" on page 16 and LCD1_RST on pages 11 and 16.

Quoted 4 lines

If this stays the only suggestion though, I can fix that when applying. Or you can send a v3 - up to you :-)

I'll correct to lcd1_rst_pin and send a v3 (most likely later today)

Quoted 24 lines

Heiko

Quoted 16 lines

arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts pwrbtn_pin: pwrbtn-pin { · line 513

Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +4 -0
+			rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
  	leds {
  		red_led_pin: red-led-pin {
  			rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;

Otherwise,

Cheers,
Diederik

Signature · 3 lines
Olivier Benjamin, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw
Quoted 8 lines · Olivier Benjamin
Quoted 4 lines · Heiko Stuebner

Am Donnerstag, 19. Juni 2025, 11:46:15 Mitteleuropäische Sommerzeit schrieb Diederik de Haas:

Quoted 3 lines · Olivier Benjamin

Thanks for working on upstreaming PPP things :-)

My pleasure. I also have
https://lore.kernel.org/linux-rockchip/[email protected]/
pending = )

Happy about that too, but I 'happen' to research DSI connected displays (for other devices), so I felt comfortable to chime in with that. I haven't looked at camera stuff yet (and it's not high on my prio list), so hopefully others will chime in for that :-)

Quoted 19 lines
Quoted 19 lines
Quoted 18 lines

arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts pwrbtn_pin: pwrbtn-pin { · line 506

Quoted 13 lines

Fix a few issues in the panel section of the PinePhone Pro DTS:
- add the second part of the Himax HX8394 LCD panel controller compatible
- as proposed by Diederik de Haas, reuse the mipi_out and ports definitions from rk3399-base.dtsi instead of redefining them
- add a pinctrl for the LCD_RST signal for LCD1, derived from LCD1_RST, which is on GPIO4_D1, as documented on pages 11 and 16 of the PinePhone Pro schematic

arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +2 -0
+	lcd {
+		lcd_reset_pin: reset-pin {

I don't know if there's a 'hard rule' for it, but I'd recommend to use ``lcd1_rst_pin: lcd1-rst-pin {`` as that would match the naming from the schematics. I realize that some but not all (other) pinctrl nodes follow that 'rule', but it helps with traceability.

Quoted 8 lines
Quoted 6 lines

not a "hard" rule, but a strong preference.
I.e. we want people to ideally be able to just hit search in the schematics PDFs for the name they saw in the devicetree.

But following the schematic names, is the general goal.

Very fair. I used "lcd_reset" because even the schematic is not super
clear: it uses "LCD_RST" on page 16 and LCD1_RST on pages 11 and 16.

AIUI, the GPIO pin (GPIO4_D1) is labeled LCD1_RST and on page 16 you can see that is connected to LCD_RST from BL102-G39-1FR.
The definition here is about the GPIO pin, hence LCD1_RST. The other part of my suggestion was related to another 'convention':
the name and label/phandle are the same with ``s/-/_/`` (and 'reset-pin' is not specific enough; there are a number of reset pins).

Afaic you don't need to mention that I suggested the mipi_out related changes; the reason to do that (unneeded redefinition of already defined things), is.

Cheers,
Diederik

Quoted 17 lines
Quoted 3 lines

If this stays the only suggestion though, I can fix that when applying. Or you can send a v3 - up to you :-)

I'll correct to lcd1_rst_pin and send a v3 (most likely later today)

Quoted 12 lines
Quoted 12 lines

arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts pwrbtn_pin: pwrbtn-pin { · line 513

Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +4 -0
+			rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+
  	leds {
  		red_led_pin: red-led-pin {
  			rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;

Otherwise,