From patchwork Tue Jul 3 14:57:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yixun Lan X-Patchwork-Id: 10503199 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D8A226028F for ; Tue, 3 Jul 2018 07:01:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3DEA2852E for ; Tue, 3 Jul 2018 07:01:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6BC5288B7; Tue, 3 Jul 2018 07:01:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6EE6F2852E for ; Tue, 3 Jul 2018 07:01:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=apxY9mMJvWp2mdw9oyh1fppn+QiLheL3umWAS+gnid8=; b=sppbMP1TPJAgmE H27rinQUEj5CmvTqO2pPzjGSt2YZt2kHtWeM0DgVz4cg9niYYAQ4CVTXhTzN8xTZmKmjEXmVLWSiT AP/jOrFm2psbljF975vERhexvSdYQBYK5ADxlfV6hDIXmx6MGe7NRUle6JkEX9P/0Sibxey0yH81P +XBky7IDWLC2AWMnP3D2xL0mTdzwrWi8L3l1oUvCF0WPhjIIBhzOFJNY0P17BC1qxjHbeixEAdvbS cwkB9/p0WX3g4gaT9iZE945PvGH0G7CE+PVVgda9HJ0rL9/LyO5MsmGZHU4oYEoUFSCnVbeW7zzhE NFpPIYEbH10TCCiYafkg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1faFJi-0004Ru-SG; Tue, 03 Jul 2018 07:01:38 +0000 Received: from mail-sh2.amlogic.com ([58.32.228.45]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1faFJ1-0003Ne-KY; Tue, 03 Jul 2018 07:01:36 +0000 Received: from localhost.localdomain (10.18.20.250) by mail-sh2.amlogic.com (10.18.11.6) with Microsoft SMTP Server id 15.0.1320.4; Tue, 3 Jul 2018 14:59:34 +0800 From: Yixun Lan To: Jerome Brunet , Neil Armstrong Subject: [PATCH 1/3] clk: meson: add DT documentation for emmc clock controller Date: Tue, 3 Jul 2018 14:57:14 +0000 Message-ID: <20180703145716.31860-2-yixun.lan@amlogic.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180703145716.31860-1-yixun.lan@amlogic.com> References: <20180703145716.31860-1-yixun.lan@amlogic.com> MIME-Version: 1.0 X-Originating-IP: [10.18.20.250] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180703_000056_649056_9F93F5CE X-CRM114-Status: GOOD ( 10.03 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , devicetree@vger.kernel.org, Stephen Boyd , Kevin Hilman , Michael Turquette , Yixun Lan , linux-kernel@vger.kernel.org, Boris Brezillon , Liang Yang , Qiufang Dai , Miquel Raynal , Carlo Caione , linux-amlogic@lists.infradead.org, Martin Blumenstingl , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jian Hu Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Document the EMMC sub clock controller driver, the potential consumer of this driver is EMMC or NAND. Signed-off-by: Yixun Lan --- .../bindings/clock/amlogic,emmc-clkc.txt | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/amlogic,emmc-clkc.txt diff --git a/Documentation/devicetree/bindings/clock/amlogic,emmc-clkc.txt b/Documentation/devicetree/bindings/clock/amlogic,emmc-clkc.txt new file mode 100644 index 000000000000..5534bd446363 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/amlogic,emmc-clkc.txt @@ -0,0 +1,45 @@ +* Amlogic EMMC Sub Clock Controller Driver + +The Amlogic EMMC clock controller generates and supplies clock to support +EMMC and NAND controller + +Required Properties: + +- compatible: should be: + "amlogic,emmc-clkc" + +- #clock-cells: should be 1. + +Two clocks are provided as the parent of this EMMC clock controller driver from +upper layer clock controller - eg "amlogic,axg-clkc" in AXG platfrom. +The main consumer of this driver is EMMC or NAND, to specify which the clock +they may consume, the preprocessor macros in the dt-bindings/clock/emmc-clkc.h +header and can be used in device tree sources. + +Parent node should have the following properties : +- compatible: "syscon", "simple-mfd, and "amlogic,emmc-clkc" +- reg: base address and size of the EMMC control register space. + +Example: Clock controller node: + +sd_emmc_c_clkc: clock-controller@7000 { + compatible = "amlogic,emmc-clkc", "syscon", "simple-mfd"; + reg = <0x0 0x7000 0x0 0x4>; + #clock-cells = <1>; + + clock-names = "clkin0", "clkin1"; + clocks = <&clkc CLKID_SD_EMMC_C_CLK0>, + <&clkc CLKID_FCLK_DIV2>; +}; + +Example: NAND controller node that consumes the clock generated by the clock + controller: + + nand: nfc@7800 { + compatible = "amlogic,meson-axg-nfc"; + reg = <0x0 0x7800 0x0 0x100>; + interrupts = ; + clocks = <&clkc CLKID_SD_EMMC_C>, + <&sd_emmc_c_clkc CLKID_EMMC_C_DIV>; + clock-names = "core", "device"; + };