From: "Daniel Brát" <danek.brat@gmail.com> To: barebox@lists.infradead.org Cc: "Daniel Brát" <danek.brat@gmail.com> Subject: [PATCH] ARM: DTS: make rpi3/4 use pl011 uart as primary Date: Sat, 11 Jun 2022 20:28:28 +0200 [thread overview] Message-ID: <20220611182828.16271-1-danek.brat@gmail.com> (raw) When the videocore first-stage bootloader finds 'dtoverlay=disable-bt' in the 'config.txt', asides from applying said overlay, it also disables fixed clock for the vpu, which miniuart requires to calculate correct baudrate, rendering it non-functional. This can be fixed by adding 'core_freq=250' to the config, but since barebox has drivers for the pl011 full-fledged UART, lets just make barebox use it instead. Signed-off-by: Daniel Brát <danek.brat@gmail.com> --- arch/arm/dts/bcm2711-rpi-4.dts | 8 +------- arch/arm/dts/bcm2837-rpi-3.dts | 2 ++ arch/arm/dts/rpi-use-pl011-uart.dtsi | 24 ++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 arch/arm/dts/rpi-use-pl011-uart.dtsi diff --git a/arch/arm/dts/bcm2711-rpi-4.dts b/arch/arm/dts/bcm2711-rpi-4.dts index 3c0caa73f..e082ad868 100644 --- a/arch/arm/dts/bcm2711-rpi-4.dts +++ b/arch/arm/dts/bcm2711-rpi-4.dts @@ -9,10 +9,4 @@ status = "disabled"; }; -&uart1 { - /* VPU core clock is reported at 200MHz, but needs to be 500Mhz - * for ns16550 driver to set correct baudrate. Until that's - * figured out, hardcode clock frequency to the expected value - */ - clock-frequency = <500000000>; -}; +#include "rpi-use-pl011-uart.dtsi" diff --git a/arch/arm/dts/bcm2837-rpi-3.dts b/arch/arm/dts/bcm2837-rpi-3.dts index e82d518fa..6af9e9d7c 100644 --- a/arch/arm/dts/bcm2837-rpi-3.dts +++ b/arch/arm/dts/bcm2837-rpi-3.dts @@ -7,3 +7,5 @@ &sdhci { status = "disabled"; }; + +#include "rpi-use-pl011-uart.dtsi" diff --git a/arch/arm/dts/rpi-use-pl011-uart.dtsi b/arch/arm/dts/rpi-use-pl011-uart.dtsi new file mode 100644 index 000000000..7c75b07f8 --- /dev/null +++ b/arch/arm/dts/rpi-use-pl011-uart.dtsi @@ -0,0 +1,24 @@ +/* https://www.raspberrypi.com/documentation/computers/configuration.html#primary-and-secondary-uart */ + +/* Makes barebox use pl011 uart as primary */ + +&uart1 { + status = "disabled"; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_gpio14>; + status = "okay"; +}; + +/delete-node/ &bt; + +&{/aliases} { + serial0 = &uart0; + serial1 = &uart1; +}; + +&{/chosen} { + stdout-path = "/serial0:115200n8"; +}; -- 2.17.1 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2022-06-11 18:31 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-11 18:28 Daniel Brát [this message] 2022-06-15 8:24 ` Ahmad Fatoum
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220611182828.16271-1-danek.brat@gmail.com \ --to=danek.brat@gmail.com \ --cc=barebox@lists.infradead.org \ --subject='Re: [PATCH] ARM: DTS: make rpi3/4 use pl011 uart as primary' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox