linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ARM: dts: hummingboard2: fixes and improvements
@ 2019-01-30 16:18 Baruch Siach
  2019-01-30 16:18 ` [PATCH 1/4] ARM: dts: hummingboard2: fix uart3 Rx pin conf Baruch Siach
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Baruch Siach @ 2019-01-30 16:18 UTC (permalink / raw)
  To: Russell King, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team
  Cc: Baruch Siach, Jon Nettleton, linux-arm-kernel

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(-)

-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] ARM: dts: hummingboard2: fix uart3 Rx pin conf
  2019-01-30 16:18 [PATCH 0/4] ARM: dts: hummingboard2: fixes and improvements Baruch Siach
@ 2019-01-30 16:18 ` Baruch Siach
  2019-01-30 16:18 ` [PATCH 2/4] ARM: dts: hummingboard2: add uart3 pinmux for board rev 1.4 Baruch Siach
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Baruch Siach @ 2019-01-30 16:18 UTC (permalink / raw)
  To: Russell King, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team
  Cc: Baruch Siach, Jon Nettleton, linux-arm-kernel

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

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
index c413f9c3540f..913f34ac00dc 100644
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
@@ -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
 			>;
 		};
 	};
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] ARM: dts: hummingboard2: add uart3 pinmux for board rev 1.4
  2019-01-30 16:18 [PATCH 0/4] ARM: dts: hummingboard2: fixes and improvements Baruch Siach
  2019-01-30 16:18 ` [PATCH 1/4] ARM: dts: hummingboard2: fix uart3 Rx pin conf Baruch Siach
@ 2019-01-30 16:18 ` Baruch Siach
  2019-01-30 16:18 ` [PATCH 3/4] ARM: dts: hummingboard2: describe optional rs485 Baruch Siach
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Baruch Siach @ 2019-01-30 16:18 UTC (permalink / raw)
  To: Russell King, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team
  Cc: Baruch Siach, Jon Nettleton, linux-arm-kernel

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.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
index 913f34ac00dc..fe95fe27e6ef 100644
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
@@ -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";
 };
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/4] ARM: dts: hummingboard2: describe optional rs485
  2019-01-30 16:18 [PATCH 0/4] ARM: dts: hummingboard2: fixes and improvements Baruch Siach
  2019-01-30 16:18 ` [PATCH 1/4] ARM: dts: hummingboard2: fix uart3 Rx pin conf Baruch Siach
  2019-01-30 16:18 ` [PATCH 2/4] ARM: dts: hummingboard2: add uart3 pinmux for board rev 1.4 Baruch Siach
@ 2019-01-30 16:18 ` Baruch Siach
  2019-01-30 16:18 ` [PATCH 4/4] ARM: dts: hummingboard2: describe optional can bus Baruch Siach
  2019-01-31  6:42 ` [PATCH 0/4] ARM: dts: hummingboard2: fixes and improvements Jon Nettleton
  4 siblings, 0 replies; 6+ messages in thread
From: Baruch Siach @ 2019-01-30 16:18 UTC (permalink / raw)
  To: Russell King, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team
  Cc: Baruch Siach, Jon Nettleton, linux-arm-kernel

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.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
index fe95fe27e6ef..c5b5c6d3306f 100644
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
@@ -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 */
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] ARM: dts: hummingboard2: describe optional can bus
  2019-01-30 16:18 [PATCH 0/4] ARM: dts: hummingboard2: fixes and improvements Baruch Siach
                   ` (2 preceding siblings ...)
  2019-01-30 16:18 ` [PATCH 3/4] ARM: dts: hummingboard2: describe optional rs485 Baruch Siach
@ 2019-01-30 16:18 ` Baruch Siach
  2019-01-31  6:42 ` [PATCH 0/4] ARM: dts: hummingboard2: fixes and improvements Jon Nettleton
  4 siblings, 0 replies; 6+ messages in thread
From: Baruch Siach @ 2019-01-30 16:18 UTC (permalink / raw)
  To: Russell King, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team
  Cc: Baruch Siach, Jon Nettleton, linux-arm-kernel

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.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
index c5b5c6d3306f..2008be6fbee4 100644
--- a/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-hummingboard2.dtsi
@@ -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>;
 };
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/4] ARM: dts: hummingboard2: fixes and improvements
  2019-01-30 16:18 [PATCH 0/4] ARM: dts: hummingboard2: fixes and improvements Baruch Siach
                   ` (3 preceding siblings ...)
  2019-01-30 16:18 ` [PATCH 4/4] ARM: dts: hummingboard2: describe optional can bus Baruch Siach
@ 2019-01-31  6:42 ` Jon Nettleton
  4 siblings, 0 replies; 6+ messages in thread
From: Jon Nettleton @ 2019-01-31  6:42 UTC (permalink / raw)
  To: Baruch Siach
  Cc: Sascha Hauer, Russell King, NXP Linux Team,
	Pengutronix Kernel Team, Fabio Estevam, Shawn Guo,
	linux-arm-kernel

On Wed, Jan 30, 2019 at 5:18 PM Baruch Siach <baruch@tkos.co.il> wrote:
>
> 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(-)
>

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
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-31  6:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-30 16:18 [PATCH 0/4] ARM: dts: hummingboard2: fixes and improvements Baruch Siach
2019-01-30 16:18 ` [PATCH 1/4] ARM: dts: hummingboard2: fix uart3 Rx pin conf Baruch Siach
2019-01-30 16:18 ` [PATCH 2/4] ARM: dts: hummingboard2: add uart3 pinmux for board rev 1.4 Baruch Siach
2019-01-30 16:18 ` [PATCH 3/4] ARM: dts: hummingboard2: describe optional rs485 Baruch Siach
2019-01-30 16:18 ` [PATCH 4/4] ARM: dts: hummingboard2: describe optional can bus Baruch Siach
2019-01-31  6:42 ` [PATCH 0/4] ARM: dts: hummingboard2: fixes and improvements Jon Nettleton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).