Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp981355pxb; Fri, 22 Apr 2022 15:53:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyd/xgoB3oXMHySgaumWB1Q2ph6mhmG9zC8TXcZjZIs0PVed7LwxK98nmgIX5KlJgYbPqF2 X-Received: by 2002:a17:90b:4c84:b0:1d2:cadc:4e4d with SMTP id my4-20020a17090b4c8400b001d2cadc4e4dmr18682484pjb.8.1650667994692; Fri, 22 Apr 2022 15:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650667994; cv=none; d=google.com; s=arc-20160816; b=ejSiE+zFN1m697ic299zgnLdBlbeXuTrX+5TV+CHSTBIJc0NlZRjzQIA67NrLlGqju HAiloWwGchbeKgFgcF3jZFiQXX5byPktJHsdfZtkHgVIUw/F1GXEdMjAAFF+7SPICLyY HTcNLXIQuHdJH5WNfDUIW92bJNbM6xlJZJstfvGg5NhidOzQtFR29KyDT2mCXtT1K1mZ 8SCvS1U9rnx30gB/DDlKlDMOW8bHKs6YT+BDGnsGjLj37J123uKdL40Z270/06+IUt5e VF5yzBBcl7oUJKPWwrsKTsVpVHvJU8dReRbKa5RPRjIGHrc7X06wNuJ0LiH9EvcuVi49 jgsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=YEcX15Kp1nPqCBp6qMHGJfjQGfPYzSIxANYCTdo/4z4=; b=j/pXj/HscHsMNnElA+SycMWmT6zFihryKUe8L/FBotMqo6hhLQ2pYUM17GNRp8KFDu j+1CdXoOFjqqCbxHhokHFcGPYX6eUxXVsFzH8PjFt/wPj33Ob6RQQEWQ5of1rkjrvbWB tDbM1QZvG/sXcZk0dOzBOp8eW3iIbamawKRlFon6D0+H8kg4VVZb1+AHAVK1FXBatyoT EwpL3E+BmedFKqnT/4/t1+QNXeveVhYmvaB+4mqbbpmsmu1j74YZ/XNkNHnDGKhBOAb/ Ssi9PD1hdbAwsCoEOrXCPC05ghSuKJukUcEvuGalH6L8rPFksU8PyGannm8vfvuFnCCq 6zQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=vtEzWCM5; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b18-20020a170902e95200b00158ea24bbb5si10331044pll.197.2022.04.22.15.53.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:53:14 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=vtEzWCM5; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2058F2C522A; Fri, 22 Apr 2022 13:43:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1447871AbiDVNT0 (ORCPT + 99 others); Fri, 22 Apr 2022 09:19:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1447732AbiDVNTX (ORCPT ); Fri, 22 Apr 2022 09:19:23 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DAD25F94; Fri, 22 Apr 2022 06:16:29 -0700 (PDT) Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23M9IxUX028741; Fri, 22 Apr 2022 15:16:13 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=YEcX15Kp1nPqCBp6qMHGJfjQGfPYzSIxANYCTdo/4z4=; b=vtEzWCM5oZGcX1824jCRmM5Hq1tDGyVyfjL79JRSkdL6FLYp8YCa0oQgvLYXQXIZks9o lj9HzKNOFDgEgZ3VtSQGXLCVcVfU/sTr5aFOJcCpXME6VbhlX8CSiu6s70MyPOd7XO/b 0Yb1vgDL412BAKLc6rpc7+EbuW72sdmnUt36PrFZYti4w5DIsGj8LM/aXXvDftkq2czj lvOkSpGlSlatsFfrWgkfYJL8Xq8F7zMnCTzv6VibKYmSIyM7sBOfXf7NYuJN59e3DROI rHswbx9+2MMZ+WcAJcceWYjS6dhaHtF5yZyN/8pTHsZrH8OIDFr0z5AXUPAaDo61gziY bw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3fk4fvf1rt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Apr 2022 15:16:13 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 3989510002A; Fri, 22 Apr 2022 15:16:13 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 300A521E663; Fri, 22 Apr 2022 15:16:13 +0200 (CEST) Received: from [10.201.21.16] (10.75.127.47) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Fri, 22 Apr 2022 15:16:12 +0200 Message-ID: <9024cfc9-cf9d-6c7e-ef12-d879bed67c25@foss.st.com> Date: Fri, 22 Apr 2022 15:16:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH RESEND v3 13/13] ARM: dts: stm32: add RCC on STM32MP13x SoC family Content-Language: en-US To: Alexandre TORGUE , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Philipp Zabel CC: , , , , References: <20220316131000.9874-1-gabriel.fernandez@foss.st.com> <20220316131000.9874-14-gabriel.fernandez@foss.st.com> From: Gabriel FERNANDEZ In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG2NODE2.st.com (10.75.127.5) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-22_03,2022-04-22_01,2022-02-23_01 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/21/22 17:26, Alexandre TORGUE wrote: > On 3/16/22 14:10, gabriel.fernandez@foss.st.com wrote: >> From: Gabriel Fernandez >> >> Enables Reset and Clocks Controller on STM32MP13 >> >> Signed-off-by: Gabriel Fernandez >> --- >>   arch/arm/boot/dts/stm32mp131.dtsi  | 107 +++++++++++------------------ >>   arch/arm/boot/dts/stm32mp133.dtsi  |   4 +- >>   arch/arm/boot/dts/stm32mp13xf.dtsi |   3 +- >>   3 files changed, 46 insertions(+), 68 deletions(-) >> >> diff --git a/arch/arm/boot/dts/stm32mp131.dtsi >> b/arch/arm/boot/dts/stm32mp131.dtsi >> index 78eac53224d4..d7300b00ec19 100644 >> --- a/arch/arm/boot/dts/stm32mp131.dtsi >> +++ b/arch/arm/boot/dts/stm32mp131.dtsi >> @@ -4,6 +4,8 @@ >>    * Author: Alexandre Torgue for >> STMicroelectronics. >>    */ >>   #include >> +#include >> +#include >>     / { >>       #address-cells = <1>; >> @@ -64,54 +66,8 @@ scmi_reset: protocol@16 { >>               }; >>           }; >>       }; >> -    clocks { >> -        clk_axi: clk-axi { >> -            #clock-cells = <0>; >> -            compatible = "fixed-clock"; >> -            clock-frequency = <266500000>; >> -        }; >> - >> -        clk_hse: clk-hse { >> -            #clock-cells = <0>; >> -            compatible = "fixed-clock"; >> -            clock-frequency = <24000000>; >> -        }; >> - >> -        clk_hsi: clk-hsi { >> -            #clock-cells = <0>; >> -            compatible = "fixed-clock"; >> -            clock-frequency = <64000000>; >> -        }; >> - >> -        clk_lsi: clk-lsi { >> -            #clock-cells = <0>; >> -            compatible = "fixed-clock"; >> -            clock-frequency = <32000>; >> -        }; >> - >> -        clk_pclk3: clk-pclk3 { >> -            #clock-cells = <0>; >> -            compatible = "fixed-clock"; >> -            clock-frequency = <104438965>; >> -        }; >>   -        clk_pclk4: clk-pclk4 { >> -            #clock-cells = <0>; >> -            compatible = "fixed-clock"; >> -            clock-frequency = <133250000>; >> -        }; >> - >> -        clk_pll4_p: clk-pll4_p { >> -            #clock-cells = <0>; >> -            compatible = "fixed-clock"; >> -            clock-frequency = <50000000>; >> -        }; >> - >> -        clk_pll4_r: clk-pll4_r { >> -            #clock-cells = <0>; >> -            compatible = "fixed-clock"; >> -            clock-frequency = <99000000>; >> -        }; >> +    clocks { >>       }; >>         intc: interrupt-controller@a0021000 { >> @@ -148,7 +104,8 @@ uart4: serial@40010000 { >>               compatible = "st,stm32h7-uart"; >>               reg = <0x40010000 0x400>; >>               interrupts = ; >> -            clocks = <&clk_hsi>; >> +            clocks = <&rcc UART4_K>; >> +            resets = <&rcc UART4_R>; >>               status = "disabled"; >>           }; >>   @@ -163,7 +120,8 @@ dma1: dma-controller@48000000 { >>                        , >>                        , >>                        ; >> -            clocks = <&clk_pclk4>; >> +            clocks = <&rcc DMA1>; >> +            resets = <&rcc DMA1_R>; >>               #dma-cells = <4>; >>               st,mem2mem; >>               dma-requests = <8>; >> @@ -180,7 +138,8 @@ dma2: dma-controller@48001000 { >>                        , >>                        , >>                        ; >> -            clocks = <&clk_pclk4>; >> +            clocks = <&rcc DMA2>; >> +            resets = <&rcc DMA2_R>; >>               #dma-cells = <4>; >>               st,mem2mem; >>               dma-requests = <8>; >> @@ -189,13 +148,29 @@ dma2: dma-controller@48001000 { >>           dmamux1: dma-router@48002000 { >>               compatible = "st,stm32h7-dmamux"; >>               reg = <0x48002000 0x40>; >> -            clocks = <&clk_pclk4>; >> +            clocks = <&rcc DMAMUX1>; >> +            resets = <&rcc DMAMUX1_R>; >>               #dma-cells = <3>; >>               dma-masters = <&dma1 &dma2>; >>               dma-requests = <128>; >>               dma-channels = <16>; >>           }; >>   +        rcc: rcc@50000000 { >> +            compatible = "st,stm32mp13-rcc", "syscon"; >> +            reg = <0x50000000 0x1000>; >> +            #clock-cells = <1>; >> +            #reset-cells = <1>; >> + >> +            clock-names = "hse", "hsi", "csi", "lse", "lsi"; >> + > > It doesn't match with current yaml description. I'm preparing a patch > to update rcc yaml file. You will have to check that it matches with > this node. > ok Thank's Alex >> +            clocks = <&scmi_clk CK_SCMI_HSE>, >> +                 <&scmi_clk CK_SCMI_HSI>, >> +                 <&scmi_clk CK_SCMI_CSI>, >> +                 <&scmi_clk CK_SCMI_LSE>, >> +                 <&scmi_clk CK_SCMI_LSI>; >> +        }; >> + >>           exti: interrupt-controller@5000d000 { >>               compatible = "st,stm32mp13-exti", "syscon"; >>               interrupt-controller; >> @@ -206,14 +181,14 @@ exti: interrupt-controller@5000d000 { >>           syscfg: syscon@50020000 { >>               compatible = "st,stm32mp157-syscfg", "syscon"; >>               reg = <0x50020000 0x400>; >> -            clocks = <&clk_pclk3>; >> +            clocks = <&rcc SYSCFG>; >>           }; >>             mdma: dma-controller@58000000 { >>               compatible = "st,stm32h7-mdma"; >>               reg = <0x58000000 0x1000>; >>               interrupts = ; >> -            clocks = <&clk_pclk4>; >> +            clocks = <&rcc MDMA>; >>               #dma-cells = <5>; >>               dma-channels = <32>; >>               dma-requests = <48>; >> @@ -225,8 +200,9 @@ sdmmc1: mmc@58005000 { >>               reg = <0x58005000 0x1000>, <0x58006000 0x1000>; >>               interrupts = ; >>               interrupt-names = "cmd_irq"; >> -            clocks = <&clk_pll4_p>; >> +            clocks = <&rcc SDMMC1_K>; >>               clock-names = "apb_pclk"; >> +            resets = <&rcc SDMMC1_R>; >>               cap-sd-highspeed; >>               cap-mmc-highspeed; >>               max-frequency = <130000000>; >> @@ -239,8 +215,9 @@ sdmmc2: mmc@58007000 { >>               reg = <0x58007000 0x1000>, <0x58008000 0x1000>; >>               interrupts = ; >>               interrupt-names = "cmd_irq"; >> -            clocks = <&clk_pll4_p>; >> +            clocks = <&rcc SDMMC2_K>; >>               clock-names = "apb_pclk"; >> +            resets = <&rcc SDMMC2_R>; >>               cap-sd-highspeed; >>               cap-mmc-highspeed; >>               max-frequency = <130000000>; >> @@ -250,7 +227,7 @@ sdmmc2: mmc@58007000 { >>           iwdg2: watchdog@5a002000 { >>               compatible = "st,stm32mp1-iwdg"; >>               reg = <0x5a002000 0x400>; >> -            clocks = <&clk_pclk4>, <&clk_lsi>; >> +            clocks = <&rcc IWDG2>, <&scmi_clk CK_SCMI_LSI>; >>               clock-names = "pclk", "lsi"; >>               status = "disabled"; >>           }; >> @@ -289,7 +266,7 @@ gpioa: gpio@50002000 { >>                   interrupt-controller; >>                   #interrupt-cells = <2>; >>                   reg = <0x0 0x400>; >> -                clocks = <&clk_pclk4>; >> +                clocks = <&rcc GPIOA>; >>                   st,bank-name = "GPIOA"; >>                   ngpios = <16>; >>                   gpio-ranges = <&pinctrl 0 0 16>; >> @@ -301,7 +278,7 @@ gpiob: gpio@50003000 { >>                   interrupt-controller; >>                   #interrupt-cells = <2>; >>                   reg = <0x1000 0x400>; >> -                clocks = <&clk_pclk4>; >> +                clocks = <&rcc GPIOB>; >>                   st,bank-name = "GPIOB"; >>                   ngpios = <16>; >>                   gpio-ranges = <&pinctrl 0 16 16>; >> @@ -313,7 +290,7 @@ gpioc: gpio@50004000 { >>                   interrupt-controller; >>                   #interrupt-cells = <2>; >>                   reg = <0x2000 0x400>; >> -                clocks = <&clk_pclk4>; >> +                clocks = <&rcc GPIOC>; >>                   st,bank-name = "GPIOC"; >>                   ngpios = <16>; >>                   gpio-ranges = <&pinctrl 0 32 16>; >> @@ -325,7 +302,7 @@ gpiod: gpio@50005000 { >>                   interrupt-controller; >>                   #interrupt-cells = <2>; >>                   reg = <0x3000 0x400>; >> -                clocks = <&clk_pclk4>; >> +                clocks = <&rcc GPIOD>; >>                   st,bank-name = "GPIOD"; >>                   ngpios = <16>; >>                   gpio-ranges = <&pinctrl 0 48 16>; >> @@ -337,7 +314,7 @@ gpioe: gpio@50006000 { >>                   interrupt-controller; >>                   #interrupt-cells = <2>; >>                   reg = <0x4000 0x400>; >> -                clocks = <&clk_pclk4>; >> +                clocks = <&rcc GPIOE>; >>                   st,bank-name = "GPIOE"; >>                   ngpios = <16>; >>                   gpio-ranges = <&pinctrl 0 64 16>; >> @@ -349,7 +326,7 @@ gpiof: gpio@50007000 { >>                   interrupt-controller; >>                   #interrupt-cells = <2>; >>                   reg = <0x5000 0x400>; >> -                clocks = <&clk_pclk4>; >> +                clocks = <&rcc GPIOF>; >>                   st,bank-name = "GPIOF"; >>                   ngpios = <16>; >>                   gpio-ranges = <&pinctrl 0 80 16>; >> @@ -361,7 +338,7 @@ gpiog: gpio@50008000 { >>                   interrupt-controller; >>                   #interrupt-cells = <2>; >>                   reg = <0x6000 0x400>; >> -                clocks = <&clk_pclk4>; >> +                clocks = <&rcc GPIOG>; >>                   st,bank-name = "GPIOG"; >>                   ngpios = <16>; >>                   gpio-ranges = <&pinctrl 0 96 16>; >> @@ -373,7 +350,7 @@ gpioh: gpio@50009000 { >>                   interrupt-controller; >>                   #interrupt-cells = <2>; >>                   reg = <0x7000 0x400>; >> -                clocks = <&clk_pclk4>; >> +                clocks = <&rcc GPIOH>; >>                   st,bank-name = "GPIOH"; >>                   ngpios = <15>; >>                   gpio-ranges = <&pinctrl 0 112 15>; >> @@ -385,7 +362,7 @@ gpioi: gpio@5000a000 { >>                   interrupt-controller; >>                   #interrupt-cells = <2>; >>                   reg = <0x8000 0x400>; >> -                clocks = <&clk_pclk4>; >> +                clocks = <&rcc GPIOI>; >>                   st,bank-name = "GPIOI"; >>                   ngpios = <8>; >>                   gpio-ranges = <&pinctrl 0 128 8>; >> diff --git a/arch/arm/boot/dts/stm32mp133.dtsi >> b/arch/arm/boot/dts/stm32mp133.dtsi >> index 0fb1386257cf..531c263c9f46 100644 >> --- a/arch/arm/boot/dts/stm32mp133.dtsi >> +++ b/arch/arm/boot/dts/stm32mp133.dtsi >> @@ -15,7 +15,7 @@ m_can1: can@4400e000 { >>               interrupts = , >>                        ; >>               interrupt-names = "int0", "int1"; >> -            clocks = <&clk_hse>, <&clk_pll4_r>; >> +            clocks = <&scmi_clk CK_SCMI_HSE>, <&rcc FDCAN_K>; >>               clock-names = "hclk", "cclk"; >>               bosch,mram-cfg = <0x0 0 0 32 0 0 2 2>; >>               status = "disabled"; >> @@ -28,7 +28,7 @@ m_can2: can@4400f000 { >>               interrupts = , >>                        ; >>               interrupt-names = "int0", "int1"; >> -            clocks = <&clk_hse>, <&clk_pll4_r>; >> +            clocks = <&scmi_clk CK_SCMI_HSE>, <&rcc FDCAN_K>; >>               clock-names = "hclk", "cclk"; >>               bosch,mram-cfg = <0x1400 0 0 32 0 0 2 2>; >>               status = "disabled"; >> diff --git a/arch/arm/boot/dts/stm32mp13xf.dtsi >> b/arch/arm/boot/dts/stm32mp13xf.dtsi >> index fa6889e30591..4d00e7592882 100644 >> --- a/arch/arm/boot/dts/stm32mp13xf.dtsi >> +++ b/arch/arm/boot/dts/stm32mp13xf.dtsi >> @@ -10,7 +10,8 @@ cryp: crypto@54002000 { >>               compatible = "st,stm32mp1-cryp"; >>               reg = <0x54002000 0x400>; >>               interrupts = ; >> -            clocks = <&clk_axi>; >> +            clocks = <&rcc CRYP1>; >> +            resets = <&rcc CRYP1_R>; >>               status = "disabled"; >>           }; >>       }; >