ARM Sunxi Platform Development
 help / color / mirror / Atom feed
* [PATCH v2 0/8] sunxi: Control USB pins and supplies via DT regulators
@ 2025-04-09  0:20 Andre Przywara
  2025-04-09  0:20 ` [PATCH v2 1/8] power: regulator: Add a driver for the AXP PMIC drivevbus Andre Przywara
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Andre Przywara @ 2025-04-09  0:20 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Samuel Holland, Tom Rini, Simon Glass, Hans de Goede,
	Olliver Schinagl, Iain Paton, Marcus Cooper, Stefan Mavrodiev,
	Paul Kocialkowski, Chen-Yu Tsai, Maxime Ripard, Ian Campbell,
	Adam Sampson, Zoltan Herpai, Siarhei Siamashka, VishnuPatekar,
	Rask Ingemann Lambertsen, Aleksei Mamlin, Peter Korsgaard,
	Michal Suchanek, Icenowy Zheng, Stefan Roese, Phil Han,
	Jernej Skrabec, Quentin Schulz, Jonas Smedegaard, Jaehoon Chung,
	Heiko Schocher, u-boot, linux-sunxi

This series removes some old custom non-DM code from the Allwinner USB
PHY driver. So far we were relying on Kconfig specified GPIO names for
the VBUS power supplies, USB ID detect pin and the VBUS detect pin.

The first 5 patches resurrect Samuel's series from 1.5 years ago, fixing
one issue that prevented this series from being merged earlier (by using
regulator_set_enable_if_allowed()). This involves adding a new regulator
driver, for the AXP DRIVEVBUS functionality, then switching the USB PHY
over to using DM compliant regulator calls. Eventually the old, no
longer needed symbols are removed both from the Kconfig and the defconfig
files.
This also fixes a lot of A20 boards (probably even more SoCs from this
era), where USB was broken since v2025.01-rc1, due to conflicts between
"regulator-boot-on" DT regulators and the same controlling GPIO being
claimed by the current custom code.

The last three patches convert the currently Kconfig defined USB ID
detect pins (to switch between host and device support on USB-OTG ports)
and the VBUS detect pins (to detect external VBUS power supplied by the
connected host) to DT based GPIO pins. This changes the driver in the
first two patches, then removes the old symbols in the third one.

Please have a look and most importantly test USB host and device
functionality on any boards you have access to.

Cheers,
Andre

Andre Przywara (3):
  phy: sun4i-usb: Determine VBUS detection pin from devicetree
  phy: sun4i-usb: Determine USB OTG detection pin from devicetree
  sunxi: Kconfig: Remove obsolete USBx_* pin symbols

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                  | 43 ---------
 configs/A10s-OLinuXino-M_defconfig           |  1 -
 configs/A13-OLinuXinoM_defconfig             |  1 -
 configs/A13-OLinuXino_defconfig              |  2 -
 configs/A20-OLinuXino-Lime2-eMMC_defconfig   |  2 -
 configs/A20-OLinuXino-Lime2_defconfig        |  2 -
 configs/A20-Olimex-SOM-EVB_defconfig         |  2 -
 configs/A20-Olimex-SOM204-EVB-eMMC_defconfig |  2 -
 configs/A20-Olimex-SOM204-EVB_defconfig      |  2 -
 configs/A33-OLinuXino_defconfig              |  3 +-
 configs/Ainol_AW1_defconfig                  |  1 -
 configs/Ampe_A76_defconfig                   |  3 -
 configs/Auxtek-T003_defconfig                |  1 -
 configs/Auxtek-T004_defconfig                |  1 -
 configs/Bananapi_M2_Ultra_defconfig          |  2 -
 configs/Bananapi_m2m_defconfig               |  1 -
 configs/Bananapro_defconfig                  |  2 -
 configs/CHIP_defconfig                       |  1 -
 configs/CHIP_pro_defconfig                   |  1 -
 configs/CSQ_CS908_defconfig                  |  2 -
 configs/Chuwi_V7_CW0825_defconfig            |  3 -
 configs/Colombus_defconfig                   |  1 -
 configs/Cubieboard4_defconfig                |  5 +-
 configs/Cubietruck_defconfig                 |  3 -
 configs/Cubietruck_plus_defconfig            |  5 +-
 configs/Empire_electronix_d709_defconfig     |  3 -
 configs/Empire_electronix_m712_defconfig     |  3 -
 configs/Hummingbird_A31_defconfig            |  2 -
 configs/Hyundai_A7HD_defconfig               |  4 -
 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         |  5 +-
 configs/Mini-X_defconfig                     |  1 -
 configs/Orangepi_defconfig                   |  2 -
 configs/Orangepi_mini_defconfig              |  2 -
 configs/Sinlinx_SinA31s_defconfig            |  2 -
 configs/Sinlinx_SinA33_defconfig             |  1 -
 configs/Sinovoip_BPI_M2_defconfig            |  2 -
 configs/Sinovoip_BPI_M3_defconfig            |  4 +-
 configs/Sunchip_CX-A99_defconfig             |  3 -
 configs/UTOO_P66_defconfig                   |  3 -
 configs/Wexler_TAB7200_defconfig             |  2 -
 configs/Wobo_i5_defconfig                    |  1 -
 configs/Yones_Toptech_BD1078_defconfig       |  1 -
 configs/Yones_Toptech_BS1078_V2_defconfig    |  3 +-
 configs/ba10_tv_box_defconfig                |  2 -
 configs/bananapi_m2_berry_defconfig          |  1 -
 configs/colorfly_e708_q1_defconfig           |  3 +-
 configs/difrnce_dit4350_defconfig            |  3 -
 configs/dserve_dsrv9703c_defconfig           |  3 -
 configs/ga10h_v1_1_defconfig                 |  3 +-
 configs/gt90h_v4_defconfig                   |  3 +-
 configs/h8_homlet_v2_defconfig               |  2 -
 configs/iNet_3F_defconfig                    |  2 -
 configs/iNet_3W_defconfig                    |  2 -
 configs/iNet_86VS_defconfig                  |  2 -
 configs/iNet_D978_rev2_defconfig             |  3 +-
 configs/icnova-a20-swac_defconfig            |  3 -
 configs/inet1_defconfig                      |  3 -
 configs/inet86dz_defconfig                   |  3 +-
 configs/inet97fv2_defconfig                  |  3 -
 configs/inet98v_rev2_defconfig               |  3 -
 configs/inet9f_rev03_defconfig               |  3 -
 configs/inet_q972_defconfig                  |  3 +-
 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/orangepi_zero2_defconfig             |  1 -
 configs/orangepi_zero3_defconfig             |  1 -
 configs/parrot_r16_defconfig                 |  2 -
 configs/pine_h64_defconfig                   |  1 -
 configs/polaroid_mid2407pxe03_defconfig      |  3 +-
 configs/polaroid_mid2809pxe04_defconfig      |  3 +-
 configs/pov_protab2_ips9_defconfig           |  3 -
 configs/q8_a13_tablet_defconfig              |  3 -
 configs/q8_a23_tablet_800x480_defconfig      |  3 +-
 configs/q8_a33_tablet_1024x600_defconfig     |  3 +-
 configs/q8_a33_tablet_800x480_defconfig      |  3 +-
 configs/r7-tv-dongle_defconfig               |  1 -
 configs/sun8i_a23_evb_defconfig              |  3 -
 configs/tbs_a711_defconfig                   |  3 +-
 configs/teres_i_defconfig                    |  1 -
 drivers/gpio/axp_gpio.c                      | 75 +++++----------
 drivers/gpio/sunxi_gpio.c                    | 12 +--
 drivers/phy/allwinner/phy-sun4i-usb.c        | 96 +++++++-------------
 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 --
 100 files changed, 139 insertions(+), 369 deletions(-)
 create mode 100644 drivers/power/regulator/axp_drivevbus.c

-- 
2.46.3


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-04-10  9:23 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-09  0:20 [PATCH v2 0/8] sunxi: Control USB pins and supplies via DT regulators Andre Przywara
2025-04-09  0:20 ` [PATCH v2 1/8] power: regulator: Add a driver for the AXP PMIC drivevbus Andre Przywara
2025-04-10  7:04   ` Jernej Škrabec
2025-04-10  9:23     ` Andre Przywara
2025-04-09  0:20 ` [PATCH v2 2/8] sunxi: Enable PMIC drivevbus regulator support for USB supplies Andre Przywara
2025-04-10  7:08   ` Jernej Škrabec
2025-04-09  0:20 ` [PATCH v2 3/8] phy: sun4i-usb: Control supplies via the regulator uclass Andre Przywara
2025-04-10  7:11   ` Jernej Škrabec
2025-04-09  0:20 ` [PATCH v2 4/8] sunxi: Remove obsolete USBx_VBUS_PIN Kconfig symbols Andre Przywara
2025-04-10  7:12   ` Jernej Škrabec
2025-04-09  0:20 ` [PATCH v2 5/8] gpio: axp: Remove virtual VBUS enable GPIO Andre Przywara
2025-04-10  7:17   ` Jernej Škrabec
2025-04-09  0:20 ` [PATCH v2 6/8] phy: sun4i-usb: Determine VBUS detection pin from devicetree Andre Przywara
2025-04-10  7:18   ` Jernej Škrabec
2025-04-09  0:20 ` [PATCH v2 7/8] phy: sun4i-usb: Determine USB OTG " Andre Przywara
2025-04-10  7:19   ` Jernej Škrabec
2025-04-09  0:20 ` [PATCH v2 8/8] sunxi: Kconfig: Remove obsolete USBx_* pin symbols Andre Przywara
2025-04-10  7:20   ` Jernej Škrabec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox