From patchwork Mon Jul 16 08:19:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 944214 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="VWTCm8Hx"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41Tc702dV2z9s3q for ; Mon, 16 Jul 2018 18:30:36 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 109E5C21FDE; Mon, 16 Jul 2018 08:24:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 98D48C2203E; Mon, 16 Jul 2018 08:21:13 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8D76AC2206F; Mon, 16 Jul 2018 08:20:52 +0000 (UTC) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by lists.denx.de (Postfix) with ESMTPS id 62765C22086 for ; Mon, 16 Jul 2018 08:20:45 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id j8-v6so1289197pff.6 for ; Mon, 16 Jul 2018 01:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=k8FJHusDJXPbKH7LxeImbiggj74oHGRXxzkw+4zj8q0=; b=VWTCm8HxVDCWGSFjAIesFOl5Yb6oKjYTlAZHZWuohd/XH+Le2iQ0tC6An3qlknmFlN R6pg228z4h72M4XmPZmoiYxg/0hIrOWtDnw4s5a3E+xQIS1JUBqVuhlEWr6nXIWG6K/d BQ7HugPnZZPMg4cvbaGDWncdoo+0OhChQdflI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=k8FJHusDJXPbKH7LxeImbiggj74oHGRXxzkw+4zj8q0=; b=m/vGlxD4gIBZdPAIy0PomA6dGdmgP1oyPYHt9QvKpc+r43Ud5p6ZLdOBw6ytCy7TAK Rf+8g+L9b0PnTYpg61gduBxYQjRjwB5K80JfWapZZsKZ6uC7VBaw+I7m8UB91AAU9ats OmbZjKF96o/31vznutTVVViyKS0OLmOJAiO8Orvtdyg/7A8k3rckhLL9QvZRB7mkRsqr XQO7jZMIkDowZZCY/6pYqCnUPtYkBDAhXy72zZl4tfCUGvkw8u6QawdIA/FkxGegJJbO tuviAzZUB37I+j69Qw6HCIhTn94OaQNJ31t15g+1C9DEuuxGX6s9r5IzNLx7UEHx5wBq Fx+A== X-Gm-Message-State: AOUpUlHlA5FTeSWlIRzmD458h3ycLnvQmebCfaVjbXneBBA3Eilbi5jv fpiSVU7rPVDQkneL9+5UUJeNkQ== X-Google-Smtp-Source: AAOMgpc6AbxhbAH8SDvoi3LLvplNHWanVHu4LFzDoXESsxhnxG9Je4yESn8n2A7BDVud/cdxoQzXxA== X-Received: by 2002:a62:a119:: with SMTP id b25-v6mr16838980pff.163.1531729243902; Mon, 16 Jul 2018 01:20:43 -0700 (PDT) Received: from localhost.localdomain ([49.206.203.161]) by smtp.gmail.com with ESMTPSA id q26-v6sm18384640pff.9.2018.07.16.01.20.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jul 2018 01:20:43 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Jaehoon Chung Date: Mon, 16 Jul 2018 13:49:38 +0530 Message-Id: <20180716081956.32434-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180716081956.32434-1-jagan@amarulasolutions.com> References: <20180716081956.32434-1-jagan@amarulasolutions.com> Cc: Tom Rini , Stefan Mavrodiev , Andre Przywara , u-boot@lists.denx.de Subject: [U-Boot] [PATCH 07/25] ARM: dts: sun7i: Sync A20 MMC nodes from Linux X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" DM_MMC need MMC nodes in dtsi need to update and follow Linux notation to support dm driven mmc driver. So sync mmc nodes for sun7i-a20 from Linux. This will also useful for CLK driver handling in future. Last linux commit for sun7i-a20.dtsi: commit e3b742026b92a141b43560858b089921953a63de Author: Viresh Kumar Date: Tue Jun 5 10:17:49 2018 +0530 ARM: dts: sunxi: Add missing cooling device properties for CPUs Last linux commit for sun7i-a20-ccu.h: commit c84f5683f6e9fee78e054431d89121225ccb7464 Author: Priit Laes Date: Wed Aug 23 20:23:29 2017 +0300 clk: sunxi-ng: Add sun4i/sun7i CCU driver Cc: Stefan Mavrodiev Signed-off-by: Jagan Teki --- arch/arm/dts/sun7i-a20.dtsi | 102 ++++++++-------------- include/dt-bindings/clock/sun7i-a20-ccu.h | 53 +++++++++++ 2 files changed, 87 insertions(+), 68 deletions(-) create mode 100644 include/dt-bindings/clock/sun7i-a20-ccu.h diff --git a/arch/arm/dts/sun7i-a20.dtsi b/arch/arm/dts/sun7i-a20.dtsi index 4394711e5a..620e4d5a21 100644 --- a/arch/arm/dts/sun7i-a20.dtsi +++ b/arch/arm/dts/sun7i-a20.dtsi @@ -49,6 +49,7 @@ #include #include +#include #include / { @@ -419,46 +420,6 @@ clock-output-names = "ms"; }; - mmc0_clk: clk@01c20088 { - #clock-cells = <1>; - compatible = "allwinner,sun4i-a10-mmc-clk"; - reg = <0x01c20088 0x4>; - clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; - clock-output-names = "mmc0", - "mmc0_output", - "mmc0_sample"; - }; - - mmc1_clk: clk@01c2008c { - #clock-cells = <1>; - compatible = "allwinner,sun4i-a10-mmc-clk"; - reg = <0x01c2008c 0x4>; - clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; - clock-output-names = "mmc1", - "mmc1_output", - "mmc1_sample"; - }; - - mmc2_clk: clk@01c20090 { - #clock-cells = <1>; - compatible = "allwinner,sun4i-a10-mmc-clk"; - reg = <0x01c20090 0x4>; - clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; - clock-output-names = "mmc2", - "mmc2_output", - "mmc2_sample"; - }; - - mmc3_clk: clk@01c20094 { - #clock-cells = <1>; - compatible = "allwinner,sun4i-a10-mmc-clk"; - reg = <0x01c20094 0x4>; - clocks = <&osc24M>, <&pll6 1>, <&pll5 1>; - clock-output-names = "mmc3", - "mmc3_output", - "mmc3_sample"; - }; - ts_clk: clk@01c20098 { #clock-cells = <0>; compatible = "allwinner,sun4i-a10-mod0-clk"; @@ -904,14 +865,13 @@ #size-cells = <0>; }; - mmc0: mmc@01c0f000 { - compatible = "allwinner,sun7i-a20-mmc", - "allwinner,sun5i-a13-mmc"; + mmc0: mmc@1c0f000 { + compatible = "allwinner,sun7i-a20-mmc"; reg = <0x01c0f000 0x1000>; - clocks = <&ahb_gates 8>, - <&mmc0_clk 0>, - <&mmc0_clk 1>, - <&mmc0_clk 2>; + clocks = <&ccu CLK_AHB_MMC0>, + <&ccu CLK_MMC0>, + <&ccu CLK_MMC0_OUTPUT>, + <&ccu CLK_MMC0_SAMPLE>; clock-names = "ahb", "mmc", "output", @@ -922,14 +882,13 @@ #size-cells = <0>; }; - mmc1: mmc@01c10000 { - compatible = "allwinner,sun7i-a20-mmc", - "allwinner,sun5i-a13-mmc"; + mmc1: mmc@1c10000 { + compatible = "allwinner,sun7i-a20-mmc"; reg = <0x01c10000 0x1000>; - clocks = <&ahb_gates 9>, - <&mmc1_clk 0>, - <&mmc1_clk 1>, - <&mmc1_clk 2>; + clocks = <&ccu CLK_AHB_MMC1>, + <&ccu CLK_MMC1>, + <&ccu CLK_MMC1_OUTPUT>, + <&ccu CLK_MMC1_SAMPLE>; clock-names = "ahb", "mmc", "output", @@ -940,14 +899,13 @@ #size-cells = <0>; }; - mmc2: mmc@01c11000 { - compatible = "allwinner,sun7i-a20-mmc", - "allwinner,sun5i-a13-mmc"; + mmc2: mmc@1c11000 { + compatible = "allwinner,sun7i-a20-mmc"; reg = <0x01c11000 0x1000>; - clocks = <&ahb_gates 10>, - <&mmc2_clk 0>, - <&mmc2_clk 1>, - <&mmc2_clk 2>; + clocks = <&ccu CLK_AHB_MMC2>, + <&ccu CLK_MMC2>, + <&ccu CLK_MMC2_OUTPUT>, + <&ccu CLK_MMC2_SAMPLE>; clock-names = "ahb", "mmc", "output", @@ -958,14 +916,13 @@ #size-cells = <0>; }; - mmc3: mmc@01c12000 { - compatible = "allwinner,sun7i-a20-mmc", - "allwinner,sun5i-a13-mmc"; + mmc3: mmc@1c12000 { + compatible = "allwinner,sun7i-a20-mmc"; reg = <0x01c12000 0x1000>; - clocks = <&ahb_gates 11>, - <&mmc3_clk 0>, - <&mmc3_clk 1>, - <&mmc3_clk 2>; + clocks = <&ccu CLK_AHB_MMC3>, + <&ccu CLK_MMC3>, + <&ccu CLK_MMC3_OUTPUT>, + <&ccu CLK_MMC3_SAMPLE>; clock-names = "ahb", "mmc", "output", @@ -1085,6 +1042,15 @@ #size-cells = <0>; }; + ccu: clock@1c20000 { + compatible = "allwinner,sun7i-a20-ccu"; + reg = <0x01c20000 0x400>; + clocks = <&osc24M>, <&osc32k>; + clock-names = "hosc", "losc"; + #clock-cells = <1>; + #reset-cells = <1>; + }; + pio: pinctrl@01c20800 { compatible = "allwinner,sun7i-a20-pinctrl"; reg = <0x01c20800 0x400>; diff --git a/include/dt-bindings/clock/sun7i-a20-ccu.h b/include/dt-bindings/clock/sun7i-a20-ccu.h new file mode 100644 index 0000000000..045a5178da --- /dev/null +++ b/include/dt-bindings/clock/sun7i-a20-ccu.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2017 Priit Laes + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef _DT_BINDINGS_CLK_SUN7I_A20_H_ +#define _DT_BINDINGS_CLK_SUN7I_A20_H_ + +#include + +#define CLK_MBUS 166 +#define CLK_HDMI1_SLOW 167 +#define CLK_HDMI1 168 +#define CLK_OUT_A 169 +#define CLK_OUT_B 170 + +#endif /* _DT_BINDINGS_CLK_SUN7I_A20_H_ */