From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECAC229D273 for ; Mon, 6 Apr 2026 15:38:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775489920; cv=none; b=lLzpvF/XYtldB3JEo6gIecFNJmGUzHCGV0EoJM6kYGD1oy7gghypsxvQEPXZUtc0P+qmqcG25H99Y6Y9tXLHiEiXcvl052yjd3K5xEby0KmTn6eM4IJeW0hlhWLEh5zT7mwaK2sGxWjTDd/CrRaDm+tC0W/KVPhQUUGdNwOBUKs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775489920; c=relaxed/simple; bh=49+ciCmPwibB8Kivb7U6s7rioMxVkCMH2tw+szOi/dI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OGhJy1Zkw1X3iKDxgdYxA4Re7/BHDivMKHMDDcDEp3ypQWkaEGLv2gsw5tadoUCbgNv62jvTqQ0sFkfZyDW0LQePlTugv+u6lvyB8zo6iqSkRBskhE2+X32hDb3cn2v66zzyE/4uJv0JC7KcVNLRmzJUDu1PebSfJNaEPRNaJ1o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=RWRGUtQc; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=p9c/4YdS; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RWRGUtQc"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="p9c/4YdS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775489918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v5Zet8J4rK0+1tdnDTvli0Ek2YpzZgM64BeAXaz+iIs=; b=RWRGUtQc1l6050UZjGEd8BVKaQ8kBcxsY7ZX7LZNhotxOln/v64CrVJ7aKHcbGuni+gZCS elYHNQ4HrbCZNv4SB0M5f5e2zW04vLorzTYj0p71du6W0VQaQ/G/uT4R1TO/gMSueIJlo2 9qst4ML/QfF+DWtXq72MxuwLiu96jI0= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-674-3-fjayGFMHyxUNVwAmuFJQ-1; Mon, 06 Apr 2026 11:38:34 -0400 X-MC-Unique: 3-fjayGFMHyxUNVwAmuFJQ-1 X-Mimecast-MFC-AGG-ID: 3-fjayGFMHyxUNVwAmuFJQ_1775489914 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-8cfc61fc9b8so1012382385a.1 for ; Mon, 06 Apr 2026 08:38:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1775489914; x=1776094714; darn=vger.kernel.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=v5Zet8J4rK0+1tdnDTvli0Ek2YpzZgM64BeAXaz+iIs=; b=p9c/4YdSmbaz/BYOo4azgYDqeaHh4Nzc4tdTb2T3AwKbb2PWYCQuS1KbEp+qe0qUN6 0sSCP6oj2PUHdF75z2PHXenbAU6B37i5WStrMkfcaPRz7itFP2jIiGQ3Z57jiN00G9kd nUHYpLZntphglHXlJe1BNxFQpzobCNv6ZWsCysUfjYsC88CBtplPcxwo8GngcPAQs4y6 QE0bgWor6HoKNYrEaPhkJ1XGzTu4o3kTljtE99u32eandYrruF/bcUXLvE8y7Ep2Kj/F cMvMOoCb6UIflmqUSOihBYZCP5AgqT+Df69dNarmA9PSdKBuu4MeHpiMWhDGHtrT23/Z qG8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775489914; x=1776094714; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=v5Zet8J4rK0+1tdnDTvli0Ek2YpzZgM64BeAXaz+iIs=; b=fEzXlLSNLymJ2UGEmtwVflWJHaJLt8yxffyNI+PnCjWggulYXIqHYKs29fZsAOZx7M NafHZWOU3DAB1+vmOUYYbOIWs+DafxsvTt+YKjOMHbc+Yv8uOsXDc97yRR7+x+aC3Ih2 5cU3H/PeVMFqjZ62iolCpDjkgummKBjmTDqqv7ag/HOdzogYNhbGNEC9Qh137Y2XbVLA ufUZK9pgs4W9oiUzcfEnQjmdjGAJLCnYEwyApwiJYIVntLVrsUW2H+vEHlxrvuvOSSg2 YBgkr6VQQlgt5GBfnHHqA/Qh6EdFjrcX6lrOC2x5wxyevHG6e9dN8HJGSXAuHaVzlc4W AnJw== X-Forwarded-Encrypted: i=1; AJvYcCVxdLZr78rsXBVymDzL23BFB/l2KPucdP8nJmdAEn7JwQqfD87rSF0a69VFDLgj35rvbXyptmmDY3VY+/E=@vger.kernel.org X-Gm-Message-State: AOJu0YwZrvZ8Zmkqy4WvKDmSQiFe/Efe1Wl5rOTuhXI3MP05711yQG81 pwRvcndXU3bgCsDGx6Lo7o9AtC/rl4TdAEcAiQ1x3qIaXV+J0iKwmWZsKxbb3F70HldIXAulMs5 hBf/3jCtF84XG3Po/DaznxNkwtiViipDcXTi4ItK3CBrUgynvhrh1zAp+3jsvh1goNw== X-Gm-Gg: AeBDieu/T9VO0oNBYrNGuTt/aDiyr48APN8pWh/E8WomP9baWEQc4WKlNVEF0VkQtyj xB4RxGQSKilEMBk4ykJQ32LGbqRz0Y0cxDarY7tQSw3vslAXMij/uEBc64o0un5R+x+1rci2lZ2 +jZXdq0lHjTzp0MSXqij109xXuQa5ngx6MMwbYmivjVV9+g2AuGo6w8ZrGRMMdXwSI3lafL/Hr1 vbKCapLwewRbhvxCMgZz0e8+ULOw+QzWErSvOw+Uw1w/eoINbxq3jSbof4p9mXOIWIPRLByTn+U VB2+tsNrP+R33IwI0oYVTh5AQKFYvqgToVUXNPlp6hy5kpMm1eh5KHdJi3BWx+3VLqwLJi7Hwsl MJ9owyDTpX31Ip2dlPkneXTWR41LX06lbYL9kSzfbeiBP89eaKfnWMRi4 X-Received: by 2002:a05:620a:4490:b0:8cf:d510:3b5f with SMTP id af79cd13be357-8d41c8a82a0mr1883136085a.31.1775489913906; Mon, 06 Apr 2026 08:38:33 -0700 (PDT) X-Received: by 2002:a05:620a:4490:b0:8cf:d510:3b5f with SMTP id af79cd13be357-8d41c8a82a0mr1883128785a.31.1775489913310; Mon, 06 Apr 2026 08:38:33 -0700 (PDT) Received: from redhat.com (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8d2a5393a07sm1099166585a.4.2026.04.06.08.38.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Apr 2026 08:38:32 -0700 (PDT) Date: Mon, 6 Apr 2026 11:38:30 -0400 From: Brian Masney To: "Peng Fan (OSS)" Cc: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sudeep Holla , Cristian Marussi , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan Subject: Re: [PATCH RFC 0/2] clk: scmi: =?utf-8?Q?D?= =?utf-8?Q?T_support_for_SCMI_clock_rate_rounding_modes_=28per=E2=80=91clo?= =?utf-8?Q?ck?= policy) Message-ID: References: <20260306-scmi-clk-round-v1-0-61e2a5df9051@nxp.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260306-scmi-clk-round-v1-0-61e2a5df9051@nxp.com> User-Agent: Mutt/2.3.0 (2026-01-25) Hi Peng, On Fri, Mar 06, 2026 at 02:20:11PM +0800, Peng Fan (OSS) wrote: > The ARM SCMI specification (DEN0056E) defines rounding‑mode flags for the > CLOCK_RATE_SET command, allowing a client to request that the firmware > round a requested clock rate down, up, or autonomously choose the > closest achievable rate. > This series introduces DT support in the SCMI clock provider to carry a > per‑clock rounding policy from the device tree into the SCMI protocol. > > Patch 1 adds dt‑bindings constants for rounding modes: > ROUND_DOWN, ROUND_UP, ROUND_AUTO. > > Patch 2 extends the SCMI clock provider to optionally support > "#clock-cells = <2>", where the second cell encodes the rounding mode. > The first consumer that references a given clock latches the per‑clock > policy. Subsequent consumers of the same clock must specify the same > mode; otherwise, the request is rejected to avoid non‑deterministic > behavior. The selected mode is passed through to the SCMI Clock protocol > and mapped to the corresponding CLOCK_SET_* flag. > > Patch 2 includes changes to drivers/clk/clk-scmi.c and drivers/firmware > arm_scmi/clock.c, it is hard to separate the changes without breaking, > so I put the changes in one patch. > > This design adopts a per‑clock policy model, not per‑consumer. The rounding > mode is applied by the provider per clock (index). > All consumers of the same clock must agree on the rounding mode. > Conflicting per‑consumer requests for the same clock are invalid and > are rejected during phandle translation. > > This avoids silent clobbering and preserves deterministic behavior. > > Existing device trees using #clock-cells = <1> continue to work and > default to ROUND_DOWN, exactly as before. > > Signed-off-by: Peng Fan My high level feedback about this: 1) Since you are making changes to the DT schema for the clock-cells, does the SCMI DT schema document also need to be updated to allow clock-cells to be 1 or 2? 2) For the ROUND_XXX constants, I would prefix them with something since the existing ROUND names are fairly generic sounding. Maybe CLK_SCMI_? Brian