Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'tegra-clk-3.20' of git://nv-tegra.nvidia.com/user/pdeschrijver/linux into clk-next

Tegra clock fixes for 3.20

+534 -398
+6 -4
Documentation/devicetree/bindings/clock/nvidia,tegra124-car.txt
··· 1 - NVIDIA Tegra124 Clock And Reset Controller 1 + NVIDIA Tegra124 and Tegra132 Clock And Reset Controller 2 2 3 3 This binding uses the common clock binding: 4 4 Documentation/devicetree/bindings/clock/clock-bindings.txt ··· 7 7 for muxing and gating Tegra's clocks, and setting their rates. 8 8 9 9 Required properties : 10 - - compatible : Should be "nvidia,tegra124-car" 10 + - compatible : Should be "nvidia,tegra124-car" or "nvidia,tegra132-car" 11 11 - reg : Should contain CAR registers location and length 12 12 - clocks : Should contain phandle and clock specifiers for two clocks: 13 13 the 32 KHz "32k_in", and the board-specific oscillator "osc". 14 14 - #clock-cells : Should be 1. 15 15 In clock consumers, this cell represents the clock ID exposed by the 16 - CAR. The assignments may be found in header file 17 - <dt-bindings/clock/tegra124-car.h>. 16 + CAR. The assignments may be found in the header files 17 + <dt-bindings/clock/tegra124-car-common.h> (which covers IDs common 18 + to Tegra124 and Tegra132) and <dt-bindings/clock/tegra124-car.h> 19 + (for Tegra124-specific clocks). 18 20 - #reset-cells : Should be 1. 19 21 In clock consumers, this cell represents the bit number in the CAR's 20 22 array of CLK_RST_CONTROLLER_RST_DEVICES_* registers.
-2
arch/arm/mach-tegra/tegra.c
··· 91 91 struct soc_device *soc_dev; 92 92 struct device *parent = NULL; 93 93 94 - tegra_clocks_apply_init_table(); 95 - 96 94 soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); 97 95 if (!soc_dev_attr) 98 96 goto out;
+1
drivers/clk/tegra/Makefile
··· 15 15 obj-$(CONFIG_ARCH_TEGRA_3x_SOC) += clk-tegra30.o 16 16 obj-$(CONFIG_ARCH_TEGRA_114_SOC) += clk-tegra114.o 17 17 obj-$(CONFIG_ARCH_TEGRA_124_SOC) += clk-tegra124.o 18 + obj-$(CONFIG_ARCH_TEGRA_132_SOC) += clk-tegra124.o
-2
drivers/clk/tegra/clk-id.h
··· 64 64 tegra_clk_disp2, 65 65 tegra_clk_dp2, 66 66 tegra_clk_dpaux, 67 - tegra_clk_dsia, 68 67 tegra_clk_dsialp, 69 68 tegra_clk_dsia_mux, 70 - tegra_clk_dsib, 71 69 tegra_clk_dsiblp, 72 70 tegra_clk_dsib_mux, 73 71 tegra_clk_dtv,
+11 -7
drivers/clk/tegra/clk-pll.c
··· 816 816 .enable = clk_plle_enable, 817 817 }; 818 818 819 - #if defined(CONFIG_ARCH_TEGRA_114_SOC) || defined(CONFIG_ARCH_TEGRA_124_SOC) 819 + #if defined(CONFIG_ARCH_TEGRA_114_SOC) || \ 820 + defined(CONFIG_ARCH_TEGRA_124_SOC) || \ 821 + defined(CONFIG_ARCH_TEGRA_132_SOC) 820 822 821 823 static int _pll_fixed_mdiv(struct tegra_clk_pll_params *pll_params, 822 824 unsigned long parent_rate) ··· 1507 1505 return clk; 1508 1506 } 1509 1507 1510 - #if defined(CONFIG_ARCH_TEGRA_114_SOC) || defined(CONFIG_ARCH_TEGRA_124_SOC) 1508 + #if defined(CONFIG_ARCH_TEGRA_114_SOC) || \ 1509 + defined(CONFIG_ARCH_TEGRA_124_SOC) || \ 1510 + defined(CONFIG_ARCH_TEGRA_132_SOC) 1511 1511 static const struct clk_ops tegra_clk_pllxc_ops = { 1512 1512 .is_enabled = clk_pll_is_enabled, 1513 1513 .enable = clk_pll_iddq_enable, ··· 1569 1565 parent = __clk_lookup(parent_name); 1570 1566 if (!parent) { 1571 1567 WARN(1, "parent clk %s of %s must be registered first\n", 1572 - name, parent_name); 1568 + parent_name, name); 1573 1569 return ERR_PTR(-EINVAL); 1574 1570 } 1575 1571 ··· 1669 1665 parent = __clk_lookup(parent_name); 1670 1666 if (!parent) { 1671 1667 WARN(1, "parent clk %s of %s must be registered first\n", 1672 - name, parent_name); 1668 + parent_name, name); 1673 1669 return ERR_PTR(-EINVAL); 1674 1670 } 1675 1671 ··· 1710 1706 parent = __clk_lookup(parent_name); 1711 1707 if (!parent) { 1712 1708 WARN(1, "parent clk %s of %s must be registered first\n", 1713 - name, parent_name); 1709 + parent_name, name); 1714 1710 return ERR_PTR(-EINVAL); 1715 1711 } 1716 1712 ··· 1806 1802 } 1807 1803 #endif 1808 1804 1809 - #ifdef CONFIG_ARCH_TEGRA_124_SOC 1805 + #if defined(CONFIG_ARCH_TEGRA_124_SOC) || defined(CONFIG_ARCH_TEGRA_132_SOC) 1810 1806 static const struct clk_ops tegra_clk_pllss_ops = { 1811 1807 .is_enabled = clk_pll_is_enabled, 1812 1808 .enable = clk_pll_iddq_enable, ··· 1834 1830 parent = __clk_lookup(parent_name); 1835 1831 if (!parent) { 1836 1832 WARN(1, "parent clk %s of %s must be registered first\n", 1837 - name, parent_name); 1833 + parent_name, name); 1838 1834 return ERR_PTR(-EINVAL); 1839 1835 } 1840 1836
+8 -10
drivers/clk/tegra/clk-tegra-periph.c
··· 434 434 MUX("hda", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_HDA, 125, TEGRA_PERIPH_ON_APB, tegra_clk_hda), 435 435 MUX("hda2codec_2x", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_HDA2CODEC_2X, 111, TEGRA_PERIPH_ON_APB, tegra_clk_hda2codec_2x), 436 436 MUX("vfir", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_VFIR, 7, TEGRA_PERIPH_ON_APB, tegra_clk_vfir), 437 - MUX("sdmmc1", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_SDMMC1, 14, 0, tegra_clk_sdmmc1), 438 - MUX("sdmmc2", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_SDMMC2, 9, 0, tegra_clk_sdmmc2), 439 - MUX("sdmmc3", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_SDMMC3, 69, 0, tegra_clk_sdmmc3), 440 - MUX("sdmmc4", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_SDMMC4, 15, 0, tegra_clk_sdmmc4), 437 + MUX("sdmmc1", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_SDMMC1, 14, TEGRA_PERIPH_ON_APB, tegra_clk_sdmmc1), 438 + MUX("sdmmc2", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_SDMMC2, 9, TEGRA_PERIPH_ON_APB, tegra_clk_sdmmc2), 439 + MUX("sdmmc3", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_SDMMC3, 69, TEGRA_PERIPH_ON_APB, tegra_clk_sdmmc3), 440 + MUX("sdmmc4", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_SDMMC4, 15, TEGRA_PERIPH_ON_APB, tegra_clk_sdmmc4), 441 441 MUX("la", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_LA, 76, TEGRA_PERIPH_ON_APB, tegra_clk_la), 442 442 MUX("trace", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_TRACE, 77, TEGRA_PERIPH_ON_APB, tegra_clk_trace), 443 443 MUX("owr", mux_pllp_pllc_pllm_clkm, CLK_SOURCE_OWR, 71, TEGRA_PERIPH_ON_APB, tegra_clk_owr), ··· 470 470 MUX("adx1", mux_plla_pllc_pllp_clkm, CLK_SOURCE_ADX1, 180, TEGRA_PERIPH_ON_APB, tegra_clk_adx1), 471 471 MUX("amx1", mux_plla_pllc_pllp_clkm, CLK_SOURCE_AMX1, 185, TEGRA_PERIPH_ON_APB, tegra_clk_amx1), 472 472 MUX("vi_sensor2", mux_pllm_pllc2_c_c3_pllp_plla, CLK_SOURCE_VI_SENSOR2, 165, TEGRA_PERIPH_NO_RESET, tegra_clk_vi_sensor2), 473 - MUX8("sdmmc1", mux_pllp_pllc2_c_c3_pllm_clkm, CLK_SOURCE_SDMMC1, 14, 0, tegra_clk_sdmmc1_8), 474 - MUX8("sdmmc2", mux_pllp_pllc2_c_c3_pllm_clkm, CLK_SOURCE_SDMMC2, 9, 0, tegra_clk_sdmmc2_8), 475 - MUX8("sdmmc3", mux_pllp_pllc2_c_c3_pllm_clkm, CLK_SOURCE_SDMMC3, 69, 0, tegra_clk_sdmmc3_8), 476 - MUX8("sdmmc4", mux_pllp_pllc2_c_c3_pllm_clkm, CLK_SOURCE_SDMMC4, 15, 0, tegra_clk_sdmmc4_8), 473 + MUX8("sdmmc1", mux_pllp_pllc2_c_c3_pllm_clkm, CLK_SOURCE_SDMMC1, 14, TEGRA_PERIPH_ON_APB, tegra_clk_sdmmc1_8), 474 + MUX8("sdmmc2", mux_pllp_pllc2_c_c3_pllm_clkm, CLK_SOURCE_SDMMC2, 9, TEGRA_PERIPH_ON_APB, tegra_clk_sdmmc2_8), 475 + MUX8("sdmmc3", mux_pllp_pllc2_c_c3_pllm_clkm, CLK_SOURCE_SDMMC3, 69, TEGRA_PERIPH_ON_APB, tegra_clk_sdmmc3_8), 476 + MUX8("sdmmc4", mux_pllp_pllc2_c_c3_pllm_clkm, CLK_SOURCE_SDMMC4, 15, TEGRA_PERIPH_ON_APB, tegra_clk_sdmmc4_8), 477 477 MUX8("sbc1", mux_pllp_pllc2_c_c3_pllm_clkm, CLK_SOURCE_SBC1, 41, TEGRA_PERIPH_ON_APB, tegra_clk_sbc1_8), 478 478 MUX8("sbc2", mux_pllp_pllc2_c_c3_pllm_clkm, CLK_SOURCE_SBC2, 44, TEGRA_PERIPH_ON_APB, tegra_clk_sbc2_8), 479 479 MUX8("sbc3", mux_pllp_pllc2_c_c3_pllm_clkm, CLK_SOURCE_SBC3, 46, TEGRA_PERIPH_ON_APB, tegra_clk_sbc3_8), ··· 537 537 GATE("xusb_host", "xusb_host_src", 89, 0, tegra_clk_xusb_host, 0), 538 538 GATE("xusb_ss", "xusb_ss_src", 156, 0, tegra_clk_xusb_ss, 0), 539 539 GATE("xusb_dev", "xusb_dev_src", 95, 0, tegra_clk_xusb_dev, 0), 540 - GATE("dsia", "dsia_mux", 48, 0, tegra_clk_dsia, 0), 541 - GATE("dsib", "dsib_mux", 82, 0, tegra_clk_dsib, 0), 542 540 GATE("emc", "emc_mux", 57, 0, tegra_clk_emc, CLK_IGNORE_UNUSED), 543 541 GATE("sata_cold", "clk_m", 129, TEGRA_PERIPH_ON_APB, tegra_clk_sata_cold, 0), 544 542 GATE("ispb", "clk_m", 3, 0, tegra_clk_ispb, 0),
+8 -2
drivers/clk/tegra/clk-tegra114.c
··· 715 715 [tegra_clk_sbc2_8] = { .dt_id = TEGRA114_CLK_SBC2, .present = true }, 716 716 [tegra_clk_sbc3_8] = { .dt_id = TEGRA114_CLK_SBC3, .present = true }, 717 717 [tegra_clk_i2c5] = { .dt_id = TEGRA114_CLK_I2C5, .present = true }, 718 - [tegra_clk_dsia] = { .dt_id = TEGRA114_CLK_DSIA, .present = true }, 719 718 [tegra_clk_mipi] = { .dt_id = TEGRA114_CLK_MIPI, .present = true }, 720 719 [tegra_clk_hdmi] = { .dt_id = TEGRA114_CLK_HDMI, .present = true }, 721 720 [tegra_clk_csi] = { .dt_id = TEGRA114_CLK_CSI, .present = true }, ··· 738 739 [tegra_clk_dtv] = { .dt_id = TEGRA114_CLK_DTV, .present = true }, 739 740 [tegra_clk_ndspeed] = { .dt_id = TEGRA114_CLK_NDSPEED, .present = true }, 740 741 [tegra_clk_i2cslow] = { .dt_id = TEGRA114_CLK_I2CSLOW, .present = true }, 741 - [tegra_clk_dsib] = { .dt_id = TEGRA114_CLK_DSIB, .present = true }, 742 742 [tegra_clk_tsec] = { .dt_id = TEGRA114_CLK_TSEC, .present = true }, 743 743 [tegra_clk_xusb_host] = { .dt_id = TEGRA114_CLK_XUSB_HOST, .present = true }, 744 744 [tegra_clk_msenc] = { .dt_id = TEGRA114_CLK_MSENC, .present = true }, ··· 1221 1223 CLK_SET_RATE_NO_REPARENT, 1222 1224 clk_base + PLLD2_BASE, 25, 1, 0, &pll_d2_lock); 1223 1225 clks[TEGRA114_CLK_DSIB_MUX] = clk; 1226 + 1227 + clk = tegra_clk_register_periph_gate("dsia", "dsia_mux", 0, clk_base, 1228 + 0, 48, periph_clk_enb_refcnt); 1229 + clks[TEGRA114_CLK_DSIA] = clk; 1230 + 1231 + clk = tegra_clk_register_periph_gate("dsib", "dsib_mux", 0, clk_base, 1232 + 0, 82, periph_clk_enb_refcnt); 1233 + clks[TEGRA114_CLK_DSIB] = clk; 1224 1234 1225 1235 /* emc mux */ 1226 1236 clk = clk_register_mux(NULL, "emc_mux", mux_pllmcp_clkm,
+141 -31
drivers/clk/tegra/clk-tegra124.c
··· 1 1 /* 2 - * Copyright (c) 2012, 2013, NVIDIA CORPORATION. All rights reserved. 2 + * Copyright (c) 2012-2014 NVIDIA CORPORATION. All rights reserved. 3 3 * 4 4 * This program is free software; you can redistribute it and/or modify it 5 5 * under the terms and conditions of the GNU General Public License, ··· 27 27 28 28 #include "clk.h" 29 29 #include "clk-id.h" 30 + 31 + /* 32 + * TEGRA124_CAR_BANK_COUNT: the number of peripheral clock register 33 + * banks present in the Tegra124/132 CAR IP block. The banks are 34 + * identified by single letters, e.g.: L, H, U, V, W, X. See 35 + * periph_regs[] in drivers/clk/tegra/clk.c 36 + */ 37 + #define TEGRA124_CAR_BANK_COUNT 6 30 38 31 39 #define CLK_SOURCE_CSITE 0x1d4 32 40 #define CLK_SOURCE_EMC 0x19c ··· 136 128 static unsigned long pll_ref_freq; 137 129 138 130 static DEFINE_SPINLOCK(pll_d_lock); 139 - static DEFINE_SPINLOCK(pll_d2_lock); 140 131 static DEFINE_SPINLOCK(pll_e_lock); 141 132 static DEFINE_SPINLOCK(pll_re_lock); 142 133 static DEFINE_SPINLOCK(pll_u_lock); ··· 151 144 [9] = 48000000, 152 145 [12] = 260000000, 153 146 }; 154 - 155 - static const char *mux_plld_out0_plld2_out0[] = { 156 - "pll_d_out0", "pll_d2_out0", 157 - }; 158 - #define mux_plld_out0_plld2_out0_idx NULL 159 147 160 148 static const char *mux_pllmcp_clkm[] = { 161 149 "pll_m", "pll_c", "pll_p", "clk_m", "pll_m_ud", "pll_c2", "pll_c3", ··· 785 783 [tegra_clk_sbc2] = { .dt_id = TEGRA124_CLK_SBC2, .present = true }, 786 784 [tegra_clk_sbc3] = { .dt_id = TEGRA124_CLK_SBC3, .present = true }, 787 785 [tegra_clk_i2c5] = { .dt_id = TEGRA124_CLK_I2C5, .present = true }, 788 - [tegra_clk_dsia] = { .dt_id = TEGRA124_CLK_DSIA, .present = true }, 789 786 [tegra_clk_mipi] = { .dt_id = TEGRA124_CLK_MIPI, .present = true }, 790 787 [tegra_clk_hdmi] = { .dt_id = TEGRA124_CLK_HDMI, .present = true }, 791 788 [tegra_clk_csi] = { .dt_id = TEGRA124_CLK_CSI, .present = true }, ··· 810 809 [tegra_clk_soc_therm] = { .dt_id = TEGRA124_CLK_SOC_THERM, .present = true }, 811 810 [tegra_clk_dtv] = { .dt_id = TEGRA124_CLK_DTV, .present = true }, 812 811 [tegra_clk_i2cslow] = { .dt_id = TEGRA124_CLK_I2CSLOW, .present = true }, 813 - [tegra_clk_dsib] = { .dt_id = TEGRA124_CLK_DSIB, .present = true }, 814 812 [tegra_clk_tsec] = { .dt_id = TEGRA124_CLK_TSEC, .present = true }, 815 813 [tegra_clk_xusb_host] = { .dt_id = TEGRA124_CLK_XUSB_HOST, .present = true }, 816 814 [tegra_clk_msenc] = { .dt_id = TEGRA124_CLK_MSENC, .present = true }, ··· 949 949 [tegra_clk_clk_out_1_mux] = { .dt_id = TEGRA124_CLK_CLK_OUT_1_MUX, .present = true }, 950 950 [tegra_clk_clk_out_2_mux] = { .dt_id = TEGRA124_CLK_CLK_OUT_2_MUX, .present = true }, 951 951 [tegra_clk_clk_out_3_mux] = { .dt_id = TEGRA124_CLK_CLK_OUT_3_MUX, .present = true }, 952 - [tegra_clk_dsia_mux] = { .dt_id = TEGRA124_CLK_DSIA_MUX, .present = true }, 953 - [tegra_clk_dsib_mux] = { .dt_id = TEGRA124_CLK_DSIB_MUX, .present = true }, 954 952 }; 955 953 956 954 static struct tegra_devclk devclks[] __initdata = { ··· 1110 1112 1, 2); 1111 1113 clks[TEGRA124_CLK_XUSB_SS_DIV2] = clk; 1112 1114 1113 - /* dsia mux */ 1114 - clk = clk_register_mux(NULL, "dsia_mux", mux_plld_out0_plld2_out0, 1115 - ARRAY_SIZE(mux_plld_out0_plld2_out0), 0, 1116 - clk_base + PLLD_BASE, 25, 1, 0, &pll_d_lock); 1117 - clks[TEGRA124_CLK_DSIA_MUX] = clk; 1115 + clk = clk_register_gate(NULL, "plld_dsi", "plld_out0", 0, 1116 + clk_base + PLLD_MISC, 30, 0, &pll_d_lock); 1117 + clks[TEGRA124_CLK_PLLD_DSI] = clk; 1118 1118 1119 - /* dsib mux */ 1120 - clk = clk_register_mux(NULL, "dsib_mux", mux_plld_out0_plld2_out0, 1121 - ARRAY_SIZE(mux_plld_out0_plld2_out0), 0, 1122 - clk_base + PLLD2_BASE, 25, 1, 0, &pll_d2_lock); 1123 - clks[TEGRA124_CLK_DSIB_MUX] = clk; 1119 + clk = tegra_clk_register_periph_gate("dsia", "plld_dsi", 0, clk_base, 1120 + 0, 48, periph_clk_enb_refcnt); 1121 + clks[TEGRA124_CLK_DSIA] = clk; 1122 + 1123 + clk = tegra_clk_register_periph_gate("dsib", "plld_dsi", 0, clk_base, 1124 + 0, 82, periph_clk_enb_refcnt); 1125 + clks[TEGRA124_CLK_DSIB] = clk; 1124 1126 1125 1127 /* emc mux */ 1126 1128 clk = clk_register_mux(NULL, "emc_mux", mux_pllmcp_clkm, ··· 1349 1351 {}, 1350 1352 }; 1351 1353 1352 - static struct tegra_clk_init_table init_table[] __initdata = { 1354 + static struct tegra_clk_init_table common_init_table[] __initdata = { 1353 1355 {TEGRA124_CLK_UARTA, TEGRA124_CLK_PLL_P, 408000000, 0}, 1354 1356 {TEGRA124_CLK_UARTB, TEGRA124_CLK_PLL_P, 408000000, 0}, 1355 1357 {TEGRA124_CLK_UARTC, TEGRA124_CLK_PLL_P, 408000000, 0}, ··· 1366 1368 {TEGRA124_CLK_I2S4, TEGRA124_CLK_PLL_A_OUT0, 11289600, 0}, 1367 1369 {TEGRA124_CLK_VDE, TEGRA124_CLK_PLL_P, 0, 0}, 1368 1370 {TEGRA124_CLK_HOST1X, TEGRA124_CLK_PLL_P, 136000000, 1}, 1371 + {TEGRA124_CLK_DSIALP, TEGRA124_CLK_PLL_P, 68000000, 0}, 1372 + {TEGRA124_CLK_DSIBLP, TEGRA124_CLK_PLL_P, 68000000, 0}, 1369 1373 {TEGRA124_CLK_SCLK, TEGRA124_CLK_PLL_P_OUT2, 102000000, 1}, 1370 1374 {TEGRA124_CLK_DFLL_SOC, TEGRA124_CLK_PLL_P, 51000000, 1}, 1371 1375 {TEGRA124_CLK_DFLL_REF, TEGRA124_CLK_PLL_P, 51000000, 1}, ··· 1385 1385 {TEGRA124_CLK_SATA, TEGRA124_CLK_PLL_P, 104000000, 0}, 1386 1386 {TEGRA124_CLK_SATA_OOB, TEGRA124_CLK_PLL_P, 204000000, 0}, 1387 1387 {TEGRA124_CLK_EMC, TEGRA124_CLK_CLK_MAX, 0, 1}, 1388 - {TEGRA124_CLK_CCLK_G, TEGRA124_CLK_CLK_MAX, 0, 1}, 1389 1388 {TEGRA124_CLK_MSELECT, TEGRA124_CLK_CLK_MAX, 0, 1}, 1390 1389 {TEGRA124_CLK_CSITE, TEGRA124_CLK_CLK_MAX, 0, 1}, 1391 1390 {TEGRA124_CLK_TSENSOR, TEGRA124_CLK_CLK_M, 400000, 0}, 1392 - {TEGRA124_CLK_SOC_THERM, TEGRA124_CLK_PLL_P, 51000000, 0}, 1393 1391 /* This MUST be the last entry. */ 1394 1392 {TEGRA124_CLK_CLK_MAX, TEGRA124_CLK_CLK_MAX, 0, 0}, 1395 1393 }; 1396 1394 1395 + static struct tegra_clk_init_table tegra124_init_table[] __initdata = { 1396 + {TEGRA124_CLK_SOC_THERM, TEGRA124_CLK_PLL_P, 51000000, 0}, 1397 + {TEGRA124_CLK_CCLK_G, TEGRA124_CLK_CLK_MAX, 0, 1}, 1398 + /* This MUST be the last entry. */ 1399 + {TEGRA124_CLK_CLK_MAX, TEGRA124_CLK_CLK_MAX, 0, 0}, 1400 + }; 1401 + 1402 + /* Tegra132 requires the SOC_THERM clock to remain active */ 1403 + static struct tegra_clk_init_table tegra132_init_table[] __initdata = { 1404 + {TEGRA124_CLK_SOC_THERM, TEGRA124_CLK_PLL_P, 51000000, 1}, 1405 + /* This MUST be the last entry. */ 1406 + {TEGRA124_CLK_CLK_MAX, TEGRA124_CLK_CLK_MAX, 0, 0}, 1407 + }; 1408 + 1409 + /** 1410 + * tegra124_clock_apply_init_table - initialize clocks on Tegra124 SoCs 1411 + * 1412 + * Program an initial clock rate and enable or disable clocks needed 1413 + * by the rest of the kernel, for Tegra124 SoCs. It is intended to be 1414 + * called by assigning a pointer to it to tegra_clk_apply_init_table - 1415 + * this will be called as an arch_initcall. No return value. 1416 + */ 1397 1417 static void __init tegra124_clock_apply_init_table(void) 1398 1418 { 1399 - tegra_init_from_table(init_table, clks, TEGRA124_CLK_CLK_MAX); 1419 + tegra_init_from_table(common_init_table, clks, TEGRA124_CLK_CLK_MAX); 1420 + tegra_init_from_table(tegra124_init_table, clks, TEGRA124_CLK_CLK_MAX); 1400 1421 } 1401 1422 1402 - static void __init tegra124_clock_init(struct device_node *np) 1423 + /** 1424 + * tegra132_clock_apply_init_table - initialize clocks on Tegra132 SoCs 1425 + * 1426 + * Program an initial clock rate and enable or disable clocks needed 1427 + * by the rest of the kernel, for Tegra132 SoCs. It is intended to be 1428 + * called by assigning a pointer to it to tegra_clk_apply_init_table - 1429 + * this will be called as an arch_initcall. No return value. 1430 + */ 1431 + static void __init tegra132_clock_apply_init_table(void) 1432 + { 1433 + tegra_init_from_table(common_init_table, clks, TEGRA124_CLK_CLK_MAX); 1434 + tegra_init_from_table(tegra132_init_table, clks, TEGRA124_CLK_CLK_MAX); 1435 + } 1436 + 1437 + /** 1438 + * tegra124_132_clock_init_pre - clock initialization preamble for T124/T132 1439 + * @np: struct device_node * of the DT node for the SoC CAR IP block 1440 + * 1441 + * Register most of the clocks controlled by the CAR IP block, along 1442 + * with a few clocks controlled by the PMC IP block. Everything in 1443 + * this function should be common to Tegra124 and Tegra132. XXX The 1444 + * PMC clock initialization should probably be moved to PMC-specific 1445 + * driver code. No return value. 1446 + */ 1447 + static void __init tegra124_132_clock_init_pre(struct device_node *np) 1403 1448 { 1404 1449 struct device_node *node; 1450 + u32 plld_base; 1405 1451 1406 1452 clk_base = of_iomap(np, 0); 1407 1453 if (!clk_base) { 1408 - pr_err("ioremap tegra124 CAR failed\n"); 1454 + pr_err("ioremap tegra124/tegra132 CAR failed\n"); 1409 1455 return; 1410 1456 } 1411 1457 ··· 1469 1423 return; 1470 1424 } 1471 1425 1472 - clks = tegra_clk_init(clk_base, TEGRA124_CLK_CLK_MAX, 6); 1426 + clks = tegra_clk_init(clk_base, TEGRA124_CLK_CLK_MAX, 1427 + TEGRA124_CAR_BANK_COUNT); 1473 1428 if (!clks) 1474 1429 return; 1475 1430 ··· 1484 1437 tegra_audio_clk_init(clk_base, pmc_base, tegra124_clks, &pll_a_params); 1485 1438 tegra_pmc_clk_init(pmc_base, tegra124_clks); 1486 1439 1440 + /* For Tegra124 & Tegra132, PLLD is the only source for DSIA & DSIB */ 1441 + plld_base = clk_readl(clk_base + PLLD_BASE); 1442 + plld_base &= ~BIT(25); 1443 + clk_writel(plld_base, clk_base + PLLD_BASE); 1444 + } 1445 + 1446 + /** 1447 + * tegra124_132_clock_init_post - clock initialization postamble for T124/T132 1448 + * @np: struct device_node * of the DT node for the SoC CAR IP block 1449 + * 1450 + * Register most of the along with a few clocks controlled by the PMC 1451 + * IP block. Everything in this function should be common to Tegra124 1452 + * and Tegra132. This function must be called after 1453 + * tegra124_132_clock_init_pre(), otherwise clk_base and pmc_base will 1454 + * not be set. No return value. 1455 + */ 1456 + static void __init tegra124_132_clock_init_post(struct device_node *np) 1457 + { 1487 1458 tegra_super_clk_gen4_init(clk_base, pmc_base, tegra124_clks, 1488 - &pll_x_params); 1459 + &pll_x_params); 1489 1460 tegra_add_of_provider(np); 1490 1461 tegra_register_devclks(devclks, ARRAY_SIZE(devclks)); 1491 1462 1492 - tegra_clk_apply_init_table = tegra124_clock_apply_init_table; 1493 - 1494 1463 tegra_cpu_car_ops = &tegra124_cpu_car_ops; 1495 1464 } 1465 + 1466 + /** 1467 + * tegra124_clock_init - Tegra124-specific clock initialization 1468 + * @np: struct device_node * of the DT node for the SoC CAR IP block 1469 + * 1470 + * Register most SoC clocks for the Tegra124 system-on-chip. Most of 1471 + * this code is shared between the Tegra124 and Tegra132 SoCs, 1472 + * although some of the initial clock settings and CPU clocks differ. 1473 + * Intended to be called by the OF init code when a DT node with the 1474 + * "nvidia,tegra124-car" string is encountered, and declared with 1475 + * CLK_OF_DECLARE. No return value. 1476 + */ 1477 + static void __init tegra124_clock_init(struct device_node *np) 1478 + { 1479 + tegra124_132_clock_init_pre(np); 1480 + tegra_clk_apply_init_table = tegra124_clock_apply_init_table; 1481 + tegra124_132_clock_init_post(np); 1482 + } 1483 + 1484 + /** 1485 + * tegra132_clock_init - Tegra132-specific clock initialization 1486 + * @np: struct device_node * of the DT node for the SoC CAR IP block 1487 + * 1488 + * Register most SoC clocks for the Tegra132 system-on-chip. Most of 1489 + * this code is shared between the Tegra124 and Tegra132 SoCs, 1490 + * although some of the initial clock settings and CPU clocks differ. 1491 + * Intended to be called by the OF init code when a DT node with the 1492 + * "nvidia,tegra132-car" string is encountered, and declared with 1493 + * CLK_OF_DECLARE. No return value. 1494 + */ 1495 + static void __init tegra132_clock_init(struct device_node *np) 1496 + { 1497 + tegra124_132_clock_init_pre(np); 1498 + 1499 + /* 1500 + * On Tegra132, these clocks are controlled by the 1501 + * CLUSTER_clocks IP block, located in the CPU complex 1502 + */ 1503 + tegra124_clks[tegra_clk_cclk_g].present = false; 1504 + tegra124_clks[tegra_clk_cclk_lp].present = false; 1505 + tegra124_clks[tegra_clk_pll_x].present = false; 1506 + tegra124_clks[tegra_clk_pll_x_out0].present = false; 1507 + 1508 + tegra_clk_apply_init_table = tegra132_clock_apply_init_table; 1509 + tegra124_132_clock_init_post(np); 1510 + } 1496 1511 CLK_OF_DECLARE(tegra124, "nvidia,tegra124-car", tegra124_clock_init); 1512 + CLK_OF_DECLARE(tegra132, "nvidia,tegra132-car", tegra132_clock_init);
+5 -2
drivers/clk/tegra/clk.c
··· 302 302 303 303 tegra_clk_apply_init_table_func tegra_clk_apply_init_table; 304 304 305 - void __init tegra_clocks_apply_init_table(void) 305 + static int __init tegra_clocks_apply_init_table(void) 306 306 { 307 307 if (!tegra_clk_apply_init_table) 308 - return; 308 + return 0; 309 309 310 310 tegra_clk_apply_init_table(); 311 + 312 + return 0; 311 313 } 314 + arch_initcall(tegra_clocks_apply_init_table);
+345
include/dt-bindings/clock/tegra124-car-common.h
··· 1 + /* 2 + * This header provides constants for binding nvidia,tegra124-car or 3 + * nvidia,tegra132-car. 4 + * 5 + * The first 192 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB 6 + * registers. These IDs often match those in the CAR's RST_DEVICES registers, 7 + * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In 8 + * this case, those clocks are assigned IDs above 185 in order to highlight 9 + * this issue. Implementations that interpret these clock IDs as bit values 10 + * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to 11 + * explicitly handle these special cases. 12 + * 13 + * The balance of the clocks controlled by the CAR are assigned IDs of 185 and 14 + * above. 15 + */ 16 + 17 + #ifndef _DT_BINDINGS_CLOCK_TEGRA124_CAR_COMMON_H 18 + #define _DT_BINDINGS_CLOCK_TEGRA124_CAR_COMMON_H 19 + 20 + /* 0 */ 21 + /* 1 */ 22 + /* 2 */ 23 + #define TEGRA124_CLK_ISPB 3 24 + #define TEGRA124_CLK_RTC 4 25 + #define TEGRA124_CLK_TIMER 5 26 + #define TEGRA124_CLK_UARTA 6 27 + /* 7 (register bit affects uartb and vfir) */ 28 + /* 8 */ 29 + #define TEGRA124_CLK_SDMMC2 9 30 + /* 10 (register bit affects spdif_in and spdif_out) */ 31 + #define TEGRA124_CLK_I2S1 11 32 + #define TEGRA124_CLK_I2C1 12 33 + /* 13 */ 34 + #define TEGRA124_CLK_SDMMC1 14 35 + #define TEGRA124_CLK_SDMMC4 15 36 + /* 16 */ 37 + #define TEGRA124_CLK_PWM 17 38 + #define TEGRA124_CLK_I2S2 18 39 + /* 20 (register bit affects vi and vi_sensor) */ 40 + /* 21 */ 41 + #define TEGRA124_CLK_USBD 22 42 + #define TEGRA124_CLK_ISP 23 43 + /* 26 */ 44 + /* 25 */ 45 + #define TEGRA124_CLK_DISP2 26 46 + #define TEGRA124_CLK_DISP1 27 47 + #define TEGRA124_CLK_HOST1X 28 48 + #define TEGRA124_CLK_VCP 29 49 + #define TEGRA124_CLK_I2S0 30 50 + /* 31 */ 51 + 52 + #define TEGRA124_CLK_MC 32 53 + /* 33 */ 54 + #define TEGRA124_CLK_APBDMA 34 55 + /* 35 */ 56 + #define TEGRA124_CLK_KBC 36 57 + /* 37 */ 58 + /* 38 */ 59 + /* 39 (register bit affects fuse and fuse_burn) */ 60 + #define TEGRA124_CLK_KFUSE 40 61 + #define TEGRA124_CLK_SBC1 41 62 + #define TEGRA124_CLK_NOR 42 63 + /* 43 */ 64 + #define TEGRA124_CLK_SBC2 44 65 + /* 45 */ 66 + #define TEGRA124_CLK_SBC3 46 67 + #define TEGRA124_CLK_I2C5 47 68 + #define TEGRA124_CLK_DSIA 48 69 + /* 49 */ 70 + #define TEGRA124_CLK_MIPI 50 71 + #define TEGRA124_CLK_HDMI 51 72 + #define TEGRA124_CLK_CSI 52 73 + /* 53 */ 74 + #define TEGRA124_CLK_I2C2 54 75 + #define TEGRA124_CLK_UARTC 55 76 + #define TEGRA124_CLK_MIPI_CAL 56 77 + #define TEGRA124_CLK_EMC 57 78 + #define TEGRA124_CLK_USB2 58 79 + #define TEGRA124_CLK_USB3 59 80 + /* 60 */ 81 + #define TEGRA124_CLK_VDE 61 82 + #define TEGRA124_CLK_BSEA 62 83 + #define TEGRA124_CLK_BSEV 63 84 + 85 + /* 64 */ 86 + #define TEGRA124_CLK_UARTD 65 87 + /* 66 */ 88 + #define TEGRA124_CLK_I2C3 67 89 + #define TEGRA124_CLK_SBC4 68 90 + #define TEGRA124_CLK_SDMMC3 69 91 + #define TEGRA124_CLK_PCIE 70 92 + #define TEGRA124_CLK_OWR 71 93 + #define TEGRA124_CLK_AFI 72 94 + #define TEGRA124_CLK_CSITE 73 95 + /* 74 */ 96 + /* 75 */ 97 + #define TEGRA124_CLK_LA 76 98 + #define TEGRA124_CLK_TRACE 77 99 + #define TEGRA124_CLK_SOC_THERM 78 100 + #define TEGRA124_CLK_DTV 79 101 + /* 80 */ 102 + #define TEGRA124_CLK_I2CSLOW 81 103 + #define TEGRA124_CLK_DSIB 82 104 + #define TEGRA124_CLK_TSEC 83 105 + /* 84 */ 106 + /* 85 */ 107 + /* 86 */ 108 + /* 87 */ 109 + /* 88 */ 110 + #define TEGRA124_CLK_XUSB_HOST 89 111 + /* 90 */ 112 + #define TEGRA124_CLK_MSENC 91 113 + #define TEGRA124_CLK_CSUS 92 114 + /* 93 */ 115 + /* 94 */ 116 + /* 95 (bit affects xusb_dev and xusb_dev_src) */ 117 + 118 + /* 96 */ 119 + /* 97 */ 120 + /* 98 */ 121 + #define TEGRA124_CLK_MSELECT 99 122 + #define TEGRA124_CLK_TSENSOR 100 123 + #define TEGRA124_CLK_I2S3 101 124 + #define TEGRA124_CLK_I2S4 102 125 + #define TEGRA124_CLK_I2C4 103 126 + #define TEGRA124_CLK_SBC5 104 127 + #define TEGRA124_CLK_SBC6 105 128 + #define TEGRA124_CLK_D_AUDIO 106 129 + #define TEGRA124_CLK_APBIF 107 130 + #define TEGRA124_CLK_DAM0 108 131 + #define TEGRA124_CLK_DAM1 109 132 + #define TEGRA124_CLK_DAM2 110 133 + #define TEGRA124_CLK_HDA2CODEC_2X 111 134 + /* 112 */ 135 + #define TEGRA124_CLK_AUDIO0_2X 113 136 + #define TEGRA124_CLK_AUDIO1_2X 114 137 + #define TEGRA124_CLK_AUDIO2_2X 115 138 + #define TEGRA124_CLK_AUDIO3_2X 116 139 + #define TEGRA124_CLK_AUDIO4_2X 117 140 + #define TEGRA124_CLK_SPDIF_2X 118 141 + #define TEGRA124_CLK_ACTMON 119 142 + #define TEGRA124_CLK_EXTERN1 120 143 + #define TEGRA124_CLK_EXTERN2 121 144 + #define TEGRA124_CLK_EXTERN3 122 145 + #define TEGRA124_CLK_SATA_OOB 123 146 + #define TEGRA124_CLK_SATA 124 147 + #define TEGRA124_CLK_HDA 125 148 + /* 126 */ 149 + #define TEGRA124_CLK_SE 127 150 + 151 + #define TEGRA124_CLK_HDA2HDMI 128 152 + #define TEGRA124_CLK_SATA_COLD 129 153 + /* 130 */ 154 + /* 131 */ 155 + /* 132 */ 156 + /* 133 */ 157 + /* 134 */ 158 + /* 135 */ 159 + /* 136 */ 160 + /* 137 */ 161 + /* 138 */ 162 + /* 139 */ 163 + /* 140 */ 164 + /* 141 */ 165 + /* 142 */ 166 + /* 143 (bit affects xusb_falcon_src, xusb_fs_src, */ 167 + /* xusb_host_src and xusb_ss_src) */ 168 + #define TEGRA124_CLK_CILAB 144 169 + #define TEGRA124_CLK_CILCD 145 170 + #define TEGRA124_CLK_CILE 146 171 + #define TEGRA124_CLK_DSIALP 147 172 + #define TEGRA124_CLK_DSIBLP 148 173 + #define TEGRA124_CLK_ENTROPY 149 174 + #define TEGRA124_CLK_DDS 150 175 + /* 151 */ 176 + #define TEGRA124_CLK_DP2 152 177 + #define TEGRA124_CLK_AMX 153 178 + #define TEGRA124_CLK_ADX 154 179 + /* 155 (bit affects dfll_ref and dfll_soc) */ 180 + #define TEGRA124_CLK_XUSB_SS 156 181 + /* 157 */ 182 + /* 158 */ 183 + /* 159 */ 184 + 185 + /* 160 */ 186 + /* 161 */ 187 + /* 162 */ 188 + /* 163 */ 189 + /* 164 */ 190 + /* 165 */ 191 + #define TEGRA124_CLK_I2C6 166 192 + /* 167 */ 193 + /* 168 */ 194 + /* 169 */ 195 + /* 170 */ 196 + #define TEGRA124_CLK_VIM2_CLK 171 197 + /* 172 */ 198 + /* 173 */ 199 + /* 174 */ 200 + /* 175 */ 201 + #define TEGRA124_CLK_HDMI_AUDIO 176 202 + #define TEGRA124_CLK_CLK72MHZ 177 203 + #define TEGRA124_CLK_VIC03 178 204 + /* 179 */ 205 + #define TEGRA124_CLK_ADX1 180 206 + #define TEGRA124_CLK_DPAUX 181 207 + #define TEGRA124_CLK_SOR0 182 208 + /* 183 */ 209 + #define TEGRA124_CLK_GPU 184 210 + #define TEGRA124_CLK_AMX1 185 211 + /* 186 */ 212 + /* 187 */ 213 + /* 188 */ 214 + /* 189 */ 215 + /* 190 */ 216 + /* 191 */ 217 + #define TEGRA124_CLK_UARTB 192 218 + #define TEGRA124_CLK_VFIR 193 219 + #define TEGRA124_CLK_SPDIF_IN 194 220 + #define TEGRA124_CLK_SPDIF_OUT 195 221 + #define TEGRA124_CLK_VI 196 222 + #define TEGRA124_CLK_VI_SENSOR 197 223 + #define TEGRA124_CLK_FUSE 198 224 + #define TEGRA124_CLK_FUSE_BURN 199 225 + #define TEGRA124_CLK_CLK_32K 200 226 + #define TEGRA124_CLK_CLK_M 201 227 + #define TEGRA124_CLK_CLK_M_DIV2 202 228 + #define TEGRA124_CLK_CLK_M_DIV4 203 229 + #define TEGRA124_CLK_PLL_REF 204 230 + #define TEGRA124_CLK_PLL_C 205 231 + #define TEGRA124_CLK_PLL_C_OUT1 206 232 + #define TEGRA124_CLK_PLL_C2 207 233 + #define TEGRA124_CLK_PLL_C3 208 234 + #define TEGRA124_CLK_PLL_M 209 235 + #define TEGRA124_CLK_PLL_M_OUT1 210 236 + #define TEGRA124_CLK_PLL_P 211 237 + #define TEGRA124_CLK_PLL_P_OUT1 212 238 + #define TEGRA124_CLK_PLL_P_OUT2 213 239 + #define TEGRA124_CLK_PLL_P_OUT3 214 240 + #define TEGRA124_CLK_PLL_P_OUT4 215 241 + #define TEGRA124_CLK_PLL_A 216 242 + #define TEGRA124_CLK_PLL_A_OUT0 217 243 + #define TEGRA124_CLK_PLL_D 218 244 + #define TEGRA124_CLK_PLL_D_OUT0 219 245 + #define TEGRA124_CLK_PLL_D2 220 246 + #define TEGRA124_CLK_PLL_D2_OUT0 221 247 + #define TEGRA124_CLK_PLL_U 222 248 + #define TEGRA124_CLK_PLL_U_480M 223 249 + 250 + #define TEGRA124_CLK_PLL_U_60M 224 251 + #define TEGRA124_CLK_PLL_U_48M 225 252 + #define TEGRA124_CLK_PLL_U_12M 226 253 + /* 227 */ 254 + /* 228 */ 255 + #define TEGRA124_CLK_PLL_RE_VCO 229 256 + #define TEGRA124_CLK_PLL_RE_OUT 230 257 + #define TEGRA124_CLK_PLL_E 231 258 + #define TEGRA124_CLK_SPDIF_IN_SYNC 232 259 + #define TEGRA124_CLK_I2S0_SYNC 233 260 + #define TEGRA124_CLK_I2S1_SYNC 234 261 + #define TEGRA124_CLK_I2S2_SYNC 235 262 + #define TEGRA124_CLK_I2S3_SYNC 236 263 + #define TEGRA124_CLK_I2S4_SYNC 237 264 + #define TEGRA124_CLK_VIMCLK_SYNC 238 265 + #define TEGRA124_CLK_AUDIO0 239 266 + #define TEGRA124_CLK_AUDIO1 240 267 + #define TEGRA124_CLK_AUDIO2 241 268 + #define TEGRA124_CLK_AUDIO3 242 269 + #define TEGRA124_CLK_AUDIO4 243 270 + #define TEGRA124_CLK_SPDIF 244 271 + #define TEGRA124_CLK_CLK_OUT_1 245 272 + #define TEGRA124_CLK_CLK_OUT_2 246 273 + #define TEGRA124_CLK_CLK_OUT_3 247 274 + #define TEGRA124_CLK_BLINK 248 275 + /* 249 */ 276 + /* 250 */ 277 + /* 251 */ 278 + #define TEGRA124_CLK_XUSB_HOST_SRC 252 279 + #define TEGRA124_CLK_XUSB_FALCON_SRC 253 280 + #define TEGRA124_CLK_XUSB_FS_SRC 254 281 + #define TEGRA124_CLK_XUSB_SS_SRC 255 282 + 283 + #define TEGRA124_CLK_XUSB_DEV_SRC 256 284 + #define TEGRA124_CLK_XUSB_DEV 257 285 + #define TEGRA124_CLK_XUSB_HS_SRC 258 286 + #define TEGRA124_CLK_SCLK 259 287 + #define TEGRA124_CLK_HCLK 260 288 + #define TEGRA124_CLK_PCLK 261 289 + /* 262 */ 290 + /* 263 */ 291 + #define TEGRA124_CLK_DFLL_REF 264 292 + #define TEGRA124_CLK_DFLL_SOC 265 293 + #define TEGRA124_CLK_VI_SENSOR2 266 294 + #define TEGRA124_CLK_PLL_P_OUT5 267 295 + #define TEGRA124_CLK_CML0 268 296 + #define TEGRA124_CLK_CML1 269 297 + #define TEGRA124_CLK_PLL_C4 270 298 + #define TEGRA124_CLK_PLL_DP 271 299 + #define TEGRA124_CLK_PLL_E_MUX 272 300 + #define TEGRA124_CLK_PLLD_DSI 273 301 + /* 274 */ 302 + /* 275 */ 303 + /* 276 */ 304 + /* 277 */ 305 + /* 278 */ 306 + /* 279 */ 307 + /* 280 */ 308 + /* 281 */ 309 + /* 282 */ 310 + /* 283 */ 311 + /* 284 */ 312 + /* 285 */ 313 + /* 286 */ 314 + /* 287 */ 315 + 316 + /* 288 */ 317 + /* 289 */ 318 + /* 290 */ 319 + /* 291 */ 320 + /* 292 */ 321 + /* 293 */ 322 + /* 294 */ 323 + /* 295 */ 324 + /* 296 */ 325 + /* 297 */ 326 + /* 298 */ 327 + /* 299 */ 328 + #define TEGRA124_CLK_AUDIO0_MUX 300 329 + #define TEGRA124_CLK_AUDIO1_MUX 301 330 + #define TEGRA124_CLK_AUDIO2_MUX 302 331 + #define TEGRA124_CLK_AUDIO3_MUX 303 332 + #define TEGRA124_CLK_AUDIO4_MUX 304 333 + #define TEGRA124_CLK_SPDIF_MUX 305 334 + #define TEGRA124_CLK_CLK_OUT_1_MUX 306 335 + #define TEGRA124_CLK_CLK_OUT_2_MUX 307 336 + #define TEGRA124_CLK_CLK_OUT_3_MUX 308 337 + /* 309 */ 338 + /* 310 */ 339 + #define TEGRA124_CLK_SOR0_LVDS 311 340 + #define TEGRA124_CLK_XUSB_SS_DIV2 312 341 + 342 + #define TEGRA124_CLK_PLL_M_UD 313 343 + #define TEGRA124_CLK_PLL_C_UD 314 344 + 345 + #endif /* _DT_BINDINGS_CLOCK_TEGRA124_CAR_COMMON_H */
+9 -336
include/dt-bindings/clock/tegra124-car.h
··· 1 1 /* 2 - * This header provides constants for binding nvidia,tegra124-car. 3 - * 4 - * The first 192 clocks are numbered to match the bits in the CAR's CLK_OUT_ENB 5 - * registers. These IDs often match those in the CAR's RST_DEVICES registers, 6 - * but not in all cases. Some bits in CLK_OUT_ENB affect multiple clocks. In 7 - * this case, those clocks are assigned IDs above 185 in order to highlight 8 - * this issue. Implementations that interpret these clock IDs as bit values 9 - * within the CLK_OUT_ENB or RST_DEVICES registers should be careful to 10 - * explicitly handle these special cases. 11 - * 12 - * The balance of the clocks controlled by the CAR are assigned IDs of 185 and 13 - * above. 2 + * This header provides Tegra124-specific constants for binding 3 + * nvidia,tegra124-car. 14 4 */ 5 + 6 + #include <dt-bindings/clock/tegra124-car-common.h> 15 7 16 8 #ifndef _DT_BINDINGS_CLOCK_TEGRA124_CAR_H 17 9 #define _DT_BINDINGS_CLOCK_TEGRA124_CAR_H 18 10 19 - /* 0 */ 20 - /* 1 */ 21 - /* 2 */ 22 - #define TEGRA124_CLK_ISPB 3 23 - #define TEGRA124_CLK_RTC 4 24 - #define TEGRA124_CLK_TIMER 5 25 - #define TEGRA124_CLK_UARTA 6 26 - /* 7 (register bit affects uartb and vfir) */ 27 - /* 8 */ 28 - #define TEGRA124_CLK_SDMMC2 9 29 - /* 10 (register bit affects spdif_in and spdif_out) */ 30 - #define TEGRA124_CLK_I2S1 11 31 - #define TEGRA124_CLK_I2C1 12 32 - /* 13 */ 33 - #define TEGRA124_CLK_SDMMC1 14 34 - #define TEGRA124_CLK_SDMMC4 15 35 - /* 16 */ 36 - #define TEGRA124_CLK_PWM 17 37 - #define TEGRA124_CLK_I2S2 18 38 - /* 20 (register bit affects vi and vi_sensor) */ 39 - /* 21 */ 40 - #define TEGRA124_CLK_USBD 22 41 - #define TEGRA124_CLK_ISP 23 42 - /* 26 */ 43 - /* 25 */ 44 - #define TEGRA124_CLK_DISP2 26 45 - #define TEGRA124_CLK_DISP1 27 46 - #define TEGRA124_CLK_HOST1X 28 47 - #define TEGRA124_CLK_VCP 29 48 - #define TEGRA124_CLK_I2S0 30 49 - /* 31 */ 11 + #define TEGRA124_CLK_PLL_X 227 12 + #define TEGRA124_CLK_PLL_X_OUT0 228 50 13 51 - #define TEGRA124_CLK_MC 32 52 - /* 33 */ 53 - #define TEGRA124_CLK_APBDMA 34 54 - /* 35 */ 55 - #define TEGRA124_CLK_KBC 36 56 - /* 37 */ 57 - /* 38 */ 58 - /* 39 (register bit affects fuse and fuse_burn) */ 59 - #define TEGRA124_CLK_KFUSE 40 60 - #define TEGRA124_CLK_SBC1 41 61 - #define TEGRA124_CLK_NOR 42 62 - /* 43 */ 63 - #define TEGRA124_CLK_SBC2 44 64 - /* 45 */ 65 - #define TEGRA124_CLK_SBC3 46 66 - #define TEGRA124_CLK_I2C5 47 67 - #define TEGRA124_CLK_DSIA 48 68 - /* 49 */ 69 - #define TEGRA124_CLK_MIPI 50 70 - #define TEGRA124_CLK_HDMI 51 71 - #define TEGRA124_CLK_CSI 52 72 - /* 53 */ 73 - #define TEGRA124_CLK_I2C2 54 74 - #define TEGRA124_CLK_UARTC 55 75 - #define TEGRA124_CLK_MIPI_CAL 56 76 - #define TEGRA124_CLK_EMC 57 77 - #define TEGRA124_CLK_USB2 58 78 - #define TEGRA124_CLK_USB3 59 79 - /* 60 */ 80 - #define TEGRA124_CLK_VDE 61 81 - #define TEGRA124_CLK_BSEA 62 82 - #define TEGRA124_CLK_BSEV 63 14 + #define TEGRA124_CLK_CCLK_G 262 15 + #define TEGRA124_CLK_CCLK_LP 263 83 16 84 - /* 64 */ 85 - #define TEGRA124_CLK_UARTD 65 86 - /* 66 */ 87 - #define TEGRA124_CLK_I2C3 67 88 - #define TEGRA124_CLK_SBC4 68 89 - #define TEGRA124_CLK_SDMMC3 69 90 - #define TEGRA124_CLK_PCIE 70 91 - #define TEGRA124_CLK_OWR 71 92 - #define TEGRA124_CLK_AFI 72 93 - #define TEGRA124_CLK_CSITE 73 94 - /* 74 */ 95 - /* 75 */ 96 - #define TEGRA124_CLK_LA 76 97 - #define TEGRA124_CLK_TRACE 77 98 - #define TEGRA124_CLK_SOC_THERM 78 99 - #define TEGRA124_CLK_DTV 79 100 - /* 80 */ 101 - #define TEGRA124_CLK_I2CSLOW 81 102 - #define TEGRA124_CLK_DSIB 82 103 - #define TEGRA124_CLK_TSEC 83 104 - /* 84 */ 105 - /* 85 */ 106 - /* 86 */ 107 - /* 87 */ 108 - /* 88 */ 109 - #define TEGRA124_CLK_XUSB_HOST 89 110 - /* 90 */ 111 - #define TEGRA124_CLK_MSENC 91 112 - #define TEGRA124_CLK_CSUS 92 113 - /* 93 */ 114 - /* 94 */ 115 - /* 95 (bit affects xusb_dev and xusb_dev_src) */ 116 - 117 - /* 96 */ 118 - /* 97 */ 119 - /* 98 */ 120 - #define TEGRA124_CLK_MSELECT 99 121 - #define TEGRA124_CLK_TSENSOR 100 122 - #define TEGRA124_CLK_I2S3 101 123 - #define TEGRA124_CLK_I2S4 102 124 - #define TEGRA124_CLK_I2C4 103 125 - #define TEGRA124_CLK_SBC5 104 126 - #define TEGRA124_CLK_SBC6 105 127 - #define TEGRA124_CLK_D_AUDIO 106 128 - #define TEGRA124_CLK_APBIF 107 129 - #define TEGRA124_CLK_DAM0 108 130 - #define TEGRA124_CLK_DAM1 109 131 - #define TEGRA124_CLK_DAM2 110 132 - #define TEGRA124_CLK_HDA2CODEC_2X 111 133 - /* 112 */ 134 - #define TEGRA124_CLK_AUDIO0_2X 113 135 - #define TEGRA124_CLK_AUDIO1_2X 114 136 - #define TEGRA124_CLK_AUDIO2_2X 115 137 - #define TEGRA124_CLK_AUDIO3_2X 116 138 - #define TEGRA124_CLK_AUDIO4_2X 117 139 - #define TEGRA124_CLK_SPDIF_2X 118 140 - #define TEGRA124_CLK_ACTMON 119 141 - #define TEGRA124_CLK_EXTERN1 120 142 - #define TEGRA124_CLK_EXTERN2 121 143 - #define TEGRA124_CLK_EXTERN3 122 144 - #define TEGRA124_CLK_SATA_OOB 123 145 - #define TEGRA124_CLK_SATA 124 146 - #define TEGRA124_CLK_HDA 125 147 - /* 126 */ 148 - #define TEGRA124_CLK_SE 127 149 - 150 - #define TEGRA124_CLK_HDA2HDMI 128 151 - #define TEGRA124_CLK_SATA_COLD 129 152 - /* 130 */ 153 - /* 131 */ 154 - /* 132 */ 155 - /* 133 */ 156 - /* 134 */ 157 - /* 135 */ 158 - /* 136 */ 159 - /* 137 */ 160 - /* 138 */ 161 - /* 139 */ 162 - /* 140 */ 163 - /* 141 */ 164 - /* 142 */ 165 - /* 143 (bit affects xusb_falcon_src, xusb_fs_src, */ 166 - /* xusb_host_src and xusb_ss_src) */ 167 - #define TEGRA124_CLK_CILAB 144 168 - #define TEGRA124_CLK_CILCD 145 169 - #define TEGRA124_CLK_CILE 146 170 - #define TEGRA124_CLK_DSIALP 147 171 - #define TEGRA124_CLK_DSIBLP 148 172 - #define TEGRA124_CLK_ENTROPY 149 173 - #define TEGRA124_CLK_DDS 150 174 - /* 151 */ 175 - #define TEGRA124_CLK_DP2 152 176 - #define TEGRA124_CLK_AMX 153 177 - #define TEGRA124_CLK_ADX 154 178 - /* 155 (bit affects dfll_ref and dfll_soc) */ 179 - #define TEGRA124_CLK_XUSB_SS 156 180 - /* 157 */ 181 - /* 158 */ 182 - /* 159 */ 183 - 184 - /* 160 */ 185 - /* 161 */ 186 - /* 162 */ 187 - /* 163 */ 188 - /* 164 */ 189 - /* 165 */ 190 - #define TEGRA124_CLK_I2C6 166 191 - /* 167 */ 192 - /* 168 */ 193 - /* 169 */ 194 - /* 170 */ 195 - #define TEGRA124_CLK_VIM2_CLK 171 196 - /* 172 */ 197 - /* 173 */ 198 - /* 174 */ 199 - /* 175 */ 200 - #define TEGRA124_CLK_HDMI_AUDIO 176 201 - #define TEGRA124_CLK_CLK72MHZ 177 202 - #define TEGRA124_CLK_VIC03 178 203 - /* 179 */ 204 - #define TEGRA124_CLK_ADX1 180 205 - #define TEGRA124_CLK_DPAUX 181 206 - #define TEGRA124_CLK_SOR0 182 207 - /* 183 */ 208 - #define TEGRA124_CLK_GPU 184 209 - #define TEGRA124_CLK_AMX1 185 210 - /* 186 */ 211 - /* 187 */ 212 - /* 188 */ 213 - /* 189 */ 214 - /* 190 */ 215 - /* 191 */ 216 - #define TEGRA124_CLK_UARTB 192 217 - #define TEGRA124_CLK_VFIR 193 218 - #define TEGRA124_CLK_SPDIF_IN 194 219 - #define TEGRA124_CLK_SPDIF_OUT 195 220 - #define TEGRA124_CLK_VI 196 221 - #define TEGRA124_CLK_VI_SENSOR 197 222 - #define TEGRA124_CLK_FUSE 198 223 - #define TEGRA124_CLK_FUSE_BURN 199 224 - #define TEGRA124_CLK_CLK_32K 200 225 - #define TEGRA124_CLK_CLK_M 201 226 - #define TEGRA124_CLK_CLK_M_DIV2 202 227 - #define TEGRA124_CLK_CLK_M_DIV4 203 228 - #define TEGRA124_CLK_PLL_REF 204 229 - #define TEGRA124_CLK_PLL_C 205 230 - #define TEGRA124_CLK_PLL_C_OUT1 206 231 - #define TEGRA124_CLK_PLL_C2 207 232 - #define TEGRA124_CLK_PLL_C3 208 233 - #define TEGRA124_CLK_PLL_M 209 234 - #define TEGRA124_CLK_PLL_M_OUT1 210 235 - #define TEGRA124_CLK_PLL_P 211 236 - #define TEGRA124_CLK_PLL_P_OUT1 212 237 - #define TEGRA124_CLK_PLL_P_OUT2 213 238 - #define TEGRA124_CLK_PLL_P_OUT3 214 239 - #define TEGRA124_CLK_PLL_P_OUT4 215 240 - #define TEGRA124_CLK_PLL_A 216 241 - #define TEGRA124_CLK_PLL_A_OUT0 217 242 - #define TEGRA124_CLK_PLL_D 218 243 - #define TEGRA124_CLK_PLL_D_OUT0 219 244 - #define TEGRA124_CLK_PLL_D2 220 245 - #define TEGRA124_CLK_PLL_D2_OUT0 221 246 - #define TEGRA124_CLK_PLL_U 222 247 - #define TEGRA124_CLK_PLL_U_480M 223 248 - 249 - #define TEGRA124_CLK_PLL_U_60M 224 250 - #define TEGRA124_CLK_PLL_U_48M 225 251 - #define TEGRA124_CLK_PLL_U_12M 226 252 - #define TEGRA124_CLK_PLL_X 227 253 - #define TEGRA124_CLK_PLL_X_OUT0 228 254 - #define TEGRA124_CLK_PLL_RE_VCO 229 255 - #define TEGRA124_CLK_PLL_RE_OUT 230 256 - #define TEGRA124_CLK_PLL_E 231 257 - #define TEGRA124_CLK_SPDIF_IN_SYNC 232 258 - #define TEGRA124_CLK_I2S0_SYNC 233 259 - #define TEGRA124_CLK_I2S1_SYNC 234 260 - #define TEGRA124_CLK_I2S2_SYNC 235 261 - #define TEGRA124_CLK_I2S3_SYNC 236 262 - #define TEGRA124_CLK_I2S4_SYNC 237 263 - #define TEGRA124_CLK_VIMCLK_SYNC 238 264 - #define TEGRA124_CLK_AUDIO0 239 265 - #define TEGRA124_CLK_AUDIO1 240 266 - #define TEGRA124_CLK_AUDIO2 241 267 - #define TEGRA124_CLK_AUDIO3 242 268 - #define TEGRA124_CLK_AUDIO4 243 269 - #define TEGRA124_CLK_SPDIF 244 270 - #define TEGRA124_CLK_CLK_OUT_1 245 271 - #define TEGRA124_CLK_CLK_OUT_2 246 272 - #define TEGRA124_CLK_CLK_OUT_3 247 273 - #define TEGRA124_CLK_BLINK 248 274 - /* 249 */ 275 - /* 250 */ 276 - /* 251 */ 277 - #define TEGRA124_CLK_XUSB_HOST_SRC 252 278 - #define TEGRA124_CLK_XUSB_FALCON_SRC 253 279 - #define TEGRA124_CLK_XUSB_FS_SRC 254 280 - #define TEGRA124_CLK_XUSB_SS_SRC 255 281 - 282 - #define TEGRA124_CLK_XUSB_DEV_SRC 256 283 - #define TEGRA124_CLK_XUSB_DEV 257 284 - #define TEGRA124_CLK_XUSB_HS_SRC 258 285 - #define TEGRA124_CLK_SCLK 259 286 - #define TEGRA124_CLK_HCLK 260 287 - #define TEGRA124_CLK_PCLK 261 288 - #define TEGRA124_CLK_CCLK_G 262 289 - #define TEGRA124_CLK_CCLK_LP 263 290 - #define TEGRA124_CLK_DFLL_REF 264 291 - #define TEGRA124_CLK_DFLL_SOC 265 292 - #define TEGRA124_CLK_VI_SENSOR2 266 293 - #define TEGRA124_CLK_PLL_P_OUT5 267 294 - #define TEGRA124_CLK_CML0 268 295 - #define TEGRA124_CLK_CML1 269 296 - #define TEGRA124_CLK_PLL_C4 270 297 - #define TEGRA124_CLK_PLL_DP 271 298 - #define TEGRA124_CLK_PLL_E_MUX 272 299 - /* 273 */ 300 - /* 274 */ 301 - /* 275 */ 302 - /* 276 */ 303 - /* 277 */ 304 - /* 278 */ 305 - /* 279 */ 306 - /* 280 */ 307 - /* 281 */ 308 - /* 282 */ 309 - /* 283 */ 310 - /* 284 */ 311 - /* 285 */ 312 - /* 286 */ 313 - /* 287 */ 314 - 315 - /* 288 */ 316 - /* 289 */ 317 - /* 290 */ 318 - /* 291 */ 319 - /* 292 */ 320 - /* 293 */ 321 - /* 294 */ 322 - /* 295 */ 323 - /* 296 */ 324 - /* 297 */ 325 - /* 298 */ 326 - /* 299 */ 327 - #define TEGRA124_CLK_AUDIO0_MUX 300 328 - #define TEGRA124_CLK_AUDIO1_MUX 301 329 - #define TEGRA124_CLK_AUDIO2_MUX 302 330 - #define TEGRA124_CLK_AUDIO3_MUX 303 331 - #define TEGRA124_CLK_AUDIO4_MUX 304 332 - #define TEGRA124_CLK_SPDIF_MUX 305 333 - #define TEGRA124_CLK_CLK_OUT_1_MUX 306 334 - #define TEGRA124_CLK_CLK_OUT_2_MUX 307 335 - #define TEGRA124_CLK_CLK_OUT_3_MUX 308 336 - #define TEGRA124_CLK_DSIA_MUX 309 337 - #define TEGRA124_CLK_DSIB_MUX 310 338 - #define TEGRA124_CLK_SOR0_LVDS 311 339 - #define TEGRA124_CLK_XUSB_SS_DIV2 312 340 - 341 - #define TEGRA124_CLK_PLL_M_UD 313 342 - #define TEGRA124_CLK_PLL_C_UD 314 343 - 344 - #define TEGRA124_CLK_CLK_MAX 315 17 + #define TEGRA124_CLK_CLK_MAX 315 345 18 346 19 #endif /* _DT_BINDINGS_CLOCK_TEGRA124_CAR_H */
-2
include/linux/clk/tegra.h
··· 120 120 } 121 121 #endif 122 122 123 - void tegra_clocks_apply_init_table(void); 124 - 125 123 #endif /* __LINUX_CLK_TEGRA_H_ */