Skip to content

Commit 736de65

Browse files
masahir0ybebarino
authored andcommitted
clk: uniphier: add PXs3 clock data
Add basic clock data for Socionext's new SoC PXs3. Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 9fa7231 commit 736de65

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

Documentation/devicetree/bindings/clock/uniphier-clock.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Required properties:
1313
"socionext,uniphier-pxs2-clock" - for PXs2/LD6b SoC.
1414
"socionext,uniphier-ld11-clock" - for LD11 SoC.
1515
"socionext,uniphier-ld20-clock" - for LD20 SoC.
16+
"socionext,uniphier-pxs3-clock" - for PXs3 SoC
1617
- #clock-cells: should be 1.
1718

1819
Example:
@@ -54,6 +55,7 @@ Required properties:
5455
"socionext,uniphier-pxs2-sd-clock" - for PXs2/LD6b SoC.
5556
"socionext,uniphier-ld11-mio-clock" - for LD11 SoC.
5657
"socionext,uniphier-ld20-sd-clock" - for LD20 SoC.
58+
"socionext,uniphier-pxs3-sd-clock" - for PXs3 SoC
5759
- #clock-cells: should be 1.
5860

5961
Example:
@@ -97,6 +99,7 @@ Required properties:
9799
"socionext,uniphier-pxs2-peri-clock" - for PXs2/LD6b SoC.
98100
"socionext,uniphier-ld11-peri-clock" - for LD11 SoC.
99101
"socionext,uniphier-ld20-peri-clock" - for LD20 SoC.
102+
"socionext,uniphier-pxs3-peri-clock" - for PXs3 SoC
100103
- #clock-cells: should be 1.
101104

102105
Example:

drivers/clk/uniphier/clk-uniphier-core.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ static const struct of_device_id uniphier_clk_match[] = {
138138
.compatible = "socionext,uniphier-ld20-clock",
139139
.data = uniphier_ld20_sys_clk_data,
140140
},
141+
{
142+
.compatible = "socionext,uniphier-pxs3-clock",
143+
.data = uniphier_pxs3_sys_clk_data,
144+
},
141145
/* Media I/O clock, SD clock */
142146
{
143147
.compatible = "socionext,uniphier-ld4-mio-clock",
@@ -167,6 +171,10 @@ static const struct of_device_id uniphier_clk_match[] = {
167171
.compatible = "socionext,uniphier-ld20-sd-clock",
168172
.data = uniphier_pro5_sd_clk_data,
169173
},
174+
{
175+
.compatible = "socionext,uniphier-pxs3-sd-clock",
176+
.data = uniphier_pro5_sd_clk_data,
177+
},
170178
/* Peripheral clock */
171179
{
172180
.compatible = "socionext,uniphier-ld4-peri-clock",
@@ -196,6 +204,10 @@ static const struct of_device_id uniphier_clk_match[] = {
196204
.compatible = "socionext,uniphier-ld20-peri-clock",
197205
.data = uniphier_pro4_peri_clk_data,
198206
},
207+
{
208+
.compatible = "socionext,uniphier-pxs3-peri-clock",
209+
.data = uniphier_pro4_peri_clk_data,
210+
},
199211
{ /* sentinel */ }
200212
};
201213

drivers/clk/uniphier/clk-uniphier-sys.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,33 @@ const struct uniphier_clk_data uniphier_ld20_sys_clk_data[] = {
205205
"spll/4", "spll/8", "s2pll/4", "s2pll/8"),
206206
{ /* sentinel */ }
207207
};
208+
209+
const struct uniphier_clk_data uniphier_pxs3_sys_clk_data[] = {
210+
UNIPHIER_CLK_FACTOR("cpll", -1, "ref", 104, 1), /* ARM: 2600 MHz */
211+
UNIPHIER_CLK_FACTOR("spll", -1, "ref", 80, 1), /* 2000 MHz */
212+
UNIPHIER_CLK_FACTOR("s2pll", -1, "ref", 88, 1), /* IPP: 2400 MHz */
213+
UNIPHIER_CLK_FACTOR("uart", 0, "spll", 1, 34),
214+
UNIPHIER_CLK_FACTOR("i2c", 1, "spll", 1, 40),
215+
UNIPHIER_LD20_SYS_CLK_SD,
216+
UNIPHIER_LD11_SYS_CLK_NAND(2),
217+
UNIPHIER_LD11_SYS_CLK_EMMC(4),
218+
UNIPHIER_CLK_GATE("usb30", 12, NULL, 0x2104, 4), /* =GIO0 */
219+
UNIPHIER_CLK_GATE("usb31-0", 13, NULL, 0x2104, 5), /* =GIO1 */
220+
UNIPHIER_CLK_GATE("usb31-1", 14, NULL, 0x2104, 6), /* =GIO1-1 */
221+
UNIPHIER_CLK_GATE("usb30-phy0", 16, NULL, 0x210c, 16),
222+
UNIPHIER_CLK_GATE("usb30-phy1", 17, NULL, 0x210c, 18),
223+
UNIPHIER_CLK_GATE("usb30-phy2", 18, NULL, 0x210c, 20),
224+
UNIPHIER_CLK_GATE("usb31-phy0", 20, NULL, 0x210c, 17),
225+
UNIPHIER_CLK_GATE("usb31-phy1", 21, NULL, 0x210c, 19),
226+
/* CPU gears */
227+
UNIPHIER_CLK_DIV4("cpll", 2, 3, 4, 8),
228+
UNIPHIER_CLK_DIV4("spll", 2, 3, 4, 8),
229+
UNIPHIER_CLK_DIV4("s2pll", 2, 3, 4, 8),
230+
UNIPHIER_CLK_CPUGEAR("cpu-ca53", 33, 0x8080, 0xf, 8,
231+
"cpll/2", "spll/2", "cpll/3", "spll/3",
232+
"spll/4", "spll/8", "cpll/4", "cpll/8"),
233+
UNIPHIER_CLK_CPUGEAR("cpu-ipp", 34, 0x8100, 0xf, 8,
234+
"s2pll/2", "spll/2", "s2pll/3", "spll/3",
235+
"spll/4", "spll/8", "s2pll/4", "s2pll/8"),
236+
{ /* sentinel */ }
237+
};

drivers/clk/uniphier/clk-uniphier.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ extern const struct uniphier_clk_data uniphier_pro5_sys_clk_data[];
154154
extern const struct uniphier_clk_data uniphier_pxs2_sys_clk_data[];
155155
extern const struct uniphier_clk_data uniphier_ld11_sys_clk_data[];
156156
extern const struct uniphier_clk_data uniphier_ld20_sys_clk_data[];
157+
extern const struct uniphier_clk_data uniphier_pxs3_sys_clk_data[];
157158
extern const struct uniphier_clk_data uniphier_ld4_mio_clk_data[];
158159
extern const struct uniphier_clk_data uniphier_pro5_sd_clk_data[];
159160
extern const struct uniphier_clk_data uniphier_ld4_peri_clk_data[];

0 commit comments

Comments
 (0)