* [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; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ 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 " Conor Dooley
3 siblings, 1 reply; 16+ 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] 16+ 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; 16+ 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] 16+ 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-06-11 16:14 ` [PATCH RFC 0/3] riscv: sophgo: add top syscon device " Conor Dooley
3 siblings, 1 reply; 16+ 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] 16+ 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
0 siblings, 0 replies; 16+ 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] 16+ 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; 16+ 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] 16+ 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 " Conor Dooley
@ 2025-06-12 0:30 ` Inochi Amaoto
2025-06-12 15:58 ` Conor Dooley
0 siblings, 1 reply; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ messages in thread