arm64: dts: rockchip: move rk3399-sapphire sdio to excavator baseboard
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): CAAMcf8CY1m+998+GpD2wOfAZb=oZNkL2GqYu_o5piGEh76uoYw@mail.gmail.com
Heiko Stuebner
maintainerPATCH 1/2 arm64: dts: rockchip: move rk3399-sapphire sdio to excavator baseboard
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.
---
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(-)
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts +16 -0
@@ -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>;
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +0 -16
@@ -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;
Signature · 1 line
2.15.1
Heiko Stuebner
maintainerPATCH 2/2 arm64: dts: rockchip: add a standalone version of the rk3399 sapphire
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.
--- 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
Documentation/devicetree/bindings/arm/rockchip.txt +4 -0
@@ -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";
arch/arm64/boot/dts/rockchip/Makefile +1 -0
@@ -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
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dts new file +12 -0
@@ -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"; +};
Signature · 1 line
2.15.1
Rob Herring
maintainerPATCH 2/2 arm64: dts: rockchip: add a standalone version of the rk3399 sapphire
Quoted 11 lines · Heiko Stuebner
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 <[email protected]>--- 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
PATCH 1/2 arm64: dts: rockchip: move rk3399-sapphire i2s2 to daughterboard
In reply to Heiko StuebnerThe i2s2 drives the HDMI audio, which has the connector on the daughterboard.
---
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(-)
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts +0 -5
@@ -207,11 +207,6 @@ status = "okay"; }; -&i2s2 { - #sound-dai-cells = <0>; - status = "okay"; -}; - &pinctrl { buttons { pwr_btn: pwr-btn {
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +5 -0
@@ -440,6 +440,11 @@ status = "okay"; }; +&i2s2 { + #sound-dai-cells = <0>; + status = "okay"; +}; + &io_domains { status = "okay";
Signature · 1 line
2.16.2
A message that is not in the archive (sent off-list or not yet received): 20180219231102.9090-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 2/2 arm64: dts: rockchip: move rk3399-sapphire pwr_btn to daughterboard
The power button is located on the daughterboard.
--- .../dts/rockchip/rk3399-sapphire-excavator.dts | 23 ---------------------- arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 23 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 23 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts +0 -23
@@ -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>;
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +23 -0
@@ -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 =
Signature · 1 line
2.16.2
Re: [PATCH 1/2] arm64: dts: rockchip: move rk3399-sapphire i2s2 to daughterboard
In reply to a message not in the archiveAm Dienstag, 20. Februar 2018, 00:11:01 CET schrieb Vicente Bergas:
Quoted 6 lines
The i2s2 drives the HDMI audio, which has the connector on the daughterboard.
Signed-off-by Vicente Bergas <[email protected]>---
Hi Heiko,
Quoted 6 lines
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
PATCH 1/1 arm64: dts: rockchip: move rk3399-sapphire PCIe to excavator baseboard
In reply to Heiko StuebnerThe PCIe signals are routed through the connector to the baseboard.
--- .../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(-)
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts +15 -0
@@ -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 {
arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +0 -15
@@ -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";
Signature · 1 line
2.16.2
A message that is not in the archive (sent off-list or not yet received): 20180226185721.2582-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Shawn Lin
Reviewed-byRe: [PATCH] arm64: dts: rockchip: move rk3399-sapphire PCIe to excavator baseboard
Quoted 15 lines · Vicente Bergas
The PCIe signals are routed through the connector to the baseboard.
Signed-off-by Vicente Bergas <[email protected]>Tested-by Vicente Bergas <[email protected]>--- .../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(-)arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts +0
-0@@ -190,6 +190,21 @@ status = "okay";
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts line 200
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts +8
-0}; +&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,
Quoted 37 lines
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts +7
-0+ 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 {arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +0
-15@@ -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";
A message that is not in the archive (sent off-list or not yet received): 86b701f0-899f-acf6-ad32-541dc888ddfe-TNX95d0MmH7DzftRWevZcw@public.gmane.org
PATCH 1/1 arm64: dts: rockchip: remove PCIe assigned-clocks in excavator baseboard
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.
--- arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts | 3 --- 1 file changed, 3 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts +0 -3
@@ -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";
Signature · 1 line
2.16.2
A message that is not in the archive (sent off-list or not yet received): 20180227182822.5048-1-vicencb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Shawn Lin
Reviewed-byRe: [PATCH] arm64: dts: rockchip: remove PCIe assigned-clocks in excavator baseboard
Quoted 16 lines · Vicente Bergas
Reference clock is needed for
pcie_phy, not pcie controller. Actuallypcie_phydoesn't need this since rk3399 clock driver already take care of this.Signed-off-by Vicente Bergas <[email protected]>Suggested-by Shawn Lin <[email protected]>--- arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts | 3 --- 1 file changed, 3 deletions(-)arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts +0
-0
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts line 200
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts +0
-3@@ -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";
Re: [PATCH] arm64: dts: rockchip: move rk3399-sapphire PCIe to excavator baseboard
In reply to a message not in the archiveAm Montag, 26. Februar 2018, 19:57:21 CET schrieb Vicente Bergas:
Quoted 17 lines
The PCIe signals are routed through the connector to the baseboard.
Signed-off-by Vicente Bergas <[email protected]>Tested-by Vicente Bergas <[email protected]>--- .../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(-)(quoted diff) +0
-0
b/arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dtsindex56952d1a3fb8..4d47150d6862100644arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts +0
-0@@ -190,6 +190,21 @@ status = "okay"; };
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts line 201
Quoted 10 lines
arch/arm64/boot/dts/rockchip/rk3399-sapphire-excavator.dts +9
-0+&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