arm64: dts: renesas: salvator-x(s): Factor out common optional parts
Subsystems (2)
Geert Uytterhoeven
maintainercover arm64: dts: renesas: salvator-x(s): Factor out common optional parts
Hi all,
The Renesas Salvator-X(S) family of boards are available with different SiP options (R-Car H3 ES1.x, H3 ES2.0+, M3-W, M3-W+, M3-N). To reduce duplication of board descriptions, the parts common to all SoC and board combinations are already factored out into salvator-common.dtsi, salvator-x.dtsi, and salvator-xs.dtsi. Still, there are a few board features that are not common to all combos, as the corresponding support is not present on all SoCs.
Hence this patch series moves out support for the second HDMI channel, the SATA interface, and the third and fourth USB channels to salvator-common.dtsi and/or salvator-xs.dtsi. As these are not present on all SoCs, its descriptions are protected by SOC_HAS_* preprocessor symbols, defined in SoC-specific .dtsi files.
This series causes no changes in the generated DTB, except for the enablement of the SATA device node on Salvator-X board with an R-Car M3-N SiP, cfr. the comments in [PATCH 2/4].
Thanks for your comments!
Geert Uytterhoeven (4):
arm64: dts: renesas: salvator-x(s): Factor out HDMI1 parts
arm64: dts: renesas: salvator-x(s): Factor out SATA parts
arm64: dts: renesas: salvator-x(s): Factor out USB ch2 parts
arm64: dts: renesas: salvator-xs: Factor out USB ch3 parts
.../boot/dts/renesas/r8a77950-salvator-x.dts | 73 ----------- arch/arm64/boot/dts/renesas/r8a77950.dtsi | 2 + .../boot/dts/renesas/r8a77951-salvator-x.dts | 73 ----------- .../boot/dts/renesas/r8a77951-salvator-xs.dts | 122 ------------------ arch/arm64/boot/dts/renesas/r8a77951.dtsi | 5 + .../boot/dts/renesas/r8a77965-salvator-xs.dts | 14 -- arch/arm64/boot/dts/renesas/r8a77965.dtsi | 2 + .../boot/dts/renesas/salvator-common.dtsi | 76 ++++++++++- arch/arm64/boot/dts/renesas/salvator-xs.dtsi | 56 ++++++++ 9 files changed, 140 insertions(+), 283 deletions(-)
Signature · 12 lines
2.25.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsGeert Uytterhoeven
maintainerPATCH 1/4 arm64: dts: renesas: salvator-x(s): Factor out HDMI1 parts
Move the common parts related to the second HDMI interface on Salvator-X(S) boards to salvator-common.dtsi, to reduce current and avoid future duplication of board descriptions.
As this interface is not present on all SoCs that can be found on Salvator-X(S), but only on R-Car H3, its description are protected by the preprocessor symbol SOC_HAS_HDMI1, defined in r8a77951.dtsi.
--- .../boot/dts/renesas/r8a77950-salvator-x.dts | 47 ------------------- .../boot/dts/renesas/r8a77951-salvator-x.dts | 47 ------------------- .../boot/dts/renesas/r8a77951-salvator-xs.dts | 47 ------------------- arch/arm64/boot/dts/renesas/r8a77951.dtsi | 2 + .../boot/dts/renesas/salvator-common.dtsi | 46 +++++++++++++++++- 5 files changed, 47 insertions(+), 142 deletions(-)
arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts +0 -47
@@ -52,29 +52,6 @@ &ehci2 { status = "okay"; }; -&hdmi1 { - status = "okay"; - - ports { - port@1 { - reg = <1>; - rcar_dw_hdmi1_out: endpoint { - remote-endpoint = <&hdmi1_con>; - }; - }; - port@2 { - reg = <2>; - dw_hdmi1_snd_in: endpoint { - remote-endpoint = <&rsnd_endpoint2>; - }; - }; - }; -}; - -&hdmi1_con { - remote-endpoint = <&rcar_dw_hdmi1_out>; -}; - &ohci2 { status = "okay"; };
@@ -86,34 +63,10 @@ usb2_pins: usb2 { }; }; -&rcar_sound { - ports { - /* rsnd_port0/1 are described in salvator-common.dtsi */ - rsnd_port2: port@2 { - reg = <2>; - rsnd_endpoint2: endpoint { - remote-endpoint = <&dw_hdmi1_snd_in>; - - dai-format = "i2s"; - bitclock-master = <&rsnd_endpoint2>; - frame-master = <&rsnd_endpoint2>; - - playback = <&ssi3>; - }; - }; - }; -}; - &sata { status = "okay"; }; -&sound_card { - dais = <&rsnd_port0 /* ak4613 */ - &rsnd_port1 /* HDMI0 */ - &rsnd_port2>; /* HDMI1 */ -}; - &usb2_phy2 { pinctrl-0 = <&usb2_pins>; pinctrl-names = "default";
arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts +0 -47
63 lines not on this page · raw message
arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts +0 -47
64 lines not on this page · raw message
arch/arm64/boot/dts/renesas/r8a77951.dtsi +2 -0
@@ -11,6 +11,8 @@ #define CPG_AUDIO_CLK_I R8A7795_CLK_S0D4 +#define SOC_HAS_HDMI1 + / { compatible = "renesas,r8a7795"; #address-cells = <2>;
arch/arm64/boot/dts/renesas/salvator-common.dtsi +45 -1
64 lines not on this page · raw message
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 2/4 arm64: dts: renesas: salvator-x(s): Factor out SATA parts
In reply to Geert UytterhoevenMove the common parts related to the SATA interface on Salvator-X(S) boards to salvator-common.dtsi and salvator-xs.dtsi, to reduce current and avoid future duplication of board descriptions.
As this interface is not present on all SoCs that can be found on Salvator-X(S), but only on R-Car H3 and M3-N, its descriptions are protected by the preprocessor symbol SOC_HAS_SATA, defined in r8a77951.dtsi and r8a77965.dtsi.
---
After this, the SATA device node in r8a77965-salvator-x.dtb is no longer disabled. However, I'm not sure if SATA is actually supported on the (rare) combination of a Salvator-X board with an R-Car M3-N SiP. Perhaps it should be kept disabled, by undefining SOC_HAS_SATA in arch/arm64/boot/dts/renesas/r8a77965-salvator-x.dts, right after the inclusion of r8a77965.dtsi?
--- .../arm64/boot/dts/renesas/r8a77950-salvator-x.dts | 4 ---- .../arm64/boot/dts/renesas/r8a77951-salvator-x.dts | 4 ---- .../boot/dts/renesas/r8a77951-salvator-xs.dts | 14 -------------- arch/arm64/boot/dts/renesas/r8a77951.dtsi | 1 + .../boot/dts/renesas/r8a77965-salvator-xs.dts | 14 -------------- arch/arm64/boot/dts/renesas/r8a77965.dtsi | 2 ++ arch/arm64/boot/dts/renesas/salvator-common.dtsi | 6 ++++++ arch/arm64/boot/dts/renesas/salvator-xs.dtsi | 13 +++++++++++++ 8 files changed, 22 insertions(+), 36 deletions(-)
arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts +0 -4
@@ -63,10 +63,6 @@ usb2_pins: usb2 { }; }; -&sata { - status = "okay"; -}; - &usb2_phy2 { pinctrl-0 = <&usb2_pins>; pinctrl-names = "default";
arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts +0 -4
@@ -63,10 +63,6 @@ usb2_pins: usb2 { }; }; -&sata { - status = "okay"; -}; - &usb2_phy2 { pinctrl-0 = <&usb2_pins>; pinctrl-names = "default";
arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts +0 -14
@@ -71,15 +71,6 @@ &ohci3 { status = "okay"; }; -&pca9654 { - pcie-sata-switch-hog { - gpio-hog; - gpios = <7 GPIO_ACTIVE_HIGH>; - output-low; /* enable SATA by default */ - line-name = "PCIE/SATA switch"; - }; -}; - &pfc { usb2_pins: usb2 { groups = "usb2";
@@ -104,11 +95,6 @@ usb2_ch3_pins: usb2_ch3 { }; }; -/* SW12-7 must be set 'Off' (MD12 set to 1) which is not the default! */ -&sata { - status = "okay"; -}; - &usb2_phy2 { pinctrl-0 = <&usb2_pins>; pinctrl-names = "default";
arch/arm64/boot/dts/renesas/r8a77951.dtsi +1 -0
@@ -12,6 +12,7 @@ #define CPG_AUDIO_CLK_I R8A7795_CLK_S0D4 #define SOC_HAS_HDMI1 +#define SOC_HAS_SATA / { compatible = "renesas,r8a7795";
arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts +0 -14
@@ -30,17 +30,3 @@ &du { clock-names = "du.0", "du.1", "du.3", "dclkin.0", "dclkin.1", "dclkin.3"; }; - -&pca9654 { - pcie-sata-switch-hog { - gpio-hog; - gpios = <7 GPIO_ACTIVE_HIGH>; - output-low; /* enable SATA by default */ - line-name = "PCIE/SATA switch"; - }; -}; - -/* SW12-7 must be set 'Off' (MD12 set to 1) which is not the default! */ -&sata { - status = "okay"; -};
arch/arm64/boot/dts/renesas/r8a77965.dtsi +2 -0
@@ -14,6 +14,8 @@ #define CPG_AUDIO_CLK_I R8A77965_CLK_S0D4 +#define SOC_HAS_SATA + / { compatible = "renesas,r8a77965"; #address-cells = <2>;
arch/arm64/boot/dts/renesas/salvator-common.dtsi +6 -0
@@ -876,6 +876,12 @@ &rwdt { status = "okay"; }; +#ifdef SOC_HAS_SATA +&sata { + status = "okay"; +}; +#endif /* SOC_HAS_SATA */ + &scif1 { pinctrl-0 = <&scif1_pins>; pinctrl-names = "default";
arch/arm64/boot/dts/renesas/salvator-xs.dtsi +13 -0
@@ -27,3 +27,16 @@ versaclock6: clock-generator@6a { clock-names = "xin"; }; }; + +#ifdef SOC_HAS_SATA +&pca9654 { + pcie-sata-switch-hog { + gpio-hog; + gpios = <7 GPIO_ACTIVE_HIGH>; + output-low; /* enable SATA by default */ + line-name = "PCIE/SATA switch"; + }; +}; + +/* SW12-7 must be set 'Off' (MD12 set to 1) which is not the default! */ +#endif /* SOC_HAS_SATA */
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 3/4 arm64: dts: renesas: salvator-x(s): Factor out USB ch2 parts
In reply to Geert UytterhoevenMove the common parts related to the third USB2 interface on Salvator-X(S) boards to salvator-common.dtsi, to reduce current and avoid future duplication of board descriptions.
As this interface is not present on all SoCs that can be found on Salvator-X(S), but only on R-Car H3, its descriptions are protected by the preprocessor symbol SOC_HAS_USB2_CH2, defined in r8a77951.dtsi.
--- .../boot/dts/renesas/r8a77950-salvator-x.dts | 22 ----------------- .../boot/dts/renesas/r8a77951-salvator-x.dts | 22 ----------------- .../boot/dts/renesas/r8a77951-salvator-xs.dts | 20 ---------------- arch/arm64/boot/dts/renesas/r8a77951.dtsi | 1 + .../boot/dts/renesas/salvator-common.dtsi | 24 +++++++++++++++++++ 5 files changed, 25 insertions(+), 64 deletions(-)
arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts +0 -22
@@ -47,25 +47,3 @@ &du { clock-names = "du.0", "du.1", "du.2", "du.3", "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3"; }; - -&ehci2 { - status = "okay"; -}; - -&ohci2 { - status = "okay"; -}; - -&pfc { - usb2_pins: usb2 { - groups = "usb2"; - function = "usb2"; - }; -}; - -&usb2_phy2 { - pinctrl-0 = <&usb2_pins>; - pinctrl-names = "default"; - - status = "okay"; -};
arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts +0 -22
@@ -47,25 +47,3 @@ &du { clock-names = "du.0", "du.1", "du.2", "du.3", "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3"; }; - -&ehci2 { - status = "okay"; -}; - -&ohci2 { - status = "okay"; -}; - -&pfc { - usb2_pins: usb2 { - groups = "usb2"; - function = "usb2"; - }; -}; - -&usb2_phy2 { - pinctrl-0 = <&usb2_pins>; - pinctrl-names = "default"; - - status = "okay"; -};
arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts +0 -20
@@ -48,10 +48,6 @@ &du { "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3"; }; -&ehci2 { - status = "okay"; -}; - &ehci3 { dr_mode = "otg"; status = "okay";
@@ -62,21 +58,12 @@ &hsusb3 { status = "okay"; }; -&ohci2 { - status = "okay"; -}; - &ohci3 { dr_mode = "otg"; status = "okay"; }; &pfc { - usb2_pins: usb2 { - groups = "usb2"; - function = "usb2"; - }; - /* * - On Salvator-X[S], GP6_3[01] are connected to ADV7482 as irq pins * (when SW31 is the default setting on Salvator-XS).
@@ -95,13 +82,6 @@ usb2_ch3_pins: usb2_ch3 { }; }; -&usb2_phy2 { - pinctrl-0 = <&usb2_pins>; - pinctrl-names = "default"; - - status = "okay"; -}; - &usb2_phy3 { pinctrl-0 = <&usb2_ch3_pins>; pinctrl-names = "default";
arch/arm64/boot/dts/renesas/r8a77951.dtsi +1 -0
@@ -13,6 +13,7 @@ #define SOC_HAS_HDMI1 #define SOC_HAS_SATA +#define SOC_HAS_USB2_CH2 / { compatible = "renesas,r8a7795";
arch/arm64/boot/dts/renesas/salvator-common.dtsi +24 -0
@@ -1029,3 +1029,27 @@ &xhci0 { status = "okay"; }; + +#ifdef SOC_HAS_USB2_CH2 +&ehci2 { + status = "okay"; +}; + +&ohci2 { + status = "okay"; +}; + +&pfc { + usb2_pins: usb2 { + groups = "usb2"; + function = "usb2"; + }; +}; + +&usb2_phy2 { + pinctrl-0 = <&usb2_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; +#endif /* SOC_HAS_USB2_CH2 */
Signature · 1 line
2.25.1
Geert Uytterhoeven
maintainerPATCH 4/4 arm64: dts: renesas: salvator-xs: Factor out USB ch3 parts
In reply to Geert UytterhoevenMove the parts related to the fourth USB2 interface on Salvator-XS boards to salvator-xs.dtsi, to avoid future duplication of board descriptions.
As this interface is not present on all SoCs that can be found on Salvator-X(S), but only on R-Car H3 ES2.0+, its descriptions are protected by the preprocessor symbol SOC_HAS_USB2_CH3, defined in r8a77951.dtsi, and undefined in r8a77950.dtsi.
--- arch/arm64/boot/dts/renesas/r8a77950.dtsi | 2 + .../boot/dts/renesas/r8a77951-salvator-xs.dts | 41 ------------------ arch/arm64/boot/dts/renesas/r8a77951.dtsi | 1 + arch/arm64/boot/dts/renesas/salvator-xs.dtsi | 43 +++++++++++++++++++ 4 files changed, 46 insertions(+), 41 deletions(-)
arch/arm64/boot/dts/renesas/r8a77950.dtsi +2 -0
@@ -7,6 +7,8 @@ #include "r8a77951.dtsi" +#undef SOC_HAS_USB2_CH3 + &audma0 { iommus = <&ipmmu_mp1 0>, <&ipmmu_mp1 1>, <&ipmmu_mp1 2>, <&ipmmu_mp1 3>,
arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts +0 -41
44 lines not on this page · raw message
arch/arm64/boot/dts/renesas/r8a77951.dtsi +1 -0
@@ -14,6 +14,7 @@ #define SOC_HAS_HDMI1 #define SOC_HAS_SATA #define SOC_HAS_USB2_CH2 +#define SOC_HAS_USB2_CH3 / { compatible = "renesas,r8a7795";
arch/arm64/boot/dts/renesas/salvator-xs.dtsi +43 -0
46 lines not on this page · raw message
Signature · 1 line
2.25.1
Hi Geert,
Thanks for your work.
Quoted 16 lines · Geert Uytterhoeven
Hi all,
The Renesas Salvator-X(S) family of boards are available with different SiP options (R-Car H3 ES1.x, H3 ES2.0+, M3-W, M3-W+, M3-N). To reduce duplication of board descriptions, the parts common to all SoC and board combinations are already factored out into
salvator-common.dtsi,salvator-x.dtsi, andsalvator-xs.dtsi. Still, there are a few board features that are not common to all combos, as the corresponding support is not present on all SoCs.Hence this patch series moves out support for the second HDMI channel, the SATA interface, and the third and fourth USB channels to
salvator-common.dtsiand/orsalvator-xs.dtsi. As these are not present on all SoCs, its descriptions are protected by SOC_HAS_* preprocessor symbols, defined in SoC-specific .dtsi files.
Quoted 5 lines
This series causes no changes in the generated DTB, except for the enablement of the SATA device node on Salvator-X board with an R-Car M3-N SiP, cfr. the comments in [PATCH 2/4].
Thanks for your comments!
With a bit more of logic in dts files we might get back to board files ;-) For the whole series,
Quoted 31 lines
Geert Uytterhoeven (4):
arm64: dts: renesas: salvator-x(s): Factor out HDMI1 parts
arm64: dts: renesas: salvator-x(s): Factor out SATA parts
arm64: dts: renesas: salvator-x(s): Factor out USB ch2 parts
arm64: dts: renesas: salvator-xs: Factor out USB ch3 parts.../boot/dts/renesas/r8a77950-salvator-x.dts | 73 ----------- arch/arm64/boot/dts/renesas/r8a77950.dtsi | 2 + .../boot/dts/renesas/r8a77951-salvator-x.dts | 73 ----------- .../boot/dts/renesas/r8a77951-salvator-xs.dts | 122 ------------------ arch/arm64/boot/dts/renesas/r8a77951.dtsi | 5 + .../boot/dts/renesas/r8a77965-salvator-xs.dts | 14 -- arch/arm64/boot/dts/renesas/r8a77965.dtsi | 2 + .../boot/dts/renesas/salvator-common.dtsi | 76 ++++++++++- arch/arm64/boot/dts/renesas/salvator-xs.dtsi | 56 ++++++++ 9 files changed, 140 insertions(+), 283 deletions(-)Signature · 12 lines
2.25.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Signature · 2 lines
Regards, Niklas Söderlund