Message ID | 20231214112442.2412079-4-xu.yang_2@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/4] arm64: dts: imx8ulp: add usb nodes | expand |
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
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
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
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 > >
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
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(+)