From patchwork Wed Jun 28 00:48:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 697201 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp4080008wrm; Tue, 27 Jun 2023 17:49:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5xszsbp/DNx0gji5NZEsjwscFqxuwp2CJTex0C4F6p7R2cgMg6bSRy03MUGn09D3BU7aWm X-Received: by 2002:a19:e044:0:b0:4f9:52f3:9a2b with SMTP id g4-20020a19e044000000b004f952f39a2bmr14643124lfj.54.1687913375586; Tue, 27 Jun 2023 17:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687913375; cv=none; d=google.com; s=arc-20160816; b=woglYFIKtXaxpaVtaqnDQz/NkcEyd7F8bxDD8LbRtPWx/oAyCxLB0ekhmfFSg74NHt zZXQKIf04uKial+qQWlS4IYKNsHKNdGYheqvjyltIaKtEcT9oEj8aNexFk3MFxoEcgNl P6vh/YUhq8DDgcTGEb30IYZmflyeq5OHKsldQZBx8HHq9xBHExcjcUTxGTDcrbg4y4K5 k8Ah3pvgxHTID10KoyfP+uRyP0ODP3OB3jaDzmxyLirsQgmBSBwRgrX0S5TYcHF+2Aw2 U649rEVxcwV+fEgVZ9puYJZGooHowd20g5bP7QwBX890/vdrICLYID0G55qbAIKinvDb brMg== 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=cU8QwqhKGhXiBBmvfc4wfRGa/7jJCJp5Ll13NQwtc38=; fh=+s9SE2w9oguEKAMcR35TXtqntCOeVFhiK9u/Kju91lo=; b=vAjBMUWMT5/SVB0lh9Bb56lN7mLlDu395+1FWYe0Hqn7JFW7rwSYFeIQ//KwY6I6am gXRimqUYZQT5itghjRduxY8rrtyxHJRDzRe2O9DYwgKvQqRyzuZwkRo/9PuHH2IIkNLz Ssxi00RB/IAXdkXFUV/AUT+tamxm0jtPlPzgn1ef7agXT15Zf31X9kNO4UAj6NcvK/lS 59Bhjmbl49935gJ4hk3G1FBXtBE0/ZKDwrnIgh+BTKOSZViU0C5yOOPE6fFx7kilu4Ql 4pkjejEdIr3XBkGLDQ24CE9G8AoYJojKpRuCkieyhQMp48OpLrgrxKTB6jRLVkfU/lpU osWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dHl0Ir7k; 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 Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id q14-20020ac246ee000000b004f615aead21si2664633lfo.385.2023.06.27.17.49.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jun 2023 17:49:35 -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=dHl0Ir7k; 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 Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A1A3A86195; Wed, 28 Jun 2023 02:49:29 +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="dHl0Ir7k"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D2F1C86354; Wed, 28 Jun 2023 02:49:27 +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-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (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 3E40B86129 for ; Wed, 28 Jun 2023 02:49:24 +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=takahiro.akashi@linaro.org Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1b7f42e1dbaso6144665ad.0 for ; Tue, 27 Jun 2023 17:49:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687913362; x=1690505362; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=cU8QwqhKGhXiBBmvfc4wfRGa/7jJCJp5Ll13NQwtc38=; b=dHl0Ir7k3GjqepVUdgeFrreyDuLSEAX+rxSDGoD6dlvt8uwWkfRylkr0qrSQSJSARx qiaM2rxP0E7YSG37MlB/4rKoKBJLtSO/+1MJ5E/MVb1c1aQj4EsmVSTe98NPQ0LtT5qr G5qXZp41Iesdc0pZkYXylhC71vefm/lnKEhd9ceWaNZ7o4l3dQ9++xRH2l5chet6fv6p WxzJAo0WAKszmV4vjps0ecf8EHWXEHOTCdGXxGFsEVNSMrPVtNWx6UMLMRcl/kHps8Sl thHN0SWAZZvuX8BbDU8IsKSxR4zmWVAHS9kCEZ5luQDfbjlKwsdTAxqx82KHIqaq68bw 8XFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687913362; x=1690505362; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cU8QwqhKGhXiBBmvfc4wfRGa/7jJCJp5Ll13NQwtc38=; b=T8zDCW+Qrv3Pw0Shk0Jq6sXv1dHRzwQD9a3upD3+H4CM5GsRiEGIfEuRWAqifXTUD4 eC8xxqyIGHfQEpoHxJm7ksnyhlyeWlPMGl7NHeGZotDB7QNzBRXS+QTwXeL26+bgh55B vG1wYpjiJdgn6ChDMRn5jXYje0q2i3IglVLiK2wKRTl5RJMJwSRRbfHnIk459Z4cVLw9 Eon8JWauctwzMCPPbFXafvD+/6C9o5TdryxkBicHcbpx3XUROp6sJPB6cR07gaI83J6l bPq7oL/h0tX2V6byYxAYSGMd4helEethql1miHIVpGyWbZfPA8J1UX2EyyCx7o0FcKDq rWvw== X-Gm-Message-State: AC+VfDzYoLcyNOEKH9JxnzbOk2gx9qdVk/W6krqB03Ldsp4dI5R2xGQg Qrgz0G9pP3MeW5jpSsupM5GY8g== X-Received: by 2002:a17:902:ecc6:b0:1b1:9272:55e2 with SMTP id a6-20020a170902ecc600b001b1927255e2mr40438911plh.3.1687913362092; Tue, 27 Jun 2023 17:49:22 -0700 (PDT) Received: from laputa.. ([2400:4050:c3e1:100:58b2:60ed:38ea:8b1f]) by smtp.gmail.com with ESMTPSA id u13-20020a170903124d00b001b3fb2f0296sm6517278plh.120.2023.06.27.17.49.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jun 2023 17:49:21 -0700 (PDT) From: AKASHI Takahiro To: trini@konsulko.com, sjg@chromium.org Cc: etienne.carriere@st.com, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH 00/10] firmware: scmi: add SCMI base protocol support Date: Wed, 28 Jun 2023 09:48:31 +0900 Message-ID: <20230628004841.21774-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.41.0 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.8 at phobos.denx.de X-Virus-Status: Clean This patch series allows users to access SCMI base protocol provided by SCMI server (platform). It will also be utilized in separate patches in the future to add sanity/validity checks for other protocols. See SCMI specification document v3.2 beta[1] for more details about SCMI base protocol. What is currently not implemented is - SCMI_BASE_NOTIFY_ERRORS command and notification callback mechanism This feature won't be very useful in the current U-Boot environment. [1] https://developer.arm.com/documentation/den0056/e/?lang=en Test ==== The patch series was tested on the following platforms: * sandbox * qemu-arm64 with OPTEE as SCMI server Prerequisite: ============= * This patch series is based on v2023.07-rc and relies on the following patch: [2] https://lists.denx.de/pipermail/u-boot/2023-June/520083.html Patches: ======== Patch#1-#4: Add SCMI base protocol driver Patch#5-#7: Add SCMI base protocol device unit test Patch#8-#10: Add scmi command Change history: =============== v1 (Jun, 28, 2023) * initial release AKASHI Takahiro (10): firmware: scmi: implement SCMI base protocol firmware: scmi: framework for installing additional protocols firmware: scmi: install base protocol to SCMI agent sandbox: remove SCMI base node definition from test.dts firmware: scmi: fake base protocol commands on sandbox test: dm: simplify SCMI unit test on sandbox test: dm: add SCMI base protocol test cmd: add scmi command for SCMI firmware doc: cmd: add documentation for scmi test: dm: add scmi command test arch/sandbox/dts/test.dts | 4 - arch/sandbox/include/asm/scmi_test.h | 7 +- cmd/Kconfig | 8 + cmd/Makefile | 1 + cmd/scmi.c | 373 +++++++++++++++ doc/usage/cmd/scmi.rst | 98 ++++ drivers/firmware/scmi/Makefile | 1 + drivers/firmware/scmi/base.c | 523 +++++++++++++++++++++ drivers/firmware/scmi/sandbox-scmi_agent.c | 379 ++++++++++++++- drivers/firmware/scmi/scmi_agent-uclass.c | 195 +++++++- include/dm/uclass-id.h | 1 + include/scmi_agent-uclass.h | 84 ++++ include/scmi_agent.h | 24 + include/scmi_protocols.h | 201 +++++++- test/dm/scmi.c | 233 +++++++-- 15 files changed, 2057 insertions(+), 75 deletions(-) create mode 100644 cmd/scmi.c create mode 100644 doc/usage/cmd/scmi.rst create mode 100644 drivers/firmware/scmi/base.c