From: Chen-Yu Yeh <chenyou910331@gmail.com>
To: Vinod Koul <vkoul@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Inochi Amaoto <inochiama@gmail.com>,
Chen Wang <chen.wang@linux.dev>
Cc: Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
Hiago De Franco <hfranco@baylibre.com>,
linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
sophgo@lists.linux.dev, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org,
Chen-Yu Yeh <chenyou910331@gmail.com>
Subject: [PATCH 1/3] dt-bindings: phy: sophgo,cv1800b-usb2-phy: Add USB role switch properties
Date: Tue, 3 Nov 2026 16:58:45 +0800 [thread overview]
Message-ID: <20261103085847.338613-2-chenyou910331@gmail.com> (raw)
In-Reply-To: <20261103085847.338613-1-chenyou910331@gmail.com>
The USB role on CV18XX/SG200X is selected by the ID override in the top
syscon, which belongs to this PHY, so the PHY is what provides the role
switch.
Allow usb-role-switch and role-switch-default-mode on the PHY node. The
default mode only has a meaning when the role switch is present.
Signed-off-by: Chen-Yu Yeh <chenyou910331@gmail.com>
---
.../bindings/phy/sophgo,cv1800b-usb2-phy.yaml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Documentation/devicetree/bindings/phy/sophgo,cv1800b-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/sophgo,cv1800b-usb2-phy.yaml
index 2ff8f85d0282..a1d164686b07 100644
--- a/Documentation/devicetree/bindings/phy/sophgo,cv1800b-usb2-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/sophgo,cv1800b-usb2-phy.yaml
@@ -34,6 +34,15 @@ properties:
resets:
maxItems: 1
+ usb-role-switch:
+ $ref: /schemas/usb/usb-drd.yaml#/properties/usb-role-switch
+
+ role-switch-default-mode:
+ $ref: /schemas/usb/usb-drd.yaml#/properties/role-switch-default-mode
+
+dependencies:
+ role-switch-default-mode: [ usb-role-switch ]
+
required:
- compatible
- "#phy-cells"
@@ -51,4 +60,6 @@ examples:
clocks = <&clk 93>, <&clk 94>, <&clk 95>;
clock-names = "app", "stb", "lpm";
resets = <&rst 58>;
+ usb-role-switch;
+ role-switch-default-mode = "peripheral";
};
--
2.43.0
next prev parent reply other threads:[~2026-11-03 8:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 8:58 [PATCH 0/3] phy: sophgo: Add USB role switch for CV18XX/SG200X Chen-Yu Yeh
2026-11-03 8:58 ` Chen-Yu Yeh [this message]
2026-11-03 8:58 ` [PATCH 2/3] phy: sophgo: Add USB role switch support " Chen-Yu Yeh
2026-11-03 8:58 ` [PATCH 3/3] riscv: dts: sophgo: sg2002-milkv-duo256m: Enable USB role switch Chen-Yu Yeh
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=20261103085847.338613-2-chenyou910331@gmail.com \
--to=chenyou910331@gmail.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=chen.wang@linux.dev \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hfranco@baylibre.com \
--cc=inochiama@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-riscv@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=palmer@dabbelt.com \
--cc=pjw@kernel.org \
--cc=robh@kernel.org \
--cc=sophgo@lists.linux.dev \
--cc=vkoul@kernel.org \
/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