[PATCH 00/11] sunxi: Migrate to DM_I2C
Samuel Holland
samuel at sholland.org
Sun Aug 22 01:05:08 CEST 2021
This series does the initial work to migrate sunxi boards to DM_I2C.
First it takes care of the PMIC:
- Patches 1-2 add DM_I2C versions of two drivers.
- Patches 3-4 allow us to use DM_PMIC without DM_SPL.
- Patch 5 then adds a DM_PMIC driver.
- Patches 6-9 migrate the "pmic_bus" functions to use that DM_PMIC
driver when possible.
Then it takes care of the LCD panels:
- Patch 10 converts those drivers to use DM_I2C.
Finally, patch 11 switches all sunxi boards over to DM_I2C.
There is some remaining work to clean up uses of pmic_bus in U-Boot
proper and replace them with DM_PMIC functions:
- drivers/gpio/axp_gpio.c - I have a series for this.
- do_poweroff() in drivers/gpio/axp???.c - I have a series for this.
- axp_get_sid() in drivers/power/axp221.c - Not sure what to do here.
- axp_set_eldo() in drivers/video/sunxi/sunxi_display.c - This will
need a DM_REGULATOR driver.
This series is on top of
https://patchwork.ozlabs.org/project/uboot/list/?series=258648
which is on top of
https://patchwork.ozlabs.org/project/uboot/list/?series=258482
I have build-tested each commit on all sunxi boards, and boot-tested
the series on Pine H64 (H6) and Orange Pi Zero2 (H616).
Samuel Holland (11):
i2c: Add a DM_I2C wrapper for the sun6i_p2wi controller
i2c: Add a DM_I2C wrapper for the sun8i_rsb controller
power: pmic: Consistently depend on DM_PMIC
power: pmic: Make the uclass optional in SPL
power: pmic: Add a driver for X-Powers AXP PMICs
sunxi: Select SUN8I_RSB more carefully
sunxi: pmic_bus: Fix Kconfig dependencies
sunxi: pmic_bus: Clean up preprocessor conditions
sunxi: pmic_bus: Use the DM PMIC interface when possible
sunxi: video: Convert panel I2C to use DM_I2C
sunxi: Enable DM_I2C for all sunxi boards
arch/arm/Kconfig | 1 +
arch/arm/mach-sunxi/Kconfig | 51 +++----------
arch/arm/mach-sunxi/pmic_bus.c | 109 ++++++++++++++--------------
board/sunxi/board.c | 44 +----------
configs/Colombus_defconfig | 6 --
configs/UTOO_P66_defconfig | 3 -
drivers/i2c/Kconfig | 16 ++++
drivers/i2c/Makefile | 2 +
drivers/i2c/sun6i_p2wi.c | 66 +++++++++++++++++
drivers/i2c/sun8i_rsb.c | 86 ++++++++++++++++++++++
drivers/power/pmic/Kconfig | 72 +++++++++---------
drivers/power/pmic/Makefile | 3 +-
drivers/power/pmic/axp.c | 49 +++++++++++++
drivers/video/anx9804.c | 107 +++++++++++++--------------
drivers/video/anx9804.h | 5 +-
drivers/video/sunxi/sunxi_display.c | 55 +++++++++-----
include/axp_pmic.h | 12 +++
include/configs/sunxi-common.h | 17 -----
18 files changed, 435 insertions(+), 269 deletions(-)
create mode 100644 drivers/i2c/sun6i_p2wi.c
create mode 100644 drivers/i2c/sun8i_rsb.c
create mode 100644 drivers/power/pmic/axp.c
--
2.31.1
More information about the U-Boot
mailing list