Skip to content

improve OF_PLATDATA support

Walter Lozano u-boot 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest14 patches 0 repliesNew
  2. v314 patches 0 repliesSuperseded
  3. v2 posting 2/20 of 14 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/214 patches0 repliesSuperseded
v10 of 10 patches0 repliesSuperseded

Changes in v4 from the cover letter

- Fix syntax error on dtoc

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14drivers: rename drivers to match compatible stringarch/arm/mach-at91/arm926ejs/at91sam9260_devices.c arch/arm/mach-at91/arm926ejs/at91sam9m10g45_devices.c arch/arm/mach-rockchip/rk3328/syscon_rk3328.c +42 more+104 -1201 reply
2/14dtoc: add missing code commentstools/dtoc/dtb_platdata.py+3 -01 reply
2/14dtoc: add missing code comments+0 -02 replies
3/14core: add support for U_BOOT_DRIVER_ALIASdrivers/clk/at91/pmc.c drivers/gpio/mxs_gpio.c drivers/gpio/sandbox.c +11 more+35 -01 reply
4/14dtoc: add support to scan driverstools/dtoc/dtb_platdata.py tools/dtoc/test_dtoc.py+120 -42 replies
4/14dtoc: add support to scan drivers+0 -00 replies
5/14dtoc: add option to disable warningstools/dtoc/dtb_platdata.py tools/dtoc/dtoc_test_invalid_driver.dts tools/dtoc/test_dtoc.py+85 -342 replies
6/14dm: doc: update of-plat with the support for driver aliasesdoc/driver-model/of-plat.rst+13 -12 replies
7/14core: drop const for struct driver_infodrivers/core/device.c drivers/core/root.c include/dm/device-internal.h+3 -32 replies
8/14core: extend struct driver_info to point to devicedrivers/core/device.c drivers/core/root.c include/dm/device.h +1 more+56 -32 replies
9/14sandbox: Move section u_boot_list to make it RWarch/sandbox/cpu/u-boot-spl.lds+1 -12 replies
10/14dtoc: extend dtoc to use struct driver_info when linking nodesdrivers/clk/clk-uclass.c drivers/misc/irq-uclass.c drivers/mmc/ftsdc010_mci.c +7 more+100 -651 reply
11/14dm: doc: update of-plat with new phandle supportdoc/driver-model/of-plat.rst+16 -82 replies
12/14arm: dts: include gpio nodes for card detectarch/arm/dts/da850-evm-u-boot.dtsi arch/arm/dts/da850-lcdk-u-boot.dtsi arch/arm/dts/rk3288-u-boot.dtsi +2 more+24 -13 replies
12/14arm: dts: include gpio nodes for card detect+0 -01 reply
13/14dtoc: update dtb_platdata to support cd-gpiostools/dtoc/dtb_platdata.py tools/dtoc/test_dtoc.py+11 -72 replies
14/14dtoc: add test for cd-gpiostools/dtoc/dtoc_test_phandle_cd_gpios.dts tools/dtoc/test_dtoc.py+109 -02 replies

Reviews trailers per patch

All 17 patches have a Reviewed-by or Acked-by.

PatchSimon GlassAdam Ford
1/14R-b
2/14R-b
2/14R-b
3/14R-b
4/14R-b
4/14R-b
5/14R-b R-b
6/14R-b R-b
7/14R-b R-b
8/14R-b R-b
9/14R-b R-b
10/14R-b
11/14R-b R-b
12/14R-b T-b
12/14R-b T-b
13/14R-b R-b
14/14R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/14] improve OF_PLATDATA support

When using OF_PLATDATA dtbs are converted to C structs in order to save space as we can remove both dtbs and libraries from TPL/SPL binaries.

This patchset tries to improve its support by overcoming some limitations in the current implementation

First, the support for scan and check for valid driver/aliases is added in order to generate U_BOOT_DEVICE entries with valid driver names.

Secondly, the way information about linked noded (phandle) is generated in C structs is improved in order to make it easier to get a device associated to its data.

Lastly the support for the property cd-gpios is added, which is used to configure the card detection gpio on MMC is added.

This implementation is based in discussion in [1], [2] and [3]

[1] https://patchwork.ozlabs.org/patch/1249198/
[2] https://patchwork.ozlabs.org/project/uboot/list/?series=167495&state=*
[3] https://patchwork.ozlabs.org/project/uboot/list/?series=176759&state=*

Changes for v4
- Fix syntax error on dtoc

Changes for v3
- Split patches to separate core from tools changes
- Squash patches to avoid errors on tests
- Fix lines longer than 80 chars

Changes for v2
- Rename drivers to match compatible strings
- Fix out-of-trees usage of dtoc
- Fix test coverage
- Improve documentation
- Improve format

Walter Lozano (14):
drivers: rename drivers to match compatible string
dtoc: add missing code comments
core: add support for U_BOOT_DRIVER_ALIAS
dtoc: add support to scan drivers
dtoc: add option to disable warnings
dm: doc: update of-plat with the support for driver aliases
core: drop const for struct driver_info
core: extend struct driver_info to point to device
sandbox: Move section u_boot_list to make it RW
dtoc: extend dtoc to use struct driver_info when linking nodes
dm: doc: update of-plat with new phandle support
arm: dts: include gpio nodes for card detect
dtoc: update dtb_platdata to support cd-gpios
dtoc: add test for cd-gpios

 arch/arm/dts/da850-evm-u-boot.dtsi            |   4 +
 arch/arm/dts/da850-lcdk-u-boot.dtsi           |   4 +
 arch/arm/dts/rk3288-u-boot.dtsi               |   4 +
 arch/arm/dts/rk3288-veyron-speedy-u-boot.dtsi |   2 +-
 arch/arm/dts/rk3288-veyron-u-boot.dtsi        |  11 +
 .../mach-at91/arm926ejs/at91sam9260_devices.c |   6 +-
 .../arm926ejs/at91sam9m10g45_devices.c        |  10 +-
 arch/arm/mach-rockchip/rk3328/syscon_rk3328.c |   4 +-
 arch/sandbox/cpu/u-boot-spl.lds               |   2 +-
 board/davinci/da8xxevm/omapl138_lcdk.c        |   2 +-
 board/sandbox/sandbox.c                       |   2 +-
 doc/driver-model/of-plat.rst                  |  38 ++-
 drivers/clk/at91/clk-master.c                 |   4 +-
 drivers/clk/at91/clk-peripheral.c             |   4 +-
 drivers/clk/at91/pmc.c                        |   6 +-
 drivers/clk/clk-uclass.c                      |  11 +-
 drivers/core/device.c                         |  28 +-
 drivers/core/root.c                           |   6 +-
 drivers/core/simple-bus.c                     |   4 +-
 drivers/gpio/at91_gpio.c                      |   4 +-
 drivers/gpio/da8xx_gpio.c                     |   4 +-
 drivers/gpio/mxs_gpio.c                       |   8 +-
 drivers/gpio/rk_gpio.c                        |   4 +-
 drivers/gpio/sandbox.c                        |   6 +-
 drivers/i2c/rk_i2c.c                          |   6 +-
 drivers/input/cros_ec_keyb.c                  |   4 +-
 drivers/misc/cros_ec_sandbox.c                |   4 +-
 drivers/misc/irq-uclass.c                     |  10 +-
 drivers/mmc/davinci_mmc.c                     |   4 +-
 drivers/mmc/ftsdc010_mci.c                    |   2 +-
 drivers/mmc/mxsmmc.c                          |   7 +-
 drivers/mmc/rockchip_dw_mmc.c                 |   7 +-
 drivers/mmc/rockchip_sdhci.c                  |   2 +-
 drivers/mtd/spi/sf-uclass.c                   |   2 +-
 drivers/mtd/spi/sf_probe.c                    |   6 +-
 drivers/pinctrl/nxp/pinctrl-mxs.c             |   6 +-
 drivers/pinctrl/pinctrl-at91.c                |   6 +-
 drivers/pinctrl/rockchip/pinctrl-rk3188.c     |   2 +-
 drivers/pinctrl/rockchip/pinctrl-rk3288.c     |   2 +-
 drivers/pinctrl/rockchip/pinctrl-rk3328.c     |   2 +-
 drivers/pinctrl/rockchip/pinctrl-rk3368.c     |   2 +-
 drivers/power/pmic/rk8xx.c                    |   6 +-
 drivers/power/regulator/fixed.c               |   4 +-
 drivers/ram/rockchip/dmc-rk3368.c             |   2 +-
 drivers/ram/rockchip/sdram_rk3188.c           |   2 +-
 drivers/ram/rockchip/sdram_rk3288.c           |   2 +-
 drivers/ram/rockchip/sdram_rk3328.c           |   2 +-
 drivers/ram/rockchip/sdram_rk3399.c           |   2 +-
 drivers/serial/ns16550.c                      |   4 +
 drivers/serial/sandbox.c                      |   6 +-
 drivers/spi/mxs_spi.c                         |   8 +-
 drivers/spi/rk_spi.c                          |  10 +-
 drivers/spi/sandbox_spi.c                     |   4 +-
 drivers/tpm/tpm_tis_sandbox.c                 |   4 +-
 drivers/video/rockchip/rk3288_vop.c           |   4 +-
 drivers/video/sandbox_sdl.c                   |   4 +-
 drivers/watchdog/at91sam9_wdt.c               |   4 +-
 include/clk.h                                 |   4 +-
 include/dm/device-internal.h                  |   2 +-
 include/dm/device.h                           |  22 ++
 include/dm/platdata.h                         |  14 +
 test/dm/gpio.c                                |   2 +-
 test/dm/spi.c                                 |   6 +-
 test/py/tests/test_bind.py                    |  54 ++--
 tools/dtoc/dtb_platdata.py                    | 143 ++++++++-
 tools/dtoc/dtoc_test_invalid_driver.dts       |  15 +
 tools/dtoc/dtoc_test_phandle_cd_gpios.dts     |  42 +++
 tools/dtoc/test_dtoc.py                       | 287 +++++++++++++-----
 68 files changed, 672 insertions(+), 239 deletions(-)
 create mode 100644 arch/arm/dts/rk3288-veyron-u-boot.dtsi
 create mode 100644 tools/dtoc/dtoc_test_invalid_driver.dts
 create mode 100644 tools/dtoc/dtoc_test_phandle_cd_gpios.dts
Signature · 1 line
2.20.1