From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ene Alexandru Subject: Re: PATH[1/3] ARM: axp20x_usb_power.c add device tree configuration options for REG 30H: VBUS-IPSOUT Date: Tue, 17 May 2016 10:50:42 -0700 (PDT) Message-ID: <35a39bdc-1304-403d-b56a-a45bb8debf5e@googlegroups.com> References: <0f58d2b3-f3d3-45a3-a307-e54df26c1ab1@googlegroups.com> <671c7471-b63a-40cc-989f-6b20f00571ee@googlegroups.com> Reply-To: ene.alexandru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_725_950679940.1463507442454" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-Reply-To: <671c7471-b63a-40cc-989f-6b20f00571ee-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: linux-sunxi Cc: 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_725_950679940.1463507442454 Content-Type: multipart/alternative; boundary="----=_Part_726_2042748720.1463507442454" ------=_Part_726_2042748720.1463507442454 Content-Type: text/plain; charset=UTF-8 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 + - available values are: + - 0x00 : VBUS VHOLD voltage limiting control disabled + - 0x01 : VBUS VHOLD voltage limiting control enabled + - 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 + + - 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 + + 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>; }; }; --- -- 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_726_2042748720.1463507442454 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
the documentation is updated to describe how to convert ac= tual values to the provided parameters

---
diff -uprN -X linux-sunxi-original/Documentation/dontdiff linux-sunxi-ori= ginal/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt l= inux-sunxi/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.= txt
--- linux-sunxi-original/Documentation/devicetree/bindings/po= wer_supply/axp20x_usb_power.txt =C2=A0 =C2=A0 =C2=A0 =C2=A02016-05-09 16:48= :46.000000000 +0200
+++ linux-sunxi/Documentation/devicetree/bind= ings/power_supply/axp20x_usb_power.txt =C2=A0 =C2=A02016-05-11 13:05:58.995= 873267 +0200
@@ -5,6 +5,26 @@ Required Properties:
=C2= =A0This node is a subnode of the axp20x PMIC.
+The following 3 pa= rameters 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
+ =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
=
+ =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 &l= t;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 [400= 0000 + ( vhold-set & 0x07 ) * 100000] in uV
+
+ =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&g= t; 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
+
+
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-pow= er-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-pow= er-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};
};
---

--
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_726_2042748720.1463507442454-- ------=_Part_725_950679940.1463507442454--