diff mbox

[RFC,v2] arm64: dts: r8a7795: salvator-xs: enable SATA

Message ID 20171222201313.8466-1-wsa+renesas@sang-engineering.com (mailing list archive)
State Changes Requested
Delegated to: Simon Horman
Headers show

Commit Message

Wolfram Sang Dec. 22, 2017, 8:13 p.m. UTC
SATA needs this GPIO hog, so is probably an overlay?

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

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(+)

Comments

Geert Uytterhoeven July 20, 2018, 11:47 a.m. UTC | #1
Hi Wolfram,

Thanks for your patch!

On Fri, Dec 22, 2017 at 9:13 PM Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> 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.

> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
> @@ -101,6 +101,19 @@
>         };
>  };
>
> +&pca9654 {

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

> +       pcie_sata_switch {
> +               gpio-hog;
> +               gpios = <7 0>;

s/0/GPIO_ACTIVE_HIGH/?

> +               output-low;
> +               line-name = "PCIE/SATA switch";

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

> +       };
> +};
> +
> +&sata {
> +       status = "okay";
> +};
> +
>  &usb2_phy2 {
>         pinctrl-0 = <&usb2_pins>;
>         pinctrl-names = "default";

Gr{oetje,eeting}s,

                        Geert
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
index 7675de5d4f2cb1..c4a893b90e4778 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
@@ -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";