From: Timo Sigurdsson <public_timo.s-fWgRPtSzPNU3WX+qO2AYSQ@public.gmane.org>
To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
pawel.moll-5wv7dgnIgG8@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Cc: Timo Sigurdsson <public_timo.s-fWgRPtSzPNU3WX+qO2AYSQ@public.gmane.org>
Subject: [RFC] ARM: dts: sunxi: Add regulators and board-specific operating points for LeMaker BananaPi
Date: Mon, 27 Jul 2015 03:28:06 +0200 [thread overview]
Message-ID: <1437960486-2809-1-git-send-email-public_timo.s@silentcreek.de> (raw)
sun7i-a20-bananapi.dts doesn't contain regulator nodes for the AXP209 PMU
driver, so add them to allow for voltage-scaling with cpufreq-dt. With the
regulators enabled, we can define board-specific operating points. The defined
CPU voltages are more conservative (based on the values used by the vendor),
so they should be more failsafe across all boards of this kind out there.
I'm posting this as RFC as I would like to make a few more remarks and raise
questions along the way (plus, I'm anything but an experienced developer, so a
a critical review might help).
I checked the regulator definitions against the schematics released by LeMaker.
I also compared that to the DT and schematics of Cubiboard 2 and Cubietruck. Of
course, I also tested the patch on the actual hardware and it works fine for me.
The CPU voltages are slightly higher than those set in sun7i-a20.dtsi and even
though they work well for me, I thought it might be safer to use the more
conservative values used by LeMaker in their old fex file. Would you agree?
Besides, it it ok to have this in one patch or should it be splitted in two
(one for the regulators and one for the opp)? Did I miss something important?
Signed-off-by: Timo Sigurdsson <public_timo.s-fWgRPtSzPNU3WX+qO2AYSQ@public.gmane.org>
---
arch/arm/boot/dts/sun7i-a20-bananapi.dts | 47 +++++++++++++++++++++++++++++---
1 file changed, 43 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
index 9f7b472..2bcbb0e 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts
@@ -92,6 +92,22 @@
status = "okay";
};
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+ operating-points = <
+ /* kHz uV */
+ 1008000 1450000
+ 960000 1425000
+ 912000 1425000
+ 864000 1350000
+ 720000 1250000
+ 528000 1150000
+ 312000 1100000
+ 144000 1050000
+ >;
+ cooling-max-level = <7>;
+};
+
&ehci0 {
status = "okay";
};
@@ -119,13 +135,9 @@
status = "okay";
axp209: pmic@34 {
- compatible = "x-powers,axp209";
reg = <0x34>;
interrupt-parent = <&nmi_intc>;
interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-
- interrupt-controller;
- #interrupt-cells = <1>;
};
};
@@ -182,6 +194,33 @@
};
};
+#include "axp209.dtsi"
+
+®_dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1050000>;
+ regulator-max-microvolt = <1450000>;
+ regulator-name = "vdd-cpu";
+};
+
+®_dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1400000>;
+ regulator-name = "vdd-int-dll";
+};
+
+®_ldo1 {
+ regulator-name = "vdd-rtc";
+};
+
+®_ldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-name = "avcc";
+};
+
®_usb1_vbus {
status = "okay";
};
--
2.1.4
next reply other threads:[~2015-07-27 1:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 1:28 Timo Sigurdsson [this message]
[not found] ` <1437960486-2809-1-git-send-email-public_timo.s-fWgRPtSzPNU3WX+qO2AYSQ@public.gmane.org>
2015-07-27 8:07 ` [RFC] ARM: dts: sunxi: Add regulators and board-specific operating points for LeMaker BananaPi Hans de Goede
[not found] ` <55B5E6DB.8020009-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-07-27 12:09 ` [linux-sunxi] " public_timo.s-fWgRPtSzPNU3WX+qO2AYSQ
[not found] ` <20150727120918.191F76C82FB4-RzmsueL7+k6AvxNu/8lEInnhMCiq3JZZ@public.gmane.org>
2015-07-27 12:43 ` Hans de Goede
[not found] ` <55B62768.6040403-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-07-28 9:02 ` Timo Sigurdsson
[not found] ` <20150728090209.1D7BC6C80542-RzmsueL7+k6AvxNu/8lEInnhMCiq3JZZ@public.gmane.org>
2015-07-28 12:55 ` Maxime Ripard
2015-07-28 14:57 ` Timo Sigurdsson
2015-07-28 12:49 ` [linux-sunxi] " Maxime Ripard
2015-07-28 14:24 ` Hans de Goede
[not found] ` <55B790BA.5000509-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-07-28 15:09 ` Timo Sigurdsson
[not found] ` <20150728150929.233B56C80391-RzmsueL7+k6AvxNu/8lEInnhMCiq3JZZ@public.gmane.org>
2015-07-28 15:29 ` [linux-sunxi] " Hans de Goede
[not found] ` <55B79FCA.7070907-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-08-02 22:00 ` Timo Sigurdsson
2015-07-28 14:45 ` Timo Sigurdsson
2015-07-27 12:36 ` public_timo.s-fWgRPtSzPNU3WX+qO2AYSQ
[not found] ` <20150727123653.36C046C8007E-RzmsueL7+k6AvxNu/8lEInnhMCiq3JZZ@public.gmane.org>
2015-07-27 12:54 ` [linux-sunxi] " Hans de Goede
[not found] ` <55B62A1B.6030601-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-07-27 13:14 ` Chen-Yu Tsai
[not found] ` <CAGb2v65ApKvrj6K+kw43u=0q6=auTsmQjCXhibgZkW+vd5nDqA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-28 9:02 ` Timo Sigurdsson
[not found] ` <20150728090216.892076C80D94-RzmsueL7+k6AvxNu/8lEInnhMCiq3JZZ@public.gmane.org>
2015-07-28 12:55 ` Maxime Ripard
2015-07-28 15:01 ` Timo Sigurdsson
2015-07-28 23:02 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1437960486-2809-1-git-send-email-public_timo.s@silentcreek.de \
--to=public_timo.s-fwgrptszpnu3wx+qo2aysq@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).