Re: [PATCH 1/3] ARM: dts: imx6: rdu2: Add node for UCS1002 USB charger chip

From: Lucas Stach
Date: Wed May 22 2019 - 05:40:13 EST


Hi Andrey,

Am Mittwoch, den 22.05.2019, 00:12 -0700 schrieb Andrey Smirnov:
> Add node for UCS1002 USB charger chip connected to front panel USB and
> replace "regulator-fixed" previously used to control VBUS.

I've had a similar version of this patch, but also added GPIO hogs for
the UCS1002 configuration pins, so the device is put into the expected
state even before driver load. Maybe something worth to consider?

Regards,
Lucas

> Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
> > Cc: Shawn Guo <shawnguo@xxxxxxxxxx>
> > Cc: Chris Healy <cphealy@xxxxxxxxx>
> > Cc: Fabio Estevam <festevam@xxxxxxxxx>
> > Cc: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
> Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> ---
> Âarch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi | 35 ++++++++++++-------------
> Â1 file changed, 17 insertions(+), 18 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
> index 93be00a60c88..977d923e35df 100644
> --- a/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi
> @@ -60,18 +60,6 @@
> > Â regulator-always-on;
> > Â };
> Â
> > - reg_5p0v_user_usb: regulator-5p0v-user-usb {
> > - compatible = "regulator-fixed";
> > - pinctrl-names = "default";
> > - pinctrl-0 = <&pinctrl_reg_user_usb>;
> > - vin-supply = <&reg_5p0v_main>;
> > - regulator-name = "5V_USER_USB";
> > - regulator-min-microvolt = <5000000>;
> > - regulator-max-microvolt = <5000000>;
> > - gpio = <&gpio3 22 GPIO_ACTIVE_LOW>;
> > - startup-delay-us = <1000>;
> > - };
> -
> > Â reg_3p3v_pmic: regulator-3p3v-pmic {
> > Â compatible = "regulator-fixed";
> > Â vin-supply = <&reg_12p0v>;
> @@ -590,6 +578,16 @@
> > Â status = "disabled";
> > Â };
> Â
> > > + reg_5p0v_user_usb: charger@32 {
> > + compatible = "microchip,ucs1002";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&pinctrl_ucs1002_pins>;
> > + reg = <0x32>;
> > + interrupts-extended = <&gpio5 2 IRQ_TYPE_EDGE_BOTH>,
> > + ÂÂÂÂÂÂ<&gpio3 21 IRQ_TYPE_EDGE_BOTH>;
> > + interrupt-names = "a_det", "alert";
> > + };
> +
> > > Â hpa1: amp@60 {
> > Â compatible = "ti,tpa6130a2";
> > Â pinctrl-names = "default";
> @@ -982,12 +980,6 @@
> > Â >;
> > Â };
> Â
> > - pinctrl_reg_user_usb: usbotggrp {
> > - fsl,pins = <
> > > - MX6QDL_PAD_EIM_D22__GPIO3_IO22 0x40000038
> > - >;
> > - };
> -
> > Â pinctrl_rmii_phy_irq: phygrp {
> > Â fsl,pins = <
> > > Â MX6QDL_PAD_EIM_D30__GPIO3_IO30 0x40010000
> @@ -1047,6 +1039,13 @@
> > Â >;
> > Â };
> Â
> > + pinctrl_ucs1002_pins: ucs1002grp {
> > + fsl,pins = <
> > > + MX6QDL_PAD_EIM_A25__GPIO5_IO02ÂÂ 0x1b0b0
> > > + MX6QDL_PAD_EIM_D21__GPIO3_IO21ÂÂ 0x1b0b0
> > + >;
> > + };
> +
> > Â pinctrl_usdhc2: usdhc2grp {
> > Â fsl,pins = <
> > > Â MX6QDL_PAD_SD2_CMD__SD2_CMD 0x10059