sunxi: Control USB pins and supplies via DT regulators
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest8 patches 9 repliesIn review
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | power: regulator: Add a driver for the AXP PMIC drivevbusdrivers/ drivers/ drivers/ +1 more | +66 | 2 replies | |
| 2/8 | sunxi: Enable PMIC drivevbus regulator support for USB suppliesconfigs/ configs/ configs/ +16 more | +19 | 1 reply | |
| 3/8 | phy: sun4i-usb: Control supplies via the regulator uclassdrivers/ | +14 | 1 reply | |
| 4/8 | sunxi: Remove obsolete USBx_VBUS_PIN Kconfig symbolsarch/ configs/ configs/ +84 more | +0 | 1 reply | |
| 5/8 | gpio: axp: Remove virtual VBUS enable GPIOdrivers/ drivers/ include/ +3 more | +22 | 1 reply | |
| 6/8 | phy: sun4i-usb: Determine VBUS detection pin from devicetreedrivers/ | +9 | 1 reply | |
| 7/8 | phy: sun4i-usb: Determine USB OTG detection pin from devicetreedrivers/ | +8 | 1 reply | |
| 8/8 | sunxi: Kconfig: Remove obsolete USBx_* pin symbolsarch/ configs/ configs/ +46 more | +0 | 1 reply |
Reviews trailers per patch
All 8 patches have a Reviewed-by or Acked-by.
| Patch | Jernej Skrabec |
|---|---|
| 1/8 | R-b |
| 2/8 | A-b |
| 3/8 | R-b |
| 4/8 | A-b |
| 5/8 | R-b |
| 6/8 | R-b |
| 7/8 | R-b |
| 8/8 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/8] sunxi: Control USB pins and supplies via DT regulators
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
Signature · 1 line
2.46.3