linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: dts: rockchip: rockpro64 dts issues
@ 2018-12-01 10:08 Oskari Lemmela
  2018-12-01 10:08 ` [PATCH 1/2] arm64: dts: rockchip: rockpro64 fix regulator gpios Oskari Lemmela
  2018-12-01 10:08 ` [PATCH 2/2] arm64: dts: rockchip: rockpro64 fix video output chain Oskari Lemmela
  0 siblings, 2 replies; 7+ messages in thread
From: Oskari Lemmela @ 2018-12-01 10:08 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Heiko Stuebner
  Cc: Akash Gajjar, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel, Oskari Lemmela

I found two issues from new rk3399-rockpro64.dts file.

First one is incorrect regulator mapping. Rockpro64 has bit different
GPIO ports used than firefly board. Board is not able boot if GPIO
pins are not inited by bootloader.

Second issue is that dts have video output enabled but no outputs
enabled. Kernel will freeze if CONFIG_DRM_ROCKCHIP is compiled in.

Oskari Lemmela (2):
  arm64: dts: rockchip: rockpro64 fix regulator gpios
  arm64: dts: rockchip: rockpro64 fix video output chain

 .../boot/dts/rockchip/rk3399-rockpro64.dts    | 27 +++++++++++++------
 1 file changed, 19 insertions(+), 8 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] arm64: dts: rockchip: rockpro64 fix regulator gpios
  2018-12-01 10:08 [PATCH 0/2] arm64: dts: rockchip: rockpro64 dts issues Oskari Lemmela
@ 2018-12-01 10:08 ` Oskari Lemmela
  2018-12-05 12:59   ` agajjar
  2018-12-06 12:48   ` Heiko Stuebner
  2018-12-01 10:08 ` [PATCH 2/2] arm64: dts: rockchip: rockpro64 fix video output chain Oskari Lemmela
  1 sibling, 2 replies; 7+ messages in thread
From: Oskari Lemmela @ 2018-12-01 10:08 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Heiko Stuebner
  Cc: Akash Gajjar, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel, Oskari Lemmela

Rockpro64 is not able boot if GPIO1_C1 pin is pulled high
before loading linux kernel.

In rockpro64 GPIO1_C1 pin is connected vdd_cpu_b regulator
VSEL pin. Pin should be pulled down in normal operation and
pulled high in suspend.

PMIC LDO_REG2 is connected to touch panel connector.
Rename regulator and set it to correct voltage.

PCIe power is controller by GPIO1_D0.

Schematics can be downloaded from:
http://files.pine64.org/doc/rockpro64/rockpro64_v21-SCH.pdf

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
---
 .../boot/dts/rockchip/rk3399-rockpro64.dts    | 20 +++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
index 1d35f5406b5e..5bd4d69914bd 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
@@ -97,7 +97,7 @@
 	vcc3v3_pcie: vcc3v3-pcie-regulator {
 		compatible = "regulator-fixed";
 		enable-active-high;
-		gpio = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
+		gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
 		pinctrl-names = "default";
 		pinctrl-0 = <&pcie_pwr_en>;
 		regulator-name = "vcc3v3_pcie";
@@ -293,12 +293,12 @@
 				};
 			};
 
-			vcc2v8_dvp: LDO_REG2 {
-				regulator-name = "vcc2v8_dvp";
+			vcc3v0_touch: LDO_REG2 {
+				regulator-name = "vcc3v0_touch";
 				regulator-always-on;
 				regulator-boot-on;
-				regulator-min-microvolt = <2800000>;
-				regulator-max-microvolt = <2800000>;
+				regulator-min-microvolt = <3000000>;
+				regulator-max-microvolt = <3000000>;
 				regulator-state-mem {
 					regulator-off-in-suspend;
 				};
@@ -397,7 +397,9 @@
 	vdd_cpu_b: regulator@40 {
 		compatible = "silergy,syr827";
 		reg = <0x40>;
-		fcs,suspend-voltage-selector = <0>;
+		fcs,suspend-voltage-selector = <1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vsel1_gpio>;
 		regulator-name = "vdd_cpu_b";
 		regulator-min-microvolt = <712500>;
 		regulator-max-microvolt = <1500000>;
@@ -415,6 +417,8 @@
 		compatible = "silergy,syr828";
 		reg = <0x41>;
 		fcs,suspend-voltage-selector = <1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&vsel2_gpio>;
 		regulator-name = "vdd_gpu";
 		regulator-min-microvolt = <712500>;
 		regulator-max-microvolt = <1500000>;
@@ -519,7 +523,7 @@
 
 	pcie {
 		pcie_pwr_en: pcie-pwr-en {
-			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
+			rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
 		};
 	};
 
@@ -529,7 +533,7 @@
 		};
 
 		vsel1_gpio: vsel1-gpio {
-			rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
+			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
 		};
 
 		vsel2_gpio: vsel2-gpio {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] arm64: dts: rockchip: rockpro64 fix video output chain
  2018-12-01 10:08 [PATCH 0/2] arm64: dts: rockchip: rockpro64 dts issues Oskari Lemmela
  2018-12-01 10:08 ` [PATCH 1/2] arm64: dts: rockchip: rockpro64 fix regulator gpios Oskari Lemmela
@ 2018-12-01 10:08 ` Oskari Lemmela
  2018-12-05 13:03   ` agajjar
  1 sibling, 1 reply; 7+ messages in thread
From: Oskari Lemmela @ 2018-12-01 10:08 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, Heiko Stuebner
  Cc: Akash Gajjar, devicetree, linux-arm-kernel, linux-rockchip,
	linux-kernel, Oskari Lemmela

Rockpro64 is not able boot if kernel is compiled with
CONFIG_DRM_ROCKCHIP=m

Enable Rockpro64 board HDMI output to fix issue.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
---
 arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
index 5bd4d69914bd..be78172abc09 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
@@ -205,6 +205,13 @@
 	status = "okay";
 };
 
+&hdmi {
+	ddc-i2c-bus = <&i2c3>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&hdmi_cec>;
+	status = "okay";
+};
+
 &i2c0 {
 	clock-frequency = <400000>;
 	i2c-scl-rising-time-ns = <168>;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] arm64: dts: rockchip: rockpro64 fix regulator gpios
  2018-12-01 10:08 ` [PATCH 1/2] arm64: dts: rockchip: rockpro64 fix regulator gpios Oskari Lemmela
@ 2018-12-05 12:59   ` agajjar
  2018-12-06 12:48   ` Heiko Stuebner
  1 sibling, 0 replies; 7+ messages in thread
From: agajjar @ 2018-12-05 12:59 UTC (permalink / raw)
  To: Oskari Lemmela, Rob Herring, Mark Rutland, Heiko Stuebner
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel


On 12/1/2018 3:38 PM, Oskari Lemmela wrote:
> Rockpro64 is not able boot if GPIO1_C1 pin is pulled high
> before loading linux kernel.
>
> In rockpro64 GPIO1_C1 pin is connected vdd_cpu_b regulator
> VSEL pin. Pin should be pulled down in normal operation and
> pulled high in suspend.
>
> PMIC LDO_REG2 is connected to touch panel connector.
> Rename regulator and set it to correct voltage.
>
> PCIe power is controller by GPIO1_D0.
>
> Schematics can be downloaded from:
> http://files.pine64.org/doc/rockpro64/rockpro64_v21-SCH.pdf
>
> Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Acked-by: Akash Gajjar <Akash_Gajjar@mentor.com>
> ---
>   .../boot/dts/rockchip/rk3399-rockpro64.dts    | 20 +++++++++++--------
>   1 file changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
> index 1d35f5406b5e..5bd4d69914bd 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
> @@ -97,7 +97,7 @@
>   	vcc3v3_pcie: vcc3v3-pcie-regulator {
>   		compatible = "regulator-fixed";
>   		enable-active-high;
> -		gpio = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
> +		gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
>   		pinctrl-names = "default";
>   		pinctrl-0 = <&pcie_pwr_en>;
>   		regulator-name = "vcc3v3_pcie";
> @@ -293,12 +293,12 @@
>   				};
>   			};
>   
> -			vcc2v8_dvp: LDO_REG2 {
> -				regulator-name = "vcc2v8_dvp";
> +			vcc3v0_touch: LDO_REG2 {
> +				regulator-name = "vcc3v0_touch";
>   				regulator-always-on;
>   				regulator-boot-on;
> -				regulator-min-microvolt = <2800000>;
> -				regulator-max-microvolt = <2800000>;
> +				regulator-min-microvolt = <3000000>;
> +				regulator-max-microvolt = <3000000>;
>   				regulator-state-mem {
>   					regulator-off-in-suspend;
>   				};
> @@ -397,7 +397,9 @@
>   	vdd_cpu_b: regulator@40 {
>   		compatible = "silergy,syr827";
>   		reg = <0x40>;
> -		fcs,suspend-voltage-selector = <0>;
> +		fcs,suspend-voltage-selector = <1>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&vsel1_gpio>;
>   		regulator-name = "vdd_cpu_b";
>   		regulator-min-microvolt = <712500>;
>   		regulator-max-microvolt = <1500000>;
> @@ -415,6 +417,8 @@
>   		compatible = "silergy,syr828";
>   		reg = <0x41>;
>   		fcs,suspend-voltage-selector = <1>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&vsel2_gpio>;
>   		regulator-name = "vdd_gpu";
>   		regulator-min-microvolt = <712500>;
>   		regulator-max-microvolt = <1500000>;
> @@ -519,7 +523,7 @@
>   
>   	pcie {
>   		pcie_pwr_en: pcie-pwr-en {
> -			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
> +			rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
>   		};
>   	};
>   
> @@ -529,7 +533,7 @@
>   		};
>   
>   		vsel1_gpio: vsel1-gpio {
> -			rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
> +			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
>   		};
>   
>   		vsel2_gpio: vsel2-gpio {

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] arm64: dts: rockchip: rockpro64 fix video output chain
  2018-12-01 10:08 ` [PATCH 2/2] arm64: dts: rockchip: rockpro64 fix video output chain Oskari Lemmela
@ 2018-12-05 13:03   ` agajjar
  2018-12-06 13:03     ` Heiko Stuebner
  0 siblings, 1 reply; 7+ messages in thread
From: agajjar @ 2018-12-05 13:03 UTC (permalink / raw)
  To: Oskari Lemmela, Rob Herring, Mark Rutland, Heiko Stuebner
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel


On 12/1/2018 3:38 PM, Oskari Lemmela wrote:
> Rockpro64 is not able boot if kernel is compiled with
> CONFIG_DRM_ROCKCHIP=m
>
> Enable Rockpro64 board HDMI output to fix issue.

Hi Oskari,

Could you please describe this issue in detail.

I am not able to reproduce this issue if CONFIG_DRM_ROCKCHIP is compile 
in or as a loadable module at the same time hdmi node is present or not.

> Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
> ---
>   arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
> index 5bd4d69914bd..be78172abc09 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
> @@ -205,6 +205,13 @@
>   	status = "okay";
>   };
>   
> +&hdmi {
> +	ddc-i2c-bus = <&i2c3>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&hdmi_cec>;
> +	status = "okay";
> +};
> +
>   &i2c0 {
>   	clock-frequency = <400000>;
>   	i2c-scl-rising-time-ns = <168>;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] arm64: dts: rockchip: rockpro64 fix regulator gpios
  2018-12-01 10:08 ` [PATCH 1/2] arm64: dts: rockchip: rockpro64 fix regulator gpios Oskari Lemmela
  2018-12-05 12:59   ` agajjar
@ 2018-12-06 12:48   ` Heiko Stuebner
  1 sibling, 0 replies; 7+ messages in thread
From: Heiko Stuebner @ 2018-12-06 12:48 UTC (permalink / raw)
  To: Oskari Lemmela
  Cc: Rob Herring, Mark Rutland, Akash Gajjar, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel

Am Samstag, 1. Dezember 2018, 11:08:16 CET schrieb Oskari Lemmela:
> Rockpro64 is not able boot if GPIO1_C1 pin is pulled high
> before loading linux kernel.
> 
> In rockpro64 GPIO1_C1 pin is connected vdd_cpu_b regulator
> VSEL pin. Pin should be pulled down in normal operation and
> pulled high in suspend.
> 
> PMIC LDO_REG2 is connected to touch panel connector.
> Rename regulator and set it to correct voltage.
> 
> PCIe power is controller by GPIO1_D0.
> 
> Schematics can be downloaded from:
> http://files.pine64.org/doc/rockpro64/rockpro64_v21-SCH.pdf
> 
> Signed-off-by: Oskari Lemmela <oskari@lemmela.net>

applied as fix for 4.20

Thanks
Heiko



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] arm64: dts: rockchip: rockpro64 fix video output chain
  2018-12-05 13:03   ` agajjar
@ 2018-12-06 13:03     ` Heiko Stuebner
  0 siblings, 0 replies; 7+ messages in thread
From: Heiko Stuebner @ 2018-12-06 13:03 UTC (permalink / raw)
  To: agajjar
  Cc: Oskari Lemmela, Rob Herring, Mark Rutland, devicetree,
	linux-arm-kernel, linux-rockchip, linux-kernel

Am Mittwoch, 5. Dezember 2018, 14:03:29 CET schrieb agajjar:
> 
> On 12/1/2018 3:38 PM, Oskari Lemmela wrote:
> > Rockpro64 is not able boot if kernel is compiled with
> > CONFIG_DRM_ROCKCHIP=m
> >
> > Enable Rockpro64 board HDMI output to fix issue.
> 
> Hi Oskari,
> 
> Could you please describe this issue in detail.
> 
> I am not able to reproduce this issue if CONFIG_DRM_ROCKCHIP is compile 
> in or as a loadable module at the same time hdmi node is present or not.

I've now simply adjusted the commit message to:
"arm64: dts: rockchip: enable hdmi output on rk3399-rockpro64
    
The rockpro64 does have hdmi support, so add the necessary
devicetree node to enable it."

and applied it for 4.21.

While it still would be good to find out where the issue comes from Oskari
is seeing, the rockpro64 does have hdmi, so we can just enable it ;-)


Heiko



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-12-06 13:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-01 10:08 [PATCH 0/2] arm64: dts: rockchip: rockpro64 dts issues Oskari Lemmela
2018-12-01 10:08 ` [PATCH 1/2] arm64: dts: rockchip: rockpro64 fix regulator gpios Oskari Lemmela
2018-12-05 12:59   ` agajjar
2018-12-06 12:48   ` Heiko Stuebner
2018-12-01 10:08 ` [PATCH 2/2] arm64: dts: rockchip: rockpro64 fix video output chain Oskari Lemmela
2018-12-05 13:03   ` agajjar
2018-12-06 13:03     ` Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).