From 105fc00bc388d2dff089f3330fc7d9b009c519dc Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Fri, 3 Feb 2017 10:23:16 +0000 Subject: ARM: dts: STiH410-b2260: Identify the UART RTS line When hardware flow-control is disabled, manual toggling of the UART's reset line (RTS) using userland applications (e.g. stty) is not possible, since the ASC IP does not provide this functionality in the same was as some other IPs do. Thus, we have to do this manually. This patch configures the UART RTS line as a GPIO for manipulation within the UART driver when HW flow-control is not enabled. Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman --- arch/arm/boot/dts/stih410-b2260.dts | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts index 06b0696cb6b8..fa16abac0e4d 100644 --- a/arch/arm/boot/dts/stih410-b2260.dts +++ b/arch/arm/boot/dts/stih410-b2260.dts @@ -63,6 +63,7 @@ uart0: serial@9830000 { label = "LS-UART0"; status = "okay"; + rts-gpios = <&pio17 3 GPIO_ACTIVE_LOW>; }; /* Low speed expansion connector */ -- cgit v1.2.3 From 34224a0c1941715b6e0f7daf7b146aca5815aabb Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Fri, 3 Feb 2017 10:23:17 +0000 Subject: ARM: dts: STiH407-pinctrl: Add Pinctrl group for HW flow-control Each serial port which supports HW flow-control should have 2 Pinctrl groups. One for when HW flow-control is in progress, where the IP will take over controlling the lines and another group which enables the lines to be toggled using GPIO mechanisms. Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman --- arch/arm/boot/dts/stih407-pinctrl.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/stih407-pinctrl.dtsi b/arch/arm/boot/dts/stih407-pinctrl.dtsi index daab16b5ae64..bd1a82e8fffe 100644 --- a/arch/arm/boot/dts/stih407-pinctrl.dtsi +++ b/arch/arm/boot/dts/stih407-pinctrl.dtsi @@ -465,8 +465,16 @@ serial0 { pinctrl_serial0: serial0-0 { st,pins { - tx = <&pio17 0 ALT1 OUT>; - rx = <&pio17 1 ALT1 IN>; + tx = <&pio17 0 ALT1 OUT>; + rx = <&pio17 1 ALT1 IN>; + }; + }; + pinctrl_serial0_hw_flowctrl: serial0-0_hw_flowctrl { + st,pins { + tx = <&pio17 0 ALT1 OUT>; + rx = <&pio17 1 ALT1 IN>; + cts = <&pio17 2 ALT1 IN>; + rts = <&pio17 3 ALT1 OUT>; }; }; }; -- cgit v1.2.3 From cf38e1a60ea99a81ec479e8f995c63b1d19d1f6a Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Fri, 3 Feb 2017 10:23:18 +0000 Subject: ARM: dts: STiH407-family: Use new Pinctrl groups Having just defined some new Pinctrl groups for when HW flow-control is {en,dis}abled, let's reference them for use within the driver. Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman --- arch/arm/boot/dts/stih407-family.dtsi | 3 +-- arch/arm/boot/dts/stih410-b2260.dts | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/stih407-family.dtsi b/arch/arm/boot/dts/stih407-family.dtsi index c8b2944e304a..e480e329aaa4 100644 --- a/arch/arm/boot/dts/stih407-family.dtsi +++ b/arch/arm/boot/dts/stih407-family.dtsi @@ -222,9 +222,8 @@ compatible = "st,asc"; reg = <0x9830000 0x2c>; interrupts = ; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_serial0>; clocks = <&clk_s_c0_flexgen CLK_EXT2F_A9>; + /* Pinctrl moved out to a per-board configuration */ status = "disabled"; }; diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts index fa16abac0e4d..cbcbcb4c6e4f 100644 --- a/arch/arm/boot/dts/stih410-b2260.dts +++ b/arch/arm/boot/dts/stih410-b2260.dts @@ -62,8 +62,11 @@ /* Low speed expansion connector */ uart0: serial@9830000 { label = "LS-UART0"; - status = "okay"; + pinctrl-names = "default", "no-hw-flowctrl"; + pinctrl-0 = <&pinctrl_serial0_hw_flowctrl>; + pinctrl-1 = <&pinctrl_serial0>; rts-gpios = <&pio17 3 GPIO_ACTIVE_LOW>; + status = "okay"; }; /* Low speed expansion connector */ -- cgit v1.2.3 From 36523b6830fa468ae9e0335601aed475480b7dd3 Mon Sep 17 00:00:00 2001 From: Lee Jones Date: Fri, 3 Feb 2017 10:23:19 +0000 Subject: ARM: dts: STiH410-b2260: Enable HW flow-control Hardware flow-control capability must be specified at a platform level in order to inform the ASC driver that the platform is capable (i.e. are the lines wired up, etc). STiH4{07,10} devices are indeed capable, so let's provide the property. Acked-by: Peter Griffin Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman --- arch/arm/boot/dts/stih410-b2260.dts | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm') diff --git a/arch/arm/boot/dts/stih410-b2260.dts b/arch/arm/boot/dts/stih410-b2260.dts index cbcbcb4c6e4f..93c14d183e29 100644 --- a/arch/arm/boot/dts/stih410-b2260.dts +++ b/arch/arm/boot/dts/stih410-b2260.dts @@ -66,6 +66,7 @@ pinctrl-0 = <&pinctrl_serial0_hw_flowctrl>; pinctrl-1 = <&pinctrl_serial0>; rts-gpios = <&pio17 3 GPIO_ACTIVE_LOW>; + uart-has-rtscts; status = "okay"; }; -- cgit v1.2.3