* [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx
@ 2025-06-11 8:24 Inochi Amaoto
2025-06-11 8:24 ` [PATCH RFC 1/3] dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC Inochi Amaoto
` (3 more replies)
0 siblings, 4 replies; 19+ messages in thread
From: Inochi Amaoto @ 2025-06-11 8:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille
Cc: devicetree, sophgo, linux-kernel, linux-riscv, Longbin Li
Add top syscon device bindings related DTS change for CV1800.
The patch required the following 3 patch series.
1. https://lore.kernel.org/all/20250611075321.1160973-1-inochiama@gmail.com
2. https://lore.kernel.org/all/20250611081804.1196397-1-inochiama@gmail.com
3. https://lore.kernel.org/all/20250611081000.1187374-1-inochiama@gmail.com
Inochi Amaoto (3):
dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC
riscv: dts: sophgo: Add syscon node for cv18xx
riscv: dts: sophgo: Add USB support for cv18xx
.../soc/sophgo/sophgo,cv1800b-top-syscon.yaml | 57 +++++++++++++++++++
arch/riscv/boot/dts/sophgo/cv180x.dtsi | 40 +++++++++++++
.../boot/dts/sophgo/cv1812h-huashan-pi.dts | 4 ++
3 files changed, 101 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
--
2.49.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH RFC 1/3] dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC
2025-06-11 8:24 [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx Inochi Amaoto
@ 2025-06-11 8:24 ` Inochi Amaoto
2025-06-12 16:04 ` Conor Dooley
2025-06-11 8:24 ` [PATCH RFC 2/3] riscv: dts: sophgo: Add syscon node for cv18xx Inochi Amaoto
` (2 subsequent siblings)
3 siblings, 1 reply; 19+ messages in thread
From: Inochi Amaoto @ 2025-06-11 8:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille
Cc: devicetree, sophgo, linux-kernel, linux-riscv, Longbin Li
The Sophgo CV1800/SG2000 SoC top misc system controller provides register
access to configure related modules. It includes a usb2 phy and a dma
multiplexer.
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
---
.../soc/sophgo/sophgo,cv1800b-top-syscon.yaml | 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
diff --git a/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
new file mode 100644
index 000000000000..e8093a558c4e
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/sophgo/sophgo,cv1800b-top-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sophgo CV18XX/SG200X SoC top system controller
+
+maintainers:
+ - Inochi Amaoto <inochiama@outlook.com>
+
+description:
+ The Sophgo CV18XX/SG200X SoC top misc system controller provides
+ register access to configure related modules.
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - const: sophgo,cv1800b-top-syscon
+ - const: syscon
+ - const: simple-mfd
+
+ reg:
+ maxItems: 1
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+patternProperties:
+ "dma-router@[0-9a-f]+$":
+ $ref: /schemas/dma/sophgo,cv1800b-dmamux.yaml#
+
+ "phy@[0-9a-f]+$":
+ $ref: /schemas/phy/sophgo,cv1800b-usb2-phy.yaml#
+
+required:
+ - compatible
+ - reg
+ - "#address-cells"
+ - "#size-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ syscon@3000000 {
+ compatible = "sophgo,cv1800b-top-syscon", "syscon", "simple-mfd";
+ reg = <0x03000000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+
+...
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH RFC 2/3] riscv: dts: sophgo: Add syscon node for cv18xx
2025-06-11 8:24 [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx Inochi Amaoto
2025-06-11 8:24 ` [PATCH RFC 1/3] dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC Inochi Amaoto
@ 2025-06-11 8:24 ` Inochi Amaoto
2025-06-15 15:39 ` Alexander Sverdlin
2025-06-11 8:24 ` [PATCH RFC 3/3] riscv: dts: sophgo: Add USB support " Inochi Amaoto
2025-06-11 16:14 ` [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx Conor Dooley
3 siblings, 1 reply; 19+ messages in thread
From: Inochi Amaoto @ 2025-06-11 8:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille
Cc: devicetree, sophgo, linux-kernel, linux-riscv, Longbin Li
Add top syscon node and all subdevice nodes for cv18xx series SoC.
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
---
arch/riscv/boot/dts/sophgo/cv180x.dtsi | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/arch/riscv/boot/dts/sophgo/cv180x.dtsi b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
index 929864ba1b26..65eceaa5d2f8 100644
--- a/arch/riscv/boot/dts/sophgo/cv180x.dtsi
+++ b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
@@ -25,6 +25,32 @@ soc {
#size-cells = <1>;
ranges;
+ syscon: syscon@3000000 {
+ compatible = "sophgo,cv1800b-top-syscon",
+ "syscon", "simple-mfd";
+ reg = <0x03000000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ usbphy: phy@48 {
+ compatible = "sophgo,cv1800b-usb2-phy";
+ reg = <0x48 0x4>;
+ #phy-cells = <0>;
+ clocks = <&clk CLK_USB_125M>,
+ <&clk CLK_USB_33K>,
+ <&clk CLK_USB_12M>;
+ clock-names = "app", "stb", "lpm";
+ resets = <&rst RST_COMBO_PHY0>;
+ };
+
+ dmamux: dma-router@154 {
+ compatible = "sophgo,cv1800b-dmamux";
+ reg = <0x154 0x8>, <0x298 0x4>;
+ #dma-cells = <2>;
+ dma-masters = <&dmac>;
+ };
+ };
+
rst: reset-controller@3003000 {
compatible = "sophgo,cv1800b-reset";
reg = <0x3003000 0x1000>;
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH RFC 3/3] riscv: dts: sophgo: Add USB support for cv18xx
2025-06-11 8:24 [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx Inochi Amaoto
2025-06-11 8:24 ` [PATCH RFC 1/3] dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC Inochi Amaoto
2025-06-11 8:24 ` [PATCH RFC 2/3] riscv: dts: sophgo: Add syscon node for cv18xx Inochi Amaoto
@ 2025-06-11 8:24 ` Inochi Amaoto
2025-06-15 15:38 ` Alexander Sverdlin
2025-11-26 17:21 ` [PATCH] riscv: dts: sophgo: cv180x: fix USB dwc2 FIFO sizes Anton D. Stavinskii
2025-06-11 16:14 ` [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx Conor Dooley
3 siblings, 2 replies; 19+ messages in thread
From: Inochi Amaoto @ 2025-06-11 8:24 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Inochi Amaoto, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille
Cc: devicetree, sophgo, linux-kernel, linux-riscv, Longbin Li
Add USB controller node for cv18xx and enable it for Huashan Pi.
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
---
arch/riscv/boot/dts/sophgo/cv180x.dtsi | 14 ++++++++++++++
arch/riscv/boot/dts/sophgo/cv1812h-huashan-pi.dts | 4 ++++
2 files changed, 18 insertions(+)
diff --git a/arch/riscv/boot/dts/sophgo/cv180x.dtsi b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
index 65eceaa5d2f8..3ea3a1af103f 100644
--- a/arch/riscv/boot/dts/sophgo/cv180x.dtsi
+++ b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
@@ -428,5 +428,19 @@ dmac: dma-controller@4330000 {
snps,data-width = <2>;
status = "disabled";
};
+
+ usb: usb@4340000 {
+ compatible = "sophgo,cv1800-usb";
+ reg = <0x04340000 0x10000>;
+ clocks = <&clk CLK_AXI4_USB>, <&clk CLK_APB_USB>;
+ clock-names = "otg", "utmi";
+ g-np-tx-fifo-size = <32>;
+ g-rx-fifo-size = <536>;
+ g-tx-fifo-size = <768 512 512 384 128 128>;
+ interrupts = <SOC_PERIPHERAL_IRQ(14) IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&usbphy>;
+ phy-names = "usb2-phy";
+ status = "disabled";
+ };
};
};
diff --git a/arch/riscv/boot/dts/sophgo/cv1812h-huashan-pi.dts b/arch/riscv/boot/dts/sophgo/cv1812h-huashan-pi.dts
index c7181ad99f32..f5a800f488fc 100644
--- a/arch/riscv/boot/dts/sophgo/cv1812h-huashan-pi.dts
+++ b/arch/riscv/boot/dts/sophgo/cv1812h-huashan-pi.dts
@@ -88,3 +88,7 @@ &sdhci1 {
&uart0 {
status = "okay";
};
+
+&usb {
+ status = "okay";
+};
--
2.49.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx
2025-06-11 8:24 [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx Inochi Amaoto
` (2 preceding siblings ...)
2025-06-11 8:24 ` [PATCH RFC 3/3] riscv: dts: sophgo: Add USB support " Inochi Amaoto
@ 2025-06-11 16:14 ` Conor Dooley
2025-06-12 0:30 ` Inochi Amaoto
3 siblings, 1 reply; 19+ messages in thread
From: Conor Dooley @ 2025-06-11 16:14 UTC (permalink / raw)
To: Inochi Amaoto
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille, devicetree, sophgo, linux-kernel, linux-riscv,
Longbin Li
[-- Attachment #1: Type: text/plain, Size: 449 bytes --]
On Wed, Jun 11, 2025 at 04:24:48PM +0800, Inochi Amaoto wrote:
> Add top syscon device bindings related DTS change for CV1800.
>
> The patch required the following 3 patch series.
> 1. https://lore.kernel.org/all/20250611075321.1160973-1-inochiama@gmail.com
> 2. https://lore.kernel.org/all/20250611081804.1196397-1-inochiama@gmail.com
> 3. https://lore.kernel.org/all/20250611081000.1187374-1-inochiama@gmail.com
What is RFC about this?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx
2025-06-11 16:14 ` [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx Conor Dooley
@ 2025-06-12 0:30 ` Inochi Amaoto
2025-06-12 15:58 ` Conor Dooley
0 siblings, 1 reply; 19+ messages in thread
From: Inochi Amaoto @ 2025-06-12 0:30 UTC (permalink / raw)
To: Conor Dooley, Inochi Amaoto
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille, devicetree, sophgo, linux-kernel, linux-riscv,
Longbin Li
On Wed, Jun 11, 2025 at 05:14:59PM +0100, Conor Dooley wrote:
> On Wed, Jun 11, 2025 at 04:24:48PM +0800, Inochi Amaoto wrote:
> > Add top syscon device bindings related DTS change for CV1800.
> >
> > The patch required the following 3 patch series.
> > 1. https://lore.kernel.org/all/20250611075321.1160973-1-inochiama@gmail.com
> > 2. https://lore.kernel.org/all/20250611081804.1196397-1-inochiama@gmail.com
> > 3. https://lore.kernel.org/all/20250611081000.1187374-1-inochiama@gmail.com
>
> What is RFC about this?
I use RFC to ignore the patch check, as the dependency are not merged.
This series itself require the binding from link 2 3, which provdes
binding of the USB2 phy and DMA multiplexer.
Regards,
Inochi
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx
2025-06-12 0:30 ` Inochi Amaoto
@ 2025-06-12 15:58 ` Conor Dooley
2025-06-12 22:03 ` Inochi Amaoto
0 siblings, 1 reply; 19+ messages in thread
From: Conor Dooley @ 2025-06-12 15:58 UTC (permalink / raw)
To: Inochi Amaoto
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille, devicetree, sophgo, linux-kernel, linux-riscv,
Longbin Li
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]
On Thu, Jun 12, 2025 at 08:30:17AM +0800, Inochi Amaoto wrote:
> On Wed, Jun 11, 2025 at 05:14:59PM +0100, Conor Dooley wrote:
> > On Wed, Jun 11, 2025 at 04:24:48PM +0800, Inochi Amaoto wrote:
> > > Add top syscon device bindings related DTS change for CV1800.
> > >
> > > The patch required the following 3 patch series.
> > > 1. https://lore.kernel.org/all/20250611075321.1160973-1-inochiama@gmail.com
> > > 2. https://lore.kernel.org/all/20250611081804.1196397-1-inochiama@gmail.com
> > > 3. https://lore.kernel.org/all/20250611081000.1187374-1-inochiama@gmail.com
> >
> > What is RFC about this?
>
> I use RFC to ignore the patch check, as the dependency are not merged.
> This series itself require the binding from link 2 3, which provdes
> binding of the USB2 phy and DMA multiplexer.
In the future, please provide a reason for things being RFC in the cover
letter or patches themselves.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH RFC 1/3] dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC
2025-06-11 8:24 ` [PATCH RFC 1/3] dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC Inochi Amaoto
@ 2025-06-12 16:04 ` Conor Dooley
2025-06-12 22:09 ` Inochi Amaoto
2025-06-25 19:58 ` Rob Herring
0 siblings, 2 replies; 19+ messages in thread
From: Conor Dooley @ 2025-06-12 16:04 UTC (permalink / raw)
To: Inochi Amaoto
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille, devicetree, sophgo, linux-kernel, linux-riscv,
Longbin Li
[-- Attachment #1: Type: text/plain, Size: 2511 bytes --]
On Wed, Jun 11, 2025 at 04:24:49PM +0800, Inochi Amaoto wrote:
> The Sophgo CV1800/SG2000 SoC top misc system controller provides register
> access to configure related modules. It includes a usb2 phy and a dma
> multiplexer.
>
> Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> ---
> .../soc/sophgo/sophgo,cv1800b-top-syscon.yaml | 57 +++++++++++++++++++
> 1 file changed, 57 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
>
> diff --git a/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> new file mode 100644
> index 000000000000..e8093a558c4e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> @@ -0,0 +1,57 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/soc/sophgo/sophgo,cv1800b-top-syscon.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Sophgo CV18XX/SG200X SoC top system controller
> +
> +maintainers:
> + - Inochi Amaoto <inochiama@outlook.com>
> +
> +description:
> + The Sophgo CV18XX/SG200X SoC top misc system controller provides
> + register access to configure related modules.
> +
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - const: sophgo,cv1800b-top-syscon
> + - const: syscon
> + - const: simple-mfd
> +
> + reg:
> + maxItems: 1
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 1
> +
> +patternProperties:
> + "dma-router@[0-9a-f]+$":
> + $ref: /schemas/dma/sophgo,cv1800b-dmamux.yaml#
I think you're supposed to add "unevaluatedProperties: false" to each of
these nodes.
> +
> + "phy@[0-9a-f]+$":
> + $ref: /schemas/phy/sophgo,cv1800b-usb2-phy.yaml#
Why are these permitting random addresses? Are they not at fixed
addreses given that you only support one platform (modulo the rebrand)?
> +
> +required:
> + - compatible
> + - reg
> + - "#address-cells"
> + - "#size-cells"
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + syscon@3000000 {
> + compatible = "sophgo,cv1800b-top-syscon", "syscon", "simple-mfd";
> + reg = <0x03000000 0x1000>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> + };
> +
> +...
> --
> 2.49.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx
2025-06-12 15:58 ` Conor Dooley
@ 2025-06-12 22:03 ` Inochi Amaoto
0 siblings, 0 replies; 19+ messages in thread
From: Inochi Amaoto @ 2025-06-12 22:03 UTC (permalink / raw)
To: Conor Dooley, Inochi Amaoto
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille, devicetree, sophgo, linux-kernel, linux-riscv,
Longbin Li
On Thu, Jun 12, 2025 at 04:58:39PM +0100, Conor Dooley wrote:
> On Thu, Jun 12, 2025 at 08:30:17AM +0800, Inochi Amaoto wrote:
> > On Wed, Jun 11, 2025 at 05:14:59PM +0100, Conor Dooley wrote:
> > > On Wed, Jun 11, 2025 at 04:24:48PM +0800, Inochi Amaoto wrote:
> > > > Add top syscon device bindings related DTS change for CV1800.
> > > >
> > > > The patch required the following 3 patch series.
> > > > 1. https://lore.kernel.org/all/20250611075321.1160973-1-inochiama@gmail.com
> > > > 2. https://lore.kernel.org/all/20250611081804.1196397-1-inochiama@gmail.com
> > > > 3. https://lore.kernel.org/all/20250611081000.1187374-1-inochiama@gmail.com
> > >
> > > What is RFC about this?
> >
> > I use RFC to ignore the patch check, as the dependency are not merged.
> > This series itself require the binding from link 2 3, which provdes
> > binding of the USB2 phy and DMA multiplexer.
>
> In the future, please provide a reason for things being RFC in the cover
> letter or patches themselves.
Sure, I will.
Regards,
Inochi
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH RFC 1/3] dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC
2025-06-12 16:04 ` Conor Dooley
@ 2025-06-12 22:09 ` Inochi Amaoto
2025-06-13 14:23 ` Conor Dooley
2025-06-25 19:58 ` Rob Herring
1 sibling, 1 reply; 19+ messages in thread
From: Inochi Amaoto @ 2025-06-12 22:09 UTC (permalink / raw)
To: Conor Dooley, Inochi Amaoto
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille, devicetree, sophgo, linux-kernel, linux-riscv,
Longbin Li
On Thu, Jun 12, 2025 at 05:04:46PM +0100, Conor Dooley wrote:
> On Wed, Jun 11, 2025 at 04:24:49PM +0800, Inochi Amaoto wrote:
> > The Sophgo CV1800/SG2000 SoC top misc system controller provides register
> > access to configure related modules. It includes a usb2 phy and a dma
> > multiplexer.
> >
> > Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> > ---
> > .../soc/sophgo/sophgo,cv1800b-top-syscon.yaml | 57 +++++++++++++++++++
> > 1 file changed, 57 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> > new file mode 100644
> > index 000000000000..e8093a558c4e
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> > @@ -0,0 +1,57 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/soc/sophgo/sophgo,cv1800b-top-syscon.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Sophgo CV18XX/SG200X SoC top system controller
> > +
> > +maintainers:
> > + - Inochi Amaoto <inochiama@outlook.com>
> > +
> > +description:
> > + The Sophgo CV18XX/SG200X SoC top misc system controller provides
> > + register access to configure related modules.
> > +
> > +properties:
> > + compatible:
> > + oneOf:
> > + - items:
> > + - const: sophgo,cv1800b-top-syscon
> > + - const: syscon
> > + - const: simple-mfd
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + "#address-cells":
> > + const: 1
> > +
> > + "#size-cells":
> > + const: 1
> > +
> > +patternProperties:
> > + "dma-router@[0-9a-f]+$":
> > + $ref: /schemas/dma/sophgo,cv1800b-dmamux.yaml#
>
> I think you're supposed to add "unevaluatedProperties: false" to each of
> these nodes.
>
This is is OK for me.
> > +
> > + "phy@[0-9a-f]+$":
> > + $ref: /schemas/phy/sophgo,cv1800b-usb2-phy.yaml#
>
> Why are these permitting random addresses? Are they not at fixed
> addreses given that you only support one platform (modulo the rebrand)?
>
IIRC, they are fixed address. I use random addresses as I see many one
in binding do the same. Should I switch to the fixed one?
Regards,
Inochi
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH RFC 1/3] dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC
2025-06-12 22:09 ` Inochi Amaoto
@ 2025-06-13 14:23 ` Conor Dooley
2025-06-15 1:41 ` Inochi Amaoto
0 siblings, 1 reply; 19+ messages in thread
From: Conor Dooley @ 2025-06-13 14:23 UTC (permalink / raw)
To: Inochi Amaoto
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille, devicetree, sophgo, linux-kernel, linux-riscv,
Longbin Li
[-- Attachment #1: Type: text/plain, Size: 2990 bytes --]
On Fri, Jun 13, 2025 at 06:09:47AM +0800, Inochi Amaoto wrote:
> On Thu, Jun 12, 2025 at 05:04:46PM +0100, Conor Dooley wrote:
> > On Wed, Jun 11, 2025 at 04:24:49PM +0800, Inochi Amaoto wrote:
> > > The Sophgo CV1800/SG2000 SoC top misc system controller provides register
> > > access to configure related modules. It includes a usb2 phy and a dma
> > > multiplexer.
> > >
> > > Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> > > ---
> > > .../soc/sophgo/sophgo,cv1800b-top-syscon.yaml | 57 +++++++++++++++++++
> > > 1 file changed, 57 insertions(+)
> > > create mode 100644 Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> > > new file mode 100644
> > > index 000000000000..e8093a558c4e
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> > > @@ -0,0 +1,57 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/soc/sophgo/sophgo,cv1800b-top-syscon.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Sophgo CV18XX/SG200X SoC top system controller
> > > +
> > > +maintainers:
> > > + - Inochi Amaoto <inochiama@outlook.com>
> > > +
> > > +description:
> > > + The Sophgo CV18XX/SG200X SoC top misc system controller provides
> > > + register access to configure related modules.
> > > +
> > > +properties:
> > > + compatible:
> > > + oneOf:
> > > + - items:
> > > + - const: sophgo,cv1800b-top-syscon
> > > + - const: syscon
> > > + - const: simple-mfd
> > > +
> > > + reg:
> > > + maxItems: 1
> > > +
> > > + "#address-cells":
> > > + const: 1
> > > +
> > > + "#size-cells":
> > > + const: 1
> > > +
> > > +patternProperties:
> > > + "dma-router@[0-9a-f]+$":
> > > + $ref: /schemas/dma/sophgo,cv1800b-dmamux.yaml#
> >
> > I think you're supposed to add "unevaluatedProperties: false" to each of
> > these nodes.
> >
>
> This is is OK for me.
>
> > > +
> > > + "phy@[0-9a-f]+$":
> > > + $ref: /schemas/phy/sophgo,cv1800b-usb2-phy.yaml#
> >
> > Why are these permitting random addresses? Are they not at fixed
> > addreses given that you only support one platform (modulo the rebrand)?
> >
>
> IIRC, they are fixed address. I use random addresses as I see many one
> in binding do the same. Should I switch to the fixed one?
If things are actually possible to have at variable addresses, then sure
use pattern properties and a regex. It may be like that if a new device
is released that reuses the dmamux or phy but locates it differently or
on a platform with multiple phys etc. If not, then then just restrict the
address to the only permitted one.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH RFC 1/3] dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC
2025-06-13 14:23 ` Conor Dooley
@ 2025-06-15 1:41 ` Inochi Amaoto
0 siblings, 0 replies; 19+ messages in thread
From: Inochi Amaoto @ 2025-06-15 1:41 UTC (permalink / raw)
To: Conor Dooley, Inochi Amaoto
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille, devicetree, sophgo, linux-kernel, linux-riscv,
Longbin Li
On Fri, Jun 13, 2025 at 03:23:26PM +0100, Conor Dooley wrote:
> On Fri, Jun 13, 2025 at 06:09:47AM +0800, Inochi Amaoto wrote:
> > On Thu, Jun 12, 2025 at 05:04:46PM +0100, Conor Dooley wrote:
> > > On Wed, Jun 11, 2025 at 04:24:49PM +0800, Inochi Amaoto wrote:
> > > > The Sophgo CV1800/SG2000 SoC top misc system controller provides register
> > > > access to configure related modules. It includes a usb2 phy and a dma
> > > > multiplexer.
> > > >
> > > > Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> > > > ---
> > > > .../soc/sophgo/sophgo,cv1800b-top-syscon.yaml | 57 +++++++++++++++++++
> > > > 1 file changed, 57 insertions(+)
> > > > create mode 100644 Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> > > > new file mode 100644
> > > > index 000000000000..e8093a558c4e
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> > > > @@ -0,0 +1,57 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: http://devicetree.org/schemas/soc/sophgo/sophgo,cv1800b-top-syscon.yaml#
> > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > +
> > > > +title: Sophgo CV18XX/SG200X SoC top system controller
> > > > +
> > > > +maintainers:
> > > > + - Inochi Amaoto <inochiama@outlook.com>
> > > > +
> > > > +description:
> > > > + The Sophgo CV18XX/SG200X SoC top misc system controller provides
> > > > + register access to configure related modules.
> > > > +
> > > > +properties:
> > > > + compatible:
> > > > + oneOf:
> > > > + - items:
> > > > + - const: sophgo,cv1800b-top-syscon
> > > > + - const: syscon
> > > > + - const: simple-mfd
> > > > +
> > > > + reg:
> > > > + maxItems: 1
> > > > +
> > > > + "#address-cells":
> > > > + const: 1
> > > > +
> > > > + "#size-cells":
> > > > + const: 1
> > > > +
> > > > +patternProperties:
> > > > + "dma-router@[0-9a-f]+$":
> > > > + $ref: /schemas/dma/sophgo,cv1800b-dmamux.yaml#
> > >
> > > I think you're supposed to add "unevaluatedProperties: false" to each of
> > > these nodes.
> > >
> >
> > This is is OK for me.
> >
> > > > +
> > > > + "phy@[0-9a-f]+$":
> > > > + $ref: /schemas/phy/sophgo,cv1800b-usb2-phy.yaml#
> > >
> > > Why are these permitting random addresses? Are they not at fixed
> > > addreses given that you only support one platform (modulo the rebrand)?
> > >
> >
> > IIRC, they are fixed address. I use random addresses as I see many one
> > in binding do the same. Should I switch to the fixed one?
>
> If things are actually possible to have at variable addresses, then sure
> use pattern properties and a regex. It may be like that if a new device
> is released that reuses the dmamux or phy but locates it differently or
> on a platform with multiple phys etc. If not, then then just restrict the
> address to the only permitted one.
Great, Since all the CV1800 devices I can reach have the same register
layout, I will switch to fixed address.
Regards,
Inochi
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH RFC 3/3] riscv: dts: sophgo: Add USB support for cv18xx
2025-06-11 8:24 ` [PATCH RFC 3/3] riscv: dts: sophgo: Add USB support " Inochi Amaoto
@ 2025-06-15 15:38 ` Alexander Sverdlin
2025-11-26 17:21 ` [PATCH] riscv: dts: sophgo: cv180x: fix USB dwc2 FIFO sizes Anton D. Stavinskii
1 sibling, 0 replies; 19+ messages in thread
From: Alexander Sverdlin @ 2025-06-15 15:38 UTC (permalink / raw)
To: Inochi Amaoto, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Yu Yuan, Yixun Lan, Ze Huang, Thomas Bonnefille
Cc: devicetree, sophgo, linux-kernel, linux-riscv, Longbin Li
Thanks for the patch, Inochi!
On Wed, 2025-06-11 at 16:24 +0800, Inochi Amaoto wrote:
> Add USB controller node for cv18xx and enable it for Huashan Pi.
>
> Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Successfully tested in host mode on Milk-V Duo Module 01 EVB:
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> ---
> arch/riscv/boot/dts/sophgo/cv180x.dtsi | 14 ++++++++++++++
> arch/riscv/boot/dts/sophgo/cv1812h-huashan-pi.dts | 4 ++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/sophgo/cv180x.dtsi b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
> index 65eceaa5d2f8..3ea3a1af103f 100644
> --- a/arch/riscv/boot/dts/sophgo/cv180x.dtsi
> +++ b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
> @@ -428,5 +428,19 @@ dmac: dma-controller@4330000 {
> snps,data-width = <2>;
> status = "disabled";
> };
> +
> + usb: usb@4340000 {
> + compatible = "sophgo,cv1800-usb";
> + reg = <0x04340000 0x10000>;
> + clocks = <&clk CLK_AXI4_USB>, <&clk CLK_APB_USB>;
> + clock-names = "otg", "utmi";
> + g-np-tx-fifo-size = <32>;
> + g-rx-fifo-size = <536>;
> + g-tx-fifo-size = <768 512 512 384 128 128>;
> + interrupts = <SOC_PERIPHERAL_IRQ(14) IRQ_TYPE_LEVEL_HIGH>;
> + phys = <&usbphy>;
> + phy-names = "usb2-phy";
> + status = "disabled";
> + };
--
Alexander Sverdlin.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH RFC 2/3] riscv: dts: sophgo: Add syscon node for cv18xx
2025-06-11 8:24 ` [PATCH RFC 2/3] riscv: dts: sophgo: Add syscon node for cv18xx Inochi Amaoto
@ 2025-06-15 15:39 ` Alexander Sverdlin
0 siblings, 0 replies; 19+ messages in thread
From: Alexander Sverdlin @ 2025-06-15 15:39 UTC (permalink / raw)
To: Inochi Amaoto, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Yu Yuan, Yixun Lan, Ze Huang, Thomas Bonnefille
Cc: devicetree, sophgo, linux-kernel, linux-riscv, Longbin Li
Thanks for the patch, Inochi!
On Wed, 2025-06-11 at 16:24 +0800, Inochi Amaoto wrote:
> Add top syscon node and all subdevice nodes for cv18xx series SoC.
>
> Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Successfully tested in host mode on Milk-V Duo Module 01 EVB:
Tested-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> ---
> arch/riscv/boot/dts/sophgo/cv180x.dtsi | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/sophgo/cv180x.dtsi b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
> index 929864ba1b26..65eceaa5d2f8 100644
> --- a/arch/riscv/boot/dts/sophgo/cv180x.dtsi
> +++ b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
> @@ -25,6 +25,32 @@ soc {
> #size-cells = <1>;
> ranges;
>
> + syscon: syscon@3000000 {
> + compatible = "sophgo,cv1800b-top-syscon",
> + "syscon", "simple-mfd";
> + reg = <0x03000000 0x1000>;
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + usbphy: phy@48 {
> + compatible = "sophgo,cv1800b-usb2-phy";
> + reg = <0x48 0x4>;
> + #phy-cells = <0>;
> + clocks = <&clk CLK_USB_125M>,
> + <&clk CLK_USB_33K>,
> + <&clk CLK_USB_12M>;
> + clock-names = "app", "stb", "lpm";
> + resets = <&rst RST_COMBO_PHY0>;
> + };
> +
> + dmamux: dma-router@154 {
> + compatible = "sophgo,cv1800b-dmamux";
> + reg = <0x154 0x8>, <0x298 0x4>;
> + #dma-cells = <2>;
> + dma-masters = <&dmac>;
> + };
> + };
--
Alexander Sverdlin.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH RFC 1/3] dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC
2025-06-12 16:04 ` Conor Dooley
2025-06-12 22:09 ` Inochi Amaoto
@ 2025-06-25 19:58 ` Rob Herring
2025-06-26 16:17 ` Conor Dooley
1 sibling, 1 reply; 19+ messages in thread
From: Rob Herring @ 2025-06-25 19:58 UTC (permalink / raw)
To: Conor Dooley
Cc: Inochi Amaoto, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille, devicetree, sophgo, linux-kernel, linux-riscv,
Longbin Li
On Thu, Jun 12, 2025 at 05:04:46PM +0100, Conor Dooley wrote:
> On Wed, Jun 11, 2025 at 04:24:49PM +0800, Inochi Amaoto wrote:
> > The Sophgo CV1800/SG2000 SoC top misc system controller provides register
> > access to configure related modules. It includes a usb2 phy and a dma
> > multiplexer.
> >
> > Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> > ---
> > .../soc/sophgo/sophgo,cv1800b-top-syscon.yaml | 57 +++++++++++++++++++
> > 1 file changed, 57 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> > new file mode 100644
> > index 000000000000..e8093a558c4e
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> > @@ -0,0 +1,57 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/soc/sophgo/sophgo,cv1800b-top-syscon.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Sophgo CV18XX/SG200X SoC top system controller
> > +
> > +maintainers:
> > + - Inochi Amaoto <inochiama@outlook.com>
> > +
> > +description:
> > + The Sophgo CV18XX/SG200X SoC top misc system controller provides
> > + register access to configure related modules.
> > +
> > +properties:
> > + compatible:
> > + oneOf:
> > + - items:
> > + - const: sophgo,cv1800b-top-syscon
> > + - const: syscon
> > + - const: simple-mfd
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + "#address-cells":
> > + const: 1
> > +
> > + "#size-cells":
> > + const: 1
> > +
> > +patternProperties:
> > + "dma-router@[0-9a-f]+$":
> > + $ref: /schemas/dma/sophgo,cv1800b-dmamux.yaml#
>
> I think you're supposed to add "unevaluatedProperties: false" to each of
> these nodes.
Not necessary if the referenced schema has
unevaluatedProperties/additionalProperties set to false. The tools check
for this.
Rob
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH RFC 1/3] dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC
2025-06-25 19:58 ` Rob Herring
@ 2025-06-26 16:17 ` Conor Dooley
0 siblings, 0 replies; 19+ messages in thread
From: Conor Dooley @ 2025-06-26 16:17 UTC (permalink / raw)
To: Rob Herring
Cc: Inochi Amaoto, Krzysztof Kozlowski, Conor Dooley, Chen Wang,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Alexander Sverdlin, Yu Yuan, Yixun Lan, Ze Huang,
Thomas Bonnefille, devicetree, sophgo, linux-kernel, linux-riscv,
Longbin Li
[-- Attachment #1: Type: text/plain, Size: 2402 bytes --]
On Wed, Jun 25, 2025 at 02:58:58PM -0500, Rob Herring wrote:
> On Thu, Jun 12, 2025 at 05:04:46PM +0100, Conor Dooley wrote:
> > On Wed, Jun 11, 2025 at 04:24:49PM +0800, Inochi Amaoto wrote:
> > > The Sophgo CV1800/SG2000 SoC top misc system controller provides register
> > > access to configure related modules. It includes a usb2 phy and a dma
> > > multiplexer.
> > >
> > > Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> > > ---
> > > .../soc/sophgo/sophgo,cv1800b-top-syscon.yaml | 57 +++++++++++++++++++
> > > 1 file changed, 57 insertions(+)
> > > create mode 100644 Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> > >
> > > diff --git a/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> > > new file mode 100644
> > > index 000000000000..e8093a558c4e
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/soc/sophgo/sophgo,cv1800b-top-syscon.yaml
> > > @@ -0,0 +1,57 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/soc/sophgo/sophgo,cv1800b-top-syscon.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Sophgo CV18XX/SG200X SoC top system controller
> > > +
> > > +maintainers:
> > > + - Inochi Amaoto <inochiama@outlook.com>
> > > +
> > > +description:
> > > + The Sophgo CV18XX/SG200X SoC top misc system controller provides
> > > + register access to configure related modules.
> > > +
> > > +properties:
> > > + compatible:
> > > + oneOf:
> > > + - items:
> > > + - const: sophgo,cv1800b-top-syscon
> > > + - const: syscon
> > > + - const: simple-mfd
> > > +
> > > + reg:
> > > + maxItems: 1
> > > +
> > > + "#address-cells":
> > > + const: 1
> > > +
> > > + "#size-cells":
> > > + const: 1
> > > +
> > > +patternProperties:
> > > + "dma-router@[0-9a-f]+$":
> > > + $ref: /schemas/dma/sophgo,cv1800b-dmamux.yaml#
> >
> > I think you're supposed to add "unevaluatedProperties: false" to each of
> > these nodes.
>
> Not necessary if the referenced schema has
> unevaluatedProperties/additionalProperties set to false. The tools check
> for this.
Oh cool, that's good to know, thanks.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH] riscv: dts: sophgo: cv180x: fix USB dwc2 FIFO sizes
2025-06-11 8:24 ` [PATCH RFC 3/3] riscv: dts: sophgo: Add USB support " Inochi Amaoto
2025-06-15 15:38 ` Alexander Sverdlin
@ 2025-11-26 17:21 ` Anton D. Stavinskii
2025-11-26 22:23 ` Inochi Amaoto
2025-11-27 6:52 ` Inochi Amaoto
1 sibling, 2 replies; 19+ messages in thread
From: Anton D. Stavinskii @ 2025-11-26 17:21 UTC (permalink / raw)
To: inochiama
Cc: alex, alexander.sverdlin, aou, conor+dt, devicetree, dlan,
huangze, krzk+dt, linux-kernel, linux-riscv, looong.bin, palmer,
paul.walmsley, robh, sophgo, thomas.bonnefille, unicorn_wang,
yu.yuan, Anton D. Stavinskii
I've tested the current dwc2 FIFO configuration and found that USB
device mode breaks in ECM mode when transmitting frames larger than
128 bytes. For example, large ICMP packets or iperf3 traffic cause
the USB link to hang and eventually disconnect without any messages in
dmesg.
After switching to more conservative FIFO sizes, ECM becomes stable
and no longer drops the connection. iperf3 now shows ~130 Mbit/s RX
and ~100 Mbit/s TX on SG2002 (MilkV Duo 256M).
Fix the FIFO sizes accordingly.
Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
---
arch/riscv/boot/dts/sophgo/cv180x.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/boot/dts/sophgo/cv180x.dtsi b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
index 1b2b1969a648..06b0ce5a2db7 100644
--- a/arch/riscv/boot/dts/sophgo/cv180x.dtsi
+++ b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
@@ -438,8 +438,8 @@ usb: usb@4340000 {
clocks = <&clk CLK_AXI4_USB>, <&clk CLK_APB_USB>;
clock-names = "otg", "utmi";
g-np-tx-fifo-size = <32>;
- g-rx-fifo-size = <536>;
- g-tx-fifo-size = <768 512 512 384 128 128>;
+ g-rx-fifo-size = <1536>;
+ g-tx-fifo-size = <128 128 64 64 64 64 32 32>;
interrupts = <SOC_PERIPHERAL_IRQ(14) IRQ_TYPE_LEVEL_HIGH>;
phys = <&usbphy>;
phy-names = "usb2-phy";
--
2.43.0
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH] riscv: dts: sophgo: cv180x: fix USB dwc2 FIFO sizes
2025-11-26 17:21 ` [PATCH] riscv: dts: sophgo: cv180x: fix USB dwc2 FIFO sizes Anton D. Stavinskii
@ 2025-11-26 22:23 ` Inochi Amaoto
2025-11-27 6:52 ` Inochi Amaoto
1 sibling, 0 replies; 19+ messages in thread
From: Inochi Amaoto @ 2025-11-26 22:23 UTC (permalink / raw)
To: Anton D. Stavinskii, inochiama
Cc: alex, alexander.sverdlin, aou, conor+dt, devicetree, dlan,
huangze, krzk+dt, linux-kernel, linux-riscv, looong.bin, palmer,
paul.walmsley, robh, sophgo, thomas.bonnefille, unicorn_wang,
yu.yuan
On Wed, Nov 26, 2025 at 09:21:16PM +0400, Anton D. Stavinskii wrote:
> I've tested the current dwc2 FIFO configuration and found that USB
> device mode breaks in ECM mode when transmitting frames larger than
> 128 bytes. For example, large ICMP packets or iperf3 traffic cause
> the USB link to hang and eventually disconnect without any messages in
> dmesg.
>
> After switching to more conservative FIFO sizes, ECM becomes stable
> and no longer drops the connection. iperf3 now shows ~130 Mbit/s RX
> and ~100 Mbit/s TX on SG2002 (MilkV Duo 256M).
>
> Fix the FIFO sizes accordingly.
>
> Signed-off-by: Anton D. Stavinskii <stavinsky@gmail.com>
> ---
> arch/riscv/boot/dts/sophgo/cv180x.dtsi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/boot/dts/sophgo/cv180x.dtsi b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
> index 1b2b1969a648..06b0ce5a2db7 100644
> --- a/arch/riscv/boot/dts/sophgo/cv180x.dtsi
> +++ b/arch/riscv/boot/dts/sophgo/cv180x.dtsi
> @@ -438,8 +438,8 @@ usb: usb@4340000 {
> clocks = <&clk CLK_AXI4_USB>, <&clk CLK_APB_USB>;
> clock-names = "otg", "utmi";
> g-np-tx-fifo-size = <32>;
> - g-rx-fifo-size = <536>;
> - g-tx-fifo-size = <768 512 512 384 128 128>;
> + g-rx-fifo-size = <1536>;
> + g-tx-fifo-size = <128 128 64 64 64 64 32 32>;
> interrupts = <SOC_PERIPHERAL_IRQ(14) IRQ_TYPE_LEVEL_HIGH>;
> phys = <&usbphy>;
> phy-names = "usb2-phy";
> --
> 2.43.0
>
Please add a fix tag next time, I will add it by myself this time,
otherwise LGTM.
Reviewed-by: Inochi Amaoto <inochiama@gmail.com>
Fixes: e307248a3c2d ("riscv: dts: sophgo: Add USB support for cv18xx")
Regards,
Inochi
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH] riscv: dts: sophgo: cv180x: fix USB dwc2 FIFO sizes
2025-11-26 17:21 ` [PATCH] riscv: dts: sophgo: cv180x: fix USB dwc2 FIFO sizes Anton D. Stavinskii
2025-11-26 22:23 ` Inochi Amaoto
@ 2025-11-27 6:52 ` Inochi Amaoto
1 sibling, 0 replies; 19+ messages in thread
From: Inochi Amaoto @ 2025-11-27 6:52 UTC (permalink / raw)
To: Anton D. Stavinskii
Cc: Inochi Amaoto, alex, alexander.sverdlin, aou, conor+dt,
devicetree, dlan, huangze, krzk+dt, linux-kernel, linux-riscv,
looong.bin, palmer, paul.walmsley, robh, sophgo,
thomas.bonnefille, unicorn_wang, yu.yuan
On Wed, 26 Nov 2025 21:21:16 +0400, Anton D. Stavinskii wrote:
> I've tested the current dwc2 FIFO configuration and found that USB
> device mode breaks in ECM mode when transmitting frames larger than
> 128 bytes. For example, large ICMP packets or iperf3 traffic cause
> the USB link to hang and eventually disconnect without any messages in
> dmesg.
>
> After switching to more conservative FIFO sizes, ECM becomes stable
> and no longer drops the connection. iperf3 now shows ~130 Mbit/s RX
> and ~100 Mbit/s TX on SG2002 (MilkV Duo 256M).
>
> [...]
Applied to dt/riscv, thanks!
[1/1] riscv: dts: sophgo: cv180x: fix USB dwc2 FIFO sizes
https://github.com/sophgo/linux/commit/1d3ed9920a193e5d99d651d6ec1dbbe215ca172f
Thanks,
Inochi
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2025-11-27 6:53 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-11 8:24 [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx Inochi Amaoto
2025-06-11 8:24 ` [PATCH RFC 1/3] dt-bindings: soc: sophgo: add TOP syscon for CV18XX/SG200X series SoC Inochi Amaoto
2025-06-12 16:04 ` Conor Dooley
2025-06-12 22:09 ` Inochi Amaoto
2025-06-13 14:23 ` Conor Dooley
2025-06-15 1:41 ` Inochi Amaoto
2025-06-25 19:58 ` Rob Herring
2025-06-26 16:17 ` Conor Dooley
2025-06-11 8:24 ` [PATCH RFC 2/3] riscv: dts: sophgo: Add syscon node for cv18xx Inochi Amaoto
2025-06-15 15:39 ` Alexander Sverdlin
2025-06-11 8:24 ` [PATCH RFC 3/3] riscv: dts: sophgo: Add USB support " Inochi Amaoto
2025-06-15 15:38 ` Alexander Sverdlin
2025-11-26 17:21 ` [PATCH] riscv: dts: sophgo: cv180x: fix USB dwc2 FIFO sizes Anton D. Stavinskii
2025-11-26 22:23 ` Inochi Amaoto
2025-11-27 6:52 ` Inochi Amaoto
2025-06-11 16:14 ` [PATCH RFC 0/3] riscv: sophgo: add top syscon device for cv18xx Conor Dooley
2025-06-12 0:30 ` Inochi Amaoto
2025-06-12 15:58 ` Conor Dooley
2025-06-12 22:03 ` Inochi Amaoto
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).