linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: sun7i: bananapro: amending axp209 definition
@ 2021-03-13 19:58 Jan K
  0 siblings, 0 replies; only message in thread
From: Jan K @ 2021-03-13 19:58 UTC (permalink / raw)
  To: linux-sunxi, devicetree, linux-arm-kernel; +Cc: Hans de Goede

Current "Lemaker Banana Pro" sun7i A20-based SBC device tree is missing
right definition of AXP209 (CPU-dedicated PMU). It does not include the
axp209.dtsi and does not include regulator configuration, which becomes
vital once AXP209 regulators are recognized by kernel.

Missing AXP209 regulators mean no CPU frequency scaling, missing AXP209
supply status "okay" in device tree means no monitoring of amperage and
voltage. Patch brings all that back (it was fine at least up to 4.10.1).

With regulators support some regulators must stay on, so they have been
assigned to correct subsystems or set always-on.


Signed-off-by: Jan Kończak <jan.z.konczak@gmail.com>
---
 arch/arm/boot/dts/sun7i-a20-bananapro.dts | 58 +++++++++++++++++++----
 1 file changed, 50 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-bananapro.dts
b/arch/arm/boot/dts/sun7i-a20-bananapro.dts
index e22f0e8bb..1640f1702 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapro.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapro.dts
@@ -90,10 +90,6 @@ reg_gmac_3v3: gmac-3v3 {
        };
 };

-&ahci {
-       status = "okay";
-};
-
 &codec {
        status = "okay";
 };
@@ -119,16 +115,62 @@ &i2c0 {
        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>;
        };
 };

+#include "axp209.dtsi"
+
+&ac_power_supply {
+        status = "okay";
+};
+
+&battery_power_supply {
+        status = "okay";
+};
+
+&cpu0 {
+       cpu-supply = <&reg_dcdc2>;
+};
+
+&ahci {
+       target-supply = <&reg_ldo4>;
+       status = "okay";
+};
+
+// axp209 regulators
+&reg_dcdc2 {
+        regulator-always-on;
+        regulator-min-microvolt = <1000000>;
+        regulator-max-microvolt = <1400000>;
+        regulator-name = "vdd-cpu";
+};
+
+&reg_dcdc3 {
+        regulator-always-on;
+        regulator-min-microvolt = <1000000>;
+        regulator-max-microvolt = <1400000>;
+        regulator-name = "vdd-int-dll";
+};
+
+&reg_ldo1 {
+        regulator-name = "vdd-rtc";
+};
+
+&reg_ldo2 {
+        regulator-always-on;
+        regulator-min-microvolt = <3000000>;
+        regulator-max-microvolt = <3000000>;
+        regulator-name = "avcc";
+};
+
+&reg_ldo4 {
+       regulator-name = "vdd-sata";
+       regulator-always-on;
+};
+
 &i2c2 {
        status = "okay";
 };
-- 
2.26.2

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-13 19:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-13 19:58 [PATCH] ARM: dts: sun7i: bananapro: amending axp209 definition Jan K

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).