From patchwork Sun Dec 29 14:49:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3781 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 966F63F174 for ; Sun, 29 Dec 2024 15:51:00 +0100 (CET) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5d09962822bsf996764a12.1 for ; Sun, 29 Dec 2024 06:51:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1735483860; cv=pass; d=google.com; s=arc-20240605; b=A20qeQs21f8ioo34CJ4vy/GYzV+Y1aS/XPqsFlxcwOyPyVxdHCqsLvTg/QY8fXqcO/ L++uxbgl4Oz0Lrj0N6d55Bm/Py8ZW+Lwax/fIksYLF1f9KCx2BTmQACgDGwdGkv/vvdo QNsKzf1R0hAOV2efgJkaclDpVFGsNoBUleKEYqEuoYaQsl6fzQit0fummaSF+TNC8Q6A pboe2a1z9p+wgsmIjackq8xOeMsX7bysXvN2d/EnUv3bu2Jqnr4rq9pJSPymMqFmcBO1 6r/FwRVR1+wePEqbDGe0YeMt88+GxolsrTKcPj5K+J31FscubKoyEaGnS0Az41HKmpik oj4A== 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=dh17WG/DotZjuADdXKo+GXjcXtxj3Dpnq6DBcU/fqzI=; fh=Xh9owvwHKz6bG7kxSNDMzVBU/CvaJJ3Q0Zsk7SBcCMg=; b=Dh7j9P+Qd0/kXoJHj/pShhYxS4ufm6Sg/kv5N9WJ3r0ISnOHolFmLcKNCHI82VEpB7 kQIu/MTcCMmcPoqJu28yDIh9xKG6h5kR8nb+T8gTM+Cio8XSpAlTvWQK5vrSbZcrZGXf AdS/8sVgcRORIjjHRKiELwKGPcdmTk66Nwa1mny9LMGraSKvfQ93Q9FaaxlQ+V7hyi1Z HAgrKyKjLLHXLleoz7bPgAGFK2yfWl+lszsXEHZIO6fR8ncAA2Tm4FTLzkwumLa1ZUYy lxmFGeBBDIdZxMgA2g8nFgVAVZV7fbABoPrGrCkVVPxYVNI6wtFka/EmlcIPrsB8o4ZV NUPA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ln08x9CR; 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=1735483860; x=1736088660; 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=dh17WG/DotZjuADdXKo+GXjcXtxj3Dpnq6DBcU/fqzI=; b=IYamHtSgVytRL68wBkgTMUvSfRnJrJpgYY347WjrlvQW5j50RE4jJH4KzQ2SLQKhez tcnRvpd27RDEWEXjaAUdKwvDd03w1G3AaXwlEpom/eXaol29IwKoQP91ZcLeI57Vci30 JakkFGgzpKoNk6af1RXyhZV5V+8rszBpdNc/Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483860; x=1736088660; 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=dh17WG/DotZjuADdXKo+GXjcXtxj3Dpnq6DBcU/fqzI=; b=oErwTaaEw85NFrkCW7BrD+BkHEFtVcz3gf58jor6IZr9peg31FZcAzdBhDr5uUBwPm lP/Bmqv/p/5dbtKXkwKrddbhMXH6WUuB//AYj3rt0X/bACEPxTIEvpF9i0VSHR1sleEe zbe5437ERQD0xj9IHvNpd+sS4O12fb/BuyARJLyeSELY4CqtQg3Vks9kh/4aOIJRhgGn CLBtvCtYVy9vfLmmEiCN9D+5ra6iSlBxiJMKeIGY0uplY0CL4wwPP/zAI8JapC9vYkJV VCD17nqpaRr9YPMbVLlFekQQhoZWhpNP1VOPkbw5OWT2aUEpdvjEUavk4KTDztp2HdmD Doow== X-Forwarded-Encrypted: i=2; AJvYcCVLxP1kWH0xbeCDKr7F0Ude0feYRKpeVHC9Y7RLwGUJRYsDnNa1epPG0FnBjweHI3F82j0LU7X0+xAOnjW7@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwNDeii2hlUxY2ZAVbckQD1pQFRW71hSULXxxRR5o6K3pYd0Imf kRVae32xtx8lT/BuEL6HdCUOZS6lnK/xO2qPnqtgrtScmBE1Lh0QBQ1DmPneXD0sAg== X-Google-Smtp-Source: AGHT+IHYMDXlslF3zFdR7klrpOeED67USru2R/sfQhn1NdEMzbUVLV+HvU/5zzejfQzyICq+447ftg== X-Received: by 2002:a05:6402:2345:b0:5d0:abb8:7b2 with SMTP id 4fb4d7f45d1cf-5d81dd54381mr28181251a12.4.1735483860256; Sun, 29 Dec 2024 06:51:00 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:bb0d:0:b0:5d3:cdb1:60a with SMTP id 4fb4d7f45d1cf-5d88364fe0als190974a12.2.-pod-prod-06-eu; Sun, 29 Dec 2024 06:50:58 -0800 (PST) X-Received: by 2002:a17:907:6094:b0:aa6:4494:e354 with SMTP id a640c23a62f3a-aac3354cd1emr2164011766b.42.1735483858444; Sun, 29 Dec 2024 06:50:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735483858; cv=none; d=google.com; s=arc-20240605; b=Mykh8zs1uyegrCypjOCa/Dbi6btiDtB5u0Cgm/hn6OAef3PJ9CcbYe5gdsnlE65HdQ 68pxPMnq1byoS+/vxBZX/XGu9y984FTNJieNde4tDhwzzlBsvmgMta9AIbqvubKrobA3 kSdYeOHlSuxH2HwugHf28FDvtj2h9t36j99vp4vaIJakyYFENvxWUzqOpWnBUNuCln5m W06ORmj7XWy/Z524Fk70EqyMdWRXyZpD1o4L+fQC/An7KckPoUldASSy7ZYsGPwVsyhb wT2ggAnDK+EY94UPlXLHfyZ+JoFr4PP5Du+AanwxNFB1JoboIADEar0Oud6aCaGQGc5N UXZA== 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=aXOt2DStfgxzjFuE8T9ZB+qgm2XwGSAXjcE/H4FasAs=; fh=wKAqkX/zh+QR+hrT1E54GP1Qc3c+MR/u1426t/hKzhc=; b=CL9iq5Vg6Ep6IRcxm25AMVbLHfN+HlJEf18ket4p5yT1bRsorRsIL1crJe/Kkd9rBA x9QILGGnGLSM9cjPJy9J3s3+w7HRNTrY0idTwaHktRPAxWulKdink5xiB5VMJqdEJPAE JUwIZiHyGmJUiGn+bSXL7kWGGU6ueJcDsxKEEF+pK91ppTczTklAQ15qnjrn0NWGUle6 b9/R93W3vDCD2rdUuxG73CfLkC3wS0csNM++pvUnnW0Os/RtVBxdaKEcevXFI6wQGLKv 3n4ibjJcNAjVwbncqSTNgBbtN9pcn6mdRmp/69ZdRRfenrsjvqUtqJwM1Le0NlbZ/SL8 OU6Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Ln08x9CR; 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-aac0f015acasor647084866b.19.2024.12.29.06.50.58 for (Google Transport Security); Sun, 29 Dec 2024 06:50:58 -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: ASbGncvHYNPD8irYLswekeWpBprZRoEbmHvZc4893BviA/7HJvr6FoJutenO8CPMd+a VXKge+9NqfOaD0MEweweoqof91l3qr7I9YyS1C3sAiMIDbADASbwzWLWF5FHZR6DyaX9UmTEN7W jWg0NW3kYbWLiNQ9VYQtgSXPrwgsMrP5zho4/qyJNJhAS78TNJdumXKgtiN8erWuoq2EPrlSFVy yzszJE/q0fCSqa8duKzOWydVr+oBne8C0SoGM+8on/vuaIp2WdW9YlNrLklDOB5eeghxMoCvU4o uwn9vtdnl0tfPcMl+dBRXA== X-Received: by 2002:a17:907:9621:b0:aa6:6f92:74b1 with SMTP id a640c23a62f3a-aac2ad7fa01mr3093170366b.13.1735483857971; Sun, 29 Dec 2024 06:50:57 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:57 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Krzysztof Kozlowski , 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 v8 16/18] dt-bindings: clock: imx8m-clock: support spread spectrum clocking Date: Sun, 29 Dec 2024 15:49:40 +0100 Message-ID: <20241229145027.3984542-17-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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=Ln08x9CR; 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 --- (no changes since v7) Changes in v7: - List the PLLs to strictly define the setup order for each of the added properties - Drop maxItems from "fsl,ssc-modfreq-hz" and "fsl,ssc-modrate-percent" properties - Add 'Reviewed-by' tag of 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 | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml index d96570bf60dc..d347d630764a 100644 --- a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml +++ b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml @@ -43,6 +43,46 @@ 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: 1 + items: + - description: audio_pll1 + - description: audio_pll2 + - description: dram_pll + - description: video_pll + + fsl,ssc-modrate-percent: + description: + The percentage values of modulation rate for each clock + supporting spread spectrum. + minItems: 1 + items: + - description: audio_pll1 + - description: audio_pll2 + - description: dram_pll + - description: video_pll + + fsl,ssc-modmethod: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: | + The modulation techniques for each clock supporting spread + spectrum in this order:: + - audio_pll1 + - audio_pll2 + - dram_pll + - video_pll + minItems: 1 + maxItems: 4 + items: + enum: + - "" + - down-spread + - up-spread + - center-spread + required: - compatible - reg @@ -76,6 +116,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 +168,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"; }; - |