Linux hangs due to commit v2015.10-15-g02cc27c on loading i2c-mv64xx
<Note this mail my look a bit weird wrt headers, I hit del to soon, so this is a new mail based on copy&paste from the http archive>
Hi All,
Quoted 13 lines · Michael Haas
I'm running Debian Jessie with Linux 4.3.0-0.bpo.1-armmp-lpae on my a20-olinuxino-lime2.
I have noticed that my board hangs with my recent u-boot versions when I load the i2c module.git-bisect narrowed the problem down to the following commit:
02cc27c74f9b884b538bcd1b93342a4c05b5d608is the first bad commit commit02cc27c74f9b884b538bcd1b93342a4c05b5d608Author: Hans de Goede <[email protected]> Date: Sat Oct 3 15:29:24 2015 +0200sunxi: power: Change axp209 LDO3 and LDO4 default to disabled
<Snip>
Quoted 9 lines
The axp209 is attached to the i2c bus, so that is likely the real culprit. In my setup, the axp209 drivers are loaded before I insert i2c-mv64xxx.
What would be the best course of action here?
* Revert the commit
* Enable LDO3 and LDO4 for the a20-olinuxino-lime2 only?
* Fix linux
I would go for option 3: "Fix linux", looking at the lime2 dts I see:
vcc_csi0: ldo3 {
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <3500000>;
regulator-always-on;
};
vcc_csi1: ldo4 {
regulator-min-microvolt = <1250000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};The regulator-always-on will cause both regulators to get turned on, but the min / max constraints match the datasheet constrains / the absolute min / max values these ldo-s can deliver, not the constraints which the board design puts on these.
So now these ldo-s end up getting turned on at whatever voltage is the default (which according to the datasheet is unknown), where as the schematic says that if these get turned on (which is not necessary) they should be run at 2.8V.
This dts file is the only axp209 using dts file which:
1) Does not have proper constraints for LDO3 / LDO4
2) Uses regulator-always-on; for these
I would suggest fixing both, first you can try making min = max = 2800000. And if that fixes things, which I expect it will, I would also drop the regulator-always-on from the dts, since we really only need to turn these on when using the csi interface in which case it would be up to the csi driver to explicitly turn them on.
Regards,
Hans
Quoted 53 lines · Hans de Goede
Quoted 3 lines
I'm running Debian Jessie with Linux 4.3.0-0.bpo.1-armmp-lpae on my a20-olinuxino-lime2.
I have noticed that my board hangs with my recent u-boot versionswhen I
Quoted 10 lines
load the i2c module.
git-bisect narrowed the problem down to the following commit:
02cc27c74f9b884b538bcd1b93342a4c05b5d608is the first bad commit commit02cc27c74f9b884b538bcd1b93342a4c05b5d608Author: Hans de Goede <[email protected]> Date: Sat Oct 3 15:29:24 2015 +0200sunxi: power: Change axp209 LDO3 and LDO4 default to disabled
<Snip>
Quoted 9 lines
The axp209 is attached to the i2c bus, so that is likely the real culprit. In my setup, the axp209 drivers are loaded before I insert i2c-mv64xxx.
What would be the best course of action here?
* Revert the commit
* Enable LDO3 and LDO4 for the a20-olinuxino-lime2 only?
* Fix linuxI would go for option 3: "Fix linux", looking at the lime2 dts I see:
vcc_csi0: ldo3 { regulator-min-microvolt = <700000>; regulator-max-microvolt = <3500000>; regulator-always-on; }; vcc_csi1: ldo4 { regulator-min-microvolt = <1250000>; regulator-max-microvolt = <3300000>; regulator-always-on; };The regulator-always-on will cause both regulators to get turned on, but the min / max constraints match the datasheet constrains / the absolute min / max values these ldo-s can deliver, not the constraints which the board design puts on these.
So now these ldo-s end up getting turned on at whatever voltage is the default (which according to the datasheet is unknown), where as the schematic says that if these get turned on (which is not necessary) they should be run at 2.8V.
This dts file is the only axp209 using dts file which:
Quoted 9 lines
1) Does not have proper constraints for LDO3 / LDO4
2) Uses regulator-always-on; for theseI would suggest fixing both, first you can try making min = max = 2800000. And if that fixes things, which I expect it will, I would also drop the regulator-always-on from the dts, since we really only need to turn these on when using the csi interface in which case it would be up to the csi driver to explicitly turn them on.
Setting the voltage to 2.8V does not seem to fix things. Dropping the 'regulator-always-on' stance does allow me to
load and use i2c-mv64xx and axp20x-i2c.
Is that something I should submit upstream or is there further investigation needed why simply setting a proper voltage does not work?
Thanks!
Michael
Hi,
Quoted 64 lines · Michael Haas
Quoted 53 lines · Hans de Goede
Quoted 3 lines
I'm running Debian Jessie with Linux 4.3.0-0.bpo.1-armmp-lpae on my a20-olinuxino-lime2.
I have noticed that my board hangs with my recent u-boot versionswhen I
Quoted 10 lines
load the i2c module.
git-bisect narrowed the problem down to the following commit:
02cc27c74f9b884b538bcd1b93342a4c05b5d608is the first bad commit commit02cc27c74f9b884b538bcd1b93342a4c05b5d608Author: Hans de Goede <[email protected]> Date: Sat Oct 3 15:29:24 2015 +0200sunxi: power: Change axp209 LDO3 and LDO4 default to disabled
<Snip>
Quoted 9 lines
The axp209 is attached to the i2c bus, so that is likely the real culprit. In my setup, the axp209 drivers are loaded before I insert i2c-mv64xxx.
What would be the best course of action here?
* Revert the commit
* Enable LDO3 and LDO4 for the a20-olinuxino-lime2 only?
* Fix linuxI would go for option 3: "Fix linux", looking at the lime2 dts I see:
vcc_csi0: ldo3 { regulator-min-microvolt = <700000>; regulator-max-microvolt = <3500000>; regulator-always-on; }; vcc_csi1: ldo4 { regulator-min-microvolt = <1250000>; regulator-max-microvolt = <3300000>; regulator-always-on; };The regulator-always-on will cause both regulators to get turned on, but the min / max constraints match the datasheet constrains / the absolute min / max values these ldo-s can deliver, not the constraints which the board design puts on these.
So now these ldo-s end up getting turned on at whatever voltage is the default (which according to the datasheet is unknown), where as the schematic says that if these get turned on (which is not necessary) they should be run at 2.8V.
This dts file is the only axp209 using dts file which:
Quoted 9 lines
1) Does not have proper constraints for LDO3 / LDO4
2) Uses regulator-always-on; for theseI would suggest fixing both, first you can try making min = max = 2800000. And if that fixes things, which I expect it will, I would also drop the regulator-always-on from the dts, since we really only need to turn these on when using the csi interface in which case it would be up to the csi driver to explicitly turn them on.
Quoted 7 lines
Setting the voltage to 2.8V does not seem to fix things. Dropping the 'regulator-always-on' stance does allow me to
load and use i2c-mv64xx and axp20x-i2c.Is that something I should submit upstream or is there further investigation needed why simply setting a proper voltage does not work?
See my reply in the kernel / dts patches thread about this, TL;DR:
Lets change the Lime defconfig to enable ldo3/4 at 2800 mV in u-boot.
Regards,
Hans