|
6 | 6 | #include <linux/clk-provider.h>
|
7 | 7 | #include <linux/platform_device.h>
|
8 | 8 | #include <dt-bindings/clock/mt8186-clk.h>
|
| 9 | +#include <dt-bindings/reset/mt8186-resets.h> |
9 | 10 |
|
10 | 11 | #include "clk-gate.h"
|
11 | 12 | #include "clk-mtk.h"
|
@@ -191,9 +192,31 @@ static const struct mtk_gate infra_ao_clks[] = {
|
191 | 192 | GATE_INFRA_AO3(CLK_INFRA_AO_FLASHIF_66M, "infra_ao_flashif_66m", "top_axi", 29),
|
192 | 193 | };
|
193 | 194 |
|
| 195 | +static u16 infra_ao_rst_ofs[] = { |
| 196 | + INFRA_RST0_SET_OFFSET, |
| 197 | + INFRA_RST1_SET_OFFSET, |
| 198 | + INFRA_RST2_SET_OFFSET, |
| 199 | + INFRA_RST3_SET_OFFSET, |
| 200 | + INFRA_RST4_SET_OFFSET, |
| 201 | +}; |
| 202 | + |
| 203 | +static u16 infra_ao_idx_map[] = { |
| 204 | + [MT8186_INFRA_THERMAL_CTRL_RST] = 0 * RST_NR_PER_BANK + 0, |
| 205 | + [MT8186_INFRA_PTP_CTRL_RST] = 1 * RST_NR_PER_BANK + 0, |
| 206 | +}; |
| 207 | + |
| 208 | +static struct mtk_clk_rst_desc infra_ao_rst_desc = { |
| 209 | + .version = MTK_RST_SET_CLR, |
| 210 | + .rst_bank_ofs = infra_ao_rst_ofs, |
| 211 | + .rst_bank_nr = ARRAY_SIZE(infra_ao_rst_ofs), |
| 212 | + .rst_idx_map = infra_ao_idx_map, |
| 213 | + .rst_idx_map_nr = ARRAY_SIZE(infra_ao_idx_map), |
| 214 | +}; |
| 215 | + |
194 | 216 | static const struct mtk_clk_desc infra_ao_desc = {
|
195 | 217 | .clks = infra_ao_clks,
|
196 | 218 | .num_clks = ARRAY_SIZE(infra_ao_clks),
|
| 219 | + .rst_desc = &infra_ao_rst_desc, |
197 | 220 | };
|
198 | 221 |
|
199 | 222 | static const struct of_device_id of_match_clk_mt8186_infra_ao[] = {
|
|
0 commit comments