All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Jerry Van Baren <vanbaren@cideas.com>,
	Macpaul Lin <macpaul@andestech.com>, Marek Vasut <marex@denx.de>,
	Pavel Herrmann <morpheus.ibis@gmail.com>,
	Peng Fan <peng.fan@nxp.com>
Subject: [PATCH 00/12] dm: Expand of-platdata support to GPIOs and clean up
Date: Sat,  7 Aug 2021 07:24:00 -0600	[thread overview]
Message-ID: <20210807132413.3513724-1-sjg@chromium.org> (raw)

The of-platdata feature allows driver model to be used in SPL without
the overhead of a devicetree. The relevant parts of the devicetree are
converted to C by the dtoc tool.

So far of-platdata supports various drivers but not enough to support
the am335x boards.

This series adds GPIO support to of-platdata, via a
gpio_request_by_phandle() function which looks up GPIOs from the
of-platdata information.

It also tidies up the existing clock support and finishes off irq support.

Finally it includes a new OF_REAL symbol to control whether a devicetree
is actually available at runtime. This allows some simplification of
the #ifdef logic.

For am335x, the cpsw driver uses several devicetree subnodes. For this to
work with dtoc it needs to be converted to separate drivers for each
subnode, each with a compatible string.


Simon Glass (12):
  treewide: fdt: Move fdt_get_config_... to ofnode_conf_read...
  fdt: Create a new OF_REAL Kconfig
  treewide: Simply conditions with the new OF_REAL
  treewide: Use OF_REAL instead of !OF_PLATDATA
  mmc: nds32: ftsdc010: Convert to livetree
  treewide: Try to avoid the preprocessor with OF_REAL
  fdt: Update Makefile rules with the new OF_REAL Kconfig
  dm: Add comments to dt-structs contents
  clk: Rename clk_get_by_driver_info()
  dm: doc: Add a note about of-platdata header files
  irq: Tidy up of-platdata irq support
  dm: gpio: Add of-platdata support

 Makefile                                      |  7 +-
 arch/arm/mach-rockchip/rk3188/rk3188.c        |  4 +-
 arch/arm/mach-rockchip/rk3399/syscon_rk3399.c |  2 +-
 arch/arm/mach-rockchip/rk3568/syscon_rk3568.c |  2 +-
 arch/sandbox/dts/sandbox.dtsi                 | 21 +++++-
 arch/sandbox/dts/test.dts                     |  3 +
 arch/sandbox/include/asm/irq.h                | 20 ++++++
 arch/x86/cpu/apollolake/hostbridge.c          |  4 +-
 arch/x86/cpu/apollolake/lpc.c                 |  2 +-
 arch/x86/cpu/apollolake/pch.c                 |  2 +-
 arch/x86/cpu/apollolake/pmc.c                 |  4 +-
 arch/x86/cpu/apollolake/uart.c                |  2 +-
 arch/x86/cpu/coreboot/coreboot.c              |  5 +-
 arch/x86/cpu/intel_common/itss.c              |  2 +-
 arch/x86/cpu/intel_common/p2sb.c              | 24 +++----
 arch/x86/lib/lpc-uclass.c                     |  2 +-
 arch/x86/lib/tpl.c                            |  2 +-
 board/dhelectronics/dh_stm32mp1/board.c       |  5 +-
 board/firefly/firefly-rk3288/firefly-rk3288.c |  4 +-
 board/google/chromebook_coral/coral.c         |  2 +-
 board/sandbox/sandbox.c                       |  5 +-
 board/st/stm32mp1/stm32mp1.c                  |  5 +-
 common/autoboot.c                             |  8 +--
 common/board_r.c                              |  4 +-
 common/cli.c                                  |  7 +-
 common/spl/spl.c                              |  2 +-
 common/spl/spl_spi.c                          | 12 ++--
 configs/sandbox_noinst_defconfig              |  2 +
 configs/sandbox_spl_defconfig                 |  2 +
 disk/part_efi.c                               |  8 +--
 doc/develop/driver-model/of-plat.rst          | 32 +++++++--
 doc/device-tree-bindings/config.txt           |  4 +-
 drivers/clk/clk-uclass.c                      | 15 ++--
 drivers/clk/clk_fixed_factor.c                | 18 ++---
 drivers/clk/clk_fixed_rate.c                  |  7 +-
 drivers/clk/rockchip/clk_px30.c               |  4 +-
 drivers/clk/rockchip/clk_rk3188.c             |  8 +--
 drivers/clk/rockchip/clk_rk3288.c             | 10 +--
 drivers/clk/rockchip/clk_rk3308.c             |  4 +-
 drivers/clk/rockchip/clk_rk3368.c             | 10 +--
 drivers/clk/rockchip/clk_rk3399.c             | 20 +++---
 drivers/core/device.c                         |  4 +-
 drivers/core/fdtaddr.c                        |  2 +-
 drivers/core/lists.c                          |  2 +-
 drivers/core/ofnode.c                         | 33 +++++++++
 drivers/core/root.c                           |  4 +-
 drivers/core/simple-bus.c                     |  2 +-
 drivers/core/syscon-uclass.c                  |  2 +-
 drivers/core/uclass.c                         |  2 +-
 drivers/core/util.c                           |  2 +-
 drivers/firmware/firmware-uclass.c            |  2 +-
 drivers/gpio/Makefile                         |  4 +-
 drivers/gpio/gpio-uclass.c                    | 28 +++++++-
 drivers/gpio/intel_gpio.c                     |  2 +-
 drivers/gpio/mxs_gpio.c                       |  4 +-
 drivers/gpio/omap_gpio.c                      |  4 +-
 drivers/gpio/sandbox.c                        | 14 ++--
 drivers/gpio/sandbox_test.c                   | 21 ++++++
 drivers/i2c/i2c-emul-uclass.c                 |  2 +-
 drivers/i2c/i2c-uclass.c                      | 10 +--
 drivers/i2c/omap24xx_i2c.c                    |  4 +-
 drivers/misc/Makefile                         |  2 +-
 drivers/misc/cros_ec.c                        |  2 +-
 drivers/misc/irq-uclass.c                     | 10 ++-
 drivers/misc/irq_sandbox.c                    | 15 +---
 drivers/misc/irq_sandbox_test.c               | 22 ++++++
 drivers/misc/misc-uclass.c                    |  2 +-
 drivers/misc/p2sb-uclass.c                    | 20 +++---
 drivers/mmc/fsl_esdhc_imx.c                   | 17 ++---
 drivers/mmc/ftsdc010_mci.c                    | 45 ++++++------
 drivers/mmc/mxsmmc.c                          |  4 +-
 drivers/mmc/omap_hsmmc.c                      |  6 +-
 drivers/mmc/rockchip_dw_mmc.c                 |  8 ++-
 drivers/mmc/rockchip_sdhci.c                  | 14 ++--
 drivers/pch/pch-uclass.c                      |  2 +-
 drivers/pinctrl/intel/pinctrl_apl.c           |  4 +-
 drivers/pinctrl/nxp/pinctrl-mxs.c             |  2 +-
 drivers/pinctrl/pinctrl-qe-io.c               |  2 +-
 drivers/pinctrl/pinctrl-uclass.c              |  2 +-
 drivers/pinctrl/rockchip/pinctrl-px30.c       |  2 +-
 drivers/pinctrl/rockchip/pinctrl-rk3036.c     |  2 +-
 drivers/pinctrl/rockchip/pinctrl-rk3128.c     |  2 +-
 drivers/pinctrl/rockchip/pinctrl-rk3188.c     |  2 +-
 drivers/pinctrl/rockchip/pinctrl-rk322x.c     |  2 +-
 drivers/pinctrl/rockchip/pinctrl-rk3288.c     |  2 +-
 drivers/pinctrl/rockchip/pinctrl-rk3308.c     |  2 +-
 drivers/pinctrl/rockchip/pinctrl-rk3328.c     |  2 +-
 drivers/pinctrl/rockchip/pinctrl-rk3368.c     |  2 +-
 drivers/pinctrl/rockchip/pinctrl-rk3399.c     |  2 +-
 drivers/pinctrl/rockchip/pinctrl-rv1108.c     |  2 +-
 drivers/power/domain/power-domain-uclass.c    |  4 +-
 drivers/ram/rockchip/dmc-rk3368.c             | 12 ++--
 drivers/ram/rockchip/sdram_rk3188.c           |  5 +-
 drivers/ram/rockchip/sdram_rk322x.c           |  5 +-
 drivers/ram/rockchip/sdram_rk3288.c           |  5 +-
 drivers/ram/rockchip/sdram_rk3328.c           |  4 +-
 drivers/ram/rockchip/sdram_rk3399.c           |  9 +--
 drivers/rtc/rtc-uclass.c                      |  2 +-
 drivers/serial/ns16550.c                      |  8 +--
 drivers/serial/sandbox.c                      |  2 +-
 drivers/serial/serial_mt7620.c                |  4 +-
 drivers/serial/serial_omap.c                  |  6 +-
 drivers/spi/cf_spi.c                          |  4 +-
 drivers/spi/davinci_spi.c                     |  4 +-
 drivers/spi/fsl_espi.c                        |  4 +-
 drivers/spi/ich.c                             |  6 +-
 drivers/spi/mxs_spi.c                         |  4 +-
 drivers/spi/omap3_spi.c                       |  4 +-
 drivers/spi/pl022_spi.c                       |  4 +-
 drivers/spi/rk_spi.c                          | 38 +++++------
 drivers/spi/spi-uclass.c                      | 14 ++--
 drivers/sysreset/sysreset_sandbox.c           |  2 +-
 drivers/timer/rockchip_timer.c                | 16 ++---
 drivers/timer/timer-uclass.c                  | 68 ++++++++++---------
 drivers/timer/tsc_timer.c                     |  2 +-
 drivers/tpm/tpm-uclass.c                      |  2 +-
 drivers/video/cfb_console.c                   |  4 +-
 drivers/video/exynos/exynos_mipi_dsi.c        |  4 +-
 drivers/watchdog/wdt-uclass.c                 |  2 +-
 dts/Kconfig                                   | 29 +++++++-
 env/mmc.c                                     |  5 +-
 include/asm-generic/gpio.h                    |  5 ++
 include/clk.h                                 | 35 ++++++++--
 include/dm/device.h                           | 12 ++--
 include/dm/ofnode.h                           | 37 ++++++++++
 include/dt-structs.h                          | 27 ++++++++
 include/fdtdec.h                              | 33 ---------
 include/irq.h                                 | 29 ++++++++
 include/power-domain.h                        |  6 +-
 lib/Makefile                                  |  5 +-
 lib/fdtdec.c                                  | 44 ------------
 scripts/Makefile.spl                          |  9 +--
 test/dm/of_platdata.c                         | 65 ++++++++++++++++--
 test/dm/ofnode.c                              | 15 ++++
 tools/dtoc/dtb_platdata.py                    |  1 +
 135 files changed, 783 insertions(+), 477 deletions(-)
 create mode 100644 arch/sandbox/include/asm/irq.h
 create mode 100644 drivers/gpio/sandbox_test.c
 create mode 100644 drivers/misc/irq_sandbox_test.c

-- 
2.32.0.605.g8dce9f2422-goog


             reply	other threads:[~2021-08-07 13:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 13:24 Simon Glass [this message]
2021-08-07 13:24 ` [PATCH 01/12] treewide: fdt: Move fdt_get_config_... to ofnode_conf_read Simon Glass
2021-08-07 13:24 ` [PATCH 02/12] fdt: Create a new OF_REAL Kconfig Simon Glass
2021-08-07 13:24 ` [PATCH 03/12] treewide: Simply conditions with the new OF_REAL Simon Glass
2021-08-07 13:24 ` [PATCH 04/12] treewide: Use OF_REAL instead of !OF_PLATDATA Simon Glass
2021-08-07 13:24 ` [PATCH 05/12] mmc: nds32: ftsdc010: Convert to livetree Simon Glass
     [not found]   ` <HK0PR03MB299419BC349724622E422920C1F69@HK0PR03MB2994.apcprd03.prod.outlook.com>
2021-08-09  2:42     ` Rick Chen
2021-08-12 22:22   ` Jaehoon Chung
2021-09-26 18:40   ` Simon Glass
2021-08-07 13:24 ` [PATCH 06/12] treewide: Try to avoid the preprocessor with OF_REAL Simon Glass
2021-08-07 13:24 ` [PATCH 07/12] fdt: Update Makefile rules with the new OF_REAL Kconfig Simon Glass
2021-08-07 13:24 ` [PATCH 08/12] dm: Add comments to dt-structs contents Simon Glass
2021-08-07 13:24 ` [PATCH 09/12] clk: Rename clk_get_by_driver_info() Simon Glass
2021-08-09 16:41   ` Sean Anderson
2021-09-26 18:40   ` Simon Glass
2021-08-07 13:24 ` [PATCH 10/12] dm: doc: Add a note about of-platdata header files Simon Glass
2021-08-07 13:24 ` [PATCH 11/12] irq: Tidy up of-platdata irq support Simon Glass
2021-08-07 13:24 ` [PATCH 12/12] dm: gpio: Add of-platdata support Simon Glass
2021-09-26 18:40 ` Simon Glass
2021-09-26 18:40 ` [PATCH 11/12] irq: Tidy up of-platdata irq support Simon Glass
2021-09-26 18:40 ` [PATCH 10/12] dm: doc: Add a note about of-platdata header files Simon Glass
2021-09-26 18:40 ` [PATCH 08/12] dm: Add comments to dt-structs contents Simon Glass
2021-09-26 18:40 ` [PATCH 06/12] treewide: Try to avoid the preprocessor with OF_REAL Simon Glass
2021-09-26 18:40 ` [PATCH 07/12] fdt: Update Makefile rules with the new OF_REAL Kconfig Simon Glass
2021-09-26 18:40 ` [PATCH 04/12] treewide: Use OF_REAL instead of !OF_PLATDATA Simon Glass
2021-09-26 18:40 ` [PATCH 03/12] treewide: Simply conditions with the new OF_REAL Simon Glass
2021-09-26 18:40 ` [PATCH 01/12] treewide: fdt: Move fdt_get_config_... to ofnode_conf_read Simon Glass
2021-09-26 18:40 ` [PATCH 02/12] fdt: Create a new OF_REAL Kconfig Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210807132413.3513724-1-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=jh80.chung@samsung.com \
    --cc=macpaul@andestech.com \
    --cc=marex@denx.de \
    --cc=morpheus.ibis@gmail.com \
    --cc=peng.fan@nxp.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=vanbaren@cideas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.