Skip to contentSkip to conversation

ARM: DTS: CROS5250: Add max77686 device tree support

PATCH Superseded Abhilash Kesavan 4 participants 12 messages Nov 28, 2012 – Mar 25, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: DTS: CROS5250: Add max77686 device tree support

The exynos5250 based chromebooks have a max77686 pmic on i2c channel 0. Add support for the pmic in the common cros5250 dts file. Tested after enabling cpufreq support for exynos5250 SoC and varying the arm frequency/voltage using the userspace governer.

---
 arch/arm/boot/dts/cros5250-common.dtsi |  137 ++++++++++++++++++++++++++++++++
 1 files changed, 137 insertions(+), 0 deletions(-)
arch/arm/boot/dts/cros5250-common.dtsi +137 -0
index fddd174..7849824 100644
@@ -24,6 +24,143 @@
 		samsung,i2c-max-bus-freq = <378000>;
 		gpios = <&gpb3 0 2 3 0>,
 			<&gpb3 1 2 3 0>;
+
+		max77686 at 09 {
+			compatible = "maxim,max77686";
+			reg = <0x09>;
+
+			voltage-regulators {
+				ldo1_reg: LDO1 {
+					regulator-name = "vdd_alive";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+					regulator-always-on;
+				};
+
+				ldo2_reg: LDO2 {
+					regulator-name = "vdd_micom";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo3_reg: LDO3 {
+					regulator-name = "vdd_rtc";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo7_reg: LDO7 {
+					regulator-name = "vdd10_xpll";
+					regulator-min-microvolt = <1100000>;
+					regulator-max-microvolt = <1100000>;
+					regulator-always-on;
+				};
+
+				ldo8_reg: LDO8 {
+					regulator-name = "vdd10_mipihdmi";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+					regulator-always-on;
+				};
+
+				ldo10_reg: LDO10 {
+					regulator-name = "vdd18_mipihdmi";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo12_reg: LDO12 {
+					regulator-name = "vdd33_usb3";
+					regulator-min-microvolt = <3000000>;
+					regulator-max-microvolt = <3000000>;
+					regulator-always-on;
+				};
+
+				ldo14_reg: LDO14 {
+					regulator-name = "vdd18_abb0";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo15_reg: LDO15 {
+					regulator-name = "vdd10_hsic";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+					regulator-always-on;
+				};
+
+				ldo16_reg: LDO16 {
+					regulator-name = "vdd18_hsic";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				buck1_reg: BUCK1 {
+					regulator-name = "vdd_mif";
+					regulator-min-microvolt = <950000>;
+					regulator-max-microvolt = <1300000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck2_reg: BUCK2 {
+					regulator-name = "vdd_arm";
+					regulator-min-microvolt = <850000>;
+					regulator-max-microvolt = <1350000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck3_reg: BUCK3 {
+					regulator-name = "vdd_int";
+					regulator-min-microvolt = <900000>;
+					regulator-max-microvolt = <1200000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck4_reg: BUCK4 {
+					regulator-name = "vdd_g3d";
+					regulator-min-microvolt = <850000>;
+					regulator-max-microvolt = <1300000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck5_reg: BUCK5 {
+					regulator-name = "vdd18_adc";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				buck6_reg: BUCK6 {
+					regulator-name = "vdd_bat1";
+					regulator-min-microvolt = <1350000>;
+					regulator-max-microvolt = <1350000>;
+					regulator-always-on;
+				};
+
+				buck7_reg: BUCK7 {
+					regulator-name = "vdd_bat2";
+					regulator-min-microvolt = <2000000>;
+					regulator-max-microvolt = <2000000>;
+					regulator-always-on;
+				};
+
+				buck8_reg: BUCK8 {
+					regulator-name = "vdd_emmc";
+					regulator-min-microvolt = <2850000>;
+					regulator-max-microvolt = <2850000>;
+					regulator-always-on;
+				};
+			};
+		};
 	};
 
 	i2c at 12C70000 {
Signature · 1 line
1.7.8.6
#1 lore raw

PATCH 1/1 ARM: DTS: CROS5250: Add max77686 device tree support

Abhilash,

Thanks for posting this. A few comments below based on a diff of what's ToT in the Chrome OS kernel (and looking at the schematic).

Quoted 27 lines · Abhilash Kesavan

The exynos5250 based chromebooks have a max77686 pmic on i2c channel 0. Add support for the pmic in the common cros5250 dts file. Tested after enabling cpufreq support for exynos5250 SoC and varying the arm frequency/voltage using the userspace governer.

---
 arch/arm/boot/dts/cros5250-common.dtsi |  137 ++++++++++++++++++++++++++++++++
 1 files changed, 137 insertions(+), 0 deletions(-)
arch/arm/boot/dts/cros5250-common.dtsi +9 -0
index fddd174..7849824 100644
@@ -24,6 +24,143 @@
                samsung,i2c-max-bus-freq = <378000>;
                gpios = <&gpb3 0 2 3 0>,
                        <&gpb3 1 2 3 0>;
+
+               max77686 at 09 {
+                       compatible = "maxim,max77686";
+                       reg = <0x09>;
+
+                       voltage-regulators {
+                               ldo1_reg: LDO1 {
+                                       regulator-name = "vdd_alive";
+                                       regulator-min-microvolt = <1000000>;

arch/arm/boot/dts/cros5250-common.dtsi line 45

Quoted 10 lines
arch/arm/boot/dts/cros5250-common.dtsi +10 -0
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo2_reg: LDO2 {
+                                       regulator-name = "vdd_micom";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };

I don't believe this is right. In the least the name is wrong since the LDO2 signal from max77686 actually goes to the EC as a signal for detecting the end of the PMIC power on sequence. The signal "vdd_micom" is actually the LDO2 signal from tps65090.

Current Chrome OS kernel tree doesn't have an entry for LDO2 so it is using whatever the bootloader setup, I believe.

arch/arm/boot/dts/cros5250-common.dtsi line 51

Quoted 6 lines
arch/arm/boot/dts/cros5250-common.dtsi +6 -0
+
+                               ldo3_reg: LDO3 {
+                                       regulator-name = "vdd_rtc";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;

In Chrome OS kernel tree these don't have names like this and are just named vdd_ldo3. While I can see a point to being a little more specific, it can also be misleading. This LDO not only provides "vdd_rtc" but also several other signals (I see it go to VDDQ_PRE1, VIO of the max77686 itself, ... Maybe just keep the generic "vdd_do3" name?

This comment also applies to most of the other definitions.

arch/arm/boot/dts/cros5250-common.dtsi line 53

Quoted 2 lines
arch/arm/boot/dts/cros5250-common.dtsi +2 -0
+                               };
+

I see that several regulators that are in Chrome OS's kernel are not here, like LDO6, LDO11, LDO13, and LDO17. Can you explain their absence?

arch/arm/boot/dts/cros5250-common.dtsi line 57

Quoted 4 lines
arch/arm/boot/dts/cros5250-common.dtsi +4 -0
+                               ldo7_reg: LDO7 {
+                                       regulator-name = "vdd10_xpll";
+                                       regulator-min-microvolt = <1100000>;
+                                       regulator-max-microvolt = <1100000>;

This voltage doesn't match what Chrome OS has. We have 1.0V. Do you have a specific reason for increasing?

Quoted 72 lines
arch/arm/boot/dts/cros5250-common.dtsi +72 -0
+                                       regulator-always-on;
+                               };
+
+                               ldo8_reg: LDO8 {
+                                       regulator-name = "vdd10_mipihdmi";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo10_reg: LDO10 {
+                                       regulator-name = "vdd18_mipihdmi";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo12_reg: LDO12 {
+                                       regulator-name = "vdd33_usb3";
+                                       regulator-min-microvolt = <3000000>;
+                                       regulator-max-microvolt = <3000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo14_reg: LDO14 {
+                                       regulator-name = "vdd18_abb0";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo15_reg: LDO15 {
+                                       regulator-name = "vdd10_hsic";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo16_reg: LDO16 {
+                                       regulator-name = "vdd18_hsic";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               buck1_reg: BUCK1 {
+                                       regulator-name = "vdd_mif";
+                                       regulator-min-microvolt = <950000>;
+                                       regulator-max-microvolt = <1300000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck2_reg: BUCK2 {
+                                       regulator-name = "vdd_arm";
+                                       regulator-min-microvolt = <850000>;
+                                       regulator-max-microvolt = <1350000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck3_reg: BUCK3 {
+                                       regulator-name = "vdd_int";
+                                       regulator-min-microvolt = <900000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck4_reg: BUCK4 {
+                                       regulator-name = "vdd_g3d";
+                                       regulator-min-microvolt = <850000>;

arch/arm/boot/dts/cros5250-common.dtsi line 139

Quoted 10 lines
arch/arm/boot/dts/cros5250-common.dtsi +10 -0
+                                       regulator-max-microvolt = <1300000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck5_reg: BUCK5 {
+                                       regulator-name = "vdd18_adc";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;

I see you removed "regulator-boot-on;" compared to ChromeOS kernel. Can you explain why?

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                               };
+
+                               buck6_reg: BUCK6 {
+                                       regulator-name = "vdd_bat1";
+                                       regulator-min-microvolt = <1350000>;

arch/arm/boot/dts/cros5250-common.dtsi line 154

Quoted 10 lines
arch/arm/boot/dts/cros5250-common.dtsi +10 -0
+                                       regulator-max-microvolt = <1350000>;
+                                       regulator-always-on;
+                               };
+
+                               buck7_reg: BUCK7 {
+                                       regulator-name = "vdd_bat2";
+                                       regulator-min-microvolt = <2000000>;
+                                       regulator-max-microvolt = <2000000>;
+                                       regulator-always-on;
+                               };

buck6 and buck7 aren't in Chrome OS kernel (so just using whatever the bootloader provided). Specifying them here is fine (and these values look correct), but I'm not 100% convinced about the name (similar to LDOs, these signals go lots of places).

arch/arm/boot/dts/cros5250-common.dtsi line 160

Quoted 6 lines
arch/arm/boot/dts/cros5250-common.dtsi +6 -0
+
+                               buck8_reg: BUCK8 {
+                                       regulator-name = "vdd_emmc";
+                                       regulator-min-microvolt = <2850000>;
+                                       regulator-max-microvolt = <2850000>;
+                                       regulator-always-on;

I see you removed "regulator-boot-on;" compared to ChromeOS kernel. Can you explain why?

...your voltages look better, though. :)

Quoted 14 lines
arch/arm/boot/dts/cros5250-common.dtsi +3 -1
+                               };
+                       };
+               };
        };
 
        i2c at 12C70000 {
--

1.7.8.6

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

#2 lore raw

PATCH 1/1 ARM: DTS: CROS5250: Add max77686 device tree support

Hi Doug,

Thanks for the comments

[...]

Quoted 7 lines

I don't believe this is right. In the least the name is wrong since the LDO2 signal from max77686 actually goes to the EC as a signal for detecting the end of the PMIC power on sequence. The signal "vdd_micom" is actually the LDO2 signal from tps65090.

Current Chrome OS kernel tree doesn't have an entry for LDO2 so it is using whatever the bootloader setup, I believe.

I will use generic names such as "P1.8V_LDO_OUT2" to avoid confusion.

The regulator core assumes that a dt enabled machine will have all constraints defined
and for those that are not it disables them. So, you may see some instances listed here
that are not present in the chrome os kernel tree,

[...]

Quoted 8 lines

In Chrome OS kernel tree these don't have names like this and are just named vdd_ldo3. While I can see a point to being a little more specific, it can also be misleading. This LDO not only provides "vdd_rtc" but also several other signals (I see it go to VDDQ_PRE1, VIO of the max77686 itself, ... Maybe just keep the generic "vdd_do3" name?

This comment also applies to most of the other definitions.

Sure, I 'll change them all.

[...]

Quoted 3 lines

I see that several regulators that are in Chrome OS's kernel are not here, like LDO6, LDO11, LDO13, and LDO17. Can you explain their absence?

These are unused LDOs on the snow and need not be listed.

Quoted 9 lines

arch/arm/boot/dts/cros5250-common.dtsi line 57

Quoted 6 lines
arch/arm/boot/dts/cros5250-common.dtsi +4 -0
+                               ldo7_reg: LDO7 {
+                                       regulator-name = "vdd10_xpll";
+                                       regulator-min-microvolt = <1100000>;
+                                       regulator-max-microvolt = <1100000>;

This voltage doesn't match what Chrome OS has. We have 1.0V. Do you have a specific reason for increasing?

The default is 1.1V and the schematics I have shows 1.1V as well. Looks like the one in
chrome os is incorrect.

[...]

Quoted 8 lines

arch/arm/boot/dts/cros5250-common.dtsi line 139

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                               buck5_reg: BUCK5 {
+                                       regulator-name = "vdd18_adc";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;

I see you removed "regulator-boot-on;" compared to ChromeOS kernel. Can you explain why?

Will fix as it is "ON" at boot.

Quoted 13 lines
Quoted 13 lines
arch/arm/boot/dts/cros5250-common.dtsi +12 -0
+                               };
+
+                               buck6_reg: BUCK6 {
+                                       regulator-name = "vdd_bat1";
+                                       regulator-min-microvolt = <1350000>;
+                                       regulator-max-microvolt = <1350000>;
+                                       regulator-always-on;
+                               };
+
+                               buck7_reg: BUCK7 {
+                                       regulator-name = "vdd_bat2";
+                                       regulator-min-microvolt = <2000000>;
Quoted 8 lines

arch/arm/boot/dts/cros5250-common.dtsi line 154

Quoted 3 lines
arch/arm/boot/dts/cros5250-common.dtsi +3 -0
+                                       regulator-max-microvolt = <2000000>;
+                                       regulator-always-on;
+                               };

buck6 and buck7 aren't in Chrome OS kernel (so just using whatever the bootloader provided). Specifying them here is fine (and these values look correct), but I'm not 100% convinced about the name (similar to LDOs, these signals go lots of places).

Naming will be fixed.

Quoted 10 lines

arch/arm/boot/dts/cros5250-common.dtsi line 160

Quoted 7 lines
arch/arm/boot/dts/cros5250-common.dtsi +6 -0
+
+                               buck8_reg: BUCK8 {
+                                       regulator-name = "vdd_emmc";
+                                       regulator-min-microvolt = <2850000>;
+                                       regulator-max-microvolt = <2850000>;
+                                       regulator-always-on;

I see you removed "regulator-boot-on;" compared to ChromeOS kernel. Can you explain why?

BUCK8 is by default "OFF".

Will re-post on Tuesday.

Regards,
Abhilash

#3 lore raw

PATCH 1/1 ARM: DTS: CROS5250: Add max77686 device tree support

Hi,

[...]

Quoted 5 lines
Quoted 2 lines

This voltage doesn't match what Chrome OS has. We have 1.0V. Do you have a specific reason for increasing?

The default is 1.1V and the schematics I have shows 1.1V as well. Looks like the one in
chrome os is incorrect.

Was checking the SMDK schemata, the snow one has it as 1.0V. Will fix.

Abhilash

#4 lore raw

PATCH 1/1 ARM: DTS: CROS5250: Add max77686 device tree support

In reply to Abhilash Kesavan
Quoted 12 lines · Abhilash Kesavan

Hi Doug,

Thanks for the comments

[...]

Quoted 7 lines

I don't believe this is right. In the least the name is wrong since the LDO2 signal from max77686 actually goes to the EC as a signal for detecting the end of the PMIC power on sequence. The signal "vdd_micom" is actually the LDO2 signal from tps65090.

Current Chrome OS kernel tree doesn't have an entry for LDO2 so it is using whatever the bootloader setup, I believe.

Quoted 7 lines

I will use generic names such as "P1.8V_LDO_OUT2" to avoid confusion.

The regulator core assumes that a dt enabled machine will have all constraints defined
and for those that are not it disables them. So, you may see some instances listed here
that are not present in the chrome os kernel tree,

This makes sense to me an explains why the regulators listed as "off" are simply not listed in your version. Thanks! :)

Quoted 25 lines

[...]

Quoted 8 lines

In Chrome OS kernel tree these don't have names like this and are just named vdd_ldo3. While I can see a point to being a little more specific, it can also be misleading. This LDO not only provides "vdd_rtc" but also several other signals (I see it go to VDDQ_PRE1, VIO of the max77686 itself, ... Maybe just keep the generic "vdd_do3" name?

This comment also applies to most of the other definitions.

Sure, I 'll change them all.

[...]

Quoted 3 lines

I see that several regulators that are in Chrome OS's kernel are not here, like LDO6, LDO11, LDO13, and LDO17. Can you explain their absence?

These are unused LDOs on the snow and need not be listed.

Quoted 7 lines
Quoted 6 lines
arch/arm/boot/dts/cros5250-common.dtsi +4 -0
+                               ldo7_reg: LDO7 {
+                                       regulator-name = "vdd10_xpll";
+                                       regulator-min-microvolt = <1100000>;
+                                       regulator-max-microvolt = <1100000>;
Quoted 5 lines
Quoted 2 lines

This voltage doesn't match what Chrome OS has. We have 1.0V. Do you have a specific reason for increasing?

The default is 1.1V and the schematics I have shows 1.1V as well. Looks like the one in
chrome os is incorrect.

On one schematic I have (Daisy 0210) it is listed as PP1000_LDO7 which means 1.0 V. On Snow's schematic (0912) it is listed as P1.0V_LDO_OUT7. The pin on the exynos that it's connected to a pins on exynos called VDD10_EPLL, VDD10_VPLL, .... To me that strongly implies 1.0 volts, though given the fact that exynos runs has clocks with "266" in the name that run at 300 MHz I wouldn't bet my life on it. The pin name "VDD10_VPLL" matches what I see in the 1.1 version of the user's guide.

Ah, I think I finally found it.

Table 63-2 Recommended Operating Conditions.

That lists VDD10_XPLL as a typical of 1.1V

Ugh, whoever, thought that it was a good idea to put voltage levels and clocks speeds in signal names should be given a talking to. I'll file a bug for Chrome OS about this.

Quoted 43 lines

[...]

Quoted 8 lines

arch/arm/boot/dts/cros5250-common.dtsi line 139

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                               buck5_reg: BUCK5 {
+                                       regulator-name = "vdd18_adc";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;

I see you removed "regulator-boot-on;" compared to ChromeOS kernel. Can you explain why?

Will fix as it is "ON" at boot.

Quoted 13 lines
Quoted 13 lines
arch/arm/boot/dts/cros5250-common.dtsi +12 -0
+                               };
+
+                               buck6_reg: BUCK6 {
+                                       regulator-name = "vdd_bat1";
+                                       regulator-min-microvolt = <1350000>;
+                                       regulator-max-microvolt = <1350000>;
+                                       regulator-always-on;
+                               };
+
+                               buck7_reg: BUCK7 {
+                                       regulator-name = "vdd_bat2";
+                                       regulator-min-microvolt = <2000000>;
Quoted 8 lines

arch/arm/boot/dts/cros5250-common.dtsi line 154

Quoted 3 lines
arch/arm/boot/dts/cros5250-common.dtsi +3 -0
+                                       regulator-max-microvolt = <2000000>;
+                                       regulator-always-on;
+                               };

buck6 and buck7 aren't in Chrome OS kernel (so just using whatever the bootloader provided). Specifying them here is fine (and these values look correct), but I'm not 100% convinced about the name (similar to LDOs, these signals go lots of places).

Naming will be fixed.

Quoted 8 lines
Quoted 7 lines
arch/arm/boot/dts/cros5250-common.dtsi +6 -0
+
+                               buck8_reg: BUCK8 {
+                                       regulator-name = "vdd_emmc";
+                                       regulator-min-microvolt = <2850000>;
+                                       regulator-max-microvolt = <2850000>;
+                                       regulator-always-on;
Quoted 5 lines
Quoted 2 lines

I see you removed "regulator-boot-on;" compared to ChromeOS kernel. Can you explain why?

BUCK8 is by default "OFF".

Will re-post on Tuesday.

Thanks!

Quoted 3 lines

Regards,
Abhilash

-Doug

#5 lore raw

PATCH v2 1/1 ARM: DTS: CROS5250: Add max77686 device tree support

In reply to Abhilash Kesavan

The exynos5250 based chromebooks have a max77686 pmic on i2c channel 0. Add support for the pmic in the common cros5250 dts file. Tested after enabling cpufreq support for exynos5250 SoC and varying the arm frequency/voltage using the userspace governer.

---
Changes since v1:
* Used generic names for the regulators
* Changed BUCK5 as being default "ON"

 arch/arm/boot/dts/cros5250-common.dtsi |  138 ++++++++++++++++++++++++++++++++
 1 files changed, 138 insertions(+), 0 deletions(-)
arch/arm/boot/dts/cros5250-common.dtsi +138 -0
index fddd174..8ab8394 100644
@@ -24,6 +24,144 @@
 		samsung,i2c-max-bus-freq = <378000>;
 		gpios = <&gpb3 0 2 3 0>,
 			<&gpb3 1 2 3 0>;
+
+		max77686@09 {
+			compatible = "maxim,max77686";
+			reg = <0x09>;
+
+			voltage-regulators {
+				ldo1_reg: LDO1 {
+					regulator-name = "P1.0V_LDO_OUT1";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+					regulator-always-on;
+				};
+
+				ldo2_reg: LDO2 {
+					regulator-name = "P1.8V_LDO_OUT2";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo3_reg: LDO3 {
+					regulator-name = "P1.8V_LDO_OUT3";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo7_reg: LDO7 {
+					regulator-name = "P1.0V_LDO_OUT7";
+					regulator-min-microvolt = <1100000>;
+					regulator-max-microvolt = <1100000>;
+					regulator-always-on;
+				};
+
+				ldo8_reg: LDO8 {
+					regulator-name = "P1.0V_LDO_OUT8";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+					regulator-always-on;
+				};
+
+				ldo10_reg: LDO10 {
+					regulator-name = "P1.8V_LDO_OUT10";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo12_reg: LDO12 {
+					regulator-name = "P3.0V_LDO_OUT12";
+					regulator-min-microvolt = <3000000>;
+					regulator-max-microvolt = <3000000>;
+					regulator-always-on;
+				};
+
+				ldo14_reg: LDO14 {
+					regulator-name = "P1.8V_LDO_OUT14";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo15_reg: LDO15 {
+					regulator-name = "P1.0V_LDO_OUT15";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+					regulator-always-on;
+				};
+
+				ldo16_reg: LDO16 {
+					regulator-name = "P1.8V_LDO_OUT16";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				buck1_reg: BUCK1 {
+					regulator-name = "vdd_mif";
+					regulator-min-microvolt = <950000>;
+					regulator-max-microvolt = <1300000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck2_reg: BUCK2 {
+					regulator-name = "vdd_arm";
+					regulator-min-microvolt = <850000>;
+					regulator-max-microvolt = <1350000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck3_reg: BUCK3 {
+					regulator-name = "vdd_int";
+					regulator-min-microvolt = <900000>;
+					regulator-max-microvolt = <1200000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck4_reg: BUCK4 {
+					regulator-name = "vdd_g3d";
+					regulator-min-microvolt = <850000>;
+					regulator-max-microvolt = <1300000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck5_reg: BUCK5 {
+					regulator-name = "P1.8V_BUCK_OUT5";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck6_reg: BUCK6 {
+					regulator-name = "P1.35V_BUCK_OUT6";
+					regulator-min-microvolt = <1350000>;
+					regulator-max-microvolt = <1350000>;
+					regulator-always-on;
+				};
+
+				buck7_reg: BUCK7 {
+					regulator-name = "P2.0V_BUCK_OUT7";
+					regulator-min-microvolt = <2000000>;
+					regulator-max-microvolt = <2000000>;
+					regulator-always-on;
+				};
+
+				buck8_reg: BUCK8 {
+					regulator-name = "P2.85V_BUCK_OUT8";
+					regulator-min-microvolt = <2850000>;
+					regulator-max-microvolt = <2850000>;
+					regulator-always-on;
+				};
+			};
+		};
 	};
 
 	i2c@12C70000 {
Signature · 1 line
1.6.6.1
#6 lore raw

PATCH v2 1/1 ARM: DTS: CROS5250: Add max77686 device tree support

Abhilash,

Quoted 44 lines · Abhilash Kesavan

The exynos5250 based chromebooks have a max77686 pmic on i2c channel 0. Add support for the pmic in the common cros5250 dts file. Tested after enabling cpufreq support for exynos5250 SoC and varying the arm frequency/voltage using the userspace governer.

---
Changes since v1:
* Used generic names for the regulators
* Changed BUCK5 as being default "ON"

 arch/arm/boot/dts/cros5250-common.dtsi |  138 ++++++++++++++++++++++++++++++++
 1 files changed, 138 insertions(+), 0 deletions(-)
arch/arm/boot/dts/cros5250-common.dtsi +23 -0
index fddd174..8ab8394 100644
@@ -24,6 +24,144 @@
                samsung,i2c-max-bus-freq = <378000>;
                gpios = <&gpb3 0 2 3 0>,
                        <&gpb3 1 2 3 0>;
+
+               max77686 at 09 {
+                       compatible = "maxim,max77686";
+                       reg = <0x09>;
+
+                       voltage-regulators {
+                               ldo1_reg: LDO1 {
+                                       regulator-name = "P1.0V_LDO_OUT1";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo2_reg: LDO2 {
+                                       regulator-name = "P1.8V_LDO_OUT2";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo3_reg: LDO3 {
+                                       regulator-name = "P1.8V_LDO_OUT3";
+                                       regulator-min-microvolt = <1800000>;

arch/arm/boot/dts/cros5250-common.dtsi line 59

Quoted 10 lines
arch/arm/boot/dts/cros5250-common.dtsi +10 -0
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo7_reg: LDO7 {
+                                       regulator-name = "P1.0V_LDO_OUT7";
+                                       regulator-min-microvolt = <1100000>;
+                                       regulator-max-microvolt = <1100000>;
+                                       regulator-always-on;
+                               };

This matches the signal name on the most recent schematics, which is good, but I'd be slightly happier if it said "1.1V" in instead of 1.0V. I'd imagine that if we ever rev the schematics that we'd fix that.

Quoted 109 lines
arch/arm/boot/dts/cros5250-common.dtsi +105 -1
+
+                               ldo8_reg: LDO8 {
+                                       regulator-name = "P1.0V_LDO_OUT8";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo10_reg: LDO10 {
+                                       regulator-name = "P1.8V_LDO_OUT10";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo12_reg: LDO12 {
+                                       regulator-name = "P3.0V_LDO_OUT12";
+                                       regulator-min-microvolt = <3000000>;
+                                       regulator-max-microvolt = <3000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo14_reg: LDO14 {
+                                       regulator-name = "P1.8V_LDO_OUT14";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo15_reg: LDO15 {
+                                       regulator-name = "P1.0V_LDO_OUT15";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo16_reg: LDO16 {
+                                       regulator-name = "P1.8V_LDO_OUT16";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               buck1_reg: BUCK1 {
+                                       regulator-name = "vdd_mif";
+                                       regulator-min-microvolt = <950000>;
+                                       regulator-max-microvolt = <1300000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck2_reg: BUCK2 {
+                                       regulator-name = "vdd_arm";
+                                       regulator-min-microvolt = <850000>;
+                                       regulator-max-microvolt = <1350000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck3_reg: BUCK3 {
+                                       regulator-name = "vdd_int";
+                                       regulator-min-microvolt = <900000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck4_reg: BUCK4 {
+                                       regulator-name = "vdd_g3d";
+                                       regulator-min-microvolt = <850000>;
+                                       regulator-max-microvolt = <1300000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck5_reg: BUCK5 {
+                                       regulator-name = "P1.8V_BUCK_OUT5";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck6_reg: BUCK6 {
+                                       regulator-name = "P1.35V_BUCK_OUT6";
+                                       regulator-min-microvolt = <1350000>;
+                                       regulator-max-microvolt = <1350000>;
+                                       regulator-always-on;
+                               };
+
+                               buck7_reg: BUCK7 {
+                                       regulator-name = "P2.0V_BUCK_OUT7";
+                                       regulator-min-microvolt = <2000000>;
+                                       regulator-max-microvolt = <2000000>;
+                                       regulator-always-on;
+                               };
+
+                               buck8_reg: BUCK8 {
+                                       regulator-name = "P2.85V_BUCK_OUT8";
+                                       regulator-min-microvolt = <2850000>;
+                                       regulator-max-microvolt = <2850000>;
+                                       regulator-always-on;
+                               };
+                       };
+               };
        };
 
        i2c at 12C70000 {
--
Quoted 2 lines

1.6.6.1

...would love to see LDO7 name fixed up, but otherwise looks good to me. Thanks!

#7 lore raw

PATCH v2 1/1 ARM: DTS: CROS5250: Add max77686 device tree support

Hi Doug,

[...]

Quoted 8 lines

arch/arm/boot/dts/cros5250-common.dtsi line 59

Quoted 7 lines
arch/arm/boot/dts/cros5250-common.dtsi +7 -0
+
+                               ldo7_reg: LDO7 {
+                                       regulator-name = "P1.0V_LDO_OUT7";
+                                       regulator-min-microvolt = <1100000>;
+                                       regulator-max-microvolt = <1100000>;
+                                       regulator-always-on;
+                               };
Quoted 4 lines

This matches the signal name on the most recent schematics, which is good, but I'd be slightly happier if it said "1.1V" in instead of 1.0V. I'd imagine that if we ever rev the schematics that we'd fix that.

Will change to 1.1
[...]

Quoted 4 lines

...would love to see LDO7 name fixed up, but otherwise looks good to me. Thanks!

Will re-post with your ACK.

Abhilash

#8 lore raw

PATCH v3 1/1 ARM: DTS: CROS5250: Add max77686 device tree support

In reply to Abhilash Kesavan

The exynos5250 based chromebooks have a max77686 pmic on i2c channel 0. Add support for the pmic in the common cros5250 dts file. Tested after enabling cpufreq support for exynos5250 SoC and varying the arm frequency/voltage using the userspace governer.

---
Changes since v1:
* Used generic names for the regulators
* Changed BUCK5 as being default "ON"
Changes since v2:
* Fixed the LDO7 name from "P1.0V_LDO_OUT7" to "P1.1V_LDO_OUT7"

 arch/arm/boot/dts/cros5250-common.dtsi |  138 ++++++++++++++++++++++++++++++++
 1 files changed, 138 insertions(+), 0 deletions(-)
arch/arm/boot/dts/cros5250-common.dtsi +138 -0
index fddd174..8ab8394 100644
@@ -24,6 +24,144 @@
 		samsung,i2c-max-bus-freq = <378000>;
 		gpios = <&gpb3 0 2 3 0>,
 			<&gpb3 1 2 3 0>;
+
+		max77686@09 {
+			compatible = "maxim,max77686";
+			reg = <0x09>;
+
+			voltage-regulators {
+				ldo1_reg: LDO1 {
+					regulator-name = "P1.0V_LDO_OUT1";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+					regulator-always-on;
+				};
+
+				ldo2_reg: LDO2 {
+					regulator-name = "P1.8V_LDO_OUT2";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo3_reg: LDO3 {
+					regulator-name = "P1.8V_LDO_OUT3";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo7_reg: LDO7 {
+					regulator-name = "P1.1V_LDO_OUT7";
+					regulator-min-microvolt = <1100000>;
+					regulator-max-microvolt = <1100000>;
+					regulator-always-on;
+				};
+
+				ldo8_reg: LDO8 {
+					regulator-name = "P1.0V_LDO_OUT8";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+					regulator-always-on;
+				};
+
+				ldo10_reg: LDO10 {
+					regulator-name = "P1.8V_LDO_OUT10";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo12_reg: LDO12 {
+					regulator-name = "P3.0V_LDO_OUT12";
+					regulator-min-microvolt = <3000000>;
+					regulator-max-microvolt = <3000000>;
+					regulator-always-on;
+				};
+
+				ldo14_reg: LDO14 {
+					regulator-name = "P1.8V_LDO_OUT14";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo15_reg: LDO15 {
+					regulator-name = "P1.0V_LDO_OUT15";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+					regulator-always-on;
+				};
+
+				ldo16_reg: LDO16 {
+					regulator-name = "P1.8V_LDO_OUT16";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				buck1_reg: BUCK1 {
+					regulator-name = "vdd_mif";
+					regulator-min-microvolt = <950000>;
+					regulator-max-microvolt = <1300000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck2_reg: BUCK2 {
+					regulator-name = "vdd_arm";
+					regulator-min-microvolt = <850000>;
+					regulator-max-microvolt = <1350000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck3_reg: BUCK3 {
+					regulator-name = "vdd_int";
+					regulator-min-microvolt = <900000>;
+					regulator-max-microvolt = <1200000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck4_reg: BUCK4 {
+					regulator-name = "vdd_g3d";
+					regulator-min-microvolt = <850000>;
+					regulator-max-microvolt = <1300000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck5_reg: BUCK5 {
+					regulator-name = "P1.8V_BUCK_OUT5";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck6_reg: BUCK6 {
+					regulator-name = "P1.35V_BUCK_OUT6";
+					regulator-min-microvolt = <1350000>;
+					regulator-max-microvolt = <1350000>;
+					regulator-always-on;
+				};
+
+				buck7_reg: BUCK7 {
+					regulator-name = "P2.0V_BUCK_OUT7";
+					regulator-min-microvolt = <2000000>;
+					regulator-max-microvolt = <2000000>;
+					regulator-always-on;
+				};
+
+				buck8_reg: BUCK8 {
+					regulator-name = "P2.85V_BUCK_OUT8";
+					regulator-min-microvolt = <2850000>;
+					regulator-max-microvolt = <2850000>;
+					regulator-always-on;
+				};
+			};
+		};
 	};
 
 	i2c@12C70000 {
Signature · 1 line
1.6.6.1
#9 lore raw

PATCH v3 1/1 ARM: DTS: CROS5250: Add max77686 device tree support

Adding Kukjin Kim who was accidentally missed out in the re-worked patches.

Quoted 174 lines · Abhilash Kesavan

The exynos5250 based chromebooks have a max77686 pmic on i2c channel 0. Add support for the pmic in the common cros5250 dts file. Tested after enabling cpufreq support for exynos5250 SoC and varying the arm frequency/voltage using the userspace governer.

---
Changes since v1:
* Used generic names for the regulators
* Changed BUCK5 as being default "ON"
Changes since v2:
* Fixed the LDO7 name from "P1.0V_LDO_OUT7" to "P1.1V_LDO_OUT7"

 arch/arm/boot/dts/cros5250-common.dtsi |  138 ++++++++++++++++++++++++++++++++
 1 files changed, 138 insertions(+), 0 deletions(-)
arch/arm/boot/dts/cros5250-common.dtsi +138 -1
index fddd174..8ab8394 100644
@@ -24,6 +24,144 @@
                samsung,i2c-max-bus-freq = <378000>;
                gpios = <&gpb3 0 2 3 0>,
                        <&gpb3 1 2 3 0>;
+
+               max77686 at 09 {
+                       compatible = "maxim,max77686";
+                       reg = <0x09>;
+
+                       voltage-regulators {
+                               ldo1_reg: LDO1 {
+                                       regulator-name = "P1.0V_LDO_OUT1";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo2_reg: LDO2 {
+                                       regulator-name = "P1.8V_LDO_OUT2";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo3_reg: LDO3 {
+                                       regulator-name = "P1.8V_LDO_OUT3";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo7_reg: LDO7 {
+                                       regulator-name = "P1.1V_LDO_OUT7";
+                                       regulator-min-microvolt = <1100000>;
+                                       regulator-max-microvolt = <1100000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo8_reg: LDO8 {
+                                       regulator-name = "P1.0V_LDO_OUT8";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo10_reg: LDO10 {
+                                       regulator-name = "P1.8V_LDO_OUT10";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo12_reg: LDO12 {
+                                       regulator-name = "P3.0V_LDO_OUT12";
+                                       regulator-min-microvolt = <3000000>;
+                                       regulator-max-microvolt = <3000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo14_reg: LDO14 {
+                                       regulator-name = "P1.8V_LDO_OUT14";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo15_reg: LDO15 {
+                                       regulator-name = "P1.0V_LDO_OUT15";
+                                       regulator-min-microvolt = <1000000>;
+                                       regulator-max-microvolt = <1000000>;
+                                       regulator-always-on;
+                               };
+
+                               ldo16_reg: LDO16 {
+                                       regulator-name = "P1.8V_LDO_OUT16";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                               };
+
+                               buck1_reg: BUCK1 {
+                                       regulator-name = "vdd_mif";
+                                       regulator-min-microvolt = <950000>;
+                                       regulator-max-microvolt = <1300000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck2_reg: BUCK2 {
+                                       regulator-name = "vdd_arm";
+                                       regulator-min-microvolt = <850000>;
+                                       regulator-max-microvolt = <1350000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck3_reg: BUCK3 {
+                                       regulator-name = "vdd_int";
+                                       regulator-min-microvolt = <900000>;
+                                       regulator-max-microvolt = <1200000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck4_reg: BUCK4 {
+                                       regulator-name = "vdd_g3d";
+                                       regulator-min-microvolt = <850000>;
+                                       regulator-max-microvolt = <1300000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck5_reg: BUCK5 {
+                                       regulator-name = "P1.8V_BUCK_OUT5";
+                                       regulator-min-microvolt = <1800000>;
+                                       regulator-max-microvolt = <1800000>;
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck6_reg: BUCK6 {
+                                       regulator-name = "P1.35V_BUCK_OUT6";
+                                       regulator-min-microvolt = <1350000>;
+                                       regulator-max-microvolt = <1350000>;
+                                       regulator-always-on;
+                               };
+
+                               buck7_reg: BUCK7 {
+                                       regulator-name = "P2.0V_BUCK_OUT7";
+                                       regulator-min-microvolt = <2000000>;
+                                       regulator-max-microvolt = <2000000>;
+                                       regulator-always-on;
+                               };
+
+                               buck8_reg: BUCK8 {
+                                       regulator-name = "P2.85V_BUCK_OUT8";
+                                       regulator-min-microvolt = <2850000>;
+                                       regulator-max-microvolt = <2850000>;
+                                       regulator-always-on;
+                               };
+                       };
+               };
        };
 
        i2c at 12C70000 {
--

1.6.6.1

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

#10 lore raw

PATCH v3 1/1 ARM: DTS: CROS5250: Add max77686 device tree support

Quoted 2 lines · Abhilash Kesavan

Adding Kukjin Kim who was accidentally missed out in the re-worked

patches.

Quoted 1 line

Abhilash, please re-send patch so that I could apply this into samsung tree.

Thanks.

- Kukjin

Quoted 22 lines
Quoted 7 lines · Abhilash Kesavan

The exynos5250 based chromebooks have a max77686 pmic on i2c channel 0. Add support for the pmic in the common cros5250 dts file. Tested after enabling cpufreq support for exynos5250 SoC and varying the arm frequency/voltage using the userspace governer.

Quoted 8 lines

---
Changes since v1:
* Used generic names for the regulators
* Changed BUCK5 as being default "ON"
Changes since v2:
* Fixed the LDO7 name from "P1.0V_LDO_OUT7" to "P1.1V_LDO_OUT7"

 arch/arm/boot/dts/cros5250-common.dtsi |  138

++++++++++++++++++++++++++++++++

Review

Quoted 3 lines
 1 files changed, 138 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/cros5250-common.dtsi

Quoted 15 lines
Quoted 5 lines

index fddd174..8ab8394 100644

arch/arm/boot/dts/cros5250-common.dtsi +0 -0
@@ -24,6 +24,144 @@
                samsung,i2c-max-bus-freq = <378000>;

arch/arm/boot/dts/cros5250-common.dtsi line 34

Quoted 10 lines
arch/arm/boot/dts/cros5250-common.dtsi +8 -0
                gpios = <&gpb3 0 2 3 0>,
                        <&gpb3 1 2 3 0>;
+
+               max77686 at 09 {
+                       compatible = "maxim,max77686";
+                       reg = <0x09>;
+
+                       voltage-regulators {
+                               ldo1_reg: LDO1 {
+                                       regulator-name =

"P1.0V_LDO_OUT1";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 35

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<1000000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 36

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1000000>;

Quoted 5 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                                       regulator-always-on;
+                               };
+
+                               ldo2_reg: LDO2 {
+                                       regulator-name =

"P1.8V_LDO_OUT2";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 42

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<1800000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 43

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1800000>;

Quoted 5 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                                       regulator-always-on;
+                               };
+
+                               ldo3_reg: LDO3 {
+                                       regulator-name =

"P1.8V_LDO_OUT3";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 49

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<1800000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 50

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1800000>;

Quoted 5 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                                       regulator-always-on;
+                               };
+
+                               ldo7_reg: LDO7 {
+                                       regulator-name =

"P1.1V_LDO_OUT7";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 56

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<1100000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 57

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1100000>;

Quoted 5 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                                       regulator-always-on;
+                               };
+
+                               ldo8_reg: LDO8 {
+                                       regulator-name =

"P1.0V_LDO_OUT8";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 63

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<1000000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 64

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1000000>;

Quoted 5 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                                       regulator-always-on;
+                               };
+
+                               ldo10_reg: LDO10 {
+                                       regulator-name =

"P1.8V_LDO_OUT10";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 70

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<1800000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 71

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1800000>;

Quoted 5 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                                       regulator-always-on;
+                               };
+
+                               ldo12_reg: LDO12 {
+                                       regulator-name =

"P3.0V_LDO_OUT12";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 77

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<3000000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 78

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<3000000>;

Quoted 5 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                                       regulator-always-on;
+                               };
+
+                               ldo14_reg: LDO14 {
+                                       regulator-name =

"P1.8V_LDO_OUT14";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 84

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<1800000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 85

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1800000>;

Quoted 5 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                                       regulator-always-on;
+                               };
+
+                               ldo15_reg: LDO15 {
+                                       regulator-name =

"P1.0V_LDO_OUT15";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 91

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<1000000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 92

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1000000>;

Quoted 5 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                                       regulator-always-on;
+                               };
+
+                               ldo16_reg: LDO16 {
+                                       regulator-name =

"P1.8V_LDO_OUT16";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 98

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<1800000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 99

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1800000>;

Quoted 6 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 6 lines
arch/arm/boot/dts/cros5250-common.dtsi +6 -0
+                                       regulator-always-on;
+                               };
+
+                               buck1_reg: BUCK1 {
+                                       regulator-name = "vdd_mif";
+                                       regulator-min-microvolt =

<950000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 106

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1300000>;

Quoted 7 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 7 lines
arch/arm/boot/dts/cros5250-common.dtsi +7 -0
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck2_reg: BUCK2 {
+                                       regulator-name = "vdd_arm";
+                                       regulator-min-microvolt =

<850000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 114

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1350000>;

Quoted 7 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 7 lines
arch/arm/boot/dts/cros5250-common.dtsi +7 -0
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck3_reg: BUCK3 {
+                                       regulator-name = "vdd_int";
+                                       regulator-min-microvolt =

<900000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 122

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1200000>;

Quoted 7 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 7 lines
arch/arm/boot/dts/cros5250-common.dtsi +7 -0
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck4_reg: BUCK4 {
+                                       regulator-name = "vdd_g3d";
+                                       regulator-min-microvolt =

<850000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 130

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1300000>;

Quoted 6 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 6 lines
arch/arm/boot/dts/cros5250-common.dtsi +6 -0
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck5_reg: BUCK5 {
+                                       regulator-name =

"P1.8V_BUCK_OUT5";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 137

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<1800000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 138

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1800000>;

Quoted 6 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 6 lines
arch/arm/boot/dts/cros5250-common.dtsi +6 -0
+                                       regulator-always-on;
+                                       regulator-boot-on;
+                               };
+
+                               buck6_reg: BUCK6 {
+                                       regulator-name =

"P1.35V_BUCK_OUT6";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 145

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<1350000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 146

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<1350000>;

Quoted 5 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                                       regulator-always-on;
+                               };
+
+                               buck7_reg: BUCK7 {
+                                       regulator-name =

"P2.0V_BUCK_OUT7";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 152

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<2000000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 153

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<2000000>;

Quoted 5 lines

arch/arm/boot/dts/cros5250-common.dtsi

Quoted 5 lines
arch/arm/boot/dts/cros5250-common.dtsi +5 -0
+                                       regulator-always-on;
+                               };
+
+                               buck8_reg: BUCK8 {
+                                       regulator-name =

"P2.85V_BUCK_OUT8";

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 159

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-min-microvolt =

<2850000>;

Quoted 1 line

arch/arm/boot/dts/cros5250-common.dtsi line 160

Quoted 1 line
arch/arm/boot/dts/cros5250-common.dtsi +1 -0
+                                       regulator-max-microvolt =

<2850000>;

Quoted 15 lines
Quoted 15 lines
arch/arm/boot/dts/cros5250-common.dtsi +4 -1
+                                       regulator-always-on;
+                               };
+                       };
+               };
        };
 
        i2c at 12C70000 {
--

1.6.6.1

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

Applied
#11 lore raw

PATCH v3 1/1 ARM: DTS: CROS5250: Add max77686 device tree support

In reply to Abhilash Kesavan
Quoted 184 lines · Abhilash Kesavan

The exynos5250 based chromebooks have a max77686 pmic on i2c channel 0. Add support for the pmic in the common cros5250 dts file. Tested after enabling cpufreq support for exynos5250 SoC and varying the arm frequency/voltage using the userspace governer.

---
Changes since v1:
* Used generic names for the regulators
* Changed BUCK5 as being default "ON"
Changes since v2:
* Fixed the LDO7 name from "P1.0V_LDO_OUT7" to "P1.1V_LDO_OUT7"

 arch/arm/boot/dts/cros5250-common.dtsi |  138
++++++++++++++++++++++++++++++++
 1 files changed, 138 insertions(+), 0 deletions(-)
arch/arm/boot/dts/cros5250-common.dtsi +29 -0
index fddd174..8ab8394 100644
@@ -24,6 +24,144 @@
 		samsung,i2c-max-bus-freq = <378000>;
 		gpios = <&gpb3 0 2 3 0>,
 			<&gpb3 1 2 3 0>;
+
+		max77686 at 09 {
+			compatible = "maxim,max77686";
+			reg = <0x09>;
+
+			voltage-regulators {
+				ldo1_reg: LDO1 {
+					regulator-name =
 "P1.0V_LDO_OUT1";
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+					regulator-always-on;
+				};
+
+				ldo2_reg: LDO2 {
+					regulator-name =
 "P1.8V_LDO_OUT2";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo3_reg: LDO3 {
+					regulator-name =
 "P1.8V_LDO_OUT3";
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo7_reg: LDO7 {
+					regulator-name =

"P1.1V_LDO_OUT7";

arch/arm/boot/dts/cros5250-common.dtsi +7 -0
+					regulator-min-microvolt = <1100000>;
+					regulator-max-microvolt = <1100000>;
+					regulator-always-on;
+				};
+
+				ldo8_reg: LDO8 {
+					regulator-name =

"P1.0V_LDO_OUT8";

arch/arm/boot/dts/cros5250-common.dtsi +7 -0
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+					regulator-always-on;
+				};
+
+				ldo10_reg: LDO10 {
+					regulator-name =

"P1.8V_LDO_OUT10";

arch/arm/boot/dts/cros5250-common.dtsi +7 -0
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo12_reg: LDO12 {
+					regulator-name =

"P3.0V_LDO_OUT12";

arch/arm/boot/dts/cros5250-common.dtsi +7 -0
+					regulator-min-microvolt = <3000000>;
+					regulator-max-microvolt = <3000000>;
+					regulator-always-on;
+				};
+
+				ldo14_reg: LDO14 {
+					regulator-name =

"P1.8V_LDO_OUT14";

arch/arm/boot/dts/cros5250-common.dtsi +7 -0
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				ldo15_reg: LDO15 {
+					regulator-name =

"P1.0V_LDO_OUT15";

arch/arm/boot/dts/cros5250-common.dtsi +7 -0
+					regulator-min-microvolt = <1000000>;
+					regulator-max-microvolt = <1000000>;
+					regulator-always-on;
+				};
+
+				ldo16_reg: LDO16 {
+					regulator-name =

"P1.8V_LDO_OUT16";

arch/arm/boot/dts/cros5250-common.dtsi +39 -0
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+				};
+
+				buck1_reg: BUCK1 {
+					regulator-name = "vdd_mif";
+					regulator-min-microvolt = <950000>;
+					regulator-max-microvolt = <1300000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck2_reg: BUCK2 {
+					regulator-name = "vdd_arm";
+					regulator-min-microvolt = <850000>;
+					regulator-max-microvolt = <1350000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck3_reg: BUCK3 {
+					regulator-name = "vdd_int";
+					regulator-min-microvolt = <900000>;
+					regulator-max-microvolt = <1200000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck4_reg: BUCK4 {
+					regulator-name = "vdd_g3d";
+					regulator-min-microvolt = <850000>;
+					regulator-max-microvolt = <1300000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck5_reg: BUCK5 {
+					regulator-name =

"P1.8V_BUCK_OUT5";

arch/arm/boot/dts/cros5250-common.dtsi +8 -0
+					regulator-min-microvolt = <1800000>;
+					regulator-max-microvolt = <1800000>;
+					regulator-always-on;
+					regulator-boot-on;
+				};
+
+				buck6_reg: BUCK6 {
+					regulator-name =

"P1.35V_BUCK_OUT6";

arch/arm/boot/dts/cros5250-common.dtsi +7 -0
+					regulator-min-microvolt = <1350000>;
+					regulator-max-microvolt = <1350000>;
+					regulator-always-on;
+				};
+
+				buck7_reg: BUCK7 {
+					regulator-name =

"P2.0V_BUCK_OUT7";

arch/arm/boot/dts/cros5250-common.dtsi +7 -0
+					regulator-min-microvolt = <2000000>;
+					regulator-max-microvolt = <2000000>;
+					regulator-always-on;
+				};
+
+				buck8_reg: BUCK8 {
+					regulator-name =

"P2.85V_BUCK_OUT8";

arch/arm/boot/dts/cros5250-common.dtsi +6 -1
+					regulator-min-microvolt = <2850000>;
+					regulator-max-microvolt = <2850000>;
+					regulator-always-on;
+				};
+			};
+		};
 	};
 
 	i2c at 12C70000 {
--
Quoted 1 line

1.6.6.1

Applied, thanks.

- Kukjin