From patchwork Fri Nov 28 01:27:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ray Jui X-Patchwork-Id: 5400701 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3E025BEEBA for ; Fri, 28 Nov 2014 01:29:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4885F2013D for ; Fri, 28 Nov 2014 01:29:33 +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 571622012B for ; Fri, 28 Nov 2014 01:29:32 +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 1XuAKw-0005D9-IK; Fri, 28 Nov 2014 01:27:06 +0000 Received: from mail-gw1-out.broadcom.com ([216.31.210.62]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XuAKS-0004xq-8E for linux-arm-kernel@lists.infradead.org; Fri, 28 Nov 2014 01:26:37 +0000 X-IronPort-AV: E=Sophos;i="5.07,473,1413270000"; d="scan'208";a="51978974" Received: from irvexchcas07.broadcom.com (HELO IRVEXCHCAS07.corp.ad.broadcom.com) ([10.9.208.55]) by mail-gw1-out.broadcom.com with ESMTP; 27 Nov 2014 19:08:44 -0800 Received: from IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) by IRVEXCHCAS07.corp.ad.broadcom.com (10.9.208.55) with Microsoft SMTP Server (TLS) id 14.3.174.1; Thu, 27 Nov 2014 17:26:30 -0800 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) with Microsoft SMTP Server id 14.3.174.1; Thu, 27 Nov 2014 17:26:29 -0800 Received: from mail.broadcom.com (lbrmn-lnxub44.ric.broadcom.com [10.136.8.49]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 0BA2040FFE; Thu, 27 Nov 2014 17:25:47 -0800 (PST) From: Ray Jui To: , Scott Branden Subject: [PATCH 4/4] ARM: dts: enable clock support for Broadcom Cygnus Date: Thu, 27 Nov 2014 17:27:46 -0800 Message-ID: <1417138066-17906-5-git-send-email-rjui@broadcom.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1417138066-17906-1-git-send-email-rjui@broadcom.com> References: <1417138066-17906-1-git-send-email-rjui@broadcom.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141127_172636_409180_0DCD9A10 X-CRM114-Status: UNSURE ( 8.30 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) Cc: Ray Jui , bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, 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 Replace current device tree dummy clocks with real clock support for Broadcom Cygnus SoC Signed-off-by: Ray Jui Reviewed-by: Scott Branden --- arch/arm/boot/dts/bcm-cygnus-clock.dtsi | 110 ++++++++++++++++++++++++------- arch/arm/boot/dts/bcm-cygnus.dtsi | 2 +- 2 files changed, 86 insertions(+), 26 deletions(-) diff --git a/arch/arm/boot/dts/bcm-cygnus-clock.dtsi b/arch/arm/boot/dts/bcm-cygnus-clock.dtsi index 60d8389..f2da5e2 100644 --- a/arch/arm/boot/dts/bcm-cygnus-clock.dtsi +++ b/arch/arm/boot/dts/bcm-cygnus-clock.dtsi @@ -36,56 +36,116 @@ clocks { ranges; osc: oscillator { + #clock-cells = <0>; compatible = "fixed-clock"; - #clock-cells = <1>; clock-frequency = <25000000>; }; - apb_clk: apb_clk { - compatible = "fixed-clock"; + /* Cygnus ARM PLL */ + armpll: armpll { #clock-cells = <0>; - clock-frequency = <1000000000>; + compatible = "brcm,cygnus-armpll"; + clocks = <&osc>; + reg = <0x19000000 0x1000>; }; - periph_clk: periph_clk { - compatible = "fixed-clock"; + /* peripheral clock for system timer */ + arm_periph_clk: arm_periph_clk { #clock-cells = <0>; - clock-frequency = <500000000>; + compatible = "fixed-factor-clock"; + clocks = <&armpll>; + clock-div = <2>; + clock-mult = <1>; }; - sdio_clk: lcpll_ch2 { - compatible = "fixed-clock"; + /* APB bus clock */ + apb_clk: apb_clk { #clock-cells = <0>; - clock-frequency = <200000000>; + compatible = "fixed-factor-clock"; + clocks = <&armpll>; + clock-div = <4>; + clock-mult = <1>; }; - axi81_clk: axi81_clk { - compatible = "fixed-clock"; + genpll: genpll { #clock-cells = <0>; - clock-frequency = <100000000>; + compatible = "brcm,cygnus-genpll"; + reg = <0x0301d000 0x2c>, + <0x0301c020 0x4>; + clocks = <&osc>; }; - keypad_clk: keypad_clk { - compatible = "fixed-clock"; + /* various clocks running off the GENPLL */ + genpll_clks: genpll_clks { + #clock-cells = <1>; + compatible = "brcm,cygnus-genpll-clk"; + reg = <0x0301d000 0x2c>; + clocks = <&genpll>; + clock-output-names = "axi21", "250mhz", "ihost_sys", + "enet_sw", "audio_125", "can"; + }; + + /* always 1/2 of the axi21 clock */ + axi41_clk: axi41_clk { #clock-cells = <0>; - clock-frequency = <31806>; + compatible = "fixed-factor-clock"; + clocks = <&genpll_clks 0>; + clock-div = <2>; + clock-mult = <1>; }; - adc_clk: adc_clk { - compatible = "fixed-clock"; + /* always 1/4 of the axi21 clock */ + axi81_clk: axi81_clk { #clock-cells = <0>; - clock-frequency = <1562500>; + compatible = "fixed-factor-clock"; + clocks = <&genpll_clks 0>; + clock-div = <4>; + clock-mult = <1>; }; - pwm_clk: pwm_clk { - compatible = "fixed-clock"; + lcpll0: lcpll0 { #clock-cells = <0>; - clock-frequency = <1000000>; + compatible = "brcm,cygnus-lcpll0"; + reg = <0x0301d02c 0x1c>, + <0x0301c020 0x4>; + clocks = <&osc>; }; - lcd_clk: mipipll_ch1 { - compatible = "fixed-clock"; + /* various clocks running off the LCPLL0 */ + lcpll0_clks: lcpll0_clks { + #clock-cells = <1>; + compatible = "brcm,cygnus-lcpll0-clk"; + reg = <0x0301d02c 0x1c>; + clocks = <&lcpll0>; + clock-output-names = "pcie_phy", "ddr_phy", "sdio", + "usb_phy", "smart_card", "ch5"; + }; + + mipipll: mipipll { #clock-cells = <0>; - clock-frequency = <100000000>; + compatible = "brcm,cygnus-mipipll"; + reg = <0x180a9800 0x2c>, + <0x0301c020 0x4>, + <0x180aa024 0x4>; + clock-frequency = <1350000000>; + clocks = <&osc>; + }; + + mipipll_clks: mipipll_clks { + #clock-cells = <1>; + compatible = "brcm,cygnus-mipipll-clk"; + reg = <0x180a9800 0x2c>; + clocks = <&mipipll>; + clock-output-names = "ch0_unused", "ch1_lcd", "ch2_unused", + "ch3_unused", "ch4_unused", "ch5_unused"; + }; + + asiu_clks: asiu_clks { + #clock-cells = <1>; + compatible = "brcm,cygnus-asiu-clk"; + reg = <0x0301d048 0xc>, + <0x180aa024 0x4>; + clocks = <&osc>; + clock-output-names = "keypad", "adc/touch", "pwm"; }; }; diff --git a/arch/arm/boot/dts/bcm-cygnus.dtsi b/arch/arm/boot/dts/bcm-cygnus.dtsi index 5126f9e..2b99e9c 100644 --- a/arch/arm/boot/dts/bcm-cygnus.dtsi +++ b/arch/arm/boot/dts/bcm-cygnus.dtsi @@ -134,7 +134,7 @@ compatible = "arm,cortex-a9-global-timer"; reg = <0x19020200 0x100>; interrupts = ; - clocks = <&periph_clk>; + clocks = <&arm_periph_clk>; }; };