aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/samsung
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2016-05-28 05:54:14 -0400
committerSylwester Nawrocki <s.nawrocki@samsung.com>2016-06-02 05:18:15 -0400
commit1ebfb67de8f47c5f277f4a59e7f922a6806e54de (patch)
treef6f9fe155d82d117509bf8c8c1b59c5978ceb837 /drivers/clk/samsung
parent334393366f3a68f5645b3ec9cfb7abad7e634e01 (diff)
clk: samsung: exynos5410: Add serial3, USB and PWM clocks
Just like other Exynos5 family SoCs, this one has four UARTs. Add missing UART3 clocks to the Exynos5410 clock driver. Add clocks for USB and PWM. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Stephen Boyd <sboyd@codeaurora.org> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Diffstat (limited to 'drivers/clk/samsung')
-rw-r--r--drivers/clk/samsung/clk-exynos5410.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/clk/samsung/clk-exynos5410.c b/drivers/clk/samsung/clk-exynos5410.c
index 8e8c7cca8c62..8ad8d5ece7fa 100644
--- a/drivers/clk/samsung/clk-exynos5410.c
+++ b/drivers/clk/samsung/clk-exynos5410.c
@@ -33,9 +33,11 @@
33#define SRC_CPERI1 0x4204 33#define SRC_CPERI1 0x4204
34#define DIV_TOP0 0x10510 34#define DIV_TOP0 0x10510
35#define DIV_TOP1 0x10514 35#define DIV_TOP1 0x10514
36#define DIV_FSYS0 0x10548
36#define DIV_FSYS1 0x1054c 37#define DIV_FSYS1 0x1054c
37#define DIV_FSYS2 0x10550 38#define DIV_FSYS2 0x10550
38#define DIV_PERIC0 0x10558 39#define DIV_PERIC0 0x10558
40#define DIV_PERIC3 0x10564
39#define SRC_TOP0 0x10210 41#define SRC_TOP0 0x10210
40#define SRC_TOP1 0x10214 42#define SRC_TOP1 0x10214
41#define SRC_TOP2 0x10218 43#define SRC_TOP2 0x10218
@@ -44,6 +46,8 @@
44#define SRC_MASK_FSYS 0x10340 46#define SRC_MASK_FSYS 0x10340
45#define SRC_MASK_PERIC0 0x10350 47#define SRC_MASK_PERIC0 0x10350
46#define GATE_BUS_FSYS0 0x10740 48#define GATE_BUS_FSYS0 0x10740
49#define GATE_TOP_SCLK_FSYS 0x10840
50#define GATE_TOP_SCLK_PERIC 0x10850
47#define GATE_IP_FSYS 0x10944 51#define GATE_IP_FSYS 0x10944
48#define GATE_IP_PERIC 0x10950 52#define GATE_IP_PERIC 0x10950
49#define GATE_IP_PERIS 0x10960 53#define GATE_IP_PERIS 0x10960
@@ -71,6 +75,7 @@ PNAME(mout_kfc_p) = { "mout_kpll", "sclk_mpll", };
71PNAME(mpll_user_p) = { "fin_pll", "sclk_mpll", }; 75PNAME(mpll_user_p) = { "fin_pll", "sclk_mpll", };
72PNAME(bpll_user_p) = { "fin_pll", "sclk_bpll", }; 76PNAME(bpll_user_p) = { "fin_pll", "sclk_bpll", };
73PNAME(mpll_bpll_p) = { "sclk_mpll_muxed", "sclk_bpll_muxed", }; 77PNAME(mpll_bpll_p) = { "sclk_mpll_muxed", "sclk_bpll_muxed", };
78PNAME(sclk_mpll_bpll_p) = { "sclk_mpll_bpll", "fin_pll", };
74 79
75PNAME(group2_p) = { "fin_pll", "fin_pll", "none", "none", 80PNAME(group2_p) = { "fin_pll", "fin_pll", "none", "none",
76 "none", "none", "sclk_mpll_bpll", 81 "none", "none", "sclk_mpll_bpll",
@@ -96,10 +101,14 @@ static const struct samsung_mux_clock exynos5410_mux_clks[] __initconst = {
96 MUX(0, "mout_mmc0", group2_p, SRC_FSYS, 0, 4), 101 MUX(0, "mout_mmc0", group2_p, SRC_FSYS, 0, 4),
97 MUX(0, "mout_mmc1", group2_p, SRC_FSYS, 4, 4), 102 MUX(0, "mout_mmc1", group2_p, SRC_FSYS, 4, 4),
98 MUX(0, "mout_mmc2", group2_p, SRC_FSYS, 8, 4), 103 MUX(0, "mout_mmc2", group2_p, SRC_FSYS, 8, 4),
104 MUX(0, "mout_usbd300", sclk_mpll_bpll_p, SRC_FSYS, 28, 1),
105 MUX(0, "mout_usbd301", sclk_mpll_bpll_p, SRC_FSYS, 29, 1),
99 106
100 MUX(0, "mout_uart0", group2_p, SRC_PERIC0, 0, 4), 107 MUX(0, "mout_uart0", group2_p, SRC_PERIC0, 0, 4),
101 MUX(0, "mout_uart1", group2_p, SRC_PERIC0, 4, 4), 108 MUX(0, "mout_uart1", group2_p, SRC_PERIC0, 4, 4),
102 MUX(0, "mout_uart2", group2_p, SRC_PERIC0, 8, 4), 109 MUX(0, "mout_uart2", group2_p, SRC_PERIC0, 8, 4),
110 MUX(0, "mout_uart3", group2_p, SRC_PERIC0, 12, 4),
111 MUX(0, "mout_pwm", group2_p, SRC_PERIC0, 24, 4),
103 112
104 MUX(0, "mout_aclk200", mpll_bpll_p, SRC_TOP0, 12, 1), 113 MUX(0, "mout_aclk200", mpll_bpll_p, SRC_TOP0, 12, 1),
105 MUX(0, "mout_aclk400", mpll_bpll_p, SRC_TOP0, 20, 1), 114 MUX(0, "mout_aclk400", mpll_bpll_p, SRC_TOP0, 20, 1),
@@ -121,6 +130,11 @@ static const struct samsung_div_clock exynos5410_div_clks[] __initconst = {
121 DIV(0, "aclk66_pre", "sclk_mpll_muxed", DIV_TOP1, 24, 3), 130 DIV(0, "aclk66_pre", "sclk_mpll_muxed", DIV_TOP1, 24, 3),
122 DIV(0, "aclk66", "aclk66_pre", DIV_TOP0, 0, 3), 131 DIV(0, "aclk66", "aclk66_pre", DIV_TOP0, 0, 3),
123 132
133 DIV(0, "dout_usbphy300", "mout_usbd300", DIV_FSYS0, 16, 4),
134 DIV(0, "dout_usbphy301", "mout_usbd301", DIV_FSYS0, 20, 4),
135 DIV(0, "dout_usbd300", "mout_usbd300", DIV_FSYS0, 24, 4),
136 DIV(0, "dout_usbd301", "mout_usbd301", DIV_FSYS0, 28, 4),
137
124 DIV(0, "div_mmc0", "mout_mmc0", DIV_FSYS1, 0, 4), 138 DIV(0, "div_mmc0", "mout_mmc0", DIV_FSYS1, 0, 4),
125 DIV(0, "div_mmc1", "mout_mmc1", DIV_FSYS1, 16, 4), 139 DIV(0, "div_mmc1", "mout_mmc1", DIV_FSYS1, 16, 4),
126 DIV(0, "div_mmc2", "mout_mmc2", DIV_FSYS2, 0, 4), 140 DIV(0, "div_mmc2", "mout_mmc2", DIV_FSYS2, 0, 4),
@@ -137,6 +151,8 @@ static const struct samsung_div_clock exynos5410_div_clks[] __initconst = {
137 DIV(0, "div_uart2", "mout_uart2", DIV_PERIC0, 8, 4), 151 DIV(0, "div_uart2", "mout_uart2", DIV_PERIC0, 8, 4),
138 DIV(0, "div_uart3", "mout_uart3", DIV_PERIC0, 12, 4), 152 DIV(0, "div_uart3", "mout_uart3", DIV_PERIC0, 12, 4),
139 153
154 DIV(0, "dout_pwm", "mout_pwm", DIV_PERIC3, 0, 4),
155
140 DIV(0, "aclk200", "mout_aclk200", DIV_TOP0, 12, 3), 156 DIV(0, "aclk200", "mout_aclk200", DIV_TOP0, 12, 3),
141 DIV(0, "aclk400", "mout_aclk400", DIV_TOP0, 24, 3), 157 DIV(0, "aclk400", "mout_aclk400", DIV_TOP0, 24, 3),
142}; 158};
@@ -155,9 +171,23 @@ static const struct samsung_gate_clock exynos5410_gate_clks[] __initconst = {
155 GATE(CLK_MMC1, "sdmmc1", "aclk200", GATE_BUS_FSYS0, 13, 0, 0), 171 GATE(CLK_MMC1, "sdmmc1", "aclk200", GATE_BUS_FSYS0, 13, 0, 0),
156 GATE(CLK_MMC2, "sdmmc2", "aclk200", GATE_BUS_FSYS0, 14, 0, 0), 172 GATE(CLK_MMC2, "sdmmc2", "aclk200", GATE_BUS_FSYS0, 14, 0, 0),
157 173
174 GATE(CLK_SCLK_USBPHY301, "sclk_usbphy301", "dout_usbphy301",
175 GATE_TOP_SCLK_FSYS, 7, CLK_SET_RATE_PARENT, 0),
176 GATE(CLK_SCLK_USBPHY300, "sclk_usbphy300", "dout_usbphy300",
177 GATE_TOP_SCLK_FSYS, 8, CLK_SET_RATE_PARENT, 0),
178 GATE(CLK_SCLK_USBD300, "sclk_usbd300", "dout_usbd300",
179 GATE_TOP_SCLK_FSYS, 9, CLK_SET_RATE_PARENT, 0),
180 GATE(CLK_SCLK_USBD301, "sclk_usbd301", "dout_usbd301",
181 GATE_TOP_SCLK_FSYS, 10, CLK_SET_RATE_PARENT, 0),
182
183 GATE(CLK_SCLK_PWM, "sclk_pwm", "dout_pwm",
184 GATE_TOP_SCLK_PERIC, 11, CLK_SET_RATE_PARENT, 0),
185
158 GATE(CLK_UART0, "uart0", "aclk66", GATE_IP_PERIC, 0, 0, 0), 186 GATE(CLK_UART0, "uart0", "aclk66", GATE_IP_PERIC, 0, 0, 0),
159 GATE(CLK_UART1, "uart1", "aclk66", GATE_IP_PERIC, 1, 0, 0), 187 GATE(CLK_UART1, "uart1", "aclk66", GATE_IP_PERIC, 1, 0, 0),
160 GATE(CLK_UART2, "uart2", "aclk66", GATE_IP_PERIC, 2, 0, 0), 188 GATE(CLK_UART2, "uart2", "aclk66", GATE_IP_PERIC, 2, 0, 0),
189 GATE(CLK_UART3, "uart3", "aclk66", GATE_IP_PERIC, 3, 0, 0),
190 GATE(CLK_PWM, "pwm", "aclk66", GATE_IP_PERIC, 24, 0, 0),
161 191
162 GATE(CLK_SCLK_UART0, "sclk_uart0", "div_uart0", 192 GATE(CLK_SCLK_UART0, "sclk_uart0", "div_uart0",
163 SRC_MASK_PERIC0, 0, CLK_SET_RATE_PARENT, 0), 193 SRC_MASK_PERIC0, 0, CLK_SET_RATE_PARENT, 0),
@@ -165,6 +195,12 @@ static const struct samsung_gate_clock exynos5410_gate_clks[] __initconst = {
165 SRC_MASK_PERIC0, 4, CLK_SET_RATE_PARENT, 0), 195 SRC_MASK_PERIC0, 4, CLK_SET_RATE_PARENT, 0),
166 GATE(CLK_SCLK_UART2, "sclk_uart2", "div_uart2", 196 GATE(CLK_SCLK_UART2, "sclk_uart2", "div_uart2",
167 SRC_MASK_PERIC0, 8, CLK_SET_RATE_PARENT, 0), 197 SRC_MASK_PERIC0, 8, CLK_SET_RATE_PARENT, 0),
198 GATE(CLK_SCLK_UART3, "sclk_uart3", "div_uart3",
199 SRC_MASK_PERIC0, 12, CLK_SET_RATE_PARENT, 0),
200
201 GATE(CLK_USBH20, "usbh20", "aclk200_fsys", GATE_IP_FSYS, 18, 0, 0),
202 GATE(CLK_USBD300, "usbd300", "aclk200_fsys", GATE_IP_FSYS, 19, 0, 0),
203 GATE(CLK_USBD301, "usbd301", "aclk200_fsys", GATE_IP_FSYS, 20, 0, 0),
168}; 204};
169 205
170static const struct samsung_pll_clock exynos5410_plls[nr_plls] __initconst = { 206static const struct samsung_pll_clock exynos5410_plls[nr_plls] __initconst = {