{"id":2224430,"url":"http://patchwork.ozlabs.org/api/covers/2224430/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/cover/20260417120951.3454249-1-aswin.murugan@oss.qualcomm.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260417120951.3454249-1-aswin.murugan@oss.qualcomm.com>","list_archive_url":null,"date":"2026-04-17T12:09:44","name":"[v3,0/7] Add FIT multi-DTB selection for Qualcomm platforms","submitter":{"id":90811,"url":"http://patchwork.ozlabs.org/api/people/90811/?format=json","name":"Aswin Murugan","email":"aswin.murugan@oss.qualcomm.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/cover/20260417120951.3454249-1-aswin.murugan@oss.qualcomm.com/mbox/","series":[{"id":500319,"url":"http://patchwork.ozlabs.org/api/series/500319/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=500319","date":"2026-04-17T12:09:44","name":"Add FIT multi-DTB selection for Qualcomm platforms","version":3,"mbox":"http://patchwork.ozlabs.org/series/500319/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2224430/comments/","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=oXq4YXwC;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=XYP4y5V1;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=oss.qualcomm.com","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com\n header.b=\"oXq4YXwC\";\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=\"XYP4y5V1\";\n\tdkim-atps=neutral","phobos.denx.de; dmarc=none (p=none dis=none)\n header.from=oss.qualcomm.com","phobos.denx.de;\n spf=pass smtp.mailfrom=aswin.murugan@oss.qualcomm.com"],"Received":["from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fxty03cvhz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 22:10:48 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id D7F5183EEF;\n\tFri, 17 Apr 2026 14:10:45 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id D71A184214; Fri, 17 Apr 2026 14:10:44 +0200 (CEST)","from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com\n [205.220.180.131])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 3C56683B99\n for <u-boot@lists.denx.de>; Fri, 17 Apr 2026 14:10:42 +0200 (CEST)","from pps.filterd (m0279869.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63H7AZxg3438242\n for <u-boot@lists.denx.de>; Fri, 17 Apr 2026 12:10:40 GMT","from mail-pf1-f199.google.com (mail-pf1-f199.google.com\n [209.85.210.199])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dkg88s6w2-1\n (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n for <u-boot@lists.denx.de>; Fri, 17 Apr 2026 12:10:40 +0000 (GMT)","by mail-pf1-f199.google.com with SMTP id\n d2e1a72fcca58-82f780a13c9so539821b3a.0\n for <u-boot@lists.denx.de>; Fri, 17 Apr 2026 05:10:40 -0700 (PDT)","from hu-aswinm-blr.qualcomm.com\n (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82f8e9cbb28sm1744641b3a.13.2026.04.17.05.10.30\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 17 Apr 2026 05:10:38 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2","DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n content-transfer-encoding:date:from:message-id:mime-version\n :subject:to; s=qcppdkim1; bh=eKRJV/3fuW7t2c6NKQar8W7Xqjjvtg+yYmo\n QrTB/vko=; b=oXq4YXwCdHcsCaGAsUEHN6daajUrknn0ZtsfJ/5d2sZ4Vrf/M5m\n KofPJa7Uh8wLsp+oZqtdWGQwlRVCgD8m5zewQ960OcN6EYxxHfFQlfuW4ndimuOB\n MjRrJxrHqgqt9p2PH9tWKJG6yCUYduCYWJCCluk/XkmLc5pR/hpiEK8dwU9uMDaU\n IAaXGoH85cvt5IZ/t19LYs/Upuis9kUlyySmPwOIZuhL5coXSEbJM0PPK/GIy4Df\n amnb2zVoJZ103gW6xWgWb6Bfv3gz2wLrqMGsWvhFIMw0y7rNJ2bzsKUszLSMOnFZ\n X2panBxc9d1bgQfdygaxuwKSVG7O32tfuhA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1776427840; x=1777032640; darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:message-id:date:subject:to\n :from:from:to:cc:subject:date:message-id:reply-to;\n bh=eKRJV/3fuW7t2c6NKQar8W7Xqjjvtg+yYmoQrTB/vko=;\n b=XYP4y5V1L7UnVMtCNiA9CEI/RkLcEfgs2LbSL9XyXZQvmkT/tlz8kCtsl4/pC4MiRq\n ywqG9UxItKL4kR4L7Zs+zpvYvaTMjWDJc+xnO35GQ0CSRz3z1H+elsJNZ4YQy17aiegd\n eUbmDE24YWd2IMCZfp2Db3MQ0E8NzLjMVxXe5ZrgoSoPXXPC71magq2N3J16sXEQGmGs\n HoLT49b2luDlJ2RgBM/UarjvObca7AgTba1EsmUingK3XZxJkmqnHJkpLg9IRamlI7fy\n XPuBHBnRJa7T7vtHMLcyft+DRmyRnJb1Hr2EYPAi/j1NIZuLKnRBWWwiVjjuYVeCB3rK\n LQTw=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776427840; x=1777032640;\n h=content-transfer-encoding:mime-version:message-id:date:subject:to\n :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=eKRJV/3fuW7t2c6NKQar8W7Xqjjvtg+yYmoQrTB/vko=;\n b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t6IoYZZwvV0PX9ofvz7rLj1CMmpbAVQyr8d69clow/torbIf6yPzRaNffyntaC7UlY8vrd5Uq\n /u429eBYW+Bi92OKYRh/d5X3bDtwnqwtXVAf8dgGPE+xxrF38a4JY=","X-Received":["by 2002:aa7:8892:0:b0:82f:1f43:7190 with SMTP id\n d2e1a72fcca58-82f8b32160dmr2383013b3a.3.1776427839508;\n Fri, 17 Apr 2026 05:10:39 -0700 (PDT)","by 2002:aa7:8892:0:b0:82f:1f43:7190 with SMTP id\n d2e1a72fcca58-82f8b32160dmr2382990b3a.3.1776427839021;\n Fri, 17 Apr 2026 05:10:39 -0700 (PDT)"],"From":"Aswin Murugan <aswin.murugan@oss.qualcomm.com>","To":"trini@konsulko.com, casey.connolly@linaro.org, neil.armstrong@linaro.org,\n sumit.garg@kernel.org, aswin.murugan@oss.qualcomm.com,\n sughosh.ganu@arm.com, ilias.apalodimas@linaro.org, gchan9527@gmail.com,\n mchitale@ventanamicro.com, maximmosk4@gmail.com, jonas@kwiboo.se,\n marek.vasut@mailbox.org, quentin.schulz@cherry.de, peng.fan@nxp.com,\n sajattack@postmarketos.org, balaji.selvanathan@oss.qualcomm.com,\n wolfgang.wallner@at.abb.com, e@freeshell.de, yangshiji66@outlook.com,\n jan.kiszka@siemens.com, funderscore@postmarketos.org, hs@nabladev.com,\n kory.maincent@bootlin.com, jj251510319013@gmail.com,\n carlos.lopezr4096@gmail.com, u-boot-qcom@groups.io, u-boot@lists.denx.de","Subject":"[PATCH v3 0/7] Add FIT multi-DTB selection for Qualcomm platforms","Date":"Fri, 17 Apr 2026 17:39:44 +0530","Message-Id":"<20260417120951.3454249-1-aswin.murugan@oss.qualcomm.com>","X-Mailer":"git-send-email 2.34.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Proofpoint-ORIG-GUID":"tJqAzob2joFBkFlDeW4lMFw5F679Q14f","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDE3MDEyMiBTYWx0ZWRfX6LgPnRpRMAea\n PEPpvpExQw3CZD05JcLT5YfT/4pHnzWY/s4t3jTwZVTgE9LrhTjE9QIAosHxcaBL8M4MrXFVo/p\n rI67qKt4ifErMuAgCXMONsPm+wFWMyel4XDENedVQgEpP/V1nh3m6M2tbFOcTD0ryxhbsS0HCaR\n rBANGKE7cEiF38tQC7LQxAflbPq5xAS5W8P0PIUDLrV0NuwlYrN3Q8YTAk82Z1tve8er/1Dpgnk\n zDts3h/D0hpjGGinjm6f2cALi68aelycn6xhL0P+xo4wDsrWqrfpWoRBrox4xvG7XmWqWoTG6Hv\n 17XSKcTlOLoh4DJVCLWyjJ+MDXWEBlmD3EeIM3Q3UREnuWxu8JzlLQ/vEjUn7kvUHO+fkaqj4Gd\n fTPHrKIm6llTIm6JFDUJ/GULOL9Yvd1bprC6L5UUfg/s1XylF2y8iFwUaU6jdeSZNnfVAAjkBK0\n rA1bcfH1CLMPCGVHpFA==","X-Authority-Analysis":"v=2.4 cv=X+Fi7mTe c=1 sm=1 tr=0 ts=69e22340 cx=c_pps\n a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17\n a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=cSziVDP4AAAA:20\n a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=a0GKw4dbIcMnyn2RyNEA:9\n a=OpyuDcXvxspvyRM73sMx:22 a=bA3UWDv6hWIuX7UZL3qL:22","X-Proofpoint-GUID":"tJqAzob2joFBkFlDeW4lMFw5F679Q14f","X-Proofpoint-Virus-Version":"vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-17_01,2026-04-17_01,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n phishscore=0 clxscore=1015 spamscore=0 impostorscore=0 lowpriorityscore=0\n bulkscore=0 priorityscore=1501 malwarescore=0 adultscore=0 suspectscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604070000 definitions=main-2604170122","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"},"content":"This series adds dynamic device tree selection from FIT images for\nQualcomm Snapdragon platforms, enabling U-Boot to select the\nappropriate DTB based on hardware parameters detected from SMEM.\n\nQualcomm fit based DTB format is documented in [1]\nThe fit image contains only DTB, while the kernel will be part of UKI image.\n\nThe implementation consists of three parts:\n\n1. SMEM cache infrastructure: Provides cached access to commonly\n   used SMEM data (socinfo, RAM partitions) to avoid redundant\n   lookups during boot. Includes socinfo header from Linux kernel\n   for SoC identification.\n\n2. FIT multi-DTB selection: Implements the core selection logic\n   that reads hardware parameters from SMEM, parses metadata DTB,\n   matches FIT configurations, and loads the selected DTB with\n   overlays. Integrates with EFI boot flow by setting fdt_addr.\n\n3. mkimage: add fatfs image type for FAT partition images\n   Added fatimage.c handler that uses mkfs.vfat and mcopy to create\n   FAT images from a directory.\n\n[1] https://github.com/qualcomm-linux/qcom-dtb-metadata/blob/main/Documentation.md\n\n---\nChanges in v3:\n1. Runtime IMEM address lookup via DT: Removed CONFIG_QCOM_IMEM_SIZE Kconfig option.\n   Added qcom_imem_table[] mapping SoC compatible strings to IMEM addresses.\n\n2. Split SoC version sources: SoC hardware version now read from TCSR register via\n   qcom_read_tcsr_soc_version(). The soc_info->plat_ver from SMEM is stored separately\n   as board_version. Added socver and boardrev metadata node matching for finer-grained DTB selection.\n\n3. qcom_load_fit_image() returns int: Changed return type from efi_status_t to int,\n   returning standard Linux error codes for consistency with the rest of the driver.\n\n4. Code cleanup: strtok() replaced with strsep(); memcpy + manual null-termination replaced with strlcpy();\n   DDR thresholds use SZ_* macros; compatible matching and FDT loading extracted into dedicated helpers.\n\n5. image: add IH_TYPE_FATFS image type: Added new fatfs image type to represent a raw FAT\n   filesystem partition image, registered in the image type lookup table.\n\n6. mkimage: add fatfs image type for FAT partition images: Added fatimage.c handler that\n   uses mkfs.vfat and mcopy to create FAT images from a directory.\n   New --fat-extra-space, --fat-type, --fat-volume-id, --fat-mkfs-opts long options added\n   to mkimage.\n\n7. doc: document mkimage fatfs type and Qualcomm multi-DTB: Updated 'doc/mkimage.1' for the new\n   fatfs type and options. Added 'doc/board/qualcomm/multi_dtb.rst' covering FIT ITS configuration,\n   QCOM metadata format, socver/boardrev guidelines, and image creation steps.\n\nLink to v2:\nhttps://lore.kernel.org/u-boot/20260129184817.224101-1-aswin.murugan@oss.qualcomm.com/\n\nChanges in v2:\n- In v1, a combined DTB format was used for multi-DTB support. Based on\n  feedback, v2 implements FIT-based DTB selection instead.\n- Link to v1: https://lore.kernel.org/all/20260106122134.2047864-1-aswin.murugan@oss.qualcomm.com/\n\nAswin Murugan (7):\n  mach-snapdragon: Add generic SMEM cache infrastructure\n  mach-snapdragon: Add FIT multi-DTB selection support\n  configs: snapdragon: Enable FIT multi-DTB and configure IMEM\n  image: add IH_TYPE_FATFS image type\n  mkimage: add fatfs image type for FAT partition images\n  doc: document mkimage fatfs type and Qualcomm multi-DTB\n  mach-snapdragon: Reorder header includes\n\n arch/arm/mach-snapdragon/Kconfig             |    8 +\n arch/arm/mach-snapdragon/Makefile            |    1 +\n arch/arm/mach-snapdragon/board.c             |  123 +-\n arch/arm/mach-snapdragon/qcom-priv.h         |   24 +\n arch/arm/mach-snapdragon/qcom_fit_multidtb.c | 1103 ++++++++++++++++++\n arch/arm/mach-snapdragon/qcom_fit_multidtb.h |  189 +++\n arch/arm/mach-snapdragon/rampart.h           |  225 ++++\n boot/image.c                                 |    1 +\n configs/qcom_defconfig                       |    2 +\n doc/board/qualcomm/index.rst                 |    1 +\n doc/board/qualcomm/multi_dtb.rst             |  352 ++++++\n doc/mkimage.1                                |  103 ++\n include/image.h                              |    1 +\n include/soc/qcom/socinfo.h                   |  114 ++\n tools/Makefile                               |    1 +\n tools/fatimage.c                             |  495 ++++++++\n tools/fatimage.h                             |   25 +\n tools/mkimage.c                              |   21 +\n tools/mkimage.h                              |   15 +\n 19 files changed, 2793 insertions(+), 11 deletions(-)\n create mode 100644 arch/arm/mach-snapdragon/qcom_fit_multidtb.c\n create mode 100644 arch/arm/mach-snapdragon/qcom_fit_multidtb.h\n create mode 100644 arch/arm/mach-snapdragon/rampart.h\n create mode 100644 doc/board/qualcomm/multi_dtb.rst\n create mode 100644 include/soc/qcom/socinfo.h\n create mode 100644 tools/fatimage.c\n create mode 100644 tools/fatimage.h"}