From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-renesas-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH 3/4] arm64: dts: renesas: salvator-x(s): Factor out USB ch2 parts
Date: Mon, 7 Jun 2021 19:39:04 +0200 [thread overview]
Message-ID: <ebc434502fc899b1f9d9640f560c3eaab6bb0927.1623087028.git.geert+renesas@glider.be> (raw)
In-Reply-To: <cover.1623087028.git.geert+renesas@glider.be>
Move 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.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
.../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(-)
diff --git a/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts
index 199bd909c4008451..c6ca61a8ed40eb9d 100644
--- a/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts
@@ -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";
-};
diff --git a/arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts
index 74de36703bc02b90..d8e655ba81bd5939 100644
--- a/arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77951-salvator-x.dts
@@ -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";
-};
diff --git a/arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts
index e9d421d7fcbbc404..bdea6f84ddb5cccd 100644
--- a/arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts
+++ b/arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dts
@@ -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";
diff --git a/arch/arm64/boot/dts/renesas/r8a77951.dtsi b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
index 4602ebf5d28945d2..fd3180ddc7bff452 100644
--- a/arch/arm64/boot/dts/renesas/r8a77951.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77951.dtsi
@@ -13,6 +13,7 @@
#define SOC_HAS_HDMI1
#define SOC_HAS_SATA
+#define SOC_HAS_USB2_CH2
/ {
compatible = "renesas,r8a7795";
diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
index 11bca200cf3d8ad5..de959f28ad6ce27b 100644
--- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
@@ -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 */
--
2.25.1
next prev parent reply other threads:[~2021-06-07 17:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-07 17:39 [PATCH 0/4] arm64: dts: renesas: salvator-x(s): Factor out common optional parts Geert Uytterhoeven
2021-06-07 17:39 ` [PATCH 1/4] arm64: dts: renesas: salvator-x(s): Factor out HDMI1 parts Geert Uytterhoeven
2021-06-07 17:39 ` [PATCH 2/4] arm64: dts: renesas: salvator-x(s): Factor out SATA parts Geert Uytterhoeven
2021-06-07 17:39 ` Geert Uytterhoeven [this message]
2021-06-07 17:39 ` [PATCH 4/4] arm64: dts: renesas: salvator-xs: Factor out USB ch3 parts Geert Uytterhoeven
2021-06-08 11:17 ` [PATCH 0/4] arm64: dts: renesas: salvator-x(s): Factor out common optional parts Niklas Söderlund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ebc434502fc899b1f9d9640f560c3eaab6bb0927.1623087028.git.geert+renesas@glider.be \
--to=geert+renesas@glider.be \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).