Skip to content

[qcom-next] Add memory node device tree fixup infrastructure#53

Open
aswinm94 wants to merge 2 commits intoqualcomm-linux:qcom-nextfrom
aswinm94:ddr-mem
Open

[qcom-next] Add memory node device tree fixup infrastructure#53
aswinm94 wants to merge 2 commits intoqualcomm-linux:qcom-nextfrom
aswinm94:ddr-mem

Conversation

@aswinm94
Copy link
Copy Markdown

of_live: dts: Add runtime memory node fixup from SMEM

Implement a minimal OF_LIVE fixup to populate the memory node
reg property at runtime using memory ranges obtained from SMEM.

On Qualcomm Snapdragon platforms, the usable physical memory
layout cannot be fully described in the kernel DTS, as it depends
on firmware carve‑outs and platform configuration determined at
runtime. This fixup ensures the kernel receives an accurate
memory map during boot.

upstream-link: https://lore.kernel.org/all/20260113115404.1448759-1-aswin.murugan@oss.qualcomm.com/#t

This PR drops the Add cached SMEM socinfo accessor api patch & SMEM cache infra from the series, these were added as part of FIT DTB Change

Add device tree DDR configuration fixup handler
infrastructure to support runtime dts modifications.

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

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. 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>
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.

1 participant