From patchwork Sun Sep 3 13:50:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Priit Laes X-Patchwork-Id: 9936353 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 D495B601D7 for ; Sun, 3 Sep 2017 13:52:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2B452862B for ; Sun, 3 Sep 2017 13:52:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B419528657; Sun, 3 Sep 2017 13:52:03 +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=-3.4 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 DAB8D2862B for ; Sun, 3 Sep 2017 13:52:02 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=cJadNroSSDZ/IW3eVaIUn0DBDphdxp/vUb8r+PmTym4=; b=kVxAm56YwDbdqBJciB8zCkNJvy 1dsYbaX1G2aLwsUkjXPnqiuQZ6wxkJFJN+9L1zc67u2naTE3xiWcigyvv/lgij7pRVzqTbtSWUw63 x2LGNNtGKvEf20HWkBAZHL4ffVbQzyF2qEC7zFrRf2FHa8J/HyyS8JGd0Ap9b2q40ZaCRIHLzoGjd T/hmZCifq8VSOGLZafS9DPh0vcGB/44rKr7cVNVLBRLfuwPGv+tV9dEqaGEkLvQPg4s+ESXB/By4U OrhzK/R55rg/Xf7fdFO2ax8HcHuY7alLMbqxJLuIs2qVQNZ3aAZqfou8hV/+Q1pBs0LgQVYXUL1qF YcXdpZmA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1doVJc-0003ws-Uu; Sun, 03 Sep 2017 13:51:56 +0000 Received: from plaes.org ([188.166.43.21]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1doVIt-0003KJ-IX for linux-arm-kernel@lists.infradead.org; Sun, 03 Sep 2017 13:51:15 +0000 Received: from localhost (85.253.197.123.cable.starman.ee [85.253.197.123]) by plaes.org (Postfix) with ESMTPSA id CC9D54140B; Sun, 3 Sep 2017 13:50:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=plaes.org; s=mail; t=1504446631; bh=kKsY1iYQazcFEDAFuxVWeKaiu/TvWe4bt1IBDaJqH/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=SmOywSFkf+IiIsWK89m2jlb2L5oAO4psZLixCfNd24Oz9tPEZiaXMqgn0klXFXbOi SMsKPWDy4sPUeHZAtEpLswgpx02rwgd3iXbWDxdOGCndYBbv8zaF2p5X/IVW9N0o1i uWGcIMznbfUivChmHNIQEfCXnkj2+pY9e39/w7wVd5fe5fla0WEamk6PLTlXrtvpsR BFHZKSENJStIVxAXNPRJl5qgpPrpTskO21zUZhJMPLa8Gn/rtMFUjtELtKJm7ncTK7 vFsyBbdSqVlu+GhBr22wj76WfNTeYv7yecdr0ZOusjTto7SNd38II9DNhruxyzGwY+ RrAhSSWKgQw8Q== From: Priit Laes To: Rob Herring , Mark Rutland , Russell King , Maxime Ripard , Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] ARM: dts: sun4i: Use defines for clock and reset indices Date: Sun, 3 Sep 2017 16:50:16 +0300 Message-Id: <9c22e258a56199448c6e54a3880c70f2bb21c897.1504446535.git-series.plaes@plaes.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170903_065112_061996_B54BC81D X-CRM114-Status: UNSURE ( 9.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-sunxi@googlegroups.com, Priit Laes MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We can now use defines for clock/reset indices defined in the dt-bindings includes. Signed-off-by: Priit Laes --- arch/arm/boot/dts/sun4i-a10.dtsi | 121 ++++++++++++++++---------------- 1 file changed, 61 insertions(+), 60 deletions(-) diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi index fc23c41..c5efd53 100644 --- a/arch/arm/boot/dts/sun4i-a10.dtsi +++ b/arch/arm/boot/dts/sun4i-a10.dtsi @@ -44,8 +44,9 @@ #include "skeleton.dtsi" #include - #include +#include +#include / { interrupt-parent = <&intc>; @@ -63,9 +64,9 @@ compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; allwinner,pipeline = "de_be0-lcd0-hdmi"; - clocks = <&ccu 56>, <&ccu 60>, - <&ccu 62>, <&ccu 144>, - <&ccu 155>, <&ccu 140>; + clocks = <&ccu CLK_AHB_LCD0>, <&ccu CLK_AHB_HDMI0>, + <&ccu CLK_AHB_DE_BE0>, <&ccu CLK_DE_BE0>, + <&ccu CLK_TCON0_CH1>, <&ccu CLK_DRAM_DE_BE0>; status = "disabled"; }; @@ -73,11 +74,11 @@ compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; allwinner,pipeline = "de_fe0-de_be0-lcd0-hdmi"; - clocks = <&ccu 56>, <&ccu 60>, - <&ccu 62>, <&ccu 64>, - <&ccu 144>, <&ccu 146>, - <&ccu 155>, <&ccu 164>, - <&ccu 139>, <&ccu 140>; + clocks = <&ccu CLK_AHB_LCD0>, <&ccu CLK_AHB_HDMI0>, + <&ccu CLK_AHB_DE_BE0>, <&ccu CLK_AHB_DE_FE0>, + <&ccu CLK_DE_BE0>, <&ccu CLK_AHB_DE_FE0>, + <&ccu CLK_TCON0_CH1>, <&ccu CLK_HDMI>, + <&ccu CLK_DRAM_DE_FE0>, <&ccu CLK_DRAM_DE_BE0>; status = "disabled"; }; @@ -85,10 +86,10 @@ compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; allwinner,pipeline = "de_fe0-de_be0-lcd0"; - clocks = <&ccu 56>, <&ccu 62>, - <&ccu 64>, <&ccu 144>, - <&ccu 146>, <&ccu 149>, - <&ccu 139>, <&ccu 140>; + clocks = <&ccu CLK_AHB_LCD0>, <&ccu CLK_AHB_DE_BE0>, + <&ccu CLK_AHB_DE_FE0>, <&ccu CLK_DE_BE0>, + <&ccu CLK_AHB_DE_FE0>, <&ccu CLK_TCON0_CH0>, + <&ccu CLK_DRAM_DE_FE0>, <&ccu CLK_DRAM_DE_BE0>; status = "disabled"; }; @@ -96,11 +97,11 @@ compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; allwinner,pipeline = "de_fe0-de_be0-lcd0-tve0"; - clocks = <&ccu 54>, <&ccu 56>, - <&ccu 62>, <&ccu 64>, - <&ccu 144>, <&ccu 146>, - <&ccu 155>, <&ccu 135>, - <&ccu 139>, <&ccu 140>; + clocks = <&ccu CLK_AHB_TVE0>, <&ccu CLK_AHB_LCD0>, + <&ccu CLK_AHB_DE_BE0>, <&ccu CLK_AHB_DE_FE0>, + <&ccu CLK_DE_BE0>, <&ccu CLK_AHB_DE_FE0>, + <&ccu CLK_TCON0_CH1>, <&ccu CLK_DRAM_TVE0>, + <&ccu CLK_DRAM_DE_FE0>, <&ccu CLK_DRAM_DE_BE0>; status = "disabled"; }; }; @@ -112,7 +113,7 @@ device_type = "cpu"; compatible = "arm,cortex-a8"; reg = <0x0>; - clocks = <&ccu 20>; + clocks = <&ccu CLK_CPU>; clock-latency = <244144>; /* 8 32k periods */ operating-points = < /* kHz uV */ @@ -229,7 +230,7 @@ compatible = "allwinner,sun4i-a10-dma"; reg = <0x01c02000 0x1000>; interrupts = <27>; - clocks = <&ccu 32>; + clocks = <&ccu CLK_AHB_DMA>; #dma-cells = <2>; }; @@ -237,7 +238,7 @@ compatible = "allwinner,sun4i-a10-nand"; reg = <0x01c03000 0x1000>; interrupts = <37>; - clocks = <&ccu 39>, <&ccu 96>; + clocks = <&ccu CLK_AHB_NAND>, <&ccu CLK_NAND>; clock-names = "ahb", "mod"; dmas = <&dma SUN4I_DMA_DEDICATED 3>; dma-names = "rxtx"; @@ -250,7 +251,7 @@ compatible = "allwinner,sun4i-a10-spi"; reg = <0x01c05000 0x1000>; interrupts = <10>; - clocks = <&ccu 44>, <&ccu 112>; + clocks = <&ccu CLK_AHB_SPI0>, <&ccu CLK_SPI0>; clock-names = "ahb", "mod"; dmas = <&dma SUN4I_DMA_DEDICATED 27>, <&dma SUN4I_DMA_DEDICATED 26>; @@ -264,7 +265,7 @@ compatible = "allwinner,sun4i-a10-spi"; reg = <0x01c06000 0x1000>; interrupts = <11>; - clocks = <&ccu 45>, <&ccu 113>; + clocks = <&ccu CLK_AHB_SPI1>, <&ccu CLK_SPI1>; clock-names = "ahb", "mod"; dmas = <&dma SUN4I_DMA_DEDICATED 9>, <&dma SUN4I_DMA_DEDICATED 8>; @@ -278,7 +279,7 @@ compatible = "allwinner,sun4i-a10-emac"; reg = <0x01c0b000 0x1000>; interrupts = <55>; - clocks = <&ccu 42>; + clocks = <&ccu CLK_AHB_EMAC>; allwinner,sram = <&emac_sram 1>; status = "disabled"; }; @@ -294,7 +295,7 @@ mmc0: mmc@01c0f000 { compatible = "allwinner,sun4i-a10-mmc"; reg = <0x01c0f000 0x1000>; - clocks = <&ccu 34>, <&ccu 98>; + clocks = <&ccu CLK_AHB_MMC0>, <&ccu CLK_MMC0>; clock-names = "ahb", "mmc"; interrupts = <32>; status = "disabled"; @@ -305,7 +306,7 @@ mmc1: mmc@01c10000 { compatible = "allwinner,sun4i-a10-mmc"; reg = <0x01c10000 0x1000>; - clocks = <&ccu 35>, <&ccu 101>; + clocks = <&ccu CLK_AHB_MMC1>, <&ccu CLK_MMC1>; clock-names = "ahb", "mmc"; interrupts = <33>; status = "disabled"; @@ -316,7 +317,7 @@ mmc2: mmc@01c11000 { compatible = "allwinner,sun4i-a10-mmc"; reg = <0x01c11000 0x1000>; - clocks = <&ccu 36>, <&ccu 104>; + clocks = <&ccu CLK_AHB_MMC2>, <&ccu CLK_MMC2>; clock-names = "ahb", "mmc"; interrupts = <34>; status = "disabled"; @@ -327,7 +328,7 @@ mmc3: mmc@01c12000 { compatible = "allwinner,sun4i-a10-mmc"; reg = <0x01c12000 0x1000>; - clocks = <&ccu 37>, <&ccu 107>; + clocks = <&ccu CLK_AHB_MMC3>, <&ccu CLK_MMC3>; clock-names = "ahb", "mmc"; interrupts = <35>; status = "disabled"; @@ -338,7 +339,7 @@ usb_otg: usb@01c13000 { compatible = "allwinner,sun4i-a10-musb"; reg = <0x01c13000 0x0400>; - clocks = <&ccu 26>; + clocks = <&ccu CLK_AHB_OTG>; interrupts = <38>; interrupt-names = "mc"; phys = <&usbphy 0>; @@ -353,11 +354,11 @@ compatible = "allwinner,sun4i-a10-usb-phy"; reg = <0x01c13400 0x10 0x01c14800 0x4 0x01c1c800 0x4>; reg-names = "phy_ctrl", "pmu1", "pmu2"; - clocks = <&ccu 125>; + clocks = <&ccu CLK_USB_PHY>; clock-names = "usb_phy"; - resets = <&ccu 1>, - <&ccu 2>, - <&ccu 3>; + resets = <&ccu RST_USB_PHY0>, + <&ccu RST_USB_PHY1>, + <&ccu RST_USB_PHY2>; reset-names = "usb0_reset", "usb1_reset", "usb2_reset"; status = "disabled"; }; @@ -366,7 +367,7 @@ compatible = "allwinner,sun4i-a10-ehci", "generic-ehci"; reg = <0x01c14000 0x100>; interrupts = <39>; - clocks = <&ccu 27>; + clocks = <&ccu CLK_AHB_EHCI0>; phys = <&usbphy 1>; phy-names = "usb"; status = "disabled"; @@ -376,7 +377,7 @@ compatible = "allwinner,sun4i-a10-ohci", "generic-ohci"; reg = <0x01c14400 0x100>; interrupts = <64>; - clocks = <&ccu 123>, <&ccu 28>; + clocks = <&ccu CLK_USB_OHCI0>, <&ccu CLK_AHB_OHCI0>; phys = <&usbphy 1>; phy-names = "usb"; status = "disabled"; @@ -386,7 +387,7 @@ compatible = "allwinner,sun4i-a10-crypto"; reg = <0x01c15000 0x1000>; interrupts = <86>; - clocks = <&ccu 31>, <&ccu 111>; + clocks = <&ccu CLK_AHB_SS>, <&ccu CLK_SS>; clock-names = "ahb", "mod"; }; @@ -394,7 +395,7 @@ compatible = "allwinner,sun4i-a10-spi"; reg = <0x01c17000 0x1000>; interrupts = <12>; - clocks = <&ccu 46>, <&ccu 114>; + clocks = <&ccu CLK_AHB_SPI2>, <&ccu CLK_SPI2>; clock-names = "ahb", "mod"; dmas = <&dma SUN4I_DMA_DEDICATED 29>, <&dma SUN4I_DMA_DEDICATED 28>; @@ -408,7 +409,7 @@ compatible = "allwinner,sun4i-a10-ahci"; reg = <0x01c18000 0x1000>; interrupts = <56>; - clocks = <&ccu 49>, <&ccu 122>; + clocks = <&ccu CLK_AHB_SATA>, <&ccu CLK_SATA>; status = "disabled"; }; @@ -416,7 +417,7 @@ compatible = "allwinner,sun4i-a10-ehci", "generic-ehci"; reg = <0x01c1c000 0x100>; interrupts = <40>; - clocks = <&ccu 29>; + clocks = <&ccu CLK_AHB_EHCI1>; phys = <&usbphy 2>; phy-names = "usb"; status = "disabled"; @@ -426,7 +427,7 @@ compatible = "allwinner,sun4i-a10-ohci", "generic-ohci"; reg = <0x01c1c400 0x100>; interrupts = <65>; - clocks = <&ccu 124>, <&ccu 30>; + clocks = <&ccu CLK_USB_OHCI1>, <&ccu CLK_AHB_OHCI1>; phys = <&usbphy 2>; phy-names = "usb"; status = "disabled"; @@ -436,7 +437,7 @@ compatible = "allwinner,sun4i-a10-spi"; reg = <0x01c1f000 0x1000>; interrupts = <50>; - clocks = <&ccu 47>, <&ccu 127>; + clocks = <&ccu CLK_AHB_SPI3>, <&ccu CLK_SPI3>; clock-names = "ahb", "mod"; dmas = <&dma SUN4I_DMA_DEDICATED 31>, <&dma SUN4I_DMA_DEDICATED 30>; @@ -466,7 +467,7 @@ compatible = "allwinner,sun4i-a10-pinctrl"; reg = <0x01c20800 0x400>; interrupts = <28>; - clocks = <&ccu 74>, <&osc24M>, <&osc32k>; + clocks = <&ccu CLK_APB0_PIO>, <&osc24M>, <&osc32k>; clock-names = "apb", "hosc", "losc"; gpio-controller; interrupt-controller; @@ -643,7 +644,7 @@ compatible = "allwinner,sun4i-a10-spdif"; reg = <0x01c21000 0x400>; interrupts = <13>; - clocks = <&ccu 70>, <&ccu 120>; + clocks = <&ccu CLK_APB0_SPDIF>, <&ccu CLK_SPDIF>; clock-names = "apb", "spdif"; dmas = <&dma SUN4I_DMA_NORMAL 2>, <&dma SUN4I_DMA_NORMAL 2>; @@ -653,7 +654,7 @@ ir0: ir@01c21800 { compatible = "allwinner,sun4i-a10-ir"; - clocks = <&ccu 75>, <&ccu 116>; + clocks = <&ccu CLK_APB0_IR0>, <&ccu CLK_IR0>; clock-names = "apb", "ir"; interrupts = <5>; reg = <0x01c21800 0x40>; @@ -662,7 +663,7 @@ ir1: ir@01c21c00 { compatible = "allwinner,sun4i-a10-ir"; - clocks = <&ccu 76>, <&ccu 117>; + clocks = <&ccu CLK_APB0_IR1>, <&ccu CLK_IR1>; clock-names = "apb", "ir"; interrupts = <6>; reg = <0x01c21c00 0x40>; @@ -681,7 +682,7 @@ compatible = "allwinner,sun4i-a10-codec"; reg = <0x01c22c00 0x40>; interrupts = <30>; - clocks = <&ccu 69>, <&ccu 160>; + clocks = <&ccu CLK_APB0_CODEC>, <&ccu CLK_CODEC>; clock-names = "apb", "codec"; dmas = <&dma SUN4I_DMA_NORMAL 19>, <&dma SUN4I_DMA_NORMAL 19>; @@ -707,7 +708,7 @@ interrupts = <1>; reg-shift = <2>; reg-io-width = <4>; - clocks = <&ccu 88>; + clocks = <&ccu CLK_APB1_UART0>; status = "disabled"; }; @@ -717,7 +718,7 @@ interrupts = <2>; reg-shift = <2>; reg-io-width = <4>; - clocks = <&ccu 89>; + clocks = <&ccu CLK_APB1_UART1>; status = "disabled"; }; @@ -727,7 +728,7 @@ interrupts = <3>; reg-shift = <2>; reg-io-width = <4>; - clocks = <&ccu 90>; + clocks = <&ccu CLK_APB1_UART2>; status = "disabled"; }; @@ -737,7 +738,7 @@ interrupts = <4>; reg-shift = <2>; reg-io-width = <4>; - clocks = <&ccu 91>; + clocks = <&ccu CLK_APB1_UART3>; status = "disabled"; }; @@ -747,7 +748,7 @@ interrupts = <17>; reg-shift = <2>; reg-io-width = <4>; - clocks = <&ccu 92>; + clocks = <&ccu CLK_APB1_UART4>; status = "disabled"; }; @@ -757,7 +758,7 @@ interrupts = <18>; reg-shift = <2>; reg-io-width = <4>; - clocks = <&ccu 93>; + clocks = <&ccu CLK_APB1_UART5>; status = "disabled"; }; @@ -767,7 +768,7 @@ interrupts = <19>; reg-shift = <2>; reg-io-width = <4>; - clocks = <&ccu 94>; + clocks = <&ccu CLK_APB1_UART6>; status = "disabled"; }; @@ -777,7 +778,7 @@ interrupts = <20>; reg-shift = <2>; reg-io-width = <4>; - clocks = <&ccu 95>; + clocks = <&ccu CLK_APB1_UART7>; status = "disabled"; }; @@ -785,7 +786,7 @@ compatible = "allwinner,sun4i-a10-ps2"; reg = <0x01c2a000 0x400>; interrupts = <62>; - clocks = <&ccu 85>; + clocks = <&ccu CLK_APB1_PS20>; status = "disabled"; }; @@ -793,7 +794,7 @@ compatible = "allwinner,sun4i-a10-ps2"; reg = <0x01c2a400 0x400>; interrupts = <63>; - clocks = <&ccu 86>; + clocks = <&ccu CLK_APB1_PS21>; status = "disabled"; }; @@ -801,7 +802,7 @@ compatible = "allwinner,sun4i-a10-i2c"; reg = <0x01c2ac00 0x400>; interrupts = <7>; - clocks = <&ccu 79>; + clocks = <&ccu CLK_APB1_I2C0>; status = "disabled"; #address-cells = <1>; #size-cells = <0>; @@ -811,7 +812,7 @@ compatible = "allwinner,sun4i-a10-i2c"; reg = <0x01c2b000 0x400>; interrupts = <8>; - clocks = <&ccu 80>; + clocks = <&ccu CLK_APB1_I2C1>; status = "disabled"; #address-cells = <1>; #size-cells = <0>; @@ -821,7 +822,7 @@ compatible = "allwinner,sun4i-a10-i2c"; reg = <0x01c2b400 0x400>; interrupts = <9>; - clocks = <&ccu 81>; + clocks = <&ccu CLK_APB1_I2C2>; status = "disabled"; #address-cells = <1>; #size-cells = <0>; @@ -831,7 +832,7 @@ compatible = "allwinner,sun4i-a10-can"; reg = <0x01c2bc00 0x400>; interrupts = <26>; - clocks = <&ccu 83>; + clocks = <&ccu CLK_APB1_CAN>; status = "disabled"; }; };