From patchwork Thu Apr 2 20:31:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joachim Eastwood X-Patchwork-Id: 6151621 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 45E2E9F350 for ; Thu, 2 Apr 2015 20:40:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 577F62037D for ; Thu, 2 Apr 2015 20:40:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5ED7D2035E for ; Thu, 2 Apr 2015 20:40:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YdlrG-0004y2-Fv; Thu, 02 Apr 2015 20:36:58 +0000 Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YdlnI-0001Ov-8B for linux-arm-kernel@lists.infradead.org; Thu, 02 Apr 2015 20:32:53 +0000 Received: by labe2 with SMTP id e2so68312400lab.3 for ; Thu, 02 Apr 2015 13:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nikQ2f97vTDKBAiJidT1Va9R2eBZtf69+xtlnieOC/E=; b=nCYaYT9fthygXqE82WuwZqLtXbMKRvuDVYTmbKyveWDF7vF5CHGuAdgDvdFclbxkks cHtTUgopZ42cBeWvAcQtXi7y05Xlzo3r8riqKQ+JE8p7XFD8ImzPVp+gpVJkYlC9OKHb EuQnlKSQyvWglqr41mNtOf+knuhSxPFcINJbddUuz57iNEBNprkKMWnEUkgKoUydusd6 Jl846BOCNnBnRik0VpG7l4wlA8Bk8ZWOYhp36lS7sLmHT1RnB2VtfmcDloM1cdkIt5Fr Ow7NxjQrMT0CrZEDwWsLr2GHTf+nQ87f9EfU0u5zJc0M13QYZnxfMut1+U1OJ72yzKgf QSzA== X-Received: by 10.152.42.193 with SMTP id q1mr41087553lal.92.1428006748065; Thu, 02 Apr 2015 13:32:28 -0700 (PDT) Received: from localhost.localdomain (183.90-149-48.nextgentel.com. [90.149.48.183]) by mx.google.com with ESMTPSA id lc8sm1009185lbc.33.2015.04.02.13.32.26 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 Apr 2015 13:32:27 -0700 (PDT) From: Joachim Eastwood To: mturquette@linaro.org, sboyd@codeaurora.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 6/6] ARM: dts: lpc18xx: add clock nodes for cgu and ccu Date: Thu, 2 Apr 2015 22:31:48 +0200 Message-Id: <1428006708-13690-7-git-send-email-manabian@gmail.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1428006708-13690-1-git-send-email-manabian@gmail.com> References: <1428006708-13690-1-git-send-email-manabian@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150402_133252_707581_9A782A03 X-CRM114-Status: GOOD ( 10.09 ) X-Spam-Score: -0.8 (/) Cc: devicetree@vger.kernel.org, Joachim Eastwood , ezequiel@vanguardiasur.com.ar, arnd@arndb.de, ariel.dalessandro@gmail.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Joachim Eastwood --- arch/arm/boot/dts/lpc18xx.dtsi | 96 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 82 insertions(+), 14 deletions(-) diff --git a/arch/arm/boot/dts/lpc18xx.dtsi b/arch/arm/boot/dts/lpc18xx.dtsi index 161e98b442e0..8e9f51c88fad 100644 --- a/arch/arm/boot/dts/lpc18xx.dtsi +++ b/arch/arm/boot/dts/lpc18xx.dtsi @@ -13,6 +13,9 @@ #include "armv7-m.dtsi" +#include "dt-bindings/clock/lpc18xx-cgu.h" +#include "dt-bindings/clock/lpc18xx-ccu.h" + / { aliases { serial0 = &uart0; @@ -29,6 +32,7 @@ compatible = "arm,cortex-m3"; device_type = "cpu"; reg = <0x0>; + clocks = <&ccu1 CLK_CPU_CORE>; }; }; @@ -39,23 +43,84 @@ clock-frequency = <12000000>; }; - /* Temporary hardcode PLL1 until clk drivers are merged */ - pll1: pll1 { - compatible = "fixed-factor-clock"; - clocks = <&xtal>; + xtal32: xtal32 { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + }; + + enet_rx_clk: enet_rx_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + clock-output-names = "enet_rx_clk"; + }; + + enet_tx_clk: enet_tx_clk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <0>; + clock-output-names = "enet_tx_clk"; + }; + + gp_clkin: gp_clkin { + compatible = "fixed-clock"; #clock-cells = <0>; - clock-div = <1>; - clock-mult = <12>; + clock-frequency = <0>; + clock-output-names = "gp_clkin"; }; }; soc { + cgu: cgu@40050000 { + compatible = "nxp,lpc1850-cgu"; + reg = <0x40050000 0x1000>; + #clock-cells = <1>; + clocks = <&xtal>, <&xtal32>, <&enet_rx_clk>, <&enet_tx_clk>, <&gp_clkin>; + clock-indices = <0>, <1>, <2>, <3>, <4>, <5>, <6>, <7>, + <8>, <9>, <10>, <11>, <12>, <13>, <14>, <15>, + <16>, <17>, <18>, <19>, <20>, <25>, <26>, <27>; + clock-output-names = "base_safe_clk", "base_usb0_clk", + "base_periph_clk", "base_usb1_clk", + "base_cpu_clk", "base_spifi_clk", + "base_spi_clk", "base_phy_rx_clk", + "base_phy_tx_clk", "base_apb1_clk", + "base_apb3_clk", "base_lcd_clk", + "base_adchs_clk", "base_sdio_clk", + "base_ssp0_clk", "base_ssp1_clk", + "base_uart0_clk", "base_uart1_clk", + "base_uart2_clk", "base_uart3_clk", + "base_out_clk", "base_audio_clk", + "base_cgu_out0_clk","base_cgu_out1_clk"; + }; + + ccu1: ccu@40051000 { + compatible = "nxp,lpc1850-ccu"; + reg = <0x40051000 0x1000>; + #clock-cells = <1>; + clocks = <&cgu BASE_APB3_CLK>, <&cgu BASE_APB1_CLK>, + <&cgu BASE_SPIFI_CLK>, <&cgu BASE_CPU_CLK>, + <&cgu BASE_PERIPH_CLK>, <&cgu BASE_USB0_CLK>, + <&cgu BASE_USB1_CLK>, <&cgu BASE_SPI_CLK>; + }; + + ccu2: ccu@40052000 { + compatible = "nxp,lpc1850-ccu"; + reg = <0x40052000 0x1000>; + #clock-cells = <1>; + clocks = <&cgu BASE_AUDIO_CLK>, <&cgu BASE_UART3_CLK>, + <&cgu BASE_UART2_CLK>, <&cgu BASE_UART1_CLK>, + <&cgu BASE_UART0_CLK>, <&cgu BASE_SSP1_CLK>, + <&cgu BASE_SSP0_CLK>, <&cgu BASE_SDIO_CLK>; + }; + uart0: serial@40081000 { compatible = "ns16550a"; reg = <0x40081000 0x1000>; reg-shift = <2>; interrupts = <24>; - clocks = <&pll1>; + clocks = <&ccu2 CLK_APB0_UART0>, <&ccu1 CLK_CPU_UART0>; + clock-names = "uart", "reg"; status = "disabled"; }; @@ -64,7 +129,8 @@ reg = <0x40082000 0x1000>; reg-shift = <2>; interrupts = <25>; - clocks = <&pll1>; + clocks = <&ccu2 CLK_APB0_UART1>, <&ccu1 CLK_CPU_UART1>; + clock-names = "uart", "reg"; status = "disabled"; }; @@ -72,14 +138,14 @@ compatible = "nxp,lpc3250-timer"; reg = <0x40084000 0x1000>; interrupts = <12>; - clocks = <&pll1>; + clocks = <&ccu1 CLK_CPU_TIMER0>; }; timer1: timer@40085000 { compatible = "nxp,lpc3250-timer"; reg = <0x40085000 0x1000>; interrupts = <13>; - clocks = <&pll1>; + clocks = <&ccu1 CLK_CPU_TIMER1>; }; uart2: serial@400c1000 { @@ -87,7 +153,8 @@ reg = <0x400c1000 0x1000>; reg-shift = <2>; interrupts = <26>; - clocks = <&pll1>; + clocks = <&ccu2 CLK_APB2_UART2>, <&ccu1 CLK_CPU_UART2>; + clock-names = "uart", "reg"; status = "disabled"; }; @@ -96,7 +163,8 @@ reg = <0x400c2000 0x1000>; reg-shift = <2>; interrupts = <27>; - clocks = <&pll1>; + clocks = <&ccu2 CLK_APB2_UART3>, <&ccu1 CLK_CPU_UART3>; + clock-names = "uart", "reg"; status = "disabled"; }; @@ -104,14 +172,14 @@ compatible = "nxp,lpc3250-timer"; reg = <0x400c3000 0x1000>; interrupts = <14>; - clocks = <&pll1>; + clocks = <&ccu1 CLK_CPU_TIMER2>; }; timer3: timer@400c4000 { compatible = "nxp,lpc3250-timer"; reg = <0x400c4000 0x1000>; interrupts = <15>; - clocks = <&pll1>; + clocks = <&ccu1 CLK_CPU_TIMER3>; }; }; };