Message ID | 1345852300-2213-2-git-send-email-marex@denx.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sat, Aug 25, 2012 at 01:51:38AM +0200, Marek Vasut wrote: > Add the pinmux settings for USB PHY overcurrent pins. > > Signed-off-by: Marek Vasut <marex@denx.de> > Cc: Chris Ball <cjb@laptop.org> > Cc: Fabio Estevam <fabio.estevam@freescale.com> > Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> > Cc: Shawn Guo <shawn.guo@linaro.org> > --- > arch/arm/boot/dts/imx28.dtsi | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > V2: This is pulled from the M28EVK and SPS1 board files, put it into common > file. > > diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi > index b996c2d..3cba62d 100644 > --- a/arch/arm/boot/dts/imx28.dtsi > +++ b/arch/arm/boot/dts/imx28.dtsi > @@ -520,6 +520,36 @@ > fsl,voltage = <1>; > fsl,pull-up = <1>; > }; > + > + usbphy0_pins_a: usbphy0@0 { > + reg = <0>; > + fsl,pinmux-ids = < > + 0x2152 /* MX28_PAD_SSP2_SS2__USB0_OVERCURRENT */ > + >; > + fsl,drive-strength = <2>; > + fsl,voltage = <1>; > + fsl,pull-up = <0>; > + }; > + > + usbphy0_pins_b: usbphy0@1 { > + reg = <0>; This should be reg = <1>; Fixed it up and applied the patch. > + fsl,pinmux-ids = < > + 0x3061 /* MX28_PAD_AUART1_CTS__USB0_OVERCURRENT */ > + >; > + fsl,drive-strength = <2>; > + fsl,voltage = <1>; > + fsl,pull-up = <0>; > + }; > + > + usbphy1_pins_a: usbphy1@0 { > + reg = <0>; > + fsl,pinmux-ids = < > + 0x2142 /* MX28_PAD_SSP2_SS1__USB1_OVERCURRENT */ > + >; > + fsl,drive-strength = <2>; > + fsl,voltage = <1>; > + fsl,pull-up = <0>; > + }; > }; > > digctl@8001c000 { > -- > 1.7.10.4 >
Hi Marek, Peter, On Sat, Aug 25, 2012 at 01:51:38AM +0200, Marek Vasut wrote: > Add the pinmux settings for USB PHY overcurrent pins. > > Signed-off-by: Marek Vasut <marex@denx.de> > Cc: Chris Ball <cjb@laptop.org> > Cc: Fabio Estevam <fabio.estevam@freescale.com> > Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> > Cc: Shawn Guo <shawn.guo@linaro.org> > --- > arch/arm/boot/dts/imx28.dtsi | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > V2: This is pulled from the M28EVK and SPS1 board files, put it into common > file. > > diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi > index b996c2d..3cba62d 100644 > --- a/arch/arm/boot/dts/imx28.dtsi > +++ b/arch/arm/boot/dts/imx28.dtsi > @@ -520,6 +520,36 @@ > fsl,voltage = <1>; > fsl,pull-up = <1>; > }; > + > + usbphy0_pins_a: usbphy0@0 { > + reg = <0>; > + fsl,pinmux-ids = < > + 0x2152 /* MX28_PAD_SSP2_SS2__USB0_OVERCURRENT */ > + >; > + fsl,drive-strength = <2>; > + fsl,voltage = <1>; > + fsl,pull-up = <0>; > + }; > + > + usbphy0_pins_b: usbphy0@1 { > + reg = <0>; > + fsl,pinmux-ids = < > + 0x3061 /* MX28_PAD_AUART1_CTS__USB0_OVERCURRENT */ > + >; > + fsl,drive-strength = <2>; > + fsl,voltage = <1>; > + fsl,pull-up = <0>; > + }; > + > + usbphy1_pins_a: usbphy1@0 { > + reg = <0>; > + fsl,pinmux-ids = < > + 0x2142 /* MX28_PAD_SSP2_SS1__USB1_OVERCURRENT */ > + >; > + fsl,drive-strength = <2>; > + fsl,voltage = <1>; > + fsl,pull-up = <0>; > + }; > }; > > digctl@8001c000 { > -- > 1.7.10.4 @Marek: Did you test the overcurrent functionality with the MX28 and this pinmux? I currently can not trigger any overcurrent events and also don't see changes in the PORTSC register after pulling the OC pin to 3V3. Thanks, Michael
> > > > diff --git a/arch/arm/boot/dts/imx28.dtsi > b/arch/arm/boot/dts/imx28.dtsi > > index b996c2d..3cba62d 100644 > > --- a/arch/arm/boot/dts/imx28.dtsi > > +++ b/arch/arm/boot/dts/imx28.dtsi > > @@ -520,6 +520,36 @@ > > fsl,voltage = <1>; > > fsl,pull-up = <1>; > > }; > > + > > + usbphy0_pins_a: usbphy0@0 { > > + reg = <0>; > > + fsl,pinmux-ids = < > > + 0x2152 /* > MX28_PAD_SSP2_SS2__USB0_OVERCURRENT */ > > + >; > > + fsl,drive-strength = <2>; > > + fsl,voltage = <1>; > > + fsl,pull-up = <0>; > > + }; > > + > > + usbphy0_pins_b: usbphy0@1 { > > + reg = <0>; > > + fsl,pinmux-ids = < > > + 0x3061 /* > MX28_PAD_AUART1_CTS__USB0_OVERCURRENT */ > > + >; > > + fsl,drive-strength = <2>; > > + fsl,voltage = <1>; > > + fsl,pull-up = <0>; > > + }; > > + > > + usbphy1_pins_a: usbphy1@0 { > > + reg = <0>; > > + fsl,pinmux-ids = < > > + 0x2142 /* > MX28_PAD_SSP2_SS1__USB1_OVERCURRENT */ > > + >; > > + fsl,drive-strength = <2>; > > + fsl,voltage = <1>; > > + fsl,pull-up = <0>; > > + }; > > }; > > > > digctl@8001c000 { > > -- > > 1.7.10.4 > > > @Marek: Did you test the overcurrent functionality with the MX28 and this > pinmux? > > I currently can not trigger any overcurrent events and also don't > see changes in the PORTSC register after pulling the OC pin to 3V3. > I haven't checked pinmux detail, have you enabled oc and set oc's polarity (HW_DIGCTL_CTRL - 8001_C000h)? Peter
On Sat, Nov 23, 2013 at 02:48:48PM +0000, Peter Chen wrote: > > > > > > > > diff --git a/arch/arm/boot/dts/imx28.dtsi > > b/arch/arm/boot/dts/imx28.dtsi > > > index b996c2d..3cba62d 100644 > > > --- a/arch/arm/boot/dts/imx28.dtsi > > > +++ b/arch/arm/boot/dts/imx28.dtsi > > > @@ -520,6 +520,36 @@ > > > fsl,voltage = <1>; > > > fsl,pull-up = <1>; > > > }; > > > + > > > + usbphy0_pins_a: usbphy0@0 { > > > + reg = <0>; > > > + fsl,pinmux-ids = < > > > + 0x2152 /* > > MX28_PAD_SSP2_SS2__USB0_OVERCURRENT */ > > > + >; > > > + fsl,drive-strength = <2>; > > > + fsl,voltage = <1>; > > > + fsl,pull-up = <0>; > > > + }; > > > + > > > + usbphy0_pins_b: usbphy0@1 { > > > + reg = <0>; > > > + fsl,pinmux-ids = < > > > + 0x3061 /* > > MX28_PAD_AUART1_CTS__USB0_OVERCURRENT */ > > > + >; > > > + fsl,drive-strength = <2>; > > > + fsl,voltage = <1>; > > > + fsl,pull-up = <0>; > > > + }; > > > + > > > + usbphy1_pins_a: usbphy1@0 { > > > + reg = <0>; > > > + fsl,pinmux-ids = < > > > + 0x2142 /* > > MX28_PAD_SSP2_SS1__USB1_OVERCURRENT */ > > > + >; > > > + fsl,drive-strength = <2>; > > > + fsl,voltage = <1>; > > > + fsl,pull-up = <0>; > > > + }; > > > }; > > > > > > digctl@8001c000 { > > > -- > > > 1.7.10.4 > > > > > > @Marek: Did you test the overcurrent functionality with the MX28 and this > > pinmux? > > > > I currently can not trigger any overcurrent events and also don't > > see changes in the PORTSC register after pulling the OC pin to 3V3. > > > > I haven't checked pinmux detail, have you enabled oc and > set oc's polarity (HW_DIGCTL_CTRL - 8001_C000h)? No, I was not aware those DIG*DEEP*CTL bits exist. :) Thank you Peter!
Hello Michael, > Hi Marek, Peter, > > On Sat, Aug 25, 2012 at 01:51:38AM +0200, Marek Vasut wrote: > > Add the pinmux settings for USB PHY overcurrent pins. > > > > Signed-off-by: Marek Vasut <marex@denx.de> > > Cc: Chris Ball <cjb@laptop.org> > > Cc: Fabio Estevam <fabio.estevam@freescale.com> > > Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> > > Cc: Shawn Guo <shawn.guo@linaro.org> > > --- > > > > arch/arm/boot/dts/imx28.dtsi | 30 ++++++++++++++++++++++++++++++ > > 1 file changed, 30 insertions(+) > > > > V2: This is pulled from the M28EVK and SPS1 board files, put it into > > common > > > > file. > > > > diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi > > index b996c2d..3cba62d 100644 > > --- a/arch/arm/boot/dts/imx28.dtsi > > +++ b/arch/arm/boot/dts/imx28.dtsi > > @@ -520,6 +520,36 @@ > > > > fsl,voltage = <1>; > > fsl,pull-up = <1>; > > > > }; > > > > + > > + usbphy0_pins_a: usbphy0@0 { > > + reg = <0>; > > + fsl,pinmux-ids = < > > + 0x2152 /* MX28_PAD_SSP2_SS2__USB0_OVERCURRENT */ > > + >; > > + fsl,drive-strength = <2>; > > + fsl,voltage = <1>; > > + fsl,pull-up = <0>; > > + }; > > + > > + usbphy0_pins_b: usbphy0@1 { > > + reg = <0>; > > + fsl,pinmux-ids = < > > + 0x3061 /* MX28_PAD_AUART1_CTS__USB0_OVERCURRENT */ > > + >; > > + fsl,drive-strength = <2>; > > + fsl,voltage = <1>; > > + fsl,pull-up = <0>; > > + }; > > + > > + usbphy1_pins_a: usbphy1@0 { > > + reg = <0>; > > + fsl,pinmux-ids = < > > + 0x2142 /* MX28_PAD_SSP2_SS1__USB1_OVERCURRENT */ > > + >; > > + fsl,drive-strength = <2>; > > + fsl,voltage = <1>; > > + fsl,pull-up = <0>; > > + }; > > > > }; > > > > digctl@8001c000 { > > @Marek: Did you test the overcurrent functionality with the MX28 and this > pinmux? > > I currently can not trigger any overcurrent events and also don't > see changes in the PORTSC register after pulling the OC pin to 3V3. Sorry for the late reply, I see Peter already replied. Do you see the changes if you configure the pin as a GPIO at least ? Best regards,
Hi Marek, Peter, On Mon, Nov 25, 2013 at 12:58:32AM +0100, Marek Vasut wrote: > Hello Michael, > > > Hi Marek, Peter, > > > > On Sat, Aug 25, 2012 at 01:51:38AM +0200, Marek Vasut wrote: > > > Add the pinmux settings for USB PHY overcurrent pins. > > > > > > Signed-off-by: Marek Vasut <marex@denx.de> > > > Cc: Chris Ball <cjb@laptop.org> > > > Cc: Fabio Estevam <fabio.estevam@freescale.com> > > > Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> > > > Cc: Shawn Guo <shawn.guo@linaro.org> > > > --- > > > > > > arch/arm/boot/dts/imx28.dtsi | 30 ++++++++++++++++++++++++++++++ > > > 1 file changed, 30 insertions(+) > > > > > > V2: This is pulled from the M28EVK and SPS1 board files, put it into > > > common > > > > > > file. > > > > > > diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi > > > index b996c2d..3cba62d 100644 > > > --- a/arch/arm/boot/dts/imx28.dtsi > > > +++ b/arch/arm/boot/dts/imx28.dtsi > > > @@ -520,6 +520,36 @@ > > > > > > fsl,voltage = <1>; > > > fsl,pull-up = <1>; > > > > > > }; > > > > > > + > > > + usbphy0_pins_a: usbphy0@0 { > > > + reg = <0>; > > > + fsl,pinmux-ids = < > > > + 0x2152 /* > MX28_PAD_SSP2_SS2__USB0_OVERCURRENT */ > > > + >; > > > + fsl,drive-strength = <2>; > > > + fsl,voltage = <1>; > > > + fsl,pull-up = <0>; > > > + }; > > > + > > > + usbphy0_pins_b: usbphy0@1 { > > > + reg = <0>; > > > + fsl,pinmux-ids = < > > > + 0x3061 /* > MX28_PAD_AUART1_CTS__USB0_OVERCURRENT */ > > > + >; > > > + fsl,drive-strength = <2>; > > > + fsl,voltage = <1>; > > > + fsl,pull-up = <0>; > > > + }; > > > + > > > + usbphy1_pins_a: usbphy1@0 { > > > + reg = <0>; > > > + fsl,pinmux-ids = < > > > + 0x2142 /* > MX28_PAD_SSP2_SS1__USB1_OVERCURRENT */ > > > + >; > > > + fsl,drive-strength = <2>; > > > + fsl,voltage = <1>; > > > + fsl,pull-up = <0>; > > > + }; > > > > > > }; > > > > > > digctl@8001c000 { > > > > @Marek: Did you test the overcurrent functionality with the MX28 and this > > pinmux? > > > > I currently can not trigger any overcurrent events and also don't > > see changes in the PORTSC register after pulling the OC pin to 3V3. > > Sorry for the late reply, I see Peter already replied. Do you see the changes if > you configure the pin as a GPIO at least ? The GPIO is working for this pin. But also the DIGCTL register bits helped here. Now the OC event triggers if the pin gets pulled to 3V3. I am currently looking for a good place to enable the DIGCTL bits. I suggest to enable them per default. As we don't have USBMISC registers in MX28, the bits should be toggled in ci_hdrc_imx.c if the of property "disable-overcurrent" is not found. I will use the syscon interface to reach them with the regmap interface. Any objections? Regards, Michael
> > The GPIO is working for this pin. But also the DIGCTL register bits > helped here. Now the OC event triggers if the pin gets pulled to 3V3. > > I am currently looking for a good place to enable the DIGCTL bits. > I suggest to enable them per default. As we don't have USBMISC registers > in MX28, the bits should be toggled in ci_hdrc_imx.c if the of property > "disable-overcurrent" is not found. I will use the syscon interface to > reach them with the regmap interface. > Hi Michael, usbmisc register doesn't stand for the register needs to be in usb controller. Any registers which are related to USB function can be considered as usbmisc registers. You will see FSL-style SoC, the over-current or other related setting are at controller base + 0x800 (0x600), but Sigmatel-style SoC (mx28/mx23), the usb register are not at controller register region. My suggestion is: create usbmisc node for mx28, and put oc setting at there, it can keep ci_hdrc_imx.c clean. Besides, you may need two dts user setting for oc enable and oc polarity. Peter
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi index b996c2d..3cba62d 100644 --- a/arch/arm/boot/dts/imx28.dtsi +++ b/arch/arm/boot/dts/imx28.dtsi @@ -520,6 +520,36 @@ fsl,voltage = <1>; fsl,pull-up = <1>; }; + + usbphy0_pins_a: usbphy0@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x2152 /* MX28_PAD_SSP2_SS2__USB0_OVERCURRENT */ + >; + fsl,drive-strength = <2>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + + usbphy0_pins_b: usbphy0@1 { + reg = <0>; + fsl,pinmux-ids = < + 0x3061 /* MX28_PAD_AUART1_CTS__USB0_OVERCURRENT */ + >; + fsl,drive-strength = <2>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; + + usbphy1_pins_a: usbphy1@0 { + reg = <0>; + fsl,pinmux-ids = < + 0x2142 /* MX28_PAD_SSP2_SS1__USB1_OVERCURRENT */ + >; + fsl,drive-strength = <2>; + fsl,voltage = <1>; + fsl,pull-up = <0>; + }; }; digctl@8001c000 {
Add the pinmux settings for USB PHY overcurrent pins. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chris Ball <cjb@laptop.org> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Shawn Guo <shawn.guo@linaro.org> --- arch/arm/boot/dts/imx28.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) V2: This is pulled from the M28EVK and SPS1 board files, put it into common file.