aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-13 18:51:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-13 18:51:06 -0400
commitca4e7c51201fc47b2668d58faaa3b46a99d1a233 (patch)
tree06e0ece281eff94ff78c11e78e036d5b61ebbe60 /include
parentdaf3ef6e965d1d51d6ec604a8fc9919b75d5ec3c (diff)
parentb44c4ddf4a15c42a91a88aaa32b7d53cf43391cb (diff)
Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
Pull clk updates from Stephen Boyd: "The large diff this time around is from the addition of a new clk driver for the TI Davinci family of SoCs. So far those clks have been supported with a custom implementation of the clk API in the arch port instead of in the CCF. With this driver merged we're one step closer to having a single clk API implementation. The other large diff is from the Amlogic clk driver that underwent some major surgery to use regmap. Beyond that, the biggest hitter is Samsung which needed some reworks to properly handle clk provider power domains and a bunch of PLL rate updates. The core framework was fairly quiet this round, just getting some cleanups and small fixes for some of the more esoteric features. And the usual set of driver non-critical fixes, cleanups, and minor additions are here as well. Core: - Rejig clk_ops::init() to be a little earlier for phase/accuracy ops - debugfs ops macroized to shave some lines of boilerplate code - Always calculate the phase instead of caching it in clk_get_phase() - More __must_check on bulk clk APIs New Drivers: - TI's Davinci family of SoCs - Intel's Stratix10 SoC - stm32mp157 SoC - Allwinner H6 CCU - Silicon Labs SI544 clock generator chip - Renesas R-Car M3-N and V3H SoCs - i.MX6SLL SoCs Removed Drivers: - ST-Ericsson AB8540/9540 Updates: - Mediatek MT2701 and MT7622 audsys support and MT2712 updates - STM32F469 DSI and STM32F769 sdmmc2 support - GPIO clks can sleep now - Spreadtrum SC9860 RTC clks - Nvidia Tegra MBIST workarounds and various minor fixes - Rockchip phase handling fixes and a memory leak plugged - Renesas drivers switch to readl/writel from clk_readl/clk_writel - Renesas gained CPU (Z/Z2) and watchdog support - Rockchip rk3328 display clks and rk3399 1.6GHz PLL support - Qualcomm PM8921 PMIC XO buffers - Amlogic migrates to regmap APIs - TI Keystone clk latching support - Allwinner H3 and H5 video clk fixes - Broadcom BCM2835 PLLs needed another bit to enable - i.MX6SX CKO mux fix and i.MX7D Video PLL divider fix - i.MX6UL/ULL epdc_podf support - Hi3798CV200 COMBPHY0 and USB2_OTG_UTMI and phase support for eMMC" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (233 commits) clk: davinci: add a reset lookup table for psc0 clk: imx: add clock driver for imx6sll dt-bindings: imx: update clock doc for imx6sll clk: imx: add new gate/gate2 wrapper funtion clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux clk: cs2000: set pm_ops in hibernate-compatible way clk: bcm2835: De-assert/assert PLL reset signal when appropriate clk: imx7d: Move clks_init_on before any clock operations clk: imx7d: Correct ahb clk parent select clk: imx7d: Correct dram pll type clk: imx7d: Add USB clock information clk: socfpga: stratix10: add clock driver for Stratix10 platform dt-bindings: documentation: add clock bindings information for Stratix10 clk: ti: fix flag space conflict with clkctrl clocks clk: uniphier: add additional ethernet clock lines for Pro4 clk: uniphier: add SATA clock control support clk: uniphier: add PCIe clock control support clk: Add driver for the si544 clock generator chip clk: davinci: Remove redundant dev_err calls clk: uniphier: add ethernet clock control support for PXs3 ...
Diffstat (limited to 'include')
-rw-r--r--include/dt-bindings/clock/axg-clkc.h1
-rw-r--r--include/dt-bindings/clock/histb-clock.h55
-rw-r--r--include/dt-bindings/clock/imx6sll-clock.h202
-rw-r--r--include/dt-bindings/clock/mt2701-clk.h3
-rw-r--r--include/dt-bindings/clock/mt2712-clk.h12
-rw-r--r--include/dt-bindings/clock/mt7622-clk.h3
-rw-r--r--include/dt-bindings/clock/qcom,rpmcc.h5
-rw-r--r--include/dt-bindings/clock/r8a77965-cpg-mssr.h62
-rw-r--r--include/dt-bindings/clock/r8a77980-cpg-mssr.h51
-rw-r--r--include/dt-bindings/clock/rk3328-cru.h1
-rw-r--r--include/dt-bindings/clock/sprd,sc9860-clk.h21
-rw-r--r--include/dt-bindings/clock/stm32fx-clock.h7
-rw-r--r--include/dt-bindings/clock/stm32mp1-clks.h254
-rw-r--r--include/dt-bindings/clock/stratix10-clock.h84
-rw-r--r--include/dt-bindings/clock/sun50i-h6-ccu.h125
-rw-r--r--include/dt-bindings/clock/sun8i-h3-ccu.h2
-rw-r--r--include/dt-bindings/clock/tegra210-car.h2
-rw-r--r--include/dt-bindings/reset/sun50i-h6-ccu.h73
-rw-r--r--include/linux/clk-provider.h23
-rw-r--r--include/linux/clk.h16
-rw-r--r--include/linux/clk/tegra.h1
-rw-r--r--include/linux/clk/ti.h2
-rw-r--r--include/linux/platform_data/clk-da8xx-cfgchip.h21
-rw-r--r--include/linux/platform_data/clk-davinci-pll.h21
24 files changed, 1001 insertions, 46 deletions
diff --git a/include/dt-bindings/clock/axg-clkc.h b/include/dt-bindings/clock/axg-clkc.h
index 941ac70e7f30..555937a25504 100644
--- a/include/dt-bindings/clock/axg-clkc.h
+++ b/include/dt-bindings/clock/axg-clkc.h
@@ -67,5 +67,6 @@
67#define CLKID_AO_I2C 58 67#define CLKID_AO_I2C 58
68#define CLKID_SD_EMMC_B_CLK0 59 68#define CLKID_SD_EMMC_B_CLK0 59
69#define CLKID_SD_EMMC_C_CLK0 60 69#define CLKID_SD_EMMC_C_CLK0 60
70#define CLKID_HIFI_PLL 69
70 71
71#endif /* __AXG_CLKC_H */ 72#endif /* __AXG_CLKC_H */
diff --git a/include/dt-bindings/clock/histb-clock.h b/include/dt-bindings/clock/histb-clock.h
index 067f5e501b0c..fab30b3f78b2 100644
--- a/include/dt-bindings/clock/histb-clock.h
+++ b/include/dt-bindings/clock/histb-clock.h
@@ -22,18 +22,18 @@
22#define HISTB_OSC_CLK 0 22#define HISTB_OSC_CLK 0
23#define HISTB_APB_CLK 1 23#define HISTB_APB_CLK 1
24#define HISTB_AHB_CLK 2 24#define HISTB_AHB_CLK 2
25#define HISTB_UART1_CLK 3 25#define HISTB_UART1_CLK 3
26#define HISTB_UART2_CLK 4 26#define HISTB_UART2_CLK 4
27#define HISTB_UART3_CLK 5 27#define HISTB_UART3_CLK 5
28#define HISTB_I2C0_CLK 6 28#define HISTB_I2C0_CLK 6
29#define HISTB_I2C1_CLK 7 29#define HISTB_I2C1_CLK 7
30#define HISTB_I2C2_CLK 8 30#define HISTB_I2C2_CLK 8
31#define HISTB_I2C3_CLK 9 31#define HISTB_I2C3_CLK 9
32#define HISTB_I2C4_CLK 10 32#define HISTB_I2C4_CLK 10
33#define HISTB_I2C5_CLK 11 33#define HISTB_I2C5_CLK 11
34#define HISTB_SPI0_CLK 12 34#define HISTB_SPI0_CLK 12
35#define HISTB_SPI1_CLK 13 35#define HISTB_SPI1_CLK 13
36#define HISTB_SPI2_CLK 14 36#define HISTB_SPI2_CLK 14
37#define HISTB_SCI_CLK 15 37#define HISTB_SCI_CLK 15
38#define HISTB_FMC_CLK 16 38#define HISTB_FMC_CLK 16
39#define HISTB_MMC_BIU_CLK 17 39#define HISTB_MMC_BIU_CLK 17
@@ -43,7 +43,7 @@
43#define HISTB_SDIO0_BIU_CLK 21 43#define HISTB_SDIO0_BIU_CLK 21
44#define HISTB_SDIO0_CIU_CLK 22 44#define HISTB_SDIO0_CIU_CLK 22
45#define HISTB_SDIO0_DRV_CLK 23 45#define HISTB_SDIO0_DRV_CLK 23
46#define HISTB_SDIO0_SAMPLE_CLK 24 46#define HISTB_SDIO0_SAMPLE_CLK 24
47#define HISTB_PCIE_AUX_CLK 25 47#define HISTB_PCIE_AUX_CLK 25
48#define HISTB_PCIE_PIPE_CLK 26 48#define HISTB_PCIE_PIPE_CLK 26
49#define HISTB_PCIE_SYS_CLK 27 49#define HISTB_PCIE_SYS_CLK 27
@@ -53,21 +53,22 @@
53#define HISTB_ETH1_MAC_CLK 31 53#define HISTB_ETH1_MAC_CLK 31
54#define HISTB_ETH1_MACIF_CLK 32 54#define HISTB_ETH1_MACIF_CLK 32
55#define HISTB_COMBPHY1_CLK 33 55#define HISTB_COMBPHY1_CLK 33
56#define HISTB_USB2_BUS_CLK 34 56#define HISTB_USB2_BUS_CLK 34
57#define HISTB_USB2_PHY_CLK 35 57#define HISTB_USB2_PHY_CLK 35
58#define HISTB_USB2_UTMI_CLK 36 58#define HISTB_USB2_UTMI_CLK 36
59#define HISTB_USB2_12M_CLK 37 59#define HISTB_USB2_12M_CLK 37
60#define HISTB_USB2_48M_CLK 38 60#define HISTB_USB2_48M_CLK 38
61#define HISTB_USB2_OTG_UTMI_CLK 39 61#define HISTB_USB2_OTG_UTMI_CLK 39
62#define HISTB_USB2_PHY1_REF_CLK 40 62#define HISTB_USB2_PHY1_REF_CLK 40
63#define HISTB_USB2_PHY2_REF_CLK 41 63#define HISTB_USB2_PHY2_REF_CLK 41
64#define HISTB_COMBPHY0_CLK 42
64 65
65/* clocks provided by mcu CRG */ 66/* clocks provided by mcu CRG */
66#define HISTB_MCE_CLK 1 67#define HISTB_MCE_CLK 1
67#define HISTB_IR_CLK 2 68#define HISTB_IR_CLK 2
68#define HISTB_TIMER01_CLK 3 69#define HISTB_TIMER01_CLK 3
69#define HISTB_LEDC_CLK 4 70#define HISTB_LEDC_CLK 4
70#define HISTB_UART0_CLK 5 71#define HISTB_UART0_CLK 5
71#define HISTB_LSADC_CLK 6 72#define HISTB_LSADC_CLK 6
72 73
73#endif /* __DTS_HISTB_CLOCK_H */ 74#endif /* __DTS_HISTB_CLOCK_H */
diff --git a/include/dt-bindings/clock/imx6sll-clock.h b/include/dt-bindings/clock/imx6sll-clock.h
new file mode 100644
index 000000000000..151111e68f4f
--- /dev/null
+++ b/include/dt-bindings/clock/imx6sll-clock.h
@@ -0,0 +1,202 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2016 Freescale Semiconductor, Inc.
4 * Copyright 2017-2018 NXP.
5 *
6 */
7
8#ifndef __DT_BINDINGS_CLOCK_IMX6SLL_H
9#define __DT_BINDINGS_CLOCK_IMX6SLL_H
10
11#define IMX6SLL_CLK_DUMMY 0
12#define IMX6SLL_CLK_CKIL 1
13#define IMX6SLL_CLK_OSC 2
14#define IMX6SLL_PLL1_BYPASS_SRC 3
15#define IMX6SLL_PLL2_BYPASS_SRC 4
16#define IMX6SLL_PLL3_BYPASS_SRC 5
17#define IMX6SLL_PLL4_BYPASS_SRC 6
18#define IMX6SLL_PLL5_BYPASS_SRC 7
19#define IMX6SLL_PLL6_BYPASS_SRC 8
20#define IMX6SLL_PLL7_BYPASS_SRC 9
21#define IMX6SLL_CLK_PLL1 10
22#define IMX6SLL_CLK_PLL2 11
23#define IMX6SLL_CLK_PLL3 12
24#define IMX6SLL_CLK_PLL4 13
25#define IMX6SLL_CLK_PLL5 14
26#define IMX6SLL_CLK_PLL6 15
27#define IMX6SLL_CLK_PLL7 16
28#define IMX6SLL_PLL1_BYPASS 17
29#define IMX6SLL_PLL2_BYPASS 18
30#define IMX6SLL_PLL3_BYPASS 19
31#define IMX6SLL_PLL4_BYPASS 20
32#define IMX6SLL_PLL5_BYPASS 21
33#define IMX6SLL_PLL6_BYPASS 22
34#define IMX6SLL_PLL7_BYPASS 23
35#define IMX6SLL_CLK_PLL1_SYS 24
36#define IMX6SLL_CLK_PLL2_BUS 25
37#define IMX6SLL_CLK_PLL3_USB_OTG 26
38#define IMX6SLL_CLK_PLL4_AUDIO 27
39#define IMX6SLL_CLK_PLL5_VIDEO 28
40#define IMX6SLL_CLK_PLL6_ENET 29
41#define IMX6SLL_CLK_PLL7_USB_HOST 30
42#define IMX6SLL_CLK_USBPHY1 31
43#define IMX6SLL_CLK_USBPHY2 32
44#define IMX6SLL_CLK_USBPHY1_GATE 33
45#define IMX6SLL_CLK_USBPHY2_GATE 34
46#define IMX6SLL_CLK_PLL2_PFD0 35
47#define IMX6SLL_CLK_PLL2_PFD1 36
48#define IMX6SLL_CLK_PLL2_PFD2 37
49#define IMX6SLL_CLK_PLL2_PFD3 38
50#define IMX6SLL_CLK_PLL3_PFD0 39
51#define IMX6SLL_CLK_PLL3_PFD1 40
52#define IMX6SLL_CLK_PLL3_PFD2 41
53#define IMX6SLL_CLK_PLL3_PFD3 42
54#define IMX6SLL_CLK_PLL4_POST_DIV 43
55#define IMX6SLL_CLK_PLL4_AUDIO_DIV 44
56#define IMX6SLL_CLK_PLL5_POST_DIV 45
57#define IMX6SLL_CLK_PLL5_VIDEO_DIV 46
58#define IMX6SLL_CLK_PLL2_198M 47
59#define IMX6SLL_CLK_PLL3_120M 48
60#define IMX6SLL_CLK_PLL3_80M 49
61#define IMX6SLL_CLK_PLL3_60M 50
62#define IMX6SLL_CLK_STEP 51
63#define IMX6SLL_CLK_PLL1_SW 52
64#define IMX6SLL_CLK_AXI_ALT_SEL 53
65#define IMX6SLL_CLK_AXI_SEL 54
66#define IMX6SLL_CLK_PERIPH_PRE 55
67#define IMX6SLL_CLK_PERIPH2_PRE 56
68#define IMX6SLL_CLK_PERIPH_CLK2_SEL 57
69#define IMX6SLL_CLK_PERIPH2_CLK2_SEL 58
70#define IMX6SLL_CLK_PERCLK_SEL 59
71#define IMX6SLL_CLK_USDHC1_SEL 60
72#define IMX6SLL_CLK_USDHC2_SEL 61
73#define IMX6SLL_CLK_USDHC3_SEL 62
74#define IMX6SLL_CLK_SSI1_SEL 63
75#define IMX6SLL_CLK_SSI2_SEL 64
76#define IMX6SLL_CLK_SSI3_SEL 65
77#define IMX6SLL_CLK_PXP_SEL 66
78#define IMX6SLL_CLK_LCDIF_PRE_SEL 67
79#define IMX6SLL_CLK_LCDIF_SEL 68
80#define IMX6SLL_CLK_EPDC_PRE_SEL 69
81#define IMX6SLL_CLK_SPDIF_SEL 70
82#define IMX6SLL_CLK_ECSPI_SEL 71
83#define IMX6SLL_CLK_UART_SEL 72
84#define IMX6SLL_CLK_ARM 73
85#define IMX6SLL_CLK_PERIPH 74
86#define IMX6SLL_CLK_PERIPH2 75
87#define IMX6SLL_CLK_PERIPH2_CLK2 76
88#define IMX6SLL_CLK_PERIPH_CLK2 77
89#define IMX6SLL_CLK_MMDC_PODF 78
90#define IMX6SLL_CLK_AXI_PODF 79
91#define IMX6SLL_CLK_AHB 80
92#define IMX6SLL_CLK_IPG 81
93#define IMX6SLL_CLK_PERCLK 82
94#define IMX6SLL_CLK_USDHC1_PODF 83
95#define IMX6SLL_CLK_USDHC2_PODF 84
96#define IMX6SLL_CLK_USDHC3_PODF 85
97#define IMX6SLL_CLK_SSI1_PRED 86
98#define IMX6SLL_CLK_SSI2_PRED 87
99#define IMX6SLL_CLK_SSI3_PRED 88
100#define IMX6SLL_CLK_SSI1_PODF 89
101#define IMX6SLL_CLK_SSI2_PODF 90
102#define IMX6SLL_CLK_SSI3_PODF 91
103#define IMX6SLL_CLK_PXP_PODF 92
104#define IMX6SLL_CLK_LCDIF_PRED 93
105#define IMX6SLL_CLK_LCDIF_PODF 94
106#define IMX6SLL_CLK_EPDC_SEL 95
107#define IMX6SLL_CLK_EPDC_PODF 96
108#define IMX6SLL_CLK_SPDIF_PRED 97
109#define IMX6SLL_CLK_SPDIF_PODF 98
110#define IMX6SLL_CLK_ECSPI_PODF 99
111#define IMX6SLL_CLK_UART_PODF 100
112
113/* CCGR 0 */
114#define IMX6SLL_CLK_AIPSTZ1 101
115#define IMX6SLL_CLK_AIPSTZ2 102
116#define IMX6SLL_CLK_DCP 103
117#define IMX6SLL_CLK_UART2_IPG 104
118#define IMX6SLL_CLK_UART2_SERIAL 105
119
120/* CCGR 1 */
121#define IMX6SLL_CLK_ECSPI1 106
122#define IMX6SLL_CLK_ECSPI2 107
123#define IMX6SLL_CLK_ECSPI3 108
124#define IMX6SLL_CLK_ECSPI4 109
125#define IMX6SLL_CLK_UART3_IPG 110
126#define IMX6SLL_CLK_UART3_SERIAL 111
127#define IMX6SLL_CLK_UART4_IPG 112
128#define IMX6SLL_CLK_UART4_SERIAL 113
129#define IMX6SLL_CLK_EPIT1 114
130#define IMX6SLL_CLK_EPIT2 115
131#define IMX6SLL_CLK_GPT_BUS 116
132#define IMX6SLL_CLK_GPT_SERIAL 117
133
134/* CCGR2 */
135#define IMX6SLL_CLK_CSI 118
136#define IMX6SLL_CLK_I2C1 119
137#define IMX6SLL_CLK_I2C2 120
138#define IMX6SLL_CLK_I2C3 121
139#define IMX6SLL_CLK_OCOTP 122
140#define IMX6SLL_CLK_LCDIF_APB 123
141#define IMX6SLL_CLK_PXP 124
142
143/* CCGR3 */
144#define IMX6SLL_CLK_UART5_IPG 125
145#define IMX6SLL_CLK_UART5_SERIAL 126
146#define IMX6SLL_CLK_EPDC_AXI 127
147#define IMX6SLL_CLK_EPDC_PIX 128
148#define IMX6SLL_CLK_LCDIF_PIX 129
149#define IMX6SLL_CLK_WDOG1 130
150#define IMX6SLL_CLK_MMDC_P0_FAST 131
151#define IMX6SLL_CLK_MMDC_P0_IPG 132
152#define IMX6SLL_CLK_OCRAM 133
153
154/* CCGR4 */
155#define IMX6SLL_CLK_PWM1 134
156#define IMX6SLL_CLK_PWM2 135
157#define IMX6SLL_CLK_PWM3 136
158#define IMX6SLL_CLK_PWM4 137
159
160/* CCGR 5 */
161#define IMX6SLL_CLK_ROM 138
162#define IMX6SLL_CLK_SDMA 139
163#define IMX6SLL_CLK_KPP 140
164#define IMX6SLL_CLK_WDOG2 141
165#define IMX6SLL_CLK_SPBA 142
166#define IMX6SLL_CLK_SPDIF 143
167#define IMX6SLL_CLK_SPDIF_GCLK 144
168#define IMX6SLL_CLK_SSI1 145
169#define IMX6SLL_CLK_SSI1_IPG 146
170#define IMX6SLL_CLK_SSI2 147
171#define IMX6SLL_CLK_SSI2_IPG 148
172#define IMX6SLL_CLK_SSI3 149
173#define IMX6SLL_CLK_SSI3_IPG 150
174#define IMX6SLL_CLK_UART1_IPG 151
175#define IMX6SLL_CLK_UART1_SERIAL 152
176
177/* CCGR 6 */
178#define IMX6SLL_CLK_USBOH3 153
179#define IMX6SLL_CLK_USDHC1 154
180#define IMX6SLL_CLK_USDHC2 155
181#define IMX6SLL_CLK_USDHC3 156
182
183#define IMX6SLL_CLK_IPP_DI0 157
184#define IMX6SLL_CLK_IPP_DI1 158
185#define IMX6SLL_CLK_LDB_DI0_SEL 159
186#define IMX6SLL_CLK_LDB_DI0_DIV_3_5 160
187#define IMX6SLL_CLK_LDB_DI0_DIV_7 161
188#define IMX6SLL_CLK_LDB_DI0_DIV_SEL 162
189#define IMX6SLL_CLK_LDB_DI0 163
190#define IMX6SLL_CLK_LDB_DI1_SEL 164
191#define IMX6SLL_CLK_LDB_DI1_DIV_3_5 165
192#define IMX6SLL_CLK_LDB_DI1_DIV_7 166
193#define IMX6SLL_CLK_LDB_DI1_DIV_SEL 167
194#define IMX6SLL_CLK_LDB_DI1 168
195#define IMX6SLL_CLK_EXTERN_AUDIO_SEL 169
196#define IMX6SLL_CLK_EXTERN_AUDIO_PRED 170
197#define IMX6SLL_CLK_EXTERN_AUDIO_PODF 171
198#define IMX6SLL_CLK_EXTERN_AUDIO 172
199
200#define IMX6SLL_CLK_END 173
201
202#endif /* __DT_BINDINGS_CLOCK_IMX6SLL_H */
diff --git a/include/dt-bindings/clock/mt2701-clk.h b/include/dt-bindings/clock/mt2701-clk.h
index 551f7600ab58..24e93dfcee9f 100644
--- a/include/dt-bindings/clock/mt2701-clk.h
+++ b/include/dt-bindings/clock/mt2701-clk.h
@@ -176,7 +176,8 @@
176#define CLK_TOP_AUD_EXT1 156 176#define CLK_TOP_AUD_EXT1 156
177#define CLK_TOP_AUD_EXT2 157 177#define CLK_TOP_AUD_EXT2 157
178#define CLK_TOP_NFI1X_PAD 158 178#define CLK_TOP_NFI1X_PAD 158
179#define CLK_TOP_NR 159 179#define CLK_TOP_AXISEL_D4 159
180#define CLK_TOP_NR 160
180 181
181/* APMIXEDSYS */ 182/* APMIXEDSYS */
182 183
diff --git a/include/dt-bindings/clock/mt2712-clk.h b/include/dt-bindings/clock/mt2712-clk.h
index 48a8e797a617..76265836a1e1 100644
--- a/include/dt-bindings/clock/mt2712-clk.h
+++ b/include/dt-bindings/clock/mt2712-clk.h
@@ -222,7 +222,13 @@
222#define CLK_TOP_APLL_DIV_PDN5 183 222#define CLK_TOP_APLL_DIV_PDN5 183
223#define CLK_TOP_APLL_DIV_PDN6 184 223#define CLK_TOP_APLL_DIV_PDN6 184
224#define CLK_TOP_APLL_DIV_PDN7 185 224#define CLK_TOP_APLL_DIV_PDN7 185
225#define CLK_TOP_NR_CLK 186 225#define CLK_TOP_APLL1_D3 186
226#define CLK_TOP_APLL1_REF_SEL 187
227#define CLK_TOP_APLL2_REF_SEL 188
228#define CLK_TOP_NFI2X_EN 189
229#define CLK_TOP_NFIECC_EN 190
230#define CLK_TOP_NFI1X_CK_EN 191
231#define CLK_TOP_NR_CLK 192
226 232
227/* INFRACFG */ 233/* INFRACFG */
228 234
@@ -281,7 +287,9 @@
281#define CLK_PERI_MSDC30_3_EN 41 287#define CLK_PERI_MSDC30_3_EN 41
282#define CLK_PERI_MSDC50_0_HCLK_EN 42 288#define CLK_PERI_MSDC50_0_HCLK_EN 42
283#define CLK_PERI_MSDC50_3_HCLK_EN 43 289#define CLK_PERI_MSDC50_3_HCLK_EN 43
284#define CLK_PERI_NR_CLK 44 290#define CLK_PERI_MSDC30_0_QTR_EN 44
291#define CLK_PERI_MSDC30_3_QTR_EN 45
292#define CLK_PERI_NR_CLK 46
285 293
286/* MCUCFG */ 294/* MCUCFG */
287 295
diff --git a/include/dt-bindings/clock/mt7622-clk.h b/include/dt-bindings/clock/mt7622-clk.h
index 3e514ed51d15..e9d77f0e8bce 100644
--- a/include/dt-bindings/clock/mt7622-clk.h
+++ b/include/dt-bindings/clock/mt7622-clk.h
@@ -235,7 +235,8 @@
235#define CLK_AUDIO_MEM_ASRC3 43 235#define CLK_AUDIO_MEM_ASRC3 43
236#define CLK_AUDIO_MEM_ASRC4 44 236#define CLK_AUDIO_MEM_ASRC4 44
237#define CLK_AUDIO_MEM_ASRC5 45 237#define CLK_AUDIO_MEM_ASRC5 45
238#define CLK_AUDIO_NR_CLK 46 238#define CLK_AUDIO_AFE_CONN 46
239#define CLK_AUDIO_NR_CLK 47
239 240
240/* SSUSBSYS */ 241/* SSUSBSYS */
241 242
diff --git a/include/dt-bindings/clock/qcom,rpmcc.h b/include/dt-bindings/clock/qcom,rpmcc.h
index b8337a5fa347..c585b82b9c05 100644
--- a/include/dt-bindings/clock/qcom,rpmcc.h
+++ b/include/dt-bindings/clock/qcom,rpmcc.h
@@ -40,6 +40,11 @@
40#define RPM_SMI_CLK 22 40#define RPM_SMI_CLK 22
41#define RPM_SMI_A_CLK 23 41#define RPM_SMI_A_CLK 23
42#define RPM_PLL4_CLK 24 42#define RPM_PLL4_CLK 24
43#define RPM_XO_D0 25
44#define RPM_XO_D1 26
45#define RPM_XO_A0 27
46#define RPM_XO_A1 28
47#define RPM_XO_A2 29
43 48
44/* SMD RPM clocks */ 49/* SMD RPM clocks */
45#define RPM_SMD_XO_CLK_SRC 0 50#define RPM_SMD_XO_CLK_SRC 0
diff --git a/include/dt-bindings/clock/r8a77965-cpg-mssr.h b/include/dt-bindings/clock/r8a77965-cpg-mssr.h
new file mode 100644
index 000000000000..6d3b5a9a6084
--- /dev/null
+++ b/include/dt-bindings/clock/r8a77965-cpg-mssr.h
@@ -0,0 +1,62 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2018 Jacopo Mondi <jacopo+renesas@jmondi.org>
4 */
5#ifndef __DT_BINDINGS_CLOCK_R8A77965_CPG_MSSR_H__
6#define __DT_BINDINGS_CLOCK_R8A77965_CPG_MSSR_H__
7
8#include <dt-bindings/clock/renesas-cpg-mssr.h>
9
10/* r8a77965 CPG Core Clocks */
11#define R8A77965_CLK_Z 0
12#define R8A77965_CLK_ZR 1
13#define R8A77965_CLK_ZG 2
14#define R8A77965_CLK_ZTR 3
15#define R8A77965_CLK_ZTRD2 4
16#define R8A77965_CLK_ZT 5
17#define R8A77965_CLK_ZX 6
18#define R8A77965_CLK_S0D1 7
19#define R8A77965_CLK_S0D2 8
20#define R8A77965_CLK_S0D3 9
21#define R8A77965_CLK_S0D4 10
22#define R8A77965_CLK_S0D6 11
23#define R8A77965_CLK_S0D8 12
24#define R8A77965_CLK_S0D12 13
25#define R8A77965_CLK_S1D1 14
26#define R8A77965_CLK_S1D2 15
27#define R8A77965_CLK_S1D4 16
28#define R8A77965_CLK_S2D1 17
29#define R8A77965_CLK_S2D2 18
30#define R8A77965_CLK_S2D4 19
31#define R8A77965_CLK_S3D1 20
32#define R8A77965_CLK_S3D2 21
33#define R8A77965_CLK_S3D4 22
34#define R8A77965_CLK_LB 23
35#define R8A77965_CLK_CL 24
36#define R8A77965_CLK_ZB3 25
37#define R8A77965_CLK_ZB3D2 26
38#define R8A77965_CLK_CR 27
39#define R8A77965_CLK_CRD2 28
40#define R8A77965_CLK_SD0H 29
41#define R8A77965_CLK_SD0 30
42#define R8A77965_CLK_SD1H 31
43#define R8A77965_CLK_SD1 32
44#define R8A77965_CLK_SD2H 33
45#define R8A77965_CLK_SD2 34
46#define R8A77965_CLK_SD3H 35
47#define R8A77965_CLK_SD3 36
48#define R8A77965_CLK_SSP2 37
49#define R8A77965_CLK_SSP1 38
50#define R8A77965_CLK_SSPRS 39
51#define R8A77965_CLK_RPC 40
52#define R8A77965_CLK_RPCD2 41
53#define R8A77965_CLK_MSO 42
54#define R8A77965_CLK_CANFD 43
55#define R8A77965_CLK_HDMI 44
56#define R8A77965_CLK_CSI0 45
57#define R8A77965_CLK_CP 46
58#define R8A77965_CLK_CPEX 47
59#define R8A77965_CLK_R 48
60#define R8A77965_CLK_OSC 49
61
62#endif /* __DT_BINDINGS_CLOCK_R8A77965_CPG_MSSR_H__ */
diff --git a/include/dt-bindings/clock/r8a77980-cpg-mssr.h b/include/dt-bindings/clock/r8a77980-cpg-mssr.h
new file mode 100644
index 000000000000..a4c0d76c392e
--- /dev/null
+++ b/include/dt-bindings/clock/r8a77980-cpg-mssr.h
@@ -0,0 +1,51 @@
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (C) 2018 Renesas Electronics Corp.
4 * Copyright (C) 2018 Cogent Embedded, Inc.
5 */
6#ifndef __DT_BINDINGS_CLOCK_R8A77980_CPG_MSSR_H__
7#define __DT_BINDINGS_CLOCK_R8A77980_CPG_MSSR_H__
8
9#include <dt-bindings/clock/renesas-cpg-mssr.h>
10
11/* r8a77980 CPG Core Clocks */
12#define R8A77980_CLK_Z2 0
13#define R8A77980_CLK_ZR 1
14#define R8A77980_CLK_ZTR 2
15#define R8A77980_CLK_ZTRD2 3
16#define R8A77980_CLK_ZT 4
17#define R8A77980_CLK_ZX 5
18#define R8A77980_CLK_S0D1 6
19#define R8A77980_CLK_S0D2 7
20#define R8A77980_CLK_S0D3 8
21#define R8A77980_CLK_S0D4 9
22#define R8A77980_CLK_S0D6 10
23#define R8A77980_CLK_S0D12 11
24#define R8A77980_CLK_S0D24 12
25#define R8A77980_CLK_S1D1 13
26#define R8A77980_CLK_S1D2 14
27#define R8A77980_CLK_S1D4 15
28#define R8A77980_CLK_S2D1 16
29#define R8A77980_CLK_S2D2 17
30#define R8A77980_CLK_S2D4 18
31#define R8A77980_CLK_S3D1 19
32#define R8A77980_CLK_S3D2 20
33#define R8A77980_CLK_S3D4 21
34#define R8A77980_CLK_LB 22
35#define R8A77980_CLK_CL 23
36#define R8A77980_CLK_ZB3 24
37#define R8A77980_CLK_ZB3D2 25
38#define R8A77980_CLK_ZB3D4 26
39#define R8A77980_CLK_SD0H 27
40#define R8A77980_CLK_SD0 28
41#define R8A77980_CLK_RPC 29
42#define R8A77980_CLK_RPCD2 30
43#define R8A77980_CLK_MSO 31
44#define R8A77980_CLK_CANFD 32
45#define R8A77980_CLK_CSI0 33
46#define R8A77980_CLK_CP 34
47#define R8A77980_CLK_CPEX 35
48#define R8A77980_CLK_R 36
49#define R8A77980_CLK_OSC 37
50
51#endif /* __DT_BINDINGS_CLOCK_R8A77980_CPG_MSSR_H__ */
diff --git a/include/dt-bindings/clock/rk3328-cru.h b/include/dt-bindings/clock/rk3328-cru.h
index d2b26a4b43eb..a82a0109faff 100644
--- a/include/dt-bindings/clock/rk3328-cru.h
+++ b/include/dt-bindings/clock/rk3328-cru.h
@@ -193,7 +193,6 @@
193#define HCLK_VPU_PRE 324 193#define HCLK_VPU_PRE 324
194#define HCLK_VIO_PRE 325 194#define HCLK_VIO_PRE 325
195#define HCLK_VPU 326 195#define HCLK_VPU 326
196#define HCLK_VIO 327
197#define HCLK_BUS_PRE 328 196#define HCLK_BUS_PRE 328
198#define HCLK_PERI_PRE 329 197#define HCLK_PERI_PRE 329
199#define HCLK_H264 330 198#define HCLK_H264 330
diff --git a/include/dt-bindings/clock/sprd,sc9860-clk.h b/include/dt-bindings/clock/sprd,sc9860-clk.h
index 4cb202f090c2..f2ab4631df0d 100644
--- a/include/dt-bindings/clock/sprd,sc9860-clk.h
+++ b/include/dt-bindings/clock/sprd,sc9860-clk.h
@@ -229,7 +229,26 @@
229#define CLK_SDIO1_2X_EN 65 229#define CLK_SDIO1_2X_EN 65
230#define CLK_SDIO2_2X_EN 66 230#define CLK_SDIO2_2X_EN 66
231#define CLK_EMMC_2X_EN 67 231#define CLK_EMMC_2X_EN 67
232#define CLK_AON_GATE_NUM (CLK_EMMC_2X_EN + 1) 232#define CLK_ARCH_RTC_EB 68
233#define CLK_KPB_RTC_EB 69
234#define CLK_AON_SYST_RTC_EB 70
235#define CLK_AP_SYST_RTC_EB 71
236#define CLK_AON_TMR_RTC_EB 72
237#define CLK_AP_TMR0_RTC_EB 73
238#define CLK_EIC_RTC_EB 74
239#define CLK_EIC_RTCDV5_EB 75
240#define CLK_AP_WDG_RTC_EB 76
241#define CLK_AP_TMR1_RTC_EB 77
242#define CLK_AP_TMR2_RTC_EB 78
243#define CLK_DCXO_TMR_RTC_EB 79
244#define CLK_BB_CAL_RTC_EB 80
245#define CLK_AVS_BIG_RTC_EB 81
246#define CLK_AVS_LIT_RTC_EB 82
247#define CLK_AVS_GPU0_RTC_EB 83
248#define CLK_AVS_GPU1_RTC_EB 84
249#define CLK_GPU_TS_EB 85
250#define CLK_RTCDV10_EB 86
251#define CLK_AON_GATE_NUM (CLK_RTCDV10_EB + 1)
233 252
234#define CLK_LIT_MCU 0 253#define CLK_LIT_MCU 0
235#define CLK_BIG_MCU 1 254#define CLK_BIG_MCU 1
diff --git a/include/dt-bindings/clock/stm32fx-clock.h b/include/dt-bindings/clock/stm32fx-clock.h
index 49bb3c203e5c..58d8b515be55 100644
--- a/include/dt-bindings/clock/stm32fx-clock.h
+++ b/include/dt-bindings/clock/stm32fx-clock.h
@@ -33,11 +33,12 @@
33#define CLK_SAI2 11 33#define CLK_SAI2 11
34#define CLK_I2SQ_PDIV 12 34#define CLK_I2SQ_PDIV 12
35#define CLK_SAIQ_PDIV 13 35#define CLK_SAIQ_PDIV 13
36
37#define END_PRIMARY_CLK 14
38
39#define CLK_HSI 14 36#define CLK_HSI 14
40#define CLK_SYSCLK 15 37#define CLK_SYSCLK 15
38#define CLK_F469_DSI 16
39
40#define END_PRIMARY_CLK 17
41
41#define CLK_HDMI_CEC 16 42#define CLK_HDMI_CEC 16
42#define CLK_SPDIF 17 43#define CLK_SPDIF 17
43#define CLK_USART1 18 44#define CLK_USART1 18
diff --git a/include/dt-bindings/clock/stm32mp1-clks.h b/include/dt-bindings/clock/stm32mp1-clks.h
new file mode 100644
index 000000000000..86e3ec662ef4
--- /dev/null
+++ b/include/dt-bindings/clock/stm32mp1-clks.h
@@ -0,0 +1,254 @@
1/* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */
2/*
3 * Copyright (C) STMicroelectronics 2018 - All Rights Reserved
4 * Author: Gabriel Fernandez <gabriel.fernandez@st.com> for STMicroelectronics.
5 */
6
7#ifndef _DT_BINDINGS_STM32MP1_CLKS_H_
8#define _DT_BINDINGS_STM32MP1_CLKS_H_
9
10/* OSCILLATOR clocks */
11#define CK_HSE 0
12#define CK_CSI 1
13#define CK_LSI 2
14#define CK_LSE 3
15#define CK_HSI 4
16#define CK_HSE_DIV2 5
17
18/* Bus clocks */
19#define TIM2 6
20#define TIM3 7
21#define TIM4 8
22#define TIM5 9
23#define TIM6 10
24#define TIM7 11
25#define TIM12 12
26#define TIM13 13
27#define TIM14 14
28#define LPTIM1 15
29#define SPI2 16
30#define SPI3 17
31#define USART2 18
32#define USART3 19
33#define UART4 20
34#define UART5 21
35#define UART7 22
36#define UART8 23
37#define I2C1 24
38#define I2C2 25
39#define I2C3 26
40#define I2C5 27
41#define SPDIF 28
42#define CEC 29
43#define DAC12 30
44#define MDIO 31
45#define TIM1 32
46#define TIM8 33
47#define TIM15 34
48#define TIM16 35
49#define TIM17 36
50#define SPI1 37
51#define SPI4 38
52#define SPI5 39
53#define USART6 40
54#define SAI1 41
55#define SAI2 42
56#define SAI3 43
57#define DFSDM 44
58#define FDCAN 45
59#define LPTIM2 46
60#define LPTIM3 47
61#define LPTIM4 48
62#define LPTIM5 49
63#define SAI4 50
64#define SYSCFG 51
65#define VREF 52
66#define TMPSENS 53
67#define PMBCTRL 54
68#define HDP 55
69#define LTDC 56
70#define DSI 57
71#define IWDG2 58
72#define USBPHY 59
73#define STGENRO 60
74#define SPI6 61
75#define I2C4 62
76#define I2C6 63
77#define USART1 64
78#define RTCAPB 65
79#define TZC 66
80#define TZPC 67
81#define IWDG1 68
82#define BSEC 69
83#define STGEN 70
84#define DMA1 71
85#define DMA2 72
86#define DMAMUX 73
87#define ADC12 74
88#define USBO 75
89#define SDMMC3 76
90#define DCMI 77
91#define CRYP2 78
92#define HASH2 79
93#define RNG2 80
94#define CRC2 81
95#define HSEM 82
96#define IPCC 83
97#define GPIOA 84
98#define GPIOB 85
99#define GPIOC 86
100#define GPIOD 87
101#define GPIOE 88
102#define GPIOF 89
103#define GPIOG 90
104#define GPIOH 91
105#define GPIOI 92
106#define GPIOJ 93
107#define GPIOK 94
108#define GPIOZ 95
109#define CRYP1 96
110#define HASH1 97
111#define RNG1 98
112#define BKPSRAM 99
113#define MDMA 100
114#define GPU 101
115#define ETHCK 102
116#define ETHTX 103
117#define ETHRX 104
118#define ETHMAC 105
119#define FMC 106
120#define QSPI 107
121#define SDMMC1 108
122#define SDMMC2 109
123#define CRC1 110
124#define USBH 111
125#define ETHSTP 112
126
127/* Kernel clocks */
128#define SDMMC1_K 118
129#define SDMMC2_K 119
130#define SDMMC3_K 120
131#define FMC_K 121
132#define QSPI_K 122
133#define ETHCK_K 123
134#define RNG1_K 124
135#define RNG2_K 125
136#define GPU_K 126
137#define USBPHY_K 127
138#define STGEN_K 128
139#define SPDIF_K 129
140#define SPI1_K 130
141#define SPI2_K 131
142#define SPI3_K 132
143#define SPI4_K 133
144#define SPI5_K 134
145#define SPI6_K 135
146#define CEC_K 136
147#define I2C1_K 137
148#define I2C2_K 138
149#define I2C3_K 139
150#define I2C4_K 140
151#define I2C5_K 141
152#define I2C6_K 142
153#define LPTIM1_K 143
154#define LPTIM2_K 144
155#define LPTIM3_K 145
156#define LPTIM4_K 146
157#define LPTIM5_K 147
158#define USART1_K 148
159#define USART2_K 149
160#define USART3_K 150
161#define UART4_K 151
162#define UART5_K 152
163#define USART6_K 153
164#define UART7_K 154
165#define UART8_K 155
166#define DFSDM_K 156
167#define FDCAN_K 157
168#define SAI1_K 158
169#define SAI2_K 159
170#define SAI3_K 160
171#define SAI4_K 161
172#define ADC12_K 162
173#define DSI_K 163
174#define DSI_PX 164
175#define ADFSDM_K 165
176#define USBO_K 166
177#define LTDC_PX 167
178#define DAC12_K 168
179#define ETHPTP_K 169
180
181/* PLL */
182#define PLL1 176
183#define PLL2 177
184#define PLL3 178
185#define PLL4 179
186
187/* ODF */
188#define PLL1_P 180
189#define PLL1_Q 181
190#define PLL1_R 182
191#define PLL2_P 183
192#define PLL2_Q 184
193#define PLL2_R 185
194#define PLL3_P 186
195#define PLL3_Q 187
196#define PLL3_R 188
197#define PLL4_P 189
198#define PLL4_Q 190
199#define PLL4_R 191
200
201/* AUX */
202#define RTC 192
203
204/* MCLK */
205#define CK_PER 193
206#define CK_MPU 194
207#define CK_AXI 195
208#define CK_MCU 196
209
210/* Time base */
211#define TIM2_K 197
212#define TIM3_K 198
213#define TIM4_K 199
214#define TIM5_K 200
215#define TIM6_K 201
216#define TIM7_K 202
217#define TIM12_K 203
218#define TIM13_K 204
219#define TIM14_K 205
220#define TIM1_K 206
221#define TIM8_K 207
222#define TIM15_K 208
223#define TIM16_K 209
224#define TIM17_K 210
225
226/* MCO clocks */
227#define CK_MCO1 211
228#define CK_MCO2 212
229
230/* TRACE & DEBUG clocks */
231#define DBG 213
232#define CK_DBG 214
233#define CK_TRACE 215
234
235/* DDR */
236#define DDRC1 220
237#define DDRC1LP 221
238#define DDRC2 222
239#define DDRC2LP 223
240#define DDRPHYC 224
241#define DDRPHYCLP 225
242#define DDRCAPB 226
243#define DDRCAPBLP 227
244#define AXIDCG 228
245#define DDRPHYCAPB 229
246#define DDRPHYCAPBLP 230
247#define DDRPERFM 231
248
249#define STM32MP1_LAST_CLK 232
250
251#define LTDC_K LTDC_PX
252#define ETHMAC_K ETHCK_K
253
254#endif /* _DT_BINDINGS_STM32MP1_CLKS_H_ */
diff --git a/include/dt-bindings/clock/stratix10-clock.h b/include/dt-bindings/clock/stratix10-clock.h
new file mode 100644
index 000000000000..0ac1c90a18bf
--- /dev/null
+++ b/include/dt-bindings/clock/stratix10-clock.h
@@ -0,0 +1,84 @@
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 2017, Intel Corporation
4 */
5
6#ifndef __STRATIX10_CLOCK_H
7#define __STRATIX10_CLOCK_H
8
9/* fixed rate clocks */
10#define STRATIX10_OSC1 0
11#define STRATIX10_CB_INTOSC_HS_DIV2_CLK 1
12#define STRATIX10_CB_INTOSC_LS_CLK 2
13#define STRATIX10_F2S_FREE_CLK 3
14
15/* fixed factor clocks */
16#define STRATIX10_L4_SYS_FREE_CLK 4
17#define STRATIX10_MPU_PERIPH_CLK 5
18#define STRATIX10_MPU_L2RAM_CLK 6
19#define STRATIX10_SDMMC_CIU_CLK 7
20
21/* PLL clocks */
22#define STRATIX10_MAIN_PLL_CLK 8
23#define STRATIX10_PERIPH_PLL_CLK 9
24#define STRATIX10_BOOT_CLK 10
25
26/* Periph clocks */
27#define STRATIX10_MAIN_MPU_BASE_CLK 11
28#define STRATIX10_MAIN_NOC_BASE_CLK 12
29#define STRATIX10_MAIN_EMACA_CLK 13
30#define STRATIX10_MAIN_EMACB_CLK 14
31#define STRATIX10_MAIN_EMAC_PTP_CLK 15
32#define STRATIX10_MAIN_GPIO_DB_CLK 16
33#define STRATIX10_MAIN_SDMMC_CLK 17
34#define STRATIX10_MAIN_S2F_USR0_CLK 18
35#define STRATIX10_MAIN_S2F_USR1_CLK 19
36#define STRATIX10_MAIN_PSI_REF_CLK 20
37
38#define STRATIX10_PERI_MPU_BASE_CLK 21
39#define STRATIX10_PERI_NOC_BASE_CLK 22
40#define STRATIX10_PERI_EMACA_CLK 23
41#define STRATIX10_PERI_EMACB_CLK 24
42#define STRATIX10_PERI_EMAC_PTP_CLK 25
43#define STRATIX10_PERI_GPIO_DB_CLK 26
44#define STRATIX10_PERI_SDMMC_CLK 27
45#define STRATIX10_PERI_S2F_USR0_CLK 28
46#define STRATIX10_PERI_S2F_USR1_CLK 29
47#define STRATIX10_PERI_PSI_REF_CLK 30
48
49#define STRATIX10_MPU_FREE_CLK 31
50#define STRATIX10_NOC_FREE_CLK 32
51#define STRATIX10_S2F_USR0_CLK 33
52#define STRATIX10_NOC_CLK 34
53#define STRATIX10_EMAC_A_FREE_CLK 35
54#define STRATIX10_EMAC_B_FREE_CLK 36
55#define STRATIX10_EMAC_PTP_FREE_CLK 37
56#define STRATIX10_GPIO_DB_FREE_CLK 38
57#define STRATIX10_SDMMC_FREE_CLK 39
58#define STRATIX10_S2F_USER1_FREE_CLK 40
59#define STRATIX10_PSI_REF_FREE_CLK 41
60
61/* Gate clocks */
62#define STRATIX10_MPU_CLK 42
63#define STRATIX10_L4_MAIN_CLK 43
64#define STRATIX10_L4_MP_CLK 44
65#define STRATIX10_L4_SP_CLK 45
66#define STRATIX10_CS_AT_CLK 46
67#define STRATIX10_CS_TRACE_CLK 47
68#define STRATIX10_CS_PDBG_CLK 48
69#define STRATIX10_CS_TIMER_CLK 49
70#define STRATIX10_S2F_USER0_CLK 50
71#define STRATIX10_S2F_USER1_CLK 51
72#define STRATIX10_EMAC0_CLK 52
73#define STRATIX10_EMAC1_CLK 53
74#define STRATIX10_EMAC2_CLK 54
75#define STRATIX10_EMAC_PTP_CLK 55
76#define STRATIX10_GPIO_DB_CLK 56
77#define STRATIX10_SDMMC_CLK 57
78#define STRATIX10_PSI_REF_CLK 58
79#define STRATIX10_USB_CLK 59
80#define STRATIX10_SPI_M_CLK 60
81#define STRATIX10_NAND_CLK 61
82#define STRATIX10_NUM_CLKS 62
83
84#endif /* __STRATIX10_CLOCK_H */
diff --git a/include/dt-bindings/clock/sun50i-h6-ccu.h b/include/dt-bindings/clock/sun50i-h6-ccu.h
new file mode 100644
index 000000000000..a1545cd60e75
--- /dev/null
+++ b/include/dt-bindings/clock/sun50i-h6-ccu.h
@@ -0,0 +1,125 @@
1// SPDX-License-Identifier: (GPL-2.0+ or MIT)
2/*
3 * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
4 */
5
6#ifndef _DT_BINDINGS_CLK_SUN50I_H6_H_
7#define _DT_BINDINGS_CLK_SUN50I_H6_H_
8
9#define CLK_PLL_PERIPH0 3
10
11#define CLK_CPUX 21
12
13#define CLK_APB1 26
14
15#define CLK_DE 29
16#define CLK_BUS_DE 30
17#define CLK_DEINTERLACE 31
18#define CLK_BUS_DEINTERLACE 32
19#define CLK_GPU 33
20#define CLK_BUS_GPU 34
21#define CLK_CE 35
22#define CLK_BUS_CE 36
23#define CLK_VE 37
24#define CLK_BUS_VE 38
25#define CLK_EMCE 39
26#define CLK_BUS_EMCE 40
27#define CLK_VP9 41
28#define CLK_BUS_VP9 42
29#define CLK_BUS_DMA 43
30#define CLK_BUS_MSGBOX 44
31#define CLK_BUS_SPINLOCK 45
32#define CLK_BUS_HSTIMER 46
33#define CLK_AVS 47
34#define CLK_BUS_DBG 48
35#define CLK_BUS_PSI 49
36#define CLK_BUS_PWM 50
37#define CLK_BUS_IOMMU 51
38
39#define CLK_MBUS_DMA 53
40#define CLK_MBUS_VE 54
41#define CLK_MBUS_CE 55
42#define CLK_MBUS_TS 56
43#define CLK_MBUS_NAND 57
44#define CLK_MBUS_CSI 58
45#define CLK_MBUS_DEINTERLACE 59
46
47#define CLK_NAND0 61
48#define CLK_NAND1 62
49#define CLK_BUS_NAND 63
50#define CLK_MMC0 64
51#define CLK_MMC1 65
52#define CLK_MMC2 66
53#define CLK_BUS_MMC0 67
54#define CLK_BUS_MMC1 68
55#define CLK_BUS_MMC2 69
56#define CLK_BUS_UART0 70
57#define CLK_BUS_UART1 71
58#define CLK_BUS_UART2 72
59#define CLK_BUS_UART3 73
60#define CLK_BUS_I2C0 74
61#define CLK_BUS_I2C1 75
62#define CLK_BUS_I2C2 76
63#define CLK_BUS_I2C3 77
64#define CLK_BUS_SCR0 78
65#define CLK_BUS_SCR1 79
66#define CLK_SPI0 80
67#define CLK_SPI1 81
68#define CLK_BUS_SPI0 82
69#define CLK_BUS_SPI1 83
70#define CLK_BUS_EMAC 84
71#define CLK_TS 85
72#define CLK_BUS_TS 86
73#define CLK_IR_TX 87
74#define CLK_BUS_IR_TX 88
75#define CLK_BUS_THS 89
76#define CLK_I2S3 90
77#define CLK_I2S0 91
78#define CLK_I2S1 92
79#define CLK_I2S2 93
80#define CLK_BUS_I2S0 94
81#define CLK_BUS_I2S1 95
82#define CLK_BUS_I2S2 96
83#define CLK_BUS_I2S3 97
84#define CLK_SPDIF 98
85#define CLK_BUS_SPDIF 99
86#define CLK_DMIC 100
87#define CLK_BUS_DMIC 101
88#define CLK_AUDIO_HUB 102
89#define CLK_BUS_AUDIO_HUB 103
90#define CLK_USB_OHCI0 104
91#define CLK_USB_PHY0 105
92#define CLK_USB_PHY1 106
93#define CLK_USB_OHCI3 107
94#define CLK_USB_PHY3 108
95#define CLK_USB_HSIC_12M 109
96#define CLK_USB_HSIC 110
97#define CLK_BUS_OHCI0 111
98#define CLK_BUS_OHCI3 112
99#define CLK_BUS_EHCI0 113
100#define CLK_BUS_XHCI 114
101#define CLK_BUS_EHCI3 115
102#define CLK_BUS_OTG 116
103#define CLK_PCIE_REF_100M 117
104#define CLK_PCIE_REF 118
105#define CLK_PCIE_REF_OUT 119
106#define CLK_PCIE_MAXI 120
107#define CLK_PCIE_AUX 121
108#define CLK_BUS_PCIE 122
109#define CLK_HDMI 123
110#define CLK_HDMI_SLOW 124
111#define CLK_HDMI_CEC 125
112#define CLK_BUS_HDMI 126
113#define CLK_BUS_TCON_TOP 127
114#define CLK_TCON_LCD0 128
115#define CLK_BUS_TCON_LCD0 129
116#define CLK_TCON_TV0 130
117#define CLK_BUS_TCON_TV0 131
118#define CLK_CSI_CCI 132
119#define CLK_CSI_TOP 133
120#define CLK_CSI_MCLK 134
121#define CLK_BUS_CSI 135
122#define CLK_HDCP 136
123#define CLK_BUS_HDCP 137
124
125#endif /* _DT_BINDINGS_CLK_SUN50I_H6_H_ */
diff --git a/include/dt-bindings/clock/sun8i-h3-ccu.h b/include/dt-bindings/clock/sun8i-h3-ccu.h
index e139fe5c62ec..c5f7e9a70968 100644
--- a/include/dt-bindings/clock/sun8i-h3-ccu.h
+++ b/include/dt-bindings/clock/sun8i-h3-ccu.h
@@ -43,6 +43,8 @@
43#ifndef _DT_BINDINGS_CLK_SUN8I_H3_H_ 43#ifndef _DT_BINDINGS_CLK_SUN8I_H3_H_
44#define _DT_BINDINGS_CLK_SUN8I_H3_H_ 44#define _DT_BINDINGS_CLK_SUN8I_H3_H_
45 45
46#define CLK_PLL_VIDEO 6
47
46#define CLK_PLL_PERIPH0 9 48#define CLK_PLL_PERIPH0 9
47 49
48#define CLK_CPUX 14 50#define CLK_CPUX 14
diff --git a/include/dt-bindings/clock/tegra210-car.h b/include/dt-bindings/clock/tegra210-car.h
index 6422314e46eb..6b77e721f6b1 100644
--- a/include/dt-bindings/clock/tegra210-car.h
+++ b/include/dt-bindings/clock/tegra210-car.h
@@ -95,7 +95,7 @@
95#define TEGRA210_CLK_CSITE 73 95#define TEGRA210_CLK_CSITE 73
96/* 74 */ 96/* 74 */
97/* 75 */ 97/* 75 */
98/* 76 */ 98#define TEGRA210_CLK_LA 76
99/* 77 */ 99/* 77 */
100#define TEGRA210_CLK_SOC_THERM 78 100#define TEGRA210_CLK_SOC_THERM 78
101#define TEGRA210_CLK_DTV 79 101#define TEGRA210_CLK_DTV 79
diff --git a/include/dt-bindings/reset/sun50i-h6-ccu.h b/include/dt-bindings/reset/sun50i-h6-ccu.h
new file mode 100644
index 000000000000..81106f455097
--- /dev/null
+++ b/include/dt-bindings/reset/sun50i-h6-ccu.h
@@ -0,0 +1,73 @@
1// SPDX-License-Identifier: (GPL-2.0+ or MIT)
2/*
3 * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
4 */
5
6#ifndef _DT_BINDINGS_RESET_SUN50I_H6_H_
7#define _DT_BINDINGS_RESET_SUN50I_H6_H_
8
9#define RST_MBUS 0
10#define RST_BUS_DE 1
11#define RST_BUS_DEINTERLACE 2
12#define RST_BUS_GPU 3
13#define RST_BUS_CE 4
14#define RST_BUS_VE 5
15#define RST_BUS_EMCE 6
16#define RST_BUS_VP9 7
17#define RST_BUS_DMA 8
18#define RST_BUS_MSGBOX 9
19#define RST_BUS_SPINLOCK 10
20#define RST_BUS_HSTIMER 11
21#define RST_BUS_DBG 12
22#define RST_BUS_PSI 13
23#define RST_BUS_PWM 14
24#define RST_BUS_IOMMU 15
25#define RST_BUS_DRAM 16
26#define RST_BUS_NAND 17
27#define RST_BUS_MMC0 18
28#define RST_BUS_MMC1 19
29#define RST_BUS_MMC2 20
30#define RST_BUS_UART0 21
31#define RST_BUS_UART1 22
32#define RST_BUS_UART2 23
33#define RST_BUS_UART3 24
34#define RST_BUS_I2C0 25
35#define RST_BUS_I2C1 26
36#define RST_BUS_I2C2 27
37#define RST_BUS_I2C3 28
38#define RST_BUS_SCR0 29
39#define RST_BUS_SCR1 30
40#define RST_BUS_SPI0 31
41#define RST_BUS_SPI1 32
42#define RST_BUS_EMAC 33
43#define RST_BUS_TS 34
44#define RST_BUS_IR_TX 35
45#define RST_BUS_THS 36
46#define RST_BUS_I2S0 37
47#define RST_BUS_I2S1 38
48#define RST_BUS_I2S2 39
49#define RST_BUS_I2S3 40
50#define RST_BUS_SPDIF 41
51#define RST_BUS_DMIC 42
52#define RST_BUS_AUDIO_HUB 43
53#define RST_USB_PHY0 44
54#define RST_USB_PHY1 45
55#define RST_USB_PHY3 46
56#define RST_USB_HSIC 47
57#define RST_BUS_OHCI0 48
58#define RST_BUS_OHCI3 49
59#define RST_BUS_EHCI0 50
60#define RST_BUS_XHCI 51
61#define RST_BUS_EHCI3 52
62#define RST_BUS_OTG 53
63#define RST_BUS_PCIE 54
64#define RST_PCIE_POWERUP 55
65#define RST_BUS_HDMI 56
66#define RST_BUS_HDMI_SUB 57
67#define RST_BUS_TCON_TOP 58
68#define RST_BUS_TCON_LCD0 59
69#define RST_BUS_TCON_TV0 60
70#define RST_BUS_CSI 61
71#define RST_BUS_HDCP 62
72
73#endif /* _DT_BINDINGS_RESET_SUN50I_H6_H_ */
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index f711be6e8c44..210a890008f9 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -399,6 +399,7 @@ struct clk_divider {
399 spinlock_t *lock; 399 spinlock_t *lock;
400}; 400};
401 401
402#define clk_div_mask(width) ((1 << (width)) - 1)
402#define to_clk_divider(_hw) container_of(_hw, struct clk_divider, hw) 403#define to_clk_divider(_hw) container_of(_hw, struct clk_divider, hw)
403 404
404#define CLK_DIVIDER_ONE_BASED BIT(0) 405#define CLK_DIVIDER_ONE_BASED BIT(0)
@@ -419,6 +420,10 @@ long divider_round_rate_parent(struct clk_hw *hw, struct clk_hw *parent,
419 unsigned long rate, unsigned long *prate, 420 unsigned long rate, unsigned long *prate,
420 const struct clk_div_table *table, 421 const struct clk_div_table *table,
421 u8 width, unsigned long flags); 422 u8 width, unsigned long flags);
423long divider_ro_round_rate_parent(struct clk_hw *hw, struct clk_hw *parent,
424 unsigned long rate, unsigned long *prate,
425 const struct clk_div_table *table, u8 width,
426 unsigned long flags, unsigned int val);
422int divider_get_val(unsigned long rate, unsigned long parent_rate, 427int divider_get_val(unsigned long rate, unsigned long parent_rate,
423 const struct clk_div_table *table, u8 width, 428 const struct clk_div_table *table, u8 width,
424 unsigned long flags); 429 unsigned long flags);
@@ -449,8 +454,9 @@ void clk_hw_unregister_divider(struct clk_hw *hw);
449 * 454 *
450 * @hw: handle between common and hardware-specific interfaces 455 * @hw: handle between common and hardware-specific interfaces
451 * @reg: register controlling multiplexer 456 * @reg: register controlling multiplexer
457 * @table: array of register values corresponding to the parent index
452 * @shift: shift to multiplexer bit field 458 * @shift: shift to multiplexer bit field
453 * @width: width of mutliplexer bit field 459 * @mask: mask of mutliplexer bit field
454 * @flags: hardware-specific flags 460 * @flags: hardware-specific flags
455 * @lock: register lock 461 * @lock: register lock
456 * 462 *
@@ -510,6 +516,10 @@ struct clk_hw *clk_hw_register_mux_table(struct device *dev, const char *name,
510 void __iomem *reg, u8 shift, u32 mask, 516 void __iomem *reg, u8 shift, u32 mask,
511 u8 clk_mux_flags, u32 *table, spinlock_t *lock); 517 u8 clk_mux_flags, u32 *table, spinlock_t *lock);
512 518
519int clk_mux_val_to_index(struct clk_hw *hw, u32 *table, unsigned int flags,
520 unsigned int val);
521unsigned int clk_mux_index_to_val(u32 *table, unsigned int flags, u8 index);
522
513void clk_unregister_mux(struct clk *clk); 523void clk_unregister_mux(struct clk *clk);
514void clk_hw_unregister_mux(struct clk_hw *hw); 524void clk_hw_unregister_mux(struct clk_hw *hw);
515 525
@@ -774,6 +784,17 @@ static inline long divider_round_rate(struct clk_hw *hw, unsigned long rate,
774 rate, prate, table, width, flags); 784 rate, prate, table, width, flags);
775} 785}
776 786
787static inline long divider_ro_round_rate(struct clk_hw *hw, unsigned long rate,
788 unsigned long *prate,
789 const struct clk_div_table *table,
790 u8 width, unsigned long flags,
791 unsigned int val)
792{
793 return divider_ro_round_rate_parent(hw, clk_hw_get_parent(hw),
794 rate, prate, table, width, flags,
795 val);
796}
797
777/* 798/*
778 * FIXME clock api without lock protection 799 * FIXME clock api without lock protection
779 */ 800 */
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 4c4ef9f34db3..0dbd0885b2c2 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -209,7 +209,7 @@ static inline int clk_prepare(struct clk *clk)
209 return 0; 209 return 0;
210} 210}
211 211
212static inline int clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks) 212static inline int __must_check clk_bulk_prepare(int num_clks, struct clk_bulk_data *clks)
213{ 213{
214 might_sleep(); 214 might_sleep();
215 return 0; 215 return 0;
@@ -603,8 +603,8 @@ static inline struct clk *clk_get(struct device *dev, const char *id)
603 return NULL; 603 return NULL;
604} 604}
605 605
606static inline int clk_bulk_get(struct device *dev, int num_clks, 606static inline int __must_check clk_bulk_get(struct device *dev, int num_clks,
607 struct clk_bulk_data *clks) 607 struct clk_bulk_data *clks)
608{ 608{
609 return 0; 609 return 0;
610} 610}
@@ -614,8 +614,8 @@ static inline struct clk *devm_clk_get(struct device *dev, const char *id)
614 return NULL; 614 return NULL;
615} 615}
616 616
617static inline int devm_clk_bulk_get(struct device *dev, int num_clks, 617static inline int __must_check devm_clk_bulk_get(struct device *dev, int num_clks,
618 struct clk_bulk_data *clks) 618 struct clk_bulk_data *clks)
619{ 619{
620 return 0; 620 return 0;
621} 621}
@@ -645,7 +645,7 @@ static inline int clk_enable(struct clk *clk)
645 return 0; 645 return 0;
646} 646}
647 647
648static inline int clk_bulk_enable(int num_clks, struct clk_bulk_data *clks) 648static inline int __must_check clk_bulk_enable(int num_clks, struct clk_bulk_data *clks)
649{ 649{
650 return 0; 650 return 0;
651} 651}
@@ -719,8 +719,8 @@ static inline void clk_disable_unprepare(struct clk *clk)
719 clk_unprepare(clk); 719 clk_unprepare(clk);
720} 720}
721 721
722static inline int clk_bulk_prepare_enable(int num_clks, 722static inline int __must_check clk_bulk_prepare_enable(int num_clks,
723 struct clk_bulk_data *clks) 723 struct clk_bulk_data *clks)
724{ 724{
725 int ret; 725 int ret;
726 726
diff --git a/include/linux/clk/tegra.h b/include/linux/clk/tegra.h
index d23c9cf26993..afb9edfa5d58 100644
--- a/include/linux/clk/tegra.h
+++ b/include/linux/clk/tegra.h
@@ -128,5 +128,6 @@ extern void tegra210_sata_pll_hw_sequence_start(void);
128extern void tegra210_set_sata_pll_seq_sw(bool state); 128extern void tegra210_set_sata_pll_seq_sw(bool state);
129extern void tegra210_put_utmipll_in_iddq(void); 129extern void tegra210_put_utmipll_in_iddq(void);
130extern void tegra210_put_utmipll_out_iddq(void); 130extern void tegra210_put_utmipll_out_iddq(void);
131extern int tegra210_clk_handle_mbist_war(unsigned int id);
131 132
132#endif /* __LINUX_CLK_TEGRA_H_ */ 133#endif /* __LINUX_CLK_TEGRA_H_ */
diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h
index 7e3bceee3489..a8faa38b1ed6 100644
--- a/include/linux/clk/ti.h
+++ b/include/linux/clk/ti.h
@@ -212,6 +212,7 @@ enum {
212 * struct ti_clk_ll_ops - low-level ops for clocks 212 * struct ti_clk_ll_ops - low-level ops for clocks
213 * @clk_readl: pointer to register read function 213 * @clk_readl: pointer to register read function
214 * @clk_writel: pointer to register write function 214 * @clk_writel: pointer to register write function
215 * @clk_rmw: pointer to register read-modify-write function
215 * @clkdm_clk_enable: pointer to clockdomain enable function 216 * @clkdm_clk_enable: pointer to clockdomain enable function
216 * @clkdm_clk_disable: pointer to clockdomain disable function 217 * @clkdm_clk_disable: pointer to clockdomain disable function
217 * @clkdm_lookup: pointer to clockdomain lookup function 218 * @clkdm_lookup: pointer to clockdomain lookup function
@@ -227,6 +228,7 @@ enum {
227struct ti_clk_ll_ops { 228struct ti_clk_ll_ops {
228 u32 (*clk_readl)(const struct clk_omap_reg *reg); 229 u32 (*clk_readl)(const struct clk_omap_reg *reg);
229 void (*clk_writel)(u32 val, const struct clk_omap_reg *reg); 230 void (*clk_writel)(u32 val, const struct clk_omap_reg *reg);
231 void (*clk_rmw)(u32 val, u32 mask, const struct clk_omap_reg *reg);
230 int (*clkdm_clk_enable)(struct clockdomain *clkdm, struct clk *clk); 232 int (*clkdm_clk_enable)(struct clockdomain *clkdm, struct clk *clk);
231 int (*clkdm_clk_disable)(struct clockdomain *clkdm, 233 int (*clkdm_clk_disable)(struct clockdomain *clkdm,
232 struct clk *clk); 234 struct clk *clk);
diff --git a/include/linux/platform_data/clk-da8xx-cfgchip.h b/include/linux/platform_data/clk-da8xx-cfgchip.h
new file mode 100644
index 000000000000..de0f77d38669
--- /dev/null
+++ b/include/linux/platform_data/clk-da8xx-cfgchip.h
@@ -0,0 +1,21 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * clk-da8xx-cfgchip - TI DaVinci DA8xx CFGCHIP clock driver
4 *
5 * Copyright (C) 2018 David Lechner <david@lechnology.com>
6 */
7
8#ifndef __LINUX_PLATFORM_DATA_CLK_DA8XX_CFGCHIP_H__
9#define __LINUX_PLATFORM_DATA_CLK_DA8XX_CFGCHIP_H__
10
11#include <linux/regmap.h>
12
13/**
14 * da8xx_cfgchip_clk_platform_data
15 * @cfgchip: CFGCHIP syscon regmap
16 */
17struct da8xx_cfgchip_clk_platform_data {
18 struct regmap *cfgchip;
19};
20
21#endif /* __LINUX_PLATFORM_DATA_CLK_DA8XX_CFGCHIP_H__ */
diff --git a/include/linux/platform_data/clk-davinci-pll.h b/include/linux/platform_data/clk-davinci-pll.h
new file mode 100644
index 000000000000..e55dab1d578b
--- /dev/null
+++ b/include/linux/platform_data/clk-davinci-pll.h
@@ -0,0 +1,21 @@
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * PLL clock driver for TI Davinci SoCs
4 *
5 * Copyright (C) 2018 David Lechner <david@lechnology.com>
6 */
7
8#ifndef __LINUX_PLATFORM_DATA_CLK_DAVINCI_PLL_H__
9#define __LINUX_PLATFORM_DATA_CLK_DAVINCI_PLL_H__
10
11#include <linux/regmap.h>
12
13/**
14 * davinci_pll_platform_data
15 * @cfgchip: CFGCHIP syscon regmap
16 */
17struct davinci_pll_platform_data {
18 struct regmap *cfgchip;
19};
20
21#endif /* __LINUX_PLATFORM_DATA_CLK_DAVINCI_PLL_H__ */