Skip to content

RFC improve OF_PLATDATA support

Walter Lozano u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6dtoc: add support to scan driversinclude/dm/device.h tools/dtoc/dtb_platdata.py+55 -41 reply
1/6dtoc: add support to scan drivers+0 -01 reply
2/6core: extend struct driver_info to point to devicedrivers/core/device.c drivers/core/root.c include/dm/device-internal.h +2 more+48 -41 reply
2/6core: extend struct driver_info to point to device+0 -01 reply
3/6dtoc: extend dtoc to use struct driver_info when linking nodesdrivers/clk/clk-uclass.c drivers/misc/irq-uclass.c drivers/mmc/ftsdc010_mci.c +6 more+25 -161 reply
3/6dtoc: extend dtoc to use struct driver_info when linking nodes+0 -00 replies
4/6dtoc: update tests to match new platdatatools/dtoc/test_dtoc.py+81 -421 reply
4/6dtoc: update tests to match new platdata+0 -00 replies
5/6dtoc: update dtb_platdata to support cd-gpiostools/dtoc/dtb_platdata.py tools/dtoc/test_dtoc.py+9 -61 reply
6/6dtoc add test for cd-gpiostools/dtoc/dtoc_test_phandle_cd_gpios.dts tools/dtoc/test_dtoc.py+114 -01 reply
6/6dtoc add test for cd-gpios+0 -00 replies

Reviews trailers per patch

5 of 11 patches have a Reviewed-by or Acked-by.

PatchSimon Glass
1/6
1/6
2/6
2/6
3/6
3/6
4/6R-b
4/6R-b
5/6R-b
6/6R-b
6/6R-b

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

Read the v1 thread

Cover letter [RFC 0/6] 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 the suport 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] and [2]

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

Walter Lozano (6):
dtoc: add support to scan drivers
core: extend struct driver_info to point to device
dtoc: extend dtoc to use struct driver_info when linking nodes
dtoc: update tests to match new platdata
dtoc: update dtb_platdata to support cd-gpios
dtoc add test for cd-gpios

 drivers/clk/clk-uclass.c                  |   8 +-
 drivers/core/device.c                     |  25 ++-
 drivers/core/root.c                       |   6 +-
 drivers/misc/irq-uclass.c                 |   4 +-
 drivers/mmc/ftsdc010_mci.c                |   2 +-
 drivers/mmc/rockchip_dw_mmc.c             |   2 +-
 drivers/mmc/rockchip_sdhci.c              |   2 +-
 drivers/ram/rockchip/sdram_rk3399.c       |   2 +-
 drivers/spi/rk_spi.c                      |   2 +-
 include/clk.h                             |   2 +-
 include/dm/device-internal.h              |   2 +-
 include/dm/device.h                       |  19 +++
 include/dm/platdata.h                     |   6 +
 tools/dtoc/dtb_platdata.py                |  83 +++++++--
 tools/dtoc/dtoc_test_phandle_cd_gpios.dts |  42 +++++
 tools/dtoc/test_dtoc.py                   | 197 +++++++++++++++++-----
 16 files changed, 332 insertions(+), 72 deletions(-)
 create mode 100644 tools/dtoc/dtoc_test_phandle_cd_gpios.dts
Signature · 1 line
2.20.1