From patchwork Fri Dec 8 14:36:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriel FERNANDEZ X-Patchwork-Id: 17757 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp5497494vqy; Fri, 8 Dec 2023 06:37:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IFI2TRpjcwz0CHpTl6BfoUPR979HkdcGiCg2VortujH+BenFI8VR5QNkEFiGK/d8M8TZ0rZ X-Received: by 2002:a17:90a:3003:b0:286:6cc1:2cbb with SMTP id g3-20020a17090a300300b002866cc12cbbmr147274pjb.69.1702046262367; Fri, 08 Dec 2023 06:37:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702046262; cv=none; d=google.com; s=arc-20160816; b=FYKTKbfuoKw3m73JWUYAQUIbDr9mxLPKeknrcpr1gzcoD9ytmtnc2pQ4lKkASwxeRF r83YFb9M91WUq5B8DwlilxIc7JRrOnn7+TtnUaTudIJr6nayFpXnSeKt8sVsRrxr723T N4zGyWf7JkAH9a3yqO3W9jxLNIM6q6KH6RO3qGelLTPMLgRAzjqpxi6QzSZA7FLrYkxG WaHSUDJ9x8/5hUa5g7wXEGXh9HvAtw6XQrqMKxn6/saHGTHXB9+GFrSJ5976ctbypq6Z wbbtvINKfApBpnTJLMNB3ByYXwCPtlfXMJJ0GbHLH76hQjFSZVHdpQKjgyuVdvsnOn7+ 3Lbw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=EM8HIGPsa8ExObelNhP+wEvuVcdx1VFlcYQ6bK/movw=; fh=O1UHIcJgxDJiKzLnlRE49sdpYMyGa7Y5uLGsOZ6QxnE=; b=M5Xh7tpRFfRtARo8srbaFlweV7Yd9tkrPIs0LwTVRfZ+fxOgpw6W/4ve1yn9fqDh1K M3P1cigRgYG0foBML/f7Jm+0GBQBG48NqZTxMFlyNSG3ik/Zo9JyO+flr79hwuVPCSzx IAebrbd66pau5IJxKZIlPiCS3SCAbcovLzNF83z8PaJV6giEcR9GWhkbyLF846aLimS5 zIBzCnlzezzmwoB/GhKO09/eS/GHyE7zgADOKWvN9LjkqT+PWwkLcIF6tmWWAuyCwtQZ ycoYVYJ5RSyXLOklUhrS8pE2+DgXSquV1OWimzFimxBPq9glgsYEWy1X4sqMQihsLH7E z2mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=VbBdjvy0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id p2-20020a17090ab90200b00286c168876asi3089684pjr.54.2023.12.08.06.37.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 06:37:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=VbBdjvy0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 0B7B08104993; Fri, 8 Dec 2023 06:37:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573994AbjLHOh0 (ORCPT + 99 others); Fri, 8 Dec 2023 09:37:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573982AbjLHOhY (ORCPT ); Fri, 8 Dec 2023 09:37:24 -0500 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FE811997; Fri, 8 Dec 2023 06:37:30 -0800 (PST) Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 3B88CjL1008014; Fri, 8 Dec 2023 15:37:05 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=selector1; bh=EM8HIGP sa8ExObelNhP+wEvuVcdx1VFlcYQ6bK/movw=; b=VbBdjvy0Q4iRoR1RTwdM0jZ 6LX/+Erts/QNVQ/Ri3TBQhm5fuXlB4mWaMTeIcQM+25F6IB/nsfg9BCmiVlASh9H XTtAGT4DI6rELbxxnvmQD7houqQhn/YMQZ1SiwjToQ1FYAUM2KXj6bkU+V+F1FGU d5+YM4P0PLOkIOXmFNc1jD1B6RgsCtAw6Hnw0VArAHvTIWNGN1nQNJLozFRmtpOM rT2ZxiKevENci5KGMnN5vDCF0l1W9sK+Drp3ZFNMcRPsiZTpfs9kXiUwz5y4AuP4 PdKdotJZNbcW8V5dLnksC1oaAPLV+yKoLdv9ngTCZmxfcsgNaoQHUvnngyS5ChQ= = 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 3utd2pn2hw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Dec 2023 15:37:05 +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 050C2100056; Fri, 8 Dec 2023 15:37:02 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id AECB5229A75; Fri, 8 Dec 2023 15:37:02 +0100 (CET) Received: from localhost (10.252.31.8) 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; Fri, 8 Dec 2023 15:37:02 +0100 From: To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Philipp Zabel , Gabriel Fernandez CC: , , , , Subject: [PATCH v6 0/5] Introduce STM32MP257 clock driver Date: Fri, 8 Dec 2023 15:36:55 +0100 Message-ID: <20231208143700.354785-1-gabriel.fernandez@foss.st.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.252.31.8] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) 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-08_09,2023-12-07_01,2023-05-22_02 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Fri, 08 Dec 2023 06:37:38 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784724861973761370 X-GMAIL-MSGID: 1784724861973761370 From: Gabriel Fernandez This patch-set introduces clock driver for STM32MP257 based on Arm Cortex-35. It creates also a menuconfig for all STM32MP clock drivers. The STM32MP1 and STM32MP13 are now in same stm32 directory v6: - remove useless defines in drivers/clk/stm32/stm32mp25_rcc.h v5: - Fix sparse warnings: was not declared. Should it be static? drivers/clk/stm32/clk-stm32mp13.c:1516:29: symbol 'stm32mp13_reset_data' drivers/clk/stm32/clk-stm32mp1.c:2148:29: symbol 'stm32mp1_reset_data' drivers/clk/stm32/clk-stm32mp25.c:1003:5: symbol 'stm32mp25_cpt_gate' drivers/clk/stm32/clk-stm32mp25.c:1005:29: symbol 'stm32mp25_clock_data' drivers/clk/stm32/clk-stm32mp25.c:1011:29: symbol 'stm32mp25_reset_data' v4: - use GPL-2.0-only OR BSD-2-Clause for clock and reset binding files - use quotes ' for #clock-cells and #reset-cells in YAML documentation - reset binding start now to 0 instead 1 - improve management of reset lines that are not managed v3: - from Rob Herring change clock item description in YAML documentation v2: - rework reset binding (use ID witch start from 0) - rework reset driver to manage STM32MP13 / STM32MP15 / STM32MP25 - rework YAML documentation Gabriel Fernandez (5): clk: stm32mp1: move stm32mp1 clock driver into stm32 directory clk: stm32mp1: use stm32mp13 reset driver dt-bindings: stm32: add clocks and reset binding for stm32mp25 platform clk: stm32: introduce clocks for STM32MP257 platform arm64: dts: st: add rcc support in stm32mp251 .../bindings/clock/st,stm32mp25-rcc.yaml | 76 ++ arch/arm64/boot/dts/st/stm32mp251.dtsi | 59 +- drivers/clk/Kconfig | 11 +- drivers/clk/Makefile | 1 - drivers/clk/stm32/Kconfig | 36 + drivers/clk/stm32/Makefile | 2 + drivers/clk/stm32/clk-stm32-core.c | 5 +- drivers/clk/stm32/clk-stm32-core.h | 5 +- drivers/clk/{ => stm32}/clk-stm32mp1.c | 127 +- drivers/clk/stm32/clk-stm32mp13.c | 9 +- drivers/clk/stm32/clk-stm32mp25.c | 1125 +++++++++++++++++ drivers/clk/stm32/reset-stm32.c | 73 +- drivers/clk/stm32/reset-stm32.h | 15 +- drivers/clk/stm32/stm32mp25_rcc.h | 712 +++++++++++ include/dt-bindings/clock/st,stm32mp25-rcc.h | 492 +++++++ include/dt-bindings/reset/st,stm32mp25-rcc.h | 167 +++ 16 files changed, 2734 insertions(+), 181 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/st,stm32mp25-rcc.yaml create mode 100644 drivers/clk/stm32/Kconfig rename drivers/clk/{ => stm32}/clk-stm32mp1.c (95%) create mode 100644 drivers/clk/stm32/clk-stm32mp25.c create mode 100644 drivers/clk/stm32/stm32mp25_rcc.h create mode 100644 include/dt-bindings/clock/st,stm32mp25-rcc.h create mode 100644 include/dt-bindings/reset/st,stm32mp25-rcc.h