diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index b023a7e0741d67..367cbf437e1b0f 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -233,6 +233,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ rpi-dacpro.dtbo \ rpi-digiampplus.dtbo \ rpi-ft5406.dtbo \ + rpi-fw-uart.dtbo \ rpi-poe.dtbo \ rpi-poe-plus.dtbo \ rpi-sense.dtbo \ diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index 2da54f781e3b94..f3c0eb2fef05ff 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -4141,6 +4141,18 @@ Params: touchscreen-size-x Touchscreen X resolution (default 800) touchscreen-swapped-x-y Swap X and Y cordinates (default 0); +Name: rpi-fw-uart +Info: Configures the firmware software UART driver. + This driver requires exclusive usage of the second VPU core. The + following config.txt entries should be set when this driver is used. + dtparam=audio=off + isp_use_vpu0=1 +Load: dtoverlay=rpi-fw-uart,[=] +Params: txd0_pin GPIO pin for TXD0 (any free - default 20) + + rxd0_pin GPIO pin for RXD0 (any free - default 21) + + Name: rpi-poe Info: Raspberry Pi PoE HAT fan Load: dtoverlay=rpi-poe,[=] diff --git a/arch/arm/boot/dts/overlays/rpi-fw-uart-overlay.dts b/arch/arm/boot/dts/overlays/rpi-fw-uart-overlay.dts new file mode 100644 index 00000000000000..c17556e91105d8 --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-fw-uart-overlay.dts @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-2.0 +// Overlay for the Raspberry Pi Firmware UART driver +/dts-v1/; +/plugin/; + +/{ + compatible = "brcm,bcm2835"; + + fragment@0 { + target = <&gpio>; + __overlay__ { + rpi_fw_uart_pins: rpi_fw_uart_pins@4 { + brcm,pins = <20 21>; + brcm,function = <1 0>; /* output input */ + brcm,pull = <0 2>; /* none pull-up */ + }; + }; + }; + + fragment@1 { + target = <&soc>; + __overlay__ { + rpi_fw_uart: rpi_fw_uart@7e000000 { + compatible = "raspberrypi,firmware-uart"; + reg = <0x7e000000 0x100>; /* VideoCore MS sync regs */ + firmware = <&firmware>; + pinctrl-names = "default"; + pinctrl-0 = <&rpi_fw_uart_pins>; + tx-gpios = <&gpio 20 0>; + rx-gpios = <&gpio 21 0>; + }; + }; + }; + + __overrides__ { + txd0_pin = <&rpi_fw_uart>,"tx-gpios:4", + <&rpi_fw_uart_pins>, "brcm,pins:0"; + rxd0_pin = <&rpi_fw_uart>,"rx-gpios:4", + <&rpi_fw_uart_pins>, "brcm,pins:4"; + }; +};