Skip to content

Commit 8fdbdc7

Browse files
superna9999jbrun3t
authored andcommitted
dt-bindings: clk: axg-clkc: expose all clock ids
Due to a policy change in clock ID bindings handling, expose all the "private" clock IDs to the public clock dt-bindings to move out of the previous maintenance scheme. This refers to a discussion at [1] & [2] with Krzysztof about the issue with the current maintenance. It was decided to move every axg-clkc ID to the public clock dt-bindings headers to be merged in a single tree so we can safely add new clocks without having merge issues. [1] https://lore.kernel.org/all/[email protected]/ [2] https://lore.kernel.org/all/[email protected]/ Acked-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/20230607-topic-amlogic-upstream-clkid-public-migration-v2-8-38172d17c27a@linaro.org Signed-off-by: Jerome Brunet <[email protected]>
1 parent 9ce8555 commit 8fdbdc7

File tree

2 files changed

+48
-58
lines changed

2 files changed

+48
-58
lines changed

drivers/clk/meson/axg.h

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -102,64 +102,6 @@
102102
#define HHI_DPLL_TOP_I 0x318
103103
#define HHI_DPLL_TOP2_I 0x31C
104104

105-
/*
106-
* CLKID index values
107-
*
108-
* These indices are entirely contrived and do not map onto the hardware.
109-
* It has now been decided to expose everything by default in the DT header:
110-
* include/dt-bindings/clock/axg-clkc.h. Only the clocks ids we don't want
111-
* to expose, such as the internal muxes and dividers of composite clocks,
112-
* will remain defined here.
113-
*/
114-
#define CLKID_MPEG_SEL 8
115-
#define CLKID_MPEG_DIV 9
116-
#define CLKID_SD_EMMC_B_CLK0_SEL 61
117-
#define CLKID_SD_EMMC_B_CLK0_DIV 62
118-
#define CLKID_SD_EMMC_C_CLK0_SEL 63
119-
#define CLKID_SD_EMMC_C_CLK0_DIV 64
120-
#define CLKID_MPLL0_DIV 65
121-
#define CLKID_MPLL1_DIV 66
122-
#define CLKID_MPLL2_DIV 67
123-
#define CLKID_MPLL3_DIV 68
124-
#define CLKID_MPLL_PREDIV 70
125-
#define CLKID_FCLK_DIV2_DIV 71
126-
#define CLKID_FCLK_DIV3_DIV 72
127-
#define CLKID_FCLK_DIV4_DIV 73
128-
#define CLKID_FCLK_DIV5_DIV 74
129-
#define CLKID_FCLK_DIV7_DIV 75
130-
#define CLKID_PCIE_PLL 76
131-
#define CLKID_PCIE_MUX 77
132-
#define CLKID_PCIE_REF 78
133-
#define CLKID_GEN_CLK_SEL 82
134-
#define CLKID_GEN_CLK_DIV 83
135-
#define CLKID_SYS_PLL_DCO 85
136-
#define CLKID_FIXED_PLL_DCO 86
137-
#define CLKID_GP0_PLL_DCO 87
138-
#define CLKID_HIFI_PLL_DCO 88
139-
#define CLKID_PCIE_PLL_DCO 89
140-
#define CLKID_PCIE_PLL_OD 90
141-
#define CLKID_VPU_0_DIV 91
142-
#define CLKID_VPU_1_DIV 94
143-
#define CLKID_VAPB_0_DIV 98
144-
#define CLKID_VAPB_1_DIV 101
145-
#define CLKID_VCLK_SEL 108
146-
#define CLKID_VCLK2_SEL 109
147-
#define CLKID_VCLK_INPUT 110
148-
#define CLKID_VCLK2_INPUT 111
149-
#define CLKID_VCLK_DIV 112
150-
#define CLKID_VCLK2_DIV 113
151-
#define CLKID_VCLK_DIV2_EN 114
152-
#define CLKID_VCLK_DIV4_EN 115
153-
#define CLKID_VCLK_DIV6_EN 116
154-
#define CLKID_VCLK_DIV12_EN 117
155-
#define CLKID_VCLK2_DIV2_EN 118
156-
#define CLKID_VCLK2_DIV4_EN 119
157-
#define CLKID_VCLK2_DIV6_EN 120
158-
#define CLKID_VCLK2_DIV12_EN 121
159-
#define CLKID_CTS_ENCL_SEL 132
160-
#define CLKID_VDIN_MEAS_SEL 134
161-
#define CLKID_VDIN_MEAS_DIV 135
162-
163105
/* include the CLKIDs that have been made part of the DT binding */
164106
#include <dt-bindings/clock/axg-clkc.h>
165107

include/dt-bindings/clock/axg-clkc.h

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#define CLKID_FCLK_DIV5 5
1717
#define CLKID_FCLK_DIV7 6
1818
#define CLKID_GP0_PLL 7
19+
#define CLKID_MPEG_SEL 8
20+
#define CLKID_MPEG_DIV 9
1921
#define CLKID_CLK81 10
2022
#define CLKID_MPLL0 11
2123
#define CLKID_MPLL1 12
@@ -67,23 +69,66 @@
6769
#define CLKID_AO_I2C 58
6870
#define CLKID_SD_EMMC_B_CLK0 59
6971
#define CLKID_SD_EMMC_C_CLK0 60
72+
#define CLKID_SD_EMMC_B_CLK0_SEL 61
73+
#define CLKID_SD_EMMC_B_CLK0_DIV 62
74+
#define CLKID_SD_EMMC_C_CLK0_SEL 63
75+
#define CLKID_SD_EMMC_C_CLK0_DIV 64
76+
#define CLKID_MPLL0_DIV 65
77+
#define CLKID_MPLL1_DIV 66
78+
#define CLKID_MPLL2_DIV 67
79+
#define CLKID_MPLL3_DIV 68
7080
#define CLKID_HIFI_PLL 69
81+
#define CLKID_MPLL_PREDIV 70
82+
#define CLKID_FCLK_DIV2_DIV 71
83+
#define CLKID_FCLK_DIV3_DIV 72
84+
#define CLKID_FCLK_DIV4_DIV 73
85+
#define CLKID_FCLK_DIV5_DIV 74
86+
#define CLKID_FCLK_DIV7_DIV 75
87+
#define CLKID_PCIE_PLL 76
88+
#define CLKID_PCIE_MUX 77
89+
#define CLKID_PCIE_REF 78
7190
#define CLKID_PCIE_CML_EN0 79
7291
#define CLKID_PCIE_CML_EN1 80
92+
#define CLKID_GEN_CLK_SEL 82
93+
#define CLKID_GEN_CLK_DIV 83
7394
#define CLKID_GEN_CLK 84
95+
#define CLKID_SYS_PLL_DCO 85
96+
#define CLKID_FIXED_PLL_DCO 86
97+
#define CLKID_GP0_PLL_DCO 87
98+
#define CLKID_HIFI_PLL_DCO 88
99+
#define CLKID_PCIE_PLL_DCO 89
100+
#define CLKID_PCIE_PLL_OD 90
101+
#define CLKID_VPU_0_DIV 91
74102
#define CLKID_VPU_0_SEL 92
75103
#define CLKID_VPU_0 93
104+
#define CLKID_VPU_1_DIV 94
76105
#define CLKID_VPU_1_SEL 95
77106
#define CLKID_VPU_1 96
78107
#define CLKID_VPU 97
108+
#define CLKID_VAPB_0_DIV 98
79109
#define CLKID_VAPB_0_SEL 99
80110
#define CLKID_VAPB_0 100
111+
#define CLKID_VAPB_1_DIV 101
81112
#define CLKID_VAPB_1_SEL 102
82113
#define CLKID_VAPB_1 103
83114
#define CLKID_VAPB_SEL 104
84115
#define CLKID_VAPB 105
85116
#define CLKID_VCLK 106
86117
#define CLKID_VCLK2 107
118+
#define CLKID_VCLK_SEL 108
119+
#define CLKID_VCLK2_SEL 109
120+
#define CLKID_VCLK_INPUT 110
121+
#define CLKID_VCLK2_INPUT 111
122+
#define CLKID_VCLK_DIV 112
123+
#define CLKID_VCLK2_DIV 113
124+
#define CLKID_VCLK_DIV2_EN 114
125+
#define CLKID_VCLK_DIV4_EN 115
126+
#define CLKID_VCLK_DIV6_EN 116
127+
#define CLKID_VCLK_DIV12_EN 117
128+
#define CLKID_VCLK2_DIV2_EN 118
129+
#define CLKID_VCLK2_DIV4_EN 119
130+
#define CLKID_VCLK2_DIV6_EN 120
131+
#define CLKID_VCLK2_DIV12_EN 121
87132
#define CLKID_VCLK_DIV1 122
88133
#define CLKID_VCLK_DIV2 123
89134
#define CLKID_VCLK_DIV4 124
@@ -94,7 +139,10 @@
94139
#define CLKID_VCLK2_DIV4 129
95140
#define CLKID_VCLK2_DIV6 130
96141
#define CLKID_VCLK2_DIV12 131
142+
#define CLKID_CTS_ENCL_SEL 132
97143
#define CLKID_CTS_ENCL 133
144+
#define CLKID_VDIN_MEAS_SEL 134
145+
#define CLKID_VDIN_MEAS_DIV 135
98146
#define CLKID_VDIN_MEAS 136
99147

100148
#endif /* __AXG_CLKC_H */

0 commit comments

Comments
 (0)