mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
* [PATCH v2] ARM: dts: meson8: correct uart_B and uart_C clock references
@ 2023-05-14 20:19 Martin Blumenstingl
  2023-05-14 21:01 ` Hans-Frieder Vogt
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Blumenstingl @ 2023-05-14 20:19 UTC (permalink / raw)
  To: linux-amlogic
  Cc: linux-kernel, linux-arm-kernel, neil.armstrong,
	Martin Blumenstingl, Hans-Frieder Vogt

On Meson8 uart_B and uart_C do not work, because they are relying on
incorrect clocks. Change the references of pclk to the correct CLKID
(UART1 for uart_B and UART2 for uart_C), to allow use of the two uarts.

This was originally reported by Hans-Frieder Vogt for Meson8b [0], but
the same bug is also present in meson8.dtsi

[0] https://lore.kernel.org/linux-amlogic/trinity-bf20bcb9-790b-4ab9-99e3-0831ef8257f4-1680878185420@3c-app-gmx-bap55/

Fixes: 57007bfb5469 ("ARM: dts: meson8: Fix the UART device-tree schema validation")
Reported-by: Hans-Frieder Vogt <hfdevel@gmx.net> # for meson8b.dtsi
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
Changes since v1:
- move the link to the original report for Meson8b to the description


 arch/arm/boot/dts/meson8.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index 4f22ab451aae..1054297fa69f 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -769,13 +769,13 @@ &uart_A {
 
 &uart_B {
 	compatible = "amlogic,meson8-uart";
-	clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
+	clocks = <&xtal>, <&clkc CLKID_UART2>, <&clkc CLKID_CLK81>;
 	clock-names = "xtal", "pclk", "baud";
 };
 
 &uart_C {
 	compatible = "amlogic,meson8-uart";
-	clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
+	clocks = <&xtal>, <&clkc CLKID_UART2>, <&clkc CLKID_CLK81>;
 	clock-names = "xtal", "pclk", "baud";
 };
 
-- 
2.40.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v2] ARM: dts: meson8: correct uart_B and uart_C clock references
  2023-05-14 20:19 [PATCH v2] ARM: dts: meson8: correct uart_B and uart_C clock references Martin Blumenstingl
@ 2023-05-14 21:01 ` Hans-Frieder Vogt
  2023-05-14 21:07   ` Martin Blumenstingl
  0 siblings, 1 reply; 3+ messages in thread
From: Hans-Frieder Vogt @ 2023-05-14 21:01 UTC (permalink / raw)
  To: Martin Blumenstingl, linux-amlogic
  Cc: linux-kernel, linux-arm-kernel, neil.armstrong

On 14.05.2023 22.19, Martin Blumenstingl wrote:
> On Meson8 uart_B and uart_C do not work, because they are relying on
> incorrect clocks. Change the references of pclk to the correct CLKID
> (UART1 for uart_B and UART2 for uart_C), to allow use of the two uarts.
>
> This was originally reported by Hans-Frieder Vogt for Meson8b [0], but
> the same bug is also present in meson8.dtsi
>
> [0] https://lore.kernel.org/linux-amlogic/trinity-bf20bcb9-790b-4ab9-99e3-0831ef8257f4-1680878185420@3c-app-gmx-bap55/
>
> Fixes: 57007bfb5469 ("ARM: dts: meson8: Fix the UART device-tree schema validation")
> Reported-by: Hans-Frieder Vogt <hfdevel@gmx.net> # for meson8b.dtsi
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
> Changes since v1:
> - move the link to the original report for Meson8b to the description
>
>
>   arch/arm/boot/dts/meson8.dtsi | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
> index 4f22ab451aae..1054297fa69f 100644
> --- a/arch/arm/boot/dts/meson8.dtsi
> +++ b/arch/arm/boot/dts/meson8.dtsi
> @@ -769,13 +769,13 @@ &uart_A {
>
>   &uart_B {
>   	compatible = "amlogic,meson8-uart";
> -	clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
> +	clocks = <&xtal>, <&clkc CLKID_UART2>, <&clkc CLKID_CLK81>;
Shouldn't the second clock reference for uart_B rather be CLKID_UART1,
similar to meson8b?
Sorry, didn't spot this earlier.
>   	clock-names = "xtal", "pclk", "baud";
>   };
>
>   &uart_C {
>   	compatible = "amlogic,meson8-uart";
> -	clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
> +	clocks = <&xtal>, <&clkc CLKID_UART2>, <&clkc CLKID_CLK81>;
>   	clock-names = "xtal", "pclk", "baud";
>   };
>


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* Re: [PATCH v2] ARM: dts: meson8: correct uart_B and uart_C clock references
  2023-05-14 21:01 ` Hans-Frieder Vogt
@ 2023-05-14 21:07   ` Martin Blumenstingl
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Blumenstingl @ 2023-05-14 21:07 UTC (permalink / raw)
  To: Hans-Frieder Vogt
  Cc: linux-amlogic, linux-kernel, linux-arm-kernel, neil.armstrong

On Sun, May 14, 2023 at 11:01 PM Hans-Frieder Vogt <hfdevel@gmx.net> wrote:
[...]
> >   &uart_B {
> >       compatible = "amlogic,meson8-uart";
> > -     clocks = <&xtal>, <&clkc CLKID_UART0>, <&clkc CLKID_CLK81>;
> > +     clocks = <&xtal>, <&clkc CLKID_UART2>, <&clkc CLKID_CLK81>;
> Shouldn't the second clock reference for uart_B rather be CLKID_UART1,
> similar to meson8b?
> Sorry, didn't spot this earlier.
You're totally right - thank you for spotting this!
I'll send a fixed v3 soon.

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, other threads:[~2023-05-14 21:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-14 20:19 [PATCH v2] ARM: dts: meson8: correct uart_B and uart_C clock references Martin Blumenstingl
2023-05-14 21:01 ` Hans-Frieder Vogt
2023-05-14 21:07   ` Martin Blumenstingl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®