ARM: dts: exynos: Fix invalid maximum voltage for buck9 supplying SD card
Subsystems (3)
PATCH 1/1 ARM: dts: exynos: Fix invalid maximum voltage for buck9 supplying SD card
The buck9 regulator of S2MPS11 PMIC had incorrect maximum voltage - lower by 5 mV than specified by datasheet. This buck9 provides power to other regulators, including LDO13 and LDO19 which supply the MMC2 (SD card).
When constraints were applied, the depending regulators were not providing enough power, leading to SD card detection errors:
mmc1: card never left busy state
mmc1: error -110 whilst initialising SD card
---
The issue can be reproduced on next-20160324 withbae4fdc88d7f7dda1 (regulator: core: Ensure we are at least in bounds for our constraints).
--- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +1 -1
@@ -299,7 +299,7 @@ buck9_reg: BUCK9 { regulator-name = "vdd_2.8v_ldo"; regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3750000>; + regulator-max-microvolt = <3755000>; regulator-always-on; regulator-boot-on; };
Signature · 1 line
2.5.0
Quoted 5 lines · Krzysztof Kozlowski
The buck9 regulator of S2MPS11 PMIC had incorrect maximum voltage - lower by 5 mV than specified by datasheet. This buck9 provides power to other regulators, including LDO13 and LDO19 which supply the MMC2 (SD card).
Quoted 7 lines
When constraints were applied, the depending regulators were not providing enough power, leading to SD card detection errors:
mmc1: card never left busy state
mmc1: error -110 whilst initialising SD cardFixes 86a2d2ac5e5d ("ARM: dts: Add dts file for Odroid XU3 board")Signed-off-by Krzysztof Kozlowski <[email protected]>
Best Regards,
Jaehoon Chung
Quoted 23 lines
---
The issue can be reproduced on next-20160324 with
bae4fdc88d7f7dda1(regulator: core: Ensure we are at least in bounds for our constraints).--- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +1
-1@@ -299,7 +299,7 @@ buck9_reg: BUCK9 { regulator-name = "vdd_2.8v_ldo"; regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3750000>; + regulator-max-microvolt = <3755000>; regulator-always-on; regulator-boot-on; };
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 305
Quoted 8 lines · Krzysztof Kozlowski
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +1
-1buck9_reg: BUCK9 { regulator-name = "vdd_2.8v_ldo"; regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3750000>; + regulator-max-microvolt = <3755000>; regulator-always-on; regulator-boot-on; };
Why does this regulator even have voltage constraints configured? Is
there any intention that it should ever be varied at runtime?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160324/eda6862e/attachment-0001.sig>
Quoted 11 lines · Mark Brown
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 305
Quoted 8 lines · Krzysztof Kozlowski
buck9_reg: BUCK9 { regulator-name = "vdd_2.8v_ldo"; regulator-min-microvolt = <3000000>;arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +1
-1- regulator-max-microvolt = <3750000>; + regulator-max-microvolt = <3755000>; regulator-always-on; regulator-boot-on; };
Quoted 2 lines
Why does this regulator even have voltage constraints configured? Is there any intention that it should ever be varied at runtime?
Good question. I was also wondering that, if tetting it by 5 mV lower causes failure, then the constraints are actually fixed at 3.755 V. I do not know the answer. Boards schematics do not specify the requirement here, datasheet for PMIC says default value of 3.4V. Heh, maybe the regulator driver is missing proper starting value for 'vsel' (datasheet says values in register start from 0x40 -> 3 V). Something looks wrong here...
I'll look at it after weekend. For now I applied my patch to the for-next, so the next should be fixed.
Best regards,
Krzysztof
Quoted 9 lines · Krzysztof Kozlowski
Quoted 2 lines · Mark Brown
Why does this regulator even have voltage constraints configured? Is there any intention that it should ever be varied at runtime?
Good question. I was also wondering that, if tetting it by 5 mV lower causes failure, then the constraints are actually fixed at 3.755 V. I do not know the answer. Boards schematics do not specify the requirement here, datasheet for PMIC says default value of 3.4V. Heh,
For some reason people seem to frequently want to put the maximum voltage range for the regulator into the constraints even though that is almost certainly broken and generally nonsensical.
Quoted 3 lines
maybe the regulator driver is missing proper starting value for 'vsel' (datasheet says values in register start from
0x40-> 3 V). Something looks wrong here...
It's possible it's just broken and has never been tested.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160324/b51e07ed/attachment.sig>
Quoted 2 lines · Krzysztof Kozlowski
I'll look at it after weekend. For now I applied my patch to the for-next, so the next should be fixed.
Oh, and please send this to Linus - the regulator change is fixing a
problem some other boards noticed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160324/557c1498/attachment.sig>
Hi Krzysztof,
with this patch on Odroid XU4 I get the following dmesg|grep vdd_2.8v_ldo:
[ 1.739943] vdd_2.8v_ldo: override max_uV, 3755000 -> 3750000 [ 1.740905] vdd_2.8v_ldo: 3000 <--> 3750 mV at 5000 mV
Regards,
--
Markus Reichl
Am 24.03.2016 um 09:12 schrieb Krzysztof Kozlowski:
Quoted 35 lines
The buck9 regulator of S2MPS11 PMIC had incorrect maximum voltage - lower by 5 mV than specified by datasheet. This buck9 provides power to other regulators, including LDO13 and LDO19 which supply the MMC2 (SD card).
When constraints were applied, the depending regulators were not providing enough power, leading to SD card detection errors:
mmc1: card never left busy state
mmc1: error -110 whilst initialising SD cardFixes 86a2d2ac5e5d ("ARM: dts: Add dts file for Odroid XU3 board")Signed-off-by Krzysztof Kozlowski <[email protected]>---
The issue can be reproduced on next-20160324 with
bae4fdc88d7f7dda1(regulator: core: Ensure we are at least in bounds for our constraints).--- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +1
-1@@ -299,7 +299,7 @@ buck9_reg: BUCK9 { regulator-name = "vdd_2.8v_ldo"; regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3750000>; + regulator-max-microvolt = <3755000>; regulator-always-on; regulator-boot-on; };
Hello Krzysztof,
Quoted 27 lines · Krzysztof Kozlowski
The buck9 regulator of S2MPS11 PMIC had incorrect maximum voltage - lower by 5 mV than specified by datasheet. This buck9 provides power to other regulators, including LDO13 and LDO19 which supply the MMC2 (SD card).
When constraints were applied, the depending regulators were not providing enough power, leading to SD card detection errors:
mmc1: card never left busy state
mmc1: error -110 whilst initialising SD cardFixes 86a2d2ac5e5d ("ARM: dts: Add dts file for Odroid XU3 board")Signed-off-by Krzysztof Kozlowski <[email protected]>---
The issue can be reproduced on next-20160324 with
bae4fdc88d7f7dda1(regulator: core: Ensure we are at least in bounds for our constraints).--- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +0
-0
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 305
Quoted 8 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +1
-1@@ -299,7 +299,7 @@ buck9_reg: BUCK9 { regulator-name = "vdd_2.8v_ldo"; regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3750000>; + regulator-max-microvolt = <3755000>; regulator-always-on; regulator-boot-on; };
I tested next-20160324 + $SUBJECT on an Odroid XU4 (with exynos_defconfig) and while it's true that the patch makes the SD card error to go away, I see that the s2mps11 regulator driver fails to probe due an -EINVAL being return by machine_constraints_voltage() -> _regulator_do_set_voltage():
[ 1.710300] vdd_2.8v_ldo: failed to apply 3755000-3755000uV constraint(-22) [ 1.716387] s2mps11-pmic s2mps11-regulator: regulator init failed for 46 [ 1.734878] s2mps11-pmic: probe of s2mps11-regulator failed with error -22
I wonder how neither Markus nor you saw this issue when testing so maybe I'm doing something wrong? Since AFAICT it's only working because the driver fails to probe so the same effect can be achieved disabling CONFIG_REGULATOR_S2MPS11.
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
PATCH 1/1 ARM: dts: exynos: Fix invalid maximum voltage for buck9 supplying SD card
Hi Javier,
Am Freitag, 25. M?rz 2016, 02:45:20 schrieb Javier Martinez Canillas:
Quoted 48 lines
Hello Krzysztof,
Quoted 27 lines · Krzysztof Kozlowski
The buck9 regulator of S2MPS11 PMIC had incorrect maximum voltage - lower by 5 mV than specified by datasheet. This buck9 provides power to other regulators, including LDO13 and LDO19 which supply the MMC2 (SD card).
When constraints were applied, the depending regulators were not providing enough power, leading to SD card detection errors:
mmc1: card never left busy state
mmc1: error -110 whilst initialising SD cardFixes 86a2d2ac5e5d ("ARM: dts: Add dts file for Odroid XU3 board")Signed-off-by Krzysztof Kozlowski <[email protected]>---
The issue can be reproduced on next-20160324 with
bae4fdc88d7f7dda1(regulator: core: Ensure we are at least in bounds for our constraints).--- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +0
-0arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 305
Quoted 8 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +1
-1@@ -299,7 +299,7 @@ buck9_reg: BUCK9 { regulator-name = "vdd_2.8v_ldo"; regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3750000>; + regulator-max-microvolt = <3755000>; regulator-always-on; regulator-boot-on; };I tested next-20160324 + $SUBJECT on an Odroid XU4 (with
exynos_defconfig) and while it's true that the patch makes the SD card error to go away, I see that the s2mps11 regulator driver fails to probe due an-EINVALbeing return bymachine_constraints_voltage()->_regulator_do_set_voltage():[ 1.710300] vdd_2.8v_ldo: failed to apply 3755000-3755000uV constraint(-22) [ 1.716387] s2mps11-pmic s2mps11-regulator: regulator init failed for 46 [ 1.734878] s2mps11-pmic: probe of s2mps11-regulator failed with error -22
Quoted 6 lines
I wonder how neither Markus nor you saw this issue when testing so maybe I'm doing something wrong? Since AFAICT it's only working because the driver fails to probe so the same effect can be achieved disabling
CONFIG_REGULATOR_S2MPS11.Best regards,
My first test yesterday was with next-20160324 + $SUBJECT, too, and I encountered the same error of the regulator system as you.
As with next-20160324 I could not get the ethernet chip running (with or without $SUBJECT) I switched back to next-20160323 + $SUBJECT and posted the result above.
Regards,
--
Markus
Hi Javier,
Am Freitag, 25. M?rz 2016, 02:45:20 schrieb Javier Martinez Canillas:
Quoted 48 lines
Hello Krzysztof,
Quoted 27 lines · Krzysztof Kozlowski
The buck9 regulator of S2MPS11 PMIC had incorrect maximum voltage - lower by 5 mV than specified by datasheet. This buck9 provides power to other regulators, including LDO13 and LDO19 which supply the MMC2 (SD card).
When constraints were applied, the depending regulators were not providing enough power, leading to SD card detection errors:
mmc1: card never left busy state
mmc1: error -110 whilst initialising SD cardFixes 86a2d2ac5e5d ("ARM: dts: Add dts file for Odroid XU3 board")Signed-off-by Krzysztof Kozlowski <[email protected]>---
The issue can be reproduced on next-20160324 with
bae4fdc88d7f7dda1(regulator: core: Ensure we are at least in bounds for our constraints).--- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +0
-0arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 305
Quoted 8 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +1
-1@@ -299,7 +299,7 @@ buck9_reg: BUCK9 { regulator-name = "vdd_2.8v_ldo"; regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3750000>; + regulator-max-microvolt = <3755000>; regulator-always-on; regulator-boot-on; };I tested next-20160324 + $SUBJECT on an Odroid XU4 (with
exynos_defconfig) and while it's true that the patch makes the SD card error to go away, I see that the s2mps11 regulator driver fails to probe due an-EINVALbeing return bymachine_constraints_voltage()->_regulator_do_set_voltage():[ 1.710300] vdd_2.8v_ldo: failed to apply 3755000-3755000uV constraint(-22) [ 1.716387] s2mps11-pmic s2mps11-regulator: regulator init failed for 46 [ 1.734878] s2mps11-pmic: probe of s2mps11-regulator failed with error -22
Quoted 6 lines
I wonder how neither Markus nor you saw this issue when testing so maybe I'm doing something wrong? Since AFAICT it's only working because the driver fails to probe so the same effect can be achieved disabling
CONFIG_REGULATOR_S2MPS11.Best regards,
My first test yesterday was with next-20160324 + $SUBJECT, too, and I encountered the same error of the regulator system as you.
As with next-20160324 I could not get the ethernet chip running (with or without $SUBJECT) I switched back to next-20160323 + $SUBJECT and posted the result above.
Regards,
--
Markus
Quoted 44 lines · Javier Martinez Canillas
Hello Krzysztof,
Quoted 27 lines · Krzysztof Kozlowski
The buck9 regulator of S2MPS11 PMIC had incorrect maximum voltage - lower by 5 mV than specified by datasheet. This buck9 provides power to other regulators, including LDO13 and LDO19 which supply the MMC2 (SD card).
When constraints were applied, the depending regulators were not providing enough power, leading to SD card detection errors:
mmc1: card never left busy state
mmc1: error -110 whilst initialising SD cardFixes 86a2d2ac5e5d ("ARM: dts: Add dts file for Odroid XU3 board")Signed-off-by Krzysztof Kozlowski <[email protected]>---
The issue can be reproduced on next-20160324 with
bae4fdc88d7f7dda1(regulator: core: Ensure we are at least in bounds for our constraints).--- arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +0
-0arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 305
Quoted 8 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +1
-1@@ -299,7 +299,7 @@ buck9_reg: BUCK9 { regulator-name = "vdd_2.8v_ldo"; regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3750000>; + regulator-max-microvolt = <3755000>; regulator-always-on; regulator-boot-on; };I tested next-20160324 + $SUBJECT on an Odroid XU4 (with
exynos_defconfig) and while it's true that the patch makes the SD card error to go away, I see that the s2mps11 regulator driver fails to probe due an-EINVALbeing return bymachine_constraints_voltage()->_regulator_do_set_voltage():
Quoted 3 lines
[ 1.710300] vdd_2.8v_ldo: failed to apply 3755000-3755000uV constraint(-22) [ 1.716387] s2mps11-pmic s2mps11-regulator: regulator init failed for 46 [ 1.734878] s2mps11-pmic: probe of s2mps11-regulator failed with error -22
Oh, damn, so the fix was only because driver failed to probe (which I missed). This explains Friday's next failures. I'll drop it from next because it makes more harm than good...
BR,
Krzysztof
Quoted 6 lines
I wonder how neither Markus nor you saw this issue when testing so maybe I'm doing something wrong? Since AFAICT it's only working because the driver fails to probe so the same effect can be achieved disabling
CONFIG_REGULATOR_S2MPS11.Best regards,