From: Guodong Xu <guodong@riscstar.com>
To: Conor Dooley <conor@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Emil Renner Berthing <kernel@esmil.dk>,
rafal@milecki.pl, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Neil Armstrong <neil.armstrong@linaro.org>,
Heiko Stuebner <heiko.stuebner@cherry.de>,
Michael Zhu <michael.zhu@starfivetech.com>,
Drew Fustini <drew@beagleboard.org>,
Alexandru Stan <ams@frame.work>, Daniel Schaefer <dhs@frame.work>,
Sandie Cao <sandie.cao@deepcomputing.io>,
Yuning Liang <yuning.liang@deepcomputing.io>,
Huiming Qiu <huiming.qiu@deepcomputing.io>,
Alex Elder <elder@riscstar.com>,
linux@frame.work, devicetree@vger.kernel.org,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
Guodong Xu <guodong@riscstar.com>,
Emil Renner Berthing <emil.renner.berthing@canonical.com>
Subject: [PATCH v7 2/5] riscv: dts: starfive: jh7110-common: move usb0 config to board dts
Date: Mon, 28 Oct 2024 16:25:50 +0800 [thread overview]
Message-ID: <20241028082553.1989797-3-guodong@riscstar.com> (raw)
In-Reply-To: <20241028082553.1989797-1-guodong@riscstar.com>
The JH7110 USB0 can operate as a dual-role USB device. Different
boards can have different configuration.
For all current boards this device operates in peripheral mode, but
on a new board this operates in host mode. This property will no
longer be common, so define the "dr_mode" property in the board files
rather than in the common DTSI file.
Signed-off-by: Alex Elder <elder@riscstar.com>
Signed-off-by: Guodong Xu <guodong@riscstar.com>
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
---
v7: Add Emil's Reviewed-by
v6: New patch
arch/riscv/boot/dts/starfive/jh7110-common.dtsi | 5 -----
arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts | 5 +++++
arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts | 5 +++++
.../boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi | 5 +++++
4 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
index 9e77f79ec162..87ea81e9fed4 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-common.dtsi
@@ -637,11 +637,6 @@ &uart0 {
status = "okay";
};
-&usb0 {
- dr_mode = "peripheral";
- status = "okay";
-};
-
&U74_1 {
cpu-supply = <&vdd_cpu>;
};
diff --git a/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
index 66ad3eb2fd66..0d248b671d4b 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-milkv-mars.dts
@@ -52,3 +52,8 @@ &pwmdac {
&spi0 {
status = "okay";
};
+
+&usb0 {
+ dr_mode = "peripheral";
+ status = "okay";
+};
diff --git a/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts b/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts
index dbc8612b8464..d5180c67ac55 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts
+++ b/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts
@@ -80,3 +80,8 @@ &pwmdac {
&spi0 {
status = "okay";
};
+
+&usb0 {
+ dr_mode = "peripheral";
+ status = "okay";
+};
diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
index ef93a394bb2f..5f14afb2c24d 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
@@ -60,3 +60,8 @@ &pwmdac {
&spi0 {
status = "okay";
};
+
+&usb0 {
+ dr_mode = "peripheral";
+ status = "okay";
+};
--
2.34.1
next prev parent reply other threads:[~2024-10-28 8:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 8:25 [PATCH v7 0/5] Add DeepComputing FML13V01 board dts Guodong Xu
2024-10-28 8:25 ` [PATCH v7 1/5] riscv: dts: starfive: jh7110-common: revised device node Guodong Xu
2024-10-28 8:25 ` Guodong Xu [this message]
2024-10-28 8:25 ` [PATCH v7 3/5] dt-bindings: vendor: add deepcomputing Guodong Xu
2024-10-28 8:25 ` [PATCH v7 4/5] dt-bindings: riscv: starfive: add deepcomputing,fml13v01 Guodong Xu
2024-10-28 8:25 ` [PATCH v7 5/5] riscv: dts: starfive: add DeepComputing FML13V01 board device tree Guodong Xu
2024-10-31 12:26 ` [PATCH v7 0/5] Add DeepComputing FML13V01 board dts Conor Dooley
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=20241028082553.1989797-3-guodong@riscstar.com \
--to=guodong@riscstar.com \
--cc=ams@frame.work \
--cc=aou@eecs.berkeley.edu \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dhs@frame.work \
--cc=drew@beagleboard.org \
--cc=elder@riscstar.com \
--cc=emil.renner.berthing@canonical.com \
--cc=gregkh@linuxfoundation.org \
--cc=heiko.stuebner@cherry.de \
--cc=huiming.qiu@deepcomputing.io \
--cc=kernel@esmil.dk \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@frame.work \
--cc=michael.zhu@starfivetech.com \
--cc=neil.armstrong@linaro.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rafal@milecki.pl \
--cc=robh@kernel.org \
--cc=sandie.cao@deepcomputing.io \
--cc=yuning.liang@deepcomputing.io \
/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