Skip to content

iq-9075-evk: build sdcc feature DTs as overlays#1952

Open
mchunara007 wants to merge 2 commits into
qualcomm-linux:masterfrom
mchunara007:lemans_fitdtb_sdcc
Open

iq-9075-evk: build sdcc feature DTs as overlays#1952
mchunara007 wants to merge 2 commits into
qualcomm-linux:masterfrom
mchunara007:lemans_fitdtb_sdcc

Conversation

@mchunara007
Copy link
Copy Markdown

@mchunara007 mchunara007 commented Apr 15, 2026

LeMans EVK board supports either eMMC or SD-card, but only one can be
active at a time due to shared host controller. The storage medium is
selected via a dip switch.

Enable metadata based selection for eMMC and SD card as overlays to support both the medium based on the DIP switch selection on the EVK board.

Copy link
Copy Markdown
Contributor

@lumag lumag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message should start by the description of the problem the commit tries to solve.

Comment thread conf/machine/iq-9075-evk.conf
@@ -32,6 +32,18 @@ FIT_DTB_COMPATIBLE[lemans-evk+lemans-evk-ifp-mezzanine] = " \
qcom,qcs9075-iot-subtype1 \
qcom,qcs9075v2-iot-subtype1 \
"
FIT_DTB_COMPATIBLE[lemans-evk+lemans-evk-sd-card] = " \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, what happens with the default setting?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default, the UEFI would populate 'sdcard' metadata. only in case of eMMC attached, 'emmc' will get populated. So by default this would select the lemans-evk-sd-card overlay

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then why do we need the -sd-card at all?? Why can't it be a default here too, being overriden only if emmc is attached.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/attached/selected/

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If SD-card-specific properties are added unconditionally in the base DT, certain boolean flags such as no-mmc would conflict with the eMMC use case. These properties also cannot be removed later through the eMMC overlay because of DT overlay limitations. On the other hand, if such flags are omitted, the current driver probe flow attempts SD, MMC, and SDIO detection, which leads to failure logs for unsupported modes. Such logs are not acceptable for certification requirements. Similarly, on the Monaco board, where eMMC is the default configuration, eMMC-specific properties such as supports-cqe for command queue support would conflict with SD-card operation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't suggest adding uSD properties to the base DT. However, corresponding dtso can be selected by default.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks for clarification. Updated the commit to load the SD card as default case and overlay eMMC only when eMMC is detected and metadata is populated with the string accordingly.

This aligns with the default DIP switch position on the boards.

qcom,qcs9075-iot-subtype1-sdcard \
qcom,qcs9075v2-iot-subtype1-sdcard \
"
FIT_DTB_COMPATIBLE[lemans-evk+lemans-evk-ifp-mezzanine+lemans-evk-emmc] = " \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can there be a non-ifp board with eMMC?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For LeMans EVK, the eMMC is present on ifp mezz board, so non-ifp board with eMMC is not possible.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it explained in the commit message? No.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the commit message to explain the eMMC being IFP specific case.

@mchunara007
Copy link
Copy Markdown
Author

Commit message should start by the description of the problem the commit tries to solve.

Updated the commit message with problem statement.

@ricardosalveti
Copy link
Copy Markdown
Contributor

Please rebase to fix the conflicts.

LeMans EVK board supports either eMMC or SD-card, but only one can be
active at a time due to shared host controller. The storage medium is
selected via a dip switch.

Add the sd card and eMMC device tree overlay for the LeMans EVK to
KERNEL_DEVICETREE in the iq-9075-evk machine configuration to
ensure device tree coverage for LeMans sdcc storage usecase.

Signed-off-by: Monish Chunara <monish.chunara@oss.qualcomm.com>
LeMans EVK can use either SD card or eMMC depending on the board
configuration selected through the DIP switch. However, eMMC support is
available only when the IFP mezzanine board is present, so a non-IFP
eMMC configuration is not a valid hardware combination.

Build the SDCC-related DTs as overlays and use metadata-based selection
to pick the appropriate storage configuration for the detected board
variant. This keeps the valid SD-card and IFP+eMMC combinations
explicitly modeled without introducing unsupported configurations.

Signed-off-by: Monish Chunara <monish.chunara@oss.qualcomm.com>
@mchunara007 mchunara007 force-pushed the lemans_fitdtb_sdcc branch from f943755 to 6849a74 Compare May 12, 2026 10:44
@mchunara007
Copy link
Copy Markdown
Author

Rebased and conflicts resolved.

@ricardosalveti
Copy link
Copy Markdown
Contributor

["ERROR: linux-yocto-6.18.24+git-r0 do_generate_qcom_fitimage: FIT_DTB_COMPATIBLE[lemans-evk] is not set for 'lemans-evk.dtb'.\n", 'ERROR: Logfile of failure stored in: /work/build/tmp/work/qcom_armv8a-qcom-linux/linux-yocto/6.18.24+git/temp/log.do_generate_qcom_fitimage.292270\n', "ERROR: Task (/work/build/../oe-core/meta/recipes-kernel/linux/linux-yocto_6.18.bb:do_generate_qcom_fitimage) failed with exit code '1'\n"]

@ricardosalveti
Copy link
Copy Markdown
Contributor

You changed the default but included a dtbo that is only available in our own kernel trees.

shashim-quic

This comment was marked as off-topic.

@mchunara007
Copy link
Copy Markdown
Author

You changed the default but included a dtbo that is only available in our own kernel trees.

Can you please help to understand which tree the DT changes should be merged in. Is it the linux-next where we expect the DT files to be present? On qcom-next and qcom-6.18.y branch the DT changes are merged and available.

@lumag
Copy link
Copy Markdown
Contributor

lumag commented May 28, 2026

You changed the default but included a dtbo that is only available in our own kernel trees.

Can you please help to understand which tree the DT changes should be merged in. Is it the linux-next where we expect the DT files to be present? On qcom-next and qcom-6.18.y branch the DT changes are merged and available.

See LINUX_QCOM_KERNEL_DEVICETREE.

@ricardosalveti
Copy link
Copy Markdown
Contributor

With #2305 you should be able to separate what is qcom specific in the fit-dtb-compatible as well.

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.

4 participants