From patchwork Sun Dec 1 17:46:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3684 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 500F03F033 for ; Sun, 1 Dec 2024 18:47:43 +0100 (CET) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5d0c64ce365sf1309758a12.0 for ; Sun, 01 Dec 2024 09:47:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1733075263; cv=pass; d=google.com; s=arc-20240605; b=AIzd9vOSvsq2dI/Oh1SAb7M0gwc/joauM3RzT/29is/imOoGIYU+xdlvYndLAoFMYE CqnCx85G34lg+jIu6mZJ1mJ+JbiTxeMQiK+z+CCODljrKLdqVW75UfokFc+WZJuiuX+a qzVCAjFA5yA9imD1p//SeXoXllXngjjxyFFoc4F52EC/0ZEVOeJaeabjewzdzLesTEKx 3tpBQttJg6OuvgEQuNLJRnosHmOSIU64sg5cyw1f1BUtEmtxSMz33qdeiu06Uf1BRvVN mqSHEPUIgx1VaR5rL7ehOMdTN+eyK28VzEPhx6I3v6y2yF8npxwmpL20ErCvb95C6oBZ EwwQ== 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=Jjh1gikhMgngKWQPuxM7uyqwfECxsgXn+nXILyXXCNs=; fh=d/iZcAoTu2zpAGE91XTrDO4hBvEoJmFpTlOSyRNE+oI=; b=IxZ2BTm98WLV4lpgHdx0RSJRSkHPmuGz2FQ9KWZV1d+7fyvJcLRp82AvjGi1qT676d yGKmkgnVwzw5kbzG0G/nBbwivhG7dLuoN5OWc/52laJUU6qR//BX9sKNdjU17okbkLDq GRit7y4tDde6E+0+5eGhHuXoKXxsalkhS7dKGr0MMMLQOJ2eFMvMVopChbPW6WunUGuY uDJXPM1/RqWEj8FFFbhEH8prFSwDDeAfqxvIoDhpyUWm7JzpLag0pQwCBFrt85MK7jMf WTlOwz6Lxm8pU3FpXmn3vZgsGHi8357+6+MKYG4ywS+zcP1Mt+wXjhaXHHqJRkw1HSX/ BjVA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=govsin9I; 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=1733075263; x=1733680063; 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=Jjh1gikhMgngKWQPuxM7uyqwfECxsgXn+nXILyXXCNs=; b=XCqe7UfI7FEEhNa0SO89/HzifxhfEziR/xsoU5nhUA4KnB9rvRlTh0Noaw0JCGVDZ5 9is5T52k8G/AnWWnnbXkZOVzFcl71hrsyq+bESrE229p+/gl+vgR6OqpjfO5u54PZlNR RKJArxAwV2Pe1imov58y06b6B5g2ZKPee8Pjs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733075263; x=1733680063; 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=Jjh1gikhMgngKWQPuxM7uyqwfECxsgXn+nXILyXXCNs=; b=PRnhfDkUkTLoSEUgR2pZwxXaK5D9SQZoXkHd8nwbG2RsT+PFW9z98l62JR3Piw1IeR tcQt0GmVdQbdWMRfxWUydTayw7peOfFawvRzRYkXy8CLMJo1rGYaT7vvEtO8BCqMdt/n vsz8flInvXAYR+ciED/ev5l2cRi5PKvbG5B/xHhFrUC4Egyl3fRq7BP53ElIQWc6HFZx XnIlGgtM8kXmfjMkzGRaIy6bMiP6MuroABQVMklqJajShsXBDGClvOneZkOwLv9c39cs vwfY/MrnH8X2n7RFCdehomfveZV7xveP8gdNoOro+ys4iPSYIS0N5MOZYl+6Y0aRpTvV kXGA== X-Forwarded-Encrypted: i=2; AJvYcCW7Q5Fx/Cqdjyhd8haTgcAE59P/J7YODyc/8/KbnIALYovpgsXkyeY3CLKiGnEI117gK5+Z6L/1LkBrkhOF@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxUDmUp2lmfLTPIoQ8XRAu1+Q2buSX44AkZUsf9AKPbBE9mNPle zs9MOwHzetLpnwwMoqfRIQdZxry6kM42jOPWlbeJM0iI9fTDrri/skPJC7fKzeqXetSuUlSSQQ= = X-Google-Smtp-Source: AGHT+IH2pM58/IetO+lGPJA/12TFTnkAQIMd46FwZSa27unJvu2FAGoPGTh6//3Ak139fKQaUgAKEw== X-Received: by 2002:a05:6402:13cb:b0:5d0:e871:f2ea with SMTP id 4fb4d7f45d1cf-5d0e871f402mr2132688a12.16.1733075262951; Sun, 01 Dec 2024 09:47:42 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:c3d6:0:b0:5cf:e3e9:1723 with SMTP id 4fb4d7f45d1cf-5d095465086ls665592a12.2.-pod-prod-04-eu; Sun, 01 Dec 2024 09:47:41 -0800 (PST) X-Received: by 2002:a17:906:1bb1:b0:aa5:14b3:a042 with SMTP id a640c23a62f3a-aa580ef3726mr1744819266b.5.1733075261003; Sun, 01 Dec 2024 09:47:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733075260; cv=none; d=google.com; s=arc-20240605; b=Zn128+ExxdJaM3gLKXRZMa3qLOLi11UN1hHj46KVFRNB/YafRe8XeYM1jATTyApoEW 8RoT6Q/2vExRXLWdGESsaNqOCxxxTnJgsmD878eSTcXISRHZVshe5tUsMAcCtky2Ww+X ag1gq9gmOYp9AXOKbpYRFNdn2a3kp5CAHRCh0JgLj377x58lKjTKWukOX/BZZeIlBvL/ UcLlI6nEnDGt5/uQV7IQ/0CZENwpLucot79uNsNVPmjZzGZYek1BVOy/vqigr/YQQ0g2 KJLgD6qxfWqOLwrCVezPh3/uVMBj3iXOR7m8j+Lj9LITxBAD4Q119U2HspoFfffFlG6N /8Iw== 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=B8Mnl1funP026bpupc6kClrugt4oD6R0yljLualdHeA=; fh=2TL5gdVAJyX/yhk5/AxHrADrCeVz/BiuKBD/sWsuHYo=; b=gAZkRJFlu/1Q/vpcS5NV8tQN3uKhs2m/E0C3gNNMzBExQKkjCaMjKDJkbd3yIFxFiY cmzY3sPiRYq0Ry4W9yZPiWfcEbp4FynMmadf8bFr8BTHgWQz/KZe57Wbkyx2TgabzqgG 3wyFYrwVPLgosWL0gHB+MvoNlkzBugXJyndwUapxKNcQbvqtk7HaE0+d3J7vuIGZiMG6 Rdy2rw5P3oxGQr7kInEv7lSZl6Q+7AtQ7sADy/gyw5QdQg8dMMjx/UkcmcTXoUlwSHKd vTgRcC8B9hccwNmobrcQ69+KDoxzDcDfrPjn9WYe9XihBd5K86wfJy/bygTDtw4YhBDG yGBQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=govsin9I; 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-aa599806350sor248446666b.9.2024.12.01.09.47.40 for (Google Transport Security); Sun, 01 Dec 2024 09:47:40 -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: ASbGncvA+973ToZlTYzaNBd9sc5ZvQ1crafuYfrH1sGzG8ikvkfD5CLrGGkIQGM6Sbh jjCmD1YSisteVAek9+jpOe0fjghpbHPgcY4mwZ6ac2Ecpr8J15NpSOkqHsDwRfE2s/TIRdqH022 DB3GAmktylTTeRzpaqCWpx+d8OA/N5RazGw3ltw36X7uMlVXyMraNzCfJwuv/4slSa6nWpKGo+b /V/Qsiamsykkkc8qrLa1Z/bUt74kMXTewnFoTzrp0pR4kpa0B9Ri2gAPR0jg5VSCfJhrFTO4hF3 mhpznXmEshHLCaNPh7dvQocDhpKlE+wiqDuhYzcaTPjQl6UrOiw9kqWClH/QNraW8DYlCSYllYI 7VGAt3d0UnbJiNG2A X-Received: by 2002:a17:906:2921:b0:aa5:2232:c8d2 with SMTP id a640c23a62f3a-aa580ef31c1mr1541928666b.10.1733075260573; Sun, 01 Dec 2024 09:47:40 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-82-54-94-193.retail.telecomitalia.it. [82.54.94.193]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa59990a78esm415220066b.163.2024.12.01.09.47.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Dec 2024 09:47:40 -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 v4 13/18] dt-bindings: clock: imx8m-clock: support spread spectrum clocking Date: Sun, 1 Dec 2024 18:46:13 +0100 Message-ID: <20241201174639.742000-14-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241201174639.742000-1-dario.binacchi@amarulasolutions.com> References: <20241201174639.742000-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=govsin9I; 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 - 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 - 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. - 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. --- (no changes since v1) .../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"; }; - |