From patchwork Wed Feb 14 18:29:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Marussi X-Patchwork-Id: 13556936 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B2F3AC48BC3 for ; Wed, 14 Feb 2024 18:30:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=evSRQq+jaSQE3LQPabrbBQFlnh68Vz0MfDVGOoKE23M=; b=ybG8CLB2QrjTvW JX/60bvVGGJJrLsKjXo/Xa/TDGqY597q9WZOeH43itkSKjmXg/PAHako49eghwZO6NqocT2SQlDtj OK+OmiM8JVQkwc40j9liMNniMHHpIA0N374GBgi8o/kJGY2o9YWERYzQhnDn0kVbLb+Mk0u+LL66w N3wR/hHyKahXV7KCYqhuj/Kp0JUlNecbaNzB8vDOAZNoEqPMK6yVJRlEXhyLKn8FiL5BvC6ITqlLa gSWsRMvNh4KE280UZ3BYCzUWXJ3krwFYTLxSvoi7H/20MTVViMs2Ng0odBrj1U0y8pf+80iY3PHl8 8AFdYi4Mx4N0+v3m0eNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raK1k-0000000DwSb-42rb; Wed, 14 Feb 2024 18:30:36 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raK1i-0000000DwRz-1898 for linux-arm-kernel@lists.infradead.org; Wed, 14 Feb 2024 18:30:35 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A8B161FB; Wed, 14 Feb 2024 10:31:11 -0800 (PST) Received: from pluto.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 015763F7B4; Wed, 14 Feb 2024 10:30:28 -0800 (PST) From: Cristian Marussi To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com, f.fainelli@gmail.com, vincent.guittot@linaro.org, peng.fan@oss.nxp.com, michal.simek@amd.com, quic_sibis@quicinc.com, quic_nkela@quicinc.com, souvik.chakravarty@arm.com, Cristian Marussi Subject: [PATCH 0/7] SCMI V3.2 Misc updates Date: Wed, 14 Feb 2024 18:29:59 +0000 Message-ID: <20240214183006.3403207-1-cristian.marussi@arm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240214_103034_376335_B361E082 X-CRM114-Status: UNSURE ( 9.76 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, another round of updates related to the last v3.2 SCMI spec, mostly around Clock protocol. Note that the series is based on sudeep/for-next/scmi/updates on top of 7dd3d11f4dac ("clk: scmi: Add support for forbidden clock state controls") and patch [1/7], which was included in the recently posted [1], it is included also here just for ease of usage. (since needed also here ofc) Having said that, [2/7] add a centralized support to the SCMI core to handle v3.2 optional protocol version negotiation, so that at protocol initialization time, mif the platform advertised version is newer than supported by the kernel and protocol version negotiation is supported, the SCMI core will attempt to negotiate an older protocol version. Patches 3,4,5 adds the remaining last missing bits of Clock v3.2 protocol and bumps the supported protocol version to 0x30000 (v3.2). On top of these new SCMI additions, [6/7] reworks at first slightly how the clk-scmi driver configures per-clock CLK ops, and then [7/7] adds support for clock get/set duty cycle, as allowed by the last v3.2 spec additions, but only if the related SCMI clk domain supports that specific clock permissions. Thanks, Cristian [1]: https://lore.kernel.org/linux-arm-kernel/20240212123233.1230090-3-cristian.marussi@arm.com/ --- Cristian Marussi (7): firmware: arm_scmi: Add a common helper to check if a message is supported firmware: arm_scmi: Add support for v3.2 NEGOTIATE_PROTOCOL_VERSION firmware: arm_scmi: Add Clock check for extended config support firmware: arm_scmi: Add standard Clock OEM definitions firmware: arm_scmi: Update supported Clock protocol version clk: scmi: Allocate CLK operations dynamically clk: scmi: Support get/set duty_cycle operations drivers/clk/clk-scmi.c | 168 +++++++++++++++++--------- drivers/firmware/arm_scmi/clock.c | 67 +++++++--- drivers/firmware/arm_scmi/driver.c | 99 ++++++++++++++- drivers/firmware/arm_scmi/protocols.h | 5 + include/linux/scmi_protocol.h | 15 ++- 5 files changed, 270 insertions(+), 84 deletions(-)