devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] riscv: dts: starfive: replace underscores in node names
@ 2024-02-13 14:46 Krzysztof Kozlowski
  2024-02-13 16:41 ` Conor Dooley
  2024-03-05 14:44 ` Geert Uytterhoeven
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-13 14:46 UTC (permalink / raw)
  To: Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	devicetree, linux-riscv, linux-kernel
  Cc: Krzysztof Kozlowski

Underscores should not be used in node names (dtc with W=2 warns about
them), so replace them with hyphens.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/riscv/boot/dts/starfive/jh7100.dtsi | 12 ++++++------
 arch/riscv/boot/dts/starfive/jh7110.dtsi |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/riscv/boot/dts/starfive/jh7100.dtsi b/arch/riscv/boot/dts/starfive/jh7100.dtsi
index 14d553047e84..90149e379c10 100644
--- a/arch/riscv/boot/dts/starfive/jh7100.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7100.dtsi
@@ -96,14 +96,14 @@ cpu-thermal {
 			thermal-sensors = <&sfctemp>;
 
 			trips {
-				cpu_alert0 {
+				cpu-alert0 {
 					/* milliCelsius */
 					temperature = <75000>;
 					hysteresis = <2000>;
 					type = "passive";
 				};
 
-				cpu_crit {
+				cpu-crit {
 					/* milliCelsius */
 					temperature = <90000>;
 					hysteresis = <2000>;
@@ -113,28 +113,28 @@ cpu_crit {
 		};
 	};
 
-	osc_sys: osc_sys {
+	osc_sys: osc-sys {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		/* This value must be overridden by the board */
 		clock-frequency = <0>;
 	};
 
-	osc_aud: osc_aud {
+	osc_aud: osc-aud {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		/* This value must be overridden by the board */
 		clock-frequency = <0>;
 	};
 
-	gmac_rmii_ref: gmac_rmii_ref {
+	gmac_rmii_ref: gmac-rmii-ref {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		/* Should be overridden by the board when needed */
 		clock-frequency = <0>;
 	};
 
-	gmac_gr_mii_rxclk: gmac_gr_mii_rxclk {
+	gmac_gr_mii_rxclk: gmac-gr-mii-rxclk {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		/* Should be overridden by the board when needed */
diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi
index 1b782f2c1395..8e7f5dec6286 100644
--- a/arch/riscv/boot/dts/starfive/jh7110.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi
@@ -237,14 +237,14 @@ map0 {
 			};
 
 			trips {
-				cpu_alert0: cpu_alert0 {
+				cpu_alert0: cpu-alert0 {
 					/* milliCelsius */
 					temperature = <85000>;
 					hysteresis = <2000>;
 					type = "passive";
 				};
 
-				cpu_crit {
+				cpu-crit {
 					/* milliCelsius */
 					temperature = <100000>;
 					hysteresis = <2000>;
-- 
2.34.1


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

* Re: [PATCH] riscv: dts: starfive: replace underscores in node names
  2024-02-13 14:46 [PATCH] riscv: dts: starfive: replace underscores in node names Krzysztof Kozlowski
@ 2024-02-13 16:41 ` Conor Dooley
  2024-03-05 14:44 ` Geert Uytterhoeven
  1 sibling, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2024-02-13 16:41 UTC (permalink / raw)
  To: Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	devicetree, linux-riscv, linux-kernel, Krzysztof Kozlowski
  Cc: conor, Conor Dooley

From: Conor Dooley <conor.dooley@microchip.com>

On Tue, 13 Feb 2024 15:46:38 +0100, Krzysztof Kozlowski wrote:
> Underscores should not be used in node names (dtc with W=2 warns about
> them), so replace them with hyphens.
> 
> 

Applied to riscv-dt-fixes, thanks!

[1/1] riscv: dts: starfive: replace underscores in node names
      https://git.kernel.org/conor/c/f03606470886

Thanks,
Conor.

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

* Re: [PATCH] riscv: dts: starfive: replace underscores in node names
  2024-02-13 14:46 [PATCH] riscv: dts: starfive: replace underscores in node names Krzysztof Kozlowski
  2024-02-13 16:41 ` Conor Dooley
@ 2024-03-05 14:44 ` Geert Uytterhoeven
  2024-03-05 15:55   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2024-03-05 14:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	devicetree, linux-riscv, linux-kernel, linux-clk

Hi Krzysztof

On Tue, Feb 13, 2024 at 3:48 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
> Underscores should not be used in node names (dtc with W=2 warns about
> them), so replace them with hyphens.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thanks for your patch, which is now commit f03606470886e781 ("riscv:
dts: starfive: replace underscores in node names") in v6.8-rc6.

This causes e.g. BeagleV Starlight to hang during boot without any
output.  Booting with "earlycon" reveals:

    dw-apb-uart 12440000.serial: error -EINVAL: clock rate not defined
    dw-apb-uart: probe of 12440000.serial failed with error -22

and indeed, p->uartclk = 0.

> --- a/arch/riscv/boot/dts/starfive/jh7100.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7100.dtsi
> @@ -113,28 +113,28 @@ cpu_crit {
>                 };
>         };
>
> -       osc_sys: osc_sys {
> +       osc_sys: osc-sys {
>                 compatible = "fixed-clock";
>                 #clock-cells = <0>;
>                 /* This value must be overridden by the board */
>                 clock-frequency = <0>;
>         };
>
> -       osc_aud: osc_aud {
> +       osc_aud: osc-aud {
>                 compatible = "fixed-clock";
>                 #clock-cells = <0>;
>                 /* This value must be overridden by the board */
>                 clock-frequency = <0>;
>         };
>
> -       gmac_rmii_ref: gmac_rmii_ref {
> +       gmac_rmii_ref: gmac-rmii-ref {
>                 compatible = "fixed-clock";
>                 #clock-cells = <0>;
>                 /* Should be overridden by the board when needed */
>                 clock-frequency = <0>;
>         };
>
> -       gmac_gr_mii_rxclk: gmac_gr_mii_rxclk {
> +       gmac_gr_mii_rxclk: gmac-gr-mii-rxclk {
>                 compatible = "fixed-clock";
>                 #clock-cells = <0>;
>                 /* Should be overridden by the board when needed */

The clock driver relies on the clock names, which are (in the absence
of clock-output-names properties) identical to the actual node names:

drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name = "osc_sys";
drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name = "osc_aud";
drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name =
"gmac_rmii_ref";
drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name =
"gmac_gr_mii_rxclk";

Hence these clocks can no longer be found, and all children have a
zero clock rate, causing the breakage.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH] riscv: dts: starfive: replace underscores in node names
  2024-03-05 14:44 ` Geert Uytterhoeven
@ 2024-03-05 15:55   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2024-03-05 15:55 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Emil Renner Berthing, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	devicetree, linux-riscv, linux-kernel, linux-clk

On 05/03/2024 15:44, Geert Uytterhoeven wrote:
> Hi Krzysztof
> 
> On Tue, Feb 13, 2024 at 3:48 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>> Underscores should not be used in node names (dtc with W=2 warns about
>> them), so replace them with hyphens.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> Thanks for your patch, which is now commit f03606470886e781 ("riscv:
> dts: starfive: replace underscores in node names") in v6.8-rc6.
> 
> This causes e.g. BeagleV Starlight to hang during boot without any
> output.  Booting with "earlycon" reveals:
> 
>     dw-apb-uart 12440000.serial: error -EINVAL: clock rate not defined
>     dw-apb-uart: probe of 12440000.serial failed with error -22
> 
> and indeed, p->uartclk = 0.
> 
>> --- a/arch/riscv/boot/dts/starfive/jh7100.dtsi
>> +++ b/arch/riscv/boot/dts/starfive/jh7100.dtsi
>> @@ -113,28 +113,28 @@ cpu_crit {
>>                 };
>>         };
>>
>> -       osc_sys: osc_sys {
>> +       osc_sys: osc-sys {
>>                 compatible = "fixed-clock";
>>                 #clock-cells = <0>;
>>                 /* This value must be overridden by the board */
>>                 clock-frequency = <0>;
>>         };
>>
>> -       osc_aud: osc_aud {
>> +       osc_aud: osc-aud {
>>                 compatible = "fixed-clock";
>>                 #clock-cells = <0>;
>>                 /* This value must be overridden by the board */
>>                 clock-frequency = <0>;
>>         };
>>
>> -       gmac_rmii_ref: gmac_rmii_ref {
>> +       gmac_rmii_ref: gmac-rmii-ref {
>>                 compatible = "fixed-clock";
>>                 #clock-cells = <0>;
>>                 /* Should be overridden by the board when needed */
>>                 clock-frequency = <0>;
>>         };
>>
>> -       gmac_gr_mii_rxclk: gmac_gr_mii_rxclk {
>> +       gmac_gr_mii_rxclk: gmac-gr-mii-rxclk {
>>                 compatible = "fixed-clock";
>>                 #clock-cells = <0>;
>>                 /* Should be overridden by the board when needed */
> 
> The clock driver relies on the clock names, which are (in the absence
> of clock-output-names properties) identical to the actual node names:
> 
> drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name = "osc_sys";
> drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name = "osc_aud";
> drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name =
> "gmac_rmii_ref";
> drivers/clk/starfive/clk-starfive-jh7100.c:    parents[i].fw_name =
> "gmac_gr_mii_rxclk";
> 
> Hence these clocks can no longer be found, and all children have a
> zero clock rate, causing the breakage.

Uh, sorry :( and thanks for the report. I'll add clock-output-names.

Best regards,
Krzysztof


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

end of thread, other threads:[~2024-03-05 15:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-13 14:46 [PATCH] riscv: dts: starfive: replace underscores in node names Krzysztof Kozlowski
2024-02-13 16:41 ` Conor Dooley
2024-03-05 14:44 ` Geert Uytterhoeven
2024-03-05 15:55   ` Krzysztof Kozlowski

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).