Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp992642rdb; Wed, 6 Dec 2023 06:02:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IH3kiNduJ4SPzOh5YHGNxdnxh4GjIvP/Oo6749BLBMqrsAMRXJDCLjUmcKLfvZKdbhpkJD6 X-Received: by 2002:a05:6358:904e:b0:16e:29bd:37be with SMTP id f14-20020a056358904e00b0016e29bd37bemr1297886rwf.28.1701871354457; Wed, 06 Dec 2023 06:02:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701871354; cv=none; d=google.com; s=arc-20160816; b=uvmgGj0tbnS7InrTs0jevZidJ5dDZise4eA7puljISeVwROS9kRBeFL8fFEowbZQFw NqdXk6r6GStiWTDz7R0L6B2b1NNMUgtxO8FwfzLPdx/Ox8f3U8fLkHrR5ikLAsdTo4ni jASUQKPP6HOcGJJwUXH/GM/hc/ZCzZx2b/xqzLCh/kkpdVYdoBjQGd5+Up+Tc+A+NIHE qFjKEzRJz+b6ddZgQK9jjUYNgqK07swWpDg/LQlUkC59962I2KIB/bMBBC6WpFRoGIEV 9HCXqBVfIX8Cyj23D6ATHT51geIrdFPGJjImHMwjbgxcxVtcG6dWervEdcwDCfZn/sFi Tiqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=e5JQ/h42L5uhpTPt24TWXUIHpp+cXePsoRZw+56u2lo=; fh=O1UHIcJgxDJiKzLnlRE49sdpYMyGa7Y5uLGsOZ6QxnE=; b=rN7EM6mdUW0kUhvhM7GK6Ysso/8RrmZd3LjtWqEUWl/d6w73KI4MSyvVkyi71YmNm6 nsZDiO8TQ3KVAw9OdZUa6UXLRBrRy3bUhmetOiSitYzz33SogpL1qB5wAUfUwIoJZrv9 gIAnVbDaIeL+4VPQoQt3UQaBr53SO3EQtFQ0tpBKKK5wUomp6GhSDSWw7O5PjeTt3Gqq Ul7YSAAtHeQF6zhwD76ivauqrjZpHcwMDSy879nngy2w08oi70+vxTBRd8qOCwvdOq6m wV/dOfiXsTvGsmp4eoLdDAxFCRf+mfQ2QEcHe5Bc1HGuhyBuOqyYGwW8pW3crVN9ibwN nPVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=5imwtgs1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id ca39-20020a056a0206a700b005c6c9572a4asi499351pgb.569.2023.12.06.06.02.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 06:02:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=5imwtgs1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1A6858029AC7; Wed, 6 Dec 2023 06:02:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378770AbjLFOCQ (ORCPT + 99 others); Wed, 6 Dec 2023 09:02:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378774AbjLFOCP (ORCPT ); Wed, 6 Dec 2023 09:02:15 -0500 Received: from mx08-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 519CDD5E; Wed, 6 Dec 2023 06:02:04 -0800 (PST) Received: from pps.filterd (m0369457.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 3B6Dna5q025367; Wed, 6 Dec 2023 15:01:49 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= selector1; bh=e5JQ/h42L5uhpTPt24TWXUIHpp+cXePsoRZw+56u2lo=; b=5i mwtgs1qjhM5lwuFBgF6aiYFMF8iEhU9A9aiPKwX5nmik+2+KtsHowQiros+6b0LW QcgI4HZ7UBX73lzxbZb/OBj8vSXPov2QKC7AOIHgysQE0rAgJ1hhzRltvbMUllYx kbRskP+D83Hr6sBKOm1yTgn5WJpjp+lXkKKCzHIN+RWOlndPJiTpLMLE6bNKWMEp Ze4XpoC8fVxkgL+lD/W+ysdyuiMJGs0bVP0HvhnXB851Kkw7SY7Zf4N49y9+an6Q /DLK/jXqIR5Y6r4keCzAMmXIKfIws/KZ0RLCqxbZ0MFPryo5GY9q4XViTxhq77L2 v0/+7RlayxIb1RoESYYA== 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 3utd2jkb6v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 06 Dec 2023 15:01:49 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 50772100053; Wed, 6 Dec 2023 15:01:49 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 475FF233C77; Wed, 6 Dec 2023 15:01:49 +0100 (CET) Received: from localhost (10.201.21.240) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 6 Dec 2023 15:01:48 +0100 From: To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Philipp Zabel , Gabriel Fernandez CC: , , , , Subject: [PATCH v5 5/5] arm64: dts: st: add rcc support in stm32mp251 Date: Wed, 6 Dec 2023 15:00:29 +0100 Message-ID: <20231206140029.492906-6-gabriel.fernandez@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231206140029.492906-1-gabriel.fernandez@foss.st.com> References: <20231206140029.492906-1-gabriel.fernandez@foss.st.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.201.21.240] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-06_11,2023-12-06_01,2023-05-22_02 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 06 Dec 2023 06:02:29 -0800 (PST) From: Gabriel Fernandez Add RCC support to manage clocks and resets on the STM32MP251. Signed-off-by: Gabriel Fernandez --- arch/arm64/boot/dts/st/stm32mp251.dtsi | 59 ++++++++++++++------------ 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi index 124403f5f1f4..dfbdb3a773e4 100644 --- a/arch/arm64/boot/dts/st/stm32mp251.dtsi +++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi @@ -3,7 +3,9 @@ * Copyright (C) STMicroelectronics 2023 - All Rights Reserved * Author: Alexandre Torgue for STMicroelectronics. */ +#include #include +#include / { #address-cells = <2>; @@ -35,22 +37,10 @@ arm_wdt: watchdog { }; clocks { - ck_flexgen_08: ck-flexgen-08 { + clk_rcbsec: clk-rcbsec { #clock-cells = <0>; compatible = "fixed-clock"; - clock-frequency = <100000000>; - }; - - ck_flexgen_51: ck-flexgen-51 { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = <200000000>; - }; - - ck_icn_ls_mcu: ck-icn-ls-mcu { - #clock-cells = <0>; - compatible = "fixed-clock"; - clock-frequency = <200000000>; + clock-frequency = <64000000>; }; }; @@ -122,7 +112,7 @@ usart2: serial@400e0000 { compatible = "st,stm32h7-uart"; reg = <0x400e0000 0x400>; interrupts = ; - clocks = <&ck_flexgen_08>; + clocks = <&rcc CK_KER_USART2>; status = "disabled"; }; @@ -131,7 +121,7 @@ sdmmc1: mmc@48220000 { arm,primecell-periphid = <0x00353180>; reg = <0x48220000 0x400>, <0x44230400 0x8>; interrupts = ; - clocks = <&ck_flexgen_51>; + clocks = <&rcc CK_KER_SDMMC1 >; clock-names = "apb_pclk"; cap-sd-highspeed; cap-mmc-highspeed; @@ -140,6 +130,19 @@ sdmmc1: mmc@48220000 { }; }; + rcc: clock-controller@44200000 { + compatible = "st,stm32mp25-rcc"; + reg = <0x44200000 0x10000>; + #clock-cells = <1>; + #reset-cells = <1>; + clock-names = "hse", "hsi", "msi", "lse", "lsi"; + clocks = <&scmi_clk CK_SCMI_HSE>, + <&scmi_clk CK_SCMI_HSI>, + <&scmi_clk CK_SCMI_MSI>, + <&scmi_clk CK_SCMI_LSE>, + <&scmi_clk CK_SCMI_LSI>; + }; + syscfg: syscon@44230000 { compatible = "st,stm32mp25-syscfg", "syscon"; reg = <0x44230000 0x10000>; @@ -158,7 +161,7 @@ gpioa: gpio@44240000 { interrupt-controller; #interrupt-cells = <2>; reg = <0x0 0x400>; - clocks = <&ck_icn_ls_mcu>; + clocks = <&scmi_clk CK_SCMI_GPIOA>; st,bank-name = "GPIOA"; status = "disabled"; }; @@ -169,7 +172,7 @@ gpiob: gpio@44250000 { interrupt-controller; #interrupt-cells = <2>; reg = <0x10000 0x400>; - clocks = <&ck_icn_ls_mcu>; + clocks = <&scmi_clk CK_SCMI_GPIOB>; st,bank-name = "GPIOB"; status = "disabled"; }; @@ -180,7 +183,7 @@ gpioc: gpio@44260000 { interrupt-controller; #interrupt-cells = <2>; reg = <0x20000 0x400>; - clocks = <&ck_icn_ls_mcu>; + clocks = <&scmi_clk CK_SCMI_GPIOC>; st,bank-name = "GPIOC"; status = "disabled"; }; @@ -191,7 +194,7 @@ gpiod: gpio@44270000 { interrupt-controller; #interrupt-cells = <2>; reg = <0x30000 0x400>; - clocks = <&ck_icn_ls_mcu>; + clocks = <&scmi_clk CK_SCMI_GPIOD>; st,bank-name = "GPIOD"; status = "disabled"; }; @@ -202,7 +205,7 @@ gpioe: gpio@44280000 { interrupt-controller; #interrupt-cells = <2>; reg = <0x40000 0x400>; - clocks = <&ck_icn_ls_mcu>; + clocks = <&scmi_clk CK_SCMI_GPIOE>; st,bank-name = "GPIOE"; status = "disabled"; }; @@ -213,7 +216,7 @@ gpiof: gpio@44290000 { interrupt-controller; #interrupt-cells = <2>; reg = <0x50000 0x400>; - clocks = <&ck_icn_ls_mcu>; + clocks = <&scmi_clk CK_SCMI_GPIOF>; st,bank-name = "GPIOF"; status = "disabled"; }; @@ -224,7 +227,7 @@ gpiog: gpio@442a0000 { interrupt-controller; #interrupt-cells = <2>; reg = <0x60000 0x400>; - clocks = <&ck_icn_ls_mcu>; + clocks = <&scmi_clk CK_SCMI_GPIOG>; st,bank-name = "GPIOG"; status = "disabled"; }; @@ -235,7 +238,7 @@ gpioh: gpio@442b0000 { interrupt-controller; #interrupt-cells = <2>; reg = <0x70000 0x400>; - clocks = <&ck_icn_ls_mcu>; + clocks = <&scmi_clk CK_SCMI_GPIOH>; st,bank-name = "GPIOH"; status = "disabled"; }; @@ -246,7 +249,7 @@ gpioi: gpio@442c0000 { interrupt-controller; #interrupt-cells = <2>; reg = <0x80000 0x400>; - clocks = <&ck_icn_ls_mcu>; + clocks = <&scmi_clk CK_SCMI_GPIOI>; st,bank-name = "GPIOI"; status = "disabled"; }; @@ -257,7 +260,7 @@ gpioj: gpio@442d0000 { interrupt-controller; #interrupt-cells = <2>; reg = <0x90000 0x400>; - clocks = <&ck_icn_ls_mcu>; + clocks = <&scmi_clk CK_SCMI_GPIOJ>; st,bank-name = "GPIOJ"; status = "disabled"; }; @@ -268,7 +271,7 @@ gpiok: gpio@442e0000 { interrupt-controller; #interrupt-cells = <2>; reg = <0xa0000 0x400>; - clocks = <&ck_icn_ls_mcu>; + clocks = <&scmi_clk CK_SCMI_GPIOK>; st,bank-name = "GPIOK"; status = "disabled"; }; @@ -287,7 +290,7 @@ gpioz: gpio@46200000 { interrupt-controller; #interrupt-cells = <2>; reg = <0 0x400>; - clocks = <&ck_icn_ls_mcu>; + clocks = <&scmi_clk CK_SCMI_GPIOZ>; st,bank-name = "GPIOZ"; st,bank-ioport = <11>; status = "disabled"; -- 2.25.1