From patchwork Fri Dec 27 16:56:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3760 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B379543434 for ; Fri, 27 Dec 2024 17:58:00 +0100 (CET) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5d3bf75bbf1sf6532609a12.1 for ; Fri, 27 Dec 2024 08:58:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1735318680; cv=pass; d=google.com; s=arc-20240605; b=PCSkn1w1wDKEarXKjZprZrS2V2tKr7QybkahM8luWJXP0tZ4R71ruisFglFdsGkUBe IVTow4KEH/bciwwo3je61iL3hCuB0i133SWJwoXYBmec+ElkMJ7E8Wmksn231EPl8/aW 2ty+p1Lc9iQLkKz6nQbCNpOnGrtBFSCzX0WwKNbF+GXujiEhT2bk7F40r5G7YfZWzJsX mrQyDS15Hae2fU1BBfq9wdnGghIdKdsxdSwfPOl0Y9B7TJXWuWwxE+2rxr8POEqTVPTM H6c19M4saLGSH30NhE14tFOPWTVYM6PA/jf7bb7P4M1ZGyeQyYX5BMiEyQCA/mEBVwjQ 23Rw== 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=5mzsbCWIn5qQtOJBFFhQDmIKNtqORVP2WuBSv2B2VmE=; fh=U9/KFz08gJiptDN4rh4b//qZnKLWfwA5Mz8n+KJCt34=; b=k+8FhxdecDmpf4DhT0aZNIha6M/YhH73NdkduzsmUok2qx7qAl6clqK2MBnjzoETKo 0AVR28wQMtYuiodsRowx2l5lCtucnWqfu7N2x4EmbbmHz1twuzQfPQ6N6ckuUvUomijm DH/+ihqdepLAYoM7Pji2XymOGlaLUTY+KiN2TOGPUei3Z9EM3uy7RIvZQJHIdT+G/aYy fFoXr6PP7DdnmmcmqqEBtdmQizQxMOUnNGqv590KnRIgNrMLy2V+uGHVwm7qV9CfrcUu hlP4Clsi2pFTqxVePJVqWwvruiL/o5Wxq8q9FvyqxyvWa3pmlfYYtS64WoAXCRlD1JhI 5Ujg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Jhn1dMSa; 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=1735318680; x=1735923480; 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=5mzsbCWIn5qQtOJBFFhQDmIKNtqORVP2WuBSv2B2VmE=; b=U2TMOiXq40AT8SDiueq249t6fW/EwC/vlfUJBOXwmOoDwF3xjmEtJ5Jfz212xwmDlb KHAgLJ1pe1uMlo+wFjoK43nHvdIySuHYaE3uA8aQfmbOWfv9qkHWAwuRhg9UBrJKWLyK Gv/wG0EdtObNbr5CAR/lKwTyciq6laUIPI71I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735318680; x=1735923480; 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=5mzsbCWIn5qQtOJBFFhQDmIKNtqORVP2WuBSv2B2VmE=; b=nYyp2K/5kb97CDe6kOTRSgTwC4KxLgUWd9ptQpqz/gYxKFuBpskkU1O/D5se0SQ/FO H59vPlK7f9eVeCI4H3F1dMtKk5xynm90PqQU1GXl+4cxR4m8VqDa8g7x6Ls/jAbOW/DK UvLi1cEihwYUlH/9Cm44isU9241kpSAhYpntimhPGITeG3jK9DU+7tSJFvv9kZ9Tn5rk YSthT/hWuZz4BA98bZtL89gLFOUwyZKTMM/zJZ8FNeRAzRhB24GUA1+Y6BPFWCsL5CXQ lc/9pK+YDx4HAImK+CMNqZy2wSHtEoYNt5hjfZXSYTDcpqOJ+CbEHAynSMsbGbpSX0t5 PRZg== X-Forwarded-Encrypted: i=2; AJvYcCXbVFRxfgX9+XtCDHWiaqriqZ64iDr0pAMAmhu9eejB1pKxtMeCKFX1zlva+7PLGmgkD16SLw80DL6k3Mwf@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yz3swCMrE48bAiauwA2C3qy3/ugXtH/NWElfKcWl5+4fJYYL8nG hj/F5/D5VOq1e/VcFdjhQp3lWtiQ62m11SZKdrAXL6XQgOp2UbqvIcYrWI6BjAp/JQ== X-Google-Smtp-Source: AGHT+IHTv54Ud2F+a6qqtM+WVY7aLJXoBpKqBRptatqUZPQjVoO5LRBmeaqxrNmOL9MXfWQ9tddPLQ== X-Received: by 2002:a05:6402:270f:b0:5d3:fcca:cab1 with SMTP id 4fb4d7f45d1cf-5d80248209dmr27805997a12.15.1735318679740; Fri, 27 Dec 2024 08:57:59 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:e9d:b0:5d3:ce70:f232 with SMTP id 4fb4d7f45d1cf-5d8a84f20e9ls229694a12.2.-pod-prod-00-eu; Fri, 27 Dec 2024 08:57:58 -0800 (PST) X-Received: by 2002:a17:906:f597:b0:aac:830:fb76 with SMTP id a640c23a62f3a-aac3350650amr2655376566b.14.1735318677914; Fri, 27 Dec 2024 08:57:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735318677; cv=none; d=google.com; s=arc-20240605; b=ZlY0Ebmi0wpEjW/pZ3jEW2MAa/XSHfuk4Yt+kS/BW612R3Je/V9vsiZb5oqttK0SAL aJch08tu42n76cUAoFfPqeJGt7IbkD1u1s/kP+oqf3Hcc++wcwv4Hh2w0Q6o1EIN+aRD BkUZ+CgG2ROsa/v4oPZhzsr+zRMRhd6UmpjQ+QbLHSO97afJfpD2T3P8cUThV7wH/0xO HzSqegzHI3Mg2BpbnjvVncqsZDeknRLVzz3ZMZTbd93kQqvl9Qq5m53KOiNkug8B/M6C 1+rVONUenhcN8oWno6L5cXuqyJGDILwe0/iOzTuoSPT58ShoPqhVdw315kkDfKQ+lQ1P OMXQ== 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=ZqUbS4QFbQjY9acz5KfEUvUnduu2cjIu1TltoLZFYZg=; fh=wKAqkX/zh+QR+hrT1E54GP1Qc3c+MR/u1426t/hKzhc=; b=RfYU37l7J3zJOmdvXLMcgB18IYbNV7xLRoTu3OzzNFU67V1Cmpam3vcKudkvhZW4sO /BwGNAJ1huni47ig9zZbFA99uAH3CO5A6Xci1xD/QGGFVBaJFWKyDT9ZqGWXoR1wsr4N RWgyBsMdFDHKxwfcPZo4BUEHgbKEgFMz4UwBeod1FnOwrus7vFV92Lr8oGRihzOQIYzU Aa/guDkRwML3hFw4aXjGR2GbohY4zCCuS35PU/pEDjSaqmhICXdNxk0X9pkcTwZ0nGVN 1i6qtLgVpiGXf+CWjI+sdTAM9iamSz0+u2E4k0uLImF9/uLnEhAi7A+tLGpVm4r84cGc Ec9A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Jhn1dMSa; 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-aabf71eaf20sor642115666b.2.2024.12.27.08.57.57 for (Google Transport Security); Fri, 27 Dec 2024 08:57:57 -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: ASbGnct29M/XJykPZf6O41rR/oIMKPJnYJWIAGNpnx+y6EZwhPhdFqyu4577TjMODcp oC8r8yO/3ElVwVyCQbdc4KJBlogHtT5j4DL2dEyGfNWYVu4yPvXO9VHDtKhhfqeikV0AqovHigp hZsApUmIxs9bUukwpEmSGlOYe43uaaliZnAuNgyIC/egHCO0oA6hvJf1czxNxiTbaJ38oAPM/zV tRTm/oSyUXeKxlGJmx85NrLz7wE+fowW0Tzs81hjztrMdSQ7hmUB9Bt1X+/8xOIypdwMpmKG5nK eK1dQXfdv0+31fhu6vR5Rg== X-Received: by 2002:a05:6402:2346:b0:5d8:17da:dcf0 with SMTP id 4fb4d7f45d1cf-5d81e523027mr20469463a12.4.1735318677486; Fri, 27 Dec 2024 08:57:57 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0f0159f1sm1130097266b.154.2024.12.27.08.57.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Dec 2024 08:57: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 v7 21/23] dt-bindings: clock: imx8m-clock: support spread spectrum clocking Date: Fri, 27 Dec 2024 17:56:24 +0100 Message-ID: <20241227165719.3902388-22-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241227165719.3902388-1-dario.binacchi@amarulasolutions.com> References: <20241227165719.3902388-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=Jhn1dMSa; 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 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 eb2e6e702de9..76040ee9cd5c 100644 --- a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml +++ b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml @@ -50,6 +50,46 @@ properties: along with the oscillators, are used to generate the clocks for the on-chip peripherals. + 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 @@ -84,6 +124,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: @@ -133,6 +177,9 @@ examples: "clk_ext3", "clk_ext4", "audio_pll1", "audio_pll2", "dram_pll", "video_pll"; fsl,anatop = <&anatop>; + fsl,ssc-modfreq-hz = <6818>, <0>, <0>, <2419>; + fsl,ssc-modrate-percent = <3>, <0>, <0>, <7>; + fsl,ssc-modmethod = "down-spread", "", "", "center-spread"; }; - |