Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: kirkwood: provide template for RS-232/485 configuration for OpenRD

Some OpenRD boards have RS-232 and RS-486 connectors wired, but using them
needs a custom DTB as the current DTB configures SD card slot instead.

This patch adds documentation into the DTS on how to change
the configuration.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

authored by

Aaro Koskinen and committed by
Gregory CLEMENT
39ac0979 60ff189c

+30 -1
+30 -1
arch/arm/boot/dts/kirkwood-openrd.dtsi
··· 40 40 pinctrl-0 = <&pmx_select28 &pmx_sdio_cd &pmx_select34>; 41 41 pinctrl-names = "default"; 42 42 43 - pmx_select28: pmx-select-rs232-rs484 { 43 + pmx_select28: pmx-select-rs232-rs485 { 44 44 marvell,pins = "mpp28"; 45 45 marvell,function = "gpio"; 46 46 }; ··· 65 65 status = "okay"; 66 66 cd-gpios = <&gpio0 29 9>; 67 67 }; 68 + gpio@10100 { 69 + p28 { 70 + gpio-hog; 71 + gpios = <28 GPIO_ACTIVE_HIGH>; 72 + /* 73 + * SelRS232or485 selects between RS-232 or RS-485 74 + * mode for the second UART. 75 + * 76 + * Low: RS-232 77 + * High: RS-485 78 + * 79 + * To use the second UART, you need to change also 80 + * the SelUARTorSD. 81 + */ 82 + output-low; 83 + line-name = "SelRS232or485"; 84 + }; 85 + }; 68 86 gpio@10140 { 69 87 p2 { 70 88 gpio-hog; 71 89 gpios = <2 GPIO_ACTIVE_HIGH>; 90 + /* 91 + * SelUARTorSD selects between the second UART 92 + * (serial@12100) and SD (mvsdio@90000). 93 + * 94 + * Low: UART 95 + * High: SD 96 + * 97 + * When changing this line make sure the newly 98 + * selected device node is enabled and the 99 + * previously selected device node is disabled. 100 + */ 72 101 output-high; /* Select SD by default */ 73 102 line-name = "SelUARTorSD"; 74 103 };