[U-Boot] [PATCH v1 00/11] sunxi: DM drivers for CLK, RESET and PINCTRL

Philipp Tomsich philipp.tomsich at theobroma-systems.com
Fri Feb 17 17:52:37 UTC 2017

This provides DM drivers for CLK, RESET and PINCTRL for sunxi with
initial enablement and testing done on the sun50iw1p1 (A64). As the
sun6i, sun8i and sun9i platforms are similar enough, these should be
easily added on top of this framework.

To make switching over easier, the necessary changes in the MMC
drivers and sun8i_emac are also contained as individual changes in
this set.

At this point, I'd like to see sunxi move towards a TPL approach as
the SRAM area used by the BROM for loading the SPL is too small for
both FIT and DM... yet most Allwinner SoCs have largish SRAM areas
that could be used for a TPL (even one that could use config data to
set up the DRAM according to a specific board's requirements).  If we
could get that point, we should be able to get rid of most of the chip
and board-specific (i.e. watch for low-fying #ifdef's) pinconfig code
in board/sunxi/board.c.

This changeset was tested against the A64-uQ7 (with our DTS, which is
to date only available from our public git repositories) for the
following devices:
 * MMC0 (uSD slot) and MMC2 (on-module eMMC)
 * Ethernet (sun8i_emac)
 * SPI (SPI DM driver from the A31-uQ7 tree, will post separately)

The sunxi I2C driver still needs to be converted to make use of
these changes.

Philipp Tomsich (11):
  spl: dm: Undefine DM_MMC, DM_MMC_OPS and BLK, if SPL_DM is not defined
  sunxi: add pinctrl (UCLASS_PINCTRL) support for sunxi and tie back
    into GPIO
  sun50i: dts: add gpiobank nodes to the pinctrl nodes
  sun50i: dts: update DTS to avoid warnings
  sunxi: add module reset (UCLASS_RESET) support for sunxi
  sunxi: add clock driver (UCLASS_CLK) support for sunxi
  sunxi: Scan DT tree node '/clocks' on sunxi boards
  sun8i_emac: update to work with pinctrl-sunxi, reset-sunxi and
  sunxi_mmc: convert to a device-model driver
  dts: sun50i: update mmc pin configuration and add mmc2_8bit_pins
  sun50i: dts: add spi0 and spi1 nodes and pinconfig

 arch/arm/dts/sun50i-a64.dtsi                       | 171 +++++-
 board/sunxi/board.c                                |  20 +-
 .../pinctrl/allwinner,pinctrl.txt                  | 130 +++++
 drivers/clk/Makefile                               |   1 +
 drivers/clk/sunxi/Makefile                         |   7 +
 drivers/clk/sunxi/clk-sunxi-gate.c                 |  92 ++++
 drivers/clk/sunxi/clk-sunxi-mod.c                  | 232 +++++++++
 drivers/clk/sunxi/clk-sunxi-pll.c                  | 120 +++++
 drivers/gpio/sunxi_gpio.c                          |  94 +++-
 drivers/mmc/sunxi_mmc.c                            | 344 +++++++++++-
 drivers/net/sun8i_emac.c                           |  45 +-
 drivers/pinctrl/Kconfig                            |  10 +
 drivers/pinctrl/Makefile                           |   2 +
 drivers/pinctrl/sunxi/Makefile                     |  10 +
 drivers/pinctrl/sunxi/pinctrl-sun50i-a64-r.c       |  92 ++++
 drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c         | 577 +++++++++++++++++++++
 drivers/pinctrl/sunxi/pinctrl-sunxi.c              | 309 +++++++++++
 drivers/pinctrl/sunxi/pinctrl-sunxi.h              | 311 +++++++++++
 drivers/reset/Kconfig                              |   9 +
 drivers/reset/Makefile                             |   1 +
 drivers/reset/reset-sunxi.c                        | 105 ++++
 include/config_uncmd_spl.h                         |   4 +
 scripts/Makefile.uncmd_spl                         |   4 +
 23 files changed, 2632 insertions(+), 58 deletions(-)
 create mode 100644 doc/device-tree-bindings/pinctrl/allwinner,pinctrl.txt
 create mode 100644 drivers/clk/sunxi/Makefile
 create mode 100644 drivers/clk/sunxi/clk-sunxi-gate.c
 create mode 100644 drivers/clk/sunxi/clk-sunxi-mod.c
 create mode 100644 drivers/clk/sunxi/clk-sunxi-pll.c
 create mode 100644 drivers/pinctrl/sunxi/Makefile
 create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun50i-a64-r.c
 create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c
 create mode 100644 drivers/pinctrl/sunxi/pinctrl-sunxi.c
 create mode 100644 drivers/pinctrl/sunxi/pinctrl-sunxi.h
 create mode 100644 drivers/reset/reset-sunxi.c


More information about the U-Boot mailing list