From patchwork Thu Dec 5 11:17:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3705 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7889F3FA09 for ; Thu, 5 Dec 2024 12:20:07 +0100 (CET) Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5d0e56a2cf8sf546937a12.1 for ; Thu, 05 Dec 2024 03:20:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1733397607; cv=pass; d=google.com; s=arc-20240605; b=iAB5nmcD+edJQjHCbsg1nSkRgEAZSWCAcLBnysApx/kP5CMapktuH0g39Y8JHnR09e +7Z0+F2zxypOr2isI9knqqkWOUPaKMhKxhty2iOkayj6l5Z6aYwx/d4v5ZRJdwKKnotF WI9E3t5RH1oaMZa3fCt/p2sB4H3Pjsa7EJS8pDZHv6zYLsd+BtjP3P2/LJH1Mm5CEjnN KIsIr5ViQ9/Hu/XCRT6xACGsuC4RAVRXWRe1VhJ2Hu4/sewDwG+SGraSVCi0KEo9lXsE l2hAsR5JwTkiatWsudZkxPmYGCOh2If/NCtU9QCL4JPyv9DMTU6qwgU4oFt6R/PQ0G7z w6iA== 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=nRYOJ5uQlSvlFhsyr1XT/cQuSTRIQKH3069vCRoEdtM=; fh=bWJn2ZKlJU5yOYW7OInNt0CgERWMN1k10LgwqYdYflI=; b=WMF3VbywLxQema3q8yyJv1A1U1ITDDIf6f1851qTEsUvXDVTgOgVc+hdqZKdFbbZzX hFWVin9N9pDsaIpTUiKF6WN+gijVjjhJaNvVCH8u3qtBVWAtan/mxRmUWGyHN23/Wn3Z Vpvz6sjccWQz9sFjGwEft3CSZYu7hTG5CDPG1ajdeIpdVTNcL+A+stwIU0hrE1Tgy4xz XttiAraDz997Pil4kokvQPJL/Qdkiy1qyemprP39Pt0NaqckVPIhvc4FmLMfaBcKMtGj tLrvk8/reFaLQpAEiVPWE7ywXPxIUo+0g0nnl6L4RqOe5bWDm2jUJgDcLf6Bz3lfgKCZ vNmQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VQPNLVZN; 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=1733397607; x=1734002407; 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=nRYOJ5uQlSvlFhsyr1XT/cQuSTRIQKH3069vCRoEdtM=; b=iiuIbnayQToLVyq3Z03uwhIZi5ZSUlWeQ1I7H8tQi+ujbigAMLlTcqaOYW02H3oFzH zLlv30zT4PjmhcKUB8G0+GZtvgvqcoGQthGHo8dJmM+n7kcPuPE+k9FbZg7QTfRcRESa uXD90NOUEkDo6uJcxtdgihMygGRH8TX2l9BM8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733397607; x=1734002407; 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=nRYOJ5uQlSvlFhsyr1XT/cQuSTRIQKH3069vCRoEdtM=; b=rATkpuDaaJSdl0vTUzy0bUUVmunBWPcSlk8TGsrbGYn6WkVJMeXkPP8kNySkBrfLws fnn2N/j5qexJyQyrnA/101yzyPsjrGqF71Q3PAQpvsIJy6hDVWq+ZBN0RoWhb9QS/fym uVbhC5YGNG7QZpV+eJ3mqmWryAXC/9Cm66PFDVChDj/Hvt4KARkAoOCXwgWDz0rXk7kR EWi4hJ+4S72VVxLO/+eBRtPnBsa+2AcVTxV53xKYhJ1JY5iYJAWPMxWV+Dy1f4WWymMG bNJiwz9BJArm5kqw6f2r+6TSyYpgWMgjMWIVJHsIdnM26yb72mbsT511p9vW1F6tki/T fwsQ== X-Forwarded-Encrypted: i=2; AJvYcCXtTIWnv+PrKRMzC42MXriD6qVaDEE5xJAPO/u6ei27IkxtrJtwIDaFVQu1kfukpnH0wIvL/HN6tDYqJcUE@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yy7FrlC/vgPtOKhDR7YETcoK344Cmq3wkCiG8bRtw4CUGHOvEv6 QDxG6GQL7KTLp+RcPXl3L4RhS7aTiLQJPy20d1Uqh/8XCRuWdfPgSQ42kGdy27GYJA== X-Google-Smtp-Source: AGHT+IEXcNQMj9HYfgh+Y0RSydGE+DQPvYP/Zy1x2yTSwTun+z70dLZgxJhtpMvAo6QXhZK/kK2FoA== X-Received: by 2002:a05:6402:4001:b0:5d1:2631:b897 with SMTP id 4fb4d7f45d1cf-5d12631bb8bmr2079891a12.14.1733397607091; Thu, 05 Dec 2024 03:20:07 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:a458:0:b0:5d1:22ba:45ef with SMTP id 4fb4d7f45d1cf-5d125008eeels412555a12.0.-pod-prod-07-eu; Thu, 05 Dec 2024 03:20:05 -0800 (PST) X-Received: by 2002:a17:907:7808:b0:aa6:24ff:7eb8 with SMTP id a640c23a62f3a-aa624ff84ffmr171881966b.7.1733397604897; Thu, 05 Dec 2024 03:20:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733397604; cv=none; d=google.com; s=arc-20240605; b=U77aOdH2A3X7EnE5yyzABQeer2NupjbXKKkm5bnJI0rNx/8FIE+ub+MiqYLtwOIm8E IC0/XC7ABu/YRB9xdStcmG4UglLbfg/XIwEIS38X+GKGovPAcNaXYXtl00zkfbJNCX1X I1x+v0J/IsG1uHb5dCFZJX3zX8Wg/FxYOsvPkqkU/EClMm45ht/tR5cW3t00j9mmW/oF Qz6EdUQeaHv4o9NK8TJtZa53NZxZaEefDXB1g1vb8JvGT/QAZaO7P60l7ALnuorpcQSJ g2XuRNmVgCTBiXiXdSFuPYZ1G8tQ2Zp5H41hSL0GgQnG5baV3IhPRqORs53HZ+NvYxWM MrnQ== 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=8qxAaFLk5+E1lAMIL+qkYRoUyf16X1PKrF8INezZ3F8=; fh=2TL5gdVAJyX/yhk5/AxHrADrCeVz/BiuKBD/sWsuHYo=; b=CiHnqh1Ojmugt/n5HF7LjnhP+hxEFEheQRd4k4s4kk8RW8sv83imungtl3AvMsUhjq 0v85yhHnCIlEEXrxWAo8fMuIkHsmBJiAX4yxYlNpSlHJNd/1qjjwz51fhbTwOw8j/YzB 3b8RUBNubZid3EVcp1LIvmd3BC2IfftfGJ32O7EQOXvDfxN/+C6H1u95PNeoSVrrFcEm tFfB6nDByeXICGrB6hDs6kQ3BGdvjEwhkBlcpg6w89DuCzc2L/cHd0oHvibJIheJjaJk BJOXIdwKWNRwLOTEZi2X/EZWegC53UV/347NxnHdSwKJWx6P/DuDQmalloP2mUbliO6L NKOg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=VQPNLVZN; 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-aa625f63303sor43553266b.11.2024.12.05.03.20.04 for (Google Transport Security); Thu, 05 Dec 2024 03:20:04 -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: ASbGncsXeng+uvpQqdRdqjDsnEaZim/CXd985PE3rJhBTDsw5uEabkBhl0vixhGYpHW i8VHM8cajP0vr4rI4erd7Am3vcKQ6qRLyt0PbS/UxiKGTRzEtBzMjTfIfeprU1BLZX8RgebDshl 4+sKU1xs+WWQbSxKvsL616WeK1UD4SUhGxLm6xoPUKUeSXBtM8myf6wf1M9O/8Q2rhr9FQOBZKW 7xp4lkLVCbzTK72+6EV/HykB6UDCaDLb8DNKcGlxXrAcZ80zfxj9DKLakkxESwcJHWr818tnfw3 HI8AkryqXaeWeNU8fSpY8jkKAJGuJOxD89rGgmK7kgSlmg== X-Received: by 2002:a17:906:32c3:b0:aa5:43ee:2ff6 with SMTP id a640c23a62f3a-aa5f7d011c6mr812629366b.1.1733397604406; Thu, 05 Dec 2024 03:20:04 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2001:b07:6474:ebbf:61a1:9bc8:52c6:3c2d]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa625eedcd0sm77505266b.87.2024.12.05.03.20.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2024 03:20:04 -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 v5 15/20] dt-bindings: clock: imx8m-clock: support spread spectrum clocking Date: Thu, 5 Dec 2024 12:17:50 +0100 Message-ID: <20241205111939.1796244-16-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241205111939.1796244-1-dario.binacchi@amarulasolutions.com> References: <20241205111939.1796244-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=VQPNLVZN; 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 --- (no changes since v4) 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 | 77 +++++++++++++++++-- 1 file changed, 71 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml index c643d4a81478..83036f6d2274 100644 --- a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml +++ b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml @@ -29,12 +29,12 @@ properties: maxItems: 2 clocks: - minItems: 6 - maxItems: 7 + minItems: 7 + maxItems: 10 clock-names: - minItems: 6 - maxItems: 7 + minItems: 7 + maxItems: 10 '#clock-cells': const: 1 @@ -43,6 +43,34 @@ 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. + minItems: 7 + maxItems: 10 + + fsl,ssc-modrate-percent: + description: + The percentage values of modulation rate for each clock + supporting spread spectrum. + minItems: 7 + maxItems: 10 + + fsl,ssc-modmethod: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: + The modulation techniques for each clock supporting spread + spectrum. + minItems: 7 + maxItems: 10 + items: + enum: + - "" + - down-spread + - up-spread + - center-spread + required: - compatible - reg @@ -76,6 +104,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: @@ -86,6 +118,10 @@ allOf: - description: ext2 clock input - description: ext3 clock input - description: ext4 clock input + - description: audio1 PLL input + - description: audio2 PLL input + - description: dram PLL input + - description: video PLL input clock-names: items: @@ -95,20 +131,49 @@ allOf: - const: clk_ext2 - const: clk_ext3 - const: clk_ext4 + - const: audio_pll1 + - const: audio_pll2 + - const: dram_pll + - const: video_pll additionalProperties: false examples: # Clock Control Module node: - | + #include + clock-controller@30380000 { compatible = "fsl,imx8mm-ccm"; reg = <0x30380000 0x10000>; #clock-cells = <1>; clocks = <&osc_32k>, <&osc_24m>, <&clk_ext1>, <&clk_ext2>, - <&clk_ext3>, <&clk_ext4>; + <&clk_ext3>, <&clk_ext4>, + <&anatop IMX8MM_ANATOP_AUDIO_PLL1>, + <&anatop IMX8MM_ANATOP_AUDIO_PLL1>, + <&anatop IMX8MM_ANATOP_DRAM_PLL>, + <&anatop IMX8MM_ANATOP_VIDEO_PLL>; clock-names = "osc_32k", "osc_24m", "clk_ext1", "clk_ext2", - "clk_ext3", "clk_ext4"; + "clk_ext3", "clk_ext4", "audio_pll1", "audio_pll2", + "dram_pll", "video_pll"; + fsl,ssc-modfreq-hz = <0>, <0>, <0>, <0>, + <0>, <0>, + <6818>, + <0>, + <0>, + <2419>; + fsl,ssc-modrate-percent = <0>, <0>, <0>, <0>, + <0>, <0>, + <3>, + <0>, + <0>, + <7>; + fsl,ssc-modmethod = "", "", "", "", + "", "", + "down-spread", + "", + "", + "center-spread"; }; - |