Skip to content

sunxi: DM drivers for CLK, RESET and PINCTRL

Philipp Tomsich u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11spl: dm: Undefine DM_MMC, DM_MMC_OPS and BLK, if SPL_DM is not definedinclude/config_uncmd_spl.h scripts/Makefile.uncmd_spl+8 -00 replies
2/11sunxi: add pinctrl (UCLASS_PINCTRL) support for sunxi and tie back into GPIOdoc/device-tree-bindings/pinctrl/allwinner,pinctrl.txt drivers/gpio/sunxi_gpio.c drivers/pinctrl/Kconfig +6 more+1553 -22 replies
2/11sunxi: add pinctrl (UCLASS_PINCTRL) support for sunxi and tie back into GPIO+0 -01 reply
2/11sunxi: add pinctrl (UCLASS_PINCTRL) support for sunxi and tie back into GPIO+0 -00 replies
3/11sun50i: dts: add gpiobank nodes to the pinctrl nodesarch/arm/dts/sun50i-a64.dtsi+69 -40 replies
4/11sun50i: dts: update DTS to avoid warningsarch/arm/dts/sun50i-a64.dtsi+15 -151 reply
5/11sunxi: add module reset (UCLASS_RESET) support for sunxidrivers/reset/Kconfig drivers/reset/Makefile drivers/reset/reset-sunxi.c+117 -01 reply
6/11sunxi: add clock driver (UCLASS_CLK) support for sunxidrivers/clk/Makefile drivers/clk/sunxi/Makefile drivers/clk/sunxi/clk-sunxi-gate.c +2 more+464 -00 replies
7/11sunxi: Scan DT tree node '/clocks' on sunxi boardsboard/sunxi/board.c+12 -10 replies
8/11sun8i_emac: update to work with pinctrl-sunxi, reset-sunxi and clk-sunxidrivers/net/sun8i_emac.c+41 -40 replies
9/11sunxi_mmc: convert to a device-model driverboard/sunxi/board.c drivers/mmc/sunxi_mmc.c+331 -260 replies
10/11dts: sun50i: update mmc pin configuration and add mmc2_8bit_pinsarch/arm/dts/sun50i-a64.dtsi+16 -60 replies
11/11sun50i: dts: add spi0 and spi1 nodes and pinconfigarch/arm/dts/sun50i-a64.dtsi+46 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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)
* GPIO

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
clk-sunxi
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
Signature · 1 line
1.9.1