From patchwork Sun Jan 5 18:14:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3785 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 5618B3F1CD for ; Sun, 5 Jan 2025 19:15:36 +0100 (CET) Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5d3bf75bbf1sf13089015a12.1 for ; Sun, 05 Jan 2025 10:15:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1736100936; cv=pass; d=google.com; s=arc-20240605; b=hM+sW+ZQsnObVNKl4eQymgw5vOCa1LlsUYXaqyH732EXUKxY6kq5i5LWaMM1A7XOhP /FIzgmo5vDGKON6M+qKhkDAgvsojFAJ1ebISGg0yng93yyW/OpgH67Ahib5qITiJNZMs eeq4eEzvlONeRt/AEjLfZI1X2yubINqmwNDq3izT1XtZB7Si+XhyuAZ/G52mXcOHbJN5 wgQdv8bRgMRMf7Ll/ZrdGy3Y0FOVtzBlHW9HtBQ3VmUVjbohE7t1Q5/M6oxAbUSkn3Lq PzBu2GTn1ZpRcLsMxPO0E4vHxZXj9/rViFfAEi0hqo1ZuM8VvqiF07g+pHbAUYcuNGH2 ndQA== 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=fHEGT13E/zbE08RWrJqf69ZiZT4Dc/rrfidO21m+px8=; fh=YX346Fyvawm6+e7JOgx6mNlWEI/waGCwrfE2nH4Ld+4=; b=QYiMvozzt+u+uVkCIf7GztO/7rdnwV1lhYC2nPmM0IueU9wwvCcJgitIWddwVoPeSq Y29BLg9h0liChEAn6ZR/O+nLhSBsBl7U0NCR0winLIXxlkeTeZavLvNQ9lj3gTduzaDz dQXx77rg7DRlJp8RaRwvaN1BsOnBA4GpcJC9II9oPmZ5ULWuR8OKXuQUzyJNkVdh1lEy lmSA0SarwtkeCi+SHhD5kVAc42OFx5L1+1+ZhFZo5r27Ek0ByXDPCtkKZIoDIfiEJvJU rjphIgXTTSODR2v2xmWBM8KJ17ZAPA3jXiiLh9asJmoniw8ittoPd02zOubMHDAGutO7 uZog==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oFaco3JK; 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=1736100936; x=1736705736; 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=fHEGT13E/zbE08RWrJqf69ZiZT4Dc/rrfidO21m+px8=; b=BSRYflWL+nbqwr1pT9tZuPCkAQrjnAfjVwGl7D+ssRD3TC5q4Q0kZSVnuhGXV8YMbw /qDHJttmZlHukhxkHAFkvJ4bZcLPsOebSNPubkVHnnEO7OffI9SnJhiN2CEi1Wpfb9Up 3o76OzKimxIVkrzCrpbqezhuqi6HSOHvc+Z38= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736100936; x=1736705736; 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=fHEGT13E/zbE08RWrJqf69ZiZT4Dc/rrfidO21m+px8=; b=ho53v9Fdn75dz7lLWtMwFP6pi2l00JG2OGF7UoZW2u61sYjt62lXw/0E8fjZeOjBVN 3oWfBfAk0oNbLMTi6D4plCqbNxAYBY4IfPClfvS2kgiaxaFwy35q4AMbFjVzYgVMjTES UtqBFLPiHFgSnoPHkLjsFtmW0fwCw4/hRY066SM3htzVDyo4nIeoZrgXPwd15uKkf3gT pXUqAzupTPvDebkxfdylNRAgV0GQ2pjF64X0HLGiERpyHGPEU+9DjuNqi5twF+7ryAJc cFaUtqX0IRfMUd9HojUydjdn6tg6Za9ZT/8f2m26sAUp0a5bGVz/FOLpcTv7dsTIfjDD 6AVQ== X-Forwarded-Encrypted: i=2; AJvYcCWNXXstNhy4at4MU6SOjXdCB+VxFHAQxU0M/Sd/xrRGNdIUgZudW9Cywg0Kj4kZ4wFzhOo1OELvItyLTuPb@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwJFIZIlA6D9clKod7eGfq4KfmfPN0x3WYsKInpe4Ci7uBhvj7Z 7HsZWvUwu6i4sS63P3o4qJT5oFgbn8QtppZUtO/f6vEoUCZr6eGvzN4dTlErnl0Byw== X-Google-Smtp-Source: AGHT+IEQ7G9ZBDXi2g7coF0teCg4GehdJY579phEobV0N5KWkzf2r54nNDpKJUDttjHCwq4fST5Jkw== X-Received: by 2002:a50:c88a:0:b0:5d8:8292:5674 with SMTP id 4fb4d7f45d1cf-5d8829256d9mr28900831a12.7.1736100935696; Sun, 05 Jan 2025 10:15:35 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:8a87:0:b0:5d0:acf2:b111 with SMTP id 4fb4d7f45d1cf-5d8f649acc4ls1121350a12.1.-pod-prod-00-eu; Sun, 05 Jan 2025 10:15:34 -0800 (PST) X-Received: by 2002:a17:907:3f27:b0:aae:f6bd:7f5 with SMTP id a640c23a62f3a-aaef6bd2071mr3743466866b.16.1736100933774; Sun, 05 Jan 2025 10:15:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736100933; cv=none; d=google.com; s=arc-20240605; b=RMcI1k6gNh2eQ0dL2NcBLN8H4/FH1afTsNEqBBUuRR1T/FjpmR8f/AabpE7nh+c3yO /kK5fLIFrMDbCC5R+22GOLrD+QB6MW2VYx6Q5IS/WVQEh9GS6iZesG+lSqNtoCCwavFp 7V7gbvgbULnUFWtZpJKxxHZVcwHXvsxt5FytRrQizYMlGMOr6wffOjIRIHlM9QlrEBtZ ePzSANMegxOaEZKijQJxglSEpzRyc+85dh7oSFYp0LynbxDnIOzBSnljHelZ5XKuGecZ roBj5KKH0GNH4PZCNOr+Zrx7BTTzrmr/9w4B80iD7QWCIlBI5C8sBokcZvIR7IsRsVVz /8bA== 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=+zwadKSgcT3YHRBr470NAxtLB4LzWS9m4NLNCF1dK9k=; fh=eH+0Y7Diz6V5mR4yjTADWqq/BPeQ1lWG3GpSj4kCN9U=; b=Sl429BdDIUIRF0wkKG+BlOebBIv5FYddhVkZWq4MxsY9HVPJFsD33XRFUU8UwfdXxx ZcEUspzh7bzYe2ry2YZ4nY1UUgN0R07UiNhTIs7iPIef5/KqhkV/IUyLBvhnjsvupJ1p d7+Lg++9Y85yZ+rFJIXDsH09H4uaz8TQxXife/Mt9gSq74riOhWJA68zGsEmzuXBxD6j Z9CMkJ0bIeHosmGLkYy3AMvsODCAmniJ1LV5Fon/hNGRUshSHspTdR/bBXvoq/t6cYDW dMtNzW5sGbX62EzwDrNgdpbAIwK7euHBE3ImQE2dqYZVYBpo97FoVG+KsUjUWKCM5IoJ ZWoQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oFaco3JK; 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-aabf749452esor1562971966b.6.2025.01.05.10.15.33 for (Google Transport Security); Sun, 05 Jan 2025 10:15:33 -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: ASbGncs3fQOVesq1OZ6NP9iq8Ykd1rHnJkyXsMMl59eD2X9S4Qi2DZB0EC38/R7zlfU LP3YduVv4tiGKhba2RLmTJpB4nnuhEVDGvAbbL5C+q5sXysWVlxMQVLUF8BxS5CR9uAoo5ln3vA L6isP0gA5MFrfGa40VxNb5m+t+m+UiU12yAGXAKghCJQFA8mQUaNfxkuu7iFhzS2J8vrQYLaYsg jVXIg9pO2AyfPEDKHNP3PctycuT2cEk9QMkO0ely5CccIOJywJ394j+o67Ku46+G4GgVvaAPM6w TJB5JlFftZtZBj/CJUAx1z7KUDCau2wDEn/0aSc7E3d0fVcqY0+CukJ7SndCa00tr2BN6yzl9hf 2IPIMD/4g3t/mV0Do8w== X-Received: by 2002:a17:907:86aa:b0:aae:f029:c2ec with SMTP id a640c23a62f3a-aaef029c69fmr3596149966b.12.1736100933172; Sun, 05 Jan 2025 10:15:33 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-41-6-15.retail.telecomitalia.it. [79.41.6.15]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e82f178sm2138185066b.38.2025.01.05.10.15.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 10:15:32 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Alexandre Torgue , Conor Dooley , Krzysztof Kozlowski , Maxime Coquelin , Michael Turquette , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH 1/6] dt-bindings: clock: convert stm32 rcc bindings to json-schema Date: Sun, 5 Jan 2025 19:14:13 +0100 Message-ID: <20250105181525.1370822-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250105181525.1370822-1-dario.binacchi@amarulasolutions.com> References: <20250105181525.1370822-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=oFaco3JK; 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 not only performs the conversion according to the JSON-schema but also adds the missing parts: - st,syscfg phandle - st,stm32h743-rcc compatible that were not documented but are still used by the drivers and must therefore be included to ensure the patch submission tests do not fail. Signed-off-by: Dario Binacchi --- .../bindings/clock/st,stm32-rcc.txt | 138 ----------------- .../bindings/clock/st,stm32-rcc.yaml | 143 ++++++++++++++++++ 2 files changed, 143 insertions(+), 138 deletions(-) delete mode 100644 Documentation/devicetree/bindings/clock/st,stm32-rcc.txt create mode 100644 Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml diff --git a/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt deleted file mode 100644 index cfa04b614d8a..000000000000 --- a/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt +++ /dev/null @@ -1,138 +0,0 @@ -STMicroelectronics STM32 Reset and Clock Controller -=================================================== - -The RCC IP is both a reset and a clock controller. - -Please refer to clock-bindings.txt for common clock controller binding usage. -Please also refer to reset.txt for common reset controller binding usage. - -Required properties: -- compatible: Should be: - "st,stm32f42xx-rcc" - "st,stm32f469-rcc" - "st,stm32f746-rcc" - "st,stm32f769-rcc" - -- reg: should be register base and length as documented in the - datasheet -- #reset-cells: 1, see below -- #clock-cells: 2, device nodes should specify the clock in their "clocks" - property, containing a phandle to the clock device node, an index selecting - between gated clocks and other clocks and an index specifying the clock to - use. -- clocks: External oscillator clock phandle - - high speed external clock signal (HSE) - - external I2S clock (I2S_CKIN) - -Example: - - rcc: rcc@40023800 { - #reset-cells = <1>; - #clock-cells = <2> - compatible = "st,stm32f42xx-rcc", "st,stm32-rcc"; - reg = <0x40023800 0x400>; - clocks = <&clk_hse>, <&clk_i2s_ckin>; - }; - -Specifying gated clocks -======================= - -The primary index must be set to 0. - -The secondary index is the bit number within the RCC register bank, starting -from the first RCC clock enable register (RCC_AHB1ENR, address offset 0x30). - -It is calculated as: index = register_offset / 4 * 32 + bit_offset. -Where bit_offset is the bit offset within the register (LSB is 0, MSB is 31). - -To simplify the usage and to share bit definition with the reset and clock -drivers of the RCC IP, macros are available to generate the index in -human-readble format. - -For STM32F4 series, the macro are available here: - - include/dt-bindings/mfd/stm32f4-rcc.h - -Example: - - /* Gated clock, AHB1 bit 0 (GPIOA) */ - ... { - clocks = <&rcc 0 STM32F4_AHB1_CLOCK(GPIOA)> - }; - - /* Gated clock, AHB2 bit 4 (CRYP) */ - ... { - clocks = <&rcc 0 STM32F4_AHB2_CLOCK(CRYP)> - }; - -Specifying other clocks -======================= - -The primary index must be set to 1. - -The secondary index is bound with the following magic numbers: - - 0 SYSTICK - 1 FCLK - 2 CLK_LSI (low-power clock source) - 3 CLK_LSE (generated from a 32.768 kHz low-speed external - crystal or ceramic resonator) - 4 CLK_HSE_RTC (HSE division factor for RTC clock) - 5 CLK_RTC (real-time clock) - 6 PLL_VCO_I2S (vco frequency of I2S pll) - 7 PLL_VCO_SAI (vco frequency of SAI pll) - 8 CLK_LCD (LCD-TFT) - 9 CLK_I2S (I2S clocks) - 10 CLK_SAI1 (audio clocks) - 11 CLK_SAI2 - 12 CLK_I2SQ_PDIV (post divisor of pll i2s q divisor) - 13 CLK_SAIQ_PDIV (post divisor of pll sai q divisor) - - 14 CLK_HSI (Internal ocscillator clock) - 15 CLK_SYSCLK (System Clock) - 16 CLK_HDMI_CEC (HDMI-CEC clock) - 17 CLK_SPDIF (SPDIF-Rx clock) - 18 CLK_USART1 (U(s)arts clocks) - 19 CLK_USART2 - 20 CLK_USART3 - 21 CLK_UART4 - 22 CLK_UART5 - 23 CLK_USART6 - 24 CLK_UART7 - 25 CLK_UART8 - 26 CLK_I2C1 (I2S clocks) - 27 CLK_I2C2 - 28 CLK_I2C3 - 29 CLK_I2C4 - 30 CLK_LPTIMER (LPTimer1 clock) - 31 CLK_PLL_SRC - 32 CLK_DFSDM1 - 33 CLK_ADFSDM1 - 34 CLK_F769_DSI -) - -Example: - - /* Misc clock, FCLK */ - ... { - clocks = <&rcc 1 STM32F4_APB1_CLOCK(TIM2)> - }; - - -Specifying softreset control of devices -======================================= - -Device nodes should specify the reset channel required in their "resets" -property, containing a phandle to the reset device node and an index specifying -which channel to use. -The index is the bit number within the RCC registers bank, starting from RCC -base address. -It is calculated as: index = register_offset / 4 * 32 + bit_offset. -Where bit_offset is the bit offset within the register. -For example, for CRC reset: - crc = AHB1RSTR_offset / 4 * 32 + CRCRST_bit_offset = 0x10 / 4 * 32 + 12 = 140 - -example: - - timer2 { - resets = <&rcc STM32F4_APB1_RESET(TIM2)>; - }; diff --git a/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml new file mode 100644 index 000000000000..ae9e5b26d876 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml @@ -0,0 +1,143 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/st,stm32-rcc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectronics STM32 Reset Clock Controller + +maintainers: + - Dario Binacchi + +description: | + The RCC IP is both a reset and a clock controller. + + This binding uses common clock and reset bindings + Documentation/devicetree/bindings/clock/clock-bindings.txt + Documentation/devicetree/bindings/reset/reset.txt + + Specifying softreset control of devices + ======================================= + + Device nodes should specify the reset channel required in their "resets" + property, containing a phandle to the reset device node and an index specifying + which channel to use. + The index is the bit number within the RCC registers bank, starting from RCC + base address. + It is calculated as: index = register_offset / 4 * 32 + bit_offset. + Where bit_offset is the bit offset within the register. + + For example, for CRC reset: + crc = AHB1RSTR_offset / 4 * 32 + CRCRST_bit_offset = 0x10 / 4 * 32 + 12 = 140 + + The list of valid indices is available in: + - include/dt-bindings/mfd/stm32f4-rcc.h for STM32F4 series + - include/dt-bindings/mfd/stm32f7-rcc.h for STM32F7 series + - include/dt-bindings/mfd/stm32h7-rcc.h for STM32H7 series + +properties: + compatible: + oneOf: + - items: + - const: st,stm32f42xx-rcc + - const: st,stm32-rcc + - items: + - enum: + - st,stm32f469-rcc + - const: st,stm32f42xx-rcc + - const: st,stm32-rcc + - items: + - const: st,stm32f746-rcc + - const: st,stm32-rcc + - items: + - enum: + - st,stm32f769-rcc + - const: st,stm32f746-rcc + - const: st,stm32-rcc + - items: + - const: st,stm32h743-rcc + - const: st,stm32-rcc + + reg: + maxItems: 1 + + '#reset-cells': + const: 1 + + '#clock-cells': + enum: [1, 2] + + clocks: + minItems: 2 + maxItems: 3 + + st,syscfg: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to system configuration controller. It can be used to control the + power domain circuitry. + +required: + - compatible + - reg + - '#reset-cells' + - '#clock-cells' + - clocks + - st,syscfg + +allOf: + - if: + properties: + compatible: + contains: + const: st,stm32h743-rcc + then: + properties: + '#clock-cells': + const: 1 + description: | + The clock index for the specified type. + else: + properties: + '#clock-cells': + const: 2 + description: | + - The first cell is the clock type, possible values are 0 for + gated clocks and 1 otherwise. + - The second cell is the clock index for the specified type. + +additionalProperties: false + +examples: + # Reset and Clock Control Module node: + - | + rcc@40023800 { + #reset-cells = <1>; + #clock-cells = <2>; + compatible = "st,stm32f42xx-rcc", "st,stm32-rcc"; + reg = <0x40023800 0x400>; + clocks = <&clk_hse>, <&clk_i2s_ckin>; + st,syscfg = <&pwrcfg>; + }; + + - | + rcc@40023800 { + #reset-cells = <1>; + #clock-cells = <2>; + compatible = "st,stm32f746-rcc", "st,stm32-rcc"; + reg = <0x40023800 0x400>; + clocks = <&clk_hse>, <&clk_i2s_ckin>; + st,syscfg = <&pwrcfg>; + }; + + - | + rcc@58024400 { + compatible = "st,stm32h743-rcc", "st,stm32-rcc"; + reg = <0x58024400 0x400>; + #clock-cells = <1>; + #reset-cells = <1>; + clocks = <&clk_hse>, <&clk_lse>, <&clk_i2s>; + st,syscfg = <&pwrcfg>; + }; + +... From patchwork Sun Jan 5 18:14:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3786 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 545EB3F1CD for ; Sun, 5 Jan 2025 19:15:37 +0100 (CET) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5d821f9730asf5750745a12.1 for ; Sun, 05 Jan 2025 10:15:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1736100937; cv=pass; d=google.com; s=arc-20240605; b=lDvoKk77QRUyLFpYGmqV60hX9GN2ElVXkTJaPGd5g3XkwzcsFrv/qe1x/k0KI4P+NB A+R+r3Az1rgfCaUXjUgPslSn15UNCkd1oaMnJizNvMSFWwaIAynm2agp+ME/CcX68o2P OSspkdVWLMTfan3Nbrz8hmqt4qkeITYKC2PHiV9ZpXLvzV3SyNklq4xfdbwhpoFqjGz2 1iWD7uo7UiFbRTIpEfVkjMIAPNI2jrbO/B1Jlf6blbelMfQvM2BLE96fUqF5VfE/cjGL etnE5uGL6hG1kYc2W9JdmKnrZ/DnxtrWgkWMnagy7WB9TWLN65uJExTbcifqjoH6PDAq 4wBA== 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=+vvhW0zOfzx0y0xOTRGFs5dAGLWVMHbnRP5ORTQF7xA=; fh=GWpz+vrgjkvMFlr7IKt9w9lCrzOvrxiEpBBg8djHaiY=; b=ij4wrSPemJe3zM6Xp2I48hPJmakGcOiJ8Qrmie1OE+HjamTkqzgH+MHINH0cP8COL+ nI4RugNTlsXe8BYBCsLGWctD3ss/2ROqz9+V2uoYK7P31T40i/fSH3OwT8S1WO4r86PU gn/P/YZ6KY36iHQGDgskzWwaPd2oYxTWxfHLeuDRkKRZUAOjL73B5zjnCDc7Rku6U2kc abvJd23fpEg2x5Z12AttXZc7C/yXIQOm3IEiSOrsXLWerkiqVW5Hdj7NvfkOIrclaVLY bp9XJn+2RDpOIkPqW2HpfvYCdh7uAM5vlB9grKf0h1p4UxnFJG4vDbH7AUJ0F9HTZHjo OD8g==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="rceEs/ph"; 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=1736100937; x=1736705737; 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=+vvhW0zOfzx0y0xOTRGFs5dAGLWVMHbnRP5ORTQF7xA=; b=huElPJ8peTjZMy5iUngBDKbr6/eO7cwlt/yC0TIccDWB7uU/B/ME68cunLEq1Cc7ym WQI1y+zGd8xnkAGRrOySD9ABZbuZOx71U6ZhM19H0jWsN0w4h/ZDk/pdsd7EqC8q4dxR 7IEfLLUBgnGWKG14iObCgsHo0S55rLc+tOWjA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736100937; x=1736705737; 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=+vvhW0zOfzx0y0xOTRGFs5dAGLWVMHbnRP5ORTQF7xA=; b=c9/nDnG82ScKIKMlHMMIEeEX+akKVwUdPZ9B88sc0yK3qyWu8SCNrchXSuabI49uET Zr6gFqThGh+zDCpi4ONfNeBwtAOKTwRGOkziu01YU3jLCKA5zB6EGJk2FzvNIyoxgHpW vjJkhOgJbkqKN5aPZwQVJa7U0UamxTQ1nd0GqkijbIRyipjxAl3v9vPQ7VmrGkKwcZwY mH/nfcBzcQURdpX87BN5Be8pHolkAqpaaelBdmbeUeY9NYbBUIRu4UsLd17mh9heURYb WdjZROBIrhE3utbQSG46y5Q2tGrAuMULn5C+8lmS6wl6LZIgatCDp9znr9X61tfTE4R+ U7PA== X-Forwarded-Encrypted: i=2; AJvYcCUoFwdsEdxpF4v0+nkkgV9LxM5hfcdYYsIFqj6CQsB9jazM/aBfO5eM2hwtrmvWQqfT7G79xqBxL8u/EswV@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YywEYntMSxE8w0nolsL3xssMw2xIdCFJcOUYQqWoyZrghBJr1uH K2HHheAi9202bzPpFt3N/VGZGuxQgOW7/W+qc9afSe5H777ElqTe7Ty5zTc9ykIaOA== X-Google-Smtp-Source: AGHT+IFkQIBPKTTXdisNHaYLq8jCwkEwpff3ofQGppIRakoqKZvf3CbcNOufRTfm6r/ZRjkCpmIkdA== X-Received: by 2002:a05:6402:51d4:b0:5d0:b61a:89c9 with SMTP id 4fb4d7f45d1cf-5d81e71a1c3mr53168307a12.5.1736100936925; Sun, 05 Jan 2025 10:15:36 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:5484:b0:5d3:ce70:f232 with SMTP id 4fb4d7f45d1cf-5d8f6270cd2ls1345087a12.2.-pod-prod-00-eu; Sun, 05 Jan 2025 10:15:35 -0800 (PST) X-Received: by 2002:a17:906:528c:b0:aae:83c7:6ce7 with SMTP id a640c23a62f3a-aae83c76e6fmr4509930066b.0.1736100935063; Sun, 05 Jan 2025 10:15:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736100935; cv=none; d=google.com; s=arc-20240605; b=XfEmLSVUcIDtZKar1DGdQUgkR9WGMzp7lH0BQBw9FCiFB/tgHYFSoWC6iPnTyBvSXx 6YPNYTsDc/rlMoDUePB2eayAM1X0AEdgOq/GrOsO5tsH9VmNw2dh+PY+S1g7yCMf1wPE uYC+4hp5lkkcb8eE9SqywRycke2ZMdoMG+FQe+kAXDmT/5fjAFF9BLoKfvQacdrnj8bI phYcWeCc1e2wtrp0uOYJxts8Eudrj4E6dVVieNwXIkg1VA1lxUy0YOQlKCHUZfcs0eBk 5IBRFpQb/AnlJ6Jj6HYO289kouEKZcdVwTYlR8b2J/U97KWIGkvJEhy5sh0nJooQxN5k Sbig== 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=UOAsdgxDQEvC5uDcWK+yR25E57Nu26K/3jc3ZbJ9Cg0=; fh=T4U5uOY3thCEXpi+orqyw4/3HHexXtxvWl4ZWyKCjPM=; b=Ka4iHOjvpJslLiCxdWfioti29LOQHAk6sR7uOREY0llEDeZD/IA2EJ5K1baSRyKksw e82/JPx3rE3YAQoTvltub9hRwwuRgsTgO5KWy8nzgfsdv3qnxblgTW7sLDG77Bh7uBAV 69fogSGwfMOyHj+vqXtVaupay4BuQu5jNevJEiVEVGgeWNFB91NwEt1gyOVadPlVypOD l9BTqhA2Ogp4vy8i1+Oxv6OH2Nnb1jM8SueQgSAq3qYQhTQwoB6w+l8ekDdUPPtSnjdD ozb3YlH1jGsVjau748p7Km9i/saMWfAjUsHi/4aWkv4YREfGTWGTs0SrLi4eae3297oK c0Fg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="rceEs/ph"; 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-aabf75e9ed7sor1223189266b.9.2025.01.05.10.15.35 for (Google Transport Security); Sun, 05 Jan 2025 10:15:35 -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: ASbGncv8kLVSu8S8kYMeuEJsPkuK2rIfipzbcpO3iZkXKEwCxpe2+o6bbHDGGT6Pm4q r/BsgL8MTe84wWq06IU5+dHv+UyZBA9XH5XqYs5dGFdcwZJtoJqHxLQurMhQkmSMZrUQT1XH261 BG2JZTphcvNNH6OYjDYFzSohmY/Ou0X4onziu+22+MdudxgZD4EDxiHkGqMzL/jAFxTK8MVmaav h5Xi8OPWClkRiRHy13Ao37Ft8cwTe/9E0jqoLggOaK+HT0yb7cmTaOPfeXF1VDE3akkzX8eMsIX TGL8neiaoCdLY5Uv279m5/Pt7nfleKBnS8mwle1rk6/E7BA4ISPFg0+30qUGP3LhyKcMdtJC4yv yKDXzkal5Butryo1fEg== X-Received: by 2002:a17:906:dc8f:b0:aab:a1a8:92be with SMTP id a640c23a62f3a-aac080feebdmr5370408766b.5.1736100934660; Sun, 05 Jan 2025 10:15:34 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-41-6-15.retail.telecomitalia.it. [79.41.6.15]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e82f178sm2138185066b.38.2025.01.05.10.15.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 10:15:34 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Alexandre Torgue , Conor Dooley , Krzysztof Kozlowski , Maxime Coquelin , Philipp Zabel , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH 2/6] dt-bindings: reset: st,stm32-rcc: update reference due to rename Date: Sun, 5 Jan 2025 19:14:14 +0100 Message-ID: <20250105181525.1370822-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250105181525.1370822-1-dario.binacchi@amarulasolutions.com> References: <20250105181525.1370822-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="rceEs/ph"; 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: , With the conversion of Documentation/devicetree/bindings/clock/st,stm32-rcc.txt to JSON schema, the reference to st,stm32-rcc.txt is now broken. Therefore, let's fix it. Signed-off-by: Dario Binacchi --- Documentation/devicetree/bindings/reset/st,stm32-rcc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/reset/st,stm32-rcc.txt b/Documentation/devicetree/bindings/reset/st,stm32-rcc.txt index 01db34375192..384035e8e60b 100644 --- a/Documentation/devicetree/bindings/reset/st,stm32-rcc.txt +++ b/Documentation/devicetree/bindings/reset/st,stm32-rcc.txt @@ -3,4 +3,4 @@ STMicroelectronics STM32 Peripheral Reset Controller The RCC IP is both a reset and a clock controller. -Please see Documentation/devicetree/bindings/clock/st,stm32-rcc.txt +Please see Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml From patchwork Sun Jan 5 18:14:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3787 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 C1E543F1CD for ; Sun, 5 Jan 2025 19:15:40 +0100 (CET) Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5d3f3d6a999sf7500433a12.0 for ; Sun, 05 Jan 2025 10:15:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1736100940; cv=pass; d=google.com; s=arc-20240605; b=KrqmmJeap5KZZFsHTEQwsQavlXiwjTRa+3fJ3pMjE8pSXoqlQRxtqho9uIS70easBf TYN6QMi874thdScZBcdqwM8v21zzROu8aUuRQHUMWXxz1PVESj6GOmIXM6696WxCjgZD 5QAhPyKW3v/OB5PSuwFnJRp+E7NqnsewmDpX8+P5DNQiL+CNU5rui/Iccgigs+w9x9k1 NOooN7NWcETpAByI1i6yqS4DdodQsepWMpPcRRzS27/2bDotnguOhy5vqmya21F9OiwK NNmsTZiZj8QUKa9cjjhW6eNOSJ0DSe5ir/gJFd0nvMhgqTchL+K8dKA5Sof2kwCNdgoT a2rw== 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=GHC1/buK0h4QtwuQ9rfwBdyJzeFG538DIuod7aK/qOI=; fh=l4vtWjL5i3o8v7S482PYhCxsd6R4LEGQoH43NTCesck=; b=KBeRdlASCUPK+KwFbT/0rfrlmr+eF1iF75rYT6Bn8XkPClq6RVMhxdrzwQEl4/3PfK zg4eUVhYglFjvwAtKN8ZvDKOq5jASIQiMD2hby1JhS8RTSLyLk4IiNGkI4/1bh5KOSQh EGccngjIjVzMieBCZagkvOICV+f4w9928kHOeRMiLjzZNSCTzz6OCng7kFLHAcIH4X47 JRxB3JPUF77mufL1iBe2Na0VnHoOPG+iPiCp2L+Rh7aF/pUJXDg+banjodDIOALiQFBR 8e2vhhj3GKQMdxrB8m5D5gRU2vjusrfUUx/15ViFcNSX7h+P8bGO5DlbaTkvPqvs1euM ZNNw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=r7VTI5cl; 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=1736100940; x=1736705740; 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=GHC1/buK0h4QtwuQ9rfwBdyJzeFG538DIuod7aK/qOI=; b=pqwm2/BxWRoF4XXaCHTMo8J0Wh/3n8ggUEyw6zJwBWg2UBvJ4JTQBbI7o7stHKJ9Hm wXxbeS0eoCcMXVdnwcjEK+AgTNQLMRHW28O/azmZIJFnvzgnGBVQvxaP12JS50L0Psc+ sJvnnePbcKs2aGAEf4Rg4XejDnk1o1Uj4Vpwc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736100940; x=1736705740; 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=GHC1/buK0h4QtwuQ9rfwBdyJzeFG538DIuod7aK/qOI=; b=IyeIyyu9JkDgkQU+72DdZ0HYgDy7xkdFvLsBKKsSTUqoFANT/6oMhX/wvmWWdf7XWQ fPQgUXEkh8E33gZ3mIY5s7uUzax82upmF7kLUWIEXO+O1V6DiyoOr8S5g1PhrEtyvL5R rDb0KPc9YYo6f2WP2nyWWygM/n5VJ9FGIbzdkHjEOGlCHeIuWmYYbA8+WuCdrmrLD2uK O6Sdhp+iSOR6RyOALS+r2YZF54+Ounh/HeRZoEszBmp/lENMe/6wrl1GxWbabEGQZxu6 sKLGeFvOARBOr3ryqJtfw+3SsSFl5nG3UvcO3velQOLSLMMXXV/uO8UBCrvqAxTbDoGQ 8g/w== X-Forwarded-Encrypted: i=2; AJvYcCXbkfDIfoqegcOxe17IooYj1/rE6co8JoxOTGG3TGfxma02NMlhLHhj0O6gQJ0S6z2Hs+e+0eg4Qu/3obkJ@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YzAo0vW20lkaqAwz2wJpNpG3PgefGQvQuIwmWCEmOrnx7mtTPts 9XYZIoFownxqtBz7zewIhn84DxV3wODTMJ9O7Kjy2Iyoh7ZzOxZrkhgobXzbUnFavA== X-Google-Smtp-Source: AGHT+IH3lNo13oRqL/3Mb7XsKLzhbNm1Al8fYZdLkrR84yQ91NEsiT9vXlseO34WYOPU2LIo5LPOnw== X-Received: by 2002:a05:6402:528a:b0:5d3:f141:ccf6 with SMTP id 4fb4d7f45d1cf-5d81de16c82mr52136723a12.32.1736100939760; Sun, 05 Jan 2025 10:15:39 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:bb06:0:b0:5cf:e3e9:1723 with SMTP id 4fb4d7f45d1cf-5d93bd59134ls47150a12.2.-pod-prod-04-eu; Sun, 05 Jan 2025 10:15:38 -0800 (PST) X-Received: by 2002:a05:6402:4023:b0:5d2:723c:a559 with SMTP id 4fb4d7f45d1cf-5d81dd900c1mr56819594a12.10.1736100937958; Sun, 05 Jan 2025 10:15:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736100937; cv=none; d=google.com; s=arc-20240605; b=VLfLu/3OXajK+jFqyTiaa1aAySpESQcdIGSaVLIObMIwKO2+brQ4QJkpduBGvZFn96 y8booqHu+JZH0U3j6QtqWPV8lxoVtR+ld67K4hY6QygsUnx4pJAvt7EGSbIDfxGA/22w lFnG2YjAeTAcsDufkMZGcSfNVEnxIyzgr1VU3Z/RZ5mwkQI5suKejs5gUQtQ2ZNghZ5x Ayqcy1H4H67OPfalCIROzR5jUnNHMNj/fv9OfAiYCHsghH+CopAg+UWSzumctNd2agPq fQ90leovyTxlPrwetuyOXu/l5Ht5XuYgJ9IeuDlMd725uqSzuosWi8ghcVOubZrv3Fye H8yw== 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=ngcCwmTO+RIG/baergO/2VLeRq3P88V5Zllx9oRRwrs=; fh=eH+0Y7Diz6V5mR4yjTADWqq/BPeQ1lWG3GpSj4kCN9U=; b=ZE/uEYB7U7MXdJZqXdXbMF+sDjxST9xpiNzAlCNPAAKRxuXgoB78Mo7riUlYuBqYj7 IFDzOLmwSE6RHAAiFatu4cNfVeGpGWnXe3y7xR31tnz7wU6lSMTtC+6Ig55tj0FLS6AY VZApKxgab0Bbys0NECENSwN7S+cP6sPQ5mSZu/574NRNtFoaPYpu3te6hFhG3Vr31cct +xagT0W3qD+ryCMwkSem3XGleWTsjRsfspks8y5wvAJuoIt5QS/B2dhm6f9yJuRm9Cjv w97D0KZtWviH1h+f7ikPMFHmktYKRkdEO9bOd6AYvzTJUtVe6FFONwWexVNjeDHtgnTh rIqQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=r7VTI5cl; 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 4fb4d7f45d1cf-5d8066488cdsor11661112a12.0.2025.01.05.10.15.37 for (Google Transport Security); Sun, 05 Jan 2025 10:15:37 -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: ASbGncsvtdIyY/sxc9RtLq73nzcVDdusFqBzulCsGLzY2mtPCt3ViEAliXCEkbHnGAL 1hJnqe/zKH2DlI0cC9yX06sANxyZErOUSyZO5foPURu1NABsNNmJ5D7En4ywY1nMDM272sHBVjS uC9lftjkBUd7/gbSvb5lYYQ43LJQ8svXIP1id7x6FAT0uRHjcwmdLENiRThKqxmrtGoH4YdxZwc U8UcEHowXdydU9o2/9xF3MnDjtWJlC5gtowTXlfsz5lVoXzkSwFwKVZH2vc0DJejZDTAMlEDT9m eR+NWhIJuqm+ldciX/V1R6Ax+9qNeZZTrCjQVZidLLidaIeaVX7Sqn3kER8ee8A3QEzsv0SVc/S LYA3vJzQlD4Ye619HPQ== X-Received: by 2002:a05:6402:4305:b0:5d0:e014:dee2 with SMTP id 4fb4d7f45d1cf-5d81de160f9mr56356151a12.27.1736100937450; Sun, 05 Jan 2025 10:15:37 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-41-6-15.retail.telecomitalia.it. [79.41.6.15]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e82f178sm2138185066b.38.2025.01.05.10.15.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 10:15:37 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Alexandre Torgue , Conor Dooley , Krzysztof Kozlowski , Maxime Coquelin , Michael Turquette , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH 3/6] dt-bindings: clock: stm32fx: update reference due to rename Date: Sun, 5 Jan 2025 19:14:15 +0100 Message-ID: <20250105181525.1370822-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250105181525.1370822-1-dario.binacchi@amarulasolutions.com> References: <20250105181525.1370822-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=r7VTI5cl; 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: , With the conversion of Documentation/devicetree/bindings/clock/st,stm32-rcc.txt to JSON schema, the reference to st,stm32-rcc.txt is now broken. Therefore, let's fix it. Signed-off-by: Dario Binacchi --- include/dt-bindings/clock/stm32fx-clock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dt-bindings/clock/stm32fx-clock.h b/include/dt-bindings/clock/stm32fx-clock.h index e5dad050d518..b6ff9c68cb3f 100644 --- a/include/dt-bindings/clock/stm32fx-clock.h +++ b/include/dt-bindings/clock/stm32fx-clock.h @@ -10,7 +10,7 @@ * List of clocks which are not derived from system clock (SYSCLOCK) * * The index of these clocks is the secondary index of DT bindings - * (see Documentation/devicetree/bindings/clock/st,stm32-rcc.txt) + * (see Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml) * * e.g: ; From patchwork Sun Jan 5 18:14:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3788 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B1D393F1CD for ; Sun, 5 Jan 2025 19:15:41 +0100 (CET) Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-aa6704ffcaesf352246066b.2 for ; Sun, 05 Jan 2025 10:15:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1736100941; cv=pass; d=google.com; s=arc-20240605; b=GQ9PVl2qhSWgINIqHKtQHyM3p390addzfA3JkY5XKOF7YfLLwBWKjM3A7VFUEgErrn as2jBoW7LpL6ma5qiRNdcKydWlsHORohLvbyBNFpNHispXafJl7k6/gAHD9dj21eJTEs 68u9zMOhYtbFVL0VgQweMy9itcZuLIS7HzFn+huWy1zOnWVQcM/OtFM53sxPurSNpHhY a25NNv6PstgxO7B62Uy+BedUc2xtkAcZRSqVWVSyYpoLRptoZ/guhGCRFcsLTcwl10RH BE6RYZpIKYoNaEQaGbdn77t06ZJxCqkxZ5uO6Y+y7MgmkfEN3VSpu5j5E8X+e9gGpxGw hJog== 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=yIXnmtF5+xzRgLIucQKfKr4od7wc835UwbRYDiUCH5o=; fh=QalqAcKvy1zXfZAYCS3kvTUGgr1fPOEuU2wq5dkvPnw=; b=JZWNzbJHwuJJMqUOBN0Kv06NzlOc3VxPGKdnDcEotGDgJz6NNPZMTK04RFJ8RJ0tKM UudG9tr489Su2Eh2w08H4EJZmy5w94fQW8KLz3UPaW8UIDkuOIqAO8QV9fRXRo1BaLMy hPnzC6yt8pBMadmb5DiQhIhDb0xZWsaJp5X0CQBUEYgbmIRk0s0Aww2JERZ1/wr3V/2Z bU48Mnbc2v2N92Xhi4C8KOFWnlwbVR+QqfV+35hYDBcq5TMfOovFb5dEZnvGPwWm5NiC 68l32Qz5F48tWTUj2OSdQBuPqjveNwRgowcH1dYLazC1MVeLfqjdK9FcyhJIRoY6Rwja xA5g==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YytcGPe4; 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=1736100941; x=1736705741; 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=yIXnmtF5+xzRgLIucQKfKr4od7wc835UwbRYDiUCH5o=; b=miVvsGjnySw5vxAPmFZGZLRjsmnQoJHSv4laYufBCOdmWis+Xw+HeG1l+kdkqwGLZF rh0NO3DDQtYFJfkX63a5wsck6WTKgPDWyUhOU/ek8gOoKdRS5mT1GrYMTRdq1ecU5lEx 8/tWfrVr9S0RiAhVrSSyd1fvxSOwvyr0cebXc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736100941; x=1736705741; 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=yIXnmtF5+xzRgLIucQKfKr4od7wc835UwbRYDiUCH5o=; b=ZGxMXY/sZCChcJ29j4oOI71tMZA5qz7/1LRSAbDbsxreHZTOiDD0lRDnRIBYo09yCo cnJCKVs0NDI3lhTmelI/UhMZxX10Hl2FeZVUUjUwE3+eK3R9BhEfAJHejZxXD8ChC+az rG93vQX4emF+N7FlB0v1vNEC+XFLdQQZ0tGbPmseSpqo5U1pOp+6xrK99D9nUVxjTM4s m1GdXVGsY02YPmjeKEhz0ZdRx+UzXQsKYluxjwcn5c+POPS6/cTZWkMLoyxEPl0n5vPb KyQ+FF3Yn93GD9Sxw/YhUCC7jtY7KrruAD7Oo4+wPp787nWxvQsVRTjDV2h74J9/zF2W j3pw== X-Forwarded-Encrypted: i=2; AJvYcCXXwCFg0lot/xEXCpL5llK72259MWkXtc/oXDj634/JAokw9VPRCq7JxEBi82MsZpRQNQDs4c+AQ59zaMBV@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yzv2frze3HNDUhrkLgQOe2izJ1N9xoMK5azVyahUxXJrYeOX96x lDxx42CzOms8xjeHdZfjL3QZuD6z+bFYctUKEm3qkoy/KM+e6LuLqK+7reavRQu4tg== X-Google-Smtp-Source: AGHT+IE3a+R3ge0V4u8Qd4hpenOg4x5QpL4K7iZk6M0hGu9Hmk9S3p7z/Kf3traRQIZpBJFpUvf1Mw== X-Received: by 2002:a50:cb8d:0:b0:5d9:ad1:db25 with SMTP id 4fb4d7f45d1cf-5d90ad1dbaamr10036587a12.28.1736100941281; Sun, 05 Jan 2025 10:15:41 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:8e4f:0:b0:5d3:e99c:a4c9 with SMTP id 4fb4d7f45d1cf-5d91daa5790ls839994a12.1.-pod-prod-06-eu; Sun, 05 Jan 2025 10:15:39 -0800 (PST) X-Received: by 2002:a05:6402:3204:b0:5d0:c801:560 with SMTP id 4fb4d7f45d1cf-5d81ddb3aacmr53734551a12.20.1736100939346; Sun, 05 Jan 2025 10:15:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736100939; cv=none; d=google.com; s=arc-20240605; b=GplQitT4rfBAg9o2G67bXkjVpmRp+7fzx211H8FY5BmX0C+VHrGM/SqXyWcIdrs6XN xtVboYrEtq9oWA8w7uYM62JS2qjl1+S0zqbJUibqJSR22DJJZ7YL5ksx2IgS9BOpw2cU bXpuaWJBmVhKIpM0hKhS/+a5jV3t9PJozZlw8zNsqdWCtIBr8bGXC0BPge76plr+mrx0 REaNTWHqcYr6W2hOVO04rgMAacmod6caCE01DsTvfC3hkMu/v5gsq9F3KGoGIOKNbkNV ctO0E2HT+ppU0+Hwc8R0MK9VDvJJNz6QkwSxmlI7JwaJgxf1HVdJlobVgzb4EnHY/hQG 3yfQ== 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=DBSWyldngVnQclvBLd3GqHALlVJ1Kxh3yvgFvrg0xjA=; fh=eH+0Y7Diz6V5mR4yjTADWqq/BPeQ1lWG3GpSj4kCN9U=; b=FNnJXpAB6EVdHD2r/h4Hm/2ylhodU5KXMqXVf/zvhKvRv2mha4WA36jlQ5tH5RhYj2 pFMDwtoYzWnb80X7wuHUdnWyMdQ0+h3rMFKazvBhfQ8pIruEXJ5logsa4o8L30t8oMjc nu6Z7r9sGGz9VfBDb3LLhEOkpJ25HXHoB7JtfQFbp+QCmpSJgTwu0gIlyc1apNtvprC+ JcsvsAkCu+LjZ6MLo5YnRzK6dRq18sCJtXzcn8IByBqsZiNY/MU6n9tVfStyJSckYFvi TZGknU7Pg82QabDWq9wA6bE+6tw1U9hJowKUXlj8YlbtAe92XrtbCdM5yIMMfO78Wy7F jILw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YytcGPe4; 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-aac0e7e9c32sor1111529666b.1.2025.01.05.10.15.39 for (Google Transport Security); Sun, 05 Jan 2025 10:15:39 -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: ASbGncvYQNV3kyMb0qqmcbvkJysxw1qGnpbUIT9Kq5yw2V59oUzCCdsbRbICf1jIy9z b4PCTMapXzi/swK0B86H4ExeTj7StOOlNyTRU/etCMlxuap8ygV14sXpd+rUI45uF6HSS9jRXUJ Ny0b/qUfBWB/rcQLN2E7fh5BnPuM5p4tYP7UoKGBVGMewu3/+Ez5Eqnv3PBdhZr5W2cB/5ibff0 kVMH7LD4LCUAPZ6lNkuH5xG4QQ12K/CfXxb82vCwZi3bFp1Wf4M2Esa/dJBA+MfeiLxK5dJrYym WaIzR35zxNa0gPkeEGRjMFz03xp6KWETLZOW/rAGmaC4PDwGKVsV5m8blR2gsT63eXEpftbqReY +F/8iYiGbK8DVaOD3QQ== X-Received: by 2002:a17:907:3e90:b0:aa6:abb2:be12 with SMTP id a640c23a62f3a-aac3354ff4dmr3925314866b.37.1736100938804; Sun, 05 Jan 2025 10:15:38 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-41-6-15.retail.telecomitalia.it. [79.41.6.15]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e82f178sm2138185066b.38.2025.01.05.10.15.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 10:15:38 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Alexandre Torgue , Conor Dooley , Krzysztof Kozlowski , Maxime Coquelin , Michael Turquette , Rob Herring , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH 4/6] dt-bindings: clock: st,stm32-rcc: support spread spectrum clocking Date: Sun, 5 Jan 2025 19:14:16 +0100 Message-ID: <20250105181525.1370822-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250105181525.1370822-1-dario.binacchi@amarulasolutions.com> References: <20250105181525.1370822-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=YytcGPe4; 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 is available only for the main PLL. Signed-off-by: Dario Binacchi --- .../bindings/clock/st,stm32-rcc.yaml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml b/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml index ae9e5b26d876..c345d3ff3fc4 100644 --- a/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml +++ b/Documentation/devicetree/bindings/clock/st,stm32-rcc.yaml @@ -77,6 +77,26 @@ properties: Phandle to system configuration controller. It can be used to control the power domain circuitry. + st,ssc-modfreq-hz: + description: + The modulation frequency for main PLL (in Hz) + + st,ssc-moddepth-permyriad: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The modulation rate for main PLL (in permyriad, i.e. 0.01%) + minimum: 25 + maximum: 200 + + st,ssc-modmethod: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: + The modulation techniques for main PLL. + items: + enum: + - center-spread + - down-spread + required: - compatible - reg @@ -97,6 +117,10 @@ allOf: const: 1 description: | The clock index for the specified type. + st,ssc-modfreq-hz: false + st,ssc-moddepth-permyriad: false + st,ssc-modmethod: false + else: properties: '#clock-cells': @@ -118,6 +142,9 @@ examples: reg = <0x40023800 0x400>; clocks = <&clk_hse>, <&clk_i2s_ckin>; st,syscfg = <&pwrcfg>; + st,ssc-modfreq-hz = <10000>; + st,ssc-moddepth-permyriad = <200>; + st,ssc-modmethod = "center-spread"; }; - | From patchwork Sun Jan 5 18:14:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3789 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 105E83F1CD for ; Sun, 5 Jan 2025 19:15:44 +0100 (CET) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5d3eea3b9aasf11546361a12.1 for ; Sun, 05 Jan 2025 10:15:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1736100944; cv=pass; d=google.com; s=arc-20240605; b=QdmXUXLSxSgoJMDSNF0B/e8kFZ5u+oO2pJa1GDM0QsNzjVjdfUWO5FZTYO9XmBkB0R LHuy/RID/xdcX9SsNQDZEzg9wXkIR+jx5HMiSw5Wv24zm3pXkhvUduIGqZ8XxcSLbIGn o/dXynSTNNRELHP3qTZVhv0rFHhABK241IVz8wRWmtiT/dsQO9Er8pNNRHJFkzxpQEYC 835OzR2Ls3sW4GrD+VayElu6NbGWvAFBc+f6S7vVC4Yzm+nKuZDI7KLYNYhQFBL67D5C BJ6n9J/DX5F0gTs8fkYj1z9crt9HsQaupY+B+21BHMajqX/zT5c0LNcuPpBO5m64WU1+ DL4A== 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=1tPipegvnQ3ONRzBAGiPBme4jPOU8WTgAYHIigquWlQ=; fh=RiBwRHuNpgHtOtbZz9+pw5TgkgtPhUBA0rr8wf9JNdc=; b=bkxiac3eQg8uvPcouZ3CqQ/K9bZO+1HSAPYYWjNyQRrI7FNYTN8hTyg+W8ofoNTdP3 nxxV0+zuSPd0OKte7MH+a7xYSHVX+IHe7Hisrgq/gegmYDfepCtZqPNFRlMcP/O+EC3d wkCdfl7OLMl0u+MpxpvB7cb70vWWIiuQMoyQTLb9HMGB56GeZsjye1lgt7eH5zeVwijO NQeDUn5SCz3ciq00tIIpu+xpBGvtjkv8ZuSJc8wATo7UIV3lDm+yFMgbXprvoOxN+Vvg vAPJouG5roHu5WEU8hkMTtC2+UFisC/iYYKiUr17MFVQQtRiVrXfC4/LHIDq+eIDdnnR Cryg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=p9n0Z29h; 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=1736100944; x=1736705744; 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=1tPipegvnQ3ONRzBAGiPBme4jPOU8WTgAYHIigquWlQ=; b=CZN2TeBQRy5OFtw6bnVh2ZPieLLbAtLieeFOrY83jD19AhhGWqrZrW56cWYuxpGOwF pe93fWYynuZtlZDqnOC640frA5tJM1Zpv7dWMsbl63KQLyRftBN+OZsXseQpF8D1N+oT k2JPL7ddPW5rrFencJ0VY+NYEUt4ygUlPRC5I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736100944; x=1736705744; 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=1tPipegvnQ3ONRzBAGiPBme4jPOU8WTgAYHIigquWlQ=; b=CEKtga7x7qch0sBRTwdUphPkuQmMk1H/vc4ItA4tntf0ZCr5ADU1zcmMgwQUTW3JWn xl3tMzO5+KTN+nC2IGOg6Q1fk6C01jc4UfPjOrlYi1ryQgV2+6Pk+J4IxaVdIhYoRF4k FAobC4vVQ/Mk4ufFxe26QFEu4oTVV3ktjYc2nfsj28QuXn/VrbMhRRpFM5CMSuIOL3pc RJWqkfMx1LcWVvj6QEFuZWNarfF9k4qrG+UuvfcpzTCwFswjZ5x86tNOsjuii3LWkVXM 6+qY1DioN4smuWhJpoDoiI6wdOrh03PCNZNwZ1At7C5q2M5PmteTpUHxVzVpWElsMlv+ O1yw== X-Forwarded-Encrypted: i=2; AJvYcCVlpIVtLJN93QDlOF0rQ0JmPLymmawABNIYo9jQ9o/W/jjo7/D9TJdmVi75lESc8uOJGIugJZJcQnSPPmKP@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yzr3etq0UqDvy7QITk5n2mPjDroMsTRz44LWpZXF6Sr57CU0+ua hAVRf4gDw0C5Z1Y3LyJ4jgYunE4+cYHoVPhEau/KWSpqxxN8OR+Qaq9t3dWym/QH4g== X-Google-Smtp-Source: AGHT+IEt3nXnJIXuSkWBTE3NM+Dbjku2bAX2lT1+tbgZ5LUl0eB1j2StfkhQ3SVKR1IyZj8TQApKZA== X-Received: by 2002:a05:6402:5245:b0:5d3:ba42:e9fa with SMTP id 4fb4d7f45d1cf-5d81ddc01a0mr136930141a12.16.1736100943731; Sun, 05 Jan 2025 10:15:43 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:935a:0:b0:5d0:e410:4698 with SMTP id 4fb4d7f45d1cf-5d8f7e29c4fls1090005a12.1.-pod-prod-05-eu; Sun, 05 Jan 2025 10:15:42 -0800 (PST) X-Received: by 2002:a05:6402:3604:b0:5d9:d58:bcfa with SMTP id 4fb4d7f45d1cf-5d90d58c161mr28180136a12.27.1736100941907; Sun, 05 Jan 2025 10:15:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736100941; cv=none; d=google.com; s=arc-20240605; b=JAyGtZ92Zlksy8DIppkNcsi7yo7jyU8xT0ogFfx+rz4qTXL06U1hJ2ISoAhSX2qRbD R9cZK5E9pfyfljevEgRgHRkHsv0SE4XMwv+vS0R37jHFF2qJFj6KobHRMz1x8FGD+2tk GU/cY3Bnrh1J3d0NnnPh20dyiG4l/UISkxOgqJGX/jCFbRFqjijj+SYo7GDGZWMPWJhk YDBNlOBA1TbjURqQi297OI8c08qeAXEBfOXYO/+/MgLawIKLCzgQ4CQG2nWATn6sTdIG /moM03sdju7gybRLO5HvIZIVOqNEIWucE6Qfp+MeOqfTsVffnGkXqNBE3rmTGFAaGbjq l3HQ== 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=nCWum8u2aSE0H9NGugk1g+nl+FSObYpFAdsp0A4AhFk=; fh=LKhgYKqW/DH7bOgdnVELRgL+gR1eISg3bEXUN1rI9pA=; b=ZlzQu8lYkBsXnrh4VZk6bnsKfyxq/tCsUkKd4kkmDkD9YTc8Fh0DhiVOgU8k6LONZF B0VLH5E/cMJsPBLhy9G30eMbTs4U1Kfcdc3as1sKvJBjChfEOOn4VIB58T2B40OfQGwp VFVqIvawxtMnMfXAZkpZM80boSHiYHDI0sggv7dEIl5ubyOHMTiNAtywMvqbRwmeBqGU n9jXHeex7JiXPuke3zZpPgWJJemxe7ExNknddazkdG7xCTDUPEmskffmCiJt6TW8fi8u CsKoT/3XMda9cTdWH7a0wz4sDXvu2vAmohvHyLrz4BSVfFcBv1U+VIfBTinCfdyDcsBi DqAQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=p9n0Z29h; 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-aac0ef44df1sor879322166b.13.2025.01.05.10.15.41 for (Google Transport Security); Sun, 05 Jan 2025 10:15:41 -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: ASbGncv17jVdwlc+OtAijpRJpv1Fzfs5F2RjszjNZ2Kk92hVVc5bY8H1SeepC9uoCrR Mc9FwyTAMKz7ZKJW+9pM+FYLr7bhr1/4xUvnbSFww11PKMeZTaNRQby7LMnD4Q/VjadSbC/Oad9 EUwTbw7jRfu8WUm3YZBuYffCRsZn3JW/EMuHu1dBtUAW18LhSts7HcKNbBRqIWPbUjHXBKnW6S2 ZQR7VO7bmZZX62UkUVFfrhYjuHqt5T565r9mUksVYZG3OK0t95x68OLSrIF1Ayst3qqsS0RTSrb Lp6QBp2ANfOk5Olrksy4v+s/qg510XfiEoXAETCFMIpe333o9ci1HOIORagn9imq6ME97xlLGnE mozrE6LXcj8vAgBFeHA== X-Received: by 2002:a05:6402:540b:b0:5d6:48ef:c19f with SMTP id 4fb4d7f45d1cf-5d81de1c28fmr134000185a12.29.1736100941394; Sun, 05 Jan 2025 10:15:41 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-41-6-15.retail.telecomitalia.it. [79.41.6.15]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e82f178sm2138185066b.38.2025.01.05.10.15.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 10:15:40 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Alexandre Torgue , Maxime Coquelin , Michael Turquette , Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH 5/6] clk: stm32f4: use FIELD helpers to access the PLLCFGR fields Date: Sun, 5 Jan 2025 19:14:17 +0100 Message-ID: <20250105181525.1370822-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250105181525.1370822-1-dario.binacchi@amarulasolutions.com> References: <20250105181525.1370822-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=p9n0Z29h; 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: , Use GENMASK() along with FIELD_GET() and FIELD_PREP() helpers to access the PLLCFGR fields instead of manually masking and shifting. Signed-off-by: Dario Binacchi --- drivers/clk/clk-stm32f4.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c index 07c13ebe327d..db1c56c8d54f 100644 --- a/drivers/clk/clk-stm32f4.c +++ b/drivers/clk/clk-stm32f4.c @@ -5,6 +5,7 @@ * Inspired by clk-asm9260.c . */ +#include #include #include #include @@ -39,6 +40,8 @@ #define STM32F4_RCC_DCKCFGR 0x8c #define STM32F7_RCC_DCKCFGR2 0x90 +#define STM32F4_RCC_PLLCFGR_N_MASK GENMASK(14, 6) + #define NONE -1 #define NO_IDX NONE #define NO_MUX NONE @@ -632,9 +635,11 @@ static unsigned long stm32f4_pll_recalc(struct clk_hw *hw, { struct clk_gate *gate = to_clk_gate(hw); struct stm32f4_pll *pll = to_stm32f4_pll(gate); + unsigned long val; unsigned long n; - n = (readl(base + pll->offset) >> 6) & 0x1ff; + val = readl(base + pll->offset); + n = FIELD_GET(STM32F4_RCC_PLLCFGR_N_MASK, val); return parent_rate * n; } @@ -673,9 +678,10 @@ static int stm32f4_pll_set_rate(struct clk_hw *hw, unsigned long rate, n = rate / parent_rate; - val = readl(base + pll->offset) & ~(0x1ff << 6); + val = readl(base + pll->offset) & ~STM32F4_RCC_PLLCFGR_N_MASK; + val |= FIELD_PREP(STM32F4_RCC_PLLCFGR_N_MASK, n); - writel(val | ((n & 0x1ff) << 6), base + pll->offset); + writel(val, base + pll->offset); if (pll_state) stm32f4_pll_enable(hw); From patchwork Sun Jan 5 18:14:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3790 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 604463F1CD for ; Sun, 5 Jan 2025 19:15:45 +0100 (CET) Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-aa6a1bf7a82sf499448566b.1 for ; Sun, 05 Jan 2025 10:15:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1736100945; cv=pass; d=google.com; s=arc-20240605; b=RG7YO8Fc/qz8ECuxaZmDvWcdIwhZuS3dS+hoY4EDnli1TSnFg2oWF4iR3HeSGhZXX8 ZLbkgTxo/0yEkSUjK8lHcnCNrlPsZ6pvYK7DNvt/bAOFvf/OloQ6ecmbi3mRtCgvClTr eOkKltBNcqF3q/dLjnH8VTcY1ao1h1z6Z6F7f84uKWz0mc5OAo5yc0teAZ6KF0tCXTV8 9sHjLZz19XWvA4yjbmdkfD2yxDP64UT2x8OQcTcSSYbcrQYveYVfmZplHUUzsnCSXbM0 XDpYyygxBTv0+J+bVmK6URiY0pNH1WwJ6khhLrhXj+gJ6NKY28Tf8ApzoKeWcNOUZ9r4 hwVw== 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=joguiRPBtYEh1ADpX+EgPVvCG6Yy3jhMNougE2e6LCY=; fh=6KQ/ipbTYOZVznmbmH/fT1AO8sBwSjv85hwqp/Mn0sE=; b=jL8tFE3dA0e6eC9GsXsnu0lFSNLyx0MDsPaXSj4A3WX0G6GFu0uoTFjfjzkxGd3lsS /FrAS/YoyIE2YrIjLKNQ3fIW8HETBdG6E865S1wo8pf+cpQknG4ge/FJ4/6va/7LWr/m JwSAFMLxLs5KVZrtwJx6Mfgk+SCQWU27vSWQp02KOFgtRhx2GbqoJBhMMswLsSQLh00m 1l8Ook4VVBrnbfrvf4+RDKOhvHCGLUgBYxMrLpfw4orQderFIUMNIjLBj6c9khBq8T3K kqJFRLw062E6HzXsixFveu5S2rxsIz7Q5fFEWV2TPOGcZKKIkem5rfRob5vrp3CCeFxq IvsA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="CyJ+ZLJ/"; 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=1736100945; x=1736705745; 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=joguiRPBtYEh1ADpX+EgPVvCG6Yy3jhMNougE2e6LCY=; b=E7/pYUgZ15m+0NOGrt/rAHyvrAnSApYN4h1f1dp9mC1B6v2I94iiB9NouwAdSEQK74 xLcwkl5dGkqeFI9sMc4QCK7fNkx0W8mP+U5+ATD8DHnwJC6yhlbz4n1la5QH24KGoUfV 7HmD0Bm8rzQGCrV7Nnr2mNQbDMAa7jkEpCS60= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736100945; x=1736705745; 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=joguiRPBtYEh1ADpX+EgPVvCG6Yy3jhMNougE2e6LCY=; b=iwsr17STtBT0776bhuH6yhWPMWRMKJZyFGeqilbKikLAfX6zsrIgCMmUvj8Ca68GQF TuR9vR5L09+3x43J7agm27rXZsq603Hdt2XAWTAk8mblt/nHLeGUCYsTZQXfAEiX8WMB UMcviN9j8y5Co2AB6waunuGSiYKVwKFqNKMLNj0ZmkpKl93lZ6uPzc9BTqpKkdv3GzKM MBazc+eOa+ba/F60KIMN4+R+9elDoJsij7fc3409WLXCbQIfN+2Q8RxAQUNXu8o9j8Un h8uLl9MgaX8YCb2TOSM7GBDJF39QNJ+J+gHjjeVoNsMkWxbZNjMQ1WWPizwK3b5nxCEE Ej3A== X-Forwarded-Encrypted: i=2; AJvYcCWxHkZZzXhEEB4eI05MpyDPozrO+Rtdp4GZ2OWioaAOTCQ4A0GErsyeErGfUYKrf6LIQczG6i9SuQuGA79d@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwGLPtpLcxdbAcnz5KWg9aP9P1zcPblKiansQeIx4SbQIOYjpa4 gyTFGvK8L8KMKnFGmvuGcIq323blv2LDyT8WGC4fUpGv9ZZXHXgB3O/5tExMsgqICQ== X-Google-Smtp-Source: AGHT+IGS2M8mPr0A/TgBDE7OnkCC5e9zBIsLCKOZZ6y/KhIN+Spg5aLLhWw0yWM9yGsXLbh5TU12Yw== X-Received: by 2002:a17:907:7e8f:b0:aa6:552e:451e with SMTP id a640c23a62f3a-aac2d45544cmr5648873966b.29.1736100944819; Sun, 05 Jan 2025 10:15:44 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:4141:b0:5d3:ecaf:6210 with SMTP id 4fb4d7f45d1cf-5d928209f85ls313427a12.0.-pod-prod-08-eu; Sun, 05 Jan 2025 10:15:43 -0800 (PST) X-Received: by 2002:a17:907:d2a:b0:aa6:7cf3:c6f0 with SMTP id a640c23a62f3a-aac2adc48efmr5076676466b.14.1736100943021; Sun, 05 Jan 2025 10:15:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736100943; cv=none; d=google.com; s=arc-20240605; b=HWUMCULUyyPYdkq/HUJITZDKp6A2J+v7P8IRm1McxMpYGPZRsLeyeeDN21uo/4awUs k1UoVOgrNFgQatCl7YGY+QByTs0J9dwRelci3x5ksf4Y+pzWh8yFv23GD1RhW8Uiq85j xHd26RaXDH5ksEIl/5wZ9EF7/+MWBcT726Vkp1dh9YCWyjgHrzhH9hnInUTiWxNghWsE 5UlyZrqxHRp0uYpHdaSCKojxjlISmFEB09t8OhCIBrj3u/ALrRgSErZQchEs6DvilzrN t+k/giEmfJmYEY645x8ADRtzD9v/UjD/29H0kO6K3Djbtf2uRw1ffiaraHfv7nutYAGx WpyA== 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=CYt+s6fkrUpxe5XF17lxHByzQRCB3AxfRzKWTwCyBC0=; fh=LKhgYKqW/DH7bOgdnVELRgL+gR1eISg3bEXUN1rI9pA=; b=NZ174fDsglq4tj3REkppsjXGDIneBmH/vocxjf60ZgeDjnNfXRz5f3Z88x1BWPje+x JCKnBKbw6lQEmQTmh462yOCKvyZss79W3SpPYrWr7EjDaXSVQeYvangdoytgMkR1Lq+y /73Ol3IS4VY89EZQF975ZMBjC646CAMnX8VylIm77hZXguUwdoeiHLPrhlFvsb6wyY2w Uyc8XEjc2ev4NfqYkdz6M7rZSn8huGzDAv7dxU6EylZowVgubOEfkJ0e1YMfHfyLHg/3 aDFQQCk62ygDT37f0t2cq9P7v1ploWi2Y+sjXwzcpL9Cn+vs2BI4GMIXcu59S6Y2C5hs GmpQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="CyJ+ZLJ/"; 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-aaf7f3a8776sor404943166b.11.2025.01.05.10.15.42 for (Google Transport Security); Sun, 05 Jan 2025 10:15:43 -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: ASbGncukw5U37A5hqQUsVNRC1d16nR5CsxGklVafKOztlcH9AQ0s7fZpSKGNUTFNj3t QR+mDQL9+bR4wFezEGg3wcP8I+DMpyV3l5HIVMnf876ka1UtZZq7RsFXSyczLLzpiKR/WhrFnfe wxrLS8RBlMt2SYQCsdMuDkvFEVTdl6QuTZmn64qEokAvZvyggn6WpMpsrNLFQS3vAd7aGY2aJkw w0H1fBGgUpmcTIpG+gkEC+wF4HxiWypR4edBaXVi/YHqouAbkSbkCjrwbVyWMWsPRUTHvmnFow5 iueZ+M7zmEWMtogrut+sLTvtEq6IwYcvron3/jXTz6A7mCjBpsHqVJFU6YOwoSTp/3knL8fRofs +QpZUfIsiYK+XWD5Svg== X-Received: by 2002:a17:907:7e86:b0:aaf:ada2:181e with SMTP id a640c23a62f3a-aafada219d8mr879413566b.26.1736100942566; Sun, 05 Jan 2025 10:15:42 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-41-6-15.retail.telecomitalia.it. [79.41.6.15]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e82f178sm2138185066b.38.2025.01.05.10.15.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jan 2025 10:15:42 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Alexandre Torgue , Maxime Coquelin , Michael Turquette , Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: [PATCH 6/6] clk: stm32f4: support spread spectrum clock generation Date: Sun, 5 Jan 2025 19:14:18 +0100 Message-ID: <20250105181525.1370822-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250105181525.1370822-1-dario.binacchi@amarulasolutions.com> References: <20250105181525.1370822-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="CyJ+ZLJ/"; 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: , Support spread spectrum clock generation for the main PLL, the only one for which this functionality is available. Tested on the STM32F469I-DISCO board. Signed-off-by: Dario Binacchi --- drivers/clk/clk-stm32f4.c | 143 +++++++++++++++++++++++++++++++++++++- 1 file changed, 140 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c index db1c56c8d54f..6c80c0dbb0a3 100644 --- a/drivers/clk/clk-stm32f4.c +++ b/drivers/clk/clk-stm32f4.c @@ -35,6 +35,7 @@ #define STM32F4_RCC_APB2ENR 0x44 #define STM32F4_RCC_BDCR 0x70 #define STM32F4_RCC_CSR 0x74 +#define STM32F4_RCC_SSCGR 0x80 #define STM32F4_RCC_PLLI2SCFGR 0x84 #define STM32F4_RCC_PLLSAICFGR 0x88 #define STM32F4_RCC_DCKCFGR 0x8c @@ -42,6 +43,12 @@ #define STM32F4_RCC_PLLCFGR_N_MASK GENMASK(14, 6) +#define STM32F4_RCC_SSCGR_SSCGEN BIT(31) +#define STM32F4_RCC_SSCGR_SPREADSEL BIT(30) +#define STM32F4_RCC_SSCGR_RESERVED_MASK GENMASK(29, 28) +#define STM32F4_RCC_SSCGR_INCSTEP_MASK GENMASK(27, 13) +#define STM32F4_RCC_SSCGR_MODPER_MASK GENMASK(12, 0) + #define NONE -1 #define NO_IDX NONE #define NO_MUX NONE @@ -512,6 +519,17 @@ static const struct clk_div_table pll_divr_table[] = { { 2, 2 }, { 3, 3 }, { 4, 4 }, { 5, 5 }, { 6, 6 }, { 7, 7 }, { 0 } }; +enum stm32f4_pll_ssc_mod_type { + STM32F4_PLL_SSC_CENTER_SPREAD, + STM32F4_PLL_SSC_DOWN_SPREAD, +}; + +struct stm32f4_pll_ssc { + unsigned int mod_freq; + unsigned int mod_depth; + enum stm32f4_pll_ssc_mod_type mod_type; +}; + struct stm32f4_pll { spinlock_t *lock; struct clk_gate gate; @@ -519,6 +537,8 @@ struct stm32f4_pll { u8 bit_rdy_idx; u8 status; u8 n_start; + bool ssc_enable; + struct stm32f4_pll_ssc ssc_conf; }; #define to_stm32f4_pll(_gate) container_of(_gate, struct stm32f4_pll, gate) @@ -541,6 +561,7 @@ struct stm32f4_vco_data { u8 offset; u8 bit_idx; u8 bit_rdy_idx; + bool sscg; }; static const struct stm32f4_vco_data vco_data[] = { @@ -661,6 +682,34 @@ static long stm32f4_pll_round_rate(struct clk_hw *hw, unsigned long rate, return *prate * n; } +static void stm32f4_pll_set_ssc(struct clk_hw *hw, unsigned long parent_rate, + unsigned int ndiv) +{ + struct clk_gate *gate = to_clk_gate(hw); + struct stm32f4_pll *pll = to_stm32f4_pll(gate); + struct stm32f4_pll_ssc *ssc = &pll->ssc_conf; + u32 modeper, incstep; + u32 sscgr; + + sscgr = readl(base + STM32F4_RCC_SSCGR); + /* reserved field must be kept at reset value */ + sscgr &= STM32F4_RCC_SSCGR_RESERVED_MASK; + + modeper = DIV_ROUND_CLOSEST(parent_rate, 4 * ssc->mod_freq); + incstep = DIV_ROUND_CLOSEST(((1 << 15) - 1) * ssc->mod_depth * ndiv, + 5 * 10000 * modeper); + sscgr |= STM32F4_RCC_SSCGR_SSCGEN | + FIELD_PREP(STM32F4_RCC_SSCGR_INCSTEP_MASK, incstep) | + FIELD_PREP(STM32F4_RCC_SSCGR_MODPER_MASK, modeper); + + if (ssc->mod_type) + sscgr |= STM32F4_RCC_SSCGR_SPREADSEL; + + pr_debug("%s: pll: %s: modeper: %d, incstep: %d, sscgr: 0x%08x\n", + __func__, clk_hw_get_name(hw), modeper, incstep, sscgr); + writel(sscgr, base + STM32F4_RCC_SSCGR); +} + static int stm32f4_pll_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) { @@ -683,6 +732,9 @@ static int stm32f4_pll_set_rate(struct clk_hw *hw, unsigned long rate, writel(val, base + pll->offset); + if (pll->ssc_enable) + stm32f4_pll_set_ssc(hw, parent_rate, n); + if (pll_state) stm32f4_pll_enable(hw); @@ -788,6 +840,87 @@ static struct clk_hw *clk_register_pll_div(const char *name, return hw; } +static int stm32f4_pll_init_ssc(struct clk_hw *hw, struct stm32f4_pll_ssc *conf) +{ + struct clk_gate *gate = to_clk_gate(hw); + struct stm32f4_pll *pll = to_stm32f4_pll(gate); + struct clk_hw *parent; + unsigned long parent_rate; + int pll_state; + unsigned long n, val; + + parent = clk_hw_get_parent(hw); + if (!parent) { + pr_err("%s: failed to get clock parent\n", __func__); + return -ENODEV; + } + + parent_rate = clk_hw_get_rate(parent); + + pll->ssc_enable = true; + memcpy(&pll->ssc_conf, conf, sizeof(pll->ssc_conf)); + + pll_state = stm32f4_pll_is_enabled(hw); + + if (pll_state) + stm32f4_pll_disable(hw); + + val = readl(base + pll->offset); + n = FIELD_GET(STM32F4_RCC_PLLCFGR_N_MASK, val); + + pr_debug("%s: pll: %s, parent: %s, parent-rate: %lu, n: %lu\n", + __func__, clk_hw_get_name(hw), clk_hw_get_name(parent), + parent_rate, n); + + stm32f4_pll_set_ssc(hw, parent_rate, n); + + if (pll_state) + stm32f4_pll_enable(hw); + + return 0; +} + +static int stm32f4_pll_ssc_parse_dt(struct device_node *np, + struct stm32f4_pll_ssc *conf) +{ + int ret; + const char *s; + + if (!conf) + return -EINVAL; + + ret = of_property_read_u32(np, "st,ssc-modfreq-hz", &conf->mod_freq); + if (ret) + return ret; + + ret = of_property_read_u32(np, "st,ssc-moddepth-permyriad", + &conf->mod_depth); + if (ret) { + pr_err("%pOF: missing st,ssc-moddepth-permyriad\n", np); + return ret; + } + + ret = of_property_read_string(np, "st,ssc-modmethod", &s); + if (ret) { + pr_err("%pOF: missing st,ssc-modmethod\n", np); + return ret; + } + + if (!strcmp(s, "down-spread")) { + conf->mod_type = STM32F4_PLL_SSC_DOWN_SPREAD; + } else if (!strcmp(s, "center-spread")) { + conf->mod_type = STM32F4_PLL_SSC_CENTER_SPREAD; + } else { + pr_err("%pOF: wrong value (%s) for fsl,ssc-modmethod\n", np, s); + return -EINVAL; + } + + pr_debug("%pOF: SSCG settings: mod_freq: %d, mod_depth: %d mod_method: %s [%d]\n", + np, conf->mod_freq, conf->mod_depth, s, conf->mod_type); + + return 0; +} + static struct clk_hw *stm32f4_rcc_register_pll(const char *pllsrc, const struct stm32f4_pll_data *data, spinlock_t *lock) { @@ -1695,7 +1828,8 @@ static void __init stm32f4_rcc_init(struct device_node *np) const struct of_device_id *match; const struct stm32f4_clk_data *data; unsigned long pllm; - struct clk_hw *pll_src_hw; + struct clk_hw *pll_src_hw, *pll_vco_hw; + struct stm32f4_pll_ssc ssc_conf; base = of_iomap(np, 0); if (!base) { @@ -1754,8 +1888,8 @@ static void __init stm32f4_rcc_init(struct device_node *np) clk_hw_register_fixed_factor(NULL, "vco_in", pll_src, 0, 1, pllm); - stm32f4_rcc_register_pll("vco_in", &data->pll_data[0], - &stm32f4_clk_lock); + pll_vco_hw = stm32f4_rcc_register_pll("vco_in", &data->pll_data[0], + &stm32f4_clk_lock); clks[PLL_VCO_I2S] = stm32f4_rcc_register_pll("vco_in", &data->pll_data[1], &stm32f4_clk_lock); @@ -1900,6 +2034,9 @@ static void __init stm32f4_rcc_init(struct device_node *np) of_clk_add_hw_provider(np, stm32f4_rcc_lookup_clk, NULL); + if (!stm32f4_pll_ssc_parse_dt(np, &ssc_conf)) + stm32f4_pll_init_ssc(pll_vco_hw, &ssc_conf); + return; fail: kfree(clks);