Skip to contentSkip to conversation

riscv: sophgo: rename compatible string of the USB device for cv18xx

PATCH In review Inochi Amaoto 2 participants 4 messages Jun 18, 2025 – Jun 20, 2025

Subsystems (5)
lore
Share & tools
lore

Inochi Amaoto

author maintainer
#0 lore raw

cover riscv: sophgo: rename compatible string of the USB device for cv18xx

Old days I added the USB support with a wildcard compatible string. It is not formal and it is more clear to use a compatible for a real world SoC. As the usb device is not used in any board device tree (The patch for USB phy is under review), I think it is good to correct this mistake before submitting the device node.

Inochi Amaoto (2):
dt-bindings: usb: dwc2: rename sophgo usb compatible string
usb: dwc2: follow compatible string change for Sophgo CV18XX/SG200X
series SoC

 Documentation/devicetree/bindings/usb/dwc2.yaml | 2 +-
 drivers/usb/dwc2/params.c                       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--
2.49.0

author maintainer
#1 lore raw

PATCH 1/2 dt-bindings: usb: dwc2: rename sophgo usb compatible string

The support for Sophgo CV1800 series SoC introduces a wildcard compatible string "sophgo,cv1800-usb", rename it to sophgo,cv1800b-usb to match a real world SoC. As the compatible string is not used in any board dts. It is safe to rename it.

---
 Documentation/devicetree/bindings/usb/dwc2.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/usb/dwc2.yaml +1 -1
index e83d30a91b88..6c3a10991b8b 100644
@@ -59,7 +59,7 @@ properties:
       - const: amcc,dwc-otg
       - const: apm,apm82181-dwc-otg
       - const: snps,dwc2
-      - const: sophgo,cv1800-usb
+      - const: sophgo,cv1800b-usb
       - const: st,stm32f4x9-fsotg
       - const: st,stm32f4x9-hsotg
       - const: st,stm32f7-hsotg
Signature · 1 line
2.49.0
author maintainer
#2 lore raw

PATCH 2/2 usb: dwc2: follow compatible string change for Sophgo CV18XX/SG200X series SoC

In reply to Inochi Amaoto

As the wildcard name is dropped and favor new compatible string which match a real SoC, and it is not used for any board at now.

Rename it to sophgo,cv1800b-usb to match the binding change.

---
 drivers/usb/dwc2/params.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc2/params.c +1 -1
index 4d73fae80b12..ea6bd537e337 100644
@@ -334,7 +334,7 @@ const struct of_device_id dwc2_of_match_table[] = {
 	  .data = dwc2_set_amlogic_a1_params },
 	{ .compatible = "amcc,dwc-otg", .data = dwc2_set_amcc_params },
 	{ .compatible = "apm,apm82181-dwc-otg", .data = dwc2_set_amcc_params },
-	{ .compatible = "sophgo,cv1800-usb",
+	{ .compatible = "sophgo,cv1800b-usb",
 	  .data = dwc2_set_cv1800_params },
 	{ .compatible = "st,stm32f4x9-fsotg",
 	  .data = dwc2_set_stm32f4x9_fsotg_params },
Signature · 1 line
2.49.0
Acked-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] usb: dwc2: follow compatible string change for Sophgo CV18XX/SG200X series SoC

Quoted 6 lines · Inochi Amaoto

As the wildcard name is dropped and favor new compatible string which match a real SoC, and it is not used for any board at now.

Rename it to sophgo,cv1800b-usb to match the binding change.

Quoted 17 lines
---
  drivers/usb/dwc2/params.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc2/params.c +1 -1
index 4d73fae80b12..ea6bd537e337 100644
@@ -334,7 +334,7 @@ const struct of_device_id dwc2_of_match_table[] = {
  	  .data = dwc2_set_amlogic_a1_params },
  	{ .compatible = "amcc,dwc-otg", .data = dwc2_set_amcc_params },
  	{ .compatible = "apm,apm82181-dwc-otg", .data = dwc2_set_amcc_params },
-	{ .compatible = "sophgo,cv1800-usb",
+	{ .compatible = "sophgo,cv1800b-usb",
  	  .data = dwc2_set_cv1800_params },
  	{ .compatible = "st,stm32f4x9-fsotg",
  	  .data = dwc2_set_stm32f4x9_fsotg_params },