diff options
| author | Vivek Gautam <gautam.vivek@samsung.com> | 2014-11-21 08:35:51 -0500 |
|---|---|---|
| committer | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2014-12-23 06:02:14 -0500 |
| commit | 83f191a7cdf5286a8f3745e847f50c29fa349da9 (patch) | |
| tree | 4e27f9a33d8b5e995f205a3b53e10e1d6638e2a6 | |
| parent | 49cab82cb85a32b5c3e28975729cb9a5982c0d93 (diff) | |
clk: samsung: exynos7: Add required clock tree for USB
Adding required gate clocks for USB3.0 DRD controller
present on Exynos7.
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
| -rw-r--r-- | drivers/clk/samsung/clk-exynos7.c | 64 | ||||
| -rw-r--r-- | include/dt-bindings/clock/exynos7-clk.h | 9 |
2 files changed, 72 insertions, 1 deletions
diff --git a/drivers/clk/samsung/clk-exynos7.c b/drivers/clk/samsung/clk-exynos7.c index fa00f0c49f47..945f41ce9572 100644 --- a/drivers/clk/samsung/clk-exynos7.c +++ b/drivers/clk/samsung/clk-exynos7.c | |||
| @@ -354,6 +354,8 @@ static struct samsung_mux_clock top1_mux_clks[] __initdata = { | |||
| 354 | MUX(0, "mout_aclk_fsys0_200", mout_top1_group1, MUX_SEL_TOP13, 28, 2), | 354 | MUX(0, "mout_aclk_fsys0_200", mout_top1_group1, MUX_SEL_TOP13, 28, 2), |
| 355 | 355 | ||
| 356 | MUX(0, "mout_sclk_mmc2", mout_top1_group1, MUX_SEL_TOP1_FSYS0, 24, 2), | 356 | MUX(0, "mout_sclk_mmc2", mout_top1_group1, MUX_SEL_TOP1_FSYS0, 24, 2), |
| 357 | MUX(0, "mout_sclk_usbdrd300", mout_top1_group1, | ||
| 358 | MUX_SEL_TOP1_FSYS0, 28, 2), | ||
| 357 | 359 | ||
| 358 | MUX(0, "mout_sclk_mmc1", mout_top1_group1, MUX_SEL_TOP1_FSYS1, 24, 2), | 360 | MUX(0, "mout_sclk_mmc1", mout_top1_group1, MUX_SEL_TOP1_FSYS1, 24, 2), |
| 359 | MUX(0, "mout_sclk_mmc0", mout_top1_group1, MUX_SEL_TOP1_FSYS1, 28, 2), | 361 | MUX(0, "mout_sclk_mmc0", mout_top1_group1, MUX_SEL_TOP1_FSYS1, 28, 2), |
| @@ -367,6 +369,8 @@ static struct samsung_div_clock top1_div_clks[] __initdata = { | |||
| 367 | 369 | ||
| 368 | DIV(DOUT_SCLK_MMC2, "dout_sclk_mmc2", "mout_sclk_mmc2", | 370 | DIV(DOUT_SCLK_MMC2, "dout_sclk_mmc2", "mout_sclk_mmc2", |
| 369 | DIV_TOP1_FSYS0, 24, 4), | 371 | DIV_TOP1_FSYS0, 24, 4), |
| 372 | DIV(0, "dout_sclk_usbdrd300", "mout_sclk_usbdrd300", | ||
| 373 | DIV_TOP1_FSYS0, 28, 4), | ||
| 370 | 374 | ||
| 371 | DIV(DOUT_SCLK_MMC1, "dout_sclk_mmc1", "mout_sclk_mmc1", | 375 | DIV(DOUT_SCLK_MMC1, "dout_sclk_mmc1", "mout_sclk_mmc1", |
| 372 | DIV_TOP1_FSYS1, 24, 4), | 376 | DIV_TOP1_FSYS1, 24, 4), |
| @@ -377,6 +381,8 @@ static struct samsung_div_clock top1_div_clks[] __initdata = { | |||
| 377 | static struct samsung_gate_clock top1_gate_clks[] __initdata = { | 381 | static struct samsung_gate_clock top1_gate_clks[] __initdata = { |
| 378 | GATE(CLK_SCLK_MMC2, "sclk_mmc2", "dout_sclk_mmc2", | 382 | GATE(CLK_SCLK_MMC2, "sclk_mmc2", "dout_sclk_mmc2", |
| 379 | ENABLE_SCLK_TOP1_FSYS0, 24, CLK_SET_RATE_PARENT, 0), | 383 | ENABLE_SCLK_TOP1_FSYS0, 24, CLK_SET_RATE_PARENT, 0), |
| 384 | GATE(0, "sclk_usbdrd300", "dout_sclk_usbdrd300", | ||
| 385 | ENABLE_SCLK_TOP1_FSYS0, 28, 0, 0), | ||
| 380 | 386 | ||
| 381 | GATE(CLK_SCLK_MMC1, "sclk_mmc1", "dout_sclk_mmc1", | 387 | GATE(CLK_SCLK_MMC1, "sclk_mmc1", "dout_sclk_mmc1", |
| 382 | ENABLE_SCLK_TOP1_FSYS1, 24, CLK_SET_RATE_PARENT, 0), | 388 | ENABLE_SCLK_TOP1_FSYS1, 24, CLK_SET_RATE_PARENT, 0), |
| @@ -658,7 +664,12 @@ CLK_OF_DECLARE(exynos7_clk_peris, "samsung,exynos7-clock-peris", | |||
| 658 | /* Register Offset definitions for CMU_FSYS0 (0x10E90000) */ | 664 | /* Register Offset definitions for CMU_FSYS0 (0x10E90000) */ |
| 659 | #define MUX_SEL_FSYS00 0x0200 | 665 | #define MUX_SEL_FSYS00 0x0200 |
| 660 | #define MUX_SEL_FSYS01 0x0204 | 666 | #define MUX_SEL_FSYS01 0x0204 |
| 667 | #define MUX_SEL_FSYS02 0x0208 | ||
| 668 | #define ENABLE_ACLK_FSYS00 0x0800 | ||
| 661 | #define ENABLE_ACLK_FSYS01 0x0804 | 669 | #define ENABLE_ACLK_FSYS01 0x0804 |
| 670 | #define ENABLE_SCLK_FSYS01 0x0A04 | ||
| 671 | #define ENABLE_SCLK_FSYS02 0x0A08 | ||
| 672 | #define ENABLE_SCLK_FSYS04 0x0A10 | ||
| 662 | 673 | ||
| 663 | /* | 674 | /* |
| 664 | * List of parent clocks for Muxes in CMU_FSYS0 | 675 | * List of parent clocks for Muxes in CMU_FSYS0 |
| @@ -666,10 +677,29 @@ CLK_OF_DECLARE(exynos7_clk_peris, "samsung,exynos7-clock-peris", | |||
| 666 | PNAME(mout_aclk_fsys0_200_p) = { "fin_pll", "dout_aclk_fsys0_200" }; | 677 | PNAME(mout_aclk_fsys0_200_p) = { "fin_pll", "dout_aclk_fsys0_200" }; |
| 667 | PNAME(mout_sclk_mmc2_p) = { "fin_pll", "sclk_mmc2" }; | 678 | PNAME(mout_sclk_mmc2_p) = { "fin_pll", "sclk_mmc2" }; |
| 668 | 679 | ||
| 680 | PNAME(mout_sclk_usbdrd300_p) = { "fin_pll", "sclk_usbdrd300" }; | ||
| 681 | PNAME(mout_phyclk_usbdrd300_udrd30_phyclk_p) = { "fin_pll", | ||
| 682 | "phyclk_usbdrd300_udrd30_phyclock" }; | ||
| 683 | PNAME(mout_phyclk_usbdrd300_udrd30_pipe_pclk_p) = { "fin_pll", | ||
| 684 | "phyclk_usbdrd300_udrd30_pipe_pclk" }; | ||
| 685 | |||
| 686 | /* fixed rate clocks used in the FSYS0 block */ | ||
| 687 | struct samsung_fixed_rate_clock fixed_rate_clks_fsys0[] __initdata = { | ||
| 688 | FRATE(0, "phyclk_usbdrd300_udrd30_phyclock", NULL, | ||
| 689 | CLK_IS_ROOT, 60000000), | ||
| 690 | FRATE(0, "phyclk_usbdrd300_udrd30_pipe_pclk", NULL, | ||
| 691 | CLK_IS_ROOT, 125000000), | ||
| 692 | }; | ||
| 693 | |||
| 669 | static unsigned long fsys0_clk_regs[] __initdata = { | 694 | static unsigned long fsys0_clk_regs[] __initdata = { |
| 670 | MUX_SEL_FSYS00, | 695 | MUX_SEL_FSYS00, |
| 671 | MUX_SEL_FSYS01, | 696 | MUX_SEL_FSYS01, |
| 697 | MUX_SEL_FSYS02, | ||
| 698 | ENABLE_ACLK_FSYS00, | ||
| 672 | ENABLE_ACLK_FSYS01, | 699 | ENABLE_ACLK_FSYS01, |
| 700 | ENABLE_SCLK_FSYS01, | ||
| 701 | ENABLE_SCLK_FSYS02, | ||
| 702 | ENABLE_SCLK_FSYS04, | ||
| 673 | }; | 703 | }; |
| 674 | 704 | ||
| 675 | static struct samsung_mux_clock fsys0_mux_clks[] __initdata = { | 705 | static struct samsung_mux_clock fsys0_mux_clks[] __initdata = { |
| @@ -677,11 +707,45 @@ static struct samsung_mux_clock fsys0_mux_clks[] __initdata = { | |||
| 677 | MUX_SEL_FSYS00, 24, 1), | 707 | MUX_SEL_FSYS00, 24, 1), |
| 678 | 708 | ||
| 679 | MUX(0, "mout_sclk_mmc2_user", mout_sclk_mmc2_p, MUX_SEL_FSYS01, 24, 1), | 709 | MUX(0, "mout_sclk_mmc2_user", mout_sclk_mmc2_p, MUX_SEL_FSYS01, 24, 1), |
| 710 | MUX(0, "mout_sclk_usbdrd300_user", mout_sclk_usbdrd300_p, | ||
| 711 | MUX_SEL_FSYS01, 28, 1), | ||
| 712 | |||
| 713 | MUX(0, "mout_phyclk_usbdrd300_udrd30_pipe_pclk_user", | ||
| 714 | mout_phyclk_usbdrd300_udrd30_pipe_pclk_p, | ||
| 715 | MUX_SEL_FSYS02, 24, 1), | ||
| 716 | MUX(0, "mout_phyclk_usbdrd300_udrd30_phyclk_user", | ||
| 717 | mout_phyclk_usbdrd300_udrd30_phyclk_p, | ||
| 718 | MUX_SEL_FSYS02, 28, 1), | ||
| 680 | }; | 719 | }; |
| 681 | 720 | ||
| 682 | static struct samsung_gate_clock fsys0_gate_clks[] __initdata = { | 721 | static struct samsung_gate_clock fsys0_gate_clks[] __initdata = { |
| 722 | GATE(ACLK_AXIUS_USBDRD30X_FSYS0X, "aclk_axius_usbdrd30x_fsys0x", | ||
| 723 | "mout_aclk_fsys0_200_user", | ||
| 724 | ENABLE_ACLK_FSYS00, 19, 0, 0), | ||
| 725 | |||
| 726 | GATE(ACLK_USBDRD300, "aclk_usbdrd300", "mout_aclk_fsys0_200_user", | ||
| 727 | ENABLE_ACLK_FSYS01, 29, 0, 0), | ||
| 683 | GATE(ACLK_MMC2, "aclk_mmc2", "mout_aclk_fsys0_200_user", | 728 | GATE(ACLK_MMC2, "aclk_mmc2", "mout_aclk_fsys0_200_user", |
| 684 | ENABLE_ACLK_FSYS01, 31, 0, 0), | 729 | ENABLE_ACLK_FSYS01, 31, 0, 0), |
| 730 | |||
| 731 | GATE(SCLK_USBDRD300_SUSPENDCLK, "sclk_usbdrd300_suspendclk", | ||
| 732 | "mout_sclk_usbdrd300_user", | ||
| 733 | ENABLE_SCLK_FSYS01, 4, 0, 0), | ||
| 734 | GATE(SCLK_USBDRD300_REFCLK, "sclk_usbdrd300_refclk", "fin_pll", | ||
| 735 | ENABLE_SCLK_FSYS01, 8, 0, 0), | ||
| 736 | |||
| 737 | GATE(PHYCLK_USBDRD300_UDRD30_PIPE_PCLK_USER, | ||
| 738 | "phyclk_usbdrd300_udrd30_pipe_pclk_user", | ||
| 739 | "mout_phyclk_usbdrd300_udrd30_pipe_pclk_user", | ||
| 740 | ENABLE_SCLK_FSYS02, 24, 0, 0), | ||
| 741 | GATE(PHYCLK_USBDRD300_UDRD30_PHYCLK_USER, | ||
| 742 | "phyclk_usbdrd300_udrd30_phyclk_user", | ||
| 743 | "mout_phyclk_usbdrd300_udrd30_phyclk_user", | ||
| 744 | ENABLE_SCLK_FSYS02, 28, 0, 0), | ||
| 745 | |||
| 746 | GATE(OSCCLK_PHY_CLKOUT_USB30_PHY, "oscclk_phy_clkout_usb30_phy", | ||
| 747 | "fin_pll", | ||
| 748 | ENABLE_SCLK_FSYS04, 28, 0, 0), | ||
| 685 | }; | 749 | }; |
| 686 | 750 | ||
| 687 | static struct samsung_cmu_info fsys0_cmu_info __initdata = { | 751 | static struct samsung_cmu_info fsys0_cmu_info __initdata = { |
diff --git a/include/dt-bindings/clock/exynos7-clk.h b/include/dt-bindings/clock/exynos7-clk.h index 9f230da5f3d9..e33d0ca4c123 100644 --- a/include/dt-bindings/clock/exynos7-clk.h +++ b/include/dt-bindings/clock/exynos7-clk.h | |||
| @@ -84,7 +84,14 @@ | |||
| 84 | 84 | ||
| 85 | /* FSYS0 */ | 85 | /* FSYS0 */ |
| 86 | #define ACLK_MMC2 1 | 86 | #define ACLK_MMC2 1 |
| 87 | #define FSYS0_NR_CLK 2 | 87 | #define ACLK_AXIUS_USBDRD30X_FSYS0X 2 |
| 88 | #define ACLK_USBDRD300 3 | ||
| 89 | #define SCLK_USBDRD300_SUSPENDCLK 4 | ||
| 90 | #define SCLK_USBDRD300_REFCLK 5 | ||
| 91 | #define PHYCLK_USBDRD300_UDRD30_PIPE_PCLK_USER 6 | ||
| 92 | #define PHYCLK_USBDRD300_UDRD30_PHYCLK_USER 7 | ||
| 93 | #define OSCCLK_PHY_CLKOUT_USB30_PHY 8 | ||
| 94 | #define FSYS0_NR_CLK 9 | ||
| 88 | 95 | ||
| 89 | /* FSYS1 */ | 96 | /* FSYS1 */ |
| 90 | #define ACLK_MMC1 1 | 97 | #define ACLK_MMC1 1 |
