From patchwork Fri Oct 23 14:55:30 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4891 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 134283F138 for ; Fri, 23 Oct 2026 16:56:03 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4a204f135ffsf5643095e9.1 for ; Fri, 23 Oct 2026 07:56:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1792767362; cv=pass; d=google.com; s=arc-20260327; b=noxXNmHbnf2q3Is6ofq/+N8ljZs1xxhP23LKAObfbQurmYiIAPHyNon9FqFuBFrNEZ rT8i7LwgeNEuvlIjtMCEHYdm9o04SykGwZHNW0GHtLZSf5LxPmeXSM2iAhr43e9ufDsg r6FDJpWlrGY3g+4UiGy+3/KsX4v2WYystwXB2gOOjIzAbdk2EXg4EvBAxo4ta7wKeJUg 4GqAk087STR9we8dSVXY0niQNZ3L7JGGSgd7g0211gHrVWneEMosFv2DAGuypyyaZNb6 C9JpeKqnpWKPh/f5v4YBm2sVVtUXd3MuF5zD2c5ZsC9oeDTwZUlUq1TDQc0oL6VXTUgL fphQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=tMAT4/dJ36eRZpYCVuZahUjN6qCYIAk6k7Kgx/NnOFA=; fh=Xld8NzifD/LemYuAa3MI4dHrD8CIP7y1X5nK9Hy6tvI=; b=GScIqKsOSOb199NENMecezwJuVs/EoRsjV5mK7SFMKBapjFx7ScvYdOzMtpvxic7J4 NiMavRzLVb7KTOCE6LUbPjIHlpgIbcCMfvdOj9quEDsoNIFrEf4SqN5N7aCwQjZ/GdKG ZhTlvrG1PtwHnVXuOd4fFJlBO8Fv64GuWWNXkb7GqQAUT1y5Z9isM2SzKY50KhYPqrVz 2qW1r5uGuB4D3U5FSGy9bNQDHd8VdMit+6NTmMF88GlabKD7XMg7y0MvnCGm5mMCdJ3l gdRrjTlYg6rue84HlX60RNJ3EH3k63Y6cHxbAslI3pqq9FMn3EP22ZeB32zNxMZrF4pf N1MA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="CB/p6fDD"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1792767362; x=1793372162; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-type :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to:content-type; bh=tMAT4/dJ36eRZpYCVuZahUjN6qCYIAk6k7Kgx/NnOFA=; b=npLeGPoX9U5gWFRxkmvVKpaGv2VzeB9P9Og6MdncljuMX4wmWviWaLpC4MyLBKY48G ElC3kDdHblFP45ISNP8JWRabIhDFi8z/YI8xTp0G5YYTWCr+NbTdF/WINyeawk73BbNZ MbcaW8+pmk219beqCqqNQG0kP0JKSXoPOva/U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792767362; x=1793372162; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :content-type:x-original-authentication-results:x-original-sender :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-gg:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=tMAT4/dJ36eRZpYCVuZahUjN6qCYIAk6k7Kgx/NnOFA=; b=UPk8yJBNr+jZYSugKme0/MIJXMlGWvAy2FPb0JU+eN4aFi4bHx4qzkahN/CY4C8U20 PUc49DU1ytf8MQw0+QfEHJxawMbZ4xLQ5wFzGWlAvEE9PTRzs04z0gWmxK8Ha+xpBqt6 zwLYqfqvGByoWPBEBZ8RdE3w7Ly7rIjxfKaMX8E/NRi6wgbXzUirA1npMcqsJx18C5ON U1fMvj7uizXK+Z+9HsXREvY81pbSTRcuSNtFVtmeE6hBan4Re+HnLmLiTtdXC+X3gUpJ KYvmYK70XS+/sFnO9NtNTd/G51fc/GSeOR7te/z6fw66ndin5otwPUFCI0O68EquGnel 0Skw== X-Forwarded-Encrypted: i=2; AKwUvBzfRpz1VkZ9gJyqypKxcnm3xegBxJkcXH/O8fw3RX9ICCXWCeb9oFN6uhf0+D2Yu9v6hSHe4PPBsZnRdsjS@patchwork.amarulasolutions.com X-Gm-Message-State: AFq9FYKpoHcWmX8nzdMAcQ3/W5T+75LaCClUArcA/faHH7u7LH1lHrON YGx6Gp3gVIkAwweR5+MJj1sMiBbS6JpGIqgE6dyI2Ai4KrqE2qfanfApNyM5iR310V+RFg== X-Received: by 2002:a05:600c:3151:b0:49e:6050:9fbe with SMTP id 5b1f17b1804b1-4a211ef853emr40509845e9.15.1792767362662; Fri, 23 Oct 2026 07:56:02 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h="ATskLdc6RfhFXzluzDe5wi5n1FSr9wWAir7XI0P4jqSl68S3Aw==" Received: by 2002:a5d:6f12:0:b0:486:fb9c:1f5c with SMTP id ffacd0b85a97d-48e370d16abls774730f8f.0.-pod-prod-01-eu; Fri, 23 Oct 2026 07:56:01 -0700 (PDT) X-Received: by 2002:a05:6000:607:b0:488:83f7:6352 with SMTP id ffacd0b85a97d-48e385467d9mr4833357f8f.4.1792767360934; Fri, 23 Oct 2026 07:56:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1792767360; cv=none; d=google.com; s=arc-20260327; b=lVqMpzUeV1jIu0XGaOPNfQE7f16Bvgmrz1KTouqZebEp29XrZZALkCMK7Sxh84uBPr tgyBhnLlnO8gnBWn9c3yYk4i/GQMgflRS9WVJeo80thTo8AriiF53T2T9eEzWzNAWS0h ajhwJCD7awll9vPXWcnMyhyT3EDOEplZEC+L8C0lUgTzksL4HirKtCeaAJ8mGuXSt5WH 2C+9HJSLgs2u5yGD68zwpx/hVWsa2j+YN8naZZ6q2H+73HQhrtkTLTFNUhBfTt47yAaJ A/a85af1Fug+DGEvOJGTQpD2lhVdIfCl8Lq3Ee4+GnIS8VQOjp9hPm2brkgpYciMPKZh bUJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=9bdn7JZKlrSe802I/W49m30XlcFM4hLN7khRfrE0PxM=; fh=DuNo64xTz7nMtdx6L1oiX5EIcVk53PIRHos8Onaw5fg=; b=FevYf4iDARKslC7Cm08Pq7inykh7QuWTc7/QPMieNdk9CPOKJIe0FO49XKUQJxRh5R Ql/9qB+Vau8IhImnLq/M2h6iozHx9Nl+//p8xxLOcZ2/HGWiltOPdxFKpWu0HWMwv2c4 yWo2P/lKuxH7U5ZVdCMV5ZDGa9+sN7L1puFk2nQ9nz7DPdMGc4zH5ZV6pDczsnHPfk5T 8uSYh43di58L1bheOpeoDLHg616KOrryTLV9XZ2mSklG9BKW8pCO3vOG3eu/1Rr+oRi/ T94IBGF7JzNJf2jc0Y1e2LvWlIZqAqQITNs4j47squMRtQjcNbxuDb7vOAClIlku/cbv m79g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="CB/p6fDD"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-48e3d3b5a3fsor46726f8f.4.2026.10.23.07.56.00 for (Google Transport Security); Fri, 23 Oct 2026 07:56:00 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: AYBFou13DQPNUXtvoJOqugmX1DZnhKQa0lLAwDy+QXIHx8W5F0GFqqJVnfh/KQ7pKPO QfX34YHd1jTbLCWsfHCb9PQ7qJVNUtpnrHSuMLRHSX9NMJi0aDjMao4g/VeIhwVd6KROzfLSHXq m8YcZOyZh9PXZ3D5b0w4gv1XVPJBSb9G39xM7tEKqCmgLwLMmzadBDx1LQkMrYQtBXfNFrF2vuA +9Xy+4rE5RI7wh7xc1muNI87dRA81cn1R1gD9cI2mmwd7jiLw9nvXqE4V4n8x/QhUuVL3Rewj1o b/flVu/TKQ3tY8TBTI1dufOVmLrXFq67sZPLSZqexrNI4cFVq4/iyeystOFUTPPUDEzOghB6bjO f1RGogBx3nrrjVhpMV49A+HDkMVqfqKshLXBoSBo98c0NxnpWE3yw176Bq93ifUCcYt7PJwVcdr WgbuU9X7m9rC9YXeb2fO5fDCA7oRxFv+Z8wCue7m727pLTd7wpMWfbBnBjFismzkKw/r3IOxCL0 qYCwwVNFaT+M/VHCgRB+vkyr6CQ6CMnvey06A9wJFeBEI78QXtYc6n8w9xowh1czRe7H95GGU5z 75+aAtKGPzYVpShkC6y739Z3PtzR18v0tSlGe27NS3kIZesnVQxKBkgiaTCVaBjzJ59wR1ct9yH 5SVYIQgnVKwqouCEZpaM0vcvPkJMzxaO4FgOhMOYzzHUbRkis8amH X-Received: by 2002:a05:6000:29c8:b0:48e:3cf5:71fc with SMTP id ffacd0b85a97d-48e3cf57222mr508697f8f.47.1792767360463; Fri, 23 Oct 2026 07:56:00 -0700 (PDT) Received: from dario-ThinkPad-P14s-Gen-5.homenet.telecomitalia.it (host-79-14-29-58.business.telecomitalia.it. [79.14.29.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d42f884sm226760f8f.57.2026.10.23.07.55.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2026 07:56:00 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, Dario Binacchi , Brian Masney , Conor Dooley , Jerome Brunet , Krzysztof Kozlowski , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: clock: ti: dpll: drop the ti,ssc-* properties Date: Fri, 23 Oct 2026 16:55:30 +0200 Message-ID: <20261023145555.3578469-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261023145555.3578469-1-dario.binacchi@amarulasolutions.com> References: <20261023145555.3578469-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="CB/p6fDD"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The common clock binding provides assigned-clock-sscs to configure spread spectrum clocking (SSC), supported by the clock core since commit a7f16660af39 ("clk: conf: Support assigned-clock-sscs"). Keeping the vendor specific ti,ssc-deltam, ti,ssc-modfreq-hz and ti,ssc-downspread properties would leave two ways to describe the same thing. The properties have no in-tree users, so they can be dropped. Existing DTS files using them continue to work, with SSC disabled, until they switch to assigned-clock-sscs. Signed-off-by: Dario Binacchi --- If keeping the properties as deprecated is preferred, I can add a fallback to the driver in v2. Documentation/devicetree/bindings/clock/ti/dpll.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/ti/dpll.txt b/Documentation/devicetree/bindings/clock/ti/dpll.txt index 14a1b72c2e71..ffbe50f46e68 100644 --- a/Documentation/devicetree/bindings/clock/ti/dpll.txt +++ b/Documentation/devicetree/bindings/clock/ti/dpll.txt @@ -56,12 +56,6 @@ Optional properties: - ti,lock : DPLL locks in programmed rate - ti,min-div : the minimum divisor to start from to round the DPLL target rate - - ti,ssc-deltam : DPLL supports spread spectrum clocking, frequency - spreading in permille (10th of a percent) - - ti,ssc-modfreq-hz : DPLL supports spread spectrum clocking, spread - spectrum modulation frequency - - ti,ssc-downspread : DPLL supports spread spectrum clocking, boolean - to enable the downspread feature Examples: dpll_core_ck: dpll_core_ck@44e00490 { From patchwork Fri Oct 23 14:55:31 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4892 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A74843F0E2 for ; Fri, 23 Oct 2026 16:56:04 +0200 (CEST) Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-48e00f3929bsf1433544f8f.0 for ; Fri, 23 Oct 2026 07:56:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1792767364; cv=pass; d=google.com; s=arc-20260327; b=Qv8K98OTxnSpjJPdeKb4K64XLgVB49xodX2CnjCD9UtSETbvr1mdttI0p9dbCCeULE wl0Vs76o0obagYeYwdkDHoZincHb/fP4+ByopeJuZlbeqjr9sZIDsqM5rwEETWoBz3Vy iwb8wxqHYQ7BgVBkNiziSiEFj4tARKzi7QScVKuKzcffJfR2lQCd30Z8UU6+JQKp8BAo Rbno9P7O1Stc+7PqX2n7+P0Bi/nYivuqV4GNif7hacVRF+BaAq8jJ5zS5xv01r9YSUmd 8ZZRlkYtspxoukOMErSj+DcS+wFdHKyiR/ciHk6sKh+4n6tuJPhz6DY8XbXuuRP0F4Au Xmgg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=h7zopdJEA74F1NJCM2VxN+YxXQxfdW5V2XE4UHy/JsQ=; fh=bitP2BqN+NzugEldU8nxs0kXBJcXnpyDnhm7pi8iYmg=; b=rD7D4xKvwN+lTalthzJhTkXYMBFeIKj8nHdP6sf/6PC7gXznMlftPWVoVr7pKu+D1n n5RxXgjh/J982A5BblAGoX5hwMXwJEgAL8FwUteiemZArvk4h8U0ebIylR09OfJFrcP8 EZHND3DK+94FfLTIGUD4xtKjnRTc5MOayKvsaVj+g4FdYkZ3ulXjtHhkMWUyCRzqo82P 0lg/mQ0sDF1uavKO5iZGZkMcwcCIb5Jcbh7Bgiaxfjkv/+ADQ0BnYElT8j5GxAB4yUP3 9Vy74bzK0lSjV7HGLsKhvsBQFIlZvBzeW/NkhiZ7SYRzBv6Sw/e+pWIrRE2vMYoNaBzs Fjaw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MIagqK0l; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1792767364; x=1793372164; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-type :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to:content-type; bh=h7zopdJEA74F1NJCM2VxN+YxXQxfdW5V2XE4UHy/JsQ=; b=MLMH/9NMy645Anq627Q1FE4mviSbgT8ZDMxF1K+Cfh/LY39ly1vVJTlQP6FjYBPxb1 d5F4VXshMWZioY/aXlq1Qv5wadd67eG2iOuGWutKiZWVv2njiXDPXF5+6FRp7xjN+LxX gtG+pscyh3UW6I3Fw1AE9PTT4Anw6MbZYscX4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792767364; x=1793372164; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :content-type:x-original-authentication-results:x-original-sender :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-gg:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=h7zopdJEA74F1NJCM2VxN+YxXQxfdW5V2XE4UHy/JsQ=; b=A8pIWAC+9WPyXogY59RUMi4oJ50PY2Pity+3J7663rhsy87vIDQDLWti3A47Rj0TMV 3pfOCiVtSHDaMDlc+Dsh5l12terxRB4fZhrj93IDX43WVP9OfH537hYk28OcQGPa07OM JRqyqt1evaJFUVDIMX1yFqvddPMBE1B8xNIuAShBZJxoSdpK5xK+b+5cUWtMPXmMppsO +NhuRyZM1PqN8Brxu1Qhdig8bdP0QYhVYBJx5pYhOeGgk/xNs1vUF0Oa4yR+U01CQLPD s/eNtX1kElqEBvpkDU3ix5rOypeV6tb9DLRHfmhbG6/K5Ddl03DbhGf0W6praM3aT6aq ZafQ== X-Forwarded-Encrypted: i=2; AKwUvBwDKhLEbPY17/3E5QbIExAJjYy73ijH1SVSz8UGmfdNGq6HONd02HBHbYhXLjDdvEu2mjZmLvzBy2wC24sJ@patchwork.amarulasolutions.com X-Gm-Message-State: AFq9FYJDWY7YffXDq0Hl4twozGqMdr3opEyBMW31axSZscZ8RKb17DbE 4iB8fu48/R8JykUe7My/tzJLa8Zc49374vuHVwGzpd3cQ9ziWLQ5EHGLnvUKhS/t/ExTGg== X-Received: by 2002:a05:6000:188a:b0:48a:f4d4:e1f3 with SMTP id ffacd0b85a97d-48e38599f31mr4209633f8f.13.1792767364295; Fri, 23 Oct 2026 07:56:04 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h="ATskLddWG5/VeE5iF8iXZ80m3I5JsgS/STEBxk4ORsi6UYPHHA==" Received: by 2002:a5d:6041:0:b0:487:615:30c0 with SMTP id ffacd0b85a97d-48e2ca6532als716014f8f.2.-pod-prod-00-eu-canary; Fri, 23 Oct 2026 07:56:02 -0700 (PDT) X-Received: by 2002:a5d:5d0f:0:b0:48d:f1ab:faf9 with SMTP id ffacd0b85a97d-48e3859a291mr4550276f8f.16.1792767362449; Fri, 23 Oct 2026 07:56:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1792767362; cv=none; d=google.com; s=arc-20260327; b=R0dgWfCfjXdNd1Pjrk7rqs8jbTTfVQBKfzCrujH8o6mMSNU0E+swvr+Y7TXFhvBPd9 WQW82T13bk8qTCfSIYEFkBHGehvkzSHpw/z+jazqD86jQJrGNjmQMhBDpv7UsU812f5p NZ1o6bR5Z+S9HRizTYVkzyGl2ObK99BNU4KeAtjhpTM9ah9+wbkpJtHc03llFdg8l7+O 7EKCuV95vZKDGAWQZqk9PxHFAnhqQ4iUfI38pmSj7eUv8g5/ckYjb3WR1PBXfyG2IHUT SJSBbRZJNOg5Vws2bQSxjJNymH/+dKxjS70W9maRhG0YQaSVhyaJ5YN/G9/5utmjIDup Na1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=80oQFk83gUm5oUkUtGxTmSCfXu9EgvcllbggxNBcnbY=; fh=PbD9/XAkGeXOdmhINiq9gVEkmozRqhY0cRjgzaGu/Os=; b=AtvJ2XwlXfzBX4a4ZFsAk1ItAQiCsG0NcgpILVPBfrPwjTMtzLjWQ4yAyO2gR5nZeH l++Jd55uhlB6cmBbG87s8rfn0/ImLd86vjorqc/o1Ltfk9hN/PEeSQiUvoTnsRfcgME3 uNprDl8CLCQEEy9JuMKlaD7IKPtiZQo7PSyn3uF5cHKSeX1mFVbYLoXjEaT1Qz6JpYn5 axYRTcIEH5m36GC9uB50qJva7nCJWMI7SC6TzqoUBpeTgmRcrRbyvZ9B078bz9rnEaW2 E5Or7ZK7e3ryhLWLJd6IwZuO5cqO83DRWLAMlNywbVqg0dMaxuJbUTtk1ZW/ZduQ+EYT dfUA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MIagqK0l; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-48e3d4cecc0sor23015f8f.8.2026.10.23.07.56.02 for (Google Transport Security); Fri, 23 Oct 2026 07:56:02 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: AYBFou0exlCK2oSmb0/5iPnVHc1NXpuiJRPS2p/WrFclvYAxI4JE4WF6UwQXoi458Xn WRRX4ZK4eUsfTte1atF28h+c8q00d5pvse9Iz4in5BpBcTj/YuEmy4JCDkZM1sjJOb/qZebTW98 EHa9+lLTqHzypt1OFtW4V1jgtbGduEYvxZYKIPKeEqz7VllJgpVbBeRm2dwP6Lu07bRYcOq7b5Z SohSLUbSw6sYWGkRA/hpnBQs6XqTTPyIHATwi1ibYBxsHH6l0t5vhTrHI+d36PVmsmnsiDoccGn LkhASvrHM5Fh0KAQl0gYXg6KFycJVUdetwrBPEN3ZGo+72MQwm8os6PqQ+ewUK8uvwUZgRl22Ch GIIJ1OGyNO+oERGYC96VESXtqjrxy6Mp8w2DeVYGt8vytGbF+DFuIdiqsjQSDTrcyWGLp7hEmF2 OXjMaC3qew0S8IE8zYrDd18c3IUwkRF/BwxuHzOlQISguEyNwKuFK1aksAtgR9Tuji8ZQHq3zF7 kiIw23lPFaUvnU26fITrWC15QGWhx2+GwegwE0t5VZbl93jZrtAYakVu3Sb7RLCOx1Ae6cQal5v 7A4b2Ck0ieT9hJVxaRcBSq6XQZkTae2ByU05OdVwbiDUJqwv/HECZlPXVPOw1U4/YWBHCbx9vQA acg84P/0eO03rIonvxgaipoqikeG3fWehPvolyHzTDHu4Ke3X7/hx X-Received: by 2002:a05:6000:4a0a:b0:48e:22fd:1ea3 with SMTP id ffacd0b85a97d-48e2d279e8fmr11095010f8f.28.1792767361919; Fri, 23 Oct 2026 07:56:01 -0700 (PDT) Received: from dario-ThinkPad-P14s-Gen-5.homenet.telecomitalia.it (host-79-14-29-58.business.telecomitalia.it. [79.14.29.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d42f884sm226760f8f.57.2026.10.23.07.56.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2026 07:56:01 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, Dario Binacchi , Brian Masney , Jerome Brunet , Stephen Boyd , Tero Kristo , linux-clk@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH 2/3] clk: ti: dpll: use the generic spread spectrum configuration Date: Fri, 23 Oct 2026 16:55:31 +0200 Message-ID: <20261023145555.3578469-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261023145555.3578469-1-dario.binacchi@amarulasolutions.com> References: <20261023145555.3578469-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MIagqK0l; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The clock framework provides a generic API and DT property for spread spectrum clocking (SSC) since commit c86814e70390 ("clk: Introduce clk_hw_set_spread_spectrum"). Implement the set_spread_spectrum callback and drop the vendor specific properties. The SSC registers are programmed at the next rate change, as with the vendor specific properties. The generic framework expresses the spread in permyriad rather than permille, hence the change in the deltaM step computation, and also supports up-spread, which is rejected as the hardware does not support it. Signed-off-by: Dario Binacchi --- drivers/clk/ti/clock.h | 2 ++ drivers/clk/ti/dpll.c | 8 ++--- drivers/clk/ti/dpll3xxx.c | 61 ++++++++++++++++++++++++++++++++------- include/linux/clk/ti.h | 9 ++---- 4 files changed, 57 insertions(+), 23 deletions(-) diff --git a/drivers/clk/ti/clock.h b/drivers/clk/ti/clock.h index d5e24fe4ae3a..83225e506314 100644 --- a/drivers/clk/ti/clock.h +++ b/drivers/clk/ti/clock.h @@ -271,6 +271,8 @@ int omap3_noncore_dpll_set_rate_and_parent(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate, u8 index); +int omap3_noncore_dpll_set_spread_spectrum(struct clk_hw *hw, + const struct clk_spread_spectrum *ss_conf); int omap3_noncore_dpll_determine_rate(struct clk_hw *hw, struct clk_rate_request *req); int omap2_dpll_determine_rate(struct clk_hw *hw, struct clk_rate_request *req); diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c index e01272cd628d..626b44297e42 100644 --- a/drivers/clk/ti/dpll.c +++ b/drivers/clk/ti/dpll.c @@ -51,6 +51,7 @@ static const struct clk_ops dpll_ck_ops = { .set_parent = &omap3_noncore_dpll_set_parent, .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent, .determine_rate = &omap3_noncore_dpll_determine_rate, + .set_spread_spectrum = &omap3_noncore_dpll_set_spread_spectrum, .get_parent = &omap2_init_dpll_parent, .save_context = &omap3_noncore_dpll_save_context, .restore_context = &omap3_noncore_dpll_restore_context, @@ -63,6 +64,7 @@ static const struct clk_ops dpll_no_gate_ck_ops = { .set_parent = &omap3_noncore_dpll_set_parent, .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent, .determine_rate = &omap3_noncore_dpll_determine_rate, + .set_spread_spectrum = &omap3_noncore_dpll_set_spread_spectrum, .save_context = &omap3_noncore_dpll_save_context, .restore_context = &omap3_noncore_dpll_restore_context }; @@ -348,12 +350,6 @@ static void __init of_ti_dpll_setup(struct device_node *node, if (ti_clk_get_reg_addr(node, ssc_clk_index++, &dd->ssc_modfreq_reg)) goto cleanup; - - of_property_read_u32(node, "ti,ssc-modfreq-hz", - &dd->ssc_modfreq); - of_property_read_u32(node, "ti,ssc-deltam", &dd->ssc_deltam); - dd->ssc_downspread = - of_property_read_bool(node, "ti,ssc-downspread"); } if (of_property_read_bool(node, "ti,low-power-stop")) diff --git a/drivers/clk/ti/dpll3xxx.c b/drivers/clk/ti/dpll3xxx.c index 8c51b988a04f..634fe0a1f9fd 100644 --- a/drivers/clk/ti/dpll3xxx.c +++ b/drivers/clk/ti/dpll3xxx.c @@ -295,30 +295,32 @@ static void _lookup_sddiv(struct clk_hw_omap *clk, u8 *sd_div, u16 m, u8 n) * omap3_noncore_dpll_ssc_program - set spread-spectrum clocking registers * @clk: struct clk * of DPLL to set * - * Enable the DPLL spread spectrum clocking if frequency modulation and - * frequency spreading have been set, otherwise disable it. + * Enable the DPLL spread spectrum clocking according to the configuration + * set by omap3_noncore_dpll_set_spread_spectrum(), otherwise disable it. */ static void omap3_noncore_dpll_ssc_program(struct clk_hw_omap *clk) { struct dpll_data *dd = clk->dpll_data; + const struct clk_spread_spectrum *conf = &dd->ssc_conf; + bool downspread = conf->method == CLK_SPREAD_DOWN; unsigned long ref_rate; u32 v, ctrl, mod_freq_divider, exponent, mantissa; u32 deltam_step, deltam_ceil; ctrl = ti_clk_ll_ops->clk_readl(&dd->control_reg); - if (dd->ssc_modfreq && dd->ssc_deltam) { + if (conf->method != CLK_SPREAD_NO) { ctrl |= dd->ssc_enable_mask; - if (dd->ssc_downspread) + if (downspread) ctrl |= dd->ssc_downspread_mask; else ctrl &= ~dd->ssc_downspread_mask; ref_rate = clk_hw_get_rate(dd->clk_ref); mod_freq_divider = - (ref_rate / dd->last_rounded_n) / (4 * dd->ssc_modfreq); - if (dd->ssc_modfreq > (ref_rate / 70)) + (ref_rate / dd->last_rounded_n) / (4 * conf->modfreq_hz); + if (conf->modfreq_hz > (ref_rate / 70)) pr_warn("clock: SSC modulation frequency of DPLL %s greater than %ld\n", __clk_get_name(clk->hw.clk), ref_rate / 70); @@ -337,9 +339,10 @@ static void omap3_noncore_dpll_ssc_program(struct clk_hw_omap *clk) v |= exponent << __ffs(dd->ssc_modfreq_exp_mask); ti_clk_ll_ops->clk_writel(v, &dd->ssc_modfreq_reg); - deltam_step = dd->last_rounded_m * dd->ssc_deltam; - deltam_step /= 10; - if (dd->ssc_downspread) + /* spread_bp is in permyriad, convert to percent first */ + deltam_step = dd->last_rounded_m * conf->spread_bp; + deltam_step /= 100; + if (downspread) deltam_step /= 2; deltam_step <<= __ffs(dd->ssc_deltam_int_mask); @@ -353,7 +356,7 @@ static void omap3_noncore_dpll_ssc_program(struct clk_hw_omap *clk) if (deltam_step & dd->ssc_deltam_frac_mask) deltam_ceil++; - if ((dd->ssc_downspread && + if ((downspread && ((dd->last_rounded_m - (2 * deltam_ceil)) < 20 || dd->last_rounded_m > 2045)) || ((dd->last_rounded_m - deltam_ceil) < 20 || @@ -682,6 +685,44 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate, return ret; } +/** + * omap3_noncore_dpll_set_spread_spectrum - set the DPLL SSC configuration + * @hw: pointer to the clock to set the spread spectrum configuration for + * @ss_conf: spread spectrum configuration + * + * Stores the spread spectrum clocking (SSC) configuration of the DPLL. The + * configuration is programmed along with the DPLL multiplier and divider + * at the next rate change. The hardware supports center-spread and + * down-spread only. Returns 0 on success, or a negative error value on + * failure. + */ +int omap3_noncore_dpll_set_spread_spectrum(struct clk_hw *hw, + const struct clk_spread_spectrum *ss_conf) +{ + struct clk_hw_omap *clk = to_clk_hw_omap(hw); + struct dpll_data *dd = clk->dpll_data; + + if (!dd || !dd->ssc_enable_mask) + return -EOPNOTSUPP; + + switch (ss_conf->method) { + case CLK_SPREAD_NO: + break; + case CLK_SPREAD_CENTER: + case CLK_SPREAD_DOWN: + if (!ss_conf->modfreq_hz || !ss_conf->spread_bp) + return -EINVAL; + break; + default: + /* Up-spread is not supported by the hardware */ + return -EINVAL; + } + + dd->ssc_conf = *ss_conf; + + return 0; +} + /** * omap3_noncore_dpll_set_rate_and_parent - set rate and parent for a DPLL clock * @hw: pointer to the clock to set rate and parent for diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h index 54a3fa370004..81ac070551f9 100644 --- a/include/linux/clk/ti.h +++ b/include/linux/clk/ti.h @@ -65,10 +65,7 @@ struct clk_omap_reg { * @ssc_enable_mask: mask of the DPLL SSC enable bit in @control_reg * @ssc_downspread_mask: mask of the DPLL SSC low frequency only bit in * @control_reg - * @ssc_modfreq: the DPLL SSC frequency modulation in kHz - * @ssc_deltam: the DPLL SSC frequency spreading in permille (10th of percent) - * @ssc_downspread: require the only low frequency spread of the DPLL in SSC - * mode + * @ssc_conf: the DPLL SSC configuration, as set by clk_hw_set_spread_spectrum() * @flags: DPLL type/features (see below) * * Possible values for @flags: @@ -124,9 +121,7 @@ struct dpll_data { u32 ssc_modfreq_exp_mask; u32 ssc_enable_mask; u32 ssc_downspread_mask; - u32 ssc_modfreq; - u32 ssc_deltam; - bool ssc_downspread; + struct clk_spread_spectrum ssc_conf; u8 flags; }; From patchwork Fri Oct 23 14:55:32 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4893 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 5425A3F0E2 for ; Fri, 23 Oct 2026 16:56:06 +0200 (CEST) Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-48dfa054f26sf790365f8f.2 for ; Fri, 23 Oct 2026 07:56:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1792767366; cv=pass; d=google.com; s=arc-20260327; b=kXfP3uLQkBUow3bNW2XBQ0Gc2gofiUuSlVhpwuQ8F5Y+7KoU9ktCu+LStC52ZvI/cp jfMWCthzMFxoVuejZ43o9lypakFHZXVdKa/yPHcRE2Wvih1I39MkHQDTBVRnKJXgcbEj 1GYNqFYGm8hEo6q5MYm6ZQ6GrbdwvFwybLstFKf2CX4FOoV9BO5bDh35zvBbgd6XAnLY Tv3ySC4Qw78izT82i9mwTgky8HyaocQktaqpbuB5CsM1rHidZfEGBwz3imPyIVPCx4mu aG3AWvt2HuckFRBhJudyp+MMrISZSVBUWaOwwrLB4YF6nvpZFsRFzMCVtWaEIjkCfzZf fZrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=i7Os4l8AoyrZRuMGEuBRTYwNoQR15xHFA1jKPVOYWPY=; fh=q/hUIC2P9TqBVKhUx8NqejzFmT7PmNlx7HgbmoIFbRE=; b=pStHEeuWFehCNnfEpmCO92MGqmy2fnB+hSJ/aphuu20M9YO14ZvNzDQBV9eExXeBTi 9ePonp0gCNhYa39VX/gY8CSVxIh0NsLMtFz+NE1R6s3i4gYrWp5xKkxqNnh6ln27iKMw wfd3hjbpH0ARQu4PDp3P5EFxo3Ueo4VnKnGFzvjEq9tev9nKjV7dak92g90pBlZLGh6i V169R6etTl63636zT9fL8rnmS8RHoIxZUy9f0z9uk4EuNxzPxXWQl8ILRnWCBrxY1BkA 8wQcRpsB2mrmFz4Eju+WMzlEtRhDbdJ/g6pXz7y6MPtWGNGn8VU2qdeFRHpRfxyKTguA 642w==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JX3LofKV; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1792767366; x=1793372166; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-type :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to:content-type; bh=i7Os4l8AoyrZRuMGEuBRTYwNoQR15xHFA1jKPVOYWPY=; b=RSlvDlXiUdQrm4enrCXIkd7JeWCILaU7cpg78vJLsiDKm2jd+rr9F7gmHPXhx3cwfR 8Q3sydWCxnr/Eh/u74ogDLOS0Ikiz7AreDH8fm2IC5oFDt2wYZ9MaJeRgvtqWfM97DGw j3tfWgLRtaBQ1Jt1eFpxtP5mR4sXIJ8E6JBDU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792767366; x=1793372166; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :content-type:x-original-authentication-results:x-original-sender :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-gg:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=i7Os4l8AoyrZRuMGEuBRTYwNoQR15xHFA1jKPVOYWPY=; b=czRnP9hzmbN5UvZa26Rg7XbOMc+PAo3yOS5XnVVZk0Ou8vIytBS7Uu5Qz+HPM7CyDt bT1l+JY6nLnMOZenp6H8lDBe+wMgeO9TmSqdzAUwaqgIU3nkrN34OehzDxW2hu4OhmEF /wVIpgiKx2y9b1LHCED0WTNQLNJX163zNVifsCgb6IqBqse43vY21iOBX0TtdcVFjg0E Fw3Ws3QAyK+BHRCwD81ZF/kfBwmy1pWPmJ0Tcm1BPNrPWztQBQMVorqEhSlf5aV2UpbY QN42ES2ObMCk4iKT3Fc4pKsfF42LvqDJBK2Jn6+Z9Vfhnt27ZF32usvfQgDsmj9RgWjy 8k4g== X-Forwarded-Encrypted: i=2; AKwUvByyXfuFb1N+kZl5lKzyLQ3zuCQ9Y3bn15Ouz5Mb7p+qhY9Rtx1MIDyFx0TNGLIKMJQedclywBhihRfHlUt5@patchwork.amarulasolutions.com X-Gm-Message-State: AFq9FYLpmIVGulzNI1OpI9dEqv/HUbWRhcPvyQxalPJLW5yMJ8S+N3fE StUt+2TWrzuPA4MdFfzN2oTle6V0kjqtAljT/wVuy2cyHCOXmg6IYmmdn7/r6cYTxaqdWQ== X-Received: by 2002:a05:6000:2c05:b0:48e:f10:ce6e with SMTP id ffacd0b85a97d-48e385891e6mr4720264f8f.13.1792767365906; Fri, 23 Oct 2026 07:56:05 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h="ATskLddg62WZ3TYRfNjtmqPNd1Q3uqHr63S55+Zvzoynp/R09Q==" Received: by 2002:a05:6000:41c3:b0:487:a89:5d6f with SMTP id ffacd0b85a97d-48e370bfe13ls774486f8f.0.-pod-prod-07-eu; Fri, 23 Oct 2026 07:56:04 -0700 (PDT) X-Received: by 2002:a05:6000:220d:b0:48e:eb5:4976 with SMTP id ffacd0b85a97d-48e385a7855mr5240223f8f.53.1792767363864; Fri, 23 Oct 2026 07:56:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1792767363; cv=none; d=google.com; s=arc-20260327; b=dFcf5t6RZddQKfKuaX/SVEc2B6eAQwMrII2q0ooOs9BVz8ZQsvtP04s+WvZg1cmeia MQP80b8SXdklKEZraks9sdy6so5QXxlA5a2rRaMEzPTjUUBHoKY4yFYB0HN7xmA1yEWl XHbiMR6QoD6pMz/jXVfOmmA95FjN5qpcZqTPSPb16CoIoIjtS+/39SoTppKTISUJrgPv Gfz9Bfs0LEheherL19sb7JWLCt+aCPV9xDtWS6kGkMH39YyNVkD/2bwoPeRMLcf2/7Wd jhR/wHZxSGFwENnbuk5TtLevUBUSCe7rRZRFmVyGrDjoub7NyvkRaSPL20Pqm48garOV sCow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=VHijqk7R7nkxNtNy7fBcVFoPcvT4XkjuXZl2ndqUfI4=; fh=PbD9/XAkGeXOdmhINiq9gVEkmozRqhY0cRjgzaGu/Os=; b=BD6nmIUmC1skUZx0+ldCKgFGtKkIbioa/tPEjRp4pmmTPrUSEoM5T4KivkxnjSfZED nDrUJFvpsZJ0FxmxNvOkTfd1Iic2syjGZQMHxNGbCOP8FNw5+P/6TBpy7e6Pkg+XHuXt rAvZYzhiTCyzY5+2zKLTn4ak6fOQA03tgMynIGsLiH/szyWDSKjXqyNK4kKalNT8+MmV RUGgywrAdf3f1stJATCOeRTkuKfcqKoVvYOag9o19uRpJkwbPNAkAXjyxZRcU2yg7/l6 FAxumIHNkXsml2JHYnO0QXlm7gz7gqT0eq7PsvJyH5xfWms4FOwpyGpzkalUd5o0h/Tw q2TQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JX3LofKV; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-48e3d3f841fsor28871f8f.16.2026.10.23.07.56.03 for (Google Transport Security); Fri, 23 Oct 2026 07:56:03 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: AYBFou0+iTJ6e5bHDQNrHo3NMG1NlLld7l/xBK6hwz42M1uUC+fmMpuBYaGxHtmJXfS q2bdxw8ESV1OGmxCTXNbXI/YAAuMeYn+3YW3tM5SUwY5EXoPzh3XunxYxtavgI6JiE4Yib1wmG9 T04CHITW9aXtWgJ/EolSi7GraSA+eVXk0KxNtXz6I8KsN4Ygu+cOaeaACHHM5KvSxdl1xzhETAL 7OlGnn4VgoRXvWjhS7RDLV6zu9uv+kfj1JZGExrooC4MUUPAbRM19d8qk79RcBwZyMToHMYG4KB gxiTOApbeiY1OPDpfRvXQOGlI6uPrePCyil57+Qpq/4xkWRznqaYSezniSCY/k2rSpe6I8qh5+O HeSd0p8YO4rORPaI1uciock8jyS1LYYK/0Zb6UX/j/y1a60DkfpjhYD5Gzoe+/rT2iezPOKLz9N T3kthogna9l6+WSrnLQVcUcPrcKmqx1cVHlge2mG/pACT6pYMH8KfeU4OcHOTaMKAJx3/3b6ZuS 6n46GnAAAO4+vKn8gIpJJk6Bm5fvAUG/kev4aiA2QKxKliM+GBjqVhCbyM2lYVbhgWLEP6HQvvy fGMNfqzzbmKd6ApcoYdYdE5fiwpFPsl8mMJ1GLLNh+F7PGJSTdzxYxP4hVd33YhxDWQ9+ZgZZki HUDtUxnfNSa16z+gLHBajXUJrjc9VIXhngbBhuPB4f8fFZD2IGImu X-Received: by 2002:a05:6000:29d5:b0:48d:f025:110d with SMTP id ffacd0b85a97d-48e385a0752mr3000782f8f.43.1792767363456; Fri, 23 Oct 2026 07:56:03 -0700 (PDT) Received: from dario-ThinkPad-P14s-Gen-5.homenet.telecomitalia.it (host-79-14-29-58.business.telecomitalia.it. [79.14.29.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3d42f884sm226760f8f.57.2026.10.23.07.56.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Oct 2026 07:56:02 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, Dario Binacchi , Brian Masney , Jerome Brunet , Stephen Boyd , Tero Kristo , linux-clk@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH 3/3] clk: ti: dpll: apply the spread spectrum configuration right away Date: Fri, 23 Oct 2026 16:55:32 +0200 Message-ID: <20261023145555.3578469-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261023145555.3578469-1-dario.binacchi@amarulasolutions.com> References: <20261023145555.3578469-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JX3LofKV; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The spread spectrum clocking (SSC) registers are only programmed by set_rate(), which the clock core skips when the requested rate is already the current one, e.g. when the bootloader has set it up. As a result, the SSC configuration is not applied, as it was with the vendor specific properties. Apply it from set_spread_spectrum() instead, reprogramming the DPLL at its current rate. Signed-off-by: Dario Binacchi --- drivers/clk/ti/dpll3xxx.c | 49 ++++++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/drivers/clk/ti/dpll3xxx.c b/drivers/clk/ti/dpll3xxx.c index 634fe0a1f9fd..c181bba2792d 100644 --- a/drivers/clk/ti/dpll3xxx.c +++ b/drivers/clk/ti/dpll3xxx.c @@ -690,17 +690,26 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate, * @hw: pointer to the clock to set the spread spectrum configuration for * @ss_conf: spread spectrum configuration * - * Stores the spread spectrum clocking (SSC) configuration of the DPLL. The - * configuration is programmed along with the DPLL multiplier and divider - * at the next rate change. The hardware supports center-spread and - * down-spread only. Returns 0 on success, or a negative error value on - * failure. + * Stores the spread spectrum clocking (SSC) configuration of the DPLL and + * applies it right away. The clock framework does not call set_rate() + * when the rate is unchanged, so the current rate is rounded again and + * the DPLL is reprogrammed. If the DPLL is in bypass the configuration is + * applied at the next rate change. Setting again the current + * configuration is a no-op, so that the DPLL is not relocked for nothing + * (e.g. of_clk_set_defaults() runs twice for CLK_OF_DECLARE providers + * that register themselves with of_clk_add_provider()). The hardware + * supports center-spread and down-spread only. Returns 0 on success, or a + * negative error value on failure. */ int omap3_noncore_dpll_set_spread_spectrum(struct clk_hw *hw, const struct clk_spread_spectrum *ss_conf) { struct clk_hw_omap *clk = to_clk_hw_omap(hw); struct dpll_data *dd = clk->dpll_data; + struct clk_spread_spectrum old_conf; + struct clk_rate_request req; + unsigned long rate; + int ret; if (!dd || !dd->ssc_enable_mask) return -EOPNOTSUPP; @@ -718,9 +727,37 @@ int omap3_noncore_dpll_set_spread_spectrum(struct clk_hw *hw, return -EINVAL; } + if (!memcmp(ss_conf, &dd->ssc_conf, sizeof(*ss_conf))) + return 0; + + old_conf = dd->ssc_conf; dd->ssc_conf = *ss_conf; - return 0; + /* In bypass: SSC is programmed along with the next rate change */ + if (clk_hw_get_parent(hw) != dd->clk_ref) + return 0; + + /* Disabling SSC does not need to reprogram the DPLL */ + if (ss_conf->method == CLK_SPREAD_NO) { + omap3_noncore_dpll_ssc_program(clk); + return 0; + } + + rate = clk_hw_get_rate(hw); + clk_hw_init_rate_request(hw, &req, rate); + ret = omap2_dpll_determine_rate(hw, &req); + if (!ret && req.rate != rate) + ret = -EINVAL; + if (!ret) + ret = omap3_noncore_dpll_set_rate(hw, rate, + clk_hw_get_rate(dd->clk_ref)); + if (ret) { + pr_warn("clock: %s: rate %lu can't be kept with SSC enabled\n", + clk_hw_get_name(hw), rate); + dd->ssc_conf = old_conf; + } + + return ret; } /**