[U-Boot] [PATCH 1/2] ARM: dts: imx6q-logicpd: Keep GEN3V3 alive

The schematic shows Gen3V3 is driven by sw2_reg on the pfuze100 PMIC. Linux doesn't appear to have an issue keeping this rail up, but U-Boot shuts it down for some reason.
This patch sets 'regulator-always-on' for sw2_reg to keept this rail powered.
Signed-off-by: Adam Ford aford173@gmail.com
diff --git a/arch/arm/dts/imx6q-logicpd-u-boot.dtsi b/arch/arm/dts/imx6q-logicpd-u-boot.dtsi index 625bed8f7d..93e92aab81 100644 --- a/arch/arm/dts/imx6q-logicpd-u-boot.dtsi +++ b/arch/arm/dts/imx6q-logicpd-u-boot.dtsi @@ -16,3 +16,7 @@ &usdhc2 { u-boot,dm-spl; }; + +&sw2_reg { + regulator-always-on; +};

The pfuze100 is the PMIC connected to the I2C bus. Currently, the I2C driver is disabled which prevents the PMIC from operating.
This patch enables the I2C which also enables the PMIC in U-Boot. This also keeps the PMIC and I2C disabled in SPL due to size constraints of SPL.
Signed-off-by: Adam Ford aford173@gmail.com
diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig index ec14b8eaf6..22ecec3be3 100644 --- a/configs/imx6q_logic_defconfig +++ b/configs/imx6q_logic_defconfig @@ -22,7 +22,6 @@ CONFIG_SPL_RAW_IMAGE_SUPPORT=y CONFIG_SPL_SEPARATE_BSS=y # CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set CONFIG_SPL_DMA_SUPPORT=y -CONFIG_SPL_I2C_SUPPORT=y CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_OS_BOOT=y CONFIG_SPL_PAYLOAD="u-boot.img" @@ -64,6 +63,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 @@ -78,6 +78,7 @@ CONFIG_FEC_MXC=y CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_PINCTRL_IMX6=y +# CONFIG_SPL_PMIC_CHILDREN is not set CONFIG_DM_PMIC_PFUZE100=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_PFUZE100=y

Hi Adam,
On Tue, Oct 8, 2019 at 3:32 PM Adam Ford aford173@gmail.com wrote:
The schematic shows Gen3V3 is driven by sw2_reg on the pfuze100 PMIC. Linux doesn't appear to have an issue keeping this rail up, but U-Boot shuts it down for some reason.
This patch sets 'regulator-always-on' for sw2_reg to keept this rail powered.
Why does U-Boot shuts down sw2_reg?
sw2_reg has a consumer: &usdhc1, so it should keep turned on.
Or you don't use usdhc1 port in U-Boot?
Just want to understand this problem better.

On Tue, Oct 8, 2019 at 1:40 PM Fabio Estevam festevam@gmail.com wrote:
Hi Adam,
On Tue, Oct 8, 2019 at 3:32 PM Adam Ford aford173@gmail.com wrote:
The schematic shows Gen3V3 is driven by sw2_reg on the pfuze100 PMIC. Linux doesn't appear to have an issue keeping this rail up, but U-Boot shuts it down for some reason.
This patch sets 'regulator-always-on' for sw2_reg to keept this rail powered.
Why does U-Boot shuts down sw2_reg?
I don't know.
sw2_reg has a consumer: &usdhc1, so it should keep turned on.
I would agree.
Or you don't use usdhc1 port in U-Boot?
I do use usdhc1 powered from that rail, but if I enable I2C, the MMC initialization dies and the board hangs. It seems like a bug to me, but I'll look into that later. At least for now, I can use this as a work-around for keeping the board alive.
adam
Just want to understand this problem better.
participants (2)
-
Adam Ford
-
Fabio Estevam