Skip to contentSkip to conversation

arm64: dts: r8a7795: salvator-xs: enable SATA

RFC In review Wolfram Sang 2 participants 2 messages Dec 22, 2017 – Jul 20, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC v2 1/1 arm64: dts: r8a7795: salvator-xs: enable SATA

SATA needs this GPIO hog, so is probably an overlay?

---

Changes since RFC v1:

* add second cell to 'gpios' property

 arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts +13 -0
index 7675de5d4f2cb1..c4a893b90e4778 100644
@@ -101,6 +101,19 @@
 	};
 };
 
+&pca9654 {
+	pcie_sata_switch {
+		gpio-hog;
+		gpios = <7 0>;
+		output-low;
+		line-name = "PCIE/SATA switch";
+	};
+};
+
+&sata {
+	status = "okay";
+};
+
 &usb2_phy2 {
 	pinctrl-0 = <&usb2_pins>;
 	pinctrl-names = "default";
Signature · 1 line
2.11.0
Tested-by on v2 1/1
#1 lore raw

Hi Wolfram,

Thanks for your patch!

Quoted 1 line · Wolfram Sang

SATA needs this GPIO hog, so is probably an overlay?

IMHO it can be part of the real board DTS, for the following reasons:
1. SATA is multiplexed with PCIE1, but the SATA connector is on-board, while using PCIE1 requires plugging in an extension board in EXIO Connector A.
2. PCIE1 is the default, for both MD12 and the PCIE-SATA switch, but I assume that is only the case because Salvator-XS supports all of R-Car H3 ES2, M3-W, and M3-N, while M3-W does not have SATA.

Note that for the GPIO hog to survive s2ram, the pca9654 driver needs to be enhanced to restore its configuration after system resume.

Quoted 1 line

arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts line 104

Quoted 7 lines
arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts +1 -0
@@ -101,6 +101,19 @@
        };
 };
 
+&pca9654 {

Please insert this node just before &pfc, to preserve sort order.

arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts line 107

Quoted 3 lines
arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts +3 -0
+       pcie_sata_switch {
+               gpio-hog;
+               gpios = <7 0>;

s/0/GPIO_ACTIVE_HIGH/?

arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts line 109

Quoted 2 lines
arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts +2 -0
+               output-low;
+               line-name = "PCIE/SATA switch";

Perhaps add a comment saying MD12 must be 1 (SW12-7 must be off)?

arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts line 119

Quoted 10 lines
arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts +7 -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