From patchwork Tue May 31 16:09:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Etienne Carriere X-Patchwork-Id: 577446 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:330b:0:0:0:0 with SMTP id f11csp1299746mag; Tue, 31 May 2022 09:09:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWXN/vEpZ4C2VltwQ6+guMv6dtzUI9d/UqOZenUUeGA0X7xEK/xRq9FlkhGAsyVC8r1m/Y X-Received: by 2002:a05:6638:3297:b0:32e:d946:b4e7 with SMTP id f23-20020a056638329700b0032ed946b4e7mr21010681jav.96.1654013382361; Tue, 31 May 2022 09:09:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654013382; cv=none; d=google.com; s=arc-20160816; b=Ax/35w0FS7qt97XNmMYkyUyCd2f5Hbk13rexIJIZGNRSgCDOw12OoaLri4DKIZyuiD P3fMj0f/05SVNPglsnZ0SRLfO8Vc9DrVR3Pf7UQhgO/LrxwgwAN8GJ6xWfYrgPlWHsyv aGdO8q2PquDE2kbMMxlT+/XO3meF2nb1oDLC8/mN510Y8nKwbzbsFfjgCzcIjuol89Jk c2X+YYP4dYyUu3vvMdONZhja5f7F5rYug5m8FMyJ2FBddrAbnZPDKKPVa2807PYxj6xN yZp6FN0YtdmFEvoMwjaJdVIJX52ViBdHBdtU3EPVrxkVSmpxUzIiuQwKvI0KH12LsX+z HEUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=9+7YI/RVtDB7kwPaGrR1+c+YJa9FP4A4gtwbmeWQtcE=; b=qrzaKrbpYCj5HIy7fEMmtdY1qNZ8cPJoL3L+bGb/xDw148ZC8J++0ijGz4qc1WvSLC hLD4C1ygEYSob7bDqynaZknVMH5oJIdndM/qu/MiNh4euq5eeYHBnlFLfJsl3r7eiTOo 093Aa+EKM6UsRGLuJIO3lemFhNlaRunAembNj85EaYSpb5QdE/SoICJ6iazG7AfNwBns fv7RIDgAcva6pmXx3lu1E8fOBQPszUkP4jqfLs6yFsIa3AzVgEjGRc+9kHNVXucyc5bL /As1fw5B5+ESrIF8YAwL3RiyRgjYKa5wRWktAddBNJkmgF6As8QW32worsfLcbyZlbl/ kahA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AGKFzcHM; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id s3-20020a6bd303000000b006657d6f6256si14765086iob.105.2022.05.31.09.09.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 09:09:42 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AGKFzcHM; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 524B383E4C; Tue, 31 May 2022 18:09:40 +0200 (CEST) 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="AGKFzcHM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 21D2183E3C; Tue, 31 May 2022 18:09:39 +0200 (CEST) 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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (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 55994832C3 for ; Tue, 31 May 2022 18:09:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=etienne.carriere@linaro.org Received: by mail-wr1-x42e.google.com with SMTP id k16so15007338wrg.7 for ; Tue, 31 May 2022 09:09:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9+7YI/RVtDB7kwPaGrR1+c+YJa9FP4A4gtwbmeWQtcE=; b=AGKFzcHMWL2fuwDx9dK+K6WH36o7qmsIsNAcw3I+4lDZGKFVjLPYzPvBB5CxxGcRqj 4JgdWg6NxAtIc+fMoeCVDk2R3p6S4K3QVm2amkpEwPpdA61GJbbuKrPPCtJOf5T4NE7V hPmHc8L0Zubp/pf6AvT8hKxk4yfQkJq+wiwfJ/5GH8yZzEgKE5780U3pu3ee03KSc5ym OvroQwfbECyByKUrgMaJjtzsdiUcur+Cr4WLVbF5l/vg4KvCtKegjEW1+2sawHWCs9iN qZj+5I9WNjgIBHEeW5U6bOhcKo59ySL4zYRS9ByQj79ICANu1WR7pmb9LXGa/uzj+uAd a85g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9+7YI/RVtDB7kwPaGrR1+c+YJa9FP4A4gtwbmeWQtcE=; b=KOAJB6tEpIW/lCK4Og82/oLEp0/8eZmkDNE1NvmvSFwnIE8KGU3JxGs00++0m6Yef4 ofPLR1mjSKp2B3xW1/D/+mHIIR++sRWcna3febB8DZ3xvZw/ZzDeQra8t0q9pDfQM6lo oTLAK04J4Q/3DG2viAt1NLwweWzpNhbRIm7YTe97Nf00mN3zpCRKC8gjoba+n1MLvRO9 d1NuKaMPqIJVQUrLcxHoZ6MxB8VcbPzjVKekuLs45DF61IECTPgHzRrikDym8I1F6gwW HcagFrputxbm+btC9d4wB4qbZNFcYzC/oPoWIWMGzHE31ExyFhBTDPyVCztq+WLAQczQ nQmA== X-Gm-Message-State: AOAM531oBTTTiF5nq3BlGckku0kRn1TUxJByQ/vyBadYCAtHu/lCw9f2 dCsM5bwTlDNayTtGR6Fd5Z3VQecFUuW3DQ== X-Received: by 2002:a5d:4532:0:b0:210:2c52:bac2 with SMTP id j18-20020a5d4532000000b002102c52bac2mr12253386wra.711.1654013375624; Tue, 31 May 2022 09:09:35 -0700 (PDT) Received: from lmecxl1178.lme.st.com ([2a04:cec0:117a:a94e:9569:2e63:8a35:2cc5]) by smtp.gmail.com with ESMTPSA id r23-20020a05600c321700b0039aa4d054f8sm2884035wmp.5.2022.05.31.09.09.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 09:09:35 -0700 (PDT) From: Etienne Carriere To: u-boot@lists.denx.de Cc: Patrick Delaunay , Patrice Chotard , etienne.carriere@linaro.org Subject: [PATCH v2 00/14] SCMI multi-channel and optee shm Date: Tue, 31 May 2022 18:09:15 +0200 Message-Id: <20220531160929.931150-1-etienne.carriere@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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.5 at phobos.denx.de X-Virus-Status: Clean Dear all, This series implements 2 features in driver/firmware/scmi. First, a single change adds support for SCMI OP-TEE transport to use OP-TEE native shared memory. See the 1st patch in this series: "firmware: scmi: optee: use TEE shared memory for SCMI messages". Then come changes for supporting multi-channel in the SCMI drivers. I've split the implementation in 11 several small incremental changes in the hope it helps the review. Few minor fixup commits are also inserted in the series. Changes since v1: - Update scmi_clk.c, scmi_reset.c and scmi_regulator.c to store SCMI channel reference in private data rather than using private data reference as an opaque reference to the target SCMI channel. Etienne Carriere (14): firmware: scmi: optee: use TEE shared memory for SCMI messages firmware: scmi: optee: fix inline description of PTA_SCMI_CMD_GET_CHANNEL firmware: scmi: prepare scmi uclass API to multi-channel firmware: scmi: prepare uclass to pass channel reference firmware: scmi: factorize scmi transport look up firmware: scmi: add multi-channel support firmware: scmi: mailbox transport: implement multi-channel firmware: scmi: smccc transport: implement multi-channel firmware: scmi: optee transport: implement multi-channel clk: scmi: support SCMI multi-channel reset: scmi: support SCMI multi-channel power: regulator: scmi: support SCMI multi-channel power: regulator: scmi: simplify scmi_voltd_set_enable() firmware: scmi: use multi channel in mailbox, optee and smccc agents drivers/clk/clk_scmi.c | 33 ++++- drivers/firmware/scmi/mailbox_agent.c | 65 +++++++-- drivers/firmware/scmi/optee_agent.c | 147 ++++++++++++++++----- drivers/firmware/scmi/sandbox-scmi_agent.c | 1 + drivers/firmware/scmi/scmi_agent-uclass.c | 48 +++++-- drivers/firmware/scmi/smccc_agent.c | 56 +++++++- drivers/firmware/scmi/smt.c | 53 +++++++- drivers/firmware/scmi/smt.h | 45 ++++++- drivers/power/regulator/scmi_regulator.c | 36 +++-- drivers/reset/reset-scmi.c | 25 +++- include/scmi_agent-uclass.h | 15 ++- include/scmi_agent.h | 14 +- 12 files changed, 458 insertions(+), 80 deletions(-)