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@xxxxxxxxx> --- 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 = <®_dcdc2>; +}; + +&ahci { + target-supply = <®_ldo4>; + status = "okay"; +}; + +// axp209 regulators +®_dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + 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"; +}; + +®_ldo4 { + regulator-name = "vdd-sata"; + regulator-always-on; +}; + &i2c2 { status = "okay"; }; -- 2.26.2