]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: imx: Remove PMIC reset configuration from board files
authorMarek Vasut <marex@denx.de>
Fri, 9 Dec 2022 19:35:47 +0000 (20:35 +0100)
committerStefano Babic <sbabic@denx.de>
Mon, 30 Jan 2023 22:23:01 +0000 (23:23 +0100)
The PCA9450 reset configuration can now be performed by the PCA9450 PMIC
driver itself, remove the hard-coded variant from board code and let the
PMIC driver perform this task using one-liner:

```
$ sed -i '/set WDOG_B_CFG to cold reset/,+2 d' $(git grep -l PCA9450_RESET_CTRL.*0xA1 board/)
```

Venice and i.MX93 EVK required slight manual fix up.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
board/advantech/imx8mp_rsb3720a1/spl.c
board/dhelectronics/dh_imx8mp/spl.c
board/engicam/imx8mp/spl.c
board/freescale/imx8mm_evk/spl.c
board/freescale/imx8mn_evk/spl.c
board/freescale/imx8mp_evk/spl.c
board/freescale/imx93_evk/spl.c
board/gateworks/venice/spl.c
board/kontron/sl-mx8mm/spl.c
board/toradex/verdin-imx8mm/spl.c
board/toradex/verdin-imx8mp/spl.c

index 6cc8c23ecf87ce3682257238b4573409eb6b04c5..f4257bc993d6051628729b345f3e45267beab78f 100644 (file)
@@ -209,9 +209,6 @@ int power_init_board(void)
        /* To avoid timing risk from SOC to ARM,increase VDD_ARM to OD voltage 0.95v */
        pmic_reg_write(pdev, PCA9450_BUCK2OUT_DVS0, 0x1C);
 
-       /* set WDOG_B_CFG to cold reset */
-       pmic_reg_write(pdev, PCA9450_RESET_CTRL, 0xA1);
-
        /* Forced enable the I2C level translator*/
        pmic_reg_write(pdev, PCA9450_CONFIG2, 0x03);
 
index 312e4b969840d96e9844b763a22e82d2c45349b1..95de74556af565741ed746ad2cfcbd5774d5c3f2 100644 (file)
@@ -88,9 +88,6 @@ static int dh_imx8mp_board_power_init(void)
        /* To avoid timing risk from SoC to ARM, increase VDD_ARM to OD voltage 0.95V */
        pmic_reg_write(dev, PCA9450_BUCK2OUT_DVS0, 0x1c);
 
-       /* Set WDOG_B_CFG to cold reset. */
-       pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1);
-
        /* Set LDO4 and CONFIG2 to enable the I2C level translator. */
        pmic_reg_write(dev, PCA9450_LDO4CTRL, 0x59);
        pmic_reg_write(dev, PCA9450_CONFIG2, 0x1);
index 6a16d58ae5aa235cef61d26d24a3595ebc333599..36b83aace392cead37fb16ac424e510af3f4d046 100644 (file)
@@ -95,9 +95,6 @@ int power_init_board(void)
        pmic_reg_write(p, PCA9450_BUCK6OUT, 0x18);
 #endif
 
-       /* set WDOG_B_CFG to cold reset */
-       pmic_reg_write(p, PCA9450_RESET_CTRL, 0xA1);
-
        return 0;
 }
 #endif
index b5a2faf3a189c3a1d8012a4fe02568288fe23df3..6e9513805cdd49a176ee7e673a3ab6d94e8a0e56 100644 (file)
@@ -99,9 +99,6 @@ static int power_init_board(void)
        /* set VDD_SNVS_0V8 from default 0.85V */
        pmic_reg_write(dev, PCA9450_LDO2CTRL, 0xC0);
 
-       /* set WDOG_B_CFG to cold reset */
-       pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1);
-
        return 0;
 }
 
index 380abecd7460198bf0e92bd60c37a022476774ba..ec0378b5b7688ecdc2eb9d74f7abfa8d62a4897e 100644 (file)
@@ -95,9 +95,6 @@ int power_init_board(void)
        /* enable LDO4 to 1.2v */
        pmic_reg_write(dev, PCA9450_LDO4CTRL, 0x44);
 
-       /* set WDOG_B_CFG to cold reset */
-       pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1);
-
        return 0;
 }
 #endif
index f1b285417d076517fabc663f3c9a7df67eaf6cbe..246826a0d482f8e8b57acf151a9a2c344399895e 100644 (file)
@@ -102,9 +102,6 @@ int power_init_board(void)
        /* To avoid timing risk from SOC to ARM,increase VDD_ARM to OD voltage 0.95v */
        pmic_reg_write(p, PCA9450_BUCK2OUT_DVS0, 0x1C);
 
-       /* set WDOG_B_CFG to cold reset */
-       pmic_reg_write(p, PCA9450_RESET_CTRL, 0xA1);
-
        return 0;
 }
 #endif
index 38cfbac6ea66f49cd96e0ac88493d423dc677202..1aa2977b409d34db437a37fc7945dbc31e184283 100644 (file)
@@ -74,9 +74,6 @@ int power_init_board(void)
 
        /* I2C_LT_EN*/
        pmic_reg_write(dev, 0xa, 0x3);
-
-       /* set WDOG_B_CFG to cold reset */
-       pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1);
        return 0;
 }
 #endif
index e06de8bb54c7063b85f64ab51fc60ec147a37a58..60830766ca92a4d9cb63d82a7f5403900faeed5e 100644 (file)
@@ -165,9 +165,6 @@ static int power_init_board(void)
                /* Kernel uses OD/OD freq for SOC */
                /* To avoid timing risk from SOC to ARM, increase VDD_ARM to OD voltage 0.95v */
                dm_i2c_reg_write(dev, PCA9450_BUCK2OUT_DVS0, 0x1C);
-
-               /* set WDOG_B_CFG to cold reset */
-               dm_i2c_reg_write(dev, PCA9450_RESET_CTRL, 0xA1);
        }
 
        else if ((!strncmp(model, "GW7901", 6)) ||
index 25ee925ceb07aea8da3373400a3fca02045a5d64..3a919d0a9c3778b4609b40849c2a904db32432cb 100644 (file)
@@ -193,9 +193,6 @@ static int power_init_board(void)
        /* set VDD_SNVS_0V8 from default 0.85V to 0.8V */
        pmic_reg_write(dev, PCA9450_LDO2CTRL, 0xC0);
 
-       /* set WDOG_B_CFG to cold reset */
-       pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1);
-
        return 0;
 }
 
index 210665bd6a9a75a8c4fd78301896654df9828cd0..9d54d60bb17d4b0981559a7e448298e41454d9c3 100644 (file)
@@ -92,9 +92,6 @@ int power_init_board(void)
                /* increase VDD_DRAM to 0.975v for 1.5Ghz DDR */
                pmic_reg_write(dev, PCA9450_BUCK3OUT_DVS0, 0x1c);
 
-               /* set WDOG_B_CFG to cold reset */
-               pmic_reg_write(dev, PCA9450_RESET_CTRL, 0xA1);
-
                pmic_reg_write(dev, PCA9450_CONFIG2, 0x1);
 
                return 0;
index 1838b464a0d0b8dd0d5c9be2d2aceac91fcd77c8..ea99e37085047a4a0b3769fc67a8b79ce581c46d 100644 (file)
@@ -116,9 +116,6 @@ int power_init_board(void)
        /* To avoid timing risk from SoC to ARM, increase VDD_ARM to OD voltage 0.95v */
        pmic_reg_write(p, PCA9450_BUCK2OUT_DVS0, 0x1c);
 
-       /* set WDOG_B_CFG to cold reset */
-       pmic_reg_write(p, PCA9450_RESET_CTRL, 0xA1);
-
        /* set LDO4 and CONFIG2 to enable the I2C level translator */
        pmic_reg_write(p, PCA9450_LDO4CTRL, 0x59);
        pmic_reg_write(p, PCA9450_CONFIG2, 0x1);