arm: imx6q_logic: Enable I2C PMIC
Subsystems (2)
PATCH 1/1 arm: imx6q_logic: Enable I2C PMIC
The PMIC which powers the whole board is connected to the I2C1 bus. This patch enables I2C. With this enabled, the PMIC needs to told to keep the rail enabled, or it gets shutdown before the system boots.
arch/arm/dts/imx6q-logicpd-u-boot.dtsi +4 -0
@@ -28,3 +28,7 @@ &pinctrl_usdhc2 { u-boot,dm-spl; }; + +&sw2_reg { + regulator-always-on; +};
configs/imx6q_logic_defconfig +2 -0
@@ -9,6 +9,7 @@ CONFIG_ENV_SIZE=0x100000 CONFIG_ENV_OFFSET=0x400000 CONFIG_MX6_OCRAM_256KB=y CONFIG_TARGET_MX6LOGICPD=y +CONFIG_SYS_I2C_MXC_I2C1=y CONFIG_SPL_TEXT_BASE=0x00908000 CONFIG_SPL_MMC_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y
@@ -70,6 +71,7 @@ CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_SPL_OF_TRANSLATE=y CONFIG_PCF8575_GPIO=y +CONFIG_SYS_I2C_MXC=y CONFIG_LED=y CONFIG_LED_GPIO=y CONFIG_FSL_USDHC=y
Signature · 1 line
2.25.1
Fabio Estevam
reviewerPATCH 1/1 arm: imx6q_logic: Enable I2C PMIC
Hi Adam,
Quoted 4 lines · Adam Ford
The PMIC which powers the whole board is connected to the I2C1 bus. This patch enables I2C. With this enabled, the PMIC needs to told to keep the rail enabled, or it gets shutdown before the
Looks like a typo.
Quoted 9 lines
system boots.
Signed-off-by Adam Ford <[email protected]>arch/arm/dts/imx6q-logicpd-u-boot.dtsi +0
-0
arch/arm/dts/imx6q-logicpd-u-boot.dtsi line 34
Quoted 7 lines
arch/arm/dts/imx6q-logicpd-u-boot.dtsi +4
-0@@ -28,3 +28,7 @@ &pinctrl_usdhc2 { u-boot,dm-spl; }; + +&sw2_reg { + regulator-always-on; +};
It seems that this could be fixed in the main dts instead of the U-Boot one since this dts description is not U-Boot specific.
PATCH 1/1 arm: imx6q_logic: Enable I2C PMIC
Quoted 10 lines · Fabio Estevam
Hi Adam,
Quoted 4 lines · Adam Ford
The PMIC which powers the whole board is connected to the I2C1 bus. This patch enables I2C. With this enabled, the PMIC needs to told to keep the rail enabled, or it gets shutdown before the
Looks like a typo.
Oops.
Quoted 5 lines
Quoted 5 lines
system boots.
Signed-off-by Adam Ford <[email protected]>
Quoted 15 lines
arch/arm/dts/imx6q-logicpd-u-boot.dtsi line 34
Quoted 12 lines
arch/arm/dts/imx6q-logicpd-u-boot.dtsi +4
-0@@ -28,3 +28,7 @@ &pinctrl_usdhc2 { u-boot,dm-spl; }; + +&sw2_reg { + regulator-always-on; +};It seems that this could be fixed in the main dts instead of the U-Boot one since this dts description is not U-Boot specific.
The issue I am seeing is U-Boot specific, because Linux doesn't power this rail down. I'd rather not keep this regulator-always-on in Linux, and I want to keep the devices trees between U-Boot and Linux the same. In the device tree, I have associated this rail to the SDHC interface , but for some reason, U-Boot still powers it down, so when it tries to go and read from the SD card, the system hangs.
If you're ok with this rationale, I can update the commit message to add some of this background info to V2 when I fix the typo above.
adam
Fabio Estevam
reviewerPATCH 1/1 arm: imx6q_logic: Enable I2C PMIC
Hi Adam,
Quoted 3 lines · Adam Ford
The issue I am seeing is U-Boot specific, because Linux doesn't power this rail down. I'd rather not keep this regulator-always-on in Linux, and I want to keep the devices trees between U-Boot and Linux
Yes, I also prefer to always keep them in sync.
Quoted 3 lines
the same. In the device tree, I have associated this rail to the SDHC interface , but for some reason, U-Boot still powers it down, so when it tries to go and read from the SD card, the system hangs.
Interesting. Then this needs to be investigated, otherwise we will just paper over the real problem without understanding its root cause.
Why is U-Boot powering the regulator down?
The device tree representation of the regulators is agnostic to U-Boot or kernel, as it just represents the hardware, so I prefer that the correct regulator description is passed in the main device tree instead of hacking the specific U-Boot device tree.