All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] arm64: dts: imx8ulp: add usb nodes
@ 2023-12-14 11:24 ` Xu Yang
  0 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 11:24 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam
  Cc: linux-imx, devicetree, linux-arm-kernel

Add USB nodes on i.MX8ULP platform which has 2 USB controllers.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 64 ++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
index c4a0082f30d3..ead1f57e08ef 100644
--- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
@@ -28,6 +28,8 @@ aliases {
 		serial1 = &lpuart5;
 		serial2 = &lpuart6;
 		serial3 = &lpuart7;
+		usbphy0 = &usbphy1;
+		usbphy1 = &usbphy2;
 	};
 
 	cpus {
@@ -472,6 +474,68 @@ usdhc2: mmc@298f0000 {
 				status = "disabled";
 			};
 
+			usbotg1: usb@29900000 {
+				compatible = "fsl,imx8ulp-usb", "fsl,imx7ulp-usb", "fsl,imx6ul-usb";
+				reg = <0x29900000 0x200>;
+				interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&pcc4 IMX8ULP_CLK_USB0>;
+				power-domains = <&scmi_devpd IMX8ULP_PD_USB0>;
+				phys = <&usbphy1>;
+				fsl,usbmisc = <&usbmisc1 0>;
+				ahb-burst-config = <0x0>;
+				tx-burst-size-dword = <0x8>;
+				rx-burst-size-dword = <0x8>;
+				status = "disabled";
+			};
+
+			usbmisc1: usbmisc@29900200 {
+				compatible = "fsl,imx8ulp-usbmisc", "fsl,imx7d-usbmisc",
+						"fsl,imx6q-usbmisc";
+				#index-cells = <1>;
+				reg = <0x29900200 0x200>;
+				status = "disabled";
+			};
+
+			usbphy1: usb-phy@29910000 {
+				compatible = "fsl,imx8ulp-usbphy", "fsl,imx7ulp-usbphy";
+				reg = <0x29910000 0x10000>;
+				interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&pcc4 IMX8ULP_CLK_USB0_PHY>;
+				#phy-cells = <0>;
+				status = "disabled";
+			};
+
+			usbotg2: usb@29920000 {
+				compatible = "fsl,imx8ulp-usb", "fsl,imx7ulp-usb", "fsl,imx6ul-usb";
+				reg = <0x29920000 0x200>;
+				interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&pcc4 IMX8ULP_CLK_USB1>;
+				power-domains = <&scmi_devpd IMX8ULP_PD_USDHC2_USB1>;
+				phys = <&usbphy2>;
+				fsl,usbmisc = <&usbmisc2 0>;
+				ahb-burst-config = <0x0>;
+				tx-burst-size-dword = <0x8>;
+				rx-burst-size-dword = <0x8>;
+				status = "disabled";
+			};
+
+			usbmisc2: usbmisc@29920200 {
+				compatible = "fsl,imx8ulp-usbmisc", "fsl,imx7d-usbmisc",
+						"fsl,imx6q-usbmisc";
+				#index-cells = <1>;
+				reg = <0x29920200 0x200>;
+				status = "disabled";
+			};
+
+			usbphy2: usb-phy@29930000 {
+				compatible = "fsl,imx8ulp-usbphy", "fsl,imx7ulp-usbphy";
+				reg = <0x29930000 0x10000>;
+				interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&pcc4 IMX8ULP_CLK_USB1_PHY>;
+				#phy-cells = <0>;
+				status = "disabled";
+			};
+
 			fec: ethernet@29950000 {
 				compatible = "fsl,imx8ulp-fec", "fsl,imx6ul-fec", "fsl,imx6q-fec";
 				reg = <0x29950000 0x10000>;
-- 
2.34.1


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

* [PATCH 1/4] arm64: dts: imx8ulp: add usb nodes
@ 2023-12-14 11:24 ` Xu Yang
  0 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 11:24 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam
  Cc: linux-imx, devicetree, linux-arm-kernel

Add USB nodes on i.MX8ULP platform which has 2 USB controllers.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 64 ++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
index c4a0082f30d3..ead1f57e08ef 100644
--- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
@@ -28,6 +28,8 @@ aliases {
 		serial1 = &lpuart5;
 		serial2 = &lpuart6;
 		serial3 = &lpuart7;
+		usbphy0 = &usbphy1;
+		usbphy1 = &usbphy2;
 	};
 
 	cpus {
@@ -472,6 +474,68 @@ usdhc2: mmc@298f0000 {
 				status = "disabled";
 			};
 
+			usbotg1: usb@29900000 {
+				compatible = "fsl,imx8ulp-usb", "fsl,imx7ulp-usb", "fsl,imx6ul-usb";
+				reg = <0x29900000 0x200>;
+				interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&pcc4 IMX8ULP_CLK_USB0>;
+				power-domains = <&scmi_devpd IMX8ULP_PD_USB0>;
+				phys = <&usbphy1>;
+				fsl,usbmisc = <&usbmisc1 0>;
+				ahb-burst-config = <0x0>;
+				tx-burst-size-dword = <0x8>;
+				rx-burst-size-dword = <0x8>;
+				status = "disabled";
+			};
+
+			usbmisc1: usbmisc@29900200 {
+				compatible = "fsl,imx8ulp-usbmisc", "fsl,imx7d-usbmisc",
+						"fsl,imx6q-usbmisc";
+				#index-cells = <1>;
+				reg = <0x29900200 0x200>;
+				status = "disabled";
+			};
+
+			usbphy1: usb-phy@29910000 {
+				compatible = "fsl,imx8ulp-usbphy", "fsl,imx7ulp-usbphy";
+				reg = <0x29910000 0x10000>;
+				interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&pcc4 IMX8ULP_CLK_USB0_PHY>;
+				#phy-cells = <0>;
+				status = "disabled";
+			};
+
+			usbotg2: usb@29920000 {
+				compatible = "fsl,imx8ulp-usb", "fsl,imx7ulp-usb", "fsl,imx6ul-usb";
+				reg = <0x29920000 0x200>;
+				interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&pcc4 IMX8ULP_CLK_USB1>;
+				power-domains = <&scmi_devpd IMX8ULP_PD_USDHC2_USB1>;
+				phys = <&usbphy2>;
+				fsl,usbmisc = <&usbmisc2 0>;
+				ahb-burst-config = <0x0>;
+				tx-burst-size-dword = <0x8>;
+				rx-burst-size-dword = <0x8>;
+				status = "disabled";
+			};
+
+			usbmisc2: usbmisc@29920200 {
+				compatible = "fsl,imx8ulp-usbmisc", "fsl,imx7d-usbmisc",
+						"fsl,imx6q-usbmisc";
+				#index-cells = <1>;
+				reg = <0x29920200 0x200>;
+				status = "disabled";
+			};
+
+			usbphy2: usb-phy@29930000 {
+				compatible = "fsl,imx8ulp-usbphy", "fsl,imx7ulp-usbphy";
+				reg = <0x29930000 0x10000>;
+				interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&pcc4 IMX8ULP_CLK_USB1_PHY>;
+				#phy-cells = <0>;
+				status = "disabled";
+			};
+
 			fec: ethernet@29950000 {
 				compatible = "fsl,imx8ulp-fec", "fsl,imx6ul-fec", "fsl,imx6q-fec";
 				reg = <0x29950000 0x10000>;
-- 
2.34.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] 38+ messages in thread

* [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
  2023-12-14 11:24 ` Xu Yang
@ 2023-12-14 11:24   ` Xu Yang
  -1 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 11:24 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam
  Cc: linux-imx, devicetree, linux-arm-kernel

Enable 2 USB nodes on i.MX8ULP evk board.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
index 69dd8e31027c..08fadfe47785 100644
--- a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
@@ -135,6 +135,46 @@ pcal6408: gpio@21 {
 	};
 };
 
+&usbotg1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_otgid1>;
+	dr_mode = "otg";
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	over-current-active-low;
+	status = "okay";
+};
+
+&usbphy1 {
+	status = "okay";
+	fsl,tx-d-cal = <110>;
+};
+
+&usbmisc1 {
+	status = "okay";
+};
+
+&usbotg2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_otgid2>;
+	dr_mode = "otg";
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	over-current-active-low;
+	status = "okay";
+};
+
+&usbphy2 {
+	status = "okay";
+	fsl,tx-d-cal = <110>;
+};
+
+&usbmisc2 {
+	status = "okay";
+};
+
 &usdhc0 {
 	pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
 	pinctrl-0 = <&pinctrl_usdhc0>;
@@ -224,6 +264,20 @@ MX8ULP_PAD_PTE13__LPI2C7_SDA	0x20
 		>;
 	};
 
+	pinctrl_otgid1: usb1grp {
+		fsl,pins = <
+			MX8ULP_PAD_PTF2__USB0_ID	0x10003
+			MX8ULP_PAD_PTF4__USB0_OC	0x10003
+		>;
+	};
+
+	pinctrl_otgid2: usb2grp {
+		fsl,pins = <
+			MX8ULP_PAD_PTD23__USB1_ID	0x10003
+			MX8ULP_PAD_PTF6__USB1_OC	0x10003
+		>;
+	};
+
 	pinctrl_usdhc0: usdhc0grp {
 		fsl,pins = <
 			MX8ULP_PAD_PTD1__SDHC0_CMD	0x3
-- 
2.34.1


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

* [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
@ 2023-12-14 11:24   ` Xu Yang
  0 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 11:24 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam
  Cc: linux-imx, devicetree, linux-arm-kernel

Enable 2 USB nodes on i.MX8ULP evk board.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 54 +++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
index 69dd8e31027c..08fadfe47785 100644
--- a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
@@ -135,6 +135,46 @@ pcal6408: gpio@21 {
 	};
 };
 
+&usbotg1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_otgid1>;
+	dr_mode = "otg";
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	over-current-active-low;
+	status = "okay";
+};
+
+&usbphy1 {
+	status = "okay";
+	fsl,tx-d-cal = <110>;
+};
+
+&usbmisc1 {
+	status = "okay";
+};
+
+&usbotg2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_otgid2>;
+	dr_mode = "otg";
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	over-current-active-low;
+	status = "okay";
+};
+
+&usbphy2 {
+	status = "okay";
+	fsl,tx-d-cal = <110>;
+};
+
+&usbmisc2 {
+	status = "okay";
+};
+
 &usdhc0 {
 	pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
 	pinctrl-0 = <&pinctrl_usdhc0>;
@@ -224,6 +264,20 @@ MX8ULP_PAD_PTE13__LPI2C7_SDA	0x20
 		>;
 	};
 
+	pinctrl_otgid1: usb1grp {
+		fsl,pins = <
+			MX8ULP_PAD_PTF2__USB0_ID	0x10003
+			MX8ULP_PAD_PTF4__USB0_OC	0x10003
+		>;
+	};
+
+	pinctrl_otgid2: usb2grp {
+		fsl,pins = <
+			MX8ULP_PAD_PTD23__USB1_ID	0x10003
+			MX8ULP_PAD_PTF6__USB1_OC	0x10003
+		>;
+	};
+
 	pinctrl_usdhc0: usdhc0grp {
 		fsl,pins = <
 			MX8ULP_PAD_PTD1__SDHC0_CMD	0x3
-- 
2.34.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] 38+ messages in thread

* [PATCH 3/4] arm64: dts: imx93: add usb nodes
  2023-12-14 11:24 ` Xu Yang
@ 2023-12-14 11:24   ` Xu Yang
  -1 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 11:24 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam
  Cc: linux-imx, devicetree, linux-arm-kernel

There are 2 USB controllers on i.MX93. Add them.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx93.dtsi | 58 ++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi
index 34c0540276d1..bcf4861cfede 100644
--- a/arch/arm64/boot/dts/freescale/imx93.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
@@ -171,6 +171,20 @@ cm33: remoteproc-cm33 {
 		status = "disabled";
 	};
 
+	usbphynop1: usbphynop1 {
+		#phy-cells = <0>;
+		compatible = "usb-nop-xceiv";
+		clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
+		clock-names = "main_clk";
+	};
+
+	usbphynop2: usbphynop2 {
+		#phy-cells = <0>;
+		compatible = "usb-nop-xceiv";
+		clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
+		clock-names = "main_clk";
+	};
+
 	soc@0 {
 		compatible = "simple-bus";
 		#address-cells = <1>;
@@ -1059,5 +1073,49 @@ ddr-pmu@4e300dc0 {
 			reg = <0x4e300dc0 0x200>;
 			interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
 		};
+
+		usbotg1: usb@4c100000 {
+			compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb", "fsl,imx27-usb";
+			reg = <0x4c100000 0x200>;
+			interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
+				 <&clk IMX93_CLK_HSIO_32K_GATE>;
+			clock-names = "usb_ctrl_root_clk", "usb_wakeup_clk";
+			assigned-clocks = <&clk IMX93_CLK_HSIO>;
+			assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;
+			assigned-clock-rates = <133000000>;
+			fsl,usbphy = <&usbphynop1>;
+			fsl,usbmisc = <&usbmisc1 0>;
+			status = "disabled";
+		};
+
+		usbmisc1: usbmisc@4c100200 {
+			compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-usbmisc",
+					"fsl,imx6q-usbmisc";
+			#index-cells = <1>;
+			reg = <0x4c100200 0x200>;
+		};
+
+		usbotg2: usb@4c200000 {
+			compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb", "fsl,imx27-usb";
+			reg = <0x4c200000 0x200>;
+			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
+				 <&clk IMX93_CLK_HSIO_32K_GATE>;
+			clock-names = "usb_ctrl_root_clk", "usb_wakeup_clk";
+			assigned-clocks = <&clk IMX93_CLK_HSIO>;
+			assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;
+			assigned-clock-rates = <133000000>;
+			fsl,usbphy = <&usbphynop2>;
+			fsl,usbmisc = <&usbmisc2 0>;
+			status = "disabled";
+		};
+
+		usbmisc2: usbmisc@4c200200 {
+			compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-usbmisc",
+					"fsl,imx6q-usbmisc";
+			#index-cells = <1>;
+			reg = <0x4c200200 0x200>;
+		};
 	};
 };
-- 
2.34.1


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

* [PATCH 3/4] arm64: dts: imx93: add usb nodes
@ 2023-12-14 11:24   ` Xu Yang
  0 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 11:24 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam
  Cc: linux-imx, devicetree, linux-arm-kernel

There are 2 USB controllers on i.MX93. Add them.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx93.dtsi | 58 ++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi b/arch/arm64/boot/dts/freescale/imx93.dtsi
index 34c0540276d1..bcf4861cfede 100644
--- a/arch/arm64/boot/dts/freescale/imx93.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
@@ -171,6 +171,20 @@ cm33: remoteproc-cm33 {
 		status = "disabled";
 	};
 
+	usbphynop1: usbphynop1 {
+		#phy-cells = <0>;
+		compatible = "usb-nop-xceiv";
+		clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
+		clock-names = "main_clk";
+	};
+
+	usbphynop2: usbphynop2 {
+		#phy-cells = <0>;
+		compatible = "usb-nop-xceiv";
+		clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
+		clock-names = "main_clk";
+	};
+
 	soc@0 {
 		compatible = "simple-bus";
 		#address-cells = <1>;
@@ -1059,5 +1073,49 @@ ddr-pmu@4e300dc0 {
 			reg = <0x4e300dc0 0x200>;
 			interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
 		};
+
+		usbotg1: usb@4c100000 {
+			compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb", "fsl,imx27-usb";
+			reg = <0x4c100000 0x200>;
+			interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
+				 <&clk IMX93_CLK_HSIO_32K_GATE>;
+			clock-names = "usb_ctrl_root_clk", "usb_wakeup_clk";
+			assigned-clocks = <&clk IMX93_CLK_HSIO>;
+			assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;
+			assigned-clock-rates = <133000000>;
+			fsl,usbphy = <&usbphynop1>;
+			fsl,usbmisc = <&usbmisc1 0>;
+			status = "disabled";
+		};
+
+		usbmisc1: usbmisc@4c100200 {
+			compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-usbmisc",
+					"fsl,imx6q-usbmisc";
+			#index-cells = <1>;
+			reg = <0x4c100200 0x200>;
+		};
+
+		usbotg2: usb@4c200000 {
+			compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb", "fsl,imx27-usb";
+			reg = <0x4c200000 0x200>;
+			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
+				 <&clk IMX93_CLK_HSIO_32K_GATE>;
+			clock-names = "usb_ctrl_root_clk", "usb_wakeup_clk";
+			assigned-clocks = <&clk IMX93_CLK_HSIO>;
+			assigned-clock-parents = <&clk IMX93_CLK_SYS_PLL_PFD1_DIV2>;
+			assigned-clock-rates = <133000000>;
+			fsl,usbphy = <&usbphynop2>;
+			fsl,usbmisc = <&usbmisc2 0>;
+			status = "disabled";
+		};
+
+		usbmisc2: usbmisc@4c200200 {
+			compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-usbmisc",
+					"fsl,imx6q-usbmisc";
+			#index-cells = <1>;
+			reg = <0x4c200200 0x200>;
+		};
 	};
 };
-- 
2.34.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] 38+ messages in thread

* [PATCH 4/4] arm64: dts: imx93-11x11-evk: enable usb and typec nodes
  2023-12-14 11:24 ` Xu Yang
@ 2023-12-14 11:24   ` Xu Yang
  -1 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 11:24 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam
  Cc: linux-imx, devicetree, linux-arm-kernel

There are 2 Type-C ports and 2 USB controllers on i.MX93. Enable them.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
 .../boot/dts/freescale/imx93-11x11-evk.dts    | 108 ++++++++++++++++++
 1 file changed, 108 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
index 2b9d47716f75..42b1ea7d5220 100644
--- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
@@ -5,6 +5,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/usb/pd.h>
 #include "imx93.dtsi"
 
 / {
@@ -103,6 +104,70 @@ &mu2 {
 	status = "okay";
 };
 
+&lpi2c3 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	clock-frequency = <400000>;
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&pinctrl_lpi2c3>;
+	pinctrl-1 = <&pinctrl_lpi2c3>;
+	status = "okay";
+
+	ptn5110: tcpc@50 {
+		compatible = "nxp,ptn5110";
+		reg = <0x50>;
+		interrupt-parent = <&gpio3>;
+		interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
+		status = "okay";
+
+		port {
+			typec1_dr_sw: endpoint {
+				remote-endpoint = <&usb1_drd_sw>;
+			};
+		};
+
+		typec1_con: connector {
+			compatible = "usb-c-connector";
+			label = "USB-C";
+			power-role = "dual";
+			data-role = "dual";
+			try-power-role = "sink";
+			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
+			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
+				     PDO_VAR(5000, 20000, 3000)>;
+			op-sink-microwatt = <15000000>;
+			self-powered;
+		};
+	};
+
+	ptn5110_2: tcpc@51 {
+		compatible = "nxp,ptn5110";
+		reg = <0x51>;
+		interrupt-parent = <&gpio3>;
+		interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
+		status = "okay";
+
+		port {
+			typec2_dr_sw: endpoint {
+				remote-endpoint = <&usb2_drd_sw>;
+			};
+		};
+
+		typec2_con: connector {
+			compatible = "usb-c-connector";
+			label = "USB-C";
+			power-role = "dual";
+			data-role = "dual";
+			try-power-role = "sink";
+			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
+			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
+				     PDO_VAR(5000, 20000, 3000)>;
+			op-sink-microwatt = <15000000>;
+			self-powered;
+		};
+	};
+};
+
 &eqos {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_eqos>;
@@ -155,6 +220,42 @@ &lpuart5 {
 	status = "okay";
 };
 
+&usbotg1 {
+	dr_mode = "otg";
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	usb-role-switch;
+	disable-over-current;
+	samsung,picophy-pre-emp-curr-control = <3>;
+	samsung,picophy-dc-vol-level-adjust = <7>;
+	status = "okay";
+
+	port {
+		usb1_drd_sw: endpoint {
+			remote-endpoint = <&typec1_dr_sw>;
+		};
+	};
+};
+
+&usbotg2 {
+	dr_mode = "otg";
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	usb-role-switch;
+	disable-over-current;
+	samsung,picophy-pre-emp-curr-control = <3>;
+	samsung,picophy-dc-vol-level-adjust = <7>;
+	status = "okay";
+
+	port {
+		usb2_drd_sw: endpoint {
+			remote-endpoint = <&typec2_dr_sw>;
+		};
+	};
+};
+
 &usdhc1 {
 	pinctrl-names = "default", "state_100mhz", "state_200mhz";
 	pinctrl-0 = <&pinctrl_usdhc1>;
@@ -221,6 +322,13 @@ MX93_PAD_ENET2_TX_CTL__ENET1_RGMII_TX_CTL	0x57e
 		>;
 	};
 
+	pinctrl_lpi2c3: lpi2c3grp {
+		fsl,pins = <
+			MX93_PAD_GPIO_IO28__LPI2C3_SDA			0x40000b9e
+			MX93_PAD_GPIO_IO29__LPI2C3_SCL			0x40000b9e
+		>;
+	};
+
 	pinctrl_uart1: uart1grp {
 		fsl,pins = <
 			MX93_PAD_UART1_RXD__LPUART1_RX			0x31e
-- 
2.34.1


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

* [PATCH 4/4] arm64: dts: imx93-11x11-evk: enable usb and typec nodes
@ 2023-12-14 11:24   ` Xu Yang
  0 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 11:24 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam
  Cc: linux-imx, devicetree, linux-arm-kernel

There are 2 Type-C ports and 2 USB controllers on i.MX93. Enable them.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
 .../boot/dts/freescale/imx93-11x11-evk.dts    | 108 ++++++++++++++++++
 1 file changed, 108 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
index 2b9d47716f75..42b1ea7d5220 100644
--- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
@@ -5,6 +5,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/usb/pd.h>
 #include "imx93.dtsi"
 
 / {
@@ -103,6 +104,70 @@ &mu2 {
 	status = "okay";
 };
 
+&lpi2c3 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	clock-frequency = <400000>;
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&pinctrl_lpi2c3>;
+	pinctrl-1 = <&pinctrl_lpi2c3>;
+	status = "okay";
+
+	ptn5110: tcpc@50 {
+		compatible = "nxp,ptn5110";
+		reg = <0x50>;
+		interrupt-parent = <&gpio3>;
+		interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
+		status = "okay";
+
+		port {
+			typec1_dr_sw: endpoint {
+				remote-endpoint = <&usb1_drd_sw>;
+			};
+		};
+
+		typec1_con: connector {
+			compatible = "usb-c-connector";
+			label = "USB-C";
+			power-role = "dual";
+			data-role = "dual";
+			try-power-role = "sink";
+			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
+			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
+				     PDO_VAR(5000, 20000, 3000)>;
+			op-sink-microwatt = <15000000>;
+			self-powered;
+		};
+	};
+
+	ptn5110_2: tcpc@51 {
+		compatible = "nxp,ptn5110";
+		reg = <0x51>;
+		interrupt-parent = <&gpio3>;
+		interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
+		status = "okay";
+
+		port {
+			typec2_dr_sw: endpoint {
+				remote-endpoint = <&usb2_drd_sw>;
+			};
+		};
+
+		typec2_con: connector {
+			compatible = "usb-c-connector";
+			label = "USB-C";
+			power-role = "dual";
+			data-role = "dual";
+			try-power-role = "sink";
+			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
+			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
+				     PDO_VAR(5000, 20000, 3000)>;
+			op-sink-microwatt = <15000000>;
+			self-powered;
+		};
+	};
+};
+
 &eqos {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_eqos>;
@@ -155,6 +220,42 @@ &lpuart5 {
 	status = "okay";
 };
 
+&usbotg1 {
+	dr_mode = "otg";
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	usb-role-switch;
+	disable-over-current;
+	samsung,picophy-pre-emp-curr-control = <3>;
+	samsung,picophy-dc-vol-level-adjust = <7>;
+	status = "okay";
+
+	port {
+		usb1_drd_sw: endpoint {
+			remote-endpoint = <&typec1_dr_sw>;
+		};
+	};
+};
+
+&usbotg2 {
+	dr_mode = "otg";
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	usb-role-switch;
+	disable-over-current;
+	samsung,picophy-pre-emp-curr-control = <3>;
+	samsung,picophy-dc-vol-level-adjust = <7>;
+	status = "okay";
+
+	port {
+		usb2_drd_sw: endpoint {
+			remote-endpoint = <&typec2_dr_sw>;
+		};
+	};
+};
+
 &usdhc1 {
 	pinctrl-names = "default", "state_100mhz", "state_200mhz";
 	pinctrl-0 = <&pinctrl_usdhc1>;
@@ -221,6 +322,13 @@ MX93_PAD_ENET2_TX_CTL__ENET1_RGMII_TX_CTL	0x57e
 		>;
 	};
 
+	pinctrl_lpi2c3: lpi2c3grp {
+		fsl,pins = <
+			MX93_PAD_GPIO_IO28__LPI2C3_SDA			0x40000b9e
+			MX93_PAD_GPIO_IO29__LPI2C3_SCL			0x40000b9e
+		>;
+	};
+
 	pinctrl_uart1: uart1grp {
 		fsl,pins = <
 			MX93_PAD_UART1_RXD__LPUART1_RX			0x31e
-- 
2.34.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] 38+ messages in thread

* Re: [PATCH 4/4] arm64: dts: imx93-11x11-evk: enable usb and typec nodes
  2023-12-14 11:24   ` Xu Yang
@ 2023-12-14 11:25     ` Fabio Estevam
  -1 siblings, 0 replies; 38+ messages in thread
From: Fabio Estevam @ 2023-12-14 11:25 UTC (permalink / raw)
  To: Xu Yang
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, linux-imx, devicetree, linux-arm-kernel

On Thu, Dec 14, 2023 at 8:19 AM Xu Yang <xu.yang_2@nxp.com> wrote:
>
> There are 2 Type-C ports and 2 USB controllers on i.MX93. Enable them.
>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> ---
>  .../boot/dts/freescale/imx93-11x11-evk.dts    | 108 ++++++++++++++++++
>  1 file changed, 108 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> index 2b9d47716f75..42b1ea7d5220 100644
> --- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> @@ -5,6 +5,7 @@
>
>  /dts-v1/;
>
> +#include <dt-bindings/usb/pd.h>
>  #include "imx93.dtsi"
>
>  / {
> @@ -103,6 +104,70 @@ &mu2 {
>         status = "okay";
>  };
>
> +&lpi2c3 {
> +       #address-cells = <1>;
> +       #size-cells = <0>;
> +       clock-frequency = <400000>;
> +       pinctrl-names = "default", "sleep";
> +       pinctrl-0 = <&pinctrl_lpi2c3>;
> +       pinctrl-1 = <&pinctrl_lpi2c3>;
> +       status = "okay";
> +
> +       ptn5110: tcpc@50 {
> +               compatible = "nxp,ptn5110";
> +               reg = <0x50>;
> +               interrupt-parent = <&gpio3>;
> +               interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
> +               status = "okay";
> +
> +               port {
> +                       typec1_dr_sw: endpoint {
> +                               remote-endpoint = <&usb1_drd_sw>;
> +                       };
> +               };
> +
> +               typec1_con: connector {
> +                       compatible = "usb-c-connector";
> +                       label = "USB-C";
> +                       power-role = "dual";
> +                       data-role = "dual";
> +                       try-power-role = "sink";
> +                       source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
> +                       sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
> +                                    PDO_VAR(5000, 20000, 3000)>;
> +                       op-sink-microwatt = <15000000>;
> +                       self-powered;

Your patch introduce dt-schema warnings.

Port should be placed under connector as per nxp,ptn5110.yaml.

Please check:
https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git/commit/?h=for-next&id=de0bae0b75f288381746bb9f6d6fd1b30f397975

_______________________________________________
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] 38+ messages in thread

* Re: [PATCH 4/4] arm64: dts: imx93-11x11-evk: enable usb and typec nodes
@ 2023-12-14 11:25     ` Fabio Estevam
  0 siblings, 0 replies; 38+ messages in thread
From: Fabio Estevam @ 2023-12-14 11:25 UTC (permalink / raw)
  To: Xu Yang
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, linux-imx, devicetree, linux-arm-kernel

On Thu, Dec 14, 2023 at 8:19 AM Xu Yang <xu.yang_2@nxp.com> wrote:
>
> There are 2 Type-C ports and 2 USB controllers on i.MX93. Enable them.
>
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> ---
>  .../boot/dts/freescale/imx93-11x11-evk.dts    | 108 ++++++++++++++++++
>  1 file changed, 108 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> index 2b9d47716f75..42b1ea7d5220 100644
> --- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> @@ -5,6 +5,7 @@
>
>  /dts-v1/;
>
> +#include <dt-bindings/usb/pd.h>
>  #include "imx93.dtsi"
>
>  / {
> @@ -103,6 +104,70 @@ &mu2 {
>         status = "okay";
>  };
>
> +&lpi2c3 {
> +       #address-cells = <1>;
> +       #size-cells = <0>;
> +       clock-frequency = <400000>;
> +       pinctrl-names = "default", "sleep";
> +       pinctrl-0 = <&pinctrl_lpi2c3>;
> +       pinctrl-1 = <&pinctrl_lpi2c3>;
> +       status = "okay";
> +
> +       ptn5110: tcpc@50 {
> +               compatible = "nxp,ptn5110";
> +               reg = <0x50>;
> +               interrupt-parent = <&gpio3>;
> +               interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
> +               status = "okay";
> +
> +               port {
> +                       typec1_dr_sw: endpoint {
> +                               remote-endpoint = <&usb1_drd_sw>;
> +                       };
> +               };
> +
> +               typec1_con: connector {
> +                       compatible = "usb-c-connector";
> +                       label = "USB-C";
> +                       power-role = "dual";
> +                       data-role = "dual";
> +                       try-power-role = "sink";
> +                       source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
> +                       sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
> +                                    PDO_VAR(5000, 20000, 3000)>;
> +                       op-sink-microwatt = <15000000>;
> +                       self-powered;

Your patch introduce dt-schema warnings.

Port should be placed under connector as per nxp,ptn5110.yaml.

Please check:
https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git/commit/?h=for-next&id=de0bae0b75f288381746bb9f6d6fd1b30f397975

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

* Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
  2023-12-14 11:24   ` Xu Yang
@ 2023-12-14 11:30     ` Fabio Estevam
  -1 siblings, 0 replies; 38+ messages in thread
From: Fabio Estevam @ 2023-12-14 11:30 UTC (permalink / raw)
  To: Xu Yang
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, linux-imx, devicetree, linux-arm-kernel

On Thu, Dec 14, 2023 at 8:19 AM Xu Yang <xu.yang_2@nxp.com> wrote:

> +&usbphy1 {
> +       status = "okay";
> +       fsl,tx-d-cal = <110>;

Place status as the last property.

> +&usbphy2 {
> +       status = "okay";
> +       fsl,tx-d-cal = <110>;

Place status as the last property.

> +};
> +
> +&usbmisc2 {
> +       status = "okay";
> +};
> +
>  &usdhc0 {
>         pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
>         pinctrl-0 = <&pinctrl_usdhc0>;
> @@ -224,6 +264,20 @@ MX8ULP_PAD_PTE13__LPI2C7_SDA       0x20
>                 >;
>         };
>
> +       pinctrl_otgid1: usb1grp {

pinctrl_ubs1: usb1grp

> +               fsl,pins = <
> +                       MX8ULP_PAD_PTF2__USB0_ID        0x10003
> +                       MX8ULP_PAD_PTF4__USB0_OC        0x10003
> +               >;
> +       };
> +
> +       pinctrl_otgid2: usb2grp {

pinctrl_usb2: usb2grp

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

* Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
@ 2023-12-14 11:30     ` Fabio Estevam
  0 siblings, 0 replies; 38+ messages in thread
From: Fabio Estevam @ 2023-12-14 11:30 UTC (permalink / raw)
  To: Xu Yang
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, linux-imx, devicetree, linux-arm-kernel

On Thu, Dec 14, 2023 at 8:19 AM Xu Yang <xu.yang_2@nxp.com> wrote:

> +&usbphy1 {
> +       status = "okay";
> +       fsl,tx-d-cal = <110>;

Place status as the last property.

> +&usbphy2 {
> +       status = "okay";
> +       fsl,tx-d-cal = <110>;

Place status as the last property.

> +};
> +
> +&usbmisc2 {
> +       status = "okay";
> +};
> +
>  &usdhc0 {
>         pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
>         pinctrl-0 = <&pinctrl_usdhc0>;
> @@ -224,6 +264,20 @@ MX8ULP_PAD_PTE13__LPI2C7_SDA       0x20
>                 >;
>         };
>
> +       pinctrl_otgid1: usb1grp {

pinctrl_ubs1: usb1grp

> +               fsl,pins = <
> +                       MX8ULP_PAD_PTF2__USB0_ID        0x10003
> +                       MX8ULP_PAD_PTF4__USB0_OC        0x10003
> +               >;
> +       };
> +
> +       pinctrl_otgid2: usb2grp {

pinctrl_usb2: usb2grp

_______________________________________________
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] 38+ messages in thread

* Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
  2023-12-14 11:24   ` Xu Yang
@ 2023-12-14 11:58     ` Fabio Estevam
  -1 siblings, 0 replies; 38+ messages in thread
From: Fabio Estevam @ 2023-12-14 11:58 UTC (permalink / raw)
  To: Xu Yang
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, linux-imx, devicetree, linux-arm-kernel

On Thu, Dec 14, 2023 at 8:19 AM Xu Yang <xu.yang_2@nxp.com> wrote:
>
> Enable 2 USB nodes on i.MX8ULP evk board.

imx8ulp-evk schematics show two PTN5150 and two USB Type-C connectors.

Why are they not represented in the devicetree?

_______________________________________________
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] 38+ messages in thread

* Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
@ 2023-12-14 11:58     ` Fabio Estevam
  0 siblings, 0 replies; 38+ messages in thread
From: Fabio Estevam @ 2023-12-14 11:58 UTC (permalink / raw)
  To: Xu Yang
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, linux-imx, devicetree, linux-arm-kernel

On Thu, Dec 14, 2023 at 8:19 AM Xu Yang <xu.yang_2@nxp.com> wrote:
>
> Enable 2 USB nodes on i.MX8ULP evk board.

imx8ulp-evk schematics show two PTN5150 and two USB Type-C connectors.

Why are they not represented in the devicetree?

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

* RE: [EXT] Re: [PATCH 4/4] arm64: dts: imx93-11x11-evk: enable usb and typec nodes
  2023-12-14 11:25     ` Fabio Estevam
@ 2023-12-14 12:34       ` Xu Yang
  -1 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 12:34 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, dl-linux-imx, devicetree, linux-arm-kernel

Hi Fabio,

>
> On Thu, Dec 14, 2023 at 8:19 AM Xu Yang <xu.yang_2@nxp.com> wrote:
> >
> > There are 2 Type-C ports and 2 USB controllers on i.MX93. Enable them.
> >
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > ---
> >  .../boot/dts/freescale/imx93-11x11-evk.dts    | 108 ++++++++++++++++++
> >  1 file changed, 108 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> > index 2b9d47716f75..42b1ea7d5220 100644
> > --- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> > +++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> > @@ -5,6 +5,7 @@
> >
> >  /dts-v1/;
> >
> > +#include <dt-bindings/usb/pd.h>
> >  #include "imx93.dtsi"
> >
> >  / {
> > @@ -103,6 +104,70 @@ &mu2 {
> >         status = "okay";
> >  };
> >
> > +&lpi2c3 {
> > +       #address-cells = <1>;
> > +       #size-cells = <0>;
> > +       clock-frequency = <400000>;
> > +       pinctrl-names = "default", "sleep";
> > +       pinctrl-0 = <&pinctrl_lpi2c3>;
> > +       pinctrl-1 = <&pinctrl_lpi2c3>;
> > +       status = "okay";
> > +
> > +       ptn5110: tcpc@50 {
> > +               compatible = "nxp,ptn5110";
> > +               reg = <0x50>;
> > +               interrupt-parent = <&gpio3>;
> > +               interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
> > +               status = "okay";
> > +
> > +               port {
> > +                       typec1_dr_sw: endpoint {
> > +                               remote-endpoint = <&usb1_drd_sw>;
> > +                       };
> > +               };
> > +
> > +               typec1_con: connector {
> > +                       compatible = "usb-c-connector";
> > +                       label = "USB-C";
> > +                       power-role = "dual";
> > +                       data-role = "dual";
> > +                       try-power-role = "sink";
> > +                       source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
> > +                       sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
> > +                                    PDO_VAR(5000, 20000, 3000)>;
> > +                       op-sink-microwatt = <15000000>;
> > +                       self-powered;
>
> Your patch introduce dt-schema warnings.
>
> Port should be placed under connector as per nxp,ptn5110.yaml.

Will fix this in v2.

>
> Please check:
> https://git.kernel.org/pub/scm/linux/kernel/git%25
> 2Fshawnguo%2Flinux.git%2Fcommit%2F%3Fh%3Dfor-
> next%26id%3Dde0bae0b75f288381746bb9f6d6fd1b30f397975&data=05%7C02%7Cxu.yang_2%40nxp.com%7Ce1e0fd394e3c40
> 11339a08dbfc975a81%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638381499208779172%7CUnknown%7CTWFpb
> GZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FoJfshUH
> ngC23vxDSTUfmRVnW%2FKIFMwUw8YZOkR461Y%3D&reserved=0

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

* RE: [EXT] Re: [PATCH 4/4] arm64: dts: imx93-11x11-evk: enable usb and typec nodes
@ 2023-12-14 12:34       ` Xu Yang
  0 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 12:34 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, dl-linux-imx, devicetree, linux-arm-kernel

Hi Fabio,

>
> On Thu, Dec 14, 2023 at 8:19 AM Xu Yang <xu.yang_2@nxp.com> wrote:
> >
> > There are 2 Type-C ports and 2 USB controllers on i.MX93. Enable them.
> >
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > ---
> >  .../boot/dts/freescale/imx93-11x11-evk.dts    | 108 ++++++++++++++++++
> >  1 file changed, 108 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> > index 2b9d47716f75..42b1ea7d5220 100644
> > --- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> > +++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> > @@ -5,6 +5,7 @@
> >
> >  /dts-v1/;
> >
> > +#include <dt-bindings/usb/pd.h>
> >  #include "imx93.dtsi"
> >
> >  / {
> > @@ -103,6 +104,70 @@ &mu2 {
> >         status = "okay";
> >  };
> >
> > +&lpi2c3 {
> > +       #address-cells = <1>;
> > +       #size-cells = <0>;
> > +       clock-frequency = <400000>;
> > +       pinctrl-names = "default", "sleep";
> > +       pinctrl-0 = <&pinctrl_lpi2c3>;
> > +       pinctrl-1 = <&pinctrl_lpi2c3>;
> > +       status = "okay";
> > +
> > +       ptn5110: tcpc@50 {
> > +               compatible = "nxp,ptn5110";
> > +               reg = <0x50>;
> > +               interrupt-parent = <&gpio3>;
> > +               interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
> > +               status = "okay";
> > +
> > +               port {
> > +                       typec1_dr_sw: endpoint {
> > +                               remote-endpoint = <&usb1_drd_sw>;
> > +                       };
> > +               };
> > +
> > +               typec1_con: connector {
> > +                       compatible = "usb-c-connector";
> > +                       label = "USB-C";
> > +                       power-role = "dual";
> > +                       data-role = "dual";
> > +                       try-power-role = "sink";
> > +                       source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
> > +                       sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
> > +                                    PDO_VAR(5000, 20000, 3000)>;
> > +                       op-sink-microwatt = <15000000>;
> > +                       self-powered;
>
> Your patch introduce dt-schema warnings.
>
> Port should be placed under connector as per nxp,ptn5110.yaml.

Will fix this in v2.

>
> Please check:
> https://git.kernel.org/pub/scm/linux/kernel/git%25
> 2Fshawnguo%2Flinux.git%2Fcommit%2F%3Fh%3Dfor-
> next%26id%3Dde0bae0b75f288381746bb9f6d6fd1b30f397975&data=05%7C02%7Cxu.yang_2%40nxp.com%7Ce1e0fd394e3c40
> 11339a08dbfc975a81%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638381499208779172%7CUnknown%7CTWFpb
> GZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FoJfshUH
> ngC23vxDSTUfmRVnW%2FKIFMwUw8YZOkR461Y%3D&reserved=0
_______________________________________________
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] 38+ messages in thread

* RE: [EXT] Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
  2023-12-14 11:30     ` Fabio Estevam
@ 2023-12-14 12:44       ` Xu Yang
  -1 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 12:44 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, dl-linux-imx, devicetree, linux-arm-kernel

Hi Fabio,

> 
> On Thu, Dec 14, 2023 at 8:19 AM Xu Yang <xu.yang_2@nxp.com> wrote:
> 
> > +&usbphy1 {
> > +       status = "okay";
> > +       fsl,tx-d-cal = <110>;
> 
> Place status as the last property.

Okay.

> 
> > +&usbphy2 {
> > +       status = "okay";
> > +       fsl,tx-d-cal = <110>;
> 
> Place status as the last property.

Okay.

> 
> > +};
> > +
> > +&usbmisc2 {
> > +       status = "okay";
> > +};
> > +
> >  &usdhc0 {
> >         pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
> >         pinctrl-0 = <&pinctrl_usdhc0>;
> > @@ -224,6 +264,20 @@ MX8ULP_PAD_PTE13__LPI2C7_SDA       0x20
> >                 >;
> >         };
> >
> > +       pinctrl_otgid1: usb1grp {
> 
> pinctrl_ubs1: usb1grp

Okay.

> 
> > +               fsl,pins = <
> > +                       MX8ULP_PAD_PTF2__USB0_ID        0x10003
> > +                       MX8ULP_PAD_PTF4__USB0_OC        0x10003
> > +               >;
> > +       };
> > +
> > +       pinctrl_otgid2: usb2grp {
> 
> pinctrl_usb2: usb2grp

Okay.


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

* RE: [EXT] Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
@ 2023-12-14 12:44       ` Xu Yang
  0 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 12:44 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, dl-linux-imx, devicetree, linux-arm-kernel

Hi Fabio,

> 
> On Thu, Dec 14, 2023 at 8:19 AM Xu Yang <xu.yang_2@nxp.com> wrote:
> 
> > +&usbphy1 {
> > +       status = "okay";
> > +       fsl,tx-d-cal = <110>;
> 
> Place status as the last property.

Okay.

> 
> > +&usbphy2 {
> > +       status = "okay";
> > +       fsl,tx-d-cal = <110>;
> 
> Place status as the last property.

Okay.

> 
> > +};
> > +
> > +&usbmisc2 {
> > +       status = "okay";
> > +};
> > +
> >  &usdhc0 {
> >         pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep";
> >         pinctrl-0 = <&pinctrl_usdhc0>;
> > @@ -224,6 +264,20 @@ MX8ULP_PAD_PTE13__LPI2C7_SDA       0x20
> >                 >;
> >         };
> >
> > +       pinctrl_otgid1: usb1grp {
> 
> pinctrl_ubs1: usb1grp

Okay.

> 
> > +               fsl,pins = <
> > +                       MX8ULP_PAD_PTF2__USB0_ID        0x10003
> > +                       MX8ULP_PAD_PTF4__USB0_OC        0x10003
> > +               >;
> > +       };
> > +
> > +       pinctrl_otgid2: usb2grp {
> 
> pinctrl_usb2: usb2grp

Okay.

_______________________________________________
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] 38+ messages in thread

* RE: [EXT] Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
  2023-12-14 11:58     ` Fabio Estevam
@ 2023-12-14 12:50       ` Xu Yang
  -1 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 12:50 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, dl-linux-imx, devicetree, linux-arm-kernel

Hi Fabio,

> 
> On Thu, Dec 14, 2023 at 8:19 AM Xu Yang <xu.yang_2@nxp.com> wrote:
> >
> > Enable 2 USB nodes on i.MX8ULP evk board.
> 
> imx8ulp-evk schematics show two PTN5150 and two USB Type-C connectors.
> 
> Why are they not represented in the devicetree?

PTN5150 can work autonomously for most of the basic functions.
I don’t see a need to enable driver for it now.

Thanks,
Xu Yang

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

* RE: [EXT] Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
@ 2023-12-14 12:50       ` Xu Yang
  0 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-14 12:50 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, dl-linux-imx, devicetree, linux-arm-kernel

Hi Fabio,

> 
> On Thu, Dec 14, 2023 at 8:19 AM Xu Yang <xu.yang_2@nxp.com> wrote:
> >
> > Enable 2 USB nodes on i.MX8ULP evk board.
> 
> imx8ulp-evk schematics show two PTN5150 and two USB Type-C connectors.
> 
> Why are they not represented in the devicetree?

PTN5150 can work autonomously for most of the basic functions.
I don’t see a need to enable driver for it now.

Thanks,
Xu Yang
_______________________________________________
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] 38+ messages in thread

* Re: [EXT] Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
  2023-12-14 12:50       ` Xu Yang
@ 2023-12-14 13:15         ` Fabio Estevam
  -1 siblings, 0 replies; 38+ messages in thread
From: Fabio Estevam @ 2023-12-14 13:15 UTC (permalink / raw)
  To: Xu Yang
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, dl-linux-imx, devicetree, linux-arm-kernel

On Thu, Dec 14, 2023 at 9:50 AM Xu Yang <xu.yang_2@nxp.com> wrote:

> PTN5150 can work autonomously for most of the basic functions.
> I don’t see a need to enable driver for it now.

We are talking about devicetree here, not driver.

If the PTN5150 is present on the board, then just represent it in the
devicetree.

_______________________________________________
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] 38+ messages in thread

* Re: [EXT] Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
@ 2023-12-14 13:15         ` Fabio Estevam
  0 siblings, 0 replies; 38+ messages in thread
From: Fabio Estevam @ 2023-12-14 13:15 UTC (permalink / raw)
  To: Xu Yang
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, dl-linux-imx, devicetree, linux-arm-kernel

On Thu, Dec 14, 2023 at 9:50 AM Xu Yang <xu.yang_2@nxp.com> wrote:

> PTN5150 can work autonomously for most of the basic functions.
> I don’t see a need to enable driver for it now.

We are talking about devicetree here, not driver.

If the PTN5150 is present on the board, then just represent it in the
devicetree.

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

* Re: [PATCH 3/4] arm64: dts: imx93: add usb nodes
  2023-12-14 11:24   ` Xu Yang
@ 2023-12-14 13:35     ` Alexander Stein
  -1 siblings, 0 replies; 38+ messages in thread
From: Alexander Stein @ 2023-12-14 13:35 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam, linux-arm-kernel
  Cc: linux-imx, devicetree, linux-arm-kernel, Xu Yang

Hi,

thanks for the patch.

Am Donnerstag, 14. Dezember 2023, 12:24:41 CET schrieb Xu Yang:
> There are 2 USB controllers on i.MX93. Add them.
> 
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> ---
>  arch/arm64/boot/dts/freescale/imx93.dtsi | 58 ++++++++++++++++++++++++
>  1 file changed, 58 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi
> b/arch/arm64/boot/dts/freescale/imx93.dtsi index 34c0540276d1..bcf4861cfede
> 100644
> --- a/arch/arm64/boot/dts/freescale/imx93.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
> @@ -171,6 +171,20 @@ cm33: remoteproc-cm33 {
>  		status = "disabled";
>  	};
> 
> +	usbphynop1: usbphynop1 {
> +		#phy-cells = <0>;
> +		compatible = "usb-nop-xceiv";

compatible first.

> +		clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> +		clock-names = "main_clk";
> +	};
> +
> +	usbphynop2: usbphynop2 {
> +		#phy-cells = <0>;
> +		compatible = "usb-nop-xceiv";

compatible first.

> +		clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> +		clock-names = "main_clk";
> +	};
> +
>  	soc@0 {
>  		compatible = "simple-bus";
>  		#address-cells = <1>;
> @@ -1059,5 +1073,49 @@ ddr-pmu@4e300dc0 {
>  			reg = <0x4e300dc0 0x200>;
>  			interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
>  		};
> +
> +		usbotg1: usb@4c100000 {
> +			compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb", 
"fsl,imx27-usb";
> +			reg = <0x4c100000 0x200>;
> +			interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> +				 <&clk IMX93_CLK_HSIO_32K_GATE>;
> +			clock-names = "usb_ctrl_root_clk", 
"usb_wakeup_clk";

drivers/usb/chipidea/ci_hdrc_imx.c uses 3 clocks: "ipg", "ahb" and "per", see 
imx_get_clks(). How is this supposed to work?

> +			assigned-clocks = <&clk IMX93_CLK_HSIO>;
> +			assigned-clock-parents = <&clk 
IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> +			assigned-clock-rates = <133000000>;
> +			fsl,usbphy = <&usbphynop1>;
> +			fsl,usbmisc = <&usbmisc1 0>;
> +			status = "disabled";
> +		};
> +
> +		usbmisc1: usbmisc@4c100200 {
> +			compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
usbmisc",
> +					"fsl,imx6q-usbmisc";

This means you are compatible to fsl,imx7d-usbmisc. Which means you use 
register MX7D_USB_OTG_PHY_STATUS in USB misc (USBNC). But i.MX93 RM Rev. 2 
(04/2023) lacks this and other registers.

> +			#index-cells = <1>;
> +			reg = <0x4c100200 0x200>;

reg after compatible.

> +		};
> +
> +		usbotg2: usb@4c200000 {
> +			compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb", 
"fsl,imx27-usb";
> +			reg = <0x4c200000 0x200>;
> +			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> +				 <&clk IMX93_CLK_HSIO_32K_GATE>;
> +			clock-names = "usb_ctrl_root_clk", 
"usb_wakeup_clk";

The same as for usbotg1 applies here.

> +			assigned-clocks = <&clk IMX93_CLK_HSIO>;
> +			assigned-clock-parents = <&clk 
IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> +			assigned-clock-rates = <133000000>;
> +			fsl,usbphy = <&usbphynop2>;
> +			fsl,usbmisc = <&usbmisc2 0>;
> +			status = "disabled";
> +		};
> +
> +		usbmisc2: usbmisc@4c200200 {
> +			compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
usbmisc",
> +					"fsl,imx6q-usbmisc";
> +			#index-cells = <1>;
> +			reg = <0x4c200200 0x200>;

The same as for usbmisc1 applies here.

> +		};
>  	};
>  };

Best regards,
Alexander

-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



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

* Re: [PATCH 3/4] arm64: dts: imx93: add usb nodes
@ 2023-12-14 13:35     ` Alexander Stein
  0 siblings, 0 replies; 38+ messages in thread
From: Alexander Stein @ 2023-12-14 13:35 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam, linux-arm-kernel
  Cc: linux-imx, devicetree, linux-arm-kernel, Xu Yang

Hi,

thanks for the patch.

Am Donnerstag, 14. Dezember 2023, 12:24:41 CET schrieb Xu Yang:
> There are 2 USB controllers on i.MX93. Add them.
> 
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> ---
>  arch/arm64/boot/dts/freescale/imx93.dtsi | 58 ++++++++++++++++++++++++
>  1 file changed, 58 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi
> b/arch/arm64/boot/dts/freescale/imx93.dtsi index 34c0540276d1..bcf4861cfede
> 100644
> --- a/arch/arm64/boot/dts/freescale/imx93.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
> @@ -171,6 +171,20 @@ cm33: remoteproc-cm33 {
>  		status = "disabled";
>  	};
> 
> +	usbphynop1: usbphynop1 {
> +		#phy-cells = <0>;
> +		compatible = "usb-nop-xceiv";

compatible first.

> +		clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> +		clock-names = "main_clk";
> +	};
> +
> +	usbphynop2: usbphynop2 {
> +		#phy-cells = <0>;
> +		compatible = "usb-nop-xceiv";

compatible first.

> +		clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> +		clock-names = "main_clk";
> +	};
> +
>  	soc@0 {
>  		compatible = "simple-bus";
>  		#address-cells = <1>;
> @@ -1059,5 +1073,49 @@ ddr-pmu@4e300dc0 {
>  			reg = <0x4e300dc0 0x200>;
>  			interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
>  		};
> +
> +		usbotg1: usb@4c100000 {
> +			compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb", 
"fsl,imx27-usb";
> +			reg = <0x4c100000 0x200>;
> +			interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> +				 <&clk IMX93_CLK_HSIO_32K_GATE>;
> +			clock-names = "usb_ctrl_root_clk", 
"usb_wakeup_clk";

drivers/usb/chipidea/ci_hdrc_imx.c uses 3 clocks: "ipg", "ahb" and "per", see 
imx_get_clks(). How is this supposed to work?

> +			assigned-clocks = <&clk IMX93_CLK_HSIO>;
> +			assigned-clock-parents = <&clk 
IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> +			assigned-clock-rates = <133000000>;
> +			fsl,usbphy = <&usbphynop1>;
> +			fsl,usbmisc = <&usbmisc1 0>;
> +			status = "disabled";
> +		};
> +
> +		usbmisc1: usbmisc@4c100200 {
> +			compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
usbmisc",
> +					"fsl,imx6q-usbmisc";

This means you are compatible to fsl,imx7d-usbmisc. Which means you use 
register MX7D_USB_OTG_PHY_STATUS in USB misc (USBNC). But i.MX93 RM Rev. 2 
(04/2023) lacks this and other registers.

> +			#index-cells = <1>;
> +			reg = <0x4c100200 0x200>;

reg after compatible.

> +		};
> +
> +		usbotg2: usb@4c200000 {
> +			compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb", 
"fsl,imx27-usb";
> +			reg = <0x4c200000 0x200>;
> +			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> +				 <&clk IMX93_CLK_HSIO_32K_GATE>;
> +			clock-names = "usb_ctrl_root_clk", 
"usb_wakeup_clk";

The same as for usbotg1 applies here.

> +			assigned-clocks = <&clk IMX93_CLK_HSIO>;
> +			assigned-clock-parents = <&clk 
IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> +			assigned-clock-rates = <133000000>;
> +			fsl,usbphy = <&usbphynop2>;
> +			fsl,usbmisc = <&usbmisc2 0>;
> +			status = "disabled";
> +		};
> +
> +		usbmisc2: usbmisc@4c200200 {
> +			compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
usbmisc",
> +					"fsl,imx6q-usbmisc";
> +			#index-cells = <1>;
> +			reg = <0x4c200200 0x200>;

The same as for usbmisc1 applies here.

> +		};
>  	};
>  };

Best regards,
Alexander

-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



_______________________________________________
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] 38+ messages in thread

* Re: [PATCH 4/4] arm64: dts: imx93-11x11-evk: enable usb and typec nodes
  2023-12-14 11:24   ` Xu Yang
@ 2023-12-14 13:40     ` Alexander Stein
  -1 siblings, 0 replies; 38+ messages in thread
From: Alexander Stein @ 2023-12-14 13:40 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam, linux-arm-kernel
  Cc: linux-imx, devicetree, linux-arm-kernel, Xu Yang

Hi,

thanks for the patch.

Am Donnerstag, 14. Dezember 2023, 12:24:42 CET schrieb Xu Yang:
> There are 2 Type-C ports and 2 USB controllers on i.MX93. Enable them.
> 
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> ---
>  .../boot/dts/freescale/imx93-11x11-evk.dts    | 108 ++++++++++++++++++
>  1 file changed, 108 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts index
> 2b9d47716f75..42b1ea7d5220 100644
> --- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> @@ -5,6 +5,7 @@
> 
>  /dts-v1/;
> 
> +#include <dt-bindings/usb/pd.h>
>  #include "imx93.dtsi"
> 
>  / {
> @@ -103,6 +104,70 @@ &mu2 {
>  	status = "okay";
>  };
> 
> +&lpi2c3 {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	clock-frequency = <400000>;
> +	pinctrl-names = "default", "sleep";
> +	pinctrl-0 = <&pinctrl_lpi2c3>;
> +	pinctrl-1 = <&pinctrl_lpi2c3>;
> +	status = "okay";
> +
> +	ptn5110: tcpc@50 {

I do not know if there is already some consent, but personally I do not like 
tcpc for the node name. Maybe change that to usb-typec@50.

> +		compatible = "nxp,ptn5110";
> +		reg = <0x50>;
> +		interrupt-parent = <&gpio3>;
> +		interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
> +		status = "okay";

status not needed here, "okay" is default and node is added here.

> +
> +		port {
> +			typec1_dr_sw: endpoint {
> +				remote-endpoint = <&usb1_drd_sw>;
> +			};
> +		};
> +
> +		typec1_con: connector {
> +			compatible = "usb-c-connector";
> +			label = "USB-C";
> +			power-role = "dual";
> +			data-role = "dual";
> +			try-power-role = "sink";
> +			source-pdos = <PDO_FIXED(5000, 3000, 
PDO_FIXED_USB_COMM)>;
> +			sink-pdos = <PDO_FIXED(5000, 3000, 
PDO_FIXED_USB_COMM)
> +				     PDO_VAR(5000, 20000, 3000)>;
> +			op-sink-microwatt = <15000000>;
> +			self-powered;
> +		};
> +	};
> +
> +	ptn5110_2: tcpc@51 {

See above.

> +		compatible = "nxp,ptn5110";
> +		reg = <0x51>;
> +		interrupt-parent = <&gpio3>;
> +		interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
> +		status = "okay";

See above.

Best regards,
Alexander

> +
> +		port {
> +			typec2_dr_sw: endpoint {
> +				remote-endpoint = <&usb2_drd_sw>;
> +			};
> +		};
> +
> +		typec2_con: connector {
> +			compatible = "usb-c-connector";
> +			label = "USB-C";
> +			power-role = "dual";
> +			data-role = "dual";
> +			try-power-role = "sink";
> +			source-pdos = <PDO_FIXED(5000, 3000, 
PDO_FIXED_USB_COMM)>;
> +			sink-pdos = <PDO_FIXED(5000, 3000, 
PDO_FIXED_USB_COMM)
> +				     PDO_VAR(5000, 20000, 3000)>;
> +			op-sink-microwatt = <15000000>;
> +			self-powered;
> +		};
> +	};
> +};
> +
>  &eqos {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pinctrl_eqos>;
> @@ -155,6 +220,42 @@ &lpuart5 {
>  	status = "okay";
>  };
> 
> +&usbotg1 {
> +	dr_mode = "otg";
> +	hnp-disable;
> +	srp-disable;
> +	adp-disable;
> +	usb-role-switch;
> +	disable-over-current;
> +	samsung,picophy-pre-emp-curr-control = <3>;
> +	samsung,picophy-dc-vol-level-adjust = <7>;
> +	status = "okay";
> +
> +	port {
> +		usb1_drd_sw: endpoint {
> +			remote-endpoint = <&typec1_dr_sw>;
> +		};
> +	};
> +};
> +
> +&usbotg2 {
> +	dr_mode = "otg";
> +	hnp-disable;
> +	srp-disable;
> +	adp-disable;
> +	usb-role-switch;
> +	disable-over-current;
> +	samsung,picophy-pre-emp-curr-control = <3>;
> +	samsung,picophy-dc-vol-level-adjust = <7>;
> +	status = "okay";
> +
> +	port {
> +		usb2_drd_sw: endpoint {
> +			remote-endpoint = <&typec2_dr_sw>;
> +		};
> +	};
> +};
> +
>  &usdhc1 {
>  	pinctrl-names = "default", "state_100mhz", "state_200mhz";
>  	pinctrl-0 = <&pinctrl_usdhc1>;
> @@ -221,6 +322,13 @@ MX93_PAD_ENET2_TX_CTL__ENET1_RGMII_TX_CTL	0x57e
> 
>  		>;
> 
>  	};
> 
> +	pinctrl_lpi2c3: lpi2c3grp {
> +		fsl,pins = <
> +			MX93_PAD_GPIO_IO28__LPI2C3_SDA			
0x40000b9e
> +			MX93_PAD_GPIO_IO29__LPI2C3_SCL			
0x40000b9e
> +		>;
> +	};
> +
>  	pinctrl_uart1: uart1grp {
>  		fsl,pins = <
>  			MX93_PAD_UART1_RXD__LPUART1_RX			
0x31e


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



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

* Re: [PATCH 4/4] arm64: dts: imx93-11x11-evk: enable usb and typec nodes
@ 2023-12-14 13:40     ` Alexander Stein
  0 siblings, 0 replies; 38+ messages in thread
From: Alexander Stein @ 2023-12-14 13:40 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam, linux-arm-kernel
  Cc: linux-imx, devicetree, linux-arm-kernel, Xu Yang

Hi,

thanks for the patch.

Am Donnerstag, 14. Dezember 2023, 12:24:42 CET schrieb Xu Yang:
> There are 2 Type-C ports and 2 USB controllers on i.MX93. Enable them.
> 
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> ---
>  .../boot/dts/freescale/imx93-11x11-evk.dts    | 108 ++++++++++++++++++
>  1 file changed, 108 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts index
> 2b9d47716f75..42b1ea7d5220 100644
> --- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> @@ -5,6 +5,7 @@
> 
>  /dts-v1/;
> 
> +#include <dt-bindings/usb/pd.h>
>  #include "imx93.dtsi"
> 
>  / {
> @@ -103,6 +104,70 @@ &mu2 {
>  	status = "okay";
>  };
> 
> +&lpi2c3 {
> +	#address-cells = <1>;
> +	#size-cells = <0>;
> +	clock-frequency = <400000>;
> +	pinctrl-names = "default", "sleep";
> +	pinctrl-0 = <&pinctrl_lpi2c3>;
> +	pinctrl-1 = <&pinctrl_lpi2c3>;
> +	status = "okay";
> +
> +	ptn5110: tcpc@50 {

I do not know if there is already some consent, but personally I do not like 
tcpc for the node name. Maybe change that to usb-typec@50.

> +		compatible = "nxp,ptn5110";
> +		reg = <0x50>;
> +		interrupt-parent = <&gpio3>;
> +		interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
> +		status = "okay";

status not needed here, "okay" is default and node is added here.

> +
> +		port {
> +			typec1_dr_sw: endpoint {
> +				remote-endpoint = <&usb1_drd_sw>;
> +			};
> +		};
> +
> +		typec1_con: connector {
> +			compatible = "usb-c-connector";
> +			label = "USB-C";
> +			power-role = "dual";
> +			data-role = "dual";
> +			try-power-role = "sink";
> +			source-pdos = <PDO_FIXED(5000, 3000, 
PDO_FIXED_USB_COMM)>;
> +			sink-pdos = <PDO_FIXED(5000, 3000, 
PDO_FIXED_USB_COMM)
> +				     PDO_VAR(5000, 20000, 3000)>;
> +			op-sink-microwatt = <15000000>;
> +			self-powered;
> +		};
> +	};
> +
> +	ptn5110_2: tcpc@51 {

See above.

> +		compatible = "nxp,ptn5110";
> +		reg = <0x51>;
> +		interrupt-parent = <&gpio3>;
> +		interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
> +		status = "okay";

See above.

Best regards,
Alexander

> +
> +		port {
> +			typec2_dr_sw: endpoint {
> +				remote-endpoint = <&usb2_drd_sw>;
> +			};
> +		};
> +
> +		typec2_con: connector {
> +			compatible = "usb-c-connector";
> +			label = "USB-C";
> +			power-role = "dual";
> +			data-role = "dual";
> +			try-power-role = "sink";
> +			source-pdos = <PDO_FIXED(5000, 3000, 
PDO_FIXED_USB_COMM)>;
> +			sink-pdos = <PDO_FIXED(5000, 3000, 
PDO_FIXED_USB_COMM)
> +				     PDO_VAR(5000, 20000, 3000)>;
> +			op-sink-microwatt = <15000000>;
> +			self-powered;
> +		};
> +	};
> +};
> +
>  &eqos {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pinctrl_eqos>;
> @@ -155,6 +220,42 @@ &lpuart5 {
>  	status = "okay";
>  };
> 
> +&usbotg1 {
> +	dr_mode = "otg";
> +	hnp-disable;
> +	srp-disable;
> +	adp-disable;
> +	usb-role-switch;
> +	disable-over-current;
> +	samsung,picophy-pre-emp-curr-control = <3>;
> +	samsung,picophy-dc-vol-level-adjust = <7>;
> +	status = "okay";
> +
> +	port {
> +		usb1_drd_sw: endpoint {
> +			remote-endpoint = <&typec1_dr_sw>;
> +		};
> +	};
> +};
> +
> +&usbotg2 {
> +	dr_mode = "otg";
> +	hnp-disable;
> +	srp-disable;
> +	adp-disable;
> +	usb-role-switch;
> +	disable-over-current;
> +	samsung,picophy-pre-emp-curr-control = <3>;
> +	samsung,picophy-dc-vol-level-adjust = <7>;
> +	status = "okay";
> +
> +	port {
> +		usb2_drd_sw: endpoint {
> +			remote-endpoint = <&typec2_dr_sw>;
> +		};
> +	};
> +};
> +
>  &usdhc1 {
>  	pinctrl-names = "default", "state_100mhz", "state_200mhz";
>  	pinctrl-0 = <&pinctrl_usdhc1>;
> @@ -221,6 +322,13 @@ MX93_PAD_ENET2_TX_CTL__ENET1_RGMII_TX_CTL	0x57e
> 
>  		>;
> 
>  	};
> 
> +	pinctrl_lpi2c3: lpi2c3grp {
> +		fsl,pins = <
> +			MX93_PAD_GPIO_IO28__LPI2C3_SDA			
0x40000b9e
> +			MX93_PAD_GPIO_IO29__LPI2C3_SCL			
0x40000b9e
> +		>;
> +	};
> +
>  	pinctrl_uart1: uart1grp {
>  		fsl,pins = <
>  			MX93_PAD_UART1_RXD__LPUART1_RX			
0x31e


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



_______________________________________________
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] 38+ messages in thread

* RE: [EXT] Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
  2023-12-14 13:15         ` Fabio Estevam
@ 2023-12-15  1:56           ` Xu Yang
  -1 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-15  1:56 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, dl-linux-imx, devicetree, linux-arm-kernel

Hi Fabio,

> 
> On Thu, Dec 14, 2023 at 9:50 AM Xu Yang <xu.yang_2@nxp.com> wrote:
> 
> > PTN5150 can work autonomously for most of the basic functions.
> > I don’t see a need to enable driver for it now.
> 
> We are talking about devicetree here, not driver.
> 
> If the PTN5150 is present on the board, then just represent it in the
> devicetree.

Understood. Will consider this in v2.

Thanks,
Xu Yang

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

* RE: [EXT] Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
@ 2023-12-15  1:56           ` Xu Yang
  0 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-15  1:56 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, dl-linux-imx, devicetree, linux-arm-kernel

Hi Fabio,

> 
> On Thu, Dec 14, 2023 at 9:50 AM Xu Yang <xu.yang_2@nxp.com> wrote:
> 
> > PTN5150 can work autonomously for most of the basic functions.
> > I don’t see a need to enable driver for it now.
> 
> We are talking about devicetree here, not driver.
> 
> If the PTN5150 is present on the board, then just represent it in the
> devicetree.

Understood. Will consider this in v2.

Thanks,
Xu Yang
_______________________________________________
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] 38+ messages in thread

* RE: [EXT] Re: [PATCH 3/4] arm64: dts: imx93: add usb nodes
  2023-12-14 13:35     ` Alexander Stein
@ 2023-12-15  2:12       ` Xu Yang
  -1 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-15  2:12 UTC (permalink / raw)
  To: Alexander Stein, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	shawnguo, s.hauer, kernel, festevam, linux-arm-kernel
  Cc: dl-linux-imx, devicetree, linux-arm-kernel

Hi Alexander,

>
> Hi,
>
> thanks for the patch.
>
> Am Donnerstag, 14. Dezember 2023, 12:24:41 CET schrieb Xu Yang:
> > There are 2 USB controllers on i.MX93. Add them.
> >
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > ---
> >  arch/arm64/boot/dts/freescale/imx93.dtsi | 58 ++++++++++++++++++++++++
> >  1 file changed, 58 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > b/arch/arm64/boot/dts/freescale/imx93.dtsi index 34c0540276d1..bcf4861cfede
> > 100644
> > --- a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
> > @@ -171,6 +171,20 @@ cm33: remoteproc-cm33 {
> >               status = "disabled";
> >       };
> >
> > +     usbphynop1: usbphynop1 {
> > +             #phy-cells = <0>;
> > +             compatible = "usb-nop-xceiv";
>
> compatible first.

Okay.

>
> > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > +             clock-names = "main_clk";
> > +     };
> > +
> > +     usbphynop2: usbphynop2 {
> > +             #phy-cells = <0>;
> > +             compatible = "usb-nop-xceiv";
>
> compatible first.

Okay.

>
> > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > +             clock-names = "main_clk";
> > +     };
> > +
> >       soc@0 {
> >               compatible = "simple-bus";
> >               #address-cells = <1>;
> > @@ -1059,5 +1073,49 @@ ddr-pmu@4e300dc0 {
> >                       reg = <0x4e300dc0 0x200>;
> >                       interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
> >               };
> > +
> > +             usbotg1: usb@4c100000 {
> > +                     compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb",
> "fsl,imx27-usb";
> > +                     reg = <0x4c100000 0x200>;
> > +                     interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
> > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > +                     clock-names = "usb_ctrl_root_clk",
> "usb_wakeup_clk";
>
> drivers/usb/chipidea/ci_hdrc_imx.c uses 3 clocks: "ipg", "ahb" and "per", see
> imx_get_clks(). How is this supposed to work?

I have sent another patch to get this clock.
https://lore.kernel.org/all/20231214112622.2412321-1-xu.yang_2@nxp.com/

>
> > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > +                     assigned-clock-parents = <&clk
> IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > +                     assigned-clock-rates = <133000000>;
> > +                     fsl,usbphy = <&usbphynop1>;
> > +                     fsl,usbmisc = <&usbmisc1 0>;
> > +                     status = "disabled";
> > +             };
> > +
> > +             usbmisc1: usbmisc@4c100200 {
> > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
> usbmisc",
> > +                                     "fsl,imx6q-usbmisc";
>
> This means you are compatible to fsl,imx7d-usbmisc. Which means you use
> register MX7D_USB_OTG_PHY_STATUS in USB misc (USBNC). But i.MX93 RM Rev. 2
> (04/2023) lacks this and other registers.

Some registers in USBNC are not shown. The internal RM has these registers.

>
> > +                     #index-cells = <1>;
> > +                     reg = <0x4c100200 0x200>;
>
> reg after compatible.

Okay.

>
> > +             };
> > +
> > +             usbotg2: usb@4c200000 {
> > +                     compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb",
> "fsl,imx27-usb";
> > +                     reg = <0x4c200000 0x200>;
> > +                     interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
> > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > +                     clock-names = "usb_ctrl_root_clk",
> "usb_wakeup_clk";
>
> The same as for usbotg1 applies here.

Okay.

>
> > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > +                     assigned-clock-parents = <&clk
> IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > +                     assigned-clock-rates = <133000000>;
> > +                     fsl,usbphy = <&usbphynop2>;
> > +                     fsl,usbmisc = <&usbmisc2 0>;
> > +                     status = "disabled";
> > +             };
> > +
> > +             usbmisc2: usbmisc@4c200200 {
> > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
> usbmisc",
> > +                                     "fsl,imx6q-usbmisc";
> > +                     #index-cells = <1>;
> > +                     reg = <0x4c200200 0x200>;
>
> The same as for usbmisc1 applies here.

Okay.

>
> > +             };
> >       };
> >  };
>
> Best regards,
> Alexander
>
> --
> TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
> Amtsgericht München, HRB 105018
> Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
> http://www.tq-/
> group.com%2F&data=05%7C02%7Cxu.yang_2%40nxp.com%7C10ff5a35f53f4047ae1d08dbfca99c38%7C686ea1d3bc2b4c6fa
> 92cd99c5c301635%7C0%7C0%7C638381577622080432%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2
> luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VlpRPcnJTmywfSamaGB1Ev8aPN2Hi596VbbRNGXF
> yis%3D&reserved=0
>


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

* RE: [EXT] Re: [PATCH 3/4] arm64: dts: imx93: add usb nodes
@ 2023-12-15  2:12       ` Xu Yang
  0 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-15  2:12 UTC (permalink / raw)
  To: Alexander Stein, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	shawnguo, s.hauer, kernel, festevam, linux-arm-kernel
  Cc: dl-linux-imx, devicetree, linux-arm-kernel

Hi Alexander,

>
> Hi,
>
> thanks for the patch.
>
> Am Donnerstag, 14. Dezember 2023, 12:24:41 CET schrieb Xu Yang:
> > There are 2 USB controllers on i.MX93. Add them.
> >
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > ---
> >  arch/arm64/boot/dts/freescale/imx93.dtsi | 58 ++++++++++++++++++++++++
> >  1 file changed, 58 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > b/arch/arm64/boot/dts/freescale/imx93.dtsi index 34c0540276d1..bcf4861cfede
> > 100644
> > --- a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
> > @@ -171,6 +171,20 @@ cm33: remoteproc-cm33 {
> >               status = "disabled";
> >       };
> >
> > +     usbphynop1: usbphynop1 {
> > +             #phy-cells = <0>;
> > +             compatible = "usb-nop-xceiv";
>
> compatible first.

Okay.

>
> > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > +             clock-names = "main_clk";
> > +     };
> > +
> > +     usbphynop2: usbphynop2 {
> > +             #phy-cells = <0>;
> > +             compatible = "usb-nop-xceiv";
>
> compatible first.

Okay.

>
> > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > +             clock-names = "main_clk";
> > +     };
> > +
> >       soc@0 {
> >               compatible = "simple-bus";
> >               #address-cells = <1>;
> > @@ -1059,5 +1073,49 @@ ddr-pmu@4e300dc0 {
> >                       reg = <0x4e300dc0 0x200>;
> >                       interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
> >               };
> > +
> > +             usbotg1: usb@4c100000 {
> > +                     compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb",
> "fsl,imx27-usb";
> > +                     reg = <0x4c100000 0x200>;
> > +                     interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
> > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > +                     clock-names = "usb_ctrl_root_clk",
> "usb_wakeup_clk";
>
> drivers/usb/chipidea/ci_hdrc_imx.c uses 3 clocks: "ipg", "ahb" and "per", see
> imx_get_clks(). How is this supposed to work?

I have sent another patch to get this clock.
https://lore.kernel.org/all/20231214112622.2412321-1-xu.yang_2@nxp.com/

>
> > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > +                     assigned-clock-parents = <&clk
> IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > +                     assigned-clock-rates = <133000000>;
> > +                     fsl,usbphy = <&usbphynop1>;
> > +                     fsl,usbmisc = <&usbmisc1 0>;
> > +                     status = "disabled";
> > +             };
> > +
> > +             usbmisc1: usbmisc@4c100200 {
> > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
> usbmisc",
> > +                                     "fsl,imx6q-usbmisc";
>
> This means you are compatible to fsl,imx7d-usbmisc. Which means you use
> register MX7D_USB_OTG_PHY_STATUS in USB misc (USBNC). But i.MX93 RM Rev. 2
> (04/2023) lacks this and other registers.

Some registers in USBNC are not shown. The internal RM has these registers.

>
> > +                     #index-cells = <1>;
> > +                     reg = <0x4c100200 0x200>;
>
> reg after compatible.

Okay.

>
> > +             };
> > +
> > +             usbotg2: usb@4c200000 {
> > +                     compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb",
> "fsl,imx27-usb";
> > +                     reg = <0x4c200000 0x200>;
> > +                     interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
> > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > +                     clock-names = "usb_ctrl_root_clk",
> "usb_wakeup_clk";
>
> The same as for usbotg1 applies here.

Okay.

>
> > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > +                     assigned-clock-parents = <&clk
> IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > +                     assigned-clock-rates = <133000000>;
> > +                     fsl,usbphy = <&usbphynop2>;
> > +                     fsl,usbmisc = <&usbmisc2 0>;
> > +                     status = "disabled";
> > +             };
> > +
> > +             usbmisc2: usbmisc@4c200200 {
> > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
> usbmisc",
> > +                                     "fsl,imx6q-usbmisc";
> > +                     #index-cells = <1>;
> > +                     reg = <0x4c200200 0x200>;
>
> The same as for usbmisc1 applies here.

Okay.

>
> > +             };
> >       };
> >  };
>
> Best regards,
> Alexander
>
> --
> TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
> Amtsgericht München, HRB 105018
> Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
> http://www.tq-/
> group.com%2F&data=05%7C02%7Cxu.yang_2%40nxp.com%7C10ff5a35f53f4047ae1d08dbfca99c38%7C686ea1d3bc2b4c6fa
> 92cd99c5c301635%7C0%7C0%7C638381577622080432%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2
> luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VlpRPcnJTmywfSamaGB1Ev8aPN2Hi596VbbRNGXF
> yis%3D&reserved=0
>


_______________________________________________
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] 38+ messages in thread

* RE: [EXT] Re: [PATCH 4/4] arm64: dts: imx93-11x11-evk: enable usb and typec nodes
  2023-12-14 13:40     ` Alexander Stein
@ 2023-12-15  2:21       ` Xu Yang
  -1 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-15  2:21 UTC (permalink / raw)
  To: Alexander Stein, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	shawnguo, s.hauer, kernel, festevam, linux-arm-kernel
  Cc: dl-linux-imx, devicetree, linux-arm-kernel

Hi Alexander,

> 
> Hi,
> 
> thanks for the patch.
> 
> Am Donnerstag, 14. Dezember 2023, 12:24:42 CET schrieb Xu Yang:
> > There are 2 Type-C ports and 2 USB controllers on i.MX93. Enable them.
> >
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > ---
> >  .../boot/dts/freescale/imx93-11x11-evk.dts    | 108 ++++++++++++++++++
> >  1 file changed, 108 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> > b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts index
> > 2b9d47716f75..42b1ea7d5220 100644
> > --- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> > +++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> > @@ -5,6 +5,7 @@
> >
> >  /dts-v1/;
> >
> > +#include <dt-bindings/usb/pd.h>
> >  #include "imx93.dtsi"
> >
> >  / {
> > @@ -103,6 +104,70 @@ &mu2 {
> >       status = "okay";
> >  };
> >
> > +&lpi2c3 {
> > +     #address-cells = <1>;
> > +     #size-cells = <0>;
> > +     clock-frequency = <400000>;
> > +     pinctrl-names = "default", "sleep";
> > +     pinctrl-0 = <&pinctrl_lpi2c3>;
> > +     pinctrl-1 = <&pinctrl_lpi2c3>;
> > +     status = "okay";
> > +
> > +     ptn5110: tcpc@50 {
> 
> I do not know if there is already some consent, but personally I do not like
> tcpc for the node name. Maybe change that to usb-typec@50.

It really doesn't matter. The connector node will clear say it's a typec port.

> 
> > +             compatible = "nxp,ptn5110";
> > +             reg = <0x50>;
> > +             interrupt-parent = <&gpio3>;
> > +             interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
> > +             status = "okay";
> 
> status not needed here, "okay" is default and node is added here.

Yeah. 

> 
> > +
> > +             port {
> > +                     typec1_dr_sw: endpoint {
> > +                             remote-endpoint = <&usb1_drd_sw>;
> > +                     };
> > +             };
> > +
> > +             typec1_con: connector {
> > +                     compatible = "usb-c-connector";
> > +                     label = "USB-C";
> > +                     power-role = "dual";
> > +                     data-role = "dual";
> > +                     try-power-role = "sink";
> > +                     source-pdos = <PDO_FIXED(5000, 3000,
> PDO_FIXED_USB_COMM)>;
> > +                     sink-pdos = <PDO_FIXED(5000, 3000,
> PDO_FIXED_USB_COMM)
> > +                                  PDO_VAR(5000, 20000, 3000)>;
> > +                     op-sink-microwatt = <15000000>;
> > +                     self-powered;
> > +             };
> > +     };
> > +
> > +     ptn5110_2: tcpc@51 {
> 
> See above.
> 
> > +             compatible = "nxp,ptn5110";
> > +             reg = <0x51>;
> > +             interrupt-parent = <&gpio3>;
> > +             interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
> > +             status = "okay";
> 
> See above.

Okay.

Thanks,
Xu Yang

> 
> Best regards,
> Alexander
> 
> > +
> > +             port {
> > +                     typec2_dr_sw: endpoint {
> > +                             remote-endpoint = <&usb2_drd_sw>;
> > +                     };
> > +             };
> > +
> > +             typec2_con: connector {
> > +                     compatible = "usb-c-connector";
> > +                     label = "USB-C";
> > +                     power-role = "dual";
> > +                     data-role = "dual";
> > +                     try-power-role = "sink";
> > +                     source-pdos = <PDO_FIXED(5000, 3000,
> PDO_FIXED_USB_COMM)>;
> > +                     sink-pdos = <PDO_FIXED(5000, 3000,
> PDO_FIXED_USB_COMM)
> > +                                  PDO_VAR(5000, 20000, 3000)>;
> > +                     op-sink-microwatt = <15000000>;
> > +                     self-powered;
> > +             };
> > +     };
> > +};
> > +
> >  &eqos {
> >       pinctrl-names = "default";
> >       pinctrl-0 = <&pinctrl_eqos>;
> > @@ -155,6 +220,42 @@ &lpuart5 {
> >       status = "okay";
> >  };
> >
> > +&usbotg1 {
> > +     dr_mode = "otg";
> > +     hnp-disable;
> > +     srp-disable;
> > +     adp-disable;
> > +     usb-role-switch;
> > +     disable-over-current;
> > +     samsung,picophy-pre-emp-curr-control = <3>;
> > +     samsung,picophy-dc-vol-level-adjust = <7>;
> > +     status = "okay";
> > +
> > +     port {
> > +             usb1_drd_sw: endpoint {
> > +                     remote-endpoint = <&typec1_dr_sw>;
> > +             };
> > +     };
> > +};
> > +
> > +&usbotg2 {
> > +     dr_mode = "otg";
> > +     hnp-disable;
> > +     srp-disable;
> > +     adp-disable;
> > +     usb-role-switch;
> > +     disable-over-current;
> > +     samsung,picophy-pre-emp-curr-control = <3>;
> > +     samsung,picophy-dc-vol-level-adjust = <7>;
> > +     status = "okay";
> > +
> > +     port {
> > +             usb2_drd_sw: endpoint {
> > +                     remote-endpoint = <&typec2_dr_sw>;
> > +             };
> > +     };
> > +};
> > +
> >  &usdhc1 {
> >       pinctrl-names = "default", "state_100mhz", "state_200mhz";
> >       pinctrl-0 = <&pinctrl_usdhc1>;
> > @@ -221,6 +322,13 @@ MX93_PAD_ENET2_TX_CTL__ENET1_RGMII_TX_CTL        0x57e
> >
> >               >;
> >
> >       };
> >
> > +     pinctrl_lpi2c3: lpi2c3grp {
> > +             fsl,pins = <
> > +                     MX93_PAD_GPIO_IO28__LPI2C3_SDA
> 0x40000b9e
> > +                     MX93_PAD_GPIO_IO29__LPI2C3_SCL
> 0x40000b9e
> > +             >;
> > +     };
> > +
> >       pinctrl_uart1: uart1grp {
> >               fsl,pins = <
> >                       MX93_PAD_UART1_RXD__LPUART1_RX
> 0x31e
> 
> 


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

* RE: [EXT] Re: [PATCH 4/4] arm64: dts: imx93-11x11-evk: enable usb and typec nodes
@ 2023-12-15  2:21       ` Xu Yang
  0 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-15  2:21 UTC (permalink / raw)
  To: Alexander Stein, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	shawnguo, s.hauer, kernel, festevam, linux-arm-kernel
  Cc: dl-linux-imx, devicetree, linux-arm-kernel

Hi Alexander,

> 
> Hi,
> 
> thanks for the patch.
> 
> Am Donnerstag, 14. Dezember 2023, 12:24:42 CET schrieb Xu Yang:
> > There are 2 Type-C ports and 2 USB controllers on i.MX93. Enable them.
> >
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > ---
> >  .../boot/dts/freescale/imx93-11x11-evk.dts    | 108 ++++++++++++++++++
> >  1 file changed, 108 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> > b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts index
> > 2b9d47716f75..42b1ea7d5220 100644
> > --- a/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> > +++ b/arch/arm64/boot/dts/freescale/imx93-11x11-evk.dts
> > @@ -5,6 +5,7 @@
> >
> >  /dts-v1/;
> >
> > +#include <dt-bindings/usb/pd.h>
> >  #include "imx93.dtsi"
> >
> >  / {
> > @@ -103,6 +104,70 @@ &mu2 {
> >       status = "okay";
> >  };
> >
> > +&lpi2c3 {
> > +     #address-cells = <1>;
> > +     #size-cells = <0>;
> > +     clock-frequency = <400000>;
> > +     pinctrl-names = "default", "sleep";
> > +     pinctrl-0 = <&pinctrl_lpi2c3>;
> > +     pinctrl-1 = <&pinctrl_lpi2c3>;
> > +     status = "okay";
> > +
> > +     ptn5110: tcpc@50 {
> 
> I do not know if there is already some consent, but personally I do not like
> tcpc for the node name. Maybe change that to usb-typec@50.

It really doesn't matter. The connector node will clear say it's a typec port.

> 
> > +             compatible = "nxp,ptn5110";
> > +             reg = <0x50>;
> > +             interrupt-parent = <&gpio3>;
> > +             interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
> > +             status = "okay";
> 
> status not needed here, "okay" is default and node is added here.

Yeah. 

> 
> > +
> > +             port {
> > +                     typec1_dr_sw: endpoint {
> > +                             remote-endpoint = <&usb1_drd_sw>;
> > +                     };
> > +             };
> > +
> > +             typec1_con: connector {
> > +                     compatible = "usb-c-connector";
> > +                     label = "USB-C";
> > +                     power-role = "dual";
> > +                     data-role = "dual";
> > +                     try-power-role = "sink";
> > +                     source-pdos = <PDO_FIXED(5000, 3000,
> PDO_FIXED_USB_COMM)>;
> > +                     sink-pdos = <PDO_FIXED(5000, 3000,
> PDO_FIXED_USB_COMM)
> > +                                  PDO_VAR(5000, 20000, 3000)>;
> > +                     op-sink-microwatt = <15000000>;
> > +                     self-powered;
> > +             };
> > +     };
> > +
> > +     ptn5110_2: tcpc@51 {
> 
> See above.
> 
> > +             compatible = "nxp,ptn5110";
> > +             reg = <0x51>;
> > +             interrupt-parent = <&gpio3>;
> > +             interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
> > +             status = "okay";
> 
> See above.

Okay.

Thanks,
Xu Yang

> 
> Best regards,
> Alexander
> 
> > +
> > +             port {
> > +                     typec2_dr_sw: endpoint {
> > +                             remote-endpoint = <&usb2_drd_sw>;
> > +                     };
> > +             };
> > +
> > +             typec2_con: connector {
> > +                     compatible = "usb-c-connector";
> > +                     label = "USB-C";
> > +                     power-role = "dual";
> > +                     data-role = "dual";
> > +                     try-power-role = "sink";
> > +                     source-pdos = <PDO_FIXED(5000, 3000,
> PDO_FIXED_USB_COMM)>;
> > +                     sink-pdos = <PDO_FIXED(5000, 3000,
> PDO_FIXED_USB_COMM)
> > +                                  PDO_VAR(5000, 20000, 3000)>;
> > +                     op-sink-microwatt = <15000000>;
> > +                     self-powered;
> > +             };
> > +     };
> > +};
> > +
> >  &eqos {
> >       pinctrl-names = "default";
> >       pinctrl-0 = <&pinctrl_eqos>;
> > @@ -155,6 +220,42 @@ &lpuart5 {
> >       status = "okay";
> >  };
> >
> > +&usbotg1 {
> > +     dr_mode = "otg";
> > +     hnp-disable;
> > +     srp-disable;
> > +     adp-disable;
> > +     usb-role-switch;
> > +     disable-over-current;
> > +     samsung,picophy-pre-emp-curr-control = <3>;
> > +     samsung,picophy-dc-vol-level-adjust = <7>;
> > +     status = "okay";
> > +
> > +     port {
> > +             usb1_drd_sw: endpoint {
> > +                     remote-endpoint = <&typec1_dr_sw>;
> > +             };
> > +     };
> > +};
> > +
> > +&usbotg2 {
> > +     dr_mode = "otg";
> > +     hnp-disable;
> > +     srp-disable;
> > +     adp-disable;
> > +     usb-role-switch;
> > +     disable-over-current;
> > +     samsung,picophy-pre-emp-curr-control = <3>;
> > +     samsung,picophy-dc-vol-level-adjust = <7>;
> > +     status = "okay";
> > +
> > +     port {
> > +             usb2_drd_sw: endpoint {
> > +                     remote-endpoint = <&typec2_dr_sw>;
> > +             };
> > +     };
> > +};
> > +
> >  &usdhc1 {
> >       pinctrl-names = "default", "state_100mhz", "state_200mhz";
> >       pinctrl-0 = <&pinctrl_usdhc1>;
> > @@ -221,6 +322,13 @@ MX93_PAD_ENET2_TX_CTL__ENET1_RGMII_TX_CTL        0x57e
> >
> >               >;
> >
> >       };
> >
> > +     pinctrl_lpi2c3: lpi2c3grp {
> > +             fsl,pins = <
> > +                     MX93_PAD_GPIO_IO28__LPI2C3_SDA
> 0x40000b9e
> > +                     MX93_PAD_GPIO_IO29__LPI2C3_SCL
> 0x40000b9e
> > +             >;
> > +     };
> > +
> >       pinctrl_uart1: uart1grp {
> >               fsl,pins = <
> >                       MX93_PAD_UART1_RXD__LPUART1_RX
> 0x31e
> 
> 


_______________________________________________
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] 38+ messages in thread

* Re: [EXT] Re: [PATCH 3/4] arm64: dts: imx93: add usb nodes
  2023-12-15  2:12       ` Xu Yang
@ 2023-12-15  6:32         ` Alexander Stein
  -1 siblings, 0 replies; 38+ messages in thread
From: Alexander Stein @ 2023-12-15  6:32 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam, linux-arm-kernel, Xu Yang
  Cc: dl-linux-imx, devicetree, linux-arm-kernel

Hi,

Am Freitag, 15. Dezember 2023, 03:12:43 CET schrieb Xu Yang:
> Hi Alexander,
> 
> > Hi,
> > 
> > thanks for the patch.
> > 
> > Am Donnerstag, 14. Dezember 2023, 12:24:41 CET schrieb Xu Yang:
> > > There are 2 USB controllers on i.MX93. Add them.
> > > 
> > > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > > ---
> > > 
> > >  arch/arm64/boot/dts/freescale/imx93.dtsi | 58 ++++++++++++++++++++++++
> > >  1 file changed, 58 insertions(+)
> > > 
> > > diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > > b/arch/arm64/boot/dts/freescale/imx93.dtsi index
> > > 34c0540276d1..bcf4861cfede
> > > 100644
> > > --- a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > > +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
> > > @@ -171,6 +171,20 @@ cm33: remoteproc-cm33 {
> > > 
> > >               status = "disabled";
> > >       
> > >       };
> > > 
> > > +     usbphynop1: usbphynop1 {
> > > +             #phy-cells = <0>;
> > > +             compatible = "usb-nop-xceiv";
> > 
> > compatible first.
> 
> Okay.
> 
> > > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > > +             clock-names = "main_clk";
> > > +     };
> > > +
> > > +     usbphynop2: usbphynop2 {
> > > +             #phy-cells = <0>;
> > > +             compatible = "usb-nop-xceiv";
> > 
> > compatible first.
> 
> Okay.
> 
> > > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > > +             clock-names = "main_clk";
> > > +     };
> > > +
> > > 
> > >       soc@0 {
> > >       
> > >               compatible = "simple-bus";
> > >               #address-cells = <1>;
> > > 
> > > @@ -1059,5 +1073,49 @@ ddr-pmu@4e300dc0 {
> > > 
> > >                       reg = <0x4e300dc0 0x200>;
> > >                       interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
> > >               
> > >               };
> > > 
> > > +
> > > +             usbotg1: usb@4c100000 {
> > > +                     compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb",
> > 
> > "fsl,imx27-usb";
> > 
> > > +                     reg = <0x4c100000 0x200>;
> > > +                     interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
> > > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > > +                     clock-names = "usb_ctrl_root_clk",
> > 
> > "usb_wakeup_clk";
> > 
> > drivers/usb/chipidea/ci_hdrc_imx.c uses 3 clocks: "ipg", "ahb" and "per",
> > see imx_get_clks(). How is this supposed to work?
> 
> I have sent another patch to get this clock.
> https://lore.kernel.org/all/20231214112622.2412321-1-xu.yang_2@nxp.com/

Okay, but that adds another clock which is not mentioned in Documentation/
devicetree/bindings/usb/ci-hdrc-usb2.yaml at all. I guess some compatible-
specific constraints regarding number of clocks should be added.

Best regards,
Alexander

> 
> > > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > > +                     assigned-clock-parents = <&clk
> > 
> > IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > 
> > > +                     assigned-clock-rates = <133000000>;
> > > +                     fsl,usbphy = <&usbphynop1>;
> > > +                     fsl,usbmisc = <&usbmisc1 0>;
> > > +                     status = "disabled";
> > > +             };
> > > +
> > > +             usbmisc1: usbmisc@4c100200 {
> > > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
> > 
> > usbmisc",
> > 
> > > +                                     "fsl,imx6q-usbmisc";
> > 
> > This means you are compatible to fsl,imx7d-usbmisc. Which means you use
> > register MX7D_USB_OTG_PHY_STATUS in USB misc (USBNC). But i.MX93 RM Rev. 2
> > (04/2023) lacks this and other registers.
> 
> Some registers in USBNC are not shown. The internal RM has these registers.
> 
> > > +                     #index-cells = <1>;
> > > +                     reg = <0x4c100200 0x200>;
> > 
> > reg after compatible.
> 
> Okay.
> 
> > > +             };
> > > +
> > > +             usbotg2: usb@4c200000 {
> > > +                     compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb",
> > 
> > "fsl,imx27-usb";
> > 
> > > +                     reg = <0x4c200000 0x200>;
> > > +                     interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
> > > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > > +                     clock-names = "usb_ctrl_root_clk",
> > 
> > "usb_wakeup_clk";
> > 
> > The same as for usbotg1 applies here.
> 
> Okay.
> 
> > > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > > +                     assigned-clock-parents = <&clk
> > 
> > IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > 
> > > +                     assigned-clock-rates = <133000000>;
> > > +                     fsl,usbphy = <&usbphynop2>;
> > > +                     fsl,usbmisc = <&usbmisc2 0>;
> > > +                     status = "disabled";
> > > +             };
> > > +
> > > +             usbmisc2: usbmisc@4c200200 {
> > > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
> > 
> > usbmisc",
> > 
> > > +                                     "fsl,imx6q-usbmisc";
> > > +                     #index-cells = <1>;
> > > +                     reg = <0x4c200200 0x200>;
> > 
> > The same as for usbmisc1 applies here.
> 
> Okay.
> 
> > > +             };
> > > 
> > >       };
> > >  
> > >  };
> > 
> > Best regards,
> > Alexander
> > 
> > --
> > TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
> > Amtsgericht München, HRB 105018
> > Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
> > http://www.tq-/
> > group.com%2F&data=05%7C02%7Cxu.yang_2%40nxp.com%7C10ff5a35f53f4047ae1d08db
> > fca99c38%7C686ea1d3bc2b4c6fa
> > 92cd99c5c301635%7C0%7C0%7C638381577622080432%7CUnknown%7CTWFpbGZsb3d8eyJW
> > IjoiMC4wLjAwMDAiLCJQIjoiV2
> > luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VlpRPcnJTmywfS
> > amaGB1Ev8aPN2Hi596VbbRNGXF yis%3D&reserved=0


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



_______________________________________________
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] 38+ messages in thread

* Re: [EXT] Re: [PATCH 3/4] arm64: dts: imx93: add usb nodes
@ 2023-12-15  6:32         ` Alexander Stein
  0 siblings, 0 replies; 38+ messages in thread
From: Alexander Stein @ 2023-12-15  6:32 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, festevam, linux-arm-kernel, Xu Yang
  Cc: dl-linux-imx, devicetree, linux-arm-kernel

Hi,

Am Freitag, 15. Dezember 2023, 03:12:43 CET schrieb Xu Yang:
> Hi Alexander,
> 
> > Hi,
> > 
> > thanks for the patch.
> > 
> > Am Donnerstag, 14. Dezember 2023, 12:24:41 CET schrieb Xu Yang:
> > > There are 2 USB controllers on i.MX93. Add them.
> > > 
> > > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > > ---
> > > 
> > >  arch/arm64/boot/dts/freescale/imx93.dtsi | 58 ++++++++++++++++++++++++
> > >  1 file changed, 58 insertions(+)
> > > 
> > > diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > > b/arch/arm64/boot/dts/freescale/imx93.dtsi index
> > > 34c0540276d1..bcf4861cfede
> > > 100644
> > > --- a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > > +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
> > > @@ -171,6 +171,20 @@ cm33: remoteproc-cm33 {
> > > 
> > >               status = "disabled";
> > >       
> > >       };
> > > 
> > > +     usbphynop1: usbphynop1 {
> > > +             #phy-cells = <0>;
> > > +             compatible = "usb-nop-xceiv";
> > 
> > compatible first.
> 
> Okay.
> 
> > > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > > +             clock-names = "main_clk";
> > > +     };
> > > +
> > > +     usbphynop2: usbphynop2 {
> > > +             #phy-cells = <0>;
> > > +             compatible = "usb-nop-xceiv";
> > 
> > compatible first.
> 
> Okay.
> 
> > > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > > +             clock-names = "main_clk";
> > > +     };
> > > +
> > > 
> > >       soc@0 {
> > >       
> > >               compatible = "simple-bus";
> > >               #address-cells = <1>;
> > > 
> > > @@ -1059,5 +1073,49 @@ ddr-pmu@4e300dc0 {
> > > 
> > >                       reg = <0x4e300dc0 0x200>;
> > >                       interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
> > >               
> > >               };
> > > 
> > > +
> > > +             usbotg1: usb@4c100000 {
> > > +                     compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb",
> > 
> > "fsl,imx27-usb";
> > 
> > > +                     reg = <0x4c100000 0x200>;
> > > +                     interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
> > > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > > +                     clock-names = "usb_ctrl_root_clk",
> > 
> > "usb_wakeup_clk";
> > 
> > drivers/usb/chipidea/ci_hdrc_imx.c uses 3 clocks: "ipg", "ahb" and "per",
> > see imx_get_clks(). How is this supposed to work?
> 
> I have sent another patch to get this clock.
> https://lore.kernel.org/all/20231214112622.2412321-1-xu.yang_2@nxp.com/

Okay, but that adds another clock which is not mentioned in Documentation/
devicetree/bindings/usb/ci-hdrc-usb2.yaml at all. I guess some compatible-
specific constraints regarding number of clocks should be added.

Best regards,
Alexander

> 
> > > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > > +                     assigned-clock-parents = <&clk
> > 
> > IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > 
> > > +                     assigned-clock-rates = <133000000>;
> > > +                     fsl,usbphy = <&usbphynop1>;
> > > +                     fsl,usbmisc = <&usbmisc1 0>;
> > > +                     status = "disabled";
> > > +             };
> > > +
> > > +             usbmisc1: usbmisc@4c100200 {
> > > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
> > 
> > usbmisc",
> > 
> > > +                                     "fsl,imx6q-usbmisc";
> > 
> > This means you are compatible to fsl,imx7d-usbmisc. Which means you use
> > register MX7D_USB_OTG_PHY_STATUS in USB misc (USBNC). But i.MX93 RM Rev. 2
> > (04/2023) lacks this and other registers.
> 
> Some registers in USBNC are not shown. The internal RM has these registers.
> 
> > > +                     #index-cells = <1>;
> > > +                     reg = <0x4c100200 0x200>;
> > 
> > reg after compatible.
> 
> Okay.
> 
> > > +             };
> > > +
> > > +             usbotg2: usb@4c200000 {
> > > +                     compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb",
> > 
> > "fsl,imx27-usb";
> > 
> > > +                     reg = <0x4c200000 0x200>;
> > > +                     interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
> > > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > > +                     clock-names = "usb_ctrl_root_clk",
> > 
> > "usb_wakeup_clk";
> > 
> > The same as for usbotg1 applies here.
> 
> Okay.
> 
> > > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > > +                     assigned-clock-parents = <&clk
> > 
> > IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > 
> > > +                     assigned-clock-rates = <133000000>;
> > > +                     fsl,usbphy = <&usbphynop2>;
> > > +                     fsl,usbmisc = <&usbmisc2 0>;
> > > +                     status = "disabled";
> > > +             };
> > > +
> > > +             usbmisc2: usbmisc@4c200200 {
> > > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
> > 
> > usbmisc",
> > 
> > > +                                     "fsl,imx6q-usbmisc";
> > > +                     #index-cells = <1>;
> > > +                     reg = <0x4c200200 0x200>;
> > 
> > The same as for usbmisc1 applies here.
> 
> Okay.
> 
> > > +             };
> > > 
> > >       };
> > >  
> > >  };
> > 
> > Best regards,
> > Alexander
> > 
> > --
> > TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
> > Amtsgericht München, HRB 105018
> > Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
> > http://www.tq-/
> > group.com%2F&data=05%7C02%7Cxu.yang_2%40nxp.com%7C10ff5a35f53f4047ae1d08db
> > fca99c38%7C686ea1d3bc2b4c6fa
> > 92cd99c5c301635%7C0%7C0%7C638381577622080432%7CUnknown%7CTWFpbGZsb3d8eyJW
> > IjoiMC4wLjAwMDAiLCJQIjoiV2
> > luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VlpRPcnJTmywfS
> > amaGB1Ev8aPN2Hi596VbbRNGXF yis%3D&reserved=0


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



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

* RE: [EXT] Re: [PATCH 3/4] arm64: dts: imx93: add usb nodes
  2023-12-15  6:32         ` Alexander Stein
@ 2023-12-18  2:16           ` Xu Yang
  -1 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-18  2:16 UTC (permalink / raw)
  To: Alexander Stein, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	shawnguo, s.hauer, kernel, festevam, linux-arm-kernel
  Cc: dl-linux-imx, devicetree, linux-arm-kernel

Hi Alexander,

>
> Hi,
>
> Am Freitag, 15. Dezember 2023, 03:12:43 CET schrieb Xu Yang:
> > Hi Alexander,
> >
> > > Hi,
> > >
> > > thanks for the patch.
> > >
> > > Am Donnerstag, 14. Dezember 2023, 12:24:41 CET schrieb Xu Yang:
> > > > There are 2 USB controllers on i.MX93. Add them.
> > > >
> > > > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > > > ---
> > > >
> > > >  arch/arm64/boot/dts/freescale/imx93.dtsi | 58 ++++++++++++++++++++++++
> > > >  1 file changed, 58 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > > > b/arch/arm64/boot/dts/freescale/imx93.dtsi index
> > > > 34c0540276d1..bcf4861cfede
> > > > 100644
> > > > --- a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > > > +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
> > > > @@ -171,6 +171,20 @@ cm33: remoteproc-cm33 {
> > > >
> > > >               status = "disabled";
> > > >
> > > >       };
> > > >
> > > > +     usbphynop1: usbphynop1 {
> > > > +             #phy-cells = <0>;
> > > > +             compatible = "usb-nop-xceiv";
> > >
> > > compatible first.
> >
> > Okay.
> >
> > > > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > > > +             clock-names = "main_clk";
> > > > +     };
> > > > +
> > > > +     usbphynop2: usbphynop2 {
> > > > +             #phy-cells = <0>;
> > > > +             compatible = "usb-nop-xceiv";
> > >
> > > compatible first.
> >
> > Okay.
> >
> > > > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > > > +             clock-names = "main_clk";
> > > > +     };
> > > > +
> > > >
> > > >       soc@0 {
> > > >
> > > >               compatible = "simple-bus";
> > > >               #address-cells = <1>;
> > > >
> > > > @@ -1059,5 +1073,49 @@ ddr-pmu@4e300dc0 {
> > > >
> > > >                       reg = <0x4e300dc0 0x200>;
> > > >                       interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
> > > >
> > > >               };
> > > >
> > > > +
> > > > +             usbotg1: usb@4c100000 {
> > > > +                     compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb",
> > >
> > > "fsl,imx27-usb";
> > >
> > > > +                     reg = <0x4c100000 0x200>;
> > > > +                     interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
> > > > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > > > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > > > +                     clock-names = "usb_ctrl_root_clk",
> > >
> > > "usb_wakeup_clk";
> > >
> > > drivers/usb/chipidea/ci_hdrc_imx.c uses 3 clocks: "ipg", "ahb" and "per",
> > > see imx_get_clks(). How is this supposed to work?
> >
> > I have sent another patch to get this clock.
> >
> https://lore.kernel.org/all/20231214112622.2412321-
> 1-
> xu.yang_2%40nxp.com%2F&data=05%7C02%7Cxu.yang_2%40nxp.com%7Cbdf207787e9f448553f808dbfd379cda%7C686ea1
> d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638382187526271036%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FkQ5Cf4iYfCPj79ZnR5XxshIdkWeLOyV
> 8tmWYWnh2GU%3D&reserved=0
>
> Okay, but that adds another clock which is not mentioned in Documentation/
> devicetree/bindings/usb/ci-hdrc-usb2.yaml at all. I guess some compatible-
> specific constraints regarding number of clocks should be added.

Right, will try to add such info.

Thanks,
Xu Yang

>
> Best regards,
> Alexander
>
> >
> > > > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > > > +                     assigned-clock-parents = <&clk
> > >
> > > IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > >
> > > > +                     assigned-clock-rates = <133000000>;
> > > > +                     fsl,usbphy = <&usbphynop1>;
> > > > +                     fsl,usbmisc = <&usbmisc1 0>;
> > > > +                     status = "disabled";
> > > > +             };
> > > > +
> > > > +             usbmisc1: usbmisc@4c100200 {
> > > > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
> > >
> > > usbmisc",
> > >
> > > > +                                     "fsl,imx6q-usbmisc";
> > >
> > > This means you are compatible to fsl,imx7d-usbmisc. Which means you use
> > > register MX7D_USB_OTG_PHY_STATUS in USB misc (USBNC). But i.MX93 RM Rev. 2
> > > (04/2023) lacks this and other registers.
> >
> > Some registers in USBNC are not shown. The internal RM has these registers.
> >
> > > > +                     #index-cells = <1>;
> > > > +                     reg = <0x4c100200 0x200>;
> > >
> > > reg after compatible.
> >
> > Okay.
> >
> > > > +             };
> > > > +
> > > > +             usbotg2: usb@4c200000 {
> > > > +                     compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb",
> > >
> > > "fsl,imx27-usb";
> > >
> > > > +                     reg = <0x4c200000 0x200>;
> > > > +                     interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
> > > > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > > > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > > > +                     clock-names = "usb_ctrl_root_clk",
> > >
> > > "usb_wakeup_clk";
> > >
> > > The same as for usbotg1 applies here.
> >
> > Okay.
> >
> > > > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > > > +                     assigned-clock-parents = <&clk
> > >
> > > IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > >
> > > > +                     assigned-clock-rates = <133000000>;
> > > > +                     fsl,usbphy = <&usbphynop2>;
> > > > +                     fsl,usbmisc = <&usbmisc2 0>;
> > > > +                     status = "disabled";
> > > > +             };
> > > > +
> > > > +             usbmisc2: usbmisc@4c200200 {
> > > > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
> > >
> > > usbmisc",
> > >
> > > > +                                     "fsl,imx6q-usbmisc";
> > > > +                     #index-cells = <1>;
> > > > +                     reg = <0x4c200200 0x200>;
> > >
> > > The same as for usbmisc1 applies here.
> >
> > Okay.
> >
> > > > +             };
> > > >
> > > >       };
> > > >
> > > >  };
> > >
> > > Best regards,
> > > Alexander
> > >
> > > --
> > > TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
> > > Amtsgericht München, HRB 105018
> > > Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
> > > http://www.tq-/
> %2F&data=05%7C02%7Cxu.yang_2%40nxp.com%7Cbdf207787e9f448553f808dbfd379cda%7C686ea1d3bc2b4c6fa92cd99c5c
> 301635%7C0%7C0%7C638382187526271036%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJ
> BTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UywLIIbPswQULh%2FLuAJ7xdVbGCGSDjeOSW%2B%2B%2F
> 2M2qgM%3D&reserved=0
> > > group.com%2F&data=05%7C02%7Cxu.yang_2%40nxp.com%7C10ff5a35f53f4047ae1d08db
> > > fca99c38%7C686ea1d3bc2b4c6fa
> > > 92cd99c5c301635%7C0%7C0%7C638381577622080432%7CUnknown%7CTWFpbGZsb3d8eyJW
> > > IjoiMC4wLjAwMDAiLCJQIjoiV2
> > > luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VlpRPcnJTmywfS
> > > amaGB1Ev8aPN2Hi596VbbRNGXF yis%3D&reserved=0
>
>
> --
> TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
> Amtsgericht München, HRB 105018
> Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
> http://www.tq-/
> group.com%2F&data=05%7C02%7Cxu.yang_2%40nxp.com%7Cbdf207787e9f448553f808dbfd379cda%7C686ea1d3bc2b4c6fa
> 92cd99c5c301635%7C0%7C0%7C638382187526271036%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2
> luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BhTDWMHhsHOxFkAyQh%2FtsuGV523FFNPeKi
> FZ7b0APnc%3D&reserved=0
>


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

* RE: [EXT] Re: [PATCH 3/4] arm64: dts: imx93: add usb nodes
@ 2023-12-18  2:16           ` Xu Yang
  0 siblings, 0 replies; 38+ messages in thread
From: Xu Yang @ 2023-12-18  2:16 UTC (permalink / raw)
  To: Alexander Stein, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	shawnguo, s.hauer, kernel, festevam, linux-arm-kernel
  Cc: dl-linux-imx, devicetree, linux-arm-kernel

Hi Alexander,

>
> Hi,
>
> Am Freitag, 15. Dezember 2023, 03:12:43 CET schrieb Xu Yang:
> > Hi Alexander,
> >
> > > Hi,
> > >
> > > thanks for the patch.
> > >
> > > Am Donnerstag, 14. Dezember 2023, 12:24:41 CET schrieb Xu Yang:
> > > > There are 2 USB controllers on i.MX93. Add them.
> > > >
> > > > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > > > ---
> > > >
> > > >  arch/arm64/boot/dts/freescale/imx93.dtsi | 58 ++++++++++++++++++++++++
> > > >  1 file changed, 58 insertions(+)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > > > b/arch/arm64/boot/dts/freescale/imx93.dtsi index
> > > > 34c0540276d1..bcf4861cfede
> > > > 100644
> > > > --- a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > > > +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
> > > > @@ -171,6 +171,20 @@ cm33: remoteproc-cm33 {
> > > >
> > > >               status = "disabled";
> > > >
> > > >       };
> > > >
> > > > +     usbphynop1: usbphynop1 {
> > > > +             #phy-cells = <0>;
> > > > +             compatible = "usb-nop-xceiv";
> > >
> > > compatible first.
> >
> > Okay.
> >
> > > > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > > > +             clock-names = "main_clk";
> > > > +     };
> > > > +
> > > > +     usbphynop2: usbphynop2 {
> > > > +             #phy-cells = <0>;
> > > > +             compatible = "usb-nop-xceiv";
> > >
> > > compatible first.
> >
> > Okay.
> >
> > > > +             clocks = <&clk IMX93_CLK_USB_PHY_BURUNIN>;
> > > > +             clock-names = "main_clk";
> > > > +     };
> > > > +
> > > >
> > > >       soc@0 {
> > > >
> > > >               compatible = "simple-bus";
> > > >               #address-cells = <1>;
> > > >
> > > > @@ -1059,5 +1073,49 @@ ddr-pmu@4e300dc0 {
> > > >
> > > >                       reg = <0x4e300dc0 0x200>;
> > > >                       interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
> > > >
> > > >               };
> > > >
> > > > +
> > > > +             usbotg1: usb@4c100000 {
> > > > +                     compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb",
> > >
> > > "fsl,imx27-usb";
> > >
> > > > +                     reg = <0x4c100000 0x200>;
> > > > +                     interrupts = <GIC_SPI 187 IRQ_TYPE_LEVEL_HIGH>;
> > > > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > > > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > > > +                     clock-names = "usb_ctrl_root_clk",
> > >
> > > "usb_wakeup_clk";
> > >
> > > drivers/usb/chipidea/ci_hdrc_imx.c uses 3 clocks: "ipg", "ahb" and "per",
> > > see imx_get_clks(). How is this supposed to work?
> >
> > I have sent another patch to get this clock.
> >
> https://lore.kernel.org/all/20231214112622.2412321-
> 1-
> xu.yang_2%40nxp.com%2F&data=05%7C02%7Cxu.yang_2%40nxp.com%7Cbdf207787e9f448553f808dbfd379cda%7C686ea1
> d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638382187526271036%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FkQ5Cf4iYfCPj79ZnR5XxshIdkWeLOyV
> 8tmWYWnh2GU%3D&reserved=0
>
> Okay, but that adds another clock which is not mentioned in Documentation/
> devicetree/bindings/usb/ci-hdrc-usb2.yaml at all. I guess some compatible-
> specific constraints regarding number of clocks should be added.

Right, will try to add such info.

Thanks,
Xu Yang

>
> Best regards,
> Alexander
>
> >
> > > > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > > > +                     assigned-clock-parents = <&clk
> > >
> > > IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > >
> > > > +                     assigned-clock-rates = <133000000>;
> > > > +                     fsl,usbphy = <&usbphynop1>;
> > > > +                     fsl,usbmisc = <&usbmisc1 0>;
> > > > +                     status = "disabled";
> > > > +             };
> > > > +
> > > > +             usbmisc1: usbmisc@4c100200 {
> > > > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
> > >
> > > usbmisc",
> > >
> > > > +                                     "fsl,imx6q-usbmisc";
> > >
> > > This means you are compatible to fsl,imx7d-usbmisc. Which means you use
> > > register MX7D_USB_OTG_PHY_STATUS in USB misc (USBNC). But i.MX93 RM Rev. 2
> > > (04/2023) lacks this and other registers.
> >
> > Some registers in USBNC are not shown. The internal RM has these registers.
> >
> > > > +                     #index-cells = <1>;
> > > > +                     reg = <0x4c100200 0x200>;
> > >
> > > reg after compatible.
> >
> > Okay.
> >
> > > > +             };
> > > > +
> > > > +             usbotg2: usb@4c200000 {
> > > > +                     compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb",
> > >
> > > "fsl,imx27-usb";
> > >
> > > > +                     reg = <0x4c200000 0x200>;
> > > > +                     interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
> > > > +                     clocks = <&clk IMX93_CLK_USB_CONTROLLER_GATE>,
> > > > +                              <&clk IMX93_CLK_HSIO_32K_GATE>;
> > > > +                     clock-names = "usb_ctrl_root_clk",
> > >
> > > "usb_wakeup_clk";
> > >
> > > The same as for usbotg1 applies here.
> >
> > Okay.
> >
> > > > +                     assigned-clocks = <&clk IMX93_CLK_HSIO>;
> > > > +                     assigned-clock-parents = <&clk
> > >
> > > IMX93_CLK_SYS_PLL_PFD1_DIV2>;
> > >
> > > > +                     assigned-clock-rates = <133000000>;
> > > > +                     fsl,usbphy = <&usbphynop2>;
> > > > +                     fsl,usbmisc = <&usbmisc2 0>;
> > > > +                     status = "disabled";
> > > > +             };
> > > > +
> > > > +             usbmisc2: usbmisc@4c200200 {
> > > > +                     compatible = "fsl,imx8mm-usbmisc", "fsl,imx7d-
> > >
> > > usbmisc",
> > >
> > > > +                                     "fsl,imx6q-usbmisc";
> > > > +                     #index-cells = <1>;
> > > > +                     reg = <0x4c200200 0x200>;
> > >
> > > The same as for usbmisc1 applies here.
> >
> > Okay.
> >
> > > > +             };
> > > >
> > > >       };
> > > >
> > > >  };
> > >
> > > Best regards,
> > > Alexander
> > >
> > > --
> > > TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
> > > Amtsgericht München, HRB 105018
> > > Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
> > > http://www.tq-/
> %2F&data=05%7C02%7Cxu.yang_2%40nxp.com%7Cbdf207787e9f448553f808dbfd379cda%7C686ea1d3bc2b4c6fa92cd99c5c
> 301635%7C0%7C0%7C638382187526271036%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJ
> BTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UywLIIbPswQULh%2FLuAJ7xdVbGCGSDjeOSW%2B%2B%2F
> 2M2qgM%3D&reserved=0
> > > group.com%2F&data=05%7C02%7Cxu.yang_2%40nxp.com%7C10ff5a35f53f4047ae1d08db
> > > fca99c38%7C686ea1d3bc2b4c6fa
> > > 92cd99c5c301635%7C0%7C0%7C638381577622080432%7CUnknown%7CTWFpbGZsb3d8eyJW
> > > IjoiMC4wLjAwMDAiLCJQIjoiV2
> > > luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VlpRPcnJTmywfS
> > > amaGB1Ev8aPN2Hi596VbbRNGXF yis%3D&reserved=0
>
>
> --
> TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
> Amtsgericht München, HRB 105018
> Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
> http://www.tq-/
> group.com%2F&data=05%7C02%7Cxu.yang_2%40nxp.com%7Cbdf207787e9f448553f808dbfd379cda%7C686ea1d3bc2b4c6fa
> 92cd99c5c301635%7C0%7C0%7C638382187526271036%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2
> luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2BhTDWMHhsHOxFkAyQh%2FtsuGV523FFNPeKi
> FZ7b0APnc%3D&reserved=0
>


_______________________________________________
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] 38+ messages in thread

* 回复: [EXT] Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
  2023-12-14 13:15         ` Fabio Estevam
@ 2023-12-18 11:56           ` Jun Li
  -1 siblings, 0 replies; 38+ messages in thread
From: Jun Li @ 2023-12-18 11:56 UTC (permalink / raw)
  To: Fabio Estevam, Xu Yang
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, dl-linux-imx, devicetree, linux-arm-kernel

Hi Fabio,

> -----邮件原件-----
> 发件人: Fabio Estevam <festevam@gmail.com>
> 发送时间: 2023年12月14日 21:15
> 收件人: Xu Yang <xu.yang_2@nxp.com>
> 抄送: robh+dt@kernel.org; krzysztof.kozlowski+dt@linaro.org;
> conor+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de;
> kernel@pengutronix.de; dl-linux-imx <linux-imx@nxp.com>;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org
> 主题: Re: [EXT] Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
> 
> On Thu, Dec 14, 2023 at 9:50 AM Xu Yang <xu.yang_2@nxp.com> wrote:
> 
> > PTN5150 can work autonomously for most of the basic functions.
> > I don’t see a need to enable driver for it now.
> 
> We are talking about devicetree here, not driver.
> 
> If the PTN5150 is present on the board, then just represent it in the
> devicetree.

If we do not need its driver(either SW control or pass any information) for
PTN5150, what's the point to present it in device tree? Another reason
is current PTN5150 driver is through extcon, not type-c, so enable it can
not get benefit of type-C subsystem.

Thanks
Li Jun

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

* 回复: [EXT] Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
@ 2023-12-18 11:56           ` Jun Li
  0 siblings, 0 replies; 38+ messages in thread
From: Jun Li @ 2023-12-18 11:56 UTC (permalink / raw)
  To: Fabio Estevam, Xu Yang
  Cc: robh+dt, krzysztof.kozlowski+dt, conor+dt, shawnguo, s.hauer,
	kernel, dl-linux-imx, devicetree, linux-arm-kernel

Hi Fabio,

> -----邮件原件-----
> 发件人: Fabio Estevam <festevam@gmail.com>
> 发送时间: 2023年12月14日 21:15
> 收件人: Xu Yang <xu.yang_2@nxp.com>
> 抄送: robh+dt@kernel.org; krzysztof.kozlowski+dt@linaro.org;
> conor+dt@kernel.org; shawnguo@kernel.org; s.hauer@pengutronix.de;
> kernel@pengutronix.de; dl-linux-imx <linux-imx@nxp.com>;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org
> 主题: Re: [EXT] Re: [PATCH 2/4] arm64: dts: imx8ulp-evk: enable usb nodes
> 
> On Thu, Dec 14, 2023 at 9:50 AM Xu Yang <xu.yang_2@nxp.com> wrote:
> 
> > PTN5150 can work autonomously for most of the basic functions.
> > I don’t see a need to enable driver for it now.
> 
> We are talking about devicetree here, not driver.
> 
> If the PTN5150 is present on the board, then just represent it in the
> devicetree.

If we do not need its driver(either SW control or pass any information) for
PTN5150, what's the point to present it in device tree? Another reason
is current PTN5150 driver is through extcon, not type-c, so enable it can
not get benefit of type-C subsystem.

Thanks
Li Jun
_______________________________________________
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] 38+ messages in thread

end of thread, other threads:[~2023-12-18 11:57 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-14 11:24 [PATCH 1/4] arm64: dts: imx8ulp: add usb nodes Xu Yang
2023-12-14 11:24 ` Xu Yang
2023-12-14 11:24 ` [PATCH 2/4] arm64: dts: imx8ulp-evk: enable " Xu Yang
2023-12-14 11:24   ` Xu Yang
2023-12-14 11:30   ` Fabio Estevam
2023-12-14 11:30     ` Fabio Estevam
2023-12-14 12:44     ` [EXT] " Xu Yang
2023-12-14 12:44       ` Xu Yang
2023-12-14 11:58   ` Fabio Estevam
2023-12-14 11:58     ` Fabio Estevam
2023-12-14 12:50     ` [EXT] " Xu Yang
2023-12-14 12:50       ` Xu Yang
2023-12-14 13:15       ` Fabio Estevam
2023-12-14 13:15         ` Fabio Estevam
2023-12-15  1:56         ` Xu Yang
2023-12-15  1:56           ` Xu Yang
2023-12-18 11:56         ` 回复: " Jun Li
2023-12-18 11:56           ` Jun Li
2023-12-14 11:24 ` [PATCH 3/4] arm64: dts: imx93: add " Xu Yang
2023-12-14 11:24   ` Xu Yang
2023-12-14 13:35   ` Alexander Stein
2023-12-14 13:35     ` Alexander Stein
2023-12-15  2:12     ` [EXT] " Xu Yang
2023-12-15  2:12       ` Xu Yang
2023-12-15  6:32       ` Alexander Stein
2023-12-15  6:32         ` Alexander Stein
2023-12-18  2:16         ` Xu Yang
2023-12-18  2:16           ` Xu Yang
2023-12-14 11:24 ` [PATCH 4/4] arm64: dts: imx93-11x11-evk: enable usb and typec nodes Xu Yang
2023-12-14 11:24   ` Xu Yang
2023-12-14 11:25   ` Fabio Estevam
2023-12-14 11:25     ` Fabio Estevam
2023-12-14 12:34     ` [EXT] " Xu Yang
2023-12-14 12:34       ` Xu Yang
2023-12-14 13:40   ` Alexander Stein
2023-12-14 13:40     ` Alexander Stein
2023-12-15  2:21     ` [EXT] " Xu Yang
2023-12-15  2:21       ` Xu Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.