arm64: dts: enable SATA on Gen3 boards
Subsystems (2)
cover arm64: dts: enable SATA on Gen3 boards
Since Geert also argumented that it is reasonable to have this in the board DTS files [1], I converted the RFC into proper patches. So, SATA will be available out of the box for H3 and M3-N if MD12 is switched off properly.
Patches are bases on current renesas-drivers/master. M3-N has been tested successfully, too.
[1] https://patchwork.kernel.org/patch/10131041/
Changes since RFC:
* added comments
* kept the sorting
* used GPIO macros instead of hardcoded values
* added Geert's tag
* added a patch for M3-N, too
Wolfram Sang (2):
arm64: dts: r8a7795: salvator-xs: enable SATA
arm64: dts: r8a77965: salvator-xs: enable SATA
arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts | 14 ++++++++++++++ arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts | 14 ++++++++++++++ 2 files changed, 28 insertions(+)
Signature · 1 line
2.11.0
PATCH 1/2 arm64: dts: r8a7795: salvator-xs: enable SATA
Add the nodes to enable SATA. Note that MD12 (SW12-7) must be switched off for that to work.
--- arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts +14 -0
@@ -152,6 +152,15 @@ }; }; +&pca9654 { + pcie_sata_switch { + gpio-hog; + gpios = <7 GPIO_ACTIVE_HIGH>; + output-low; /* enable SATA by default */ + line-name = "PCIE/SATA switch"; + }; +}; + &pfc { usb2_pins: usb2 { groups = "usb2";
@@ -176,6 +185,11 @@ }; }; + /* MD12 (SW12-7) must be set 'Off' which is not the default! */ +&sata { + status = "okay"; +}; + &usb2_phy2 { pinctrl-0 = <&usb2_pins>; pinctrl-names = "default";
Signature · 1 line
2.11.0
Re: [PATCH 1/2] arm64: dts: r8a7795: salvator-xs: enable SATA
Hi Wolfram
Quoted 2 lines · Wolfram Sang
Add the nodes to enable SATA. Note that MD12 (SW12-7) must be switched off for that to work.
Thanks for your patch!
Quoted 2 lines
Signed-off-by Wolfram Sang <[email protected]>Tested-by Geert Uytterhoeven <[email protected]>
arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts line 188
Quoted 8 lines
arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts +1
-0@@ -176,6 +185,11 @@ }; }; + /* MD12 (SW12-7) must be set 'Off' which is not the default! */
Weird indentation?
Either drop the indentation, or move the comment inside the &sata node?
arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts line 195
Quoted 7 lines
arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts +4
-0+&sata { + status = "okay"; +}; + &usb2_phy2 { pinctrl-0 = <&usb2_pins>; pinctrl-names = "default";
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
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
PATCH 2/2 arm64: dts: r8a77965: salvator-xs: enable SATA
In reply to Wolfram SangAdd the nodes to enable SATA. Note that MD12 (SW12-7) must be switched off for that to work.
--- arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts +14 -0
@@ -47,3 +47,17 @@ &hdmi0_con { remote-endpoint = <&rcar_dw_hdmi0_out>; }; + +&pca9654 { + pcie_sata_switch { + gpio-hog; + gpios = <7 GPIO_ACTIVE_HIGH>; + output-low; /* enable SATA by default */ + line-name = "PCIE/SATA switch"; + }; +}; + + /* MD12 (SW12-7) must be set 'Off' which is not the default! */ +&sata { + status = "okay"; +};
Signature · 1 line
2.11.0
Re: [PATCH 2/2] arm64: dts: r8a77965: salvator-xs: enable SATA
Quoted 4 lines · Wolfram Sang
Add the nodes to enable SATA. Note that MD12 (SW12-7) must be switched off for that to work.
Signed-off-by Wolfram Sang <[email protected]>
Quoted 7 lines
arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts +1
-0@@ -47,3 +47,17 @@ &hdmi0_con { remote-endpoint = <&rcar_dw_hdmi0_out>; }; +
arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts line 60
Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts +10
-0+&pca9654 { + pcie_sata_switch { + gpio-hog; + gpios = <7 GPIO_ACTIVE_HIGH>; + output-low; /* enable SATA by default */ + line-name = "PCIE/SATA switch"; + }; +}; + + /* MD12 (SW12-7) must be set 'Off' which is not the default! */
Weird indentation?
arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts line 63
Quoted 3 lines
arch/arm64/boot/dts/renesas/r8a77965-salvator-xs.dts +3
-0+&sata { + status = "okay"; +};
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
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
Quoted 17 lines · Wolfram Sang
Since Geert also argumented that it is reasonable to have this in the board DTS files [1], I converted the RFC into proper patches. So, SATA will be available out of the box for H3 and M3-N if MD12 is switched off properly.
Patches are bases on current renesas-drivers/master. M3-N has been tested successfully, too.
[1] https://patchwork.kernel.org/patch/10131041/
Changes since RFC:
* added comments
* kept the sorting
* used GPIO macros instead of hardcoded values
* added Geert's tag
* added a patch for M3-N, too
Quoted 3 lines
Wolfram Sang (2):
arm64: dts: r8a7795: salvator-xs: enable SATA
arm64: dts: r8a77965: salvator-xs: enable SATA
Thanks, this looks fine to me Fundamentally these patches are doing the same things to two (related) pieces of hardware. So as part of "project squash" please squash the two patches into one.