Received: by 10.223.185.116 with SMTP id b49csp6540784wrg; Thu, 8 Mar 2018 09:04:51 -0800 (PST) X-Google-Smtp-Source: AG47ELu5CfcCqJeaUrUSeXzRtqn2XvzEYOPkWDGZtBy/6X1tHnzQ0GzQXN1bPhF/uawfXJn+GKHW X-Received: by 10.99.42.207 with SMTP id q198mr21013647pgq.186.1520528690901; Thu, 08 Mar 2018 09:04:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520528690; cv=none; d=google.com; s=arc-20160816; b=xvDbddaMqwkKIf5zPRbi6QnahJN2eVV6PGNV+NI+YZ4zXT7f7aWXNl6bq3iJmz104p pSs2ih/VDpOuSPttSfq+FPFbwa/R9+3aBsdICMZjGfGRPZfIXUDv5eF5++uu/TJLEprf UZQVVMUjC8lWslZBRYPPFZmBqPHvDX/Vrn2fEfvebeCVbuDM3GJC32mCM1T1rZjify96 IUySKwZ/rkOJHVLKTDFyn6vZtohMlVgcvAZmBkYIvgVFYxNaGv/8oQFRxlDYoo0ojabQ QzQz5jQsvbutg3xq9hbVVNlYdc+kn1/s4TSVj5daAwNvEDhKyCgqEO23C5S82GHJzfaO 87AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=kjFVg05ezfyvYKN8bH1dUxulMYu1AqErryaA3p5hLis=; b=qEP0SgGiKgTc3/4+CYDQmyMNKZAQ6SWVIpdjun7Vj1fOlYiSyYy+rURtmGNXfTJ5EZ GD8zzQyN4SLyRru7TsgyF6iiQ09lcgdRA8WrwYcscXfv/Ne3W1p6pmm0t701z5p/qvX7 R0OR5lgWj1AmeTBEwk/imwgF5qhwFmWAQptBSx8oFJ6CVN0HEitbWO9Gf6G4i56d9gzV iW1GEz/ExAZCy5Wrisu0kY1vypfgMpTdxbAdQUefjhjH7EgX0LaVoG3gfxanQEYyqZHI ApJPfLUeD7SHr3a4cv2Dbj19saoD0qBthIhCy/KTfdYzf6ot5ib9W99+v++iC1H3Uj6V EU3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r16si13290479pgu.449.2018.03.08.09.04.32; Thu, 08 Mar 2018 09:04:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933767AbeCHQyp (ORCPT + 99 others); Thu, 8 Mar 2018 11:54:45 -0500 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:57358 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932131AbeCHQyn (ORCPT ); Thu, 8 Mar 2018 11:54:43 -0500 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w28Go7gr014799; Thu, 8 Mar 2018 17:54:18 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2gk853g9th-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 08 Mar 2018 17:54:18 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6C22F3A; Thu, 8 Mar 2018 16:54:17 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag4node2.st.com [10.75.127.11]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4A0F05092; Thu, 8 Mar 2018 16:54:17 +0000 (GMT) Received: from localhost (10.75.127.45) by SFHDAG4NODE2.st.com (10.75.127.11) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Thu, 8 Mar 2018 17:54:16 +0100 From: To: , Rob Herring , Mark Rutland , Lee Jones , Maxime Coquelin , Alexandre Torgue , Michael Turquette , Stephen Boyd , Gabriel Fernandez CC: , , , , , , Loic PALLARDY , benjamin GAIGNARD Subject: [PATCH v2 01/12] dt-bindings: Document STM32MP1 Reset Clock Controller (RCC) bindings Date: Thu, 8 Mar 2018 17:53:54 +0100 Message-ID: <1520528045-18330-2-git-send-email-gabriel.fernandez@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520528045-18330-1-git-send-email-gabriel.fernandez@st.com> References: <1520528045-18330-1-git-send-email-gabriel.fernandez@st.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.75.127.45] X-ClientProxiedBy: SFHDAG8NODE2.st.com (10.75.127.23) To SFHDAG4NODE2.st.com (10.75.127.11) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-08_10:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gabriel Fernandez The RCC block is responsible of the management of the clock and reset generation for the complete circuit. Signed-off-by: Gabriel Fernandez --- .../devicetree/bindings/clock/st,stm32mp1-rcc.txt | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.txt diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.txt b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.txt new file mode 100644 index 0000000..fb9495e --- /dev/null +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.txt @@ -0,0 +1,60 @@ +STMicroelectronics STM32 Peripheral Reset Clock Controller +========================================================== + +The RCC IP is both a reset and a clock controller. + +RCC makes also power management (resume/supend and wakeup interrupt). + +Please also refer to reset.txt for common reset controller binding usage. + +Please also refer to clock-bindings.txt for common clock controller +binding usage. + + +Required properties: +- compatible: "st,stm32mp1-rcc", "syscon" +- reg: should be register base and length as documented in the datasheet +- #clock-cells: 1, device nodes should specify the clock in their + "clocks" property, containing a phandle to the clock device node, + an index specifying the clock to use. +- #reset-cells: Shall be 1 +- interrupts: Should contain a general interrupt line and a interrupt line + to the wake-up of processor (CSTOP). + +Example: + rcc: rcc@50000000 { + compatible = "st,stm32mp1-rcc", "syscon"; + reg = <0x50000000 0x1000>; + #clock-cells = <1>; + #reset-cells = <1>; + interrupts = , + ; + }; + +Specifying clocks +================= + +All available clocks are defined as preprocessor macros in +dt-bindings/clock/stm32mp1-clks.h header and can be used in device +tree sources. + +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 on STM32MP1, for LTDC reset: + ltdc = APB4_RSTSETR_offset / 4 * 32 + LTDC_bit_offset + = 0x180 / 4 * 32 + 0 = 3072 + +The list of valid indices for STM32MP1 is available in: +include/dt-bindings/reset-controller/stm32mp1-resets.h + +This file implements defines like: +#define LTDC_R 3072 -- 1.9.1