Skip to contentSkip to conversation

Update of phyBOARD-Pollux-i.MX8MP

PATCH Superseded Cem Tenruh 3 participants 10 messages Sep 5, 2023

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Cem Tenruh

author
#0 lore raw

v2 cover Update of phyBOARD-Pollux-i.MX8MP

Updates for the phyCORE-i.MX8MP and phyBOARD-Pollux-i.MX8MP devicetrees. This adds CAN-FD, RS232/RS485 and USB support for phyBOARD-Pollux-i.MX8MP. This also adds gpio-line-name properties.

Changes in v2:
- Edited commit message (Patch 4/4)
- Added comment to UART2 node (Patch 4/4)

Cem Tenruh (1):
arm64: dts: imx8mp: Add gpio-line-names

Teresa Remmet (3):
arm64: dts: imx8mp-phyboard-pollux: Add flexcan support
arm64: dts: imx8mp-phyboard-pollux: Enable USB support
arm64: dts: imx8mp-phyboard-pollux: Add support for RS232/RS485

 .../freescale/imx8mp-phyboard-pollux-rdk.dts  | 155 ++++++++++++++++++
 .../dts/freescale/imx8mp-phycore-som.dtsi     |  13 ++
 2 files changed, 168 insertions(+)
Signature · 7 lines
2.25.1


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

PATCH v2 1/4 arm64: dts: imx8mp-phyboard-pollux: Add flexcan support

From: Teresa Remmet <[email protected]>

Add flexcan1 and flexcan2 support for CAN FD on phyBOARD-Pollux.

---
Changes in v2:
- No changes

---
 .../freescale/imx8mp-phyboard-pollux-rdk.dts  | 61 +++++++++++++++++++
 1 file changed, 61 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts +61 -0
index 1e14c4cd3128..1750fadb64c3 100644
@@ -19,6 +19,26 @@ chosen {
 		stdout-path = &uart1;
 	};
 
+	reg_can1_stby: regulator-can1-stby {
+		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_flexcan1_reg>;
+		gpio = <&gpio3 20 GPIO_ACTIVE_LOW>;
+		regulator-max-microvolt = <3300000>;
+		regulator-min-microvolt = <3300000>;
+		regulator-name = "can1-stby";
+	};
+
+	reg_can2_stby: regulator-can2-stby {
+		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_flexcan2_reg>;
+		gpio = <&gpio3 21 GPIO_ACTIVE_LOW>;
+		regulator-max-microvolt = <3300000>;
+		regulator-min-microvolt = <3300000>;
+		regulator-name = "can2-stby";
+	};
+
 	reg_usdhc2_vmmc: regulator-usdhc2 {
 		compatible = "regulator-fixed";
 		pinctrl-names = "default";
@@ -57,6 +77,21 @@ ethphy0: ethernet-phy@1 {
 	};
 };
 
+/* CAN FD */
+&flexcan1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_flexcan1>;
+	xceiver-supply = <&reg_can1_stby>;
+	status = "okay";
+};
+
+&flexcan2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_flexcan2>;
+	xceiver-supply = <&reg_can2_stby>;
+	status = "okay";
+};
+
 &i2c2 {
 	clock-frequency = <400000>;
 	pinctrl-names = "default", "gpio";
@@ -136,6 +171,32 @@ MX8MP_IOMUXC_SAI1_MCLK__GPIO4_IO20			0x10
 		>;
 	};
 
+	pinctrl_flexcan1: flexcan1grp {
+		fsl,pins = <
+			MX8MP_IOMUXC_SAI5_RXD2__CAN1_RX		0x154
+			MX8MP_IOMUXC_SAI5_RXD1__CAN1_TX		0x154
+		>;
+	};
+
+	pinctrl_flexcan2: flexcan2grp {
+		fsl,pins = <
+			MX8MP_IOMUXC_SAI5_MCLK__CAN2_RX		0x154
+			MX8MP_IOMUXC_SAI5_RXD3__CAN2_TX		0x154
+		>;
+	};
+
+	pinctrl_flexcan1_reg: flexcan1reggrp {
+		fsl,pins = <
+			MX8MP_IOMUXC_SAI5_RXC__GPIO3_IO20	0x154
+		>;
+	};
+
+	pinctrl_flexcan2_reg: flexcan2reggrp {
+		fsl,pins = <
+			MX8MP_IOMUXC_SAI5_RXD0__GPIO3_IO21	0x154
+		>;
+	};
+
 	pinctrl_i2c2: i2c2grp {
 		fsl,pins = <
 			MX8MP_IOMUXC_I2C2_SCL__I2C2_SCL		0x400001c2
Signature · 7 lines
2.25.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
reviewer Reviewed-by on v2 1/4
#2 lore raw

Re: [PATCH v2 1/4] arm64: dts: imx8mp-phyboard-pollux: Add flexcan support

Quoted 7 lines · Cem Tenruh

From: Teresa Remmet <[email protected]>

Add flexcan1 and flexcan2 support for CAN FD on phyBOARD-Pollux.

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

author
#3 lore raw

PATCH v2 2/4 arm64: dts: imx8mp-phyboard-pollux: Enable USB support

In reply to Cem Tenruh

From: Teresa Remmet <[email protected]>

Enable USB support for both interfaces in host mode. USB1 is directly conncted to a type-A connector and USB2 is attached to a 4-Port USB Hub.

---
Changes in v2:
- No changes

---
 .../freescale/imx8mp-phyboard-pollux-rdk.dts  | 48 +++++++++++++++++++
 1 file changed, 48 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts +48 -0
index 1750fadb64c3..061db98a36d3 100644
@@ -39,6 +39,17 @@ reg_can2_stby: regulator-can2-stby {
 		regulator-name = "can2-stby";
 	};
 
+	reg_usb1_vbus: regulator-usb1-vbus {
+		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_usb1_vbus>;
+		gpio = <&gpio1 12 GPIO_ACTIVE_LOW>;
+		regulator-always-on;
+		regulator-max-microvolt = <5000000>;
+		regulator-min-microvolt = <5000000>;
+		regulator-name = "usb1_host_vbus";
+	};
+
 	reg_usdhc2_vmmc: regulator-usdhc2 {
 		compatible = "regulator-fixed";
 		pinctrl-names = "default";
@@ -136,6 +147,37 @@ &uart1 {
 	status = "okay";
 };
 
+/* USB1 Host mode Type-A */
+&usb3_phy0 {
+	vbus-supply = <&reg_usb1_vbus>;
+	status = "okay";
+};
+
+&usb3_0 {
+	status = "okay";
+};
+
+&usb_dwc3_0 {
+	dr_mode = "host";
+	status = "okay";
+};
+
+/* USB2 4-port USB3.0 HUB */
+&usb3_phy1 {
+	status = "okay";
+};
+
+&usb3_1 {
+	fsl,permanently-attached;
+	fsl,disable-port-power-control;
+	status = "okay";
+};
+
+&usb_dwc3_1 {
+	dr_mode = "host";
+	status = "okay";
+};
+
 /* SD-Card */
 &usdhc2 {
 	assigned-clocks = <&clk IMX8MP_CLK_USDHC2>;
@@ -224,6 +266,12 @@ MX8MP_IOMUXC_UART1_TXD__UART1_DCE_TX	0x40
 		>;
 	};
 
+	pinctrl_usb1_vbus: usb1vbusgrp {
+		fsl,pins = <
+			MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12     0x10
+		>;
+	};
+
 	pinctrl_usdhc2_pins: usdhc2-gpiogrp {
 		fsl,pins = <
 			MX8MP_IOMUXC_SD2_CD_B__GPIO2_IO12	0x1c4
Signature · 7 lines
2.25.1


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

Re: [PATCH v2 2/4] arm64: dts: imx8mp-phyboard-pollux: Enable USB support

Hi Cem,

arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts reg_can2_stby: regulator-can2-stby { · line 47

Quoted 6 lines · Cem Tenruh
arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts +6 -0
+       reg_usb1_vbus: regulator-usb1-vbus {
+               compatible = "regulator-fixed";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_usb1_vbus>;
+               gpio = <&gpio1 12 GPIO_ACTIVE_LOW>;
+               regulator-always-on;

As a GPIO controls this regulator, I would remove the 'regulator-always-on' property.

With that fixed:

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

author
#5 lore raw

PATCH v2 3/4 arm64: dts: imx8mp: Add gpio-line-names

In reply to Cem Tenruh

Add gpio-line-names for imx8mp-phycore and imx8mp-phyboard-pollux.

---
Changes in v2:
- No changes

---
 .../freescale/imx8mp-phyboard-pollux-rdk.dts  | 27 +++++++++++++++++++
 .../dts/freescale/imx8mp-phycore-som.dtsi     | 13 +++++++++
 2 files changed, 40 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts +27 -0
index 061db98a36d3..f2620dea19ed 100644
@@ -192,6 +192,33 @@ &usdhc2 {
 	status = "okay";
 };
 
+&gpio1 {
+	gpio-line-names = "", "", "X_PMIC_WDOG_B", "",
+		"PMIC_SD_VSEL", "", "", "", "", "",
+		"", "", "USB1_OTG_PWR", "", "", "X_nETHPHY_INT";
+};
+
+&gpio2 {
+	gpio-line-names = "", "", "", "",
+		"", "", "", "", "", "",
+		"", "", "X_SD2_CD_B", "", "", "",
+		"", "", "", "SD2_RESET_B";
+};
+
+&gpio3 {
+	gpio-line-names = "", "", "", "",
+		"", "", "", "", "", "",
+		"", "", "", "", "", "",
+		"", "", "", "", "nCAN1_EN", "nCAN2_EN";
+};
+
+&gpio4 {
+	gpio-line-names = "", "", "", "",
+		"", "", "", "", "", "",
+		"", "", "", "", "", "",
+		"", "", "X_PMIC_IRQ_B", "", "nENET0_INT_PWDN";
+};
+
 &iomuxc {
 	pinctrl_eqos: eqosgrp {
 		fsl,pins = <
arch/arm64/boot/dts/freescale/imx8mp-phycore-som.dtsi +13 -0
index d8df97060e8f..c976c3b6cbc6 100644
@@ -199,6 +199,19 @@ &wdog1 {
 	status = "okay";
 };
 
+&gpio1 {
+	gpio-line-names = "", "", "X_PMIC_WDOG_B", "",
+		"", "", "", "", "", "",
+		"", "", "", "", "", "X_nETHPHY_INT";
+};
+
+&gpio4 {
+	gpio-line-names = "", "", "", "",
+		"", "", "", "", "", "",
+		"", "", "", "", "", "",
+		"", "", "X_PMIC_IRQ_B";
+};
+
 &iomuxc {
 	pinctrl_fec: fecgrp {
 		fsl,pins = <
Signature · 7 lines
2.25.1


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

Re: [PATCH v2 3/4] arm64: dts: imx8mp: Add gpio-line-names

In reply to Cem Tenruh
Quoted 78 lines · Cem Tenruh

Add gpio-line-names for imx8mp-phycore and imx8mp-phyboard-pollux.

---
Changes in v2:
- No changes

---
 .../freescale/imx8mp-phyboard-pollux-rdk.dts  | 27 +++++++++++++++++++
 .../dts/freescale/imx8mp-phycore-som.dtsi     | 13 +++++++++
 2 files changed, 40 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts +27 -0
index 061db98a36d3..f2620dea19ed 100644
@@ -192,6 +192,33 @@ &usdhc2 {
        status = "okay";
 };
 
+&gpio1 {
+       gpio-line-names = "", "", "X_PMIC_WDOG_B", "",
+               "PMIC_SD_VSEL", "", "", "", "", "",
+               "", "", "USB1_OTG_PWR", "", "", "X_nETHPHY_INT";
+};
+
+&gpio2 {
+       gpio-line-names = "", "", "", "",
+               "", "", "", "", "", "",
+               "", "", "X_SD2_CD_B", "", "", "",
+               "", "", "", "SD2_RESET_B";
+};
+
+&gpio3 {
+       gpio-line-names = "", "", "", "",
+               "", "", "", "", "", "",
+               "", "", "", "", "", "",
+               "", "", "", "", "nCAN1_EN", "nCAN2_EN";
+};
+
+&gpio4 {
+       gpio-line-names = "", "", "", "",
+               "", "", "", "", "", "",
+               "", "", "", "", "", "",
+               "", "", "X_PMIC_IRQ_B", "", "nENET0_INT_PWDN";
+};
+
 &iomuxc {
        pinctrl_eqos: eqosgrp {
                fsl,pins = <
arch/arm64/boot/dts/freescale/imx8mp-phycore-som.dtsi +13 -1
index d8df97060e8f..c976c3b6cbc6 100644
@@ -199,6 +199,19 @@ &wdog1 {
        status = "okay";
 };
 
+&gpio1 {
+       gpio-line-names = "", "", "X_PMIC_WDOG_B", "",
+               "", "", "", "", "", "",
+               "", "", "", "", "", "X_nETHPHY_INT";
+};
+
+&gpio4 {
+       gpio-line-names = "", "", "", "",
+               "", "", "", "", "", "",
+               "", "", "", "", "", "",
+               "", "", "X_PMIC_IRQ_B";
+};
+
 &iomuxc {
        pinctrl_fec: fecgrp {
                fsl,pins = <
--

2.25.1

Quoted 4 lines

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

Please change commit short desc to something like 'arm64: dts:
imx8mp-phyboard-pollux: Add gpio-line-names' to call out what board you are changing. Perhaps you need to split this into two patches to be clear.

Best regards,

Tim

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

author
#8 lore raw

PATCH v2 4/4 arm64: dts: imx8mp-phyboard-pollux: Add support for RS232/RS485

In reply to Cem Tenruh

From: Teresa Remmet <[email protected]>

Add UART2 for RS232/RS485 support.

(Updated the node by not setting the reserved bits(BIT 0 and BIT 3) and enabled internal pullup for RX and TX.)

---
Changes in v2:
- Edited commit message
- Added comment to UART2 node

---
 .../freescale/imx8mp-phyboard-pollux-rdk.dts  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
arch/arm64/boot/dts/freescale/imx8mp-phyboard-pollux-rdk.dts +19 -0
index f2620dea19ed..0b867f348816 100644
@@ -178,6 +178,16 @@ &usb_dwc3_1 {
 	status = "okay";
 };
 
+/* RS232/RS485 */
+&uart2 {
+	assigned-clocks = <&clk IMX8MP_CLK_UART2>;
+	assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_80M>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_uart2>;
+	uart-has-rtscts;
+	status = "okay";
+};
+
 /* SD-Card */
 &usdhc2 {
 	assigned-clocks = <&clk IMX8MP_CLK_USDHC2>;
@@ -299,6 +309,15 @@ MX8MP_IOMUXC_GPIO1_IO12__GPIO1_IO12     0x10
 		>;
 	};
 
+	pinctrl_uart2: uart2grp {
+		fsl,pins = <
+			MX8MP_IOMUXC_UART2_RXD__UART2_DCE_RX	0x140
+			MX8MP_IOMUXC_UART2_TXD__UART2_DCE_TX	0x140
+			MX8MP_IOMUXC_SAI3_RXC__UART2_DCE_CTS	0x140
+			MX8MP_IOMUXC_SAI3_RXD__UART2_DCE_RTS	0x140
+		>;
+	};
+
 	pinctrl_usdhc2_pins: usdhc2-gpiogrp {
 		fsl,pins = <
 			MX8MP_IOMUXC_SD2_CD_B__GPIO2_IO12	0x1c4
Signature · 7 lines
2.25.1


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

Re: [PATCH v2 4/4] arm64: dts: imx8mp-phyboard-pollux: Add support for RS232/RS485

Quoted 9 lines · Cem Tenruh

From: Teresa Remmet <[email protected]>

Add UART2 for RS232/RS485 support.

(Updated the node by not setting the reserved bits(BIT 0 and BIT 3) and enabled internal pullup for RX and TX.)

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