Skip to content

[TOPIC] Add OF_LIVE device tree fixup infrastructure#15

Merged
varada-qcom merged 2 commits intoqualcomm-linux:u-boot-mainline-1.0from
aswinm94:dt-fixup
Apr 16, 2026
Merged

[TOPIC] Add OF_LIVE device tree fixup infrastructure#15
varada-qcom merged 2 commits intoqualcomm-linux:u-boot-mainline-1.0from
aswinm94:dt-fixup

Conversation

@aswinm94
Copy link
Copy Markdown

This PR introduces a comprehensive OF_LIVE device tree fixup
infrastructure for Qualcomm Snapdragon platforms. The implementation
provides runtime device tree modifications to pass platform-specific
information from SMEM to the operating system through device tree.

Qualcomm Snapdragon SoCs require runtime device tree modifications to
provide accurate platform information that cannot be statically defined
in device tree source files. This includes:

  • Board-specific identification and variant information
  • DDR memory configuration
  • Hardware subset parts
  • SoC-specific device node adjustments

@b49020 b49020 changed the title Add OF_LIVE device tree fixup infrastructure [TOPIC] Add OF_LIVE device tree fixup infrastructure Apr 15, 2026
Add device tree fixup handler infrastructure to support runtime
modifications of board information, DDR configuration, and hardware
subset parts through the OF_LIVE interface.

This patch introduces three fixup handlers that modify the device tree
at runtime to provide platform-specific information from SMEM:

1. Board info fixup (qcom_fixup_boardinfo.c)
   - Adds board-specific information like serial number to the
     device tree

2. DDR info fixup (qcom_fixup_ddrinfo.c)
   - Adds DDR configuration information like DDR size & regions

3. Subset parts fixup (qcom_fixup_subsetparts.c)
   - Identifies & enables OS to adapt to available hardware subparts
     (GPU, video, camera, display, audio, modem, WLAN, compute,
     sensors, NPU, disabled CPU cores, etc.)

Supporting headers:
- qcom_fixup_handlers.h: Function prototypes and type definitions
- chipinfo_def.h: Chip identification and part definitions
- rampart.h: Platform-specific definitions

Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Integrate the device tree fixup handlers into ft_board_setup() to
enable runtime device tree modifications for Qualcomm Snapdragon
platforms.

This patch adds:

1. ft_board_setup() implementation
   - Calls all registered fixup handlers
   - Provides central point for device tree modifications
   - Executes before passing DT to kernel

2. soc_specific_fixups() function
   - Handles SoC-specific device tree modifications
   - Currently implements QCS615 MMC node disable
   - Extensible for future SoC-specific fixups

3. fixup_dt_node() utility function
   - Generic device tree node manipulation helper
   - Supports multiple operation types:
     * APPEND_PROP_U32/U64: Append 32/64-bit properties
     * SET_PROP_U32/U64/STRING: Set property values
     * ADD_SUBNODE: Add new device tree nodes
   - Automatically adjusts FDT size as needed

Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
@varada-qcom varada-qcom merged commit 49bcf74 into qualcomm-linux:u-boot-mainline-1.0 Apr 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants