aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-26 15:57:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-26 15:57:47 -0400
commit84a442b9a16ee69243ce7fce5d6f6f9c3fbdee68 (patch)
tree332a0c901d8ab2ffb19b8ce14b4b094bf5b08657 /arch/arm/mach-imx
parent39b6cc668c5ecc66f6f9c9293ffab681cb6f7065 (diff)
parentdeb88cc3c69975cbd9875ed9fac259b351f6b64d (diff)
Merge tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull arm-soc device tree conversions (part 2) from Olof Johansson: "These continue the device tree work from part 1, this set is for the tegra, mxs and imx platforms, all of which have dependencies on clock or pinctrl changes submitted earlier." Fix up trivial conflicts due to nearby changes in drivers/{gpio/gpio,i2c/busses/i2c}-mxs.c * tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (73 commits) ARM: dt: tegra: invert status=disable vs status=okay ARM: dt: tegra: consistent basic property ordering ARM: dt: tegra: sort nodes based on bus order ARM: dt: tegra: remove duplicate device_type property ARM: dt: tegra: consistenly use lower-case for hex constants ARM: dt: tegra: format regs properties consistently ARM: dt: tegra: gpio comment cleanup ARM: dt: tegra: remove unnecessary unit addresses ARM: dt: tegra: whitespace cleanup ARM: dt: tegra cardhu: fix typo in SDHCI node name ARM: dt: tegra: cardhu: register core regulator tps62361 ARM: dt: tegra30.dtsi: Add SMMU node ARM: dt: tegra20.dtsi: Add GART node ARM: dt: tegra30.dtsi: Add Memory Controller(MC) nodes ARM: dt: tegra20.dtsi: Add Memory Controller(MC) nodes ARM: dt: tegra: Add device tree support for AHB ARM: dts: enable audio support for imx28-evk ARM: dts: enable i2c device for imx28-evk i2c: mxs: add device tree probe support ARM: dts: enable mmc for imx28-evk ...
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/Makefile.boot3
-rw-r--r--arch/arm/mach-imx/clk-imx51-imx53.c40
-rw-r--r--arch/arm/mach-imx/clk-imx6q.c35
-rw-r--r--arch/arm/mach-imx/imx53-dt.c19
-rw-r--r--arch/arm/mach-imx/lluart.c6
-rw-r--r--arch/arm/mach-imx/mach-imx6q.c55
-rw-r--r--arch/arm/mach-imx/mach-mx51_babbage.c6
7 files changed, 139 insertions, 25 deletions
diff --git a/arch/arm/mach-imx/Makefile.boot b/arch/arm/mach-imx/Makefile.boot
index 3851d8a27875..05541cf4a878 100644
--- a/arch/arm/mach-imx/Makefile.boot
+++ b/arch/arm/mach-imx/Makefile.boot
@@ -42,4 +42,5 @@ dtb-$(CONFIG_MACH_IMX51_DT) += imx51-babbage.dtb
42dtb-$(CONFIG_MACH_IMX53_DT) += imx53-ard.dtb imx53-evk.dtb \ 42dtb-$(CONFIG_MACH_IMX53_DT) += imx53-ard.dtb imx53-evk.dtb \
43 imx53-qsb.dtb imx53-smd.dtb 43 imx53-qsb.dtb imx53-smd.dtb
44dtb-$(CONFIG_SOC_IMX6Q) += imx6q-arm2.dtb \ 44dtb-$(CONFIG_SOC_IMX6Q) += imx6q-arm2.dtb \
45 imx6q-sabrelite.dtb 45 imx6q-sabrelite.dtb \
46 imx6q-sabresd.dtb \
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c
index b8a382defb23..fcd94f3b0f0e 100644
--- a/arch/arm/mach-imx/clk-imx51-imx53.c
+++ b/arch/arm/mach-imx/clk-imx51-imx53.c
@@ -31,6 +31,11 @@ static const char *per_lp_apm_sel[] = { "main_bus", "lp_apm", };
31static const char *per_root_sel[] = { "per_podf", "ipg", }; 31static const char *per_root_sel[] = { "per_podf", "ipg", };
32static const char *esdhc_c_sel[] = { "esdhc_a_podf", "esdhc_b_podf", }; 32static const char *esdhc_c_sel[] = { "esdhc_a_podf", "esdhc_b_podf", };
33static const char *esdhc_d_sel[] = { "esdhc_a_podf", "esdhc_b_podf", }; 33static const char *esdhc_d_sel[] = { "esdhc_a_podf", "esdhc_b_podf", };
34static const char *ssi_apm_sels[] = { "ckih1", "lp_amp", "ckih2", };
35static const char *ssi_clk_sels[] = { "pll1_sw", "pll2_sw", "pll3_sw", "ssi_apm", };
36static const char *ssi3_clk_sels[] = { "ssi1_root_gate", "ssi2_root_gate", };
37static const char *ssi_ext1_com_sels[] = { "ssi_ext1_podf", "ssi1_root_gate", };
38static const char *ssi_ext2_com_sels[] = { "ssi_ext2_podf", "ssi2_root_gate", };
34static const char *emi_slow_sel[] = { "main_bus", "ahb", }; 39static const char *emi_slow_sel[] = { "main_bus", "ahb", };
35static const char *usb_phy_sel_str[] = { "osc", "usb_phy_podf", }; 40static const char *usb_phy_sel_str[] = { "osc", "usb_phy_podf", };
36static const char *mx51_ipu_di0_sel[] = { "di_pred", "osc", "ckih1", "tve_di", }; 41static const char *mx51_ipu_di0_sel[] = { "di_pred", "osc", "ckih1", "tve_di", };
@@ -71,6 +76,11 @@ enum imx5_clks {
71 pll3_sw, ipu_di0_sel, ipu_di1_sel, tve_ext_sel, mx51_mipi, pll4_sw, 76 pll3_sw, ipu_di0_sel, ipu_di1_sel, tve_ext_sel, mx51_mipi, pll4_sw,
72 ldb_di1_sel, di_pll4_podf, ldb_di0_sel, ldb_di0_gate, usb_phy1_gate, 77 ldb_di1_sel, di_pll4_podf, ldb_di0_sel, ldb_di0_gate, usb_phy1_gate,
73 usb_phy2_gate, per_lp_apm, per_pred1, per_pred2, per_podf, per_root, 78 usb_phy2_gate, per_lp_apm, per_pred1, per_pred2, per_podf, per_root,
79 ssi_apm, ssi1_root_sel, ssi2_root_sel, ssi3_root_sel, ssi_ext1_sel,
80 ssi_ext2_sel, ssi_ext1_com_sel, ssi_ext2_com_sel, ssi1_root_pred,
81 ssi1_root_podf, ssi2_root_pred, ssi2_root_podf, ssi_ext1_pred,
82 ssi_ext1_podf, ssi_ext2_pred, ssi_ext2_podf, ssi1_root_gate,
83 ssi2_root_gate, ssi3_root_gate, ssi_ext1_gate, ssi_ext2_gate,
74 clk_max 84 clk_max
75}; 85};
76 86
@@ -195,6 +205,28 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
195 clk[uart5_per_gate] = imx_clk_gate2("uart5_per_gate", "uart_root", MXC_CCM_CCGR7, 14); 205 clk[uart5_per_gate] = imx_clk_gate2("uart5_per_gate", "uart_root", MXC_CCM_CCGR7, 14);
196 clk[gpc_dvfs] = imx_clk_gate2("gpc_dvfs", "dummy", MXC_CCM_CCGR5, 24); 206 clk[gpc_dvfs] = imx_clk_gate2("gpc_dvfs", "dummy", MXC_CCM_CCGR5, 24);
197 207
208 clk[ssi_apm] = imx_clk_mux("ssi_apm", MXC_CCM_CSCMR1, 8, 2, ssi_apm_sels, ARRAY_SIZE(ssi_apm_sels));
209 clk[ssi1_root_sel] = imx_clk_mux("ssi1_root_sel", MXC_CCM_CSCMR1, 14, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels));
210 clk[ssi2_root_sel] = imx_clk_mux("ssi2_root_sel", MXC_CCM_CSCMR1, 12, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels));
211 clk[ssi3_root_sel] = imx_clk_mux("ssi3_root_sel", MXC_CCM_CSCMR1, 11, 1, ssi3_clk_sels, ARRAY_SIZE(ssi3_clk_sels));
212 clk[ssi_ext1_sel] = imx_clk_mux("ssi_ext1_sel", MXC_CCM_CSCMR1, 28, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels));
213 clk[ssi_ext2_sel] = imx_clk_mux("ssi_ext2_sel", MXC_CCM_CSCMR1, 30, 2, ssi_clk_sels, ARRAY_SIZE(ssi_clk_sels));
214 clk[ssi_ext1_com_sel] = imx_clk_mux("ssi_ext1_com_sel", MXC_CCM_CSCMR1, 0, 1, ssi_ext1_com_sels, ARRAY_SIZE(ssi_ext1_com_sels));
215 clk[ssi_ext2_com_sel] = imx_clk_mux("ssi_ext2_com_sel", MXC_CCM_CSCMR1, 1, 1, ssi_ext2_com_sels, ARRAY_SIZE(ssi_ext2_com_sels));
216 clk[ssi1_root_pred] = imx_clk_divider("ssi1_root_pred", "ssi1_root_sel", MXC_CCM_CS1CDR, 6, 3);
217 clk[ssi1_root_podf] = imx_clk_divider("ssi1_root_podf", "ssi1_root_pred", MXC_CCM_CS1CDR, 0, 6);
218 clk[ssi2_root_pred] = imx_clk_divider("ssi2_root_pred", "ssi2_root_sel", MXC_CCM_CS2CDR, 6, 3);
219 clk[ssi2_root_podf] = imx_clk_divider("ssi2_root_podf", "ssi2_root_pred", MXC_CCM_CS2CDR, 0, 6);
220 clk[ssi_ext1_pred] = imx_clk_divider("ssi_ext1_pred", "ssi_ext1_sel", MXC_CCM_CS1CDR, 22, 3);
221 clk[ssi_ext1_podf] = imx_clk_divider("ssi_ext1_podf", "ssi_ext1_pred", MXC_CCM_CS1CDR, 16, 6);
222 clk[ssi_ext2_pred] = imx_clk_divider("ssi_ext2_pred", "ssi_ext2_sel", MXC_CCM_CS2CDR, 22, 3);
223 clk[ssi_ext2_podf] = imx_clk_divider("ssi_ext2_podf", "ssi_ext2_pred", MXC_CCM_CS2CDR, 16, 6);
224 clk[ssi1_root_gate] = imx_clk_gate2("ssi1_root_gate", "ssi1_root_podf", MXC_CCM_CCGR3, 18);
225 clk[ssi2_root_gate] = imx_clk_gate2("ssi2_root_gate", "ssi2_root_podf", MXC_CCM_CCGR3, 22);
226 clk[ssi3_root_gate] = imx_clk_gate2("ssi3_root_gate", "ssi3_root_sel", MXC_CCM_CCGR3, 26);
227 clk[ssi_ext1_gate] = imx_clk_gate2("ssi_ext1_gate", "ssi_ext1_com_sel", MXC_CCM_CCGR3, 28);
228 clk[ssi_ext2_gate] = imx_clk_gate2("ssi_ext2_gate", "ssi_ext2_com_sel", MXC_CCM_CCGR3, 30);
229
198 for (i = 0; i < ARRAY_SIZE(clk); i++) 230 for (i = 0; i < ARRAY_SIZE(clk); i++)
199 if (IS_ERR(clk[i])) 231 if (IS_ERR(clk[i]))
200 pr_err("i.MX5 clk %d: register failed with %ld\n", 232 pr_err("i.MX5 clk %d: register failed with %ld\n",
@@ -237,6 +269,8 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,
237 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0"); 269 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "imx-ssi.0");
238 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1"); 270 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "imx-ssi.1");
239 clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "imx-ssi.2"); 271 clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "imx-ssi.2");
272 clk_register_clkdev(clk[ssi_ext1_gate], "ssi_ext1", NULL);
273 clk_register_clkdev(clk[ssi_ext2_gate], "ssi_ext2", NULL);
240 clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma"); 274 clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma");
241 clk_register_clkdev(clk[cpu_podf], "cpu", NULL); 275 clk_register_clkdev(clk[cpu_podf], "cpu", NULL);
242 clk_register_clkdev(clk[iim_gate], "iim", NULL); 276 clk_register_clkdev(clk[iim_gate], "iim", NULL);
@@ -320,6 +354,9 @@ int __init mx51_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
320 clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx51.3"); 354 clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx51.3");
321 clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.3"); 355 clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx51.3");
322 clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx51.3"); 356 clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx51.3");
357 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "83fcc000.ssi");
358 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "70014000.ssi");
359 clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "83fe8000.ssi");
323 360
324 /* set the usboh3 parent to pll2_sw */ 361 /* set the usboh3 parent to pll2_sw */
325 clk_set_parent(clk[usboh3_sel], clk[pll2_sw]); 362 clk_set_parent(clk[usboh3_sel], clk[pll2_sw]);
@@ -406,6 +443,9 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
406 clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx53.3"); 443 clk_register_clkdev(clk[esdhc4_ipg_gate], "ipg", "sdhci-esdhc-imx53.3");
407 clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.3"); 444 clk_register_clkdev(clk[dummy], "ahb", "sdhci-esdhc-imx53.3");
408 clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx53.3"); 445 clk_register_clkdev(clk[esdhc4_per_gate], "per", "sdhci-esdhc-imx53.3");
446 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "63fcc000.ssi");
447 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "50014000.ssi");
448 clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "63fd0000.ssi");
409 449
410 /* set SDHC root clock to 200MHZ*/ 450 /* set SDHC root clock to 200MHZ*/
411 clk_set_rate(clk[esdhc_a_podf], 200000000); 451 clk_set_rate(clk[esdhc_a_podf], 200000000);
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index f40a35da2e5c..cab02d0a15d6 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -155,7 +155,8 @@ enum mx6q_clks {
155 gpmi_bch_apb, gpmi_bch, gpmi_io, gpmi_apb, sata, sdma, spba, ssi1, 155 gpmi_bch_apb, gpmi_bch, gpmi_io, gpmi_apb, sata, sdma, spba, ssi1,
156 ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3, 156 ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3,
157 usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg, 157 usdhc4, vdo_axi, vpu_axi, cko1, pll1_sys, pll2_bus, pll3_usb_otg,
158 pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, clk_max 158 pll4_audio, pll5_video, pll6_mlb, pll7_usb_host, pll8_enet, ssi1_ipg,
159 ssi2_ipg, ssi3_ipg, clk_max
159}; 160};
160 161
161static struct clk *clk[clk_max]; 162static struct clk *clk[clk_max];
@@ -367,9 +368,9 @@ int __init mx6q_clocks_init(void)
367 clk[sata] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4); 368 clk[sata] = imx_clk_gate2("sata", "ipg", base + 0x7c, 4);
368 clk[sdma] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6); 369 clk[sdma] = imx_clk_gate2("sdma", "ahb", base + 0x7c, 6);
369 clk[spba] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12); 370 clk[spba] = imx_clk_gate2("spba", "ipg", base + 0x7c, 12);
370 clk[ssi1] = imx_clk_gate2("ssi1", "ssi1_podf", base + 0x7c, 18); 371 clk[ssi1_ipg] = imx_clk_gate2("ssi1_ipg", "ipg", base + 0x7c, 18);
371 clk[ssi2] = imx_clk_gate2("ssi2", "ssi2_podf", base + 0x7c, 20); 372 clk[ssi2_ipg] = imx_clk_gate2("ssi2_ipg", "ipg", base + 0x7c, 20);
372 clk[ssi3] = imx_clk_gate2("ssi3", "ssi3_podf", base + 0x7c, 22); 373 clk[ssi3_ipg] = imx_clk_gate2("ssi3_ipg", "ipg", base + 0x7c, 22);
373 clk[uart_ipg] = imx_clk_gate2("uart_ipg", "ipg", base + 0x7c, 24); 374 clk[uart_ipg] = imx_clk_gate2("uart_ipg", "ipg", base + 0x7c, 24);
374 clk[uart_serial] = imx_clk_gate2("uart_serial", "uart_serial_podf", base + 0x7c, 26); 375 clk[uart_serial] = imx_clk_gate2("uart_serial", "uart_serial_podf", base + 0x7c, 26);
375 clk[usboh3] = imx_clk_gate2("usboh3", "ipg", base + 0x80, 0); 376 clk[usboh3] = imx_clk_gate2("usboh3", "ipg", base + 0x80, 0);
@@ -392,17 +393,17 @@ int __init mx6q_clocks_init(void)
392 clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0"); 393 clk_register_clkdev(clk[gpt_ipg_per], "per", "imx-gpt.0");
393 clk_register_clkdev(clk[twd], NULL, "smp_twd"); 394 clk_register_clkdev(clk[twd], NULL, "smp_twd");
394 clk_register_clkdev(clk[usboh3], NULL, "usboh3"); 395 clk_register_clkdev(clk[usboh3], NULL, "usboh3");
395 clk_register_clkdev(clk[uart_serial], "per", "2020000.uart"); 396 clk_register_clkdev(clk[uart_serial], "per", "2020000.serial");
396 clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.uart"); 397 clk_register_clkdev(clk[uart_ipg], "ipg", "2020000.serial");
397 clk_register_clkdev(clk[uart_serial], "per", "21e8000.uart"); 398 clk_register_clkdev(clk[uart_serial], "per", "21e8000.serial");
398 clk_register_clkdev(clk[uart_ipg], "ipg", "21e8000.uart"); 399 clk_register_clkdev(clk[uart_ipg], "ipg", "21e8000.serial");
399 clk_register_clkdev(clk[uart_serial], "per", "21ec000.uart"); 400 clk_register_clkdev(clk[uart_serial], "per", "21ec000.serial");
400 clk_register_clkdev(clk[uart_ipg], "ipg", "21ec000.uart"); 401 clk_register_clkdev(clk[uart_ipg], "ipg", "21ec000.serial");
401 clk_register_clkdev(clk[uart_serial], "per", "21f0000.uart"); 402 clk_register_clkdev(clk[uart_serial], "per", "21f0000.serial");
402 clk_register_clkdev(clk[uart_ipg], "ipg", "21f0000.uart"); 403 clk_register_clkdev(clk[uart_ipg], "ipg", "21f0000.serial");
403 clk_register_clkdev(clk[uart_serial], "per", "21f4000.uart"); 404 clk_register_clkdev(clk[uart_serial], "per", "21f4000.serial");
404 clk_register_clkdev(clk[uart_ipg], "ipg", "21f4000.uart"); 405 clk_register_clkdev(clk[uart_ipg], "ipg", "21f4000.serial");
405 clk_register_clkdev(clk[enet], NULL, "2188000.enet"); 406 clk_register_clkdev(clk[enet], NULL, "2188000.ethernet");
406 clk_register_clkdev(clk[usdhc1], NULL, "2190000.usdhc"); 407 clk_register_clkdev(clk[usdhc1], NULL, "2190000.usdhc");
407 clk_register_clkdev(clk[usdhc2], NULL, "2194000.usdhc"); 408 clk_register_clkdev(clk[usdhc2], NULL, "2194000.usdhc");
408 clk_register_clkdev(clk[usdhc3], NULL, "2198000.usdhc"); 409 clk_register_clkdev(clk[usdhc3], NULL, "2198000.usdhc");
@@ -418,6 +419,10 @@ int __init mx6q_clocks_init(void)
418 clk_register_clkdev(clk[sdma], NULL, "20ec000.sdma"); 419 clk_register_clkdev(clk[sdma], NULL, "20ec000.sdma");
419 clk_register_clkdev(clk[dummy], NULL, "20bc000.wdog"); 420 clk_register_clkdev(clk[dummy], NULL, "20bc000.wdog");
420 clk_register_clkdev(clk[dummy], NULL, "20c0000.wdog"); 421 clk_register_clkdev(clk[dummy], NULL, "20c0000.wdog");
422 clk_register_clkdev(clk[ssi1_ipg], NULL, "2028000.ssi");
423 clk_register_clkdev(clk[cko1_sel], "cko1_sel", NULL);
424 clk_register_clkdev(clk[ahb], "ahb", NULL);
425 clk_register_clkdev(clk[cko1], "cko1", NULL);
421 426
422 for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) { 427 for (i = 0; i < ARRAY_SIZE(clks_init_on); i++) {
423 c = clk_get_sys(clks_init_on[i], NULL); 428 c = clk_get_sys(clks_init_on[i], NULL);
diff --git a/arch/arm/mach-imx/imx53-dt.c b/arch/arm/mach-imx/imx53-dt.c
index 574eca4b89a5..eb04b6248e48 100644
--- a/arch/arm/mach-imx/imx53-dt.c
+++ b/arch/arm/mach-imx/imx53-dt.c
@@ -10,6 +10,9 @@
10 * http://www.gnu.org/copyleft/gpl.html 10 * http://www.gnu.org/copyleft/gpl.html
11 */ 11 */
12 12
13#include <linux/clk.h>
14#include <linux/clkdev.h>
15#include <linux/err.h>
13#include <linux/io.h> 16#include <linux/io.h>
14#include <linux/irq.h> 17#include <linux/irq.h>
15#include <linux/irqdomain.h> 18#include <linux/irqdomain.h>
@@ -81,6 +84,19 @@ static const struct of_device_id imx53_iomuxc_of_match[] __initconst = {
81 { /* sentinel */ } 84 { /* sentinel */ }
82}; 85};
83 86
87static void __init imx53_qsb_init(void)
88{
89 struct clk *clk;
90
91 clk = clk_get_sys(NULL, "ssi_ext1");
92 if (IS_ERR(clk)) {
93 pr_err("failed to get clk ssi_ext1\n");
94 return;
95 }
96
97 clk_register_clkdev(clk, NULL, "0-000a");
98}
99
84static void __init imx53_dt_init(void) 100static void __init imx53_dt_init(void)
85{ 101{
86 struct device_node *node; 102 struct device_node *node;
@@ -99,6 +115,9 @@ static void __init imx53_dt_init(void)
99 of_node_put(node); 115 of_node_put(node);
100 } 116 }
101 117
118 if (of_machine_is_compatible("fsl,imx53-qsb"))
119 imx53_qsb_init();
120
102 of_platform_populate(NULL, of_default_bus_match_table, 121 of_platform_populate(NULL, of_default_bus_match_table,
103 imx53_auxdata_lookup, NULL); 122 imx53_auxdata_lookup, NULL);
104} 123}
diff --git a/arch/arm/mach-imx/lluart.c b/arch/arm/mach-imx/lluart.c
index 0213f8dcee81..c40a34c00489 100644
--- a/arch/arm/mach-imx/lluart.c
+++ b/arch/arm/mach-imx/lluart.c
@@ -17,6 +17,12 @@
17#include <mach/hardware.h> 17#include <mach/hardware.h>
18 18
19static struct map_desc imx_lluart_desc = { 19static struct map_desc imx_lluart_desc = {
20#ifdef CONFIG_DEBUG_IMX6Q_UART2
21 .virtual = MX6Q_IO_P2V(MX6Q_UART2_BASE_ADDR),
22 .pfn = __phys_to_pfn(MX6Q_UART2_BASE_ADDR),
23 .length = MX6Q_UART2_SIZE,
24 .type = MT_DEVICE,
25#endif
20#ifdef CONFIG_DEBUG_IMX6Q_UART4 26#ifdef CONFIG_DEBUG_IMX6Q_UART4
21 .virtual = MX6Q_IO_P2V(MX6Q_UART4_BASE_ADDR), 27 .virtual = MX6Q_IO_P2V(MX6Q_UART4_BASE_ADDR),
22 .pfn = __phys_to_pfn(MX6Q_UART4_BASE_ADDR), 28 .pfn = __phys_to_pfn(MX6Q_UART4_BASE_ADDR),
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index 3df360a52c17..b47e98b7d539 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -10,6 +10,8 @@
10 * http://www.gnu.org/copyleft/gpl.html 10 * http://www.gnu.org/copyleft/gpl.html
11 */ 11 */
12 12
13#include <linux/clk.h>
14#include <linux/clkdev.h>
13#include <linux/delay.h> 15#include <linux/delay.h>
14#include <linux/init.h> 16#include <linux/init.h>
15#include <linux/io.h> 17#include <linux/io.h>
@@ -64,18 +66,53 @@ soft:
64/* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */ 66/* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */
65static int ksz9021rn_phy_fixup(struct phy_device *phydev) 67static int ksz9021rn_phy_fixup(struct phy_device *phydev)
66{ 68{
67 /* min rx data delay */ 69 if (IS_ENABLED(CONFIG_PHYLIB)) {
68 phy_write(phydev, 0x0b, 0x8105); 70 /* min rx data delay */
69 phy_write(phydev, 0x0c, 0x0000); 71 phy_write(phydev, 0x0b, 0x8105);
72 phy_write(phydev, 0x0c, 0x0000);
70 73
71 /* max rx/tx clock delay, min rx/tx control delay */ 74 /* max rx/tx clock delay, min rx/tx control delay */
72 phy_write(phydev, 0x0b, 0x8104); 75 phy_write(phydev, 0x0b, 0x8104);
73 phy_write(phydev, 0x0c, 0xf0f0); 76 phy_write(phydev, 0x0c, 0xf0f0);
74 phy_write(phydev, 0x0b, 0x104); 77 phy_write(phydev, 0x0b, 0x104);
78 }
75 79
76 return 0; 80 return 0;
77} 81}
78 82
83static void __init imx6q_sabrelite_cko1_setup(void)
84{
85 struct clk *cko1_sel, *ahb, *cko1;
86 unsigned long rate;
87
88 cko1_sel = clk_get_sys(NULL, "cko1_sel");
89 ahb = clk_get_sys(NULL, "ahb");
90 cko1 = clk_get_sys(NULL, "cko1");
91 if (IS_ERR(cko1_sel) || IS_ERR(ahb) || IS_ERR(cko1)) {
92 pr_err("cko1 setup failed!\n");
93 goto put_clk;
94 }
95 clk_set_parent(cko1_sel, ahb);
96 rate = clk_round_rate(cko1, 16000000);
97 clk_set_rate(cko1, rate);
98 clk_register_clkdev(cko1, NULL, "0-000a");
99put_clk:
100 if (!IS_ERR(cko1_sel))
101 clk_put(cko1_sel);
102 if (!IS_ERR(ahb))
103 clk_put(ahb);
104 if (!IS_ERR(cko1))
105 clk_put(cko1);
106}
107
108static void __init imx6q_sabrelite_init(void)
109{
110 if (IS_ENABLED(CONFIG_PHYLIB))
111 phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK,
112 ksz9021rn_phy_fixup);
113 imx6q_sabrelite_cko1_setup();
114}
115
79static void __init imx6q_init_machine(void) 116static void __init imx6q_init_machine(void)
80{ 117{
81 /* 118 /*
@@ -85,8 +122,7 @@ static void __init imx6q_init_machine(void)
85 pinctrl_provide_dummies(); 122 pinctrl_provide_dummies();
86 123
87 if (of_machine_is_compatible("fsl,imx6q-sabrelite")) 124 if (of_machine_is_compatible("fsl,imx6q-sabrelite"))
88 phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK, 125 imx6q_sabrelite_init();
89 ksz9021rn_phy_fixup);
90 126
91 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 127 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
92 128
@@ -139,6 +175,7 @@ static struct sys_timer imx6q_timer = {
139static const char *imx6q_dt_compat[] __initdata = { 175static const char *imx6q_dt_compat[] __initdata = {
140 "fsl,imx6q-arm2", 176 "fsl,imx6q-arm2",
141 "fsl,imx6q-sabrelite", 177 "fsl,imx6q-sabrelite",
178 "fsl,imx6q-sabresd",
142 "fsl,imx6q", 179 "fsl,imx6q",
143 NULL, 180 NULL,
144}; 181};
diff --git a/arch/arm/mach-imx/mach-mx51_babbage.c b/arch/arm/mach-imx/mach-mx51_babbage.c
index e4b822e9f719..517672ebcbc5 100644
--- a/arch/arm/mach-imx/mach-mx51_babbage.c
+++ b/arch/arm/mach-imx/mach-mx51_babbage.c
@@ -163,6 +163,12 @@ static iomux_v3_cfg_t mx51babbage_pads[] = {
163 MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK, 163 MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK,
164 MX51_PAD_CSPI1_SS0__GPIO4_24, 164 MX51_PAD_CSPI1_SS0__GPIO4_24,
165 MX51_PAD_CSPI1_SS1__GPIO4_25, 165 MX51_PAD_CSPI1_SS1__GPIO4_25,
166
167 /* Audio */
168 MX51_PAD_AUD3_BB_TXD__AUD3_TXD,
169 MX51_PAD_AUD3_BB_RXD__AUD3_RXD,
170 MX51_PAD_AUD3_BB_CK__AUD3_TXC,
171 MX51_PAD_AUD3_BB_FS__AUD3_TXFS,
166}; 172};
167 173
168/* Serial ports */ 174/* Serial ports */