All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: rockchip: move rk3399-sapphire sdio to excavator baseboard
       [not found] <CAAMcf8CY1m+998+GpD2wOfAZb=oZNkL2GqYu_o5piGEh76uoYw@mail.gmail.com>
@ 2018-02-19  8:15     ` Heiko Stuebner
  0 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2018-02-19  8:15 UTC (permalink / raw)
  To: Vicente Bergas
  Cc: mark.rutland-5wv7dgnIgG8,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

The sdio signals are routed through the connector to the baseboard,
where the wifi module is also located. So move the sdio node to
the excavator as well.

Signed-off-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
---
Hi Vicente,

after looking at the issue, I guess something like this and the following
patch should help your situation?
I've heared about the sapphire being used standalone some times and
thus think it can be justified to add that standalone version.


Heiko

 .../boot/dts/rockchip/rk3399-sapphire-excavator.dts      | 16 ++++++++++++++++
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi        | 16 ----------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
index b7bd88fb3ae3..68416fae4fea 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
@@ -232,6 +232,22 @@
 	};
 };
 
+&sdio0 {
+	bus-width = <4>;
+	cap-sd-highspeed;
+	cap-sdio-irq;
+	clock-frequency = <50000000>;
+	disable-wp;
+	keep-power-in-suspend;
+	max-frequency = <50000000>;
+	mmc-pwrseq = <&sdio_pwrseq>;
+	non-removable;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
+	sd-uhs-sdr104;
+	status = "okay";
+};
+
 &spdif {
 	i2c-scl-rising-time-ns = <450>;
 	i2c-scl-falling-time-ns = <15>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
index 46c95ccfd5cb..31568b4e8aa1 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
@@ -520,22 +520,6 @@
 	status = "okay";
 };
 
-&sdio0 {
-	bus-width = <4>;
-	cap-sd-highspeed;
-	cap-sdio-irq;
-	clock-frequency = <50000000>;
-	disable-wp;
-	keep-power-in-suspend;
-	max-frequency = <50000000>;
-	mmc-pwrseq = <&sdio_pwrseq>;
-	non-removable;
-	pinctrl-names = "default";
-	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
-	sd-uhs-sdr104;
-	status = "okay";
-};
-
 &sdmmc {
 	bus-width = <4>;
 	cap-mmc-highspeed;
-- 
2.15.1

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

* [PATCH 1/2] arm64: dts: rockchip: move rk3399-sapphire sdio to excavator baseboard
@ 2018-02-19  8:15     ` Heiko Stuebner
  0 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2018-02-19  8:15 UTC (permalink / raw)
  To: linux-arm-kernel

The sdio signals are routed through the connector to the baseboard,
where the wifi module is also located. So move the sdio node to
the excavator as well.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
Hi Vicente,

after looking at the issue, I guess something like this and the following
patch should help your situation?
I've heared about the sapphire being used standalone some times and
thus think it can be justified to add that standalone version.


Heiko

 .../boot/dts/rockchip/rk3399-sapphire-excavator.dts      | 16 ++++++++++++++++
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi        | 16 ----------------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
index b7bd88fb3ae3..68416fae4fea 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
@@ -232,6 +232,22 @@
 	};
 };
 
+&sdio0 {
+	bus-width = <4>;
+	cap-sd-highspeed;
+	cap-sdio-irq;
+	clock-frequency = <50000000>;
+	disable-wp;
+	keep-power-in-suspend;
+	max-frequency = <50000000>;
+	mmc-pwrseq = <&sdio_pwrseq>;
+	non-removable;
+	pinctrl-names = "default";
+	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
+	sd-uhs-sdr104;
+	status = "okay";
+};
+
 &spdif {
 	i2c-scl-rising-time-ns = <450>;
 	i2c-scl-falling-time-ns = <15>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
index 46c95ccfd5cb..31568b4e8aa1 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
@@ -520,22 +520,6 @@
 	status = "okay";
 };
 
-&sdio0 {
-	bus-width = <4>;
-	cap-sd-highspeed;
-	cap-sdio-irq;
-	clock-frequency = <50000000>;
-	disable-wp;
-	keep-power-in-suspend;
-	max-frequency = <50000000>;
-	mmc-pwrseq = <&sdio_pwrseq>;
-	non-removable;
-	pinctrl-names = "default";
-	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
-	sd-uhs-sdr104;
-	status = "okay";
-};
-
 &sdmmc {
 	bus-width = <4>;
 	cap-mmc-highspeed;
-- 
2.15.1

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

* [PATCH 2/2] arm64: dts: rockchip: add a standalone version of the rk3399 sapphire
  2018-02-19  8:15     ` Heiko Stuebner
@ 2018-02-19  8:16       ` Heiko Stuebner
  -1 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2018-02-19  8:16 UTC (permalink / raw)
  To: Vicente Bergas
  Cc: mark.rutland-5wv7dgnIgG8,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

While the sapphire board is a system-on-module and mostly used with the
excavator baseboard, it is also possible to use it standalone without
any base. So add a board-variant for this type.

Signed-off-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
---
 Documentation/devicetree/bindings/arm/rockchip.txt |  4 ++++
 arch/arm64/boot/dts/rockchip/Makefile              |  1 +
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts   | 12 ++++++++++++
 3 files changed, 17 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts

diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt
index 9a3e98356b1e..1c1d62d03c4f 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.txt
+++ b/Documentation/devicetree/bindings/arm/rockchip.txt
@@ -185,6 +185,10 @@ Rockchip platforms device tree bindings
     Required root node properties:
       - compatible = "rockchip,rk3399-evb", "rockchip,rk3399";
 
+- Rockchip RK3399 Sapphire board standalone:
+    Required root node properties:
+      - compatible = "rockchip,rk3399-sapphire", "rockchip,rk3399";
+
 - Rockchip RK3399 Sapphire Excavator board:
     Required root node properties:
       - compatible = "rockchip,rk3399-sapphire-excavator", "rockchip,rk3399";
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 1e57f87f30c4..48a83f882947 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -12,4 +12,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-firefly.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts
new file mode 100644
index 000000000000..5a58060447cf
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd.
+ */
+
+/dts-v1/;
+#include "rk3399-sapphire.dtsi"
+
+/ {
+	model = "Sapphire-RK3399 Board";
+	compatible = "rockchip,rk3399-sapphire", "rockchip,rk3399";
+};
-- 
2.15.1

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

* [PATCH 2/2] arm64: dts: rockchip: add a standalone version of the rk3399 sapphire
@ 2018-02-19  8:16       ` Heiko Stuebner
  0 siblings, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2018-02-19  8:16 UTC (permalink / raw)
  To: linux-arm-kernel

While the sapphire board is a system-on-module and mostly used with the
excavator baseboard, it is also possible to use it standalone without
any base. So add a board-variant for this type.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 Documentation/devicetree/bindings/arm/rockchip.txt |  4 ++++
 arch/arm64/boot/dts/rockchip/Makefile              |  1 +
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts   | 12 ++++++++++++
 3 files changed, 17 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts

diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt
index 9a3e98356b1e..1c1d62d03c4f 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.txt
+++ b/Documentation/devicetree/bindings/arm/rockchip.txt
@@ -185,6 +185,10 @@ Rockchip platforms device tree bindings
     Required root node properties:
       - compatible = "rockchip,rk3399-evb", "rockchip,rk3399";
 
+- Rockchip RK3399 Sapphire board standalone:
+    Required root node properties:
+      - compatible = "rockchip,rk3399-sapphire", "rockchip,rk3399";
+
 - Rockchip RK3399 Sapphire Excavator board:
     Required root node properties:
       - compatible = "rockchip,rk3399-sapphire-excavator", "rockchip,rk3399";
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 1e57f87f30c4..48a83f882947 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -12,4 +12,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-evb.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-firefly.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-sapphire-excavator.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts
new file mode 100644
index 000000000000..5a58060447cf
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd.
+ */
+
+/dts-v1/;
+#include "rk3399-sapphire.dtsi"
+
+/ {
+	model = "Sapphire-RK3399 Board";
+	compatible = "rockchip,rk3399-sapphire", "rockchip,rk3399";
+};
-- 
2.15.1

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

* Re: [PATCH 2/2] arm64: dts: rockchip: add a standalone version of the  rk3399 sapphire
  2018-02-19  8:16       ` Heiko Stuebner
@ 2018-02-19 20:42         ` Rob Herring
  -1 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2018-02-19 20:42 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: mark.rutland, linux-rockchip, linux-arm-kernel, Vicente Bergas,
	devicetree

On Mon, Feb 19, 2018 at 09:16:17AM +0100, Heiko Stuebner wrote:
> While the sapphire board is a system-on-module and mostly used with the
> excavator baseboard, it is also possible to use it standalone without
> any base. So add a board-variant for this type.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
>  Documentation/devicetree/bindings/arm/rockchip.txt |  4 ++++
>  arch/arm64/boot/dts/rockchip/Makefile              |  1 +
>  arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts   | 12 ++++++++++++
>  3 files changed, 17 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts

Reviewed-by: Rob Herring <robh@kernel.org>

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

* [PATCH 2/2] arm64: dts: rockchip: add a standalone version of the  rk3399 sapphire
@ 2018-02-19 20:42         ` Rob Herring
  0 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2018-02-19 20:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Feb 19, 2018 at 09:16:17AM +0100, Heiko Stuebner wrote:
> While the sapphire board is a system-on-module and mostly used with the
> excavator baseboard, it is also possible to use it standalone without
> any base. So add a board-variant for this type.
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
>  Documentation/devicetree/bindings/arm/rockchip.txt |  4 ++++
>  arch/arm64/boot/dts/rockchip/Makefile              |  1 +
>  arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts   | 12 ++++++++++++
>  3 files changed, 17 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts

Reviewed-by: Rob Herring <robh@kernel.org>

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

* [PATCH 1/2] arm64: dts: rockchip: move rk3399-sapphire i2s2 to daughterboard
  2018-02-19  8:15     ` Heiko Stuebner
  (?)
  (?)
@ 2018-02-19 23:11     ` Vicente Bergas
       [not found]       ` <20180219231102.9090-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  -1 siblings, 1 reply; 14+ messages in thread
From: Vicente Bergas @ 2018-02-19 23:11 UTC (permalink / raw)
  To: Heiko Stübner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Vicente Bergas

The i2s2 drives the HDMI audio, which has the connector on the daughterboard.

Signed-off-by: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
Hi Heiko,

I have tested your patches on stable Linux 4.15.4 and worked fine.
There are only two missing bits: the power-button and the HDMI audio.
With this two extra patches, I have been able to test the power button
and it worked fine.
The HDMI audio was not working before nor after, but, the TRM says that
i2s2 is the audio source for the HDMI port.

Regards, Vicente.

 arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts | 5 -----
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi          | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
index b7bd88fb3ae3..6027846ffd3e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
@@ -207,11 +207,6 @@
 	status = "okay";
 };
 
-&i2s2 {
-	#sound-dai-cells = <0>;
-	status = "okay";
-};
-
 &pinctrl {
 	buttons {
 		pwr_btn: pwr-btn {
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
index 0f873c897d0d..21b05601f04a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
@@ -440,6 +440,11 @@
 	status = "okay";
 };
 
+&i2s2 {
+	#sound-dai-cells = <0>;
+	status = "okay";
+};
+
 &io_domains {
 	status = "okay";
 
-- 
2.16.2

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

* [PATCH 2/2] arm64: dts: rockchip: move rk3399-sapphire pwr_btn to daughterboard
       [not found]       ` <20180219231102.9090-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-02-19 23:11         ` Vicente Bergas
  2018-02-20  9:37         ` [PATCH 1/2] arm64: dts: rockchip: move rk3399-sapphire i2s2 " Heiko Stuebner
  1 sibling, 0 replies; 14+ messages in thread
From: Vicente Bergas @ 2018-02-19 23:11 UTC (permalink / raw)
  To: Heiko Stübner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Vicente Bergas

The power button is located on the daughterboard.

Signed-off-by: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Tested-by: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 .../dts/rockchip/rk3399-sapphire-excavator.dts     | 23 ----------------------
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi  | 23 ++++++++++++++++++++++
 2 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
index 6027846ffd3e..6ff9d222d839 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
@@ -41,7 +41,6 @@
  */
 
 /dts-v1/;
-#include <dt-bindings/input/input.h>
 #include "rk3399-sapphire.dtsi"
 
 / {
@@ -95,22 +94,6 @@
 		};
 	};
 
-	keys: gpio-keys {
-		compatible = "gpio-keys";
-		autorepeat;
-
-		power {
-			debounce-interval = <100>;
-			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
-			label = "GPIO Power";
-			linux,code = <KEY_POWER>;
-			linux,input-type = <1>;
-			pinctrl-names = "default";
-			pinctrl-0 = <&pwr_btn>;
-			wakeup-source;
-		};
-	};
-
 	rt5651-sound {
 		compatible = "simple-audio-card";
 		simple-audio-card,name = "realtek,rt5651-codec";
@@ -208,12 +191,6 @@
 };
 
 &pinctrl {
-	buttons {
-		pwr_btn: pwr-btn {
-			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
-		};
-	};
-
 	sdio-pwrseq {
 		wifi_enable_h: wifi-enable-h {
 			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
index 21b05601f04a..6918eb2d1390 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
@@ -41,6 +41,7 @@
  */
 
 #include "dt-bindings/pwm/pwm.h"
+#include "dt-bindings/input/input.h"
 #include "rk3399.dtsi"
 #include "rk3399-opp.dtsi"
 
@@ -102,6 +103,22 @@
 		regulator-max-microvolt = <12000000>;
 	};
 
+	keys: gpio-keys {
+		compatible = "gpio-keys";
+		autorepeat;
+
+		power {
+			debounce-interval = <100>;
+			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
+			label = "GPIO Power";
+			linux,code = <KEY_POWER>;
+			linux,input-type = <1>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&pwr_btn>;
+			wakeup-source;
+		};
+	};
+
 	/* switched by pmic_sleep */
 	vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
 		compatible = "regulator-fixed";
@@ -475,6 +492,12 @@
 };
 
 &pinctrl {
+	buttons {
+		pwr_btn: pwr-btn {
+			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
+		};
+	};
+
 	pmic {
 		pmic_int_l: pmic-int-l {
 			rockchip,pins =
-- 
2.16.2

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

* Re: [PATCH 1/2] arm64: dts: rockchip: move rk3399-sapphire i2s2 to daughterboard
       [not found]       ` <20180219231102.9090-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2018-02-19 23:11         ` [PATCH 2/2] arm64: dts: rockchip: move rk3399-sapphire pwr_btn " Vicente Bergas
@ 2018-02-20  9:37         ` Heiko Stuebner
  1 sibling, 0 replies; 14+ messages in thread
From: Heiko Stuebner @ 2018-02-20  9:37 UTC (permalink / raw)
  To: Vicente Bergas; +Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Am Dienstag, 20. Februar 2018, 00:11:01 CET schrieb Vicente Bergas:
> The i2s2 drives the HDMI audio, which has the connector on the daughterboard.
> 
> Signed-off-by: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> Hi Heiko,
> 
> I have tested your patches on stable Linux 4.15.4 and worked fine.
> There are only two missing bits: the power-button and the HDMI audio.
> With this two extra patches, I have been able to test the power button
> and it worked fine.
> The HDMI audio was not working before nor after, but, the TRM says that
> i2s2 is the audio source for the HDMI port.

I've applied all 4 patches for 4.17 now.


Heiko

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

* [PATCH] arm64: dts: rockchip: move rk3399-sapphire PCIe to excavator baseboard
  2018-02-19  8:15     ` Heiko Stuebner
                       ` (2 preceding siblings ...)
  (?)
@ 2018-02-26 18:57     ` Vicente Bergas
       [not found]       ` <20180226185721.2582-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  -1 siblings, 1 reply; 14+ messages in thread
From: Vicente Bergas @ 2018-02-26 18:57 UTC (permalink / raw)
  To: Heiko Stübner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Vicente Bergas

The PCIe signals are routed through the connector to the baseboard.

Signed-off-by: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Tested-by: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 .../arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts | 15 +++++++++++++++
 arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi         | 15 ---------------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
index 56952d1a3fb8..4d47150d6862 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
@@ -190,6 +190,21 @@
 	status = "okay";
 };
 
+&pcie_phy {
+	status = "okay";
+};
+
+&pcie0 {
+	assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
+	assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
+	assigned-clock-rates = <100000000>;
+	ep-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;
+	num-lanes = <4>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie_clkreqn_cpm>;
+	status = "okay";
+};
+
 &pinctrl {
 	sdio-pwrseq {
 		wifi_enable_h: wifi-enable-h {
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
index e5b0369e197f..8c7db887f2cf 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
@@ -471,21 +471,6 @@
 	gpio1830-supply = <&vcc_3v0>;
 };
 
-&pcie_phy {
-	status = "okay";
-};
-
-&pcie0 {
-	assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
-	assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
-	assigned-clock-rates = <100000000>;
-	ep-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;
-	num-lanes = <4>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&pcie_clkreqn_cpm>;
-	status = "okay";
-};
-
 &pmu_io_domains {
 	pmu1830-supply = <&vcc_3v0>;
 	status = "okay";
-- 
2.16.2

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

* Re: [PATCH] arm64: dts: rockchip: move rk3399-sapphire PCIe to excavator baseboard
       [not found]       ` <20180226185721.2582-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-02-27  6:23         ` Shawn Lin
       [not found]           ` <86b701f0-899f-acf6-ad32-541dc888ddfe-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  2018-02-28 13:18         ` [PATCH] arm64: dts: rockchip: move rk3399-sapphire PCIe to " Heiko Stübner
  1 sibling, 1 reply; 14+ messages in thread
From: Shawn Lin @ 2018-02-27  6:23 UTC (permalink / raw)
  To: Vicente Bergas
  Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	shawn.lin-TNX95d0MmH7DzftRWevZcw, Heiko Stübner

On 2018/2/27 2:57, Vicente Bergas wrote:
> The PCIe signals are routed through the connector to the baseboard.
> 
> Signed-off-by: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Tested-by: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>   .../arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts | 15 +++++++++++++++
>   arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi         | 15 ---------------
>   2 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
> index 56952d1a3fb8..4d47150d6862 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
> @@ -190,6 +190,21 @@
>   	status = "okay";
>   };
>   
> +&pcie_phy {
> +	status = "okay";
> +};
> +
> +&pcie0 {
> +	assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
> +	assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
> +	assigned-clock-rates = <100000000>;

Ah, could you remove these assigned-clock* as well?
reference clock is needed for pcie_phy, not pcie controller.
Actually pcie_phy doesn't need this since rk3399 clock driver
already take care of this.

Otherwise,
Reviewed-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>


> +	ep-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;
> +	num-lanes = <4>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pcie_clkreqn_cpm>;
> +	status = "okay";
> +};
> +
>   &pinctrl {
>   	sdio-pwrseq {
>   		wifi_enable_h: wifi-enable-h {
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
> index e5b0369e197f..8c7db887f2cf 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi
> @@ -471,21 +471,6 @@
>   	gpio1830-supply = <&vcc_3v0>;
>   };
>   
> -&pcie_phy {
> -	status = "okay";
> -};
> -
> -&pcie0 {
> -	assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
> -	assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
> -	assigned-clock-rates = <100000000>;
> -	ep-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;
> -	num-lanes = <4>;
> -	pinctrl-names = "default";
> -	pinctrl-0 = <&pcie_clkreqn_cpm>;
> -	status = "okay";
> -};
> -
>   &pmu_io_domains {
>   	pmu1830-supply = <&vcc_3v0>;
>   	status = "okay";
> 

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

* [PATCH] arm64: dts: rockchip: remove PCIe assigned-clocks in excavator baseboard
       [not found]           ` <86b701f0-899f-acf6-ad32-541dc888ddfe-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2018-02-27 18:28             ` Vicente Bergas
       [not found]               ` <20180227182822.5048-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Vicente Bergas @ 2018-02-27 18:28 UTC (permalink / raw)
  To: Shawn Lin, Heiko Stübner,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Vicente Bergas

Reference clock is needed for pcie_phy, not pcie controller.
Actually pcie_phy doesn't need this since rk3399 clock driver
already take care of this.

Signed-off-by: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Suggested-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
 arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
index 4d47150d6862..3d7179aba3fb 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
@@ -195,9 +195,6 @@
 };
 
 &pcie0 {
-	assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
-	assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
-	assigned-clock-rates = <100000000>;
 	ep-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;
 	num-lanes = <4>;
 	pinctrl-names = "default";
-- 
2.16.2

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

* Re: [PATCH] arm64: dts: rockchip: remove PCIe assigned-clocks in excavator baseboard
       [not found]               ` <20180227182822.5048-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-02-28  1:47                 ` Shawn Lin
  0 siblings, 0 replies; 14+ messages in thread
From: Shawn Lin @ 2018-02-28  1:47 UTC (permalink / raw)
  To: Vicente Bergas
  Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	shawn.lin-TNX95d0MmH7DzftRWevZcw, Heiko Stübner

On 2018/2/28 2:28, Vicente Bergas wrote:
> Reference clock is needed for pcie_phy, not pcie controller.
> Actually pcie_phy doesn't need this since rk3399 clock driver
> already take care of this.
> 
> Signed-off-by: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Suggested-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> ---
>   arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
> index 4d47150d6862..3d7179aba3fb 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
> @@ -195,9 +195,6 @@
>   };
>   
>   &pcie0 {
> -	assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
> -	assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
> -	assigned-clock-rates = <100000000>;
>   	ep-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;
>   	num-lanes = <4>;
>   	pinctrl-names = "default";
> 

Reviewed-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>

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

* Re: [PATCH] arm64: dts: rockchip: move rk3399-sapphire PCIe to excavator baseboard
       [not found]       ` <20180226185721.2582-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2018-02-27  6:23         ` Shawn Lin
@ 2018-02-28 13:18         ` Heiko Stübner
  1 sibling, 0 replies; 14+ messages in thread
From: Heiko Stübner @ 2018-02-28 13:18 UTC (permalink / raw)
  To: Vicente Bergas; +Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Am Montag, 26. Februar 2018, 19:57:21 CET schrieb Vicente Bergas:
> The PCIe signals are routed through the connector to the baseboard.
> 
> Signed-off-by: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Tested-by: Vicente Bergas <vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  .../arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts | 15
> +++++++++++++++ arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi         |
> 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
> b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts index
> 56952d1a3fb8..4d47150d6862 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts
> @@ -190,6 +190,21 @@
>  	status = "okay";
>  };
> 
> +&pcie_phy {
> +	status = "okay";
> +};
> +
> +&pcie0 {
> +	assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
> +	assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
> +	assigned-clock-rates = <100000000>;
> +	ep-gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_HIGH>;

I've applied both patches into a temporary branch for likely 4.18 now
with the tags from Shawn.

Reason is that we also have a fix for 4.16 in a different branch fixing
the ep-gpios property on sapphire and having these things conflict
will end up in a lot of chaos, as that fix is not yet in the mainline kernel
but only in an intermediate state.

So likely the pcie move will have to wait for 4.18 to make it easier
on everybody.


Heiko

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

end of thread, other threads:[~2018-02-28 13:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAAMcf8CY1m+998+GpD2wOfAZb=oZNkL2GqYu_o5piGEh76uoYw@mail.gmail.com>
     [not found] ` <CAAMcf8CY1m+998+GpD2wOfAZb=oZNkL2GqYu_o5piGEh76uoYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-19  8:15   ` [PATCH 1/2] arm64: dts: rockchip: move rk3399-sapphire sdio to excavator baseboard Heiko Stuebner
2018-02-19  8:15     ` Heiko Stuebner
2018-02-19  8:16     ` [PATCH 2/2] arm64: dts: rockchip: add a standalone version of the rk3399 sapphire Heiko Stuebner
2018-02-19  8:16       ` Heiko Stuebner
2018-02-19 20:42       ` Rob Herring
2018-02-19 20:42         ` Rob Herring
2018-02-19 23:11     ` [PATCH 1/2] arm64: dts: rockchip: move rk3399-sapphire i2s2 to daughterboard Vicente Bergas
     [not found]       ` <20180219231102.9090-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-19 23:11         ` [PATCH 2/2] arm64: dts: rockchip: move rk3399-sapphire pwr_btn " Vicente Bergas
2018-02-20  9:37         ` [PATCH 1/2] arm64: dts: rockchip: move rk3399-sapphire i2s2 " Heiko Stuebner
2018-02-26 18:57     ` [PATCH] arm64: dts: rockchip: move rk3399-sapphire PCIe to excavator baseboard Vicente Bergas
     [not found]       ` <20180226185721.2582-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-27  6:23         ` Shawn Lin
     [not found]           ` <86b701f0-899f-acf6-ad32-541dc888ddfe-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2018-02-27 18:28             ` [PATCH] arm64: dts: rockchip: remove PCIe assigned-clocks in " Vicente Bergas
     [not found]               ` <20180227182822.5048-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-02-28  1:47                 ` Shawn Lin
2018-02-28 13:18         ` [PATCH] arm64: dts: rockchip: move rk3399-sapphire PCIe to " Heiko Stübner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.