From patchwork Fri Jul 7 19:03:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 9831021 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 823BF602BD for ; Fri, 7 Jul 2017 19:04:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7072528709 for ; Fri, 7 Jul 2017 19:04:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6521A2870C; Fri, 7 Jul 2017 19:04:10 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID 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 93F6128709 for ; Fri, 7 Jul 2017 19:04:09 +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=dMsDSZ8gxlaJHANZkqU4/yZXz66eXGcAun8CpcNsPZ4=; b=CEwR5ssC/Nj4wIIzFQrLBsTcV+ 7U3rxRXft+nxetgBAIjL8QKWMof7gOeYswIYaFW1BUDc2G8El7QQxGx77xVB+Y1oVp4qvQM5/+BqT sBVw/c1VKvyFkh0U7OTlZx19S+TSaPGT0zXYOcWo1J3JN9KM5EJmPOIUuC2cUnrWgYsxL3rBbx1+Q 39QJbOBZStBhvIrT//GmkajbA/CvxXtWGU6Dh4QbwiyAsFFyqMZzXuxIzGJNSIfOFFjaS6w662Xny jmncU8cRyN1pY0mvzM2jbNSmHPL831/5SAydERcmAINhK1by870SM0oaEXDHuI68HEIfUk4MsqLWA Hkgoj/kA==; 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 1dTYXu-0005tq-QH; Fri, 07 Jul 2017 19:04:06 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dTYXX-0005Pf-Ee for linux-arm-kernel@lists.infradead.org; Fri, 07 Jul 2017 19:03:46 +0000 Received: from localhost.localdomain (cpe-70-114-128-244.austin.res.rr.com [70.114.128.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 64D9922C7C; Fri, 7 Jul 2017 19:03:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 64D9922C7C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dinguyen@kernel.org From: Dinh Nguyen To: robh+dt@kernel.org Subject: [PATCHv1 3/4] arm64: dts: add complete clock tree for SoCFPGA Stratix10 Date: Fri, 7 Jul 2017 14:03:18 -0500 Message-Id: <1499454199-31901-3-git-send-email-dinguyen@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499454199-31901-1-git-send-email-dinguyen@kernel.org> References: <1499454199-31901-1-git-send-email-dinguyen@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170707_120343_634703_34C4A4A0 X-CRM114-Status: UNSURE ( 8.39 ) 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: mark.rutland@arm.com, devicetree@vger.kernel.org, mturquette@baylibre.com, sboyd@codeaurora.org, dinguyen@kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 Add the complete clock tree for SoCFPGA Stratix10 chip. The clocking on Stratix10 is similar to the SoCFPGA Arria10/Cyclone5 platforms, so reuse the same kind of clock structure as the previous platforms. Signed-off-by: Dinh Nguyen --- arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 461 +++++++++++++++++++++- 1 file changed, 460 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi index a0aa26e..1b035ed 100644 --- a/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +++ b/arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi @@ -89,9 +89,468 @@ interrupt-parent = <&intc>; ranges = <0 0 0 0xffffffff>; - clkmgr@ffd1000 { + clkmgr@ffd10000 { compatible = "altr,clk-mgr"; reg = <0xffd10000 0x1000>; + + clocks { + #address-cells = <1>; + #size-cells = <0>; + + cb_intosc_hs_div2_clk: cb_intosc_hs_div2_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; + }; + + cb_intosc_ls_clk: cb_intosc_ls_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; + }; + + f2s_free_clk: f2s_free_clk { + #clock-cells = <0>; + compatible = "fixed-clock"; + }; + + osc1: osc1 { + #clock-cells = <0>; + compatible = "fixed-clock"; + }; + + main_pll: main_pll@44 { + #address-cells = <1>; + #size-cells = <0>; + #clock-cells = <0>; + compatible = "altr,socfpga-s10-pll-clock"; + clocks = <&osc1>, <&cb_intosc_hs_div2_clk>, + <&f2s_free_clk>; + reg = <0x74>; + + main_mpu_base_clk: main_mpu_base_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>; + div-reg = <0x84 0 8>; + }; + + main_noc_base_clk: main_noc_base_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>; + div-reg = <0x88 0 8>; + }; + + main_emaca_clk: main_emaca_clk@68 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>; + reg = <0x50>; + }; + + main_emacb_clk: main_emacb_clk@6c { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>; + reg = <0x54>; + }; + + main_emac_ptp_clk: main_emac_ptp_clk@70 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>; + reg = <0x58>; + }; + + main_gpio_db_clk: main_gpio_db_clk@74 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>; + reg = <0x5c>; + }; + + main_sdmmc_clk: main_sdmmc_clk@78 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk" +; + clocks = <&main_pll>; + reg = <0x60>; + }; + + main_s2f_usr0_clk: main_s2f_usr0_clk@7c { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>; + reg = <0x64>; + }; + + main_s2f_usr1_clk: main_s2f_usr1_clk@80 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>; + reg = <0x68>; + }; + + main_psi_ref_clk: main_psi_ref_clk@84 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>; + reg = <0x6c>; + }; + }; + + periph_pll: periph_pll@e4 { + #address-cells = <1>; + #size-cells = <0>; + #clock-cells = <0>; + compatible = "altr,socfpga-s10-pll-clock"; + clocks = <&osc1>, <&cb_intosc_hs_div2_clk>, + <&f2s_free_clk>; + reg = <0xe4>; + + peri_mpu_base_clk: peri_mpu_base_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&periph_pll>; + reg = <0xf4 0 8>; + }; + + peri_noc_base_clk: peri_noc_base_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&periph_pll>; + reg = <0xf8 0 8>; + }; + + peri_emaca_clk: peri_emaca_clk@e8 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>, <&periph_pll>, + <&osc1>, <&cb_intosc_hs_div2_clk>, <&f2s_free_clk>; + reg = <0xbc>; + }; + + peri_emacb_clk: peri_emacb_clk@ec { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>, <&periph_pll>, + <&osc1>, <&cb_intosc_hs_div2_clk>, <&f2s_free_clk>; + reg = <0xc0>; + }; + + peri_emac_ptp_clk: peri_emac_ptp_clk@f0 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>, <&periph_pll>, + <&osc1>, <&cb_intosc_hs_div2_clk>, <&f2s_free_clk>; + reg = <0xc4>; + }; + + peri_gpio_db_clk: peri_gpio_db_clk@f4 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>, <&periph_pll>, + <&osc1>, <&cb_intosc_hs_div2_clk>, <&f2s_free_clk>; + reg = <0xc8>; + }; + + peri_sdmmc_clk: peri_sdmmc_clk@f8 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>, <&periph_pll>, + <&osc1>, <&cb_intosc_hs_div2_clk>, <&f2s_free_clk>; + reg = <0xcc>; + }; + + peri_s2f_usr0_clk: peri_s2f_usr0_clk@fc { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&periph_pll>; + reg = <0xd0>; + }; + + peri_s2f_usr1_clk: peri_s2f_usr1_clk@100 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>, <&periph_pll>, + <&osc1>, <&cb_intosc_hs_div2_clk>, <&f2s_free_clk>; + reg = <0xd4>; + }; + + peri_psi_ref_clk: peri_psi_ref_clk@104 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_pll>, <&periph_pll>, + <&osc1>, <&cb_intosc_hs_div2_clk>, <&f2s_free_clk>; + reg = <0xd8>; + }; + }; + + boot_clk: boot_clk@0 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&osc1>, <&cb_intosc_hs_div2_clk>; + reg = <0x0>; + }; + + mpu_free_clk: mpu_free_clk@48 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_mpu_base_clk>, <&peri_mpu_base_clk>, + <&osc1>, <&cb_intosc_hs_div2_clk>, + <&f2s_free_clk>; + reg = <0x48>; + }; + + noc_free_clk: noc_free_clk@4c { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_noc_base_clk>, <&peri_noc_base_clk>, + <&osc1>, <&cb_intosc_hs_div2_clk>, + <&f2s_free_clk>; + reg = <0x4c>; + }; + + s2f_user0_free_clk: s2f_user0_free_clk@104 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&main_s2f_usr0_clk>, <&peri_s2f_usr0_clk>, + <&osc1>, <&cb_intosc_hs_div2_clk>, + <&f2s_free_clk>; + reg = <0x64>; + }; + + l4_sys_free_clk: l4_sys_free_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&noc_free_clk>; + fixed-divider = <4>; + }; + + noc_clk: noc_clk@30 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&boot_clk>, <&noc_free_clk>; + bypass-reg = <0x3c 1>; + }; + + emaca_free_clk: emaca_free_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&boot_clk>, <&main_emaca_clk>; + bypass-reg = <0xb0 0>; + }; + + emacb_free_clk: emacb_free_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&boot_clk>, <&main_emacb_clk>; + bypass-reg = <0xb0 1>; + }; + + emac_ptp_free_clk: emac_ptp_free_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&boot_clk>, <&peri_emac_ptp_clk>; + bypass-reg = <0xb0 2>; + }; + + gpio_db_free_clk: gpio_db_free_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&boot_clk>, <&peri_gpio_db_clk>; + bypass-reg = <0xb0 3>; + }; + + sdmmc_free_clk: sdmmc_free_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&boot_clk>, <&peri_sdmmc_clk>; + bypass-reg = <0xb0 4>; + }; + + s2f_user1_free_clk: s2f_user1_free_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&boot_clk>, <&peri_s2f_usr1_clk>; + bypass-reg = <0xb0 5>; + }; + + psi_ref_free_clk: psi_ref_free_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-perip-clk"; + clocks = <&boot_clk>, <&peri_psi_ref_clk>; + bypass-reg = <0xb0 6>; + }; + + mpu_clk: mpu_clk@30 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&boot_clk>, <&mpu_free_clk>; + bypass-reg = <0x3c 0>; + clk-gate = <0x30 0>; + }; + + mpu_periph_clk: mpu_periph_clk@30 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&mpu_clk>; + fixed-divider = <4>; + clk-gate = <0x30 0>; + }; + + mpu_l2ram_clk: mpu_l2ram_clk@30 { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&mpu_clk>; + fixed-divider = <2>; + clk-gate = <0x30 0>; + }; + + l4_main_clk: l4_main_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&noc_clk>; + div-reg = <0x70 0 2>; + clk-gate = <0x30 1>; + }; + + l4_mp_clk: l4_mp_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&noc_clk>; + div-reg= <0x70 8 2>; + clk-gate = <0x30 2>; + }; + + l4_sp_clk: l4_sp_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&noc_clk>; + div-reg= <0x70 16 2>; + clk-gate = <0x30 3>; + }; + + cs_at_clk: cs_at_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&noc_clk>; + div-reg= <0x70 24 2>; + clk-gate = <0x30 4>; + }; + + cs_trace_clk: cs_trace_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&noc_clk>; + div-reg= <0x70 26 2>; + clk-gate = <0x30 4>; + }; + + cs_pdbg_clk: cs_pdbg_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&cs_at_clk>; + div-reg= <0x70 28 1>; + clk-gate = <0x30 4>; + }; + + cs_timer_clk: cs_timer_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&noc_clk>; + clk-gate = <0x30 5>; + }; + + s2f_user0_clk: s2f_user0_clk@3c { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&boot_clk>, <&f2s_free_clk>; + bypass-reg = <0x3c 2>; + clk-gate = <0x30 6>; + }; + + emac0_clk: emac0_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&emaca_free_clk>, <&emacb_free_clk>; + bypass-reg = <0xdc 26>; + clk-gate = <0xa4 0>; + }; + + emac1_clk: emac1_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&emaca_free_clk>, <&emacb_free_clk>; + bypass-reg = <0xdc 27>; + clk-gate = <0xa4 1>; + }; + + emac2_clk: emac2_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&emaca_free_clk>, <&emacb_free_clk>; + bypass-reg = <0xdc 28>; + clk-gate = <0xa4 2>; + }; + + emac_ptp_clk: emac_ptp_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&emac_ptp_free_clk>; + clk-gate = <0xa4 3>; + }; + + gpio_db_clk: gpio_db_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&gpio_db_free_clk>; + div-reg = <0xe0>; + clk-gate = <0xa4 4>; + }; + + sdmmc_clk: sdmmc_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&sdmmc_free_clk>; + fixed-divider = <4>; + clk-gate = <0xa4 5>; + }; + + s2f_usr1_clk: s2f_usr1_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&s2f_user1_free_clk>; + clk-gate = <0xa4 6>; + }; + + psi_ref_clk: psi_ref_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&psi_ref_free_clk>; + clk-gate = <0xa4 7>; + }; + + usb_clk: usb_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&l4_mp_clk>; + clk-gate = <0xa4 8>; + }; + + spi_m_clk: spi_m_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&l4_mp_clk>; + clk-gate = <0xa4 9>; + }; + + nand_clk: nand_clk { + #clock-cells = <0>; + compatible = "altr,socfpga-s10-gate-clk"; + clocks = <&l4_main_clk>; + clk-gate = <0xa4 10>; + }; + }; }; gmac0: ethernet@ff800000 {