Commit 5e959ab85e56843aff39880430ebf25f4676a44e

Authored by Patrick Delaunay
Committed by Patrice Chotard
1 parent 55f9cd2afe

stm32mp1: board: Update the way vdd-supply is retrieved from DT

Due to kernel DT alignment, pwr-supply is renamed to vdd-supply
and is a subnode of pwr-regulators.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>

Showing 4 changed files with 17 additions and 6 deletions Side-by-side Diff

arch/arm/dts/stm32mp157a-avenger96.dts
... ... @@ -283,7 +283,10 @@
283 283 };
284 284  
285 285 &pwr {
286   - pwr-supply = <&vdd>;
  286 + pwr-regulators {
  287 + vdd-supply = <&vdd>;
  288 + vdd_3v3_usbfs-supply = <&vdd_usb>;
  289 + };
287 290 };
288 291  
289 292 &rng1 {
arch/arm/dts/stm32mp157a-dk1.dts
... ... @@ -308,7 +308,10 @@
308 308 };
309 309  
310 310 &pwr {
311   - pwr-supply = <&vdd>;
  311 + pwr-regulators {
  312 + vdd-supply = <&vdd>;
  313 + vdd_3v3_usbfs-supply = <&vdd_usb>;
  314 + };
312 315 };
313 316  
314 317 &rng1 {
arch/arm/dts/stm32mp157c-ed1.dts
... ... @@ -218,7 +218,10 @@
218 218 };
219 219  
220 220 &pwr {
221   - pwr-supply = <&vdd>;
  221 + pwr-regulators {
  222 + vdd-supply = <&vdd>;
  223 + vdd_3v3_usbfs-supply = <&vdd_usb>;
  224 + };
222 225 };
223 226  
224 227 &rng1 {
board/st/stm32mp1/stm32mp1.c
... ... @@ -472,7 +472,9 @@
472 472 * => U-Boot set the register only if VDD < 2.7V (in DT)
473 473 * but this value need to be consistent with board design
474 474 */
475   - ret = syscon_get_by_driver_data(STM32MP_SYSCON_PWR, &pwr_dev);
  475 + ret = uclass_get_device_by_driver(UCLASS_PMIC,
  476 + DM_GET_DRIVER(stm32mp_pwr_pmic),
  477 + &pwr_dev);
476 478 if (!ret) {
477 479 ret = uclass_get_device_by_driver(UCLASS_MISC,
478 480 DM_GET_DRIVER(stm32mp_bsec),
... ... @@ -486,8 +488,8 @@
486 488 if (!ret)
487 489 otp = otp & BIT(13);
488 490  
489   - /* get VDD = pwr-supply */
490   - ret = device_get_supply_regulator(pwr_dev, "pwr-supply",
  491 + /* get VDD = vdd-supply */
  492 + ret = device_get_supply_regulator(pwr_dev, "vdd-supply",
491 493 &pwr_reg);
492 494  
493 495 /* check if VDD is Low Voltage */