summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/renesas/salvator-xs.dtsi
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2021-06-07 20:39:05 +0300
committerGeert Uytterhoeven <geert+renesas@glider.be>2021-07-19 11:51:34 +0300
commit3a44a8d130e15939e30f37086055055893c91a02 (patch)
tree0bf1ceb9f11a4b73f1d29570a1d5e8869ecbb1ea /arch/arm64/boot/dts/renesas/salvator-xs.dtsi
parentd18fb00dd0885d547ca67eab88f72e4cc382a4e5 (diff)
downloadlinux-3a44a8d130e15939e30f37086055055893c91a02.tar.xz
arm64: dts: renesas: salvator-xs: Factor out USB ch3 parts
Move 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. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Link: https://lore.kernel.org/r/411df1adfd64ee82e5a0d1603df85d657fd4f8c0.1623087028.git.geert+renesas@glider.be
Diffstat (limited to 'arch/arm64/boot/dts/renesas/salvator-xs.dtsi')
-rw-r--r--arch/arm64/boot/dts/renesas/salvator-xs.dtsi43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/renesas/salvator-xs.dtsi b/arch/arm64/boot/dts/renesas/salvator-xs.dtsi
index 3f7f6cf4a333..08b925624e12 100644
--- a/arch/arm64/boot/dts/renesas/salvator-xs.dtsi
+++ b/arch/arm64/boot/dts/renesas/salvator-xs.dtsi
@@ -40,3 +40,46 @@
/* SW12-7 must be set 'Off' (MD12 set to 1) which is not the default! */
#endif /* SOC_HAS_SATA */
+
+#ifdef SOC_HAS_USB2_CH3
+&ehci3 {
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&hsusb3 {
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&ohci3 {
+ dr_mode = "otg";
+ status = "okay";
+};
+
+&pfc {
+ /*
+ * - On Salvator-X[S], GP6_3[01] are connected to ADV7482 as irq pins
+ * (when SW31 is the default setting on Salvator-XS).
+ * - If SW31 is the default setting, you cannot use USB2.0 ch3 on
+ * r8a77951 with Salvator-XS.
+ * Hence the SW31 setting must be changed like 2) below.
+ * 1) Default setting of SW31: ON-ON-OFF-OFF-OFF-OFF:
+ * - Connect GP6_3[01] to ADV7842.
+ * 2) Changed setting of SW31: OFF-OFF-ON-ON-ON-ON:
+ * - Connect GP6_3[01] to BD082065 (USB2.0 ch3's host power).
+ * - Connect GP6_{04,21} to ADV7842.
+ */
+ usb2_ch3_pins: usb2_ch3 {
+ groups = "usb2_ch3";
+ function = "usb2_ch3";
+ };
+};
+
+&usb2_phy3 {
+ pinctrl-0 = <&usb2_ch3_pins>;
+ pinctrl-names = "default";
+
+ status = "okay";
+};
+#endif /* SOC_HAS_USB2_CH3 */