From patchwork Sun Dec 22 17:04:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3736 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 76FA840CF6 for ; Sun, 22 Dec 2024 18:06:10 +0100 (CET) Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-aa66bc3b46dsf263544466b.3 for ; Sun, 22 Dec 2024 09:06:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734887170; cv=pass; d=google.com; s=arc-20240605; b=DGOKYjdJlAor52yeAciP5E3YapiriFeNMceJboeV4Fe7Yja042CaniLZcGdCfWExuH O7VuR5I8Pa4Xuos9OoY4Ov1rAm9k+Q0No07iAHdZ/o1r34rnEKwBRC6Ad43Qni495dSi H99Or4dWrcyNzxE1SX1sXGE5tYJgSScu3GfMtf1bhSBV8l/GB4SexhhfMremVKgxJso8 vOLFrnh38oQQGgnTuENbaCM6c19VuOhi9EA5COk4qbK01mquRflD9ZsVV4H/naeV13Gm zhar/HjTAkOUJZ1nP+ELRc7xJ5HRsJleBIE3L+EIX/71fl2aReRPCyOoZq31koVGb640 90rg== 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=Lz8YxRxL+n0uPgTGjSYtrkrdbCPJiKgCbfIMjmqbGts=; fh=TYglSSngIzfirJ+UKTnuA3b/Au/EoK219X5LoYXxkSs=; b=Xuzx40VAqvdLYgetPBsJwA2MGfvBnVFVQBPl8MsqnY0MCk4J/V4YYNEc1JfDsqMvX5 U1Su2KGiX3xz/F7OdOIsf2pO+oubY9crK5G7GBaewZPvGhCYxHHJLG+vr3r/cjE27cU7 MdRQad5jaHeQRmpW24/MUnXSFG3GZm6cafgirXNraasvehl80kK5wQHOSXhZ/rXOgpmC wsYamZJEQ2cHlzhLOs5fmAfL3ohn2BOuXCyZxyZtoty5FloYtCUnAqEwS0NocV5yFYC9 q/+ykgPW0X9jp/CeQb9SqkdzqIpGaOwTcTTtWoWDjvbwvuV8vkMXoyo+CTuZlnbvmDPf Ca3A==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RScFIsJ4; 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=1734887170; x=1735491970; 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=Lz8YxRxL+n0uPgTGjSYtrkrdbCPJiKgCbfIMjmqbGts=; b=mkuuJIck9eD9yHJ2eKyvTDlzSTnrw51Vd7YD8m/Z690jHcnQNhk/tKOrv0tycGK+W4 ZChLZ3i+Ry0XgNtrIHqDI+cOjACuoeVdbvEHyeylOXnvgl/0eGAvB4Ys37uCzoOid/zZ DvplaS28ZoJ8+pzip5u6OWy8QWO7BhmALSLag= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734887170; x=1735491970; 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=Lz8YxRxL+n0uPgTGjSYtrkrdbCPJiKgCbfIMjmqbGts=; b=WRfJAmMT1okhI3ILlBQGHvVdvAHZEeNINsnzCMushE/Y2NtyLZ7C2OoOT4BER56+9a HcAjDuuFdXIjuPihEYXpZe5d5641dmlU4L5LTQaeiOicsFS4WkWtMqnzzzw5yToccKhJ QM25gvCpCdHtHAfpCS7IsEyTa5DRgjuYhCD/0K7nafwem3r7TQoXzHN/Snt8ofSq7xSN ofyFVAyTHo2ROh/62/wIiyvobisz1R00yZFlLei+7Ac9G/FxQV2f38H9tDwm0IdZN1eJ Ax051GXAV/GEtklDbx7AZPfElXumISs3PZyZST9a9MBV+UfUd1uZKYzrufztW2kYVrXL 8yBQ== X-Forwarded-Encrypted: i=2; AJvYcCVCaUxh4EJE1QVv3RauQ3xc090zTEpWhGwOREqWgSqzSX/zyJUOMscjh/aGmApk/KCPyvpdd3MosnsTi8Yd@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxzBMBMGcxaWg8LftsSbulCIbPZbSVI+FvO3Q2V08cdBZXMUX4H gVaS6tnOuX0oPE7pFSU68wnGNNWNMmQKpbp+uhSe/XaiZ9eSgDo3+relONA0oT3nwlmqJCuYjQ= = X-Google-Smtp-Source: AGHT+IEFMXQMZvDmPTCdHV9kAxvQtVEvQNEd/GuENfkpI9xvEuZvzWwMI8ALnzF4sk5ffQgBbllNFA== X-Received: by 2002:a05:6402:1d53:b0:5d0:bf5e:eb8 with SMTP id 4fb4d7f45d1cf-5d81de06611mr22831961a12.23.1734887170022; Sun, 22 Dec 2024 09:06:10 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:930a:0:b0:5d0:e7a4:9762 with SMTP id 4fb4d7f45d1cf-5d8025cb0a4ls831185a12.2.-pod-prod-05-eu; Sun, 22 Dec 2024 09:06:07 -0800 (PST) X-Received: by 2002:a05:6402:40c9:b0:5d1:1064:326a with SMTP id 4fb4d7f45d1cf-5d81ddbf672mr23180352a12.15.1734887166718; Sun, 22 Dec 2024 09:06:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734887166; cv=none; d=google.com; s=arc-20240605; b=JVj+9nXOFuIUtL6hL5pd1PearQLuY4/kFI8awaGxW5DxPlmn9M8yI9HRAbqZIsclqC di1dJUgpoYvAfPAoiHrVA+yCWrgsL2e6AULr4dVyvLAkA7KrnBezFk12hhwPawbnDYNj 5WTXFK0Ty5F40bXYbr2Eb988Bt8Y7XgHo71gyOOigB+Ac0SKkRBq9/Xbq7mtDI3jGQJ5 WTICSTcJnna59WpH/vy76CPxfeK0WVWOQVHA1oxPvWgXb52R5BRHlLbs2NmvV5WNjawf sSJ3+53nffrQIQtjt0JRt2O5NL2r1qVXHIfO0A2bbcNwW/mioI9iM5ExKi798/izKPQ8 wASQ== 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=D27zsP+xnLWGVrxLHgK+E6loU9nNNR60aUGojpIfAP0=; fh=2TL5gdVAJyX/yhk5/AxHrADrCeVz/BiuKBD/sWsuHYo=; b=iYHmOevYA5Ix0y/19yB+MGFSdmNUPKy/97fl1uJveyzsGTUDsGu4kWhKgchqB9gnpQ Z4gdGZXVP+cD0szjVN6iCI692vLDR44tsWJYe1wo1dDRgwZc55WXuuSgDPpoZsBTqvpu 5mUJt78ErVg+5u8CERTRkZ1m2Ylc53mj4yN/Fd33tZDjgOV3evAORuCuWeNzA33sEC+0 TaqZfa7y+GZBexey3SgipORtoZfDakoxnJa0hixbAu5wgkCBsuQAfIX7tr/X7QFmseqZ 9b1DbyiLcGRiOATJCrbp67nAp2pTGjkPtvWND0hiapT6Mwvw4mB8RWIkwAwNv2dhoVnv qi1A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RScFIsJ4; 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-aac0e7f1329sor223651166b.4.2024.12.22.09.06.06 for (Google Transport Security); Sun, 22 Dec 2024 09:06:06 -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-Gm-Gg: ASbGnctMelC2LLxVGbAelRqHSERHcGDiffOXz9X5PkNO/PEepXsc2fwZ7hxoYYbwf+a Qb3+FoGMDGftcAio2U6ZL5/rLfpcZI0fKj6TqDAopxA3g13yr+Tl/KLayysvZy5r+FY0cgUzj1G ZxWfSpSsAQB6Q+Dz9k15rkgZGDzm/qvfFgvrH50hqsiIdMcddya/NEXbOYNMnPop/+pKGKUffFH k/MnrLoRfibu2CWxTn2WdJFX2FcjCf/s4wBDgSZMtdrEJv4LlczxMo5/8/C0KzBKIU8heHKnqRJ nYvNpLd0kmUqfUoOybqHkeE8JLIJ7QgVeiofLNBp+15cyQ== X-Received: by 2002:a05:6402:348d:b0:5d4:55e:f99e with SMTP id 4fb4d7f45d1cf-5d81ddc09abmr22317161a12.18.1734887166231; Sun, 22 Dec 2024 09:06:06 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.87]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0efe48d6sm414056566b.127.2024.12.22.09.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2024 09:06:05 -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 v6 16/18] dt-bindings: clock: imx8m-clock: support spread spectrum clocking Date: Sun, 22 Dec 2024 18:04:31 +0100 Message-ID: <20241222170534.3621453-17-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241222170534.3621453-1-dario.binacchi@amarulasolutions.com> References: <20241222170534.3621453-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=RScFIsJ4; 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 addition of DT bindings for enabling and tuning spread spectrum clocking generation can be applied specifically to the PLLs. The "" value for the fsl,ssc-method property is specifically intended to specify a "no SSC" case, as in the example, when you don't want to configure spread spectrum for one of the PLLs, thus avoiding the use of a method that would only make sense if SSC were being set. Signed-off-by: Dario Binacchi Reviewed-by: Krzysztof Kozlowski --- Changes in v6: - Improve the commit message - change minItems from 7 to 1 for all the ssc properties added - change maxItems from 10 to 4 for alle the ssc properties added - update the DTS example Changes in v4: - Drop "fsl,ssc-clocks" property. The other added properties now refer to the clock list. - Updated minItems and maxItems of - clocks - clock-names - fsl,ssc-modfreq-hz - fsl,ssc-modrate-percent - fsl,ssc-modmethod - Updated the dts examples 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. Changes in v2: - Add "allOf:" and place it after "required:" block, like in the example schema. - Move the properties definition to the top-level. - Drop unit types as requested by the "make dt_binding_check" command. .../bindings/clock/imx8m-clock.yaml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml index 05bc01960045..37cc6a6e89d4 100644 --- a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml +++ b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml @@ -43,6 +43,37 @@ 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-modfreq-hz: + description: + The values of modulation frequency (Hz unit) for each clock + supporting spread spectrum (i. e. audio_pll1, audio_pll2, + dram_pll and video_pll). + minItems: 1 + maxItems: 4 + + fsl,ssc-modrate-percent: + description: + The percentage values of modulation rate for each clock + supporting spread spectrum (i. e. audio_pll1, audio_pll2, + dram_pll and video_pll). + minItems: 1 + maxItems: 4 + + fsl,ssc-modmethod: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: + The modulation techniques for each clock supporting spread + spectrum (i. e. audio_pll1, audio_pll2, dram_pll and + video_pll). + minItems: 1 + maxItems: 4 + items: + enum: + - "" + - down-spread + - up-spread + - center-spread + required: - compatible - reg @@ -76,6 +107,10 @@ allOf: - const: clk_ext2 - const: clk_ext3 - const: clk_ext4 + fsl,ssc-modfreq-hz: false + fsl,ssc-modrate-percent: false + fsl,ssc-modmethod: false + else: properties: clocks: @@ -124,6 +159,9 @@ examples: clock-names = "osc_32k", "osc_24m", "clk_ext1", "clk_ext2", "clk_ext3", "clk_ext4", "audio_pll1", "audio_pll2", "dram_pll", "video_pll"; + fsl,ssc-modfreq-hz = <6818>, <0>, <0>, <2419>; + fsl,ssc-modrate-percent = <3>, <0>, <0>, <7>; + fsl,ssc-modmethod = "down-spread", "", "", "center-spread"; }; - |