• Amelie Delaunay's avatar
    ARM: dts: stm32: add STUSB1600 Type-C using I2C4 on stm32mp15xx-dkx · 83686162
    Amelie Delaunay authored
    This patch adds support for STUSB1600 USB Type-C port controller, used on
    I2C4 on stm32mp15xx-dkx.
    The default configuration on this board, on Type-C connector, is:
    - Dual Power Role (DRP), so set power-role to "dual";
    - Vbus limited to 500mA, so set typec-power-opmode to "default" (it means
      500mA in USB 2.0).
    typec-power-opmode is used to reconfigure the STUSB1600 advertising of
    current capability when its NVM is not in line with the board layout.
    On stm32mp15xx-dkx, Vbus power source of STUSB1600 is 5V_VIN. So power
    operation mode depends on the power supply used. To avoid any power
    issues, it is better to limit Vbus to 500mA on this board.
    ALERT# is the interrupt pin of STUSB1600. It needs an external pull-up, and
    signal is active low.
    
    USB OTG controller ID and Vbus signals are not connected on stm32mp15xx-dkx
    boards, so disconnection are not detected.
    Without DWC2 usb-role-switch:
    - if you unplug the USB cable from the Type-C port, you have to manually
    disconnect the USB gadget:
    echo disconnect > /sys/devices/platform/soc/49000000.usb-otg/udc/49000000.usb-otg/soft_connect
    - Then you can plug the USB cable again in the Type-C port, and manually
    reconnect the USB gadget:
    echo connect > /sys/devices/platform/soc/49000000.usb-otg/udc/49000000.usb-otg/soft_connect
    With DWC2 usb-role-switch, USB gadget is dynamically disconnected or connected.
    Signed-off-by: default avatarAmelie Delaunay <amelie.delaunay@st.com>
    Signed-off-by: default avatarAlexandre Torgue <alexandre.torgue@st.com>
    83686162
stm32mp15xx-dkx.dtsi 14.2 KB