-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dtoverlay: Add an overlay for the Raspberry Pi firmware UART
Add a device-tree overlay to configure the GPIOs for the Raspberry Pi firmware UART. Example config.txt dtoverlay=rpi-fw-uart,txd0_pin=20,rxd0_pin=21 Signed-off-by: Phil Elwell <[email protected]> Signed-off-by: Tim Gover <[email protected]>
- Loading branch information
Showing
3 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
}; | ||
}; |