Add support for extension boards detection and DT overlays application
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest10 patches 0 repliesNew
- v410 patches 0 repliesSuperseded
- v310 patches 0 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 12 patches | 0 replies | Superseded | |
| v1 | 10 patches | 0 replies | Superseded |
Changes in v5 from the cover letter
- Rebase on master
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/10 | fdt_support: move fdt_valid from cmd_fdt.c to fdt_support.ccmd/ common/ include/ | +48 | 1 reply | |
| 2/10 | cmd: add support for a new "extension" commandcmd/ cmd/ cmd/ +2 more | +322 | 1 reply | |
| 3/10 | pytest: add sandbox test for "extension" commandarch/ arch/ arch/ +3 more | +96 | 1 reply | |
| 4/10 | ti/common: add support for extension_scan_board functionboard/ board/ board/ +1 more | +131 | 1 reply | |
| 5/10 | am57xx: add support for cape detect functionalityarch/ board/ | +2 | 1 reply | |
| 6/10 | w1: replace dt detection by automatic detectiondrivers/ drivers/ drivers/ +3 more | +104 | 1 reply | |
| 7/10 | arm: sunxi: add support for DIP detection to CHIP boardarch/ board/ board/ | +110 | 2 replies | |
| 8/10 | configs: CHIP: add support for DIP detect functionalityconfigs/ | +1 | 2 replies | |
| 8/10 | configs: CHIP: add support for DIP detect functionality | +0 | 0 replies | |
| 9/10 | arm: am335x: add support for i2c2 busarch/ board/ board/ +1 more | +19 | 1 reply | |
| 10/10 | am335x: add support for cape detect functionalityarch/ board/ | +2 | 1 reply |
Reviews trailers per patch
6 of 11 patches have a Reviewed-by or Acked-by.
| Patch | Tom Rini | Maxime Ripard | Andre Przywara |
|---|---|---|---|
| 1/10 | R-b | R-b | |
| 2/10 | R-b | ||
| 3/10 | |||
| 4/10 | |||
| 5/10 | |||
| 6/10 | R-b | ||
| 7/10 | R-b | A-b | |
| 8/10 | A-b | A-b | |
| 8/10 | A-b | A-b | |
| 9/10 | |||
| 10/10 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v5 00/10] Add support for extension boards detection and DT overlays application
This series of patches aims at proposing a generic U-Boot mechanism to detect extension boards connected to the HW platform, and apply the appropriate Device Tree overlays depending on the detected extension boards.
Indeed, numerous popular platforms, such as the BeagleBone or the RaspberryPi, feature some kind of extension board mechanism. These extension boards are often discoverable through some kind of EEPROM (connected on I2C, 1-wire, etc.) and require Device Tree overlays to be applied at the U-Boot level to provide a complete HW description to the Linux kernel. However, currently this logic is usually implemented ad-hoc in downstream forks of U-Boot.
This series proposes to bring a HW-agnostic and generic solution to this problem to upstream U-Boot. The series shows that it is generic enough by implementing its usage for 2 different families of HW platforms and expansion boards:
- The BeagleBone Black and BeagleBone AI, that use extension boards where the EEPROM describing the extension boards is connected over I2C.
- The CHIP, that uses extension boards where the EEPROM describing the extension boards is connected over 1-wire.
The patch series implements a new command called "extension", with two sub-commands:
- "extension scan" to detect available extension boards
- "extension list" will simply list the detected extension boards
- "extension apply" will allow to apply the Device Tree overlays corresponding to one extension board or to all expansion boards
Note that the name "extension" has been chosen to not refer to any particular board-specific terminology for extension boards ("cape" for BeagleBone, "DIP" for CHIP, "hat" for RaspberryPi, etc.). However, we welcome suggestions of other names and are definitely willing to use a different naming.
The "extension apply" command requires two environment variables to be defined so that it knows how to apply DT overlays. This is described in more details in PATCH 1.
This generic code requires board-specific code for the detection and enumeration of extension boards. This is simply implemented in the form of a board-specific extension_board_scan() function, which fills in a list of detected extension boards.
In detail:
- PATCH 1 move fdt_valid function to fdt_support file
- PATCH 2 implements the generic command and logic
- PATCH 3 implements the python test for the "extension" command
- PATCH 4 implements the board-specific code for the BeagleBone platforms
- PATCH 5 enables the mechanism for the BeagleBone AI
- PATCH 6 review the detection mechanism of one-wire devices
- PATCH 7 and 8 enable the mechanism for the CHIP
- PATCH 9 and 10 enable the mechanism for the BeagleBone Black
Thanks in advance for your review and feedback
Change since v1:
- remove the one wire devicetree description of the CHIP board
- rewrite the detection of w1 to makes it automatic and not devicetree dependent
- replace Kconfig CHIP board target by Kconfig CHIP_DIP_SCAN simple option
- rewrite doc to rST syntax
- make few syntax update
Change since v2:
- review the detection of w1 to makes it compatible with automatic detection alongside the devicetree description detection
- update the patch separation between the mechanism for the CHIP and the configuration activation
Change since v3:
- Update commit messages on the extension command patch
- Remove a test on CMD_EXTENSION in the chip.c file.
Change since v4:
- Rebase on master
Kory Maincent (10):
fdt_support: move fdt_valid from cmd_fdt.c to fdt_support.c
cmd: add support for a new "extension" command
pytest: add sandbox test for "extension" command ti/common: add support for extension_scan_board function
am57xx: add support for cape detect functionality
w1: replace dt detection by automatic detection
arm: sunxi: add support for DIP detection to CHIP board
configs: CHIP: add support for DIP detect functionality
arm: am335x: add support for i2c2 bus
am335x: add support for cape detect functionality
arch/Kconfig | 2 + arch/arm/mach-omap2/am33xx/Kconfig | 1 + arch/arm/mach-omap2/am33xx/clock_am33xx.c | 1 + arch/arm/mach-omap2/omap5/Kconfig | 1 + arch/arm/mach-sunxi/Kconfig | 9 ++ arch/sandbox/dts/Makefile | 1 + arch/sandbox/dts/overlay0.dts | 9 ++ arch/sandbox/dts/overlay1.dts | 9 ++ board/sandbox/sandbox.c | 23 +++ board/sunxi/Makefile | 1 + board/sunxi/chip.c | 100 +++++++++++++ board/ti/am335x/board.c | 3 + board/ti/am335x/board.h | 1 + board/ti/am335x/mux.c | 15 ++ board/ti/am57xx/board.c | 1 + board/ti/common/Kconfig | 6 + board/ti/common/Makefile | 1 + board/ti/common/cape_detect.c | 96 +++++++++++++ board/ti/common/cape_detect.h | 28 ++++ cmd/Kconfig | 12 ++ cmd/Makefile | 1 + cmd/extension_board.c | 167 ++++++++++++++++++++++ cmd/fdt.c | 49 ------- common/fdt_support.c | 46 ++++++ configs/CHIP_defconfig | 1 + doc/usage/extension.rst | 111 ++++++++++++++ drivers/w1-eeprom/ds24xxx.c | 7 + drivers/w1-eeprom/ds2502.c | 6 + drivers/w1-eeprom/w1-eeprom-uclass.c | 31 ---- drivers/w1/w1-uclass.c | 76 +++++++++- include/extension_board.h | 31 ++++ include/fdt_support.h | 2 + include/w1-eeprom.h | 2 - include/w1.h | 17 +++ test/py/tests/test_extension.py | 52 +++++++ 35 files changed, 835 insertions(+), 84 deletions(-) create mode 100644 arch/sandbox/dts/overlay0.dts create mode 100644 arch/sandbox/dts/overlay1.dts create mode 100644 board/sunxi/chip.c create mode 100644 board/ti/common/cape_detect.c create mode 100644 board/ti/common/cape_detect.h create mode 100644 cmd/extension_board.c create mode 100644 doc/usage/extension.rst create mode 100644 include/extension_board.h create mode 100644 test/py/tests/test_extension.py
Signature · 1 line
2.17.1