From patchwork Wed Jul 26 08:38:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 706627 Delivered-To: patch@linaro.org Received: by 2002:a5d:464f:0:b0:317:2194:b2bc with SMTP id j15csp877710wrs; Wed, 26 Jul 2023 10:37:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlEOgLghZ+TEYwgkYICll4QF1MwDDkhhr/sr5n9xC807MaVNT6eglrDPk6iAH34lru+mitX5 X-Received: by 2002:a5d:614e:0:b0:307:8c47:a266 with SMTP id y14-20020a5d614e000000b003078c47a266mr1772115wrt.61.1690393065059; Wed, 26 Jul 2023 10:37:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690393065; cv=none; d=google.com; s=arc-20160816; b=w5yx9u36jEsbV9jdUDUwl4c9/uYErESrnXQGJEmFmBt7BIfwFLNcB2XLNV/WWlC4T3 oE7bE7slidrhSFWajX1OMm5ukSFEeO26AnI0NsE8w+dH+G+Xav8lESNpGTwP+PmUJJLD Mb0R6/1Axezrhf/kvtDDdh3NztMNVPm8a9WQkzvjRGruw6Ix+hnmq8lqeREGobTGS+6m 3kQmHa6WhNM21ZYqbHJk9Aw+wUl8h16xw/uw0r2kVrjckOkbhCGViIjZx1axtZxbMAYX 39JE2X7jGRnhqiTdhCuyBM/ZzDlqFgdUQwlRDajRm6mfc5vHjRuonSj8Z1X9yQPHp5K4 znYw== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CV8RNEXXHo6Ijaeu8PJ6Q25e93asxPhqX1SqjcHBzMM=; fh=m4nYqZzoK9SCykCyJ/rhitDYsGwNiXM0bHxVQp6NtlE=; b=R1KLvCwGzRUASInp/O+hh/dZCqJJz3ehMXL1UPcPqjcoXF8Y/mAM4Uv8OyTsrhjk// hkNhxjUgkcWB2fQTkn25eicnsRaTidXGR8n1/xEx3RSM7buLCzPByULueUS3pY0KPrn2 B2cABiKAd8iU0vzpm5U4y8xzsCId+0csoV/2s6Vb4Irthoni0wGdriilsvhXsi0Yyzc/ aGr6yCTDq9gNOD3FX5Y4o5kfLpR+TYPKpmvePcbHaXO5ltULyObB5qgm6nNn3gln+4mo eQgdNnrehoUViP5klns/xQKxmQUCeHV+SmZQNzLusEbWjqdQhRO9qp8UbDSKoCB88HEA 1hJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tpZ37GsP; 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 v16-20020a5d6110000000b0031760f4014fsi3559235wrt.426.2023.07.26.10.37.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 10:37:45 -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=tpZ37GsP; 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 73F51867D9; Wed, 26 Jul 2023 19:37:43 +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="tpZ37GsP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A3A948638E; Wed, 26 Jul 2023 19:37:38 +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-ua1-x936.google.com (mail-ua1-x936.google.com [IPv6:2607:f8b0:4864:20::936]) (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 5BE56861F7 for ; Wed, 26 Jul 2023 19:37:35 +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-ua1-x936.google.com with SMTP id a1e0cc1a2514c-7948a10d116so19195241.0 for ; Wed, 26 Jul 2023 10:37:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690393054; x=1690997854; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CV8RNEXXHo6Ijaeu8PJ6Q25e93asxPhqX1SqjcHBzMM=; b=tpZ37GsPb5z/uukB6tzu2uV7CSQ6fT2o78bYbpmaBr0VsD7buZujgDBe1g0SHxHmwI ijREAoU60GYafQ1JvBNtWUiCIpzUC3wo4a/mOdy7RVuNnKwN/U+gdlc4PeszyBjqoHim jXAAlf6/dXk7sDIMqPM5uS1luZf+VPxIFLqWMPpAaLPGPUvg3ZA/v+VP4WFbUdKTlUnh Rkf7gYfIl9SnZgzHO86aqUMd5oQNAKreKw9igoST+ef7nHJBfl/ZWJk8sT5iU358B3TN XfNg13CtzD8l9ZzlcvuJSQKHpjc/GHHkXznC3uwjgGIdMK/I3FQZGFm2eYEuA18p+UuY QgCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690393054; x=1690997854; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CV8RNEXXHo6Ijaeu8PJ6Q25e93asxPhqX1SqjcHBzMM=; b=lqaYazXVauGMaRV8MPNpA8FLc1aQUuAjWbJNSAXxXqcp6uwtyP7S16Ht7JRprl8JQ8 qBRmQAqVpNS5P1AaAdfQyYiN1+p7gay9XPsSM+jX7lE5azAziMN0gNiuCltOBfx3KyFm IztF0GexV/h2a3z7wGUznl1HF1rUzx3ATBdSnk1KVWxpcSCfXxjRNNvHMPkT80tOjm8M hrsmL2b9MHkTevNbhr2c7UkUjKHVylyv21yVu1p9KPI253P6mK8Qqf9u8yt/WEiDrndC og/nBoO9EzlUvIt6HXTuDnjk9fMfPD2N/Myza5mF+8EZRL3ngSXEeHAoEWZPNu6lMqEn tsQA== X-Gm-Message-State: ABy/qLbhf2R6qGLyTdQOMRfVCLSBrBpXBjbQSUr0PG9jejaFHZUDQBP4 WIF62ZwdXsJxtY5/N64pNr6PT/bOy2Omp3SGMN4= X-Received: by 2002:a92:d844:0:b0:345:ad39:ff3 with SMTP id h4-20020a92d844000000b00345ad390ff3mr950313ilq.3.1690360812522; Wed, 26 Jul 2023 01:40:12 -0700 (PDT) Received: from laputa.. ([2400:4050:c3e1:100:b3f9:1d29:2d48:cb41]) by smtp.gmail.com with ESMTPSA id 16-20020a17090a191000b00263c6b44dd8sm865986pjg.15.2023.07.26.01.40.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 01:40:04 -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 v2 11/12] doc: cmd: add documentation for scmi Date: Wed, 26 Jul 2023 17:38:07 +0900 Message-ID: <20230726083808.140780-12-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230726083808.140780-1-takahiro.akashi@linaro.org> References: <20230726083808.140780-1-takahiro.akashi@linaro.org> 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 is a help text for scmi command. Signed-off-by: AKASHI Takahiro Reviewed-by: Simon Glass Reviewed-by: Etienne Carriere --- v2 * add more descriptions about SCMI --- doc/usage/cmd/scmi.rst | 126 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 doc/usage/cmd/scmi.rst diff --git a/doc/usage/cmd/scmi.rst b/doc/usage/cmd/scmi.rst new file mode 100644 index 000000000000..aebcfe95101d --- /dev/null +++ b/doc/usage/cmd/scmi.rst @@ -0,0 +1,126 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +scmi command +============ + +Synopsis +-------- + +:: + + scmi info + scmi perm_dev + scmi perm_proto + scmi reset + +Description +----------- + +Arm System Control and Management Interface (SCMI hereafter) is a set of +standardised interfaces to manage system resources, like clocks, power +domains, pin controls, reset and so on, in a system-wide manner. + +An entity which provides those services is called a SCMI firmware (or +SCMI server if you like) may be placed/implemented by EL3 software or +by a dedicated system control processor (SCP) or else. + +A user of SCMI interfaces, including U-Boot, is called a SCMI agent and +may issues commands, which are defined in each protocol for specific system +resources, to SCMI server via a communication channel, called a transport. +Those interfaces are independent from the server's implementation thanks to +a tranport layer. + +For more details, see the `SCMI specification`_. + +While most of system resources managed under SCMI protocols are implemented +and handled as standard U-Boot devices, for example clk_scmi, scmi command +provides additional management functionality against SCMI server. + +scmi info +~~~~~~~~~ + Show base information about SCMI server and supported protocols + +scmi perm_dev +~~~~~~~~~~~~~ + Allow or deny access permission to the device + +scmi perm_proto +~~~~~~~~~~~~~~~ + Allow or deny access to the protocol on the device + +scmi reset +~~~~~~~~~~ + Reset the already-configured permissions against the device + +Parameters are used as follows: + + + SCMI Agent ID, hex value + + + SCMI Device ID, hex value + + Please note that what a device means is not defined + in the specification. + + + SCMI Protocol ID, hex value + + It must not be 0x10 (base protocol) + + + Flags to control the action, hex value + + 0 to deny, 1 to allow. The other values are reserved and allowed + values may depend on the implemented version of SCMI server in + the future. See SCMI specification for more details. + +Example +------- + +Obtain basic information about SCMI server: + +:: + + => scmi info + SCMI device: scmi + protocol version: 0x20000 + # of agents: 3 + 0: platform + > 1: OSPM + 2: PSCI + # of protocols: 4 + Power domain management + Performance domain management + Clock management + Sensor management + vendor: Linaro + sub vendor: PMWG + impl version: 0x20b0000 + +Ask for access permission to device#0: + +:: + + => scmi perm_dev 1 0 1 + +Reset configurations with all access permission settings retained: + +:: + + => scmi reset 1 0 + +Configuration +------------- + +The scmi command is only available if CONFIG_CMD_SCMI=y. +Default n because this command is mainly for debug purpose. + +Return value +------------ + +The return value ($?) is set to 0 if the operation succeeded, +1 if the operation failed or -1 if the operation failed due to +a syntax error. + +.. _`SCMI specification`: https://developer.arm.com/documentation/den0056/e/?lang=en