diff mbox series

[v2,2/5] arm64: dts: imx8ulp-evk: enable usb nodes and add ptn5150 nodes

Message ID 20231218085456.3962720-2-xu.yang_2@nxp.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/5] arm64: dts: imx8ulp: add usb nodes | expand

Commit Message

Xu Yang Dec. 18, 2023, 8:54 a.m. UTC
Enable 2 USB nodes and add 2 PTN5150 nodes on i.MX8ULP evk board.

Signed-off-by: Xu Yang <xu.yang_2@nxp.com>

---
Changes in v2:
 - fix format as suggusted by Fabio
 - add PTN5150 nodes
---
 arch/arm64/boot/dts/freescale/imx8ulp-evk.dts | 84 +++++++++++++++++++
 1 file changed, 84 insertions(+)

Comments

Fabio Estevam Dec. 18, 2023, 10:16 a.m. UTC | #1
On Mon, Dec 18, 2023 at 5:49 AM Xu Yang <xu.yang_2@nxp.com> wrote:

> +
> +       ptn5150_1: typec@1d {
> +               compatible = "nxp,ptn5150";
> +               reg = <0x1d>;
> +               int-gpios = <&gpiof 3 IRQ_TYPE_EDGE_FALLING>;
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&pinctrl_typec1>;
> +               status = "disabled";

Why disabled?

No connector and no port properties. Please run dt-schema check
against linux-next.

> +       };
> +
> +       ptn5150_2: typec@3d {
> +               compatible = "nxp,ptn5150";
> +               reg = <0x3d>;
> +               int-gpios = <&gpiof 5 IRQ_TYPE_EDGE_FALLING>;
> +                       pinctrl-names = "default";
> +               pinctrl-0 = <&pinctrl_typec2>;
> +               status = "disabled";

Same here.
Xu Yang Dec. 19, 2023, 7:35 a.m. UTC | #2
Hi Fabio,

> 
> On Mon, Dec 18, 2023 at 5:49 AM Xu Yang <xu.yang_2@nxp.com> wrote:
> 
> > +
> > +       ptn5150_1: typec@1d {
> > +               compatible = "nxp,ptn5150";
> > +               reg = <0x1d>;
> > +               int-gpios = <&gpiof 3 IRQ_TYPE_EDGE_FALLING>;
> > +               pinctrl-names = "default";
> > +               pinctrl-0 = <&pinctrl_typec1>;
> > +               status = "disabled";
> 
> Why disabled?

As we talked before,  I just present these nodes here since the
i.MX8ULP board does have these chips. And I think the above 
information is enough to let people know and use it if they
really want. In most of the cases, it's not needed. 

> 
> No connector and no port properties. Please run dt-schema check
> against linux-next.

The ptn5150 driver doesn't have any relation with typec subsystem. As
Jun said, it uses extcon. 

Also I have run dt-schema check, no warnings.

Thanks,
Xu Yang
	
> 
> > +       };
> > +
> > +       ptn5150_2: typec@3d {
> > +               compatible = "nxp,ptn5150";
> > +               reg = <0x3d>;
> > +               int-gpios = <&gpiof 5 IRQ_TYPE_EDGE_FALLING>;
> > +                       pinctrl-names = "default";
> > +               pinctrl-0 = <&pinctrl_typec2>;
> > +               status = "disabled";
> 
> Same here.
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
index 69dd8e31027c..bf418af31039 100644
--- a/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8ulp-evk.dts
@@ -133,6 +133,64 @@  pcal6408: gpio@21 {
 		gpio-controller;
 		#gpio-cells = <2>;
 	};
+
+	ptn5150_1: typec@1d {
+		compatible = "nxp,ptn5150";
+		reg = <0x1d>;
+		int-gpios = <&gpiof 3 IRQ_TYPE_EDGE_FALLING>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_typec1>;
+		status = "disabled";
+	};
+
+	ptn5150_2: typec@3d {
+		compatible = "nxp,ptn5150";
+		reg = <0x3d>;
+		int-gpios = <&gpiof 5 IRQ_TYPE_EDGE_FALLING>;
+			pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_typec2>;
+		status = "disabled";
+	};
+};
+
+&usbotg1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usb1>;
+	dr_mode = "otg";
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	over-current-active-low;
+	status = "okay";
+};
+
+&usbphy1 {
+	fsl,tx-d-cal = <110>;
+	status = "okay";
+};
+
+&usbmisc1 {
+	status = "okay";
+};
+
+&usbotg2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_usb2>;
+	dr_mode = "otg";
+	hnp-disable;
+	srp-disable;
+	adp-disable;
+	over-current-active-low;
+	status = "okay";
+};
+
+&usbphy2 {
+	fsl,tx-d-cal = <110>;
+	status = "okay";
+};
+
+&usbmisc2 {
+	status = "okay";
 };
 
 &usdhc0 {
@@ -224,6 +282,32 @@  MX8ULP_PAD_PTE13__LPI2C7_SDA	0x20
 		>;
 	};
 
+	pinctrl_typec1: typec1grp {
+		fsl,pins = <
+			MX8ULP_PAD_PTF3__PTF3           0x3
+		>;
+	};
+
+	pinctrl_typec2: typec2grp {
+		fsl,pins = <
+			MX8ULP_PAD_PTF5__PTF5           0x3
+		>;
+	};
+
+	pinctrl_usb1: usb1grp {
+		fsl,pins = <
+			MX8ULP_PAD_PTF2__USB0_ID	0x10003
+			MX8ULP_PAD_PTF4__USB0_OC	0x10003
+		>;
+	};
+
+	pinctrl_usb2: 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