From patchwork Tue Sep 26 07:00:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 726395 Delivered-To: patch@linaro.org Received: by 2002:adf:ea87:0:b0:31d:da82:a3b4 with SMTP id s7csp2781032wrm; Tue, 26 Sep 2023 00:01:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHriMYT7hKvhiFIUhvkErxXRBHOS4cgMYtvg5IFaxB3wUswyLZvu3yrRvFtFL5Wy2GMTr1Y X-Received: by 2002:a5d:430f:0:b0:320:976:f940 with SMTP id h15-20020a5d430f000000b003200976f940mr8534939wrq.13.1695711690229; Tue, 26 Sep 2023 00:01:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695711690; cv=none; d=google.com; s=arc-20160816; b=gI3NM4BhwgoHQ/5m2esA2TJ+tQ8X+pvKNhgugnFbDaw1ccVNYMRGP45j6fIioesvPL BhQKXzneBqCBzx8f/7J5GbfvpzXHxz7VNmGuD2f/qn0oD7w7/+g0N/x+yIuDOoaQOLrZ 9EfmtIPoOsPVCWBxjc4rQMlgTPZ0cT8Us3VAo6G7OJWB6dY8L8w6RoElXUjWfyuomKSS 76cF5+4BsNlY1AdKYiB+VJGaYirIeo0EhxvhC09QWq1CflsaWBm5FlqxIIv4KFkhQ3Br mYFv8b0U2Lj77nbd+7UVN+QaZ5fRPXMmqpQyqPnu3XkjmJdhBQO8Mp7HT2BOr7voL3ek pXfQ== 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=BKpoV/S9Mh/um75qWsxIS7qrJrFqiXKSQ4LJ5n5XmHQ=; fh=+s9SE2w9oguEKAMcR35TXtqntCOeVFhiK9u/Kju91lo=; b=Pwm1HsSXiUUfXd0vfRZ5mNhQIQcck0tsC5D6v0cq5M7MHku5KqiMvw0HHT8vJYwUBn WtTmDVKbeUOFyTHLfDHs2bCnFy2q9miUdyyf6u3a773omi5uhiZWk2J0XHDqMff4rp+t 5nseNjJNaNCm5Q9SwvdnyfQCRynwC1hx/twJXBQ7yWUFs8SjODMT+y6tWx7pri4jHQeL ezsJFyH4tg7n/YuxNhWtGtUW/pPEZjmIt/kdIufdeNKFz8pRyazMQQaWvPVww5B0z+Tn NaWVMg/tJ+SupPJdAHXQULzY+Rg+ZQXhtbLd6F8d6BOxalK3LjHZ+9Xdz1XIQXDfLjyo 7G9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=edzqbOE9; 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 dd15-20020a0560001e8f00b003174e8764a6si3723995wrb.81.2023.09.26.00.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 00:01:30 -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=edzqbOE9; 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 06DFF86D74; Tue, 26 Sep 2023 09:01:00 +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="edzqbOE9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 02F4586D7F; Tue, 26 Sep 2023 09:00:59 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) (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 7CF2A86D39 for ; Tue, 26 Sep 2023 09:00:56 +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-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-277317a0528so931446a91.0 for ; Tue, 26 Sep 2023 00:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695711655; x=1696316455; darn=lists.denx.de; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BKpoV/S9Mh/um75qWsxIS7qrJrFqiXKSQ4LJ5n5XmHQ=; b=edzqbOE9MWsjUbOCqryxyRFBr+rFS2AHa/e2vLrC3R7eNJgKqKhaBs9tKLicX2nQ8A nHM9mQcsEKtghyKmb+dbTYaJHKDRDNeDvls31FJbmxtRRkTzW9D1wfrHSPYMDKzeXqY6 PA5xI8UTep4lDmiRbmZeHG3qRXFg3ANk0yQlGGMDkcWuF/ko+QmY+EUPsEdsw1A9sgOO 3Sl5niWEpgAS0/JmCrMpBsA92EZr1YFD+qixG7SdGHv/HmgHUxSKVeVscmjzIB1T55h7 l/hxyuvGKEJOA9Ct7rzA9HktjGJmyvXF80RhcFm5eRXhzhbcPjuYgHOYb+pmZZ5uJJ+K 8ltA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695711655; x=1696316455; 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=BKpoV/S9Mh/um75qWsxIS7qrJrFqiXKSQ4LJ5n5XmHQ=; b=hzaNwM3SIz0QvczGn/+u18IXq51bS9vAAzBmgZ1zKX5KbNDz0ne4kfBwKoDkIWzCW7 weitx2UQKVKiR1crtbvYxlE1PskMuvy+iTtI1fzU8NhtJetRY0It5sCOYdrl19raP3ZC Doag2qBQysgcLaO/r4BssNekUXNb7rZP6OSSRs7A8MyTPZULryfIVj7rzPzUXlRuutnD eo4uwfcM0T1apRGVc0XWCFq1w6gN/oJ3Z6Zv4PfWHvzl8lHXbnOPiWsJqhuGYuo8CV13 eqZ/TTtta4XyTUt2vG+af6DN9Oe9vKG6Edx3lwhZOtAYO9rVKMnvvsE/NzwrCb21I+Ck 3uiw== X-Gm-Message-State: AOJu0YwE2SA/MezrSrDfhiyqNTTnsfCVKaZMfDygmXSUrAxQ6HXTIO7A Kex5kzFcdoWSC2X/gUn7gbMLGg== X-Received: by 2002:a17:90a:51a2:b0:26d:1f75:7fa3 with SMTP id u31-20020a17090a51a200b0026d1f757fa3mr7845257pjh.4.1695711654763; Tue, 26 Sep 2023 00:00:54 -0700 (PDT) Received: from octopus.. ([2400:4050:c3e1:100:6585:aea6:5002:a825]) by smtp.gmail.com with ESMTPSA id ge13-20020a17090b0e0d00b0027758c7f585sm3178480pjb.52.2023.09.26.00.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 00:00:54 -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 0/4] firmware: scmi: add SCMI power domain protocol support Date: Tue, 26 Sep 2023 16:00:39 +0900 Message-Id: <20230926070043.738340-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.34.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.8 at phobos.denx.de X-Virus-Status: Clean This patch series allows users to access SCMI power domain protocol provided by SCMI server (platform). See SCMI specification document v3.2 beta 2[1] for more details about SCMI power domain protocol. The implementation consists of two layers: - basic helper functions for SCMI power domain protocol in drivers/firmware/scmi/pwdom.c (patch#1) - DM-compliant power domain driver, which utilizes the helper functions, in drivers/power/domain/scmi-power-domain.c (patch#2) [1] https://developer.arm.com/documentation/den0056/e/?lang=en DT bindings =========== Standard bindings are applied, i.e. scmi { ... pwrdom_scmi: protocol@11 { regs = <0x11>; #power-domain-cells = <1>; } ... } som-device { ... power-domains = <&pwrdom_scmi 2>; } Test ==== The patch series was tested on the following platform: * sandbox ("ut dm scmi_power_domains") Prerequisite: ============= * This patch series is based on my "Base protocol support" patches[2] on v2023.10-rc4. [2] https://lists.denx.de/pipermail/u-boot/2023-September/531623.html Patches: ======== Patch#1: Add SCMI power domain protocol helpers Patch#2: Add power domain driver Patch#3-#4: Test related Change history: =============== RFC (Sep 26, 2023) * initial release AKASHI Takahiro (4): firmware: scmi: add power domain protocol support power: domain: add SCMI driver sandbox: add SCMI power domain protocol support for testing test: dm: add SCMI power domain protocol test arch/sandbox/dts/test.dts | 6 + arch/sandbox/include/asm/scmi_test.h | 20 ++ configs/sandbox_defconfig | 1 + drivers/firmware/scmi/Makefile | 1 + drivers/firmware/scmi/pwdom.c | 189 +++++++++++++ drivers/firmware/scmi/sandbox-scmi_agent.c | 265 ++++++++++++++++++- drivers/firmware/scmi/sandbox-scmi_devices.c | 10 + drivers/firmware/scmi/scmi_agent-uclass.c | 11 + drivers/power/domain/Kconfig | 7 + drivers/power/domain/Makefile | 1 + drivers/power/domain/scmi-power-domain.c | 197 ++++++++++++++ include/scmi_agent-uclass.h | 2 + include/scmi_protocols.h | 178 +++++++++++++ test/dm/scmi.c | 107 +++++++- 14 files changed, 993 insertions(+), 2 deletions(-) create mode 100644 drivers/firmware/scmi/pwdom.c create mode 100644 drivers/power/domain/scmi-power-domain.c