]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
riscv: dts: thead: Add TH1520 pinctrl settings for UART0
authorEmil Renner Berthing <emil.renner.berthing@canonical.com>
Mon, 14 Oct 2024 17:54:22 +0000 (10:54 -0700)
committerDrew Fustini <dfustini@tenstorrent.com>
Tue, 15 Oct 2024 17:01:18 +0000 (10:01 -0700)
Add pinctrl settings for UART0 used as the default debug console on
both the Lichee Pi 4A and BeagleV Ahead boards.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Signed-off-by: Drew Fustini <dfustini@tenstorrent.com>
arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts
arch/riscv/boot/dts/thead/th1520-lichee-pi-4a.dts

index 1a4154a6ff3bf74c1cab7a047b335828ac2a32ec..0484fb390be4ed7078ef9eed6066b47b4311fc9a 100644 (file)
        status = "okay";
 };
 
+&padctrl0_apsys {
+       uart0_pins: uart0-0 {
+               tx-pins {
+                       pins = "UART0_TXD";
+                       function = "uart";
+                       bias-disable;
+                       drive-strength = <3>;
+                       input-disable;
+                       input-schmitt-disable;
+                       slew-rate = <0>;
+               };
+
+               rx-pins {
+                       pins = "UART0_RXD";
+                       function = "uart";
+                       bias-pull-up;
+                       drive-strength = <1>;
+                       input-enable;
+                       input-schmitt-enable;
+                       slew-rate = <0>;
+               };
+       };
+};
+
 &sdio0 {
        bus-width = <4>;
        max-frequency = <198000000>;
@@ -68,6 +92,8 @@
 };
 
 &uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins>;
        status = "okay";
 };
 
index 58ad381fc1c3660de79de0cef6e8d93b31aaa711..f60b1879192dab63f70858482ccd5007312c6836 100644 (file)
        };
 };
 
+&padctrl0_apsys {
+       uart0_pins: uart0-0 {
+               tx-pins {
+                       pins = "UART0_TXD";
+                       function = "uart";
+                       bias-disable;
+                       drive-strength = <3>;
+                       input-disable;
+                       input-schmitt-disable;
+                       slew-rate = <0>;
+               };
+
+               rx-pins {
+                       pins = "UART0_RXD";
+                       function = "uart";
+                       bias-disable;
+                       drive-strength = <1>;
+                       input-enable;
+                       input-schmitt-enable;
+                       slew-rate = <0>;
+               };
+       };
+};
+
 &uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_pins>;
        status = "okay";
 };