From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ene Alexandru Subject: Re: Re: PATH[1/3] ARM: axp20x_usb_power.c add device tree configuration options for REG 30H: VBUS-IPSOUT Date: Tue, 17 May 2016 21:02:08 -0700 (PDT) Message-ID: References: <0f58d2b3-f3d3-45a3-a307-e54df26c1ab1@googlegroups.com> <671c7471-b63a-40cc-989f-6b20f00571ee@googlegroups.com> <35a39bdc-1304-403d-b56a-a45bb8debf5e@googlegroups.com> Reply-To: ene.alexandru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_6218_734589929.1463544128428" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-Reply-To: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: linux-sunxi Cc: ene.alexandru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org, wens-jdAy2FN1RRM@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org List-Id: devicetree@vger.kernel.org ------=_Part_6218_734589929.1463544128428 Content-Type: multipart/alternative; boundary="----=_Part_6219_2034665531.1463544128428" ------=_Part_6219_2034665531.1463544128428 Content-Type: text/plain; charset=UTF-8 hello thanks for your feedback. i will apply those corrections. "What does this actually do? Is this the lower limit on the voltage? Is this the voltage it'll try to maintain? " - yes, vhold-set is the lowest input value that AXP20X will accept on V_USB. If the voltage, under load, drops under that configured value then the V_USB power path is disconnected. "Again, what does this actually do? It looks like the current limit? " - yes, ibus-limit is the maximum current that the system can draw from the V_USB line if the vhold condition is satisfied. i should add these details in axp20x_usb_power.txt On Wednesday, May 18, 2016 at 2:21:25 AM UTC+3, Julian Calaby wrote: > > Hi Ene, > > On Wed, May 18, 2016 at 3:50 AM, Ene Alexandru > wrote: > > the documentation is updated to describe how to convert actual values to > the > > provided parameters > > > > --- > > diff -uprN -X linux-sunxi-original/Documentation/dontdiff > > > linux-sunxi-original/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt > > > > linux-sunxi/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt > > > --- > > > linux-sunxi-original/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt > > > 2016-05-09 16:48:46.000000000 +0200 > > +++ > > > linux-sunxi/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt > > > 2016-05-11 13:05:58.995873267 +0200 > > @@ -5,6 +5,26 @@ Required Properties: > > This node is a subnode of the axp20x PMIC. > > +The following 3 parameters are configurable from the device-tree: > > + - vhold-enable > > + - bit 6 of register REG 30H: VBUS-IPSOUT Power > Path > > Management > > I don't think it's necessary to go into this much detail here. > > > + - available values are: > > + - 0x00 : VBUS VHOLD voltage limiting > > control disabled > > + - 0x01 : VBUS VHOLD voltage limiting > > control enabled > > If these are the only options available, why not make this property a > boolean? > > > + - vhold-set > > + - bits <5-3> of register REG 30H: VBUS-IPSOUT > Power > > Path Management > > + - available values are from 0x00 to 0x07 > > + - VHOLD = [4000000 + ( vhold-set & 0x07 ) * > 100000] > > in uV > > What does this actually do? Is this the lower limit on the voltage? Is > this the voltage it'll try to maintain? > > > + - ibus-limit > > + - bits <1-0> of register REG 30H: VBUS-IPSOUT > Power > > Path Management > > + - available values are : > > + - 0x00 : 900000uA > > + - 0x01 : 500000uA > > + - 0x02 : 100000uA > > + - 0x03 : unlimited > > Again, what does this actually do? It looks like the current limit? > > > + > > + > > Extra blank line. > > > Example: > > axp209: pmic@34 { > > @@ -30,5 +50,8 @@ axp209: pmic@34 { > > usb-power-supply: usb-power-supply { > > compatible = "x-powers,axp202-usb-power-supply"; > > + vhold-enable = <0x01>; > > + vhold-set = <0x04>; > > + ibus-limit = <0x01>; > > }; > > }; > > Thanks, > > -- > Julian Calaby > > Email: julian...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > Profile: http://www.google.com/profiles/julian.calaby/ > -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. ------=_Part_6219_2034665531.1463544128428 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
hello

thanks for your feedback. i will = apply those corrections.=C2=A0

"What does thi= s actually do? Is this the lower limit on the voltage? Is this the voltage = it'll try to maintain?=C2=A0" =C2=A0- yes, vhold-set is the lowest= input value that AXP20X will accept on V_USB. If the voltage, under load, = drops under that configured value then the V_USB power path is disconnected= .=C2=A0

"Again, what does this actually do? I= t looks like the current limit?=C2=A0" - yes, ibus-limit is the maximu= m current that the system can draw from the V_USB line if =C2=A0the vhold c= ondition is satisfied.

i should add these details = in=C2=A0axp20x_usb_power.txt=C2=A0

On Wednesday, M= ay 18, 2016 at 2:21:25 AM UTC+3, Julian Calaby wrote:
Hi Ene,

On Wed, May 18, 2016 at 3:50 AM, Ene Alexandru <ene.al...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org= > wrote:
> the documentation is updated to describe how to convert actual val= ues to the
> provided parameters
>
> ---
> diff -uprN -X linux-sunxi-original/Documentation/dontdiff
> linux-sunxi-original/Documentation/devicetree/bindings/p= ower_supply/axp20x_usb_power.txt
> linux-sunxi/Documentation/devicetree/bindings/power_supp= ly/axp20x_usb_power.txt
> ---
> linux-sunxi-original/Documentation/devicetree/bindings/p= ower_supply/axp20x_usb_power.txt
> 2016-05-09 16:48:46.000000000 +0200
> +++
> linux-sunxi/Documentation/devicetree/bindings/power_supp= ly/axp20x_usb_power.txt
> 2016-05-11 13:05:58.995873267 +0200
> @@ -5,6 +5,26 @@ Required Properties:
> =C2=A0This node is a subnode of the axp20x PMIC.
> +The following 3 parameters are configurable from the device-tree:
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- vhold-enable
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0- bit 6 of register REG 30H: VBUS-IPSOUT Power Path
> Management

I don't think it's necessary to go into this much detail here.

> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0- available values are:
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- 0x00 : VBUS VHOLD = voltage limiting
> control disabled
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- 0x01 : VBUS VHOLD = voltage limiting
> control enabled

If these are the only options available, why not make this property a b= oolean?

> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- vhold-set
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0- bits <5-3> of register REG 30H: VBUS-IPSOUT Power
> Path Management
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0- available values are from 0x00 to 0x07
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0- VHOLD =3D [4000000 + ( vhold-set & 0x07 ) * 100000]
> in uV

What does this actually do? Is this the lower limit on the voltage? Is
this the voltage it'll try to maintain?

> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- ibus-limit
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0- bits <1-0> of register REG 30H: VBUS-IPSOUT Power
> Path Management
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0- available values are :
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- 0x00 : 900000uA
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- 0x01 : 500000uA
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- 0x02 : 100000uA
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- 0x03 : unlimited

Again, what does this actually do? It looks like the current limit?

> +
> +

Extra blank line.

> Example:
> =C2=A0axp209: pmic@34 {
> @@ -30,5 +50,8 @@ axp209: pmic@34 {
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 usb-power-supply: usb-po= wer-supply {
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0compatible =3D "x-powers,axp202-usb-power-supply= ";
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0vhold-enable =3D <0x01>;
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0vhold-set =3D <0x04>;
> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0ibus-limit =3D <0x01>;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0};
> };

Thanks,

--=20
Julian Calaby

Email: julian...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Profile: ht= tp://www.google.com/profiles/julian.calaby/

--
You received this message because you are subscribed to the Google Groups &= quot;linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to linux-s= unxi+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_6219_2034665531.1463544128428-- ------=_Part_6218_734589929.1463544128428--