devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATH[1/3] ARM: axp20x_usb_power.c add device tree configuration options for REG 30H: VBUS-IPSOUT
@ 2016-05-17 17:41 Ene Alexandru
       [not found] ` <0f58d2b3-f3d3-45a3-a307-e54df26c1ab1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Ene Alexandru @ 2016-05-17 17:41 UTC (permalink / raw)
  To: linux-sunxi
  Cc: lee.jones-QSEj5FYQhm4dnm+yROfE0A, sre-DgEjT+Ai2ygdnm+yROfE0A,
	dbaryshkov-Re5JQEeQqe8AvxtiuMwx3w, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8, wens-jdAy2FN1RRM,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	hdegoede-H+wXaHxf7aLQT0dZR+AlfA


[-- Attachment #1.1: Type: text/plain, Size: 1988 bytes --]

The AXP20X chips have a configuration register "REG 30H: VBUS-IPSOUT Power 
Path Management" that provide USB power supply protection.
The current axp20x_usb_power.c provides support only for reading those 
values.

>From the datasheet:
In order not to affect the USB communication, VBUS is always working under 
Voltage-Limit mode by default. In this mode, AXP209 ensures that VBUS 
voltage remains above a configurable reference voltage VHOLD which can meet 
the USB specification. The default VHOLD is 4.4V, adjustable in Reg30H 
[5:3] register. If the system has limit on current obtained from USB VBUS, 
a current-limit mode is provided (See REG30H[1] register), with 
900mA/500mA/100mA (Reg30H [0]) selectable.

The following entries are added in the axp209.dtsi 
file: vhold-enable, vhold-set and ibus-limit
The chosen default values are the AXP20X reset values, as described in the 
data sheet.

Signed-off-by: Ene Alexandru <ene.alexandru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>


---
diff -uprN -X linux-sunxi-original/Documentation/dontdiff 
linux-sunxi-original/arch/arm/boot/dts/axp209.dtsi 
linux-sunxi/arch/arm/boot/dts/axp209.dtsi
--- linux-sunxi-original/arch/arm/boot/dts/axp209.dtsi         2016-05-11 
09:21:47.470923679 +0200
+++ linux-sunxi/arch/arm/boot/dts/axp209.dtsi     2016-05-10 
18:45:32.795158651 +0200
@@ -98,5 +98,8 @@
           usb_power_supply: usb_power_supply {
                       compatible = "x-powers,axp202-usb-power-supply";
                       status = "disabled";
+                      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.

[-- Attachment #1.2: Type: text/html, Size: 2580 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-06-10  9:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-17 17:41 PATH[1/3] ARM: axp20x_usb_power.c add device tree configuration options for REG 30H: VBUS-IPSOUT Ene Alexandru
     [not found] ` <0f58d2b3-f3d3-45a3-a307-e54df26c1ab1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-05-17 17:47   ` Ene Alexandru
     [not found]     ` <671c7471-b63a-40cc-989f-6b20f00571ee-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-05-17 17:50       ` Ene Alexandru
     [not found]         ` <35a39bdc-1304-403d-b56a-a45bb8debf5e-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-05-17 23:21           ` Julian Calaby
     [not found]             ` <CAGRGNgX7A3bx9Dam2j1ovdf4s8L9GTi3DM4zMeyu0x3b0wwCgA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-18  4:02               ` Ene Alexandru
2016-05-17 23:15       ` Julian Calaby
2016-05-18  7:21   ` Lee Jones
2016-06-10  9:56   ` [linux-sunxi] " Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).