Skip to contentSkip to conversation

ARM: dts: hummingboard2: fixes and improvements

PATCH In review Baruch Siach 2 participants 6 messages Jan 30, 2019 – Jan 31, 2019

Subsystems (2)
lore
Share & tools
lore
#3 lore raw

PATCH 3/4 ARM: dts: hummingboard2: describe optional rs485

In reply to Baruch Siach

A Hummingboard assembly option provides RS-485 transceiver on UART2 (/dev/ttymxc1). Add DT node for that. Keep it disabled, since RS-485 is not assembled by default.

---
 arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi +16 -0
index fe95fe27e6ef..c5b5c6d3306f 100644
@@ -501,6 +501,14 @@
 			>;
 		};
 
+		pinctrl_hummingboard2_uart2: hummingboard2-uart2 {
+			fsl,pins = <
+				MX6QDL_PAD_SD4_DAT4__UART2_RX_DATA	0x1b0b1
+				MX6QDL_PAD_SD4_DAT7__UART2_TX_DATA	0x1b0b1
+				MX6QDL_PAD_SD4_DAT6__UART2_CTS_B	0x1b0b1
+			>;
+		};
+
 		pinctrl_hummingboard2_uart3: hummingboard2-uart3 {
 			fsl,pins = <
 				MX6QDL_PAD_EIM_D25__UART3_TX_DATA	0x1b0b1
@@ -573,6 +581,14 @@
 	status = "okay";
 };
 
+/* Optional RS-485 transceiver */
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hummingboard2_uart2>;
+	uart-has-rtscts;
+	status = "disabled";
+};
+
 &uart3 {
 	pinctrl-names = "default";
 	/* Use &pinctrl_hummingboard2_rev14_uart3 for HB2 rev 1.4 */
Signature · 7 lines
2.20.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH 1/4 ARM: dts: hummingboard2: fix uart3 Rx pin conf

In reply to Baruch Siach

SION is not needed for that pin. Set regular configuration.

---
 arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi +1 -1
index c413f9c3540f..913f34ac00dc 100644
@@ -504,7 +504,7 @@
 		pinctrl_hummingboard2_uart3: hummingboard2-uart3 {
 			fsl,pins = <
 				MX6QDL_PAD_EIM_D25__UART3_TX_DATA	0x1b0b1
-				MX6QDL_PAD_EIM_D24__UART3_RX_DATA	0x40013000
+				MX6QDL_PAD_EIM_D24__UART3_RX_DATA	0x1b0b1
 			>;
 		};
 	};
Signature · 7 lines
2.20.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

PATCH 2/4 ARM: dts: hummingboard2: add uart3 pinmux for board rev 1.4

In reply to Baruch Siach

Hummingboard2 rev 1.4 fixed Rx/Tx swap in the mikroBUS header. Add the correct pinmux configuration DT node for that board. Leave the current configuration unchanged.

---
 arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi +9 -0
index 913f34ac00dc..fe95fe27e6ef 100644
@@ -507,6 +507,14 @@
 				MX6QDL_PAD_EIM_D24__UART3_RX_DATA	0x1b0b1
 			>;
 		};
+
+		/* In Hummingboard2 rev 1.4 Rx/Tx are not swapped */
+		pinctrl_hummingboard2_rev14_uart3: hummingboard2-rev14-uart3 {
+			fsl,pins = <
+				MX6QDL_PAD_EIM_D24__UART3_TX_DATA	0x1b0b1
+				MX6QDL_PAD_EIM_D25__UART3_RX_DATA	0x1b0b1
+			>;
+		};
 	};
 };
 
@@ -567,6 +575,7 @@
 
 &uart3 {
 	pinctrl-names = "default";
+	/* Use &pinctrl_hummingboard2_rev14_uart3 for HB2 rev 1.4 */
 	pinctrl-0 = <&pinctrl_hummingboard2_uart3>;
 	status = "okay";
 };
Signature · 7 lines
2.20.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#0 lore raw

cover ARM: dts: hummingboard2: fixes and improvements

The first two patches fix UART on the optional mikroBUS header.

The last two patches add optional CAN and RS485 peripherals. I sent these patches before, but they were not applied at the time:

https://patchwork.kernel.org/patch/10528011/
https://patchwork.kernel.org/patch/10528013/

Both patches are rebased here on top of the UART fixes.

Baruch Siach (4):
ARM: dts: hummingboard2: fix uart3 Rx pin conf
ARM: dts: hummingboard2: add uart3 pinmux for board rev 1.4
ARM: dts: hummingboard2: describe optional rs485
ARM: dts: hummingboard2: describe optional can bus

 arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 42 +++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)
Signature · 7 lines
2.20.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#4 lore raw

PATCH 4/4 ARM: dts: hummingboard2: describe optional can bus

A Hummingboard assembly option provides CAN bus connector for the i.MX6 provided FlexCAN peripheral. Keep disabled by default.

Note the conflict with HDMI pin mux.

---
 arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi +15 -0
index c5b5c6d3306f..2008be6fbee4 100644
@@ -206,6 +206,7 @@
 	status = "okay";
 };
 
+/* Conflicts with the CAN bus option */
 &hdmi {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_hummingboard2_hdmi>;
@@ -523,6 +524,13 @@
 				MX6QDL_PAD_EIM_D25__UART3_RX_DATA	0x1b0b1
 			>;
 		};
+
+		pinctrl_hummingboard2_flexcan1: hummingboard2-flexcan1 {
+			fsl,pins = <
+				MX6QDL_PAD_KEY_ROW2__FLEXCAN1_RX	0x1b0b1
+				MX6QDL_PAD_KEY_COL2__FLEXCAN1_TX	0x1b0b1
+			>;
+		};
 	};
 };
 
@@ -596,6 +604,13 @@
 	status = "okay";
 };
 
+/* Optional CAN bus. Conflicts with HDMI CEC. */
+&can1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_hummingboard2_flexcan1>;
+	status = "disabled";
+};
+
 &vcc_3v3 {
 	vin-supply = <&v_3v2>;
 };
Signature · 7 lines
2.20.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#5 lore raw
In reply to Baruch Siach
Quoted 11 lines · Baruch Siach

The first two patches fix UART on the optional mikroBUS header.

The last two patches add optional CAN and RS485 peripherals. I sent these patches before, but they were not applied at the time:

https://patchwork.kernel.org/patch/10528011/
https://patchwork.kernel.org/patch/10528013/

Both patches are rebased here on top of the UART fixes.

Quoted 9 lines

Baruch Siach (4):
ARM: dts: hummingboard2: fix uart3 Rx pin conf
ARM: dts: hummingboard2: add uart3 pinmux for board rev 1.4
ARM: dts: hummingboard2: describe optional rs485
ARM: dts: hummingboard2: describe optional can bus

 arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 42 +++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

Thanks Baruch,

I would like to note here that I am unhappy with that the only solution for configuration options is to add comments mentioning conflicting device-tree entries. While it does at least provide a reference for users wanting this functionality it is a terrible solution. The only way to manage this properly would be to support device-tree overlay fragments in the kernel-tree. I would much rather have an overlays subdirectory infrastructure or some other mechanism where these options could be properly written and applied to a "base" dtb.

-Jon

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel