Skip to content

Commit

Permalink
ARM: dts: meson8b: odroidc1: add the CPU voltage regulator
Browse files Browse the repository at this point in the history
The CPU voltage regulator is a "Monolithic Power Systems MP2161"
(according to the Odroid-C1+'s schematics). It is driven by PWM_C on
GPIODV_9.

Hardkernel's 3.10 kernel (based on the Amlogic GPL kernel sources)
defines a PWM voltage table with the following values:
- 0.86 volts = PWM register value 0x10f001b
- (more values in 0.1 volt increments)
- 1.14 volts = PWM register value 0x000012a
When using the XTAL (24MHz) as input this translates into a PWM period
of 12218ns with 0.86V using a duty cycle of 91% and 1.14V using a duty
cycle of 0%.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
  • Loading branch information
xdarklight authored and khilman committed Sep 26, 2018
1 parent bbedc1f commit 524d960
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions arch/arm/boot/dts/meson8b-odroidc1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,25 @@
states = <3300000 0
1800000 1>;
};

vcck: regulator-vcck {
/* Monolithic Power Systems MP2161 */
compatible = "pwm-regulator";

regulator-name = "VCCK";
regulator-min-microvolt = <860000>;
regulator-max-microvolt = <1140000>;

pwms = <&pwm_cd 0 12218 0>;
pwm-dutycycle-range = <91 0>;

regulator-boot-on;
regulator-always-on;
};
};

&cpu0 {
cpu-supply = <&vcck>;
};

&ethmac {
Expand Down Expand Up @@ -180,6 +199,14 @@
};
};

&pwm_cd {
status = "okay";
pinctrl-0 = <&pwm_c1_pins>;
pinctrl-names = "default";
clocks = <&clkc CLKID_XTAL>;
clock-names = "clkin0";
};

&uart_AO {
status = "okay";
pinctrl-0 = <&uart_ao_a_pins>;
Expand Down

0 comments on commit 524d960

Please sign in to comment.