diff options
author | Tom Rini <trini@konsulko.com> | 2022-10-18 07:36:39 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-10-18 07:36:39 -0400 |
commit | d3031d442b941f059eb83bb67ca10a28a0539f9a (patch) | |
tree | 13a07d04d5ad600973b2d2086a8edaba35c5658c /board/dhelectronics/dh_stm32mp1/board.c | |
parent | 17196e446b6ea11220c3e08cebff839f999e0185 (diff) | |
parent | c37a6684818d41051c54f814863429536aa972be (diff) |
Merge tag 'u-boot-stm32-20221018' of https://source.denx.de/u-boot/custodians/u-boot-stm
- stm32mp: fix compilation issue with DEBUG_UART
- DT update :
- Remove buck3 regulator-always-on on AV96
- Enable btrfs support on DHSOM
- Drop extra newline from AV96 U-Boot extras DT
- Add DHCOR based Testbench board
- Fix and expand PLL configuration comments
- update SCMI dedicated file
Diffstat (limited to 'board/dhelectronics/dh_stm32mp1/board.c')
-rw-r--r-- | board/dhelectronics/dh_stm32mp1/board.c | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c index 2bc0d7b943a..8d8104ad4bd 100644 --- a/board/dhelectronics/dh_stm32mp1/board.c +++ b/board/dhelectronics/dh_stm32mp1/board.c @@ -547,7 +547,7 @@ static int board_get_regulator_buck3_nvm_uv_av96(int *uv) if (!prop || !len) return -ENODEV; - if (!strstr(prop, "avenger96")) + if (!strstr(prop, "avenger96") && !strstr(prop, "dhcor-testbench")) return -EINVAL; /* Read out STPMIC1 NVM and determine default Buck3 voltage. */ @@ -564,18 +564,32 @@ static int board_get_regulator_buck3_nvm_uv_av96(int *uv) bucks_vout >>= STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_OFFSET(3); bucks_vout &= STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_MASK; - /* - * Avenger96 board comes in multiple regulator configurations: - * - rev.100 or rev.200 have Buck3 preconfigured to 3V3 operation on - * boot and contains extra Enpirion EP53A8LQI DCDC converter which - * supplies the IO. Reduce Buck3 voltage to 2V9 to not waste power. - * - rev.200L have Buck3 preconfigured to 1V8 operation and have no - * Enpirion EP53A8LQI DCDC anymore, the IO is supplied from Buck3. - */ - if (bucks_vout == STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_3V3) - *uv = 2900000; - else - *uv = 1800000; + if (strstr(prop, "avenger96")) { + /* + * Avenger96 board comes in multiple regulator configurations: + * - rev.100 or rev.200 have Buck3 preconfigured to + * 3V3 operation on boot and contains extra Enpirion + * EP53A8LQI DCDC converter which supplies the IO. + * Reduce Buck3 voltage to 2V9 to not waste power. + * - rev.200L have Buck3 preconfigured to 1V8 operation + * and have no Enpirion EP53A8LQI DCDC anymore, the + * IO is supplied from Buck3. + */ + if (bucks_vout == STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_3V3) + *uv = 2900000; + else + *uv = 1800000; + } else { + /* Testbench always respects Buck3 NVM settings */ + if (bucks_vout == STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_3V3) + *uv = 3300000; + else if (bucks_vout == STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_3V0) + *uv = 3000000; + else if (bucks_vout == STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_1V8) + *uv = 1800000; + else /* STPMIC_NVM_BUCKS_VOUT_SHR_BUCK_1V2 */ + *uv = 1200000; + } return 0; } @@ -595,6 +609,7 @@ static void board_init_regulator_av96(void) /* Adjust Buck3 per preconfigured PMIC voltage from NVM. */ regulator_set_value(rdev, uv); + regulator_set_enable(rdev, true); } static void board_init_regulator(void) |