|
5 | 5 | */
|
6 | 6 |
|
7 | 7 | #include <dt-bindings/clock/mediatek,mt8188-clk.h>
|
| 8 | +#include <dt-bindings/reset/mt8188-resets.h> |
8 | 9 | #include <linux/clk-provider.h>
|
9 | 10 | #include <linux/platform_device.h>
|
10 | 11 |
|
@@ -176,9 +177,32 @@ static const struct mtk_gate infra_ao_clks[] = {
|
176 | 177 | "infra_ao_aes_msdcfde_0p", "top_aes_msdcfde", 18),
|
177 | 178 | };
|
178 | 179 |
|
| 180 | +static u16 infra_ao_rst_ofs[] = { |
| 181 | + INFRA_RST0_SET_OFFSET, |
| 182 | + INFRA_RST1_SET_OFFSET, |
| 183 | + INFRA_RST2_SET_OFFSET, |
| 184 | + INFRA_RST3_SET_OFFSET, |
| 185 | + INFRA_RST4_SET_OFFSET, |
| 186 | +}; |
| 187 | + |
| 188 | +static u16 infra_ao_idx_map[] = { |
| 189 | + [MT8188_INFRA_RST1_THERMAL_MCU_RST] = 1 * RST_NR_PER_BANK + 2, |
| 190 | + [MT8188_INFRA_RST1_THERMAL_CTRL_RST] = 1 * RST_NR_PER_BANK + 4, |
| 191 | + [MT8188_INFRA_RST3_PTP_CTRL_RST] = 3 * RST_NR_PER_BANK + 5, |
| 192 | +}; |
| 193 | + |
| 194 | +static const struct mtk_clk_rst_desc infra_ao_rst_desc = { |
| 195 | + .version = MTK_RST_SET_CLR, |
| 196 | + .rst_bank_ofs = infra_ao_rst_ofs, |
| 197 | + .rst_bank_nr = ARRAY_SIZE(infra_ao_rst_ofs), |
| 198 | + .rst_idx_map = infra_ao_idx_map, |
| 199 | + .rst_idx_map_nr = ARRAY_SIZE(infra_ao_idx_map), |
| 200 | +}; |
| 201 | + |
179 | 202 | static const struct mtk_clk_desc infra_ao_desc = {
|
180 | 203 | .clks = infra_ao_clks,
|
181 | 204 | .num_clks = ARRAY_SIZE(infra_ao_clks),
|
| 205 | + .rst_desc = &infra_ao_rst_desc, |
182 | 206 | };
|
183 | 207 |
|
184 | 208 | static const struct of_device_id of_match_clk_mt8188_infra_ao[] = {
|
|
0 commit comments