From patchwork Mon Oct 26 07:46:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4894 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 63E123F0F8 for ; Mon, 26 Oct 2026 08:47:02 +0100 (CET) Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-48dfdc0f491sf1440783f8f.1 for ; Mon, 26 Oct 2026 00:47:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1793000822; cv=pass; d=google.com; s=arc-20260327; b=DMy7OlbX1D7S8Ok0fYnJ3/mhOIDNvoT9s3mrjMK0ISRy3gSIsFsGorJDmh73Zfp2w5 6vYLP/xm8ABm+0cvwH+qWwpG6HdybWti1rzergHHy1agY2JbNAT7My2KSnzWuTAJExTy ZEXDS6r4U+w4B7VpFGxl8xIONLMKIHh7XAvRu1NRaDp6ELxKGvIC0pPLqhcdsJldYz+L i5hkFoPjYTGMvWV0BQUadUdUfe9CeaA9SXSjcURLJefKrtR+QZvTfCXo8oUgHtldF+0u qL13yr0gJ3r+1P5utEgfWHTTjPe69rjbPDLTqI1c5SGl6cLYFbXQgfrmxykLH+gyxNeq f6lA== 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=YLszptgz2KH7jizzhWfNvWIR1pyv7RsOPEsyo7f4fKs=; fh=+zzhf488fo6S3KA18o8kpBCwYjnoH4fBl1MjmerRgLE=; b=s0JMah3Yc1gNge55Ya0rBWfZ0DvytujXtZZlKxgfygbzR5/AqJMmsINHMBPaEGvoBM Y0RIFdgDa+jGptb/OClzKfD/MMKeEI1MdKigNP8W/+IB7a4lnsqviyjaZ8vg0Aj88XrT X+5Cvne2Wh+ZxX/ggOQnddlG5k3VHrQqeTvGaN8Ut2EV09j9PhOC2WG9arWAWR+YoACA 45UwZaGM51Rrf6Q6dZpJFKDm3kChbT6vZ32voNmnQKjRncgMg5Jd2Rg9jQzDGmBm9Blr YjZ4PuVzI+hIAeMlEKhyI+PN0al61Zqwzz6AvFT5sEQva0/ud+moG9Q3KhcRX+AJ2i5i lH1Q==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="WBF4B/xe"; 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=1793000822; x=1793605622; 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=YLszptgz2KH7jizzhWfNvWIR1pyv7RsOPEsyo7f4fKs=; b=VxQ9Tzc4O+4ruCf+HIUf4gDPL2pPefjyUWUHAY/mGr1OKzFvf9/EXmiL3jT7w0GVHf I8PD3skA/7oXib+Ja98O8s8UXIwoU3vXRqhLCK3HwLTzRs/cfMB+/XmGPUF8PsiUVJrf 7+sQu35sE6x/6WojvKWouFTr6mYx9KPOREsXQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793000822; x=1793605622; 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=YLszptgz2KH7jizzhWfNvWIR1pyv7RsOPEsyo7f4fKs=; b=CXRHeVH0r9H1GY758tqjMlTv6FeznX07aM5lzlNqD5JvceT6GqGajIcLF5+39qjHsE K4ui8nEXOiuzs3l+KDvZMQzWVZ3oA+12N36DMaY1oQww5dQHOZLN7N1tOsv0uoOzjbV2 usC2AZ5liIvIgupeI9GfZS4DS/6Dy6uSPbCMwIOXEjDBavWp9d9mMr9DghBt74G8/+MZ UuHTwfs215VCH5V3fBSlhwA5kHIsD+xwFTzLHZOcj2t6AM5FMex/j6AS3ONPeHWbzUew 0/9mIJu+ziRVcLQYc1TUntKYjGlKWuJ9eRmzZ7zonAm+v0mGiySL8z/jHrLzO+GpLGJU l/XA== X-Forwarded-Encrypted: i=2; AKwUvBwC13L9LSkDxD3B8BBzoB/iUSlm5N2TR3xa7ed4euGH6I8G0HMBrVjVNamA9SP304nE33fWha8w4Lc4GLT+@patchwork.amarulasolutions.com X-Gm-Message-State: AFq9FYKmjTa+SQ9wNpV18PrYztCFPGjOZxAu+ABfhxxHG3ycFQtGjBA3 Ze4KtS+yBC4AdPSQaWIXul9awsWUTnmzG113XKC8tgpybUQr4UEsLa++xo8/LSo9Il3bEw== X-Received: by 2002:a05:600c:8b81:b0:4a0:2488:71cc with SMTP id 5b1f17b1804b1-4a35acc45a5mr98848275e9.32.1793000822018; Mon, 26 Oct 2026 00:47:02 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h="ATskLdd0lVqauBqyIO/DkCGOlX6G0gHLTnRDWkf7mNUQaItTwA==" Received: by 2002:a05:600c:a06:b0:4a1:f627:10c7 with SMTP id 5b1f17b1804b1-4a2113db8ffls31515315e9.0.-pod-prod-06-eu; Mon, 26 Oct 2026 00:47:00 -0700 (PDT) X-Received: by 2002:a05:6000:615:b0:48d:f855:d1e0 with SMTP id ffacd0b85a97d-48e3eba976cmr11755228f8f.57.1793000820198; Mon, 26 Oct 2026 00:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793000820; cv=none; d=google.com; s=arc-20260327; b=PsmzbcSmRjhaH9hN5y3HgufvUmoyE6XkmjnAijb7RGoPYiuUBn2d9Mcnzg8OMwDxd5 TrpS8RJ1hXzEyMTv55TIbIWa8XYZDdwA2SEUHxo1ozM89PIe7Rja3Qp3D5uCwx5RhTTw XhcRejSgPCMlLGFH0cExwQaA7OOeWSx+P2izA1vnMMiYYEtSFp1N5yIhvtQ6kbOPD4Xx NkGL9SJeRwR3mkPak0G7qXgUWGvaz+eG2LUTfnvTAxFh3N5kxWxnnbyCWzB9rVsfqmR3 kHZ3NdWVqjYwsydPzKtFOB3nE9PVj0c1w+F0GhYqd+U7B49gFXA5mFrorpt3hM6tZo1H NHpw== 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=c5dii+p2+tXugsvLbD0LiEn9CLz6QjSaElSANvZFz5A=; fh=DuNo64xTz7nMtdx6L1oiX5EIcVk53PIRHos8Onaw5fg=; b=FsD3gXn9udFfIG7Mu/9V3susk7IritflnIh0xdkLb8TB5hWgVizIGcbxGwBHYYI1St EQu4pZmPAinuEREkAd6/xmsRBs3kOFc06NhMENkooDQoK6KWPYNrQeXrwLxGjTfdcFFX s7/nWLstczsOgZBt1SzTMpIl64qMWPRue42VK7GiyBI6nmqouRNQE9k5p3Q2wyuFXrZ4 N+2ERWtU6RGYccNJHbzMN4BOsuGaYr5pKl9N7klwqpbq6+PLQ4CYpeRd8EFv50IbZcJc KDkOjed+Fsag1XiB3Lrs1LM93OXFwY929wl1ZHWZITIb1AZTv05GL2J8K8ad8rSQvPBv BLQQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="WBF4B/xe"; 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-48e3eb9c58fsor689448f8f.1.2026.10.26.00.47.00 for (Google Transport Security); Mon, 26 Oct 2026 00:47: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: AYBFou1zIFdwa4M0Yy3gx+aBnOdtmJ1lpBUjpGFpkJdHxGhb/LSEOGIUYAyQEUDf09E 53eE1iFhEFNuz0SzTHkDYR1e8NVqmvjX0P2gOqnVZD5KiM+hySEEHI4wmLU7vutBPXiXUWaNzcI dZjiafb+vnBnWIGVCOCF+UF/POVFeZZYJyueyk8edI4Az8uG3zoRxhFI29G+nrKUjzfTmm8/w/z DcKrUS84wA2hxp7gNVcBqFgEEqIN07wT/Za0hIjLrBJ+fdkadKCxhh1+pbSQUbtb8nNgu0e60UF FNHYRXpWWN41Joos+fSfLTrXlom5ddNK6acuSTfZExIeTC0+s6WnAyPLVqvHEVWRMOgYq/9dYGQ jMPWx9DB6E0onKfi9DuCJQJkhaXGKq2ekAJa2Lm7AC/HKBEoBGBtkLx3xdBXBgjr2oS3KpQcYJO 7oTA21MjU7PO3WVdpEJEPt5qhejuSmJOj4Iqvf3hXqMwFGzWCpByr3r2cZIttfuGzWU0Ark4MMC UaEIqNcTg8ufWmiBiAaF2bsUo4mX1AyEyachPyRSCfCmAyvm3uubXS93Y40m0gBcJWnCXHznWNb vZD9r+8J4y+D/EpIP2st8GnUqyq3y/wO7BB+ZErtjM62uAkXjvHnubwlLR27Z+lx3R6Yt4x2+NT j22cbaoAWcZcmy9eAeU+FFNIc6BYiXs5GuWeVGVQ81VgCLFX5T/TGSQ== X-Received: by 2002:a05:600c:3541:b0:4a1:fbf8:55c9 with SMTP id 5b1f17b1804b1-4a35acc6a2emr107275155e9.33.1793000819693; Mon, 26 Oct 2026 00:46:59 -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-48e412cc164sm13731353f8f.7.2026.10.26.00.46.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2026 00:46:59 -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 v2 1/3] dt-bindings: clock: ti: dpll: drop the ti,ssc-* properties Date: Mon, 26 Oct 2026 08:46:27 +0100 Message-ID: <20261026074654.3997494-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261026074654.3997494-1-dario.binacchi@amarulasolutions.com> References: <20261026074654.3997494-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="WBF4B/xe"; 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. (no changes since v1) 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 Mon Oct 26 07:46:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4895 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 652343F0F8 for ; Mon, 26 Oct 2026 08:47:04 +0100 (CET) Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-48b01a74792sf1849672f8f.0 for ; Mon, 26 Oct 2026 00:47:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1793000824; cv=pass; d=google.com; s=arc-20260327; b=myYbE60MYC0C1w+c3Hxe+PMolDqodkDfOyqqt2LXl3N9IkdjhoN7dQZmgk7yXEWMl1 9r/o4p1SGA6w1Kezh5AQ0f+vjXBrYfaOuJ1Y7qPnFgSVSP1MrDW/eOCisNqaXhDWNYVi 7uwYdu47R+5XhDu7mgkPQhtvQzfCq8YbD5AY9tb0iRcMDeFy/cy+troJG7soLULBK0sJ IRXmBnnIHE6TsFJbzU4Q4q/LXgek8u4zfcWRe8XE+GAq0UF9nVogiENj/dN/6xr0AHfn zpq2MuglnqS1rHTUFlBmeitGmVCtHLA95IWvRFs7fczeOxT31NF/jRNV6g14w3qqd4Q1 HJNg== 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=q/X7SOwXTkoRasrRwQesUfHcVdC0igPILeC0ntKDM1U=; fh=wsJZG8kfGlQes7yP/2crBd1fdCs6r/QSRE2GZ2kq9/s=; b=Vrj3VMvCMXeQbSEiGU8N/VBagp9EbjlsvTcFCA3HyjY49sJZAtC/ATNhTYOaYXA1nA oMruuqbdmsI2effRdxGC+dW3+w1L1R4fZQLAP5t4R7MbbWjFlscTzDrvwZclq5Cs6xS6 6eYxXibJ6LjlxYbPfcFNeCsuXnR/Q+oPAw37gBcH3SfOt/opf/lhp5WpEFnR9e+Rg34k sRsMCT6VtT3d4Isj8E7eqQlPRqKUiJcvyFTm6T93lfhzBVdVUTiYqm57JT+U2Tb7bnI6 46uXo44m0Aw5q1PAqeGlDoqnY/iFXHifDSW8rk2k9hyv7ZR01fbpE5VsvpeNnxS0yObB 0Mrw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kvCsXuVU; 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=1793000824; x=1793605624; 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=q/X7SOwXTkoRasrRwQesUfHcVdC0igPILeC0ntKDM1U=; b=VpnsX7SRyRnp0+JtJWXVSkvi/XooKXlbm6fS89elpuzQmdMz3ay+or4Z2Rpd9FlDtK uF30ssH4h68m0sxdJhx69EEap1Azeh8CyQ6j1cFvt8cU5x41kezs1WM8+UGzxC/3nwPk wztsf4XtoSOojB7HaRC5oBPl7DBb3UO1fmteo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793000824; x=1793605624; 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=q/X7SOwXTkoRasrRwQesUfHcVdC0igPILeC0ntKDM1U=; b=u+8GcBAnD7VAKNqi2lbYLH89pdpkL8T6Q/jrjUsQSNLVTNZ54kjJQa9hJ7XGKDK2l8 ea26Jn1D1XSLW1UgcaDmO1ouFmFL42jKR7tV5cL4xXVONx8ZX112SLofo7zrCjrSrfTA 2/ohjGyHf1aq8+tN+xcjqJKIF/lI6cgFS23So7j6g8k4GWplPrdG38SiKdRsP5xR1Tdx t6UMd3aCcxqaLhwSQpg3/meRSlKpwgQvTD5np/9GI7Z/WXt6v/wQBJP7uH+y7SQ6e8rq IG8LpiMRXMAbXJeiHhBzGcMjD81PZpy6DSRCFFpkW0KooGo+zEDObXysCy1RIGFujf22 wH/A== X-Forwarded-Encrypted: i=2; AKwUvBz67obzNfgFT3y/P0+D6xHai9sU8Ip/G1xbHO9a3L//sR6VTyMdv3u0fdb/VG/u5/kNYivjKbjg/F+pKlRC@patchwork.amarulasolutions.com X-Gm-Message-State: AFq9FYLN1TflDW56JYmtP/eHtjCQePMGrAwv6ucy79iJLfJvAyZ6rxqW wryK8cFI5LidfRci7cqGaDOMGHqfGpqRwgFT7HbwqG2CimV4qbHvPeG08IHleq3xJzTa8g== X-Received: by 2002:a05:6000:60f:b0:48d:ffe8:ace6 with SMTP id ffacd0b85a97d-48e3eba0602mr8958214f8f.42.1793000824028; Mon, 26 Oct 2026 00:47:04 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h="ATskLddKzw93InvkPx1u8tk9lXAJgzSMxrbPnS4SZ9S/gMrayw==" Received: by 2002:a5d:6f12:0:b0:48d:fd4b:cd96 with SMTP id ffacd0b85a97d-48e370d1cdals2861578f8f.0.-pod-prod-04-eu; Mon, 26 Oct 2026 00:47:02 -0700 (PDT) X-Received: by 2002:a5d:5f95:0:b0:48d:fd5b:504d with SMTP id ffacd0b85a97d-48e3eb9817fmr10544952f8f.31.1793000822278; Mon, 26 Oct 2026 00:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793000822; cv=none; d=google.com; s=arc-20260327; b=k8avHZQVlZMgWW8/Rc11NdlSlRBkLzRslWpnkY3uYQVEehAShDWC/wLy2nFGlgM+b3 Iwseh2Rr9zgdMFg0yqPEPl+UXzPfxdvqHPvcpRA5Z+2da3iQFeaZysOGI/HBS2ZJSnaM oRW0QWspH/FNDUNivcgcFwyMGVLoF589isXTI1rAHHInDu5rpC1nx9NcgB1vdPyrZ8Vc nSTXUk+tnWkmHQpZ2Zx+cAXnMuxeCu4Q0ROseldystkUOJcJrnwKE05p4tAltsrUFuit f/sDh4iP4daSrXVypQJigGkaon8i97f0RZo9/wh4vLin9fmWDAPSAECMxKmNT7S4KYzc lV9g== 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=AyUGw9y+lTYy33bkDqkQyHAnwgp3s7+TGmPupaPsrss=; fh=PbD9/XAkGeXOdmhINiq9gVEkmozRqhY0cRjgzaGu/Os=; b=TsFu1OAirtFcBw7wQAr6vAEOVaTzgEkWCH9jAl472ftGiFEoIpuBe5QZFbmESUcn4H ctOSEtIB0/3jicieLXl+8iYB6jPnD09sO83wQc/LVXvvKoCW7QqoBViVU3YXH2ed8p1C JYe3b2SuKP3ImPy9f23LBMre7suqozp8zCi97aRtYnVxMqhJZ3cxwo0oS89dtx4ym+fv BM63tBMoLzwxRWmAAURq37+loRtAcYEcQfLfrHaq7kZ2ruHbDCRiBdn44uLFP/QXFhLg e7wzOKx6M5ACaZ2p9fjVe9CbZji2EZTlZEyZ9bI2NDZowWvBQSSYPAbb/4ZELX9LDpAt hmxQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kvCsXuVU; 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-48e3eb40f27sor751265f8f.0.2026.10.26.00.47.02 for (Google Transport Security); Mon, 26 Oct 2026 00:47: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: AYBFou1WvXsEpocZveJS3vm9KDc3OXPivRF2ujCUI/C8KiDz1vP2KoOgKrab0MTjbpg t7xePkOmid3NaNXXaEqhAg/SGgZXzfxc9doRUsjpDFrKwX//5Dx3XFalw+6E4wt6I46IT21Ikk8 6W6GnjH2FR6dpmw/2/BTolzXBz+RGBmFlR6Hvr1ZHbuanQQHICu3077aSS7BOrdaYDKfGt0dQgO MYiFyk0wGmH9iKA3Qq8/pWNGOv4qGK/i5Jc55KhBu5andRO7brn10Ci/dQO5gJeVhjatOjHKyWJ hGW22wqI/N8FSh9nGJQuDbmTj3apNHj+vgtAQyrsZz7wxPpgNE7VGVWIc+mJ5fbaXWHs7vslyZf hdyn0D3me911NdWbvQhnGds8Wpb5DXb8HyhYKTuj1Y8ZGHy18VUqVlvZxWpMWIIfGVRbnegxlCJ WmpOuDYeD0ntH1RoouoLs1NYhyXFFX/zHh6i6zSXXYk7LPRSlmcXigyLAbE8taMaMW8+otrwsV7 3pDP/TvsmIzsTaXnW8rZ6GEsn0WWHuoG9A/Go4zr8GOHqgSBY/jDQSPyatfYXcA6zcxtw7Q05j5 1/ey+ReTQrnQLc8e/57PNCao2ct49hKKlh9gBoBrbE+UsCkoVuvb8jATtxoPDUf03Kyqt5b0KFa d6IARzee16HQwIr9CYi4gVRxDB5LxAdwHRIm/n7fAJRFxIPvjY94VnytSQdN92CU3KeGC1Hp04H o= X-Received: by 2002:a05:600c:4746:b0:4a3:59c9:a744 with SMTP id 5b1f17b1804b1-4a35ac8bb3fmr114614925e9.7.1793000821809; Mon, 26 Oct 2026 00:47: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-48e412cc164sm13731353f8f.7.2026.10.26.00.47.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2026 00:47: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 v2 2/3] clk: ti: dpll: use the generic spread spectrum configuration Date: Mon, 26 Oct 2026 08:46:28 +0100 Message-ID: <20261026074654.3997494-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261026074654.3997494-1-dario.binacchi@amarulasolutions.com> References: <20261026074654.3997494-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=kvCsXuVU; 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 --- (no changes since v1) 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 Mon Oct 26 07:46:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4896 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 96D163F0F8 for ; Mon, 26 Oct 2026 08:47:06 +0100 (CET) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4a204ac318asf14129865e9.2 for ; Mon, 26 Oct 2026 00:47:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1793000826; cv=pass; d=google.com; s=arc-20260327; b=FaW0Qh2sIBH2ooja/1sqdzKqwWNQYHfil/n8RyLRpdqLCUk5sphxHXh3Y/Q+x8PUG3 7L1SX2npbtYjOWcXIrZbdh1HC0N8pu1lgbdizf6dsSQ0/SnJbDcE345O+ordaJPPIflQ 5fzeoPvjuidP+KwinW7NZM9OZEfuD6dT4CDwReWydKksZB+5FQe6J2++NXS3WnfTQs4k llfiObVgiEDBWvZ9b4XfGOEktOnqK9gAqW1zDvv8A0hiAXjRTx5ELMlCDYuvwshCy2u5 7s8ZqUsTryYRX98PVXrTaIk/CZ+sk/Hn/jB4Gnf0EqIt7wQm3EYCmvLDxlJygJ5eSQMT 7leA== 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=+3mTw6UMxYxJOXb4DMiuFwLT/ctOBjpVLxLq4/J2yoM=; fh=No9wQuh9hvKervvkJGNMvMtOm6xfRZvOwWd+6yQ+04c=; b=rts5KE+RtRcU9nPlHDh01iQd2kyhgl5rR6cm+PE9O4tTq6UjoUO83e8eBSIirg/+k4 308+vsItzGWKKPjlwq9tvFQrfiDQ9Ytza384WEUgQftYZoLXdHOd6DylrQXTlyWkiLur m7QRNpfnX1enpql2VADe0UpP3/eGP1spvMJ/XNv3IdiIZ1pKLvm3CTO1qA+6pyPYV4Nr c6FQuG8+MGd6MtuzizQwJ994R2a483ubeODA57S9/+SB1RRVtTV0bfThScDt5QlZMDHk bAi9P6td712W93ERqJGRC0AGz9Aay+A0/IBJEsaCbfuRlmZh19SStGBs3pAMYskHI7l7 Pg8g==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eM4XIOyE; 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=1793000826; x=1793605626; 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=+3mTw6UMxYxJOXb4DMiuFwLT/ctOBjpVLxLq4/J2yoM=; b=cykVaURVIJHKZDHGV6B19MTsUHt5IcBc0vlavAIkWYA8K3dzE+3Oy/lguXbz3vixCh iAtUoWdC4RDaf/qP5ZUyQumy4MyDlJY5IQwyjV6uXdF0oJwNSCIPpy7M+0BI+m8ZhiHD WqrTRC1JijGJEj5ChXELdfGQkv/N9bjgutmjg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793000826; x=1793605626; 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=+3mTw6UMxYxJOXb4DMiuFwLT/ctOBjpVLxLq4/J2yoM=; b=CrX6BCq9zLfRYYktR2Vb6gRZpolG8/SdNQmAE5j/azjCzroaMdjUBC4j0UiEKeF/cK lcBSJ/q4hAvls+Gs6b/6GU8mgex6mB8JetjjJujWznqdWllGsuqsW003hNaymtCYJ/gL HIdg+g55aMkzF9bXMBDz6OShEvsUU5QNk/v3KdrDrZU9fmgL2+jaAdcK32zG70fFt9zV bcnR6DKK3cMDfhnpu0gIvzIumkoeNnGcykpmui+qSD08W+XYKppDOUnPBk0d976fX6D/ v9Cl2woBWecgF7nZSY0r5GcMg21zg/7l2qcrD364OHH6afy5/MGRqxdmZ9IqvEpLIbld UWlg== X-Forwarded-Encrypted: i=2; AKwUvBydTZD7rKC8N1sqKNxIvIema1lymfCljusdMQq1Eq0H0gIlZX1IbAdZe1DI7ijh4Mulr6HcxKp8KbyJVpr6@patchwork.amarulasolutions.com X-Gm-Message-State: AFq9FYI4YR+UtSwuzOpbjH1WipQjmP6a7ICWU7ScZpRuNjUBfEHOKnSl 4sX+S5+JTu/4fYvagpGNtkLLsz5wj+VKNyP917/kfS0Dw5Ofx4G+48EIEzXQnH4xxzXdxA== X-Received: by 2002:a05:600c:a45:b0:4a1:e11f:b2e1 with SMTP id 5b1f17b1804b1-4a35aca4bbbmr116307525e9.15.1793000826022; Mon, 26 Oct 2026 00:47:06 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h="ATskLdcluXz5R/QIQ4QqjbkiTbOimfgzflpIgSv3L1FkPw1epw==" Received: by 2002:a05:600c:1c1b:b0:4a1:dae5:1dd with SMTP id 5b1f17b1804b1-4a211601b62ls33771145e9.2.-pod-prod-06-eu; Mon, 26 Oct 2026 00:47:04 -0700 (PDT) X-Received: by 2002:a05:6000:188b:b0:48d:f6d2:9c8d with SMTP id ffacd0b85a97d-48e3eba1212mr11798852f8f.46.1793000824338; Mon, 26 Oct 2026 00:47:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793000824; cv=none; d=google.com; s=arc-20260327; b=dVUUiB5/iOVw8OXGqmigLus/z2TQl0vnKJQmc6Dx9yVI74IL56mxuh0ErFrcj9MotG IkJ+M/h4sEo434Q5MTOakvQYr3AL50YNJM4040pvfKI8NROD28/KXvD3Ndtymy5KYikl hY7oO/EmSx8vsgN3Cdgp4LD5LTikYUSLQYkNDnuDXHiY0aFK2IvmzbS6uOuIXbDsgWsv MzMYlWuE5radt3796ARVRbczUJBnle0AccjFL7roBVJsLNep3xge++3VNaEws7HOo1D4 rcguc4H+veow3SasyY159j9MiTKfE1b+VoRcNJZaFxeLZqmjDnHfUXRiYAja/RKAsrYi Bmrw== 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=y/fMNupjmUFDA4Fs7jz5eM8c/pdIIe9SGMOk6RgTsFc=; fh=PbD9/XAkGeXOdmhINiq9gVEkmozRqhY0cRjgzaGu/Os=; b=bCTnXuhW7axo4Fu8TtXpWxwq/579DEe3xWyg0htSjEjapfZTSCdwHycvMpa5ez9L1F kqPMLdsNtPqESXKYq0Iv44hVQ+eJcfSvNKTMoHr6ja73yY4l0iVpICn2q2Ed2eHCMEEE rvhNZJJvxwDPtQ//gcntTgMHBeRsdsnIQuvb2sB9VqSy1rxyhAmwYnNLHpNUDJTNG6xO TKzjnsnPs6x315EUzcnQlTkmu25IujeWM6tFDp579udmHshxgXLs76dd0hcAvUwDq4Bf 4/ngSD1wxDi2zot7haYQ6fAnMZeFT2nYBVK630U0c2JfrPiiudC3wLXcElI6/v7qvJb/ kMEQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eM4XIOyE; 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-48e3ebc91c7sor674834f8f.4.2026.10.26.00.47.04 for (Google Transport Security); Mon, 26 Oct 2026 00:47:04 -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: AYBFou2Trq7a8hb+jF4eQ5l/zp9OBa9tLovYRTS2f0Caj9MbKVo+njUPfGyqy1j0p4o 6SXG7LKnHw9eC36RPzHsmVdUkopKBzgZYc0kLEAMxtU65JdKzRrZiDZ/VTGqfmBZ5zwaR9+No4z NFqn4SYHEKw57/VeuZPAWbFLFKnUX5RDooTNR4rDzjeAwZKWbmZRPhVXR3TXcmbAZXfmLxbIokP Bu2k1Jux5L3Ra5rPf+vj+R3Qio0/o8CBWXLF+OqJ9YXjEYSsoqFrsFeruEkD12nI8hU66iaH7M8 v4z05UPRlgWddEktdcehJnR+so8+FjJ6CUue9m+sQ+eBlk4eGFVnaUV3S5pXoix9Ne5CiswJNK8 A0aIxBGtUqa5ZzTiRRdLeZlY0CJVjhiJZ+C3N9EPrViyOQmzSj+fCuiK+pwa7suyylbHV/W2Fu7 upqQvPNFnIlN2l1vxcgmQPHlByzRF2/HWqJI2/Mz2n4oP3CyZtPWog3nDkC1HRgZ0h0P58Fi20R 3XND89R0ojJtp4rcSQ0s3m/HWyrSjprW7IjX31NuID9JoA9YF3WzJyYBEby2WdjiIMEurSCuQkD q5Z7ShmJHGpHuSR/BAlzjHuXhTRJ4R8E/7E9r5QEFCFSWsai+zXfXWyZT6TdmTf1XG2Vu2ICGJw xmYRurtxf6S5592JQk228TesGv2/S0DBGcKjEThhl/OD7havMFZHkig== X-Received: by 2002:a05:6000:1185:b0:487:106f:ee31 with SMTP id ffacd0b85a97d-48e3eb8bd5cmr7348794f8f.27.1793000823908; Mon, 26 Oct 2026 00:47: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-48e412cc164sm13731353f8f.7.2026.10.26.00.47.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2026 00:47:03 -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 v2 3/3] clk: ti: dpll: apply the spread spectrum configuration right away Date: Mon, 26 Oct 2026 08:46:29 +0100 Message-ID: <20261026074654.3997494-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261026074654.3997494-1-dario.binacchi@amarulasolutions.com> References: <20261026074654.3997494-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=eM4XIOyE; 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 --- Changes in v2: - Check the DPLL lock state instead of its parent, as the reference and bypass clocks can be the same clock drivers/clk/ti/dpll3xxx.c | 46 ++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/drivers/clk/ti/dpll3xxx.c b/drivers/clk/ti/dpll3xxx.c index 634fe0a1f9fd..16da86fbb25d 100644 --- a/drivers/clk/ti/dpll3xxx.c +++ b/drivers/clk/ti/dpll3xxx.c @@ -690,17 +690,22 @@ 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, + * if the DPLL is locked, reprograms it at its current rate to apply it. + * Otherwise the configuration is applied at the next rate change. The + * hardware supports center-spread and down-spread only. Returns 0 on + * success, negative error value otherwise. */ 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; + u32 ctrl; if (!dd || !dd->ssc_enable_mask) return -EOPNOTSUPP; @@ -718,9 +723,38 @@ 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; + /* Disabling SSC does not need to reprogram the DPLL */ + if (ss_conf->method == CLK_SPREAD_NO) { + omap3_noncore_dpll_ssc_program(clk); + return 0; + } + + /* Not locked: SSC is programmed along with the next rate change */ + ctrl = ti_clk_ll_ops->clk_readl(&dd->control_reg); + if (((ctrl & dd->enable_mask) >> __ffs(dd->enable_mask)) != DPLL_LOCKED) + 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; } /**