devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] riscv: sophgo: cv18xx: dts rework, part 2
@ 2025-04-30  2:09 Inochi Amaoto
  2025-04-30  2:09 ` [PATCH 1/3] dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC Inochi Amaoto
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Inochi Amaoto @ 2025-04-30  2:09 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.

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           | 13 +++++++++----
 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                     |  3 +++
 5 files changed, 15 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] 12+ messages in thread

* [PATCH 1/3] dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC
  2025-04-30  2:09 [PATCH 0/3] riscv: sophgo: cv18xx: dts rework, part 2 Inochi Amaoto
@ 2025-04-30  2:09 ` Inochi Amaoto
  2025-04-30  2:09 ` [PATCH 2/3] clk: sophgo: Add support for newly added precise compatible Inochi Amaoto
  2025-04-30  2:09 ` [PATCH 3/3] riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX Inochi Amaoto
  2 siblings, 0 replies; 12+ messages in thread
From: Inochi Amaoto @ 2025-04-30  2:09 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.

Add new precise compatible for existed clock devices of CV1800 series
SoCs.

Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
---
 .../bindings/clock/sophgo,cv1800-clk.yaml           | 13 +++++++++----
 1 file changed, 9 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..c52e130db887 100644
--- a/Documentation/devicetree/bindings/clock/sophgo,cv1800-clk.yaml
+++ b/Documentation/devicetree/bindings/clock/sophgo,cv1800-clk.yaml
@@ -11,10 +11,15 @@ maintainers:
 
 properties:
   compatible:
-    enum:
-      - sophgo,cv1800-clk
-      - sophgo,cv1810-clk
-      - sophgo,sg2000-clk
+    oneOf:
+      - const: sophgo,cv1800-clk
+        deprecated: true
+      - const: sophgo,cv1800b-clk
+      - const: sophgo,cv1810-clk
+        deprecated: true
+      - const: sophgo,cv1812h-clk
+      - const: sophgo,sg2000-clk
+      - const: sophgo,sg2002-clk
 
   reg:
     maxItems: 1
-- 
2.49.0


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

* [PATCH 2/3] clk: sophgo: Add support for newly added precise compatible
  2025-04-30  2:09 [PATCH 0/3] riscv: sophgo: cv18xx: dts rework, part 2 Inochi Amaoto
  2025-04-30  2:09 ` [PATCH 1/3] dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC Inochi Amaoto
@ 2025-04-30  2:09 ` Inochi Amaoto
  2025-04-30 15:33   ` Conor Dooley
  2025-04-30 15:39   ` Alexander Sverdlin
  2025-04-30  2:09 ` [PATCH 3/3] riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX Inochi Amaoto
  2 siblings, 2 replies; 12+ messages in thread
From: Inochi Amaoto @ 2025-04-30  2:09 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 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/clk/sophgo/clk-cv1800.c b/drivers/clk/sophgo/clk-cv1800.c
index e0c4dc347579..e10221df6385 100644
--- a/drivers/clk/sophgo/clk-cv1800.c
+++ b/drivers/clk/sophgo/clk-cv1800.c
@@ -1519,8 +1519,11 @@ 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 = &cv1800_desc },
 	{ .compatible = "sophgo,sg2000-clk", .data = &sg2000_desc },
+	{ .compatible = "sophgo,sg2002-clk", .data = &sg2000_desc },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, cv1800_clk_ids);
-- 
2.49.0


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

* [PATCH 3/3] riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX
  2025-04-30  2:09 [PATCH 0/3] riscv: sophgo: cv18xx: dts rework, part 2 Inochi Amaoto
  2025-04-30  2:09 ` [PATCH 1/3] dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC Inochi Amaoto
  2025-04-30  2:09 ` [PATCH 2/3] clk: sophgo: Add support for newly added precise compatible Inochi Amaoto
@ 2025-04-30  2:09 ` Inochi Amaoto
  2 siblings, 0 replies; 12+ messages in thread
From: Inochi Amaoto @ 2025-04-30  2:09 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..b9e4b4687046 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";
 			reg = <0x03002000 0x1000>;
 			clocks = <&osc>;
 			#clock-cells = <1>;
-- 
2.49.0


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

* Re: [PATCH 2/3] clk: sophgo: Add support for newly added precise compatible
  2025-04-30  2:09 ` [PATCH 2/3] clk: sophgo: Add support for newly added precise compatible Inochi Amaoto
@ 2025-04-30 15:33   ` Conor Dooley
  2025-04-30 15:37     ` Conor Dooley
  2025-04-30 22:42     ` Inochi Amaoto
  2025-04-30 15:39   ` Alexander Sverdlin
  1 sibling, 2 replies; 12+ messages in thread
From: Conor Dooley @ 2025-04-30 15:33 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: 1300 bytes --]

On Wed, Apr 30, 2025 at 10:09:30AM +0800, Inochi Amaoto wrote:
> Add of device id definition for newly added precise compatible.
> 
> Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> ---
>  drivers/clk/sophgo/clk-cv1800.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/clk/sophgo/clk-cv1800.c b/drivers/clk/sophgo/clk-cv1800.c
> index e0c4dc347579..e10221df6385 100644
> --- a/drivers/clk/sophgo/clk-cv1800.c
> +++ b/drivers/clk/sophgo/clk-cv1800.c
> @@ -1519,8 +1519,11 @@ 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 },

Given the same data is used here, should there not be fallbacks in the
dt for some of these? For example, 1812 to 1800? Or is that not okay,
because 1800 is not a real device id?

>  	{ .compatible = "sophgo,cv1810-clk", .data = &cv1810_desc },
> +	{ .compatible = "sophgo,cv1812h-clk", .data = &cv1800_desc },
>  	{ .compatible = "sophgo,sg2000-clk", .data = &sg2000_desc },
> +	{ .compatible = "sophgo,sg2002-clk", .data = &sg2000_desc },
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(of, cv1800_clk_ids);
> -- 
> 2.49.0
> 

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

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

* Re: [PATCH 2/3] clk: sophgo: Add support for newly added precise compatible
  2025-04-30 15:33   ` Conor Dooley
@ 2025-04-30 15:37     ` Conor Dooley
  2025-04-30 22:43       ` Inochi Amaoto
  2025-04-30 22:42     ` Inochi Amaoto
  1 sibling, 1 reply; 12+ messages in thread
From: Conor Dooley @ 2025-04-30 15:37 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: 1499 bytes --]

On Wed, Apr 30, 2025 at 04:33:39PM +0100, Conor Dooley wrote:
> On Wed, Apr 30, 2025 at 10:09:30AM +0800, Inochi Amaoto wrote:
> > Add of device id definition for newly added precise compatible.
> > 
> > Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> > ---
> >  drivers/clk/sophgo/clk-cv1800.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/clk/sophgo/clk-cv1800.c b/drivers/clk/sophgo/clk-cv1800.c
> > index e0c4dc347579..e10221df6385 100644
> > --- a/drivers/clk/sophgo/clk-cv1800.c
> > +++ b/drivers/clk/sophgo/clk-cv1800.c
> > @@ -1519,8 +1519,11 @@ 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 },
> 
> Given the same data is used here, should there not be fallbacks in the
> dt for some of these? For example, 1812 to 1800? Or is that not okay,
> because 1800 is not a real device id?
> 
> >  	{ .compatible = "sophgo,cv1810-clk", .data = &cv1810_desc },
> > +	{ .compatible = "sophgo,cv1812h-clk", .data = &cv1800_desc },
> >  	{ .compatible = "sophgo,sg2000-clk", .data = &sg2000_desc },
> > +	{ .compatible = "sophgo,sg2002-clk", .data = &sg2000_desc },

Actually, this one is a better example. sg2000 is not marked deprecated.
sg2002 uses the same match data. Why is no fallback to sg2000 used for
the sg2002 case?

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

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

* Re: [PATCH 2/3] clk: sophgo: Add support for newly added precise compatible
  2025-04-30  2:09 ` [PATCH 2/3] clk: sophgo: Add support for newly added precise compatible Inochi Amaoto
  2025-04-30 15:33   ` Conor Dooley
@ 2025-04-30 15:39   ` Alexander Sverdlin
  2025-04-30 22:38     ` Inochi Amaoto
  1 sibling, 1 reply; 12+ messages in thread
From: Alexander Sverdlin @ 2025-04-30 15:39 UTC (permalink / raw)
  To: Inochi Amaoto; +Cc: linux-clk, devicetree, sophgo, linux-kernel, linux-riscv

Hi Inochi!

On Wed, 2025-04-30 at 10:09 +0800, Inochi Amaoto wrote:
> Add of device id definition for newly added precise compatible.
> 
> Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> ---
>  drivers/clk/sophgo/clk-cv1800.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/clk/sophgo/clk-cv1800.c b/drivers/clk/sophgo/clk-cv1800.c
> index e0c4dc347579..e10221df6385 100644
> --- a/drivers/clk/sophgo/clk-cv1800.c
> +++ b/drivers/clk/sophgo/clk-cv1800.c
> @@ -1519,8 +1519,11 @@ 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 = &cv1800_desc },
                                                           ^
Should it have been "cv1810_desc" instead?

>  	{ .compatible = "sophgo,sg2000-clk", .data = &sg2000_desc },
> +	{ .compatible = "sophgo,sg2002-clk", .data = &sg2000_desc },
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(of, cv1800_clk_ids);

-- 
Alexander Sverdlin.

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

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

On Wed, Apr 30, 2025 at 05:39:52PM +0200, Alexander Sverdlin wrote:
> Hi Inochi!
> 
> On Wed, 2025-04-30 at 10:09 +0800, Inochi Amaoto wrote:
> > Add of device id definition for newly added precise compatible.
> > 
> > Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> > ---
> >  drivers/clk/sophgo/clk-cv1800.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/clk/sophgo/clk-cv1800.c b/drivers/clk/sophgo/clk-cv1800.c
> > index e0c4dc347579..e10221df6385 100644
> > --- a/drivers/clk/sophgo/clk-cv1800.c
> > +++ b/drivers/clk/sophgo/clk-cv1800.c
> > @@ -1519,8 +1519,11 @@ 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 = &cv1800_desc },
>                                                            ^
> Should it have been "cv1810_desc" instead?
> 

Yeah, this is a mistake. I will fix it.

> >  	{ .compatible = "sophgo,sg2000-clk", .data = &sg2000_desc },
> > +	{ .compatible = "sophgo,sg2002-clk", .data = &sg2000_desc },
> >  	{ }
> >  };
> >  MODULE_DEVICE_TABLE(of, cv1800_clk_ids);
> 
> -- 
> Alexander Sverdlin.

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

* Re: [PATCH 2/3] clk: sophgo: Add support for newly added precise compatible
  2025-04-30 15:33   ` Conor Dooley
  2025-04-30 15:37     ` Conor Dooley
@ 2025-04-30 22:42     ` Inochi Amaoto
  1 sibling, 0 replies; 12+ messages in thread
From: Inochi Amaoto @ 2025-04-30 22:42 UTC (permalink / raw)
  To: Conor Dooley, 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

On Wed, Apr 30, 2025 at 04:33:39PM +0100, Conor Dooley wrote:
> On Wed, Apr 30, 2025 at 10:09:30AM +0800, Inochi Amaoto wrote:
> > Add of device id definition for newly added precise compatible.
> > 
> > Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> > ---
> >  drivers/clk/sophgo/clk-cv1800.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/clk/sophgo/clk-cv1800.c b/drivers/clk/sophgo/clk-cv1800.c
> > index e0c4dc347579..e10221df6385 100644
> > --- a/drivers/clk/sophgo/clk-cv1800.c
> > +++ b/drivers/clk/sophgo/clk-cv1800.c
> > @@ -1519,8 +1519,11 @@ 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 },
> 
> Given the same data is used here, should there not be fallbacks in the
> dt for some of these? For example, 1812 to 1800? 

In default, there maybe not fallback for the whole series, I think.
But it is possible to use cv1800b as 

> Or is that not okay, because 1800 is not a real device id?

Yes, cv1800-clk and cv1810-clk is a old wildcard compatible, not a
real one. As this is not prefered, I want to fix this to have a
meaningful compatible.

Regards,
Inochi

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

* Re: [PATCH 2/3] clk: sophgo: Add support for newly added precise compatible
  2025-04-30 15:37     ` Conor Dooley
@ 2025-04-30 22:43       ` Inochi Amaoto
  2025-05-01 14:22         ` Conor Dooley
  0 siblings, 1 reply; 12+ messages in thread
From: Inochi Amaoto @ 2025-04-30 22:43 UTC (permalink / raw)
  To: Conor Dooley, 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

On Wed, Apr 30, 2025 at 04:37:01PM +0100, Conor Dooley wrote:
> On Wed, Apr 30, 2025 at 04:33:39PM +0100, Conor Dooley wrote:
> > On Wed, Apr 30, 2025 at 10:09:30AM +0800, Inochi Amaoto wrote:
> > > Add of device id definition for newly added precise compatible.
> > > 
> > > Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> > > ---
> > >  drivers/clk/sophgo/clk-cv1800.c | 3 +++
> > >  1 file changed, 3 insertions(+)
> > > 
> > > diff --git a/drivers/clk/sophgo/clk-cv1800.c b/drivers/clk/sophgo/clk-cv1800.c
> > > index e0c4dc347579..e10221df6385 100644
> > > --- a/drivers/clk/sophgo/clk-cv1800.c
> > > +++ b/drivers/clk/sophgo/clk-cv1800.c
> > > @@ -1519,8 +1519,11 @@ 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 },
> > 
> > Given the same data is used here, should there not be fallbacks in the
> > dt for some of these? For example, 1812 to 1800? Or is that not okay,
> > because 1800 is not a real device id?
> > 
> > >  	{ .compatible = "sophgo,cv1810-clk", .data = &cv1810_desc },
> > > +	{ .compatible = "sophgo,cv1812h-clk", .data = &cv1800_desc },
> > >  	{ .compatible = "sophgo,sg2000-clk", .data = &sg2000_desc },
> > > +	{ .compatible = "sophgo,sg2002-clk", .data = &sg2000_desc },
> 
> Actually, this one is a better example. sg2000 is not marked deprecated.
> sg2002 uses the same match data. Why is no fallback to sg2000 used for
> the sg2002 case?

Yeah, It is a good idea. I will take it, thanks,

Regards,
Inochi

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

* Re: [PATCH 2/3] clk: sophgo: Add support for newly added precise compatible
  2025-04-30 22:43       ` Inochi Amaoto
@ 2025-05-01 14:22         ` Conor Dooley
  2025-05-01 22:23           ` Inochi Amaoto
  0 siblings, 1 reply; 12+ messages in thread
From: Conor Dooley @ 2025-05-01 14:22 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: 1941 bytes --]

On Thu, May 01, 2025 at 06:43:07AM +0800, Inochi Amaoto wrote:
> On Wed, Apr 30, 2025 at 04:37:01PM +0100, Conor Dooley wrote:
> > On Wed, Apr 30, 2025 at 04:33:39PM +0100, Conor Dooley wrote:
> > > On Wed, Apr 30, 2025 at 10:09:30AM +0800, Inochi Amaoto wrote:
> > > > Add of device id definition for newly added precise compatible.
> > > > 
> > > > Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> > > > ---
> > > >  drivers/clk/sophgo/clk-cv1800.c | 3 +++
> > > >  1 file changed, 3 insertions(+)
> > > > 
> > > > diff --git a/drivers/clk/sophgo/clk-cv1800.c b/drivers/clk/sophgo/clk-cv1800.c
> > > > index e0c4dc347579..e10221df6385 100644
> > > > --- a/drivers/clk/sophgo/clk-cv1800.c
> > > > +++ b/drivers/clk/sophgo/clk-cv1800.c
> > > > @@ -1519,8 +1519,11 @@ 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 },
> > > 
> > > Given the same data is used here, should there not be fallbacks in the
> > > dt for some of these? For example, 1812 to 1800? Or is that not okay,
> > > because 1800 is not a real device id?
> > > 
> > > >  	{ .compatible = "sophgo,cv1810-clk", .data = &cv1810_desc },
> > > > +	{ .compatible = "sophgo,cv1812h-clk", .data = &cv1800_desc },
> > > >  	{ .compatible = "sophgo,sg2000-clk", .data = &sg2000_desc },
> > > > +	{ .compatible = "sophgo,sg2002-clk", .data = &sg2000_desc },
> > 
> > Actually, this one is a better example. sg2000 is not marked deprecated.
> > sg2002 uses the same match data. Why is no fallback to sg2000 used for
> > the sg2002 case?
> 
> Yeah, It is a good idea. I will take it, thanks,

Can you point out the difference in the dt-binding patch when you do,
between the sg2000 being a real device and the others not?

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

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

* Re: [PATCH 2/3] clk: sophgo: Add support for newly added precise compatible
  2025-05-01 14:22         ` Conor Dooley
@ 2025-05-01 22:23           ` Inochi Amaoto
  0 siblings, 0 replies; 12+ messages in thread
From: Inochi Amaoto @ 2025-05-01 22:23 UTC (permalink / raw)
  To: Conor Dooley, 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

On Thu, May 01, 2025 at 03:22:17PM +0100, Conor Dooley wrote:
> On Thu, May 01, 2025 at 06:43:07AM +0800, Inochi Amaoto wrote:
> > On Wed, Apr 30, 2025 at 04:37:01PM +0100, Conor Dooley wrote:
> > > On Wed, Apr 30, 2025 at 04:33:39PM +0100, Conor Dooley wrote:
> > > > On Wed, Apr 30, 2025 at 10:09:30AM +0800, Inochi Amaoto wrote:
> > > > > Add of device id definition for newly added precise compatible.
> > > > > 
> > > > > Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
> > > > > ---
> > > > >  drivers/clk/sophgo/clk-cv1800.c | 3 +++
> > > > >  1 file changed, 3 insertions(+)
> > > > > 
> > > > > diff --git a/drivers/clk/sophgo/clk-cv1800.c b/drivers/clk/sophgo/clk-cv1800.c
> > > > > index e0c4dc347579..e10221df6385 100644
> > > > > --- a/drivers/clk/sophgo/clk-cv1800.c
> > > > > +++ b/drivers/clk/sophgo/clk-cv1800.c
> > > > > @@ -1519,8 +1519,11 @@ 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 },
> > > > 
> > > > Given the same data is used here, should there not be fallbacks in the
> > > > dt for some of these? For example, 1812 to 1800? Or is that not okay,
> > > > because 1800 is not a real device id?
> > > > 
> > > > >  	{ .compatible = "sophgo,cv1810-clk", .data = &cv1810_desc },
> > > > > +	{ .compatible = "sophgo,cv1812h-clk", .data = &cv1800_desc },
> > > > >  	{ .compatible = "sophgo,sg2000-clk", .data = &sg2000_desc },
> > > > > +	{ .compatible = "sophgo,sg2002-clk", .data = &sg2000_desc },
> > > 
> > > Actually, this one is a better example. sg2000 is not marked deprecated.
> > > sg2002 uses the same match data. Why is no fallback to sg2000 used for
> > > the sg2002 case?
> > 
> > Yeah, It is a good idea. I will take it, thanks,
> 
> Can you point out the difference in the dt-binding patch when you do,
> between the sg2000 being a real device and the others not?

I will, thanks for the reminder.

Regards,
Inochi

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

end of thread, other threads:[~2025-05-01 22:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-30  2:09 [PATCH 0/3] riscv: sophgo: cv18xx: dts rework, part 2 Inochi Amaoto
2025-04-30  2:09 ` [PATCH 1/3] dt-bindings: clock: sophgo: Use precise compatible for CV1800 series SoC Inochi Amaoto
2025-04-30  2:09 ` [PATCH 2/3] clk: sophgo: Add support for newly added precise compatible Inochi Amaoto
2025-04-30 15:33   ` Conor Dooley
2025-04-30 15:37     ` Conor Dooley
2025-04-30 22:43       ` Inochi Amaoto
2025-05-01 14:22         ` Conor Dooley
2025-05-01 22:23           ` Inochi Amaoto
2025-04-30 22:42     ` Inochi Amaoto
2025-04-30 15:39   ` Alexander Sverdlin
2025-04-30 22:38     ` Inochi Amaoto
2025-04-30  2:09 ` [PATCH 3/3] riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX 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).