From patchwork Fri Mar 14 16:09:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 873456 Delivered-To: patch@linaro.org Received: by 2002:a5d:4308:0:b0:38f:210b:807b with SMTP id h8csp793952wrq; Fri, 14 Mar 2025 09:10:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVeTM3BxmWbKWIJj/fozFGH1gmbu98esvHXDsT5bGxXKuxc/a73rKLomeBaco3uuTGyMqJo5g==@linaro.org X-Google-Smtp-Source: AGHT+IF1Q50oHeac7he9N6T1VoEpk56Uc06W7qg78zC1EoUTwI0yy5VB8tffM8rdZRuu/YKeMBRu X-Received: by 2002:a05:6402:3586:b0:5e0:2e70:c2af with SMTP id 4fb4d7f45d1cf-5e8a0228d97mr3158313a12.26.1741968614855; Fri, 14 Mar 2025 09:10:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1741968614; cv=none; d=google.com; s=arc-20240605; b=HFNqo8qWu40ILAjZrigRLXIlBETWYEkLt2PEJh1JwG6xzL3mEOSq3BC+3MuH9msvey d/NF76XkSumd1sIKc77wItAFLzfiURA33nTQD+JZqBf1s6h7O/CeRRS/KIRblm+ESMT1 NayCA2Y9jRpyTLFgbNzWIv5WJQCsb5JJsnu4SdFbdUMitEiRY8QC/wztCLJ/z25NTgJi /dhJ6Q3msFQiqgxpFsR8jc1fct/WY4/0cxH4osXQdDWczXNCpyACui9vp/kGI2aaeBaw 3wAovV5wkSCzKYEObrnKh8Bi89UgTc+cQOj6ji6yDsxburu4M4pQgnejtWWrWgABrBxG IksQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:cc:to:content-transfer-encoding :mime-version:message-id:date:subject:from:dkim-signature; bh=9QvWNjdxy7EGe4NvWVloL0aAugxc6ORiiEV7er9sZlw=; fh=6EPBYa6nIdXWz0bSR6VO1izq6aemfdsJtoqyR8N92O8=; b=JakbLQHTqskko364huQAE4QCGNtrRODejSuIeHW0uroKr7CCi3sLx1U/xVbshOchv6 5yTCSN89jiSnn5hO3ZONfZWq3sweZfGa0e4c7fLlt1PxJ3vYzbTP08czaZSleVpDia8E xwLgZ7NwMrnD5OCL8r8nTtgXDVubjvP/4BXqSaAsZJJRbEPibPn0qIOochYO0TVRmFXv L6Di1zlpbm2tFOhn+OjcyMGXP9jSLpTiKxqnx5WGW2SQp6D05ItP4NOzS1kXGh97jCI7 LdqZBIZ16RigpSXWEly4fTO4+NLho55iR+BHYBKg2Wau8PNQ25voh0R5sLYSumxiURRt qGSQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b3TDTEHG; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5e81693615asi3392291a12.52.2025.03.14.09.10.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 09:10:14 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b3TDTEHG; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CB57281DF6; Fri, 14 Mar 2025 17:10:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="b3TDTEHG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 01B8F81E25; Fri, 14 Mar 2025 17:10:12 +0100 (CET) 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, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5D35281D0B for ; Fri, 14 Mar 2025 17:10:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=caleb.connolly@linaro.org Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43d0618746bso15904995e9.2 for ; Fri, 14 Mar 2025 09:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741968609; x=1742573409; darn=lists.denx.de; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=9QvWNjdxy7EGe4NvWVloL0aAugxc6ORiiEV7er9sZlw=; b=b3TDTEHGOoIWxnH79mJloUB0Hy42zRfJ7h6o2NjK2uvNElp5RYx9L4PwfQvV5XgHYw 8i7FPBV8AN3hHy+vk8eShjEJJDoOSx7R4kp3EQGMjcEviV6zJaOGyKHoIZnN4CWSDRJN 9Qv1GUFPa4mlFy9et1ZLXCp2JyBmMrkcBt9eMQ2sPIAMwr40GDuVGxFy1SkW0YwaAQMm Bum2woUMXd2IwOIvS4on0W9x/quVCeF/WsYnCTOG0cmNVeJpUYC2yTcbADaBRDm5KQWy Eo/+jkZQ4UHv1KT8Jqcq5t5FRtY4wgjOQp5VUMrDKTCWhGIvQlkfhfPzaan88UyqsdeC /UwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741968609; x=1742573409; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9QvWNjdxy7EGe4NvWVloL0aAugxc6ORiiEV7er9sZlw=; b=hdtYSfyIcPP+WWc+4lj65mw0uHC7PghM6ZK4tLoI93UolNBDMiXoroZiNpMQybn9qy 2s7t6fVH4usMQcdtq13NjzNkJydN3zZWCpHMA7SJkbFsQqh32FYdSZadW7GgVobuwfBw TkfNO4aIvSgK9NDLZdM95xm/ssetJF82BuLwd2pGw62fcXEjz9gPXXZm98q7bUMhTPgO LhGZBB3CYdTjSHfziS9i9EjyZdAsd1VKGJftCMGrpQs7tcQSQOnK+T8mHMYQ4ImDVkRI IoYHYWTSh48YCXkQyt0B36jK/Qy+OG53odTbfxl50Eu0D93gln7uD9M+JXr71SdJtNBD E2sQ== X-Gm-Message-State: AOJu0Ywsq3imH/iQ180hXiRp027MECFjv4dPix5PM7XMvOK+5DLSFz4E jdqrqsSOmRvuRivaYB8GBwf95vtNXXvpaePbH+hhWVdHne4L+9aypC1nCIW/jEk= X-Gm-Gg: ASbGnctRwzweCDk+bqVlj0hzh9qhn4ZCau/dUZmXgqEBCrI1OS0EQwR/lzXlEHkUghN 6H3yROe4hPzVPStHnW1syI++Ym0jPidPtWJ9/STAcqlEqdA7FSEt0xW9AXFfdnu+ZmFSO0eIiH+ Ql9pwpF0NuUNw1+aKtH0sMSz9o2GqVIT/jf7WG1hW8LnRq0dpkBooGcFIOX/cYSn+ykbK9ian96 ERhY7lbdCL/tFPFH3zRbsTz5pPPuZ+Jak1mUcWPtO78d4QRBL2iRwGrPJrPqlvbYXVbD2UuMWiQ P+DCY/kC2dt5sSR1lG9RsC5tdEOecSjxh5ENLk4/PzOQ9ztpTevd6eBGKawQ X-Received: by 2002:a05:600c:358c:b0:43c:f513:958a with SMTP id 5b1f17b1804b1-43d1ecc3969mr41643175e9.13.1741968608644; Fri, 14 Mar 2025 09:10:08 -0700 (PDT) Received: from toyger.powerhub ([2a0a:ef40:1d11:ab01:2b81:563b:c694:c380]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d1fdda29esm22035015e9.7.2025.03.14.09.10.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 09:10:08 -0700 (PDT) From: Caleb Connolly Subject: [PATCH 0/3] Qualcomm: implement support for GENI firmware loading Date: Fri, 14 Mar 2025 16:09:43 +0000 Message-Id: <20250314-geni-load-fw-v1-0-587f25f2812f@linaro.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAMdU1GcC/z2N0Q6CIBiFX8Vx3d8QcKJrrfdoXiD8GEulwKzN+ e6Rbl1+Z+d8ZyERg8NI6mwhAWcXnR8T5IeM6JsaOwRnEhNGWUF5LqDD0UHvlQH7BopaCc6skJU mafIIaN1n012bnQM+X8k67SEZMEa1Wevs9JdGXTJJYfABQfde3yPMOVBAZQohZKm5xEvvRhX80 Yfu/PtqVUxlPwxuqrNK0oKz3FiDLWnW9Quf4kEb2AAAAA== X-Change-ID: 20250314-geni-load-fw-0eca432f489c To: Heiko Schocher , Tom Rini , Rayagonda Kokatanur , Caleb Connolly , Neil Armstrong , Sumit Garg Cc: u-boot@lists.denx.de, u-boot-qcom@groups.io X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2267; i=caleb.connolly@linaro.org; h=from:subject:message-id; bh=acHcfyafrdPrAsilVBLEDesZIdhyw+KxTZ6jeLfQjok=; b=owEBbQKS/ZANAwAKAQWDMSsZX2S2AcsmYgBn1FTfbLJcilnpBbOCuDZaXl220uydFh4WaF1rf nzsuHOipFOJAjMEAAEKAB0WIQS2UaFGPGq+0GkMVc0FgzErGV9ktgUCZ9RU3wAKCRAFgzErGV9k tlVwD/0dW60dO+ZQ1GwEmDuChedGiwoySvaffP6inSRpTytuEBrdZ5rE21Nf2asQ9jY3Xjf9egj 5oG6rEUZeLXEFTfAJ7gb8f8zOsSSU+I7p3BHL39IDw2hE4gJi+4EN2e9vbjskDUFESW8myJnb4h 6vpAtIFnLySA9XjINVHdL7Qpy53y9tRicI5Tlv9JBpH9RXaFo1kRy5fHRqECH2eWrWfowo57392 cM/qy8PDe8CoHto/4We4o8D2Vd1BgyfvRDkthi7ycOCxXeBcf0jGxZiAcEk5DYNmm9BApK4KhS4 zR3spxdJF2IXULPVfZu4wdMbuPRVX3OEi9JDUrzU7SIXJaANbkxNVtD7Z7RW+MQQs3cmbYecPjQ IQoxCHUoPIshvTJ9SiaRKloE80f9Jb8IuuH3mN/UUSqsAq2h8T3LWtb5JgtwFCuqqeCHQoaWme7 3f5ExtNtoh24GCK1dhBDmjaMza9SMVuEQ5xuCWKHnW0EhRrWpMXDiKJll9ctKFToz+hPIGlR/eJ WDJtyZBszOgVpOVUMEhqYuTPHtIxTieOr2KySSO0NX/XDYiSXOS4evToZ8pgMTv52aMvmS+me6r isTQ23CiCG4GCfN1eUMol2T9RMkLoh9cN3/x2QPmnDJg0JykNC29b4nib0FpCp6kFZmZKTwdukA g5bF7wodOQ+brlA== X-Developer-Key: i=caleb.connolly@linaro.org; a=openpgp; fpr=83B24DA7FE145076BC38BB250CD904EB673A7C47 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The GENI block on Qualcomm platforms contains many Serial Engines (SEs), these are general purpose hardware blocks capable of implementing any low speed protocol (UART, SPI, I2C, etc). The protocol implementation is provided in the form of firmware which is programmed in to the peripheral, typically by the EDK2 bootloader. Up until now we have primarily been chainloading U-Boot, and therefore haven't had to deal with this problem. However, when running U-Boot as the primary bootloader it is necessary to handle loading and writing the firmware. Support for doing this in Linux is also in progress [1], this series is largely based on that one, however the Linux patches expect the firmware to be provided in /lib/firmware, and will only exist on newer kernels. Since we may want to use peripheral (e.g. EEPROM) inside U-Boot it is still useful to implement firmware loading in U-Boot. The approach taken here is to bind all peripheral devices which don't need firmware loading (e.g. the serial port), then wait until EVT_LAST_STAGE_INIT to handle loading the firmware from storage and probing the remaining peripherals. We forcefully probe them so that they will trigger firmware loading and will be available to Linux. For testing on the RB3 Gen 2 [2] is needed so that the i2c peripherals can be probed. [1]: https://lore.kernel.org/linux-arm-msm/20250303124349.3474185-1-quic_vdadhani@quicinc.com/ [2]: https://lore.kernel.org/u-boot/20250314-sc7280-more-clocks-v1-0-ead54487c38e@linaro.org/ --- Caleb Connolly (3): i2c: geni: fix error message wording in clk_disable misc: introduce Qcom GENI wrapper i2c: geni: load firmware if required arch/arm/Kconfig | 1 + drivers/i2c/geni_i2c.c | 14 +- drivers/misc/Kconfig | 9 + drivers/misc/Makefile | 1 + drivers/misc/qcom_geni.c | 576 +++++++++++++++++++++++++++++++++++++++ drivers/serial/serial_msm_geni.c | 13 - include/soc/qcom/geni-se.h | 36 +++ include/soc/qcom/qup-fw-load.h | 178 ++++++++++++ 8 files changed, 811 insertions(+), 17 deletions(-) --- base-commit: 9805321dfdeb5225fe5c5e0721abf49c0875637e Caleb Connolly