[PATCH V7 15/15] iot2050: Add support for configuring M.2 connector
Jan Kiszka
jan.kiszka at siemens.com
Thu Mar 2 07:36:31 CET 2023
On 02.03.23 00:38, Simon Glass wrote:
> Hi Jan,
>
> On Tue, 28 Feb 2023 at 11:23, Jan Kiszka <jan.kiszka at siemens.com> wrote:
>>
>> From: Jan Kiszka <jan.kiszka at siemens.com>
>>
>> The M.2 slots of the related IOT2050 variant need to be configured
>> according to the plugged cards. This tries to detect the card using the
>> M.2 configuration pins of the B-key slot. If that fails, a U-Boot
>> environment variable can be set to configure manually. This variable is
>> write-permitted also in secure boot mode as it is not able to undermine
>> the integrity of the booted system.
>>
>> The configuration is then applied to mux the serdes and to fix up the
>> device tree passed to or loaded by the bootloader. The fix-ups are
>> coming from device tree overlays that are embedded into the firmware
>> image and there also integrity protected. The OS remains free to load
>> a device tree to which they do not apply: U-Boot will not fail to boot
>> in that case.
>>
>> Based on original patch by Chao Zeng.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
>> ---
>> arch/arm/dts/Makefile | 4 +-
>> arch/arm/dts/k3-am65-iot2050-boot-image.dtsi | 38 ++-
>> ...050-advanced-m2-bkey-ekey-pcie-overlay.dts | 27 ++
>> ...-iot2050-advanced-m2-bkey-usb3-overlay.dts | 47 ++++
>> board/siemens/iot2050/board.c | 259 +++++++++++++++++-
>> doc/board/siemens/iot2050.rst | 18 ++
>> include/configs/iot2050.h | 1 +
>> 7 files changed, 391 insertions(+), 3 deletions(-)
>> create mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced-m2-bkey-ekey-pcie-overlay.dts
>> create mode 100644 arch/arm/dts/k3-am6548-iot2050-advanced-m2-bkey-usb3-overlay.dts
>
> There is an 'extension' command and associated infra available.
To my understanding, this is about scripting, open-coding extension
detection and overlay application. Here we are making this automatic.
Also, we are not really detecting an extension board, more the used
connector. struct extension therefore does not really fit.
> Also
> there is sysinfo. I just wanted to check if either of those is helpful
> here.
This might save a handful of lines of own code around gpio parsing. We
will have a look on top of this.
Thanks,
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
More information about the U-Boot
mailing list