Skip to contentSkip to conversation

ARM: dts: sun8i-q8-common: Do not set constraints on dc1sw

PATCH New Hans de Goede 2 participants 3 messages Mar 9, 2016 – Mar 15, 2016

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

cover ARM: dts: sun8i-q8-common: Do not set constraints on dc1sw

Hi Maxime, Chen-yu,

As I mailed you about a week ago, I was having problems getting linux-sunxi/sunxi-next to boot on sun8i q8 tablets because of the new axp223 regulator support. This patch fixes things for me.

I'm not 100% sure this is the right solution, but I could not find another way, and the fix is harmless since we also constrain dcdc1 itself to the same values as the constrains we are now removing from dc1sw.

Regards,

Hans

#1 lore raw

PATCH 1/1 ARM: dts: sun8i-q8-common: Do not set constraints on dc1sw regulator

dc1sw is an on/off only regulator and as such it cannot have constraints.

This is a limitation of the kernel regulator implementation which resolves supplies on the first regulator_get(), which is done after applying constraints, and applying the constrains will fail because it calls _regulator_get_voltage() and _regulator_do_set_voltage() both of which will fail on a switch regulator when there is no supply (yet).

This causes registering of all axp22x regulators to fail with the following errors:

[    1.395249] vcc-lcd: failed to get the current voltage(-22)
[    1.405131] axp20x-regulator axp20x-regulator: Failed to register dc1sw
[    1.412436] axp20x-regulator: probe of axp20x-regulator failed with error -22

This commit removes the constrains on dc1sw / vcc-lcd fixing this problem note that dcdc1 itself is contrained to the exact same values, so this does not change anything.

---
 arch/arm/boot/dts/sun8i-q8-common.dtsi | 2 --
 1 file changed, 2 deletions(-)
arch/arm/boot/dts/sun8i-q8-common.dtsi +0 -2
index fce6aa3..982c8ef 100644
@@ -144,8 +144,6 @@
 };
 
 &reg_dc1sw {
-	regulator-min-microvolt = <3000000>;
-	regulator-max-microvolt = <3000000>;
 	regulator-name = "vcc-lcd";
 };
 
Signature · 1 line
2.7.2
#2 lore raw

PATCH 1/1 ARM: dts: sun8i-q8-common: Do not set constraints on dc1sw regulator

Quoted 15 lines · Hans de Goede

dc1sw is an on/off only regulator and as such it cannot have constraints.

This is a limitation of the kernel regulator implementation which resolves supplies on the first regulator_get(), which is done after applying constraints, and applying the constrains will fail because it calls _regulator_get_voltage() and _regulator_do_set_voltage() both of which will fail on a switch regulator when there is no supply (yet).

This causes registering of all axp22x regulators to fail with the following errors:

[    1.395249] vcc-lcd: failed to get the current voltage(-22)
[    1.405131] axp20x-regulator axp20x-regulator: Failed to register dc1sw
[    1.412436] axp20x-regulator: probe of axp20x-regulator failed with error -22
Quoted 5 lines

This commit removes the constrains on dc1sw / vcc-lcd fixing this problem note that dcdc1 itself is contrained to the exact same values, so this does not change anything.

Queued this as fixes for 4.6.

Thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160315/9b6b9b45/attachment-0001.sig>