Fix the Rockchip PinePhone Pro DTS warnings.
Subsystems (2)
cover Fix the Rockchip PinePhone Pro DTS warnings.
Small fixes to the PinePhone Pro DTS to fit bindings and suppress warnings at build.
---
Olivier Benjamin (3):
arm64: dts: rockchip: Fix the panel compatible for the PinePhone Pro
arm64: dts: rockchip: Fix the mipi port definition for RK3399
arm64: dts: rockchip: Remove unused property in PinePhone Pro MIPI panel
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
---
Signature · 1 line
Olivier Benjamin <[email protected]>
PATCH 1/3 arm64: dts: rockchip: Fix the panel compatible for the PinePhone Pro
As documented in its bindings, the compatible for the Himax HX8394 MIPI-DSI LCD panel controller is in 2 parts.
The PinePhone Pro DTS currently only specifies the first part of the compatible, generating a warning.
--- arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +1 -1
@@ -479,7 +479,7 @@ mipi_out_panel: endpoint { }; panel@0 { - compatible = "hannstar,hsd060bhw4"; + compatible = "hannstar,hsd060bhw4", "himax,hx8394"; reg = <0>; backlight = <&backlight>; reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>;
Signature · 1 line
2.49.0
Re: [PATCH 1/3] arm64: dts: rockchip: Fix the panel compatible for the PinePhone Pro
Quoted 15 lines · Olivier Benjamin
As documented in its bindings, the compatible for the Himax HX8394 MIPI-DSI LCD panel controller is in 2 parts.
The PinePhone Pro DTS currently only specifies the first part of the compatible, generating a warning.Signed-off-by Olivier Benjamin <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +0
-0
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts mipi_out_panel: endpoint { · line 485
Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +1
-1@@ -479,7 +479,7 @@ mipi_out_panel: endpoint { }; panel@0 { - compatible = "hannstar,hsd060bhw4"; + compatible = "hannstar,hsd060bhw4", "himax,hx8394"; reg = <0>; backlight = <&backlight>; reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>;
But I'd actually suggest to combine it with patch 3 and use that opportunity to also fix the property sorting, so you'd get 1 patch which fixes all of the panel issues.
Cheers,
Diederik
Re: [PATCH 1/3] arm64: dts: rockchip: Fix the panel compatible for the PinePhone Pro
Quoted 18 lines · Diederik de Haas
Quoted 17 lines · Olivier Benjamin
As documented in its bindings, the compatible for the Himax HX8394 MIPI-DSI LCD panel controller is in 2 parts.
The PinePhone Pro DTS currently only specifies the first part of the compatible, generating a warning.Signed-off-by Olivier Benjamin <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +0
-0@@ -479,7 +479,7 @@ mipi_out_panel: endpoint { };
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts mipi_out_panel: endpoint { · line 485
Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +1
-1panel@0 { - compatible = "hannstar,hsd060bhw4"; + compatible = "hannstar,hsd060bhw4", "himax,hx8394"; reg = <0>; backlight = <&backlight>; reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>;Reviewed-by Diederik de Haas <[email protected]>
Thanks for the review.
Quoted 4 lines
But I'd actually suggest to combine it with patch 3 and use that opportunity to also fix the property sorting, so you'd get 1 patch which fixes all of the panel issues.
Makes sense, I'll integrate your suggestions from the other 2 patches, fix the property sorting, and squash the fixes into 1 commit/patch in v2.
Quoted 2 lines
Cheers,
Diederik
Signature · 3 lines
Olivier Benjamin, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/3 arm64: dts: rockchip: Fix the mipi port definition for RK3399
In reply to Olivier BenjaminThe RK3399's MIPI DSI has 2 ports: in an out. The definition of the port property necessitates the value of #address-cells to be 1.
--- arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +1 -1
@@ -468,7 +468,7 @@ &mipi_dsi { ports { mipi_out: port@1 { - #address-cells = <0>; + #address-cells = <1>; #size-cells = <0>; reg = <1>;
Signature · 1 line
2.49.0
Re: [PATCH 2/3] arm64: dts: rockchip: Fix the mipi port definition for RK3399
Hi (again),
Quoted 13 lines · Olivier Benjamin
The RK3399's MIPI DSI has 2 ports: in an out. The definition of the port property necessitates the value of #address-cells to be 1.
Signed-off-by Olivier Benjamin <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +0
-0
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts &mipi_dsi { · line 474
Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +1
-1@@ -468,7 +468,7 @@ &mipi_dsi { ports { mipi_out: port@1 { - #address-cells = <0>; + #address-cells = <1>; #size-cells = <0>; reg = <1>;
In rk3399-base.dtsi there is already a definition for mipi-in and mipi-out. AFAICT what this change does is require a reg property on the endpoint and I don't think that's correct.
It seems to me that all you need is a mipi_out_panel definition. So what I came up with is this:
```sh
$ git diff
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
index 04ba4c4565d0..b175aeed99e2 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
@@ -466,18 +466,6 @@ &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>;
- };
- };
- };
-
panel@0 {
compatible = "hannstar,hsd060bhw4";
reg = <0>;
@@ -495,6 +483,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";
```I don't have a PPP so I can't verify it, but ``make CHECK_DTBS=y W=1 rockchip/rk3399-pinephone-pro.dtb`` no longer reports issues wrt dsi@ff960000 (after I also fixed the panel compatible like in patch 1 and added a LCD1_RST pinctrl definition as indicated in my reply to patch 3).
Cheers,
Diederik
Re: [PATCH 2/3] arm64: dts: rockchip: Fix the mipi port definition for RK3399
Quoted 2 lines · Diederik de Haas
Hi (again),
Hello again, I appreciate you taking the time!
Quoted 15 lines · Olivier Benjamin
Quoted 14 lines
The RK3399's MIPI DSI has 2 ports: in an out. The definition of the port property necessitates the value of #address-cells to be 1.
Signed-off-by Olivier Benjamin <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +0
-0@@ -468,7 +468,7 @@ &mipi_dsi {
Quoted 12 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts &mipi_dsi { · line 474
Quoted 7 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +1
-1ports { mipi_out: port@1 { - #address-cells = <0>; + #address-cells = <1>; #size-cells = <0>; reg = <1>;In
rk3399-base.dtsithere is already a definition for mipi-in and mipi-out. AFAICT what this change does is require a reg property on the endpoint and I don't think that's correct.
Those definitions do indeed exist in the base DTSI.
Quoted 41 lines
It seems to me that all you need is a
mipi_out_paneldefinition. So what I came up with is this:```sh
$ git diffarch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +6
-12@@ -466,18 +466,6 @@ &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>; - }; - }; - }; - panel@0 { compatible = "hannstar,hsd060bhw4"; reg = <0>;@@ -495,6 +483,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";
Quoted 2 lines
```
Thanks for the suggestion, that looks like it might actually solve the issue.
Quoted 6 lines
I don't have a PPP so I can't verify it, but ``make CHECK_DTBS=y W=1 rockchip/rk3399-pinephone-pro.dtb`` no longer reports issues wrt dsi@ff960000 (after I also fixed the panel compatible like in patch 1 and added a
LCD1_RSTpinctrl definition as indicated in my reply to patch 3).
I'll test on my PPP and report back in v2.
Quoted 2 lines
Cheers,
Diederik
Signature · 3 lines
Olivier Benjamin, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 3/3 arm64: dts: rockchip: Remove unused property in PinePhone Pro MIPI panel
In reply to Olivier BenjaminThe MIPI panel definition in the PinePhone Pro DTS includes a "pinctrl-names" property, which is unused in the absence of pinctrl-0.
--- arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +0 -1
@@ -485,7 +485,6 @@ panel@0 { reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>; vcc-supply = <&vcc2v8_lcd>; iovcc-supply = <&vcc1v8_lcd>; - pinctrl-names = "default"; port { mipi_in_panel: endpoint {
Signature · 1 line
2.49.0
Re: [PATCH 3/3] arm64: dts: rockchip: Remove unused property in PinePhone Pro MIPI panel
Hi,
Quoted 13 lines · Olivier Benjamin
The MIPI panel definition in the PinePhone Pro DTS includes a "pinctrl-names" property, which is unused in the absence of pinctrl-0.
Signed-off-by Olivier Benjamin <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 1 - 1 file changed, 1 deletion(-)arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +0
-0
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts panel@0 { · line 488
Quoted 4 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +0
-1@@ -485,7 +485,6 @@ panel@0 { reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>; vcc-supply = <&vcc2v8_lcd>; iovcc-supply = <&vcc1v8_lcd>; - pinctrl-names = "default";
Why not define a pinctrl for LCD1_RST for GPIO4_D1 and reference that in pinctrl-0? (See page 11 and 16 of the schematics)
Cheers,
Diederik
Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +0
-0port { mipi_in_panel: endpoint {
Re: [PATCH 3/3] arm64: dts: rockchip: Remove unused property in PinePhone Pro MIPI panel
Quoted 2 lines · Diederik de Haas
Hi,
Hello Diederik,
Quoted 9 lines · Olivier Benjamin
Quoted 8 lines
The MIPI panel definition in the PinePhone Pro DTS includes a "pinctrl-names" property, which is unused in the absence of pinctrl-0.
Signed-off-by Olivier Benjamin <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 1 - 1 file changed, 1 deletion(-)
Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts panel@0 { · line 488
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +0
-1@@ -485,7 +485,6 @@ panel@0 { reset-gpios = <&gpio4 RK_PD1 GPIO_ACTIVE_LOW>; vcc-supply = <&vcc2v8_lcd>; iovcc-supply = <&vcc1v8_lcd>; - pinctrl-names = "default";Why not define a pinctrl for
LCD1_RSTforGPIO4_D1and reference that in pinctrl-0? (See page 11 and 16 of the schematics)
That is a very fair question. I had simply missed that signal. I'll get right on that, thanks for the suggestion!
Quoted 6 lines
Cheers,
DiederikQuoted 3 lines
arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +0
-0port { mipi_in_panel: endpoint {
Signature · 3 lines
Olivier Benjamin, Bootlin Embedded Linux and Kernel engineering https://bootlin.com