[PATCH 0/5] sunxi: Control USB VBUS supplies via DT regulators

Samuel Holland samuel at sholland.org
Tue Oct 31 07:39:50 CET 2023


This series converts sunxi boards from controlling VBUS suppllies using
GPIO name strings in Kconfig to using regulator devices probed via the
devicetree. ARCH_SUNXI already implies DM_REGULATOR_FIXED, so the only
new driver needed is for the AXP PMIC drivevbus regulator. This is part
2 of 3 for removing the PHY driver's GPIO Kconfig options. Part 1 was
here[1]. Part 3 will finish converting the VBUS/ID detection GPIOs; it
requires adding some missing DT properties to a couple of boards, so it
will have to wait for at least the next DT sync from Linux.

I tried to verify (by inspection) every board affected by this change,
but there is some possibility that this could break some boards. See the
commit message for patch 3. I have CCed some relevant board maintaners;
please test this patch series if you have the opportunity.

[1]: https://lore.kernel.org/u-boot/20230122234623.1636-1-samuel@sholland.org/


Samuel Holland (5):
  power: regulator: Add a driver for the AXP PMIC drivevbus
  sunxi: Enable PMIC drivevbus regulator support for USB supplies
  phy: sun4i-usb: Control supplies via the regulator uclass
  sunxi: Remove obsolete USBx_VBUS_PIN Kconfig symbols
  gpio: axp: Remove virtual VBUS enable GPIO

 arch/arm/mach-sunxi/Kconfig                  | 29 --------
 configs/A10s-OLinuXino-M_defconfig           |  1 -
 configs/A13-OLinuXinoM_defconfig             |  1 -
 configs/A13-OLinuXino_defconfig              |  1 -
 configs/A20-OLinuXino-Lime2-eMMC_defconfig   |  1 -
 configs/A20-OLinuXino-Lime2_defconfig        |  1 -
 configs/A20-Olimex-SOM-EVB_defconfig         |  1 -
 configs/A20-Olimex-SOM204-EVB-eMMC_defconfig |  1 -
 configs/A20-Olimex-SOM204-EVB_defconfig      |  1 -
 configs/A33-OLinuXino_defconfig              |  2 +-
 configs/Ainol_AW1_defconfig                  |  1 -
 configs/Ampe_A76_defconfig                   |  1 -
 configs/Auxtek-T003_defconfig                |  1 -
 configs/Auxtek-T004_defconfig                |  1 -
 configs/Bananapi_M2_Ultra_defconfig          |  2 -
 configs/Bananapro_defconfig                  |  2 -
 configs/CHIP_defconfig                       |  1 -
 configs/CHIP_pro_defconfig                   |  1 -
 configs/CSQ_CS908_defconfig                  |  2 -
 configs/Chuwi_V7_CW0825_defconfig            |  1 -
 configs/Colombus_defconfig                   |  1 -
 configs/Cubieboard4_defconfig                |  4 +-
 configs/Cubietruck_defconfig                 |  1 -
 configs/Cubietruck_plus_defconfig            |  4 +-
 configs/Empire_electronix_d709_defconfig     |  1 -
 configs/Empire_electronix_m712_defconfig     |  1 -
 configs/Hummingbird_A31_defconfig            |  2 -
 configs/Hyundai_A7HD_defconfig               |  3 -
 configs/Linksprite_pcDuino3_Nano_defconfig   |  1 -
 configs/Linksprite_pcDuino_defconfig         |  2 -
 configs/MSI_Primo81_defconfig                |  2 +-
 configs/Mele_A1000G_quad_defconfig           |  2 -
 configs/Mele_I7_defconfig                    |  2 -
 configs/Mele_M9_defconfig                    |  2 -
 configs/Merrii_A80_Optimus_defconfig         |  4 +-
 configs/Mini-X_defconfig                     |  1 -
 configs/Orangepi_defconfig                   |  2 -
 configs/Orangepi_mini_defconfig              |  2 -
 configs/Sinlinx_SinA31s_defconfig            |  2 -
 configs/Sinovoip_BPI_M2_defconfig            |  2 -
 configs/Sinovoip_BPI_M3_defconfig            |  3 +-
 configs/Sunchip_CX-A99_defconfig             |  3 -
 configs/UTOO_P66_defconfig                   |  1 -
 configs/Wexler_TAB7200_defconfig             |  1 -
 configs/Wobo_i5_defconfig                    |  1 -
 configs/Yones_Toptech_BD1078_defconfig       |  1 -
 configs/Yones_Toptech_BS1078_V2_defconfig    |  2 +-
 configs/ba10_tv_box_defconfig                |  2 -
 configs/bananapi_m2_berry_defconfig          |  1 -
 configs/colorfly_e708_q1_defconfig           |  2 +-
 configs/difrnce_dit4350_defconfig            |  1 -
 configs/dserve_dsrv9703c_defconfig           |  1 -
 configs/ga10h_v1_1_defconfig                 |  2 +-
 configs/gt90h_v4_defconfig                   |  2 +-
 configs/h8_homlet_v2_defconfig               |  2 -
 configs/iNet_3F_defconfig                    |  1 -
 configs/iNet_3W_defconfig                    |  1 -
 configs/iNet_86VS_defconfig                  |  1 -
 configs/iNet_D978_rev2_defconfig             |  2 +-
 configs/icnova-a20-swac_defconfig            |  2 -
 configs/inet1_defconfig                      |  1 -
 configs/inet86dz_defconfig                   |  2 +-
 configs/inet97fv2_defconfig                  |  1 -
 configs/inet98v_rev2_defconfig               |  1 -
 configs/inet9f_rev03_defconfig               |  1 -
 configs/inet_q972_defconfig                  |  2 +-
 configs/jesurun_q5_defconfig                 |  1 -
 configs/mixtile_loftq_defconfig              |  2 -
 configs/mk802_a10s_defconfig                 |  1 -
 configs/mk802_defconfig                      |  1 -
 configs/orangepi_2_defconfig                 |  1 -
 configs/orangepi_plus_defconfig              |  2 -
 configs/parrot_r16_defconfig                 |  1 -
 configs/pine_h64_defconfig                   |  1 -
 configs/polaroid_mid2407pxe03_defconfig      |  2 +-
 configs/polaroid_mid2809pxe04_defconfig      |  2 +-
 configs/pov_protab2_ips9_defconfig           |  1 -
 configs/q8_a13_tablet_defconfig              |  1 -
 configs/q8_a23_tablet_800x480_defconfig      |  2 +-
 configs/q8_a33_tablet_1024x600_defconfig     |  2 +-
 configs/q8_a33_tablet_800x480_defconfig      |  2 +-
 configs/r7-tv-dongle_defconfig               |  1 -
 configs/sun8i_a23_evb_defconfig              |  2 -
 configs/tbs_a711_defconfig                   |  2 +-
 configs/teres_i_defconfig                    |  1 -
 drivers/gpio/axp_gpio.c                      | 75 ++++++--------------
 drivers/gpio/sunxi_gpio.c                    |  8 ---
 drivers/phy/allwinner/phy-sun4i-usb.c        | 41 +++++------
 drivers/power/pmic/axp.c                     |  1 +
 drivers/power/regulator/Kconfig              |  7 ++
 drivers/power/regulator/Makefile             |  1 +
 drivers/power/regulator/axp_drivevbus.c      | 57 +++++++++++++++
 include/axp221.h                             |  4 --
 include/axp809.h                             |  4 --
 include/axp818.h                             |  4 --
 include/sunxi_gpio.h                         |  8 ---
 96 files changed, 125 insertions(+), 246 deletions(-)
 create mode 100644 drivers/power/regulator/axp_drivevbus.c

-- 
2.41.0



More information about the U-Boot mailing list