devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] riscv: sophgo: cv18xx: dts rework, part 2
@ 2025-05-04 10:45 Inochi Amaoto
  2025-05-04 10:45 ` [PATCH v2 1/3] dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC Inochi Amaoto
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Inochi Amaoto @ 2025-05-04 10:45 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Chen Wang, Inochi Amaoto, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Alexander Sverdlin,
	Thomas Bonnefille, Jeff Johnson
  Cc: linux-clk, devicetree, sophgo, linux-kernel, linux-riscv,
	Yixun Lan, Longbin Li

The part 2 of dts rework replaces precise compatible for existed clock device
with old wildcard one.

Changed from v1:
- https://lore.kernel.org/all/20250430020932.307198-1-inochiama@gmail.com/
1. patch 1: reused sophgo,sg2000-clk for sg2002.
2. patch 1: mention sg2002 refer to a real device, not a wildcard one in
            commit message.
3. patch 2: fix wrong data for sophgo,cv1812h-clk.
4. patch 2: remove compatible sophgo,sg2002-clk.
5. patch 3: adapt the change of patch 1,2.

Inochi Amaoto (3):
  dt-bindings: clock: sophgo: Use precise compatible for CV1800 series
    SoC
  clk: sophgo: Add support for newly added precise compatible
  riscv: dts: sophgo: switch precise compatible for existed clock device
    for CV18XX

 .../bindings/clock/sophgo,cv1800-clk.yaml        | 16 ++++++++++++----
 arch/riscv/boot/dts/sophgo/cv1800b.dtsi          |  2 +-
 arch/riscv/boot/dts/sophgo/cv1812h.dtsi          |  2 +-
 arch/riscv/boot/dts/sophgo/sg2002.dtsi           |  2 +-
 drivers/clk/sophgo/clk-cv1800.c                  |  2 ++
 5 files changed, 17 insertions(+), 7 deletions(-)


base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
prerequisite-patch-id: 94fb3d26e017cf839b4dcb4bf85624614a94b9ac
prerequisite-patch-id: 8f4a8bdead0e4e3d6904adbc0fd150b7dffefc85
prerequisite-patch-id: b30e850690903c3ddc3d8bb77a99e97934dc9dde
prerequisite-patch-id: 6e1117694a53a0059b145ad4751ec204cae0db35
--
2.49.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/3] dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC
  2025-05-04 10:45 [PATCH v2 0/3] riscv: sophgo: cv18xx: dts rework, part 2 Inochi Amaoto
@ 2025-05-04 10:45 ` Inochi Amaoto
  2025-05-06 16:20   ` Conor Dooley
  2025-05-04 10:45 ` [PATCH v2 2/3] clk: sophgo: Add support for newly added precise compatible Inochi Amaoto
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Inochi Amaoto @ 2025-05-04 10:45 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Chen Wang, Inochi Amaoto, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Alexander Sverdlin,
	Thomas Bonnefille, Jeff Johnson
  Cc: linux-clk, devicetree, sophgo, linux-kernel, linux-riscv,
	Yixun Lan, Longbin Li

As previous binding uses a wildcard compatible for existed clock device
of CV1800 series SoC, it is not suitable for existed requirement. The
only exception is sophgo,sg2000-clk, it does match a real device, so
keep it as is.

Add new precise compatible for existed clock devices of CV1800 series
SoCs and make old wildcard compatible deprecated.

Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
---
 .../bindings/clock/sophgo,cv1800-clk.yaml        | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/clock/sophgo,cv1800-clk.yaml b/Documentation/devicetree/bindings/clock/sophgo,cv1800-clk.yaml
index 59ef41adb539..379ce3e9e391 100644
--- a/Documentation/devicetree/bindings/clock/sophgo,cv1800-clk.yaml
+++ b/Documentation/devicetree/bindings/clock/sophgo,cv1800-clk.yaml
@@ -11,10 +11,18 @@ maintainers:
 
 properties:
   compatible:
-    enum:
-      - sophgo,cv1800-clk
-      - sophgo,cv1810-clk
-      - sophgo,sg2000-clk
+    oneOf:
+      - enum:
+          - sophgo,cv1800b-clk
+          - sophgo,cv1812h-clk
+          - sophgo,sg2000-clk
+      - items:
+          - const: sophgo,sg2002-clk
+          - const: sophgo,sg2000-clk
+      - const: sophgo,cv1800-clk
+        deprecated: true
+      - const: sophgo,cv1810-clk
+        deprecated: true
 
   reg:
     maxItems: 1
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/3] clk: sophgo: Add support for newly added precise compatible
  2025-05-04 10:45 [PATCH v2 0/3] riscv: sophgo: cv18xx: dts rework, part 2 Inochi Amaoto
  2025-05-04 10:45 ` [PATCH v2 1/3] dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC Inochi Amaoto
@ 2025-05-04 10:45 ` Inochi Amaoto
  2025-05-04 10:55   ` Alexander Sverdlin
  2025-05-04 10:45 ` [PATCH v2 3/3] riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX Inochi Amaoto
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Inochi Amaoto @ 2025-05-04 10:45 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Chen Wang, Inochi Amaoto, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Alexander Sverdlin,
	Thomas Bonnefille, Jeff Johnson
  Cc: linux-clk, devicetree, sophgo, linux-kernel, linux-riscv,
	Yixun Lan, Longbin Li

Add of device id definition for newly added precise compatible.

Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
---
 drivers/clk/sophgo/clk-cv1800.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/clk/sophgo/clk-cv1800.c b/drivers/clk/sophgo/clk-cv1800.c
index e0c4dc347579..a4116ac1adcb 100644
--- a/drivers/clk/sophgo/clk-cv1800.c
+++ b/drivers/clk/sophgo/clk-cv1800.c
@@ -1519,7 +1519,9 @@ static int cv1800_clk_probe(struct platform_device *pdev)
 
 static const struct of_device_id cv1800_clk_ids[] = {
 	{ .compatible = "sophgo,cv1800-clk", .data = &cv1800_desc },
+	{ .compatible = "sophgo,cv1800b-clk", .data = &cv1800_desc },
 	{ .compatible = "sophgo,cv1810-clk", .data = &cv1810_desc },
+	{ .compatible = "sophgo,cv1812h-clk", .data = &cv1810_desc },
 	{ .compatible = "sophgo,sg2000-clk", .data = &sg2000_desc },
 	{ }
 };
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 3/3] riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX
  2025-05-04 10:45 [PATCH v2 0/3] riscv: sophgo: cv18xx: dts rework, part 2 Inochi Amaoto
  2025-05-04 10:45 ` [PATCH v2 1/3] dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC Inochi Amaoto
  2025-05-04 10:45 ` [PATCH v2 2/3] clk: sophgo: Add support for newly added precise compatible Inochi Amaoto
@ 2025-05-04 10:45 ` Inochi Amaoto
  2025-05-04 10:55   ` Alexander Sverdlin
  2025-05-06 23:45 ` (subset) [PATCH v2 0/3] riscv: sophgo: cv18xx: dts rework, part 2 Inochi Amaoto
  2025-05-13  4:18 ` Inochi Amaoto
  4 siblings, 1 reply; 9+ messages in thread
From: Inochi Amaoto @ 2025-05-04 10:45 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Chen Wang, Inochi Amaoto, Paul Walmsley,
	Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Alexander Sverdlin,
	Thomas Bonnefille, Jeff Johnson
  Cc: linux-clk, devicetree, sophgo, linux-kernel, linux-riscv,
	Yixun Lan, Longbin Li

replace newly added precise compatible with old one for existed
clock device of CV18XX series SoCs.

Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
---
 arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 2 +-
 arch/riscv/boot/dts/sophgo/cv1812h.dtsi | 2 +-
 arch/riscv/boot/dts/sophgo/sg2002.dtsi  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
index 88707cc13fb4..90de978f69c1 100644
--- a/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
+++ b/arch/riscv/boot/dts/sophgo/cv1800b.dtsi
@@ -29,7 +29,7 @@ pinctrl: pinctrl@3001000 {
 		};
 
 		clk: clock-controller@3002000 {
-			compatible = "sophgo,cv1800-clk";
+			compatible = "sophgo,cv1800b-clk";
 			reg = <0x03002000 0x1000>;
 			clocks = <&osc>;
 			#clock-cells = <1>;
diff --git a/arch/riscv/boot/dts/sophgo/cv1812h.dtsi b/arch/riscv/boot/dts/sophgo/cv1812h.dtsi
index 0974955e4e05..9a2a314d3347 100644
--- a/arch/riscv/boot/dts/sophgo/cv1812h.dtsi
+++ b/arch/riscv/boot/dts/sophgo/cv1812h.dtsi
@@ -31,7 +31,7 @@ pinctrl: pinctrl@3001000 {
 		};
 
 		clk: clock-controller@3002000 {
-			compatible = "sophgo,cv1810-clk";
+			compatible = "sophgo,cv1812h-clk";
 			reg = <0x03002000 0x1000>;
 			clocks = <&osc>;
 			#clock-cells = <1>;
diff --git a/arch/riscv/boot/dts/sophgo/sg2002.dtsi b/arch/riscv/boot/dts/sophgo/sg2002.dtsi
index 6f09c9199102..98001cce238e 100644
--- a/arch/riscv/boot/dts/sophgo/sg2002.dtsi
+++ b/arch/riscv/boot/dts/sophgo/sg2002.dtsi
@@ -31,7 +31,7 @@ pinctrl: pinctrl@3001000 {
 		};
 
 		clk: clock-controller@3002000 {
-			compatible = "sophgo,sg2000-clk";
+			compatible = "sophgo,sg2002-clk", "sophgo,sg2000-clk";
 			reg = <0x03002000 0x1000>;
 			clocks = <&osc>;
 			#clock-cells = <1>;
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 2/3] clk: sophgo: Add support for newly added precise compatible
  2025-05-04 10:45 ` [PATCH v2 2/3] clk: sophgo: Add support for newly added precise compatible Inochi Amaoto
@ 2025-05-04 10:55   ` Alexander Sverdlin
  0 siblings, 0 replies; 9+ messages in thread
From: Alexander Sverdlin @ 2025-05-04 10:55 UTC (permalink / raw)
  To: Inochi Amaoto; +Cc: linux-clk, devicetree, sophgo, linux-kernel, linux-riscv

On Sun, 2025-05-04 at 18:45 +0800, Inochi Amaoto wrote:
> Add of device id definition for newly added precise compatible.
> 
> Signed-off-by: Inochi Amaoto <inochiama@gmail.com>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  drivers/clk/sophgo/clk-cv1800.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/clk/sophgo/clk-cv1800.c b/drivers/clk/sophgo/clk-cv1800.c
> index e0c4dc347579..a4116ac1adcb 100644
> --- a/drivers/clk/sophgo/clk-cv1800.c
> +++ b/drivers/clk/sophgo/clk-cv1800.c
> @@ -1519,7 +1519,9 @@ static int cv1800_clk_probe(struct platform_device *pdev)
>  
>  static const struct of_device_id cv1800_clk_ids[] = {
>  	{ .compatible = "sophgo,cv1800-clk", .data = &cv1800_desc },
> +	{ .compatible = "sophgo,cv1800b-clk", .data = &cv1800_desc },
>  	{ .compatible = "sophgo,cv1810-clk", .data = &cv1810_desc },
> +	{ .compatible = "sophgo,cv1812h-clk", .data = &cv1810_desc },
>  	{ .compatible = "sophgo,sg2000-clk", .data = &sg2000_desc },
>  	{ }
>  };

-- 
Alexander Sverdlin.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 3/3] riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX
  2025-05-04 10:45 ` [PATCH v2 3/3] riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX Inochi Amaoto
@ 2025-05-04 10:55   ` Alexander Sverdlin
  0 siblings, 0 replies; 9+ messages in thread
From: Alexander Sverdlin @ 2025-05-04 10:55 UTC (permalink / raw)
  To: Inochi Amaoto; +Cc: linux-clk, devicetree, sophgo, linux-kernel, linux-riscv

On Sun, 2025-05-04 at 18:45 +0800, Inochi Amaoto wrote:
> replace newly added precise compatible with old one for existed
> clock device of CV18XX series SoCs.
> 
> Signed-off-by: Inochi Amaoto <inochiama@gmail.com>

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  arch/riscv/boot/dts/sophgo/cv1800b.dtsi | 2 +-
>  arch/riscv/boot/dts/sophgo/cv1812h.dtsi | 2 +-
>  arch/riscv/boot/dts/sophgo/sg2002.dtsi  | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)

-- 
Alexander Sverdlin.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/3] dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC
  2025-05-04 10:45 ` [PATCH v2 1/3] dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC Inochi Amaoto
@ 2025-05-06 16:20   ` Conor Dooley
  0 siblings, 0 replies; 9+ messages in thread
From: Conor Dooley @ 2025-05-06 16:20 UTC (permalink / raw)
  To: Inochi Amaoto
  Cc: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, Alexander Sverdlin, Thomas Bonnefille,
	Jeff Johnson, linux-clk, devicetree, sophgo, linux-kernel,
	linux-riscv, Yixun Lan, Longbin Li

[-- Attachment #1: Type: text/plain, Size: 545 bytes --]

On Sun, May 04, 2025 at 06:45:50PM +0800, Inochi Amaoto wrote:
> As previous binding uses a wildcard compatible for existed clock device
> of CV1800 series SoC, it is not suitable for existed requirement. The
> only exception is sophgo,sg2000-clk, it does match a real device, so
> keep it as is.
> 
> Add new precise compatible for existed clock devices of CV1800 series
> SoCs and make old wildcard compatible deprecated.
> 
> Signed-off-by: Inochi Amaoto <inochiama@gmail.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: (subset) [PATCH v2 0/3] riscv: sophgo: cv18xx: dts rework, part 2
  2025-05-04 10:45 [PATCH v2 0/3] riscv: sophgo: cv18xx: dts rework, part 2 Inochi Amaoto
                   ` (2 preceding siblings ...)
  2025-05-04 10:45 ` [PATCH v2 3/3] riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX Inochi Amaoto
@ 2025-05-06 23:45 ` Inochi Amaoto
  2025-05-13  4:18 ` Inochi Amaoto
  4 siblings, 0 replies; 9+ messages in thread
From: Inochi Amaoto @ 2025-05-06 23:45 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, Alexander Sverdlin, Thomas Bonnefille,
	Jeff Johnson, Inochi Amaoto
  Cc: linux-clk, devicetree, sophgo, linux-kernel, linux-riscv,
	Yixun Lan, Longbin Li

On Sun, 04 May 2025 18:45:49 +0800, Inochi Amaoto wrote:
> The part 2 of dts rework replaces precise compatible for existed clock device
> with old wildcard one.
> 
> Changed from v1:
> - https://lore.kernel.org/all/20250430020932.307198-1-inochiama@gmail.com/
> 1. patch 1: reused sophgo,sg2000-clk for sg2002.
> 2. patch 1: mention sg2002 refer to a real device, not a wildcard one in
>             commit message.
> 3. patch 2: fix wrong data for sophgo,cv1812h-clk.
> 4. patch 2: remove compatible sophgo,sg2002-clk.
> 5. patch 3: adapt the change of patch 1,2.
> 
> [...]

Applied to sophgo-clk-for-6.16-rc1, thanks!

[1/3] dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC
      https://github.com/sophgo/linux/commit/6d880961f5f9b84d13fb4a0208c7405966bc3489
[2/3] clk: sophgo: Add support for newly added precise compatible
      https://github.com/sophgo/linux/commit/dd8bbae9fefeead76f20cd410a5a8299fcbad220

Thanks,
Inochi


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: (subset) [PATCH v2 0/3] riscv: sophgo: cv18xx: dts rework, part 2
  2025-05-04 10:45 [PATCH v2 0/3] riscv: sophgo: cv18xx: dts rework, part 2 Inochi Amaoto
                   ` (3 preceding siblings ...)
  2025-05-06 23:45 ` (subset) [PATCH v2 0/3] riscv: sophgo: cv18xx: dts rework, part 2 Inochi Amaoto
@ 2025-05-13  4:18 ` Inochi Amaoto
  4 siblings, 0 replies; 9+ messages in thread
From: Inochi Amaoto @ 2025-05-13  4:18 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Chen Wang, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, Alexander Sverdlin, Thomas Bonnefille,
	Jeff Johnson, Inochi Amaoto
  Cc: linux-clk, devicetree, sophgo, linux-kernel, linux-riscv,
	Yixun Lan, Longbin Li

On Sun, 04 May 2025 18:45:49 +0800, Inochi Amaoto wrote:
> The part 2 of dts rework replaces precise compatible for existed clock device
> with old wildcard one.
> 
> Changed from v1:
> - https://lore.kernel.org/all/20250430020932.307198-1-inochiama@gmail.com/
> 1. patch 1: reused sophgo,sg2000-clk for sg2002.
> 2. patch 1: mention sg2002 refer to a real device, not a wildcard one in
>             commit message.
> 3. patch 2: fix wrong data for sophgo,cv1812h-clk.
> 4. patch 2: remove compatible sophgo,sg2002-clk.
> 5. patch 3: adapt the change of patch 1,2.
> 
> [...]

Applied to for-next, thanks!

[3/3] riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX
      https://github.com/sophgo/linux/commit/6493272ec02706dcb2a32a1c7b14e47432ce6d6a

Thanks,
Inochi


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-05-13  4:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-04 10:45 [PATCH v2 0/3] riscv: sophgo: cv18xx: dts rework, part 2 Inochi Amaoto
2025-05-04 10:45 ` [PATCH v2 1/3] dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC Inochi Amaoto
2025-05-06 16:20   ` Conor Dooley
2025-05-04 10:45 ` [PATCH v2 2/3] clk: sophgo: Add support for newly added precise compatible Inochi Amaoto
2025-05-04 10:55   ` Alexander Sverdlin
2025-05-04 10:45 ` [PATCH v2 3/3] riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX Inochi Amaoto
2025-05-04 10:55   ` Alexander Sverdlin
2025-05-06 23:45 ` (subset) [PATCH v2 0/3] riscv: sophgo: cv18xx: dts rework, part 2 Inochi Amaoto
2025-05-13  4:18 ` 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).