Commit 9ae303f9 authored by Lucas Stach's avatar Lucas Stach Committed by Shawn Guo

arm64: dts: rdu3: add UCS1002 charge controller node

Add the charge controller node. With the controller driver loaded
the VBUS of the user USB socket is controlled exclusively via i2c
with the GPIO controls ignored, so vbus-supply for the user USB
port must be linked to the charge controller.

Hog the previously used GPIO control to unconditionally enable
VBUS until the driver is loaded.
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 74bd5951
......@@ -68,18 +68,6 @@ reg_3p3_main: regulator-3p3-main {
regulator-always-on;
};
reg_5p0_user_usb: regulator-5p0-user-usb {
compatible = "regulator-fixed";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_reg_user_usb>;
vin-supply = <&reg_5p0_main>;
regulator-name = "5V_USER_USB";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio3 12 GPIO_ACTIVE_LOW>;
startup-delay-us = <1000>;
};
reg_usdhc2_vmmc: regulator-vsd-3v3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_reg_usdhc2>;
......@@ -244,6 +232,13 @@ usb-mode1 {
line-name = "usb-mode1";
};
usb-pwr {
gpio-hog;
gpios = <12 GPIO_ACTIVE_LOW>;
output-high;
line-name = "usb-pwr-ctrl-en-n";
};
usb-mode2 {
gpio-hog;
gpios = <13 GPIO_ACTIVE_HIGH>;
......@@ -257,6 +252,17 @@ &i2c1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1>;
status = "okay";
ucs1002: charger@32 {
compatible = "microchip,ucs1002";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ucs1002>;
reg = <0x32>;
interrupt-parent = <&gpio3>;
interrupts = <17 IRQ_TYPE_EDGE_BOTH>,
<18 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "a_det", "alert";
};
};
&i2c2 {
......@@ -428,7 +434,7 @@ eeprom@a4 {
};
&usb3_phy0 {
vbus-supply = <&reg_5p0_user_usb>;
vbus-supply = <&ucs1002>;
status = "okay";
};
......@@ -532,6 +538,7 @@ pinctrl_gpio3_hog: gpio3hoggrp {
fsl,pins = <
MX8MQ_IOMUXC_NAND_DATA04_GPIO3_IO10 0x6
MX8MQ_IOMUXC_NAND_DATA05_GPIO3_IO11 0x6
MX8MQ_IOMUXC_NAND_DATA06_GPIO3_IO12 0x6
MX8MQ_IOMUXC_NAND_DATA07_GPIO3_IO13 0x6
>;
};
......@@ -597,12 +604,6 @@ MX8MQ_IOMUXC_SD2_RESET_B_GPIO2_IO19 0x41
>;
};
pinctrl_reg_user_usb: reguserusbgrp {
fsl,pins = <
MX8MQ_IOMUXC_NAND_DATA06_GPIO3_IO12 0x6
>;
};
pinctrl_switch_irq: switchgrp {
fsl,pins = <
MX8MQ_IOMUXC_GPIO1_IO15_GPIO1_IO15 0x41
......@@ -630,6 +631,13 @@ MX8MQ_IOMUXC_UART2_TXD_UART2_DCE_TX 0x49
>;
};
pinctrl_ucs1002: ucs1002grp {
fsl,pins = <
MX8MQ_IOMUXC_NAND_WE_B_GPIO3_IO17 0x41
MX8MQ_IOMUXC_NAND_WP_B_GPIO3_IO18 0x41
>;
};
pinctrl_usbhub: usbhubgrp {
fsl,pins = <
MX8MQ_IOMUXC_SAI5_MCLK_GPIO3_IO25 0x41
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment