aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk
diff options
context:
space:
mode:
authorShaik Ameer Basha <shaik.ameer@samsung.com>2014-05-08 07:27:56 -0400
committerTomasz Figa <t.figa@samsung.com>2014-05-14 13:40:20 -0400
commitfaec151b5006f832c8cefc76d01893496445a7ec (patch)
tree2fd8c09370c7026d25523ff6e14b50c25582c227 /drivers/clk
parent424b673a0557693fdc2ac6cff5289153d6fb8903 (diff)
clk: samsung: exynos5420: update clocks for PERIC block
This patch includes, 1] renaming of the HSI2C clocks 2] renaming of spi clocks according to the datasheet 3] fixes for child-parent relationships 4] adding of more clocks related to PERIC block 5] use GATE_IP_* offsets instead of GATE_BUS_* Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com> Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/samsung/clk-exynos5420.c92
1 files changed, 44 insertions, 48 deletions
diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
index 32d16f5cff53..f38c0efaaa73 100644
--- a/drivers/clk/samsung/clk-exynos5420.c
+++ b/drivers/clk/samsung/clk-exynos5420.c
@@ -95,6 +95,7 @@
95#define GATE_IP_DISP1 0x10928 95#define GATE_IP_DISP1 0x10928
96#define GATE_IP_G3D 0x10930 96#define GATE_IP_G3D 0x10930
97#define GATE_IP_GEN 0x10934 97#define GATE_IP_GEN 0x10934
98#define GATE_IP_PERIC 0x10950
98#define GATE_IP_MSCL 0x10970 99#define GATE_IP_MSCL 0x10970
99#define GATE_TOP_SCLK_GSCL 0x10820 100#define GATE_TOP_SCLK_GSCL 0x10820
100#define GATE_TOP_SCLK_DISP1 0x10828 101#define GATE_TOP_SCLK_DISP1 0x10828
@@ -183,6 +184,7 @@ static unsigned long exynos5420_clk_regs[] __initdata = {
183 GATE_IP_DISP1, 184 GATE_IP_DISP1,
184 GATE_IP_G3D, 185 GATE_IP_G3D,
185 GATE_IP_GEN, 186 GATE_IP_GEN,
187 GATE_IP_PERIC,
186 GATE_IP_MSCL, 188 GATE_IP_MSCL,
187 GATE_TOP_SCLK_GSCL, 189 GATE_TOP_SCLK_GSCL,
188 GATE_TOP_SCLK_DISP1, 190 GATE_TOP_SCLK_DISP1,
@@ -258,7 +260,7 @@ PNAME(mout_group5_p) = {"mout_sclk_vpll", "mout_sclk_dpll"};
258 260
259PNAME(mout_fimd1_final_p) = {"mout_fimd1", "mout_fimd1_opt"}; 261PNAME(mout_fimd1_final_p) = {"mout_fimd1", "mout_fimd1_opt"};
260PNAME(mout_sw_aclk66_p) = {"dout_aclk66", "mout_sclk_spll"}; 262PNAME(mout_sw_aclk66_p) = {"dout_aclk66", "mout_sclk_spll"};
261PNAME(mout_aclk66_peric_p) = { "fin_pll", "mout_sw_aclk66" }; 263PNAME(mout_user_aclk66_peric_p) = { "fin_pll", "mout_sw_aclk66" };
262 264
263PNAME(mout_sw_aclk200_fsys_p) = {"dout_aclk200_fsys", "mout_sclk_spll"}; 265PNAME(mout_sw_aclk200_fsys_p) = {"dout_aclk200_fsys", "mout_sclk_spll"};
264PNAME(mout_user_aclk200_fsys_p) = {"fin_pll", "mout_sw_aclk200_fsys"}; 266PNAME(mout_user_aclk200_fsys_p) = {"fin_pll", "mout_sw_aclk200_fsys"};
@@ -398,7 +400,8 @@ static struct samsung_mux_clock exynos5420_mux_clks[] __initdata = {
398 SRC_TOP4, 0, 1), 400 SRC_TOP4, 0, 1),
399 MUX(0, "mout_user_aclk333_432_isp", mout_user_aclk333_432_isp_p, 401 MUX(0, "mout_user_aclk333_432_isp", mout_user_aclk333_432_isp_p,
400 SRC_TOP4, 4, 1), 402 SRC_TOP4, 4, 1),
401 MUX(0, "mout_aclk66_peric", mout_aclk66_peric_p, SRC_TOP4, 8, 1), 403 MUX(0, "mout_user_aclk66_peric", mout_user_aclk66_peric_p,
404 SRC_TOP4, 8, 1),
402 MUX(0, "mout_user_aclk333_432_isp0", mout_user_aclk333_432_isp0_p, 405 MUX(0, "mout_user_aclk333_432_isp0", mout_user_aclk333_432_isp0_p,
403 SRC_TOP4, 12, 1), 406 SRC_TOP4, 12, 1),
404 MUX(0, "mout_user_aclk266_isp", mout_user_aclk266_isp_p, 407 MUX(0, "mout_user_aclk266_isp", mout_user_aclk266_isp_p,
@@ -409,7 +412,8 @@ static struct samsung_mux_clock exynos5420_mux_clks[] __initdata = {
409 412
410 MUX(0, "mout_user_aclk400_disp1", mout_user_aclk400_disp1_p, 413 MUX(0, "mout_user_aclk400_disp1", mout_user_aclk400_disp1_p,
411 SRC_TOP5, 0, 1), 414 SRC_TOP5, 0, 1),
412 MUX(0, "mout_aclk66_psgen", mout_aclk66_peric_p, SRC_TOP5, 4, 1), 415 MUX(0, "mout_user_aclk66_psgen", mout_user_aclk66_peric_p,
416 SRC_TOP5, 4, 1),
413 MUX(0, "mout_user_aclk333_g2d", mout_user_aclk333_g2d_p, 417 MUX(0, "mout_user_aclk333_g2d", mout_user_aclk333_g2d_p,
414 SRC_TOP5, 8, 1), 418 SRC_TOP5, 8, 1),
415 MUX(0, "mout_user_aclk266_g2d", mout_user_aclk266_g2d_p, 419 MUX(0, "mout_user_aclk266_g2d", mout_user_aclk266_g2d_p,
@@ -590,9 +594,9 @@ static struct samsung_div_clock exynos5420_div_clks[] __initdata = {
590 DIV(0, "dout_audio2", "mout_audio2", DIV_PERIC3, 28, 4), 594 DIV(0, "dout_audio2", "mout_audio2", DIV_PERIC3, 28, 4),
591 595
592 /* SPI Pre-Ratio */ 596 /* SPI Pre-Ratio */
593 DIV(0, "dout_pre_spi0", "dout_spi0", DIV_PERIC4, 8, 8), 597 DIV(0, "dout_spi0_pre", "dout_spi0", DIV_PERIC4, 8, 8),
594 DIV(0, "dout_pre_spi1", "dout_spi1", DIV_PERIC4, 16, 8), 598 DIV(0, "dout_spi1_pre", "dout_spi1", DIV_PERIC4, 16, 8),
595 DIV(0, "dout_pre_spi2", "dout_spi2", DIV_PERIC4, 24, 8), 599 DIV(0, "dout_spi2_pre", "dout_spi2", DIV_PERIC4, 24, 8),
596 600
597 /* GSCL Block */ 601 /* GSCL Block */
598 DIV(0, "dout_gscl_blk_300", "mout_user_aclk300_gscl", 602 DIV(0, "dout_gscl_blk_300", "mout_user_aclk300_gscl",
@@ -649,10 +653,10 @@ static struct samsung_gate_clock exynos5420_gate_clks[] __initdata = {
649 GATE_BUS_TOP, 8, 0, 0), 653 GATE_BUS_TOP, 8, 0, 0),
650 GATE(0, "pclk66_gpio", "mout_sw_aclk66", 654 GATE(0, "pclk66_gpio", "mout_sw_aclk66",
651 GATE_BUS_TOP, 9, CLK_IGNORE_UNUSED, 0), 655 GATE_BUS_TOP, 9, CLK_IGNORE_UNUSED, 0),
652 GATE(0, "aclk66_psgen", "mout_aclk66_psgen", 656 GATE(0, "aclk66_psgen", "mout_user_aclk66_psgen",
653 GATE_BUS_TOP, 10, CLK_IGNORE_UNUSED, 0), 657 GATE_BUS_TOP, 10, CLK_IGNORE_UNUSED, 0),
654 GATE(0, "aclk66_peric", "mout_aclk66_peric", 658 GATE(CLK_ACLK66_PERIC, "aclk66_peric", "mout_user_aclk66_peric",
655 GATE_BUS_TOP, 11, 0, 0), 659 GATE_BUS_TOP, 11, CLK_IGNORE_UNUSED, 0),
656 GATE(0, "aclk266_isp", "mout_user_aclk266_isp", 660 GATE(0, "aclk266_isp", "mout_user_aclk266_isp",
657 GATE_BUS_TOP, 13, 0, 0), 661 GATE_BUS_TOP, 13, 0, 0),
658 GATE(0, "aclk166", "mout_user_aclk166", 662 GATE(0, "aclk166", "mout_user_aclk166",
@@ -678,11 +682,11 @@ static struct samsung_gate_clock exynos5420_gate_clks[] __initdata = {
678 GATE_TOP_SCLK_PERIC, 2, CLK_SET_RATE_PARENT, 0), 682 GATE_TOP_SCLK_PERIC, 2, CLK_SET_RATE_PARENT, 0),
679 GATE(CLK_SCLK_UART3, "sclk_uart3", "dout_uart3", 683 GATE(CLK_SCLK_UART3, "sclk_uart3", "dout_uart3",
680 GATE_TOP_SCLK_PERIC, 3, CLK_SET_RATE_PARENT, 0), 684 GATE_TOP_SCLK_PERIC, 3, CLK_SET_RATE_PARENT, 0),
681 GATE(CLK_SCLK_SPI0, "sclk_spi0", "dout_pre_spi0", 685 GATE(CLK_SCLK_SPI0, "sclk_spi0", "dout_spi0_pre",
682 GATE_TOP_SCLK_PERIC, 6, CLK_SET_RATE_PARENT, 0), 686 GATE_TOP_SCLK_PERIC, 6, CLK_SET_RATE_PARENT, 0),
683 GATE(CLK_SCLK_SPI1, "sclk_spi1", "dout_pre_spi1", 687 GATE(CLK_SCLK_SPI1, "sclk_spi1", "dout_spi1_pre",
684 GATE_TOP_SCLK_PERIC, 7, CLK_SET_RATE_PARENT, 0), 688 GATE_TOP_SCLK_PERIC, 7, CLK_SET_RATE_PARENT, 0),
685 GATE(CLK_SCLK_SPI2, "sclk_spi2", "dout_pre_spi2", 689 GATE(CLK_SCLK_SPI2, "sclk_spi2", "dout_spi2_pre",
686 GATE_TOP_SCLK_PERIC, 8, CLK_SET_RATE_PARENT, 0), 690 GATE_TOP_SCLK_PERIC, 8, CLK_SET_RATE_PARENT, 0),
687 GATE(CLK_SCLK_SPDIF, "sclk_spdif", "mout_spdif", 691 GATE(CLK_SCLK_SPDIF, "sclk_spdif", "mout_spdif",
688 GATE_TOP_SCLK_PERIC, 9, CLK_SET_RATE_PARENT, 0), 692 GATE_TOP_SCLK_PERIC, 9, CLK_SET_RATE_PARENT, 0),
@@ -747,43 +751,35 @@ static struct samsung_gate_clock exynos5420_gate_clks[] __initdata = {
747 GATE(CLK_USBD300, "usbd300", "aclk200_fsys", GATE_BUS_FSYS0, 21, 0, 0), 751 GATE(CLK_USBD300, "usbd300", "aclk200_fsys", GATE_BUS_FSYS0, 21, 0, 0),
748 GATE(CLK_USBD301, "usbd301", "aclk200_fsys", GATE_BUS_FSYS0, 28, 0, 0), 752 GATE(CLK_USBD301, "usbd301", "aclk200_fsys", GATE_BUS_FSYS0, 28, 0, 0),
749 753
750 /* UART */ 754 /* PERIC Block */
751 GATE(CLK_UART0, "uart0", "aclk66_peric", GATE_BUS_PERIC, 4, 0, 0), 755 GATE(CLK_UART0, "uart0", "aclk66_peric", GATE_IP_PERIC, 0, 0, 0),
752 GATE(CLK_UART1, "uart1", "aclk66_peric", GATE_BUS_PERIC, 5, 0, 0), 756 GATE(CLK_UART1, "uart1", "aclk66_peric", GATE_IP_PERIC, 1, 0, 0),
753 GATE_A(CLK_UART2, "uart2", "aclk66_peric", 757 GATE(CLK_UART2, "uart2", "aclk66_peric", GATE_IP_PERIC, 2, 0, 0),
754 GATE_BUS_PERIC, 6, CLK_IGNORE_UNUSED, 0, "uart2"), 758 GATE(CLK_UART3, "uart3", "aclk66_peric", GATE_IP_PERIC, 3, 0, 0),
755 GATE(CLK_UART3, "uart3", "aclk66_peric", GATE_BUS_PERIC, 7, 0, 0), 759 GATE(CLK_I2C0, "i2c0", "aclk66_peric", GATE_IP_PERIC, 6, 0, 0),
756 /* I2C */ 760 GATE(CLK_I2C1, "i2c1", "aclk66_peric", GATE_IP_PERIC, 7, 0, 0),
757 GATE(CLK_I2C0, "i2c0", "aclk66_peric", GATE_BUS_PERIC, 9, 0, 0), 761 GATE(CLK_I2C2, "i2c2", "aclk66_peric", GATE_IP_PERIC, 8, 0, 0),
758 GATE(CLK_I2C1, "i2c1", "aclk66_peric", GATE_BUS_PERIC, 10, 0, 0), 762 GATE(CLK_I2C3, "i2c3", "aclk66_peric", GATE_IP_PERIC, 9, 0, 0),
759 GATE(CLK_I2C2, "i2c2", "aclk66_peric", GATE_BUS_PERIC, 11, 0, 0), 763 GATE(CLK_USI0, "usi0", "aclk66_peric", GATE_IP_PERIC, 10, 0, 0),
760 GATE(CLK_I2C3, "i2c3", "aclk66_peric", GATE_BUS_PERIC, 12, 0, 0), 764 GATE(CLK_USI1, "usi1", "aclk66_peric", GATE_IP_PERIC, 11, 0, 0),
761 GATE(CLK_I2C4, "i2c4", "aclk66_peric", GATE_BUS_PERIC, 13, 0, 0), 765 GATE(CLK_USI2, "usi2", "aclk66_peric", GATE_IP_PERIC, 12, 0, 0),
762 GATE(CLK_I2C5, "i2c5", "aclk66_peric", GATE_BUS_PERIC, 14, 0, 0), 766 GATE(CLK_USI3, "usi3", "aclk66_peric", GATE_IP_PERIC, 13, 0, 0),
763 GATE(CLK_I2C6, "i2c6", "aclk66_peric", GATE_BUS_PERIC, 15, 0, 0), 767 GATE(CLK_I2C_HDMI, "i2c_hdmi", "aclk66_peric", GATE_IP_PERIC, 14, 0, 0),
764 GATE(CLK_I2C7, "i2c7", "aclk66_peric", GATE_BUS_PERIC, 16, 0, 0), 768 GATE(CLK_TSADC, "tsadc", "aclk66_peric", GATE_IP_PERIC, 15, 0, 0),
765 GATE(CLK_I2C_HDMI, "i2c_hdmi", "aclk66_peric", GATE_BUS_PERIC, 17, 0, 769 GATE(CLK_SPI0, "spi0", "aclk66_peric", GATE_IP_PERIC, 16, 0, 0),
766 0), 770 GATE(CLK_SPI1, "spi1", "aclk66_peric", GATE_IP_PERIC, 17, 0, 0),
767 GATE(CLK_TSADC, "tsadc", "aclk66_peric", GATE_BUS_PERIC, 18, 0, 0), 771 GATE(CLK_SPI2, "spi2", "aclk66_peric", GATE_IP_PERIC, 18, 0, 0),
768 /* SPI */ 772 GATE(CLK_I2S1, "i2s1", "aclk66_peric", GATE_IP_PERIC, 20, 0, 0),
769 GATE(CLK_SPI0, "spi0", "aclk66_peric", GATE_BUS_PERIC, 19, 0, 0), 773 GATE(CLK_I2S2, "i2s2", "aclk66_peric", GATE_IP_PERIC, 21, 0, 0),
770 GATE(CLK_SPI1, "spi1", "aclk66_peric", GATE_BUS_PERIC, 20, 0, 0), 774 GATE(CLK_PCM1, "pcm1", "aclk66_peric", GATE_IP_PERIC, 22, 0, 0),
771 GATE(CLK_SPI2, "spi2", "aclk66_peric", GATE_BUS_PERIC, 21, 0, 0), 775 GATE(CLK_PCM2, "pcm2", "aclk66_peric", GATE_IP_PERIC, 23, 0, 0),
776 GATE(CLK_PWM, "pwm", "aclk66_peric", GATE_IP_PERIC, 24, 0, 0),
777 GATE(CLK_SPDIF, "spdif", "aclk66_peric", GATE_IP_PERIC, 26, 0, 0),
778 GATE(CLK_USI4, "usi4", "aclk66_peric", GATE_IP_PERIC, 28, 0, 0),
779 GATE(CLK_USI5, "usi5", "aclk66_peric", GATE_IP_PERIC, 30, 0, 0),
780 GATE(CLK_USI6, "usi6", "aclk66_peric", GATE_IP_PERIC, 31, 0, 0),
781
772 GATE(CLK_KEYIF, "keyif", "aclk66_peric", GATE_BUS_PERIC, 22, 0, 0), 782 GATE(CLK_KEYIF, "keyif", "aclk66_peric", GATE_BUS_PERIC, 22, 0, 0),
773 /* I2S */
774 GATE(CLK_I2S1, "i2s1", "aclk66_peric", GATE_BUS_PERIC, 23, 0, 0),
775 GATE(CLK_I2S2, "i2s2", "aclk66_peric", GATE_BUS_PERIC, 24, 0, 0),
776 /* PCM */
777 GATE(CLK_PCM1, "pcm1", "aclk66_peric", GATE_BUS_PERIC, 25, 0, 0),
778 GATE(CLK_PCM2, "pcm2", "aclk66_peric", GATE_BUS_PERIC, 26, 0, 0),
779 /* PWM */
780 GATE(CLK_PWM, "pwm", "aclk66_peric", GATE_BUS_PERIC, 27, 0, 0),
781 /* SPDIF */
782 GATE(CLK_SPDIF, "spdif", "aclk66_peric", GATE_BUS_PERIC, 29, 0, 0),
783
784 GATE(CLK_I2C8, "i2c8", "aclk66_peric", GATE_BUS_PERIC1, 0, 0, 0),
785 GATE(CLK_I2C9, "i2c9", "aclk66_peric", GATE_BUS_PERIC1, 1, 0, 0),
786 GATE(CLK_I2C10, "i2c10", "aclk66_peric", GATE_BUS_PERIC1, 2, 0, 0),
787 783
788 GATE(CLK_CHIPID, "chipid", "aclk66_psgen", 784 GATE(CLK_CHIPID, "chipid", "aclk66_psgen",
789 GATE_BUS_PERIS0, 12, CLK_IGNORE_UNUSED, 0), 785 GATE_BUS_PERIS0, 12, CLK_IGNORE_UNUSED, 0),