From 28ca2abf63d4bafa37fc96ed1f339e9eaf480919 Mon Sep 17 00:00:00 2001 From: Adrian Alonso Date: Tue, 16 Mar 2021 17:20:00 -0500 Subject: MLK-25347-6: dts: arm: imx8mn ab2: enable usbotg1 support Enable usbotg1 on host mode for serial download support Signed-off-by: Adrian Alonso Reviewed-by: Ye Li (cherry picked from commit e055f5b5a36c71060e17bcd8e9eaefc1198b51c3) --- arch/arm/dts/imx8mn-ab2-u-boot.dtsi | 11 ++++++++++ arch/arm/dts/imx8mn-ab2.dts | 43 +++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/arch/arm/dts/imx8mn-ab2-u-boot.dtsi b/arch/arm/dts/imx8mn-ab2-u-boot.dtsi index d4c5e43477..8b5115b2fb 100644 --- a/arch/arm/dts/imx8mn-ab2-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-ab2-u-boot.dtsi @@ -4,12 +4,23 @@ */ / { + aliases { + usbgadget0 = &usbg1; + }; + firmware { optee { compatible = "linaro,optee-tz"; method = "smc"; }; }; + + usbg1: usbg1 { + compatible = "fsl,imx27-usb-gadget"; + dr_mode = "peripheral"; + chipidea,usb = <&usbotg1>; + status = "okay"; + }; }; &{/soc@0} { diff --git a/arch/arm/dts/imx8mn-ab2.dts b/arch/arm/dts/imx8mn-ab2.dts index 9685eeb3d5..119f90b02d 100644 --- a/arch/arm/dts/imx8mn-ab2.dts +++ b/arch/arm/dts/imx8mn-ab2.dts @@ -5,6 +5,7 @@ /dts-v1/; +#include #include "imx8mn.dtsi" / { @@ -418,6 +419,31 @@ scl-gpios = <&gpio5 16 GPIO_ACTIVE_HIGH>; sda-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>; status = "okay"; + + ptn5150: tcpc@1d { + compatible = "nxp,ptn5150"; + reg = <0x1d>; + 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 = ; + sink-pdos = ; + op-sink-microwatt = <15000000>; + self-powered; + }; + }; }; &i2c3 { @@ -498,6 +524,23 @@ status = "okay"; }; +&usbotg1 { + picophy,pre-emp-curr-control = <3>; + picophy,dc-vol-level-adjust = <7>; + dr_mode = "host"; + hnp-disable; + srp-disable; + adp-disable; + usb-role-switch; + status = "okay"; + + port { + usb1_drd_sw: endpoint { + remote-endpoint = <&typec1_dr_sw>; + }; + }; +}; + &wdog1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_wdog>; -- cgit v1.2.3