All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] ARM: dts: bcm283x: Fix console path on RPi3
@ 2017-10-06 13:52 Loic Poulain
       [not found] ` <1507297972-10512-1-git-send-email-loic.poulain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Loic Poulain @ 2017-10-06 13:52 UTC (permalink / raw)
  To: f.fainelli-Re5JQEeQqe8AvxtiuMwx3w, eric-WhKQ6XTQaPysTnJN9+BGXg
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, stefan.wahren-eS4NqCHxEME,
	marcel-kz+m5ild9QBg9hUCZPvPmw,
	bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w, Loic Poulain

Contrary to other RPi devices, RPi3 uses uart0 to communicate with
the BCM43438 bluetooth controller. uart1 is then used for the console.
Today, the console configuration is inherited from the bcm283x dtsi
(bootargs) which is not the correct one for the RPi3. This leads to
routing issue and confuses the Bluetooth controller with unexpected
data.

This patch introduces chosen/stdout path to configure console to uart0
on bcm283x family and overwrite it to uart1 in the RPi3 dts.

Create serial0/1 aliases referring to uart0 and uart1 paths.
Remove unneeded earlyprintk.

Fixes: 4188ea2aeb6d ("ARM: bcm283x: Define UART pinmuxing on board level")
Signed-off-by: Loic Poulain <loic.poulain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 v2: remove serial aliases redefinition in bcm2835-rpi-zero-w.dts
 v3: Replace this entire aliases block with same chosen as RPi3

 arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 11 ++++-------
 arch/arm/boot/dts/bcm2837-rpi-3-b.dts    |  5 +++++
 arch/arm/boot/dts/bcm283x.dtsi           |  7 ++++++-
 3 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
index 82651c3..a0c8080 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
@@ -18,13 +18,10 @@
 	compatible = "raspberrypi,model-zero-w", "brcm,bcm2835";
 	model = "Raspberry Pi Zero W";
 
-	/* Needed by firmware to properly init UARTs */
-	aliases {
-		uart0 = "/soc/serial@7e201000";
-		uart1 = "/soc/serial@7e215040";
-		serial0 = "/soc/serial@7e201000";
-		serial1 = "/soc/serial@7e215040";
-	};
+	chosen {
+                /* 8250 auxiliar UART instead of pl011 */
+                stdout-path = "serial1:115200n8";
+        };
 
 	leds {
 		act {
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
index 20725ca..f1c0811 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
@@ -8,6 +8,11 @@
 	compatible = "raspberrypi,3-model-b", "brcm,bcm2837";
 	model = "Raspberry Pi 3 Model B";
 
+	chosen {
+		/* 8250 auxiliar UART instead of pl011 */
+		stdout-path = "serial1:115200n8";
+	};
+
 	memory {
 		reg = <0 0x40000000>;
 	};
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index 431dcfc..013431e 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -20,8 +20,13 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
+	aliases {
+		serial0 = &uart0;
+		serial1 = &uart1;
+	};
+
 	chosen {
-		bootargs = "earlyprintk console=ttyAMA0";
+		stdout-path = "serial0:115200n8";
 	};
 
 	thermal-zones {
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v3] ARM: dts: bcm283x: Fix console path on RPi3
       [not found] ` <1507297972-10512-1-git-send-email-loic.poulain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-10-06 18:13   ` Stefan Wahren
       [not found]     ` <1740609206.57031.1507313620912-7tX72C7vayboQLBSYMtkGA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Wahren @ 2017-10-06 18:13 UTC (permalink / raw)
  To: eric-WhKQ6XTQaPysTnJN9+BGXg, Loic Poulain,
	f.fainelli-Re5JQEeQqe8AvxtiuMwx3w
  Cc: marcel-kz+m5ild9QBg9hUCZPvPmw,
	bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w,
	devicetree-u79uwXL29TY76Z2rM5mHXA

Hi Loic,

> Loic Poulain <loic.poulain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> hat am 6. Oktober 2017 um 15:52 geschrieben:
> 
> 
> Contrary to other RPi devices, RPi3 uses uart0 to communicate with
> the BCM43438 bluetooth controller. uart1 is then used for the console.
> Today, the console configuration is inherited from the bcm283x dtsi
> (bootargs) which is not the correct one for the RPi3. This leads to
> routing issue and confuses the Bluetooth controller with unexpected
> data.
> 
> This patch introduces chosen/stdout path to configure console to uart0
> on bcm283x family and overwrite it to uart1 in the RPi3 dts.
> 
> Create serial0/1 aliases referring to uart0 and uart1 paths.
> Remove unneeded earlyprintk.
> 
> Fixes: 4188ea2aeb6d ("ARM: bcm283x: Define UART pinmuxing on board level")
> Signed-off-by: Loic Poulain <loic.poulain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

after changing serial0 to serial1 in my cmdline.txt, i can see the boot messages on my RPi Zero W.

Tested-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v3] ARM: dts: bcm283x: Fix console path on RPi3
       [not found]     ` <1740609206.57031.1507313620912-7tX72C7vayboQLBSYMtkGA@public.gmane.org>
@ 2017-10-06 22:06       ` Eric Anholt
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Anholt @ 2017-10-06 22:06 UTC (permalink / raw)
  To: Stefan Wahren, Loic Poulain, f.fainelli-Re5JQEeQqe8AvxtiuMwx3w
  Cc: marcel-kz+m5ild9QBg9hUCZPvPmw,
	bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w,
	devicetree-u79uwXL29TY76Z2rM5mHXA

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

Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org> writes:

> Hi Loic,
>
>> Loic Poulain <loic.poulain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> hat am 6. Oktober 2017 um 15:52 geschrieben:
>> 
>> 
>> Contrary to other RPi devices, RPi3 uses uart0 to communicate with
>> the BCM43438 bluetooth controller. uart1 is then used for the console.
>> Today, the console configuration is inherited from the bcm283x dtsi
>> (bootargs) which is not the correct one for the RPi3. This leads to
>> routing issue and confuses the Bluetooth controller with unexpected
>> data.
>> 
>> This patch introduces chosen/stdout path to configure console to uart0
>> on bcm283x family and overwrite it to uart1 in the RPi3 dts.
>> 
>> Create serial0/1 aliases referring to uart0 and uart1 paths.
>> Remove unneeded earlyprintk.
>> 
>> Fixes: 4188ea2aeb6d ("ARM: bcm283x: Define UART pinmuxing on board level")
>> Signed-off-by: Loic Poulain <loic.poulain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> after changing serial0 to serial1 in my cmdline.txt, i can see the boot messages on my RPi Zero W.
>
> Tested-by: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>

I touched up whitespace/spelling and sent the PR.  Thanks for testing!

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

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

end of thread, other threads:[~2017-10-06 22:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-06 13:52 [PATCH v3] ARM: dts: bcm283x: Fix console path on RPi3 Loic Poulain
     [not found] ` <1507297972-10512-1-git-send-email-loic.poulain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-06 18:13   ` Stefan Wahren
     [not found]     ` <1740609206.57031.1507313620912-7tX72C7vayboQLBSYMtkGA@public.gmane.org>
2017-10-06 22:06       ` Eric Anholt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.