Add support for fastboot reboot reason detection#5
Closed
aswinm94 wants to merge 5 commits intoqualcomm-linux:qcom-nextfrom
Closed
Add support for fastboot reboot reason detection#5aswinm94 wants to merge 5 commits intoqualcomm-linux:qcom-nextfrom
aswinm94 wants to merge 5 commits intoqualcomm-linux:qcom-nextfrom
Conversation
OP-TEE message UID check API can be useful to know whether OP-TEE is enabled on not assuming the corresponding SMC call is properly handled if OP-TEE is not supported. This API can be used by platform code to know OP-TEE presence and on that basis OP-TEE DT node can be added as part of DT fixups for the OP-TEE driver probe to happen for both U-Boot and Linux. Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Add support for OP-TEE live tree DT fixup support which enables U-Boot OP-TEE driver to be probed. As well as the EFI DT fixup protocol allows the live tree fixup to be carried over to the OS for the OP-TEE driver in the OS to probe as well. Note that this fixup only gets applied if OP-TEE support is detected via checking for OP-TEE message UID. Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Recently upstream TF-A/OP-TEE has started gaining support for Qcom
platforms. RB3Gen2 being the first one and more to come. U-Boot in
corresponding boot flow is packaged as a position independent executable.
So, lets add a generic U-Boot config fragment for Qcom platforms to
support TF-A/OP-TEE based TrustZone stack. Build command:
$ ./scripts/kconfig/merge_config.sh \
configs/qcom_defconfig \
board/qualcomm/tfa-optee.config
$ make -j`nproc` DEVICE_TREE=qcom/qcs6490-rb3gen2
For more information refer here:
https://trustedfirmware-a.readthedocs.io/en/latest/plat/qti/rb3gen2.html
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Do FAT read and write based on the device sector size instead of the size recorded in the FAT meta data. FAT code issues i/o in terms of the sector size. Convert that to device sector size before doing the actual i/o. Additionally, handle leading/trailing blocks when the meta data based block no and i/o size is not an exact multiple of the device sector size or vice versa. Tested on UFS device with sector size 4096 and meta data recorded sector size 512. Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Member
|
As per upstream comments, there seems to be a lot of rework needed on the implementation approach. Can we address that feedback and then add v2 to the staging tree? |
9872ba4 to
08ddb75
Compare
Add functionality to detect and handle reboot-to-bootloader requests by reading PMIC PON (Power On) registers. When the device is rebooted with the bootloader flag set, U-Boot will automatically enter fastboot mode. This implementation supports multiple PMIC generations: - Gen 4 PMICs: Uses PON_SOFT_RB_SPARE register (0x88F) - Newer PMICs: Uses SDAM-based PON_REBOOT_REASON register (0x7148) The PMIC model is automatically detected via revision ID registers to determine the correct register addresses. After detecting a fastboot reboot reason, the register is cleared and fastboot mode is entered via the "run fastboot" command. Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
08ddb75 to
0a93901
Compare
699249a to
57da17b
Compare
Member
|
Closing this one as #11 implementation follows upstream now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add functionality to detect and handle reboot-to-bootloader requests
by reading PMIC PON (Power On) registers. When the device is rebooted
with the bootloader flag set, U-Boot will automatically enter fastboot
mode.
This implementation supports multiple PMIC generations:
The PMIC model is automatically detected via revision ID registers to
determine the correct register addresses. After detecting a fastboot
reboot reason, the register is cleared and fastboot mode is entered
via the "run fastboot" command.
commits for this PR
mach-snapdragon:: Add support for fastboot reboot reason detection
upstream link: https://lore.kernel.org/all/20260108065533.1143179-1-aswin.murugan@oss.qualcomm.com/