imx8mm_evk: Switch to new imx8mm evk board

Update PMIC to use PCA9540, the legacy board not supported by NXP

Signed-off-by: Ye Li <ye.li@nxp.com>
This commit is contained in:
Ye Li 2021-03-19 15:56:55 +08:00 committed by Stefano Babic
parent cf16dc3329
commit 48ddafd9a4
4 changed files with 86 additions and 80 deletions

View File

@ -114,11 +114,11 @@
u-boot,dm-spl; u-boot,dm-spl;
}; };
&{/soc@0/bus@30800000/i2c@30a20000/pmic@4b} { &{/soc@0/bus@30800000/i2c@30a20000/pca9450@25} {
u-boot,dm-spl; u-boot,dm-spl;
}; };
&{/soc@0/bus@30800000/i2c@30a20000/pmic@4b/regulators} { &{/soc@0/bus@30800000/i2c@30a20000/pca9450@25/regulators} {
u-boot,dm-spl; u-boot,dm-spl;
}; };

View File

@ -126,115 +126,120 @@
pinctrl-0 = <&pinctrl_i2c1>; pinctrl-0 = <&pinctrl_i2c1>;
status = "okay"; status = "okay";
pmic@4b { pmic: pca9450@25 {
compatible = "rohm,bd71847"; reg = <0x25>;
reg = <0x4b>; compatible = "nxp,pca9450a";
pinctrl-names = "default"; /* PMIC PCA9450 PMIC_nINT GPIO1_IO3 */
pinctrl-0 = <&pinctrl_pmic>; pinctrl-0 = <&pinctrl_pmic>;
interrupt-parent = <&gpio1>; gpio_intr = <&gpio1 3 GPIO_ACTIVE_LOW>;
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
rohm,reset-snvs-powered;
#clock-cells = <0>;
clocks = <&osc_32k 0>;
clock-output-names = "clk-32k-out";
regulators { regulators {
buck1_reg: BUCK1 { #address-cells = <1>;
regulator-name = "buck1"; #size-cells = <0>;
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>; pca9450,pmic-buck2-uses-i2c-dvs;
/* Run/Standby voltage */
pca9450,pmic-buck2-dvs-voltage = <950000>, <850000>;
buck1_reg: regulator@0 {
reg = <0>;
regulator-compatible = "buck1";
regulator-min-microvolt = <600000>;
regulator-max-microvolt = <2187500>;
regulator-boot-on; regulator-boot-on;
regulator-always-on; regulator-always-on;
regulator-ramp-delay = <1250>; regulator-ramp-delay = <3125>;
}; };
buck2_reg: BUCK2 { buck2_reg: regulator@1 {
regulator-name = "buck2"; reg = <1>;
regulator-min-microvolt = <700000>; regulator-compatible = "buck2";
regulator-max-microvolt = <1300000>; regulator-min-microvolt = <600000>;
regulator-max-microvolt = <2187500>;
regulator-boot-on; regulator-boot-on;
regulator-always-on; regulator-always-on;
regulator-ramp-delay = <1250>; regulator-ramp-delay = <3125>;
rohm,dvs-run-voltage = <1000000>;
rohm,dvs-idle-voltage = <900000>;
}; };
buck3_reg: BUCK3 { buck3_reg: regulator@2 {
// BUCK5 in datasheet reg = <2>;
regulator-name = "buck3"; regulator-compatible = "buck3";
regulator-min-microvolt = <700000>; regulator-min-microvolt = <600000>;
regulator-max-microvolt = <1350000>; regulator-max-microvolt = <2187500>;
regulator-boot-on; regulator-boot-on;
regulator-always-on; regulator-always-on;
}; };
buck4_reg: BUCK4 { buck4_reg: regulator@3 {
// BUCK6 in datasheet reg = <3>;
regulator-name = "buck4"; regulator-compatible = "buck4";
regulator-min-microvolt = <3000000>; regulator-min-microvolt = <600000>;
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3400000>;
regulator-boot-on; regulator-boot-on;
regulator-always-on; regulator-always-on;
}; };
buck5_reg: BUCK5 { buck5_reg: regulator@4 {
// BUCK7 in datasheet reg = <4>;
regulator-name = "buck5"; regulator-compatible = "buck5";
regulator-min-microvolt = <1605000>; regulator-min-microvolt = <600000>;
regulator-max-microvolt = <1995000>; regulator-max-microvolt = <3400000>;
regulator-boot-on; regulator-boot-on;
regulator-always-on; regulator-always-on;
}; };
buck6_reg: BUCK6 { buck6_reg: regulator@5 {
// BUCK8 in datasheet reg = <5>;
regulator-name = "buck6"; regulator-compatible = "buck6";
regulator-min-microvolt = <800000>; regulator-min-microvolt = <600000>;
regulator-max-microvolt = <1400000>; regulator-max-microvolt = <3400000>;
regulator-boot-on; regulator-boot-on;
regulator-always-on; regulator-always-on;
}; };
ldo1_reg: LDO1 { ldo1_reg: regulator@6 {
regulator-name = "ldo1"; reg = <6>;
regulator-compatible = "ldo1";
regulator-min-microvolt = <1600000>; regulator-min-microvolt = <1600000>;
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
regulator-boot-on; regulator-boot-on;
regulator-always-on; regulator-always-on;
}; };
ldo2_reg: LDO2 { ldo2_reg: regulator@7 {
regulator-name = "ldo2"; reg = <7>;
regulator-compatible = "ldo2";
regulator-min-microvolt = <800000>; regulator-min-microvolt = <800000>;
regulator-max-microvolt = <900000>; regulator-max-microvolt = <1150000>;
regulator-boot-on; regulator-boot-on;
regulator-always-on; regulator-always-on;
}; };
ldo3_reg: LDO3 { ldo3_reg: regulator@8 {
regulator-name = "ldo3"; reg = <8>;
regulator-min-microvolt = <1800000>; regulator-compatible = "ldo3";
regulator-min-microvolt = <800000>;
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
regulator-boot-on; regulator-boot-on;
regulator-always-on; regulator-always-on;
}; };
ldo4_reg: LDO4 { ldo4_reg: regulator@9 {
regulator-name = "ldo4"; reg = <9>;
regulator-min-microvolt = <900000>; regulator-compatible = "ldo4";
regulator-max-microvolt = <1800000>; regulator-min-microvolt = <800000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on; regulator-boot-on;
regulator-always-on; regulator-always-on;
}; };
ldo6_reg: LDO6 { ldo5_reg: regulator@10 {
regulator-name = "ldo6"; reg = <10>;
regulator-min-microvolt = <900000>; regulator-compatible = "ldo5";
regulator-max-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-boot-on; regulator-max-microvolt = <3300000>;
regulator-always-on;
}; };
}; };
}; };
}; };

View File

@ -26,7 +26,7 @@
#include <dm/device-internal.h> #include <dm/device-internal.h>
#include <power/pmic.h> #include <power/pmic.h>
#include <power/bd71837.h> #include <power/pca9450.h>
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
@ -94,7 +94,7 @@ static int power_init_board(void)
struct udevice *dev; struct udevice *dev;
int ret; int ret;
ret = pmic_get("pmic@4b", &dev); ret = pmic_get("pca9450@25", &dev);
if (ret == -ENODEV) { if (ret == -ENODEV) {
puts("No pmic\n"); puts("No pmic\n");
return 0; return 0;
@ -102,25 +102,26 @@ static int power_init_board(void)
if (ret != 0) if (ret != 0)
return ret; return ret;
/* decrease RESET key long push time from the default 10s to 10ms */ /* BUCKxOUT_DVS0/1 control BUCK123 output */
pmic_reg_write(dev, BD718XX_PWRONCONFIG1, 0x0); pmic_reg_write(dev, PCA9450_BUCK123_DVS, 0x29);
/* unlock the PMIC regs */ /* Buck 1 DVS control through PMIC_STBY_REQ */
pmic_reg_write(dev, BD718XX_REGLOCK, 0x1); pmic_reg_write(dev, PCA9450_BUCK1CTRL, 0x59);
/* increase VDD_SOC to typical value 0.85v before first DRAM access */ /* Set DVS1 to 0.8v for suspend */
pmic_reg_write(dev, BD718XX_BUCK1_VOLT_RUN, 0x0f); pmic_reg_write(dev, PCA9450_BUCK1OUT_DVS1, 0x10);
/* increase VDD_DRAM to 0.975v for 3Ghz DDR */ /* increase VDD_DRAM to 0.95v for 3Ghz DDR */
pmic_reg_write(dev, BD718XX_1ST_NODVS_BUCK_VOLT, 0x83); pmic_reg_write(dev, PCA9450_BUCK3OUT_DVS0, 0x1C);
#ifndef CONFIG_IMX8M_LPDDR4 /* VDD_DRAM needs off in suspend, set B1_ENMODE=10 (ON by PMIC_ON_REQ = H && PMIC_STBY_REQ = L) */
/* increase NVCC_DRAM_1V2 to 1.2v for DDR4 */ pmic_reg_write(dev, PCA9450_BUCK3CTRL, 0x4a);
pmic_reg_write(dev, BD718XX_4TH_NODVS_BUCK_VOLT, 0x28);
#endif
/* lock the PMIC regs */ /* set VDD_SNVS_0V8 from default 0.85V */
pmic_reg_write(dev, BD718XX_REGLOCK, 0x11); pmic_reg_write(dev, PCA9450_LDO2CTRL, 0xC0);
/* set WDOG_B_CFG to cold reset */
pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1);
return 0; return 0;
} }

View File

@ -83,7 +83,7 @@ CONFIG_PINCTRL=y
CONFIG_SPL_PINCTRL=y CONFIG_SPL_PINCTRL=y
CONFIG_PINCTRL_IMX8M=y CONFIG_PINCTRL_IMX8M=y
CONFIG_DM_PMIC=y CONFIG_DM_PMIC=y
CONFIG_SPL_DM_PMIC_BD71837=y CONFIG_SPL_DM_PMIC_PCA9450=y
CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y CONFIG_DM_REGULATOR_GPIO=y