From patchwork Wed Nov 6 08:57:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3622 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3428F3F14C for ; Wed, 6 Nov 2024 10:06:13 +0100 (CET) Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2fb5bd1c324sf28520341fa.3 for ; Wed, 06 Nov 2024 01:06:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1730883972; cv=pass; d=google.com; s=arc-20240605; b=lV2eQ3d6IddDMWsN9C3yzSVK6egSC71WjhfwgenJ3wrzh++wBJcztJlSWF+vR1HHkF TvY8eqU+R18O85N0IpgF3aGADlE/dNfJZXVJ5fR9oZ7JtcJ7lCthqEdewRMhnfqJnCZz DmybTj6FFayeMRQXAQ727pIwsAcungdvFScWxwleWRc6/6+QSgh0byircNnq8BpM/+8I KvFiOJreCOBtc5gEp5budqDNbVm/4fQ0CAWdSWz6w+cP9q6fWhqmipbJoqWyQ9lVZG0z 2WQvM31q1CbAiNc7w55xFIOOtojgitfEKxchcT6ZGmh7v7ZdcdCvA8i05tlWVi7SPn2Z +9LQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=gBrom9i9pGsV7o7pojwiflszqoArdJP4I7MkrGWDWSY=; fh=NKCigd9oYImJSghBAGUzDlVxh45dxmsEQiToSTRDTP0=; b=NTH3Rdv9pJCQe6byBM6BNBrnWx/AUd6Nr4fmlaPPqupw+EXaURH+G4ZFVPAGecNlaK xz5Tijy5PNUTZM8sEmHKp5UJYjv9ewCDXxH+l/WCesy1Yz/6XH7g44sH5Jzr/J+807Ok V1LR4ifC0YucUdj7ZmkRg64U8rh8LixF2nNCqzLEnn1TAM3Y1eX/nYIEv8dU5sVU4Q2y vzkGIxCQICEMAFGe2AOMqbsNTVAq6xBedeIafiyJ4IW+mIgepE2IZf4UA/K4LDlHAP1I fGJyUeGKb5ZaHyIveFRb3383ijGnhwPtWHtmQKKQla65NPHFzc2YN6rPEmhl1U2ISyjR /PHA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="q49/rzgc"; 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=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1730883972; x=1731488772; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence: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; bh=gBrom9i9pGsV7o7pojwiflszqoArdJP4I7MkrGWDWSY=; b=iavMK693gA9mueEjXkr5EAQChoKSNCQ2OU/wUkqAtUktpGijEfezqiseL0CAd+MZHx vGQl/N9Lmeb7QeE3+/ZswlzJYPoycZKgzh36zko6n4z6S6OParhZCyMwE75YI9XOAFb0 5mTdQGiZmS052a6JnhgedG3nymOdWfbKuyAPo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730883972; x=1731488772; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gBrom9i9pGsV7o7pojwiflszqoArdJP4I7MkrGWDWSY=; b=WvTilrMzQqX9YOMfZ/inTiyZz6Y2hns7JatiSxXLb6MnHNA6+MIuLnx2pIcMfr+pRr bxteD7iUVrSc2OUEtZn3O4hodS5TgnonUnvcvWRKAO5PHfPeZ/jq9eW0QgIc1J4Ag3cs qYaiwoWQ5HtKRuRcUT31dVi8ZGAR8nzHMsNKj+shQfJ1Qqs0CxRc/WplMmYr7SJ2+nI0 Acgvnendhv4p3nXpUVPAADcxJzFfljDuOJBu4gECQadOS0a9jiJaePPMyYusO71LCQJh ywEYM56rrn4yS+xv505nKQBM8VSIX7fgfF0U2DwtJBK1t6Abm59VHtZ+pKMXAIHc2nJb X64w== X-Forwarded-Encrypted: i=2; AJvYcCVAL6bnfRzk+s1SJlJ0VkDHhi6StfnPLwVIgNn+QUaSohqLjt4xiEM8Xp0iwQtLanrHgFE+MvxQljTbzPAt@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyIwWor3nlUmvWm9CIGMvTB83vDoLCQMH55Pjh6aHP59Ycf18Ce /VMVb2kfFEAAOB/yKJ5/6uY7k+hL/mZGTTjswdXYmVMcGWQO64p1dNAfwtEPpeJaAj6tdtvmpA= = X-Google-Smtp-Source: AGHT+IEZG+3xbCL487px55/IH3SdRseNOmyKEEGgD9yDKccSuMdw593YiQ4gAdPutW1DuZRKI1qBTA== X-Received: by 2002:a2e:bc83:0:b0:2fe:f8e1:5127 with SMTP id 38308e7fff4ca-2fef8e15294mr44226831fa.9.1730883972158; Wed, 06 Nov 2024 01:06:12 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:758:b0:5ce:aed7:a90 with SMTP id 4fb4d7f45d1cf-5ceaed71228ls707629a12.2.-pod-prod-02-eu; Wed, 06 Nov 2024 01:06:10 -0800 (PST) X-Received: by 2002:a17:907:6e94:b0:a9a:67aa:31f5 with SMTP id a640c23a62f3a-a9e508aaa56mr2124789466b.10.1730883970187; Wed, 06 Nov 2024 01:06:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1730883970; cv=none; d=google.com; s=arc-20240605; b=NtCSsyj0Nb0q1FrmtzlIKpZzFLXi7OoFFMCkRG00EsyCIQ3c+mbIrQEU9NgYYS5/Bi I79XFguUI8gq9yY7G0LpNoLpfxfAZ1iwV+pIZh5J+4McKvjHScz2GGOTE7+JhpxnXHJj U8HdID3J743RRj+QOXAhzn947xHv2G9jchctAqhEGcYkAQ3EkhOmOLHHpNQ5/I+zk82d R6ZJwLba6teehxjlUHk16eO1wDHE15aR3nKRmaS+mSgdFk82/zNco/UpGN3kEsASNY1G O1WByGDEGPTxe1tzfZCiGOzwCYsgqwiPHrUr7QOKo5pc8tMtS3W26ft+nmER5oG4OpmW DavA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=QrNsJPPKHO5Lk6rFyymH1MtDjL//mpL7mQleFPtlyis=; fh=2TL5gdVAJyX/yhk5/AxHrADrCeVz/BiuKBD/sWsuHYo=; b=MCBKogxEMvAXSv7a4SRTRFQrsHeeGuCNgntiaeVnqGPs/89vRuEviHjIFvt3WMUqPW RVrFeaI4SY1SO5M/AKUrX29rcM6fi2vJw+1CsTmTNizqVWejtENMErKm1xX/t3rj5BVn qy2wWOE50k2yLHBeES8tY3wGT57uN6UUuD8aVMV5xicGOeGwG4JxjzhRf1VMbhm5sfy2 aHhm9MC6/z5HmuS7hi5cSLaoY0p4CWdL08/kL+LspW3aCbkKrE3hW5LDjrs5vUkLkTa+ IpzM8zeeX1vZhCGJeWVnTwox0g+H4UWrGIai9Zfy+jLgtqHyFBrVMbYgDphdqv6jkAfg 6V+A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="q49/rzgc"; 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=pass 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 a640c23a62f3a-a9e565674c2sor577866666b.13.2024.11.06.01.06.10 for (Google Transport Security); Wed, 06 Nov 2024 01:06:10 -0800 (PST) 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-Received: by 2002:a17:907:3f9f:b0:a9a:2afc:e4d7 with SMTP id a640c23a62f3a-a9e50b948d0mr2311624866b.44.1730883969647; Wed, 06 Nov 2024 01:06:09 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:afb5:f524:6416:8e3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9eb17f9422sm247781366b.139.2024.11.06.01.06.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 01:06:09 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Abel Vesa , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Michael Turquette , Peng Fan , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , Stephen Boyd , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH v3 1/8] dt-bindings: clock: imx8m-clock: support spread spectrum clocking Date: Wed, 6 Nov 2024 09:57:57 +0100 Message-ID: <20241106090549.3684963-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241106090549.3684963-1-dario.binacchi@amarulasolutions.com> References: <20241106090549.3684963-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="q49/rzgc"; 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=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" 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 patch adds the DT bindings for enabling and tuning spread spectrum clocking generation. Signed-off-by: Dario Binacchi --- Changes in v3: - Added in v3 - The dt-bindings have been moved from fsl,imx8m-anatop.yaml to imx8m-clock.yaml. The anatop device (fsl,imx8m-anatop.yaml) is indeed more or less a syscon, so it represents a memory area accessible by ccm (imx8m-clock.yaml) to setup the PLLs. .../bindings/clock/imx8m-clock.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml index c643d4a81478..7920393e518e 100644 --- a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml +++ b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml @@ -43,6 +43,40 @@ properties: ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx8m-clock.h for the full list of i.MX8M clock IDs. + fsl,ssc-clocks: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: + Phandles of the PLL with spread spectrum generation hardware capability. + minItems: 1 + maxItems: 4 + + fsl,ssc-modfreq-hz: + description: + The values of modulation frequency (Hz unit) of spread spectrum + clocking for each PLL. + minItems: 1 + maxItems: 4 + + fsl,ssc-modrate-percent: + description: + The percentage values of modulation rate of spread spectrum + clocking for each PLL. + minItems: 1 + maxItems: 4 + + fsl,ssc-modmethod: + $ref: /schemas/types.yaml#/definitions/string-array + description: + The modulation techniques of spread spectrum clocking for + each PLL. + minItems: 1 + maxItems: 4 + items: + enum: + - down-spread + - up-spread + - center-spread + required: - compatible - reg @@ -76,6 +110,11 @@ allOf: - const: clk_ext2 - const: clk_ext3 - const: clk_ext4 + fsl,ssc-clocks: false + fsl,ssc-modfreq-hz: false + fsl,ssc-modrate-percent: false + fsl,ssc-modmethod: false + else: properties: clocks: @@ -101,6 +140,8 @@ additionalProperties: false examples: # Clock Control Module node: - | + #include + clock-controller@30380000 { compatible = "fsl,imx8mm-ccm"; reg = <0x30380000 0x10000>; @@ -109,6 +150,11 @@ examples: <&clk_ext3>, <&clk_ext4>; clock-names = "osc_32k", "osc_24m", "clk_ext1", "clk_ext2", "clk_ext3", "clk_ext4"; + fsl,ssc-clocks = <&clk IMX8MM_AUDIO_PLL1>, + <&clk IMX8MM_VIDEO_PLL1>; + fsl,ssc-modfreq-hz = <6818>, <2419>; + fsl,ssc-modrate-percent = <3>, <7>; + fsl,ssc-modmethod = "down-spread", "center-spread"; }; - |