All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/12] sunxi: Migrate to DM_I2C
@ 2021-10-08  5:17 Samuel Holland
  2021-10-08  5:17 ` [PATCH v2 01/12] power: pmic: Consistently depend on DM_PMIC Samuel Holland
                   ` (12 more replies)
  0 siblings, 13 replies; 22+ messages in thread
From: Samuel Holland @ 2021-10-08  5:17 UTC (permalink / raw)
  To: u-boot, Jagan Teki, Andre Przywara
  Cc: Jaehoon Chung, Heiko Schocher, Samuel Holland,
	Anatolij Gustschin, Arnaud Ferraris, Bharat Gooty, Igor Opaniuk,
	Jernej Skrabec, Minkyu Kang, Rayagonda Kokatanur, Simon Glass,
	Stephan Gerhold, Tim Harvey, Tom Rini

This series does the initial work to migrate sunxi boards to DM_I2C.
Version 1 of this series bitrotted quite a bit, so there is some
reorganization in version 2.

First it takes care of the PMIC:
 - Patches 1-2 clean up the PMIC Kconfig, though they are not strictly
   necessary after 7abf178b, and are independent from the other patches.
 - Patch 3 then adds a DM_PMIC driver.
 - Patches 4-6 prepare to move the P2WI/RSB bus drivers to drivers/i2c.
 - Patches 7-8 move and add DM_I2C versions of those two drivers.
 - Patches 9-10 migrate the "pmic_bus" functions to use the DM_I2C bus
   and DM_PMIC driver when possible.
Then it takes care of the LCD panels:
 - Patch 11 converts those drivers to use DM_I2C.
Finally, patch 12 switches all sunxi boards over to DM_I2C.

I have build-tested each commit on all sunxi boards.

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.

Changes in v2:
- Rebase to pick up 7abf178b ("power: Tidy up #undef of CONFIG_DM_PMIC")
- Rebase to pick up 7abf178b ("power: Tidy up #undef of CONFIG_DM_PMIC")
- Replace axp_pmic_bind() with `.bind = dm_scan_fdt_dev`
- New patch to account for I2C Kconfig changes
- Renamed Kconfig symbol to SYS_I2C_SUN6I_P2WI
- Moved entire P2WI driver source to drivers/i2c
- Renamed Kconfig symbol to SYS_I2C_SUN8I_RSB
- Moved entire RSB driver source to drivers/i2c
- Update IS_ENABLEDs in pmic_bus.c to match chages to previous patches

Samuel Holland (12):
  power: pmic: Consistently depend on DM_PMIC
  power: pmic: Consistently depend on SPL_DM_PMIC
  power: pmic: Add a driver for X-Powers AXP PMICs
  sunxi: Only initialize legacy I2C when enabled
  sunxi: Select SUN8I_RSB more carefully
  sunxi: pmic_bus: Fix Kconfig dependencies
  i2c: Add a DM_I2C driver for the sun6i P2WI controller
  i2c: Add a DM_I2C driver for the sun8i RSB controller
  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         |  59 ++----
 arch/arm/mach-sunxi/Makefile        |   2 -
 arch/arm/mach-sunxi/board.c         |   2 +-
 arch/arm/mach-sunxi/p2wi.c          | 117 ------------
 arch/arm/mach-sunxi/pmic_bus.c      | 109 +++++------
 arch/arm/mach-sunxi/rsb.c           | 175 -----------------
 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            | 220 ++++++++++++++++++++++
 drivers/i2c/sun8i_rsb.c             | 281 ++++++++++++++++++++++++++++
 drivers/power/pmic/Kconfig          |  69 ++++---
 drivers/power/pmic/Makefile         |   1 +
 drivers/power/pmic/axp.c            |  38 ++++
 drivers/video/anx9804.c             | 103 +++++-----
 drivers/video/anx9804.h             |   5 +-
 drivers/video/sunxi/sunxi_display.c |  55 ++++--
 include/axp_pmic.h                  |  12 ++
 include/configs/sunxi-common.h      |  17 --
 22 files changed, 773 insertions(+), 564 deletions(-)
 delete mode 100644 arch/arm/mach-sunxi/p2wi.c
 delete mode 100644 arch/arm/mach-sunxi/rsb.c
 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.32.0


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

end of thread, other threads:[~2021-10-12 11:24 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08  5:17 [PATCH v2 00/12] sunxi: Migrate to DM_I2C Samuel Holland
2021-10-08  5:17 ` [PATCH v2 01/12] power: pmic: Consistently depend on DM_PMIC Samuel Holland
2021-10-08  5:17 ` [PATCH v2 02/12] power: pmic: Consistently depend on SPL_DM_PMIC Samuel Holland
2021-10-12 10:46   ` Andre Przywara
2021-10-08  5:17 ` [PATCH v2 03/12] power: pmic: Add a driver for X-Powers AXP PMICs Samuel Holland
2021-10-12 10:47   ` Andre Przywara
2021-10-08  5:17 ` [PATCH v2 04/12] sunxi: Only initialize legacy I2C when enabled Samuel Holland
2021-10-12 10:47   ` Andre Przywara
2021-10-08  5:17 ` [PATCH v2 05/12] sunxi: Select SUN8I_RSB more carefully Samuel Holland
2021-10-12 10:47   ` Andre Przywara
2021-10-08  5:17 ` [PATCH v2 06/12] sunxi: pmic_bus: Fix Kconfig dependencies Samuel Holland
2021-10-08  5:17 ` [PATCH v2 07/12] i2c: Add a DM_I2C driver for the sun6i P2WI controller Samuel Holland
2021-10-12 10:49   ` Andre Przywara
2021-10-08  5:17 ` [PATCH v2 08/12] i2c: Add a DM_I2C driver for the sun8i RSB controller Samuel Holland
2021-10-12 10:49   ` Andre Przywara
2021-10-08  5:17 ` [PATCH v2 09/12] sunxi: pmic_bus: Clean up preprocessor conditions Samuel Holland
2021-10-12 10:49   ` Andre Przywara
2021-10-08  5:17 ` [PATCH v2 10/12] sunxi: pmic_bus: Use the DM PMIC interface when possible Samuel Holland
2021-10-12 10:49   ` Andre Przywara
2021-10-08  5:17 ` [PATCH v2 11/12] sunxi: video: Convert panel I2C to use DM_I2C Samuel Holland
2021-10-08  5:17 ` [PATCH v2 12/12] sunxi: Enable DM_I2C for all sunxi boards Samuel Holland
2021-10-12 11:24 ` [PATCH v2 00/12] sunxi: Migrate to DM_I2C Andre Przywara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.