* [PATCH v2 0/2] Add infra_ao reset support for MT8188 Soc @ 2023-05-05 13:13 Runyang Chen 2023-05-05 13:13 ` [PATCH v2 1/2] dt-bindings: reset: mt8188: add thermal reset control bit Runyang Chen 2023-05-05 13:13 ` [PATCH v2 2/2] clk: mediatek: reset: add infra_ao reset support for MT8188 Runyang Chen 0 siblings, 2 replies; 7+ messages in thread From: Runyang Chen @ 2023-05-05 13:13 UTC (permalink / raw) To: Michael Turquette, Stephen Boyd, Matthias Brugger, AngeloGioacchino Del Regno, Philipp Zabel, Rob Herring, Krzysztof Kozlowski Cc: linux-clk, linux-kernel, linux-arm-kernel, linux-mediatek, devicetree, Runyang Chen Based on tag: next-20230504, linux-next/master v2: 1. Modify SoB to match author name. v1: 1. Add thermal reset bit for MT8188. 2. Add infra_ao reset support for MT8188. Runyang Chen (2): dt-bindings: reset: mt8188: add thermal reset control bit clk: mediatek: reset: add infra_ao reset support for MT8188 drivers/clk/mediatek/clk-mt8188-infra_ao.c | 24 ++++++++++++++++++++++ include/dt-bindings/reset/mt8188-resets.h | 5 +++++ 2 files changed, 29 insertions(+) base-commit: 145e5cddfe8b4bf607510b2dcf630d95f4db420f -- 2.18.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/2] dt-bindings: reset: mt8188: add thermal reset control bit 2023-05-05 13:13 [PATCH v2 0/2] Add infra_ao reset support for MT8188 Soc Runyang Chen @ 2023-05-05 13:13 ` Runyang Chen 2023-05-05 13:24 ` Krzysztof Kozlowski 2023-05-05 13:13 ` [PATCH v2 2/2] clk: mediatek: reset: add infra_ao reset support for MT8188 Runyang Chen 1 sibling, 1 reply; 7+ messages in thread From: Runyang Chen @ 2023-05-05 13:13 UTC (permalink / raw) To: Michael Turquette, Stephen Boyd, Matthias Brugger, AngeloGioacchino Del Regno, Philipp Zabel, Rob Herring, Krzysztof Kozlowski Cc: linux-clk, linux-kernel, linux-arm-kernel, linux-mediatek, devicetree, Runyang Chen To support reset of infra_ao, add the index of infra_ao reset of thermal for MT8188. Signed-off-by: Runyang Chen <runyang.chen@mediatek.com> --- include/dt-bindings/reset/mt8188-resets.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/dt-bindings/reset/mt8188-resets.h b/include/dt-bindings/reset/mt8188-resets.h index 377cdfda82a9..ba9a5e9b8899 100644 --- a/include/dt-bindings/reset/mt8188-resets.h +++ b/include/dt-bindings/reset/mt8188-resets.h @@ -33,4 +33,9 @@ #define MT8188_TOPRGU_SW_RST_NUM 24 +/* INFRA resets */ +#define MT8188_INFRA_RST1_THERMAL_MCU_RST 0 +#define MT8188_INFRA_RST1_THERMAL_CTRL_RST 1 +#define MT8188_INFRA_RST3_PTP_CTRL_RST 2 + #endif /* _DT_BINDINGS_RESET_CONTROLLER_MT8188 */ -- 2.18.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: reset: mt8188: add thermal reset control bit 2023-05-05 13:13 ` [PATCH v2 1/2] dt-bindings: reset: mt8188: add thermal reset control bit Runyang Chen @ 2023-05-05 13:24 ` Krzysztof Kozlowski 0 siblings, 0 replies; 7+ messages in thread From: Krzysztof Kozlowski @ 2023-05-05 13:24 UTC (permalink / raw) To: Runyang Chen, Michael Turquette, Stephen Boyd, Matthias Brugger, AngeloGioacchino Del Regno, Philipp Zabel, Rob Herring, Krzysztof Kozlowski Cc: linux-clk, linux-kernel, linux-arm-kernel, linux-mediatek, devicetree On 05/05/2023 15:13, Runyang Chen wrote: > To support reset of infra_ao, add the index of infra_ao reset of thermal > for MT8188. > > Signed-off-by: Runyang Chen <runyang.chen@mediatek.com> > --- > include/dt-bindings/reset/mt8188-resets.h | 5 +++++ > 1 file changed, 5 insertions(+) Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] clk: mediatek: reset: add infra_ao reset support for MT8188 2023-05-05 13:13 [PATCH v2 0/2] Add infra_ao reset support for MT8188 Soc Runyang Chen 2023-05-05 13:13 ` [PATCH v2 1/2] dt-bindings: reset: mt8188: add thermal reset control bit Runyang Chen @ 2023-05-05 13:13 ` Runyang Chen 2023-05-10 21:20 ` Stephen Boyd 1 sibling, 1 reply; 7+ messages in thread From: Runyang Chen @ 2023-05-05 13:13 UTC (permalink / raw) To: Michael Turquette, Stephen Boyd, Matthias Brugger, AngeloGioacchino Del Regno, Philipp Zabel, Rob Herring, Krzysztof Kozlowski Cc: linux-clk, linux-kernel, linux-arm-kernel, linux-mediatek, devicetree, Runyang Chen The infra_ao reset is needed for MT8188. - Add mtk_clk_rst_desc for MT8188. - Add register reset controller function for MT8188 infra_ao. - Add infra_ao_idx_map for MT8188. Signed-off-by: Runyang Chen <runyang.chen@mediatek.com> --- drivers/clk/mediatek/clk-mt8188-infra_ao.c | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/clk/mediatek/clk-mt8188-infra_ao.c b/drivers/clk/mediatek/clk-mt8188-infra_ao.c index 91c35db40b4e..1d4b27ba06be 100644 --- a/drivers/clk/mediatek/clk-mt8188-infra_ao.c +++ b/drivers/clk/mediatek/clk-mt8188-infra_ao.c @@ -5,6 +5,7 @@ */ #include <dt-bindings/clock/mediatek,mt8188-clk.h> +#include <dt-bindings/reset/mt8188-resets.h> #include <linux/clk-provider.h> #include <linux/platform_device.h> @@ -176,9 +177,32 @@ static const struct mtk_gate infra_ao_clks[] = { "infra_ao_aes_msdcfde_0p", "top_aes_msdcfde", 18), }; +static u16 infra_ao_rst_ofs[] = { + INFRA_RST0_SET_OFFSET, + INFRA_RST1_SET_OFFSET, + INFRA_RST2_SET_OFFSET, + INFRA_RST3_SET_OFFSET, + INFRA_RST4_SET_OFFSET, +}; + +static u16 infra_ao_idx_map[] = { + [MT8188_INFRA_RST1_THERMAL_MCU_RST] = 1 * RST_NR_PER_BANK + 2, + [MT8188_INFRA_RST1_THERMAL_CTRL_RST] = 1 * RST_NR_PER_BANK + 4, + [MT8188_INFRA_RST3_PTP_CTRL_RST] = 3 * RST_NR_PER_BANK + 5, +}; + +static struct mtk_clk_rst_desc infra_ao_rst_desc = { + .version = MTK_RST_SET_CLR, + .rst_bank_ofs = infra_ao_rst_ofs, + .rst_bank_nr = ARRAY_SIZE(infra_ao_rst_ofs), + .rst_idx_map = infra_ao_idx_map, + .rst_idx_map_nr = ARRAY_SIZE(infra_ao_idx_map), +}; + static const struct mtk_clk_desc infra_ao_desc = { .clks = infra_ao_clks, .num_clks = ARRAY_SIZE(infra_ao_clks), + .rst_desc = &infra_ao_rst_desc, }; static const struct of_device_id of_match_clk_mt8188_infra_ao[] = { -- 2.18.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] clk: mediatek: reset: add infra_ao reset support for MT8188 2023-05-05 13:13 ` [PATCH v2 2/2] clk: mediatek: reset: add infra_ao reset support for MT8188 Runyang Chen @ 2023-05-10 21:20 ` Stephen Boyd 2023-05-25 6:46 ` Runyang Chen (陈润洋) 2023-05-25 7:12 ` Runyang Chen (陈润洋) 0 siblings, 2 replies; 7+ messages in thread From: Stephen Boyd @ 2023-05-10 21:20 UTC (permalink / raw) To: AngeloGioacchino Del Regno, Krzysztof Kozlowski, Matthias Brugger, Michael Turquette, Philipp Zabel, Rob Herring, Runyang Chen Cc: linux-clk, linux-kernel, linux-arm-kernel, linux-mediatek, devicetree, Runyang Chen Quoting Runyang Chen (2023-05-05 06:13:08) > @@ -176,9 +177,32 @@ static const struct mtk_gate infra_ao_clks[] = { > "infra_ao_aes_msdcfde_0p", "top_aes_msdcfde", 18), > }; > > +static u16 infra_ao_rst_ofs[] = { const? > + INFRA_RST0_SET_OFFSET, > + INFRA_RST1_SET_OFFSET, > + INFRA_RST2_SET_OFFSET, > + INFRA_RST3_SET_OFFSET, > + INFRA_RST4_SET_OFFSET, > +}; > + > +static u16 infra_ao_idx_map[] = { const? > + [MT8188_INFRA_RST1_THERMAL_MCU_RST] = 1 * RST_NR_PER_BANK + 2, > + [MT8188_INFRA_RST1_THERMAL_CTRL_RST] = 1 * RST_NR_PER_BANK + 4, > + [MT8188_INFRA_RST3_PTP_CTRL_RST] = 3 * RST_NR_PER_BANK + 5, > +}; > + > +static struct mtk_clk_rst_desc infra_ao_rst_desc = { > + .version = MTK_RST_SET_CLR, > + .rst_bank_ofs = infra_ao_rst_ofs, > + .rst_bank_nr = ARRAY_SIZE(infra_ao_rst_ofs), > + .rst_idx_map = infra_ao_idx_map, > + .rst_idx_map_nr = ARRAY_SIZE(infra_ao_idx_map), > +}; > + > static const struct mtk_clk_desc infra_ao_desc = { > .clks = infra_ao_clks, > .num_clks = ARRAY_SIZE(infra_ao_clks), > + .rst_desc = &infra_ao_rst_desc, > }; ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] clk: mediatek: reset: add infra_ao reset support for MT8188 2023-05-10 21:20 ` Stephen Boyd @ 2023-05-25 6:46 ` Runyang Chen (陈润洋) 2023-05-25 7:12 ` Runyang Chen (陈润洋) 1 sibling, 0 replies; 7+ messages in thread From: Runyang Chen (陈润洋) @ 2023-05-25 6:46 UTC (permalink / raw) To: p.zabel@pengutronix.de, matthias.bgg@gmail.com, sboyd@kernel.org, angelogioacchino.delregno@collabora.com, mturquette@baylibre.com, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org On Wed, 2023-05-10 at 14:20 -0700, Stephen Boyd wrote: > External email : Please do not click links or open attachments until > you have verified the sender or the content. > > > Quoting Runyang Chen (2023-05-05 06:13:08) > > @@ -176,9 +177,32 @@ static const struct mtk_gate infra_ao_clks[] = > > { > > "infra_ao_aes_msdcfde_0p", > > "top_aes_msdcfde", 18), > > }; > > > > +static u16 infra_ao_rst_ofs[] = { > > const? The infra_ao_rst_ofs and infra_ao_idx_map will be modified by the reset controller driver, so it could not be constified. And previous code did not set it as const. > > > + INFRA_RST0_SET_OFFSET, > > + INFRA_RST1_SET_OFFSET, > > + INFRA_RST2_SET_OFFSET, > > + INFRA_RST3_SET_OFFSET, > > + INFRA_RST4_SET_OFFSET, > > +}; > > + > > +static u16 infra_ao_idx_map[] = { > > const? > > > + [MT8188_INFRA_RST1_THERMAL_MCU_RST] = 1 * RST_NR_PER_BANK + > > 2, > > + [MT8188_INFRA_RST1_THERMAL_CTRL_RST] = 1 * RST_NR_PER_BANK > > + 4, > > + [MT8188_INFRA_RST3_PTP_CTRL_RST] = 3 * RST_NR_PER_BANK + 5, > > +}; > > + > > +static struct mtk_clk_rst_desc infra_ao_rst_desc = { infra_ao_rst_desc will be constified at V4. > > + .version = MTK_RST_SET_CLR, > > + .rst_bank_ofs = infra_ao_rst_ofs, > > + .rst_bank_nr = ARRAY_SIZE(infra_ao_rst_ofs), > > + .rst_idx_map = infra_ao_idx_map, > > + .rst_idx_map_nr = ARRAY_SIZE(infra_ao_idx_map), > > +}; > > + > > static const struct mtk_clk_desc infra_ao_desc = { > > .clks = infra_ao_clks, > > .num_clks = ARRAY_SIZE(infra_ao_clks), > > + .rst_desc = &infra_ao_rst_desc, > > }; ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] clk: mediatek: reset: add infra_ao reset support for MT8188 2023-05-10 21:20 ` Stephen Boyd 2023-05-25 6:46 ` Runyang Chen (陈润洋) @ 2023-05-25 7:12 ` Runyang Chen (陈润洋) 1 sibling, 0 replies; 7+ messages in thread From: Runyang Chen (陈润洋) @ 2023-05-25 7:12 UTC (permalink / raw) To: p.zabel@pengutronix.de, matthias.bgg@gmail.com, sboyd@kernel.org, angelogioacchino.delregno@collabora.com, mturquette@baylibre.com, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org On Wed, 2023-05-10 at 14:20 -0700, Stephen Boyd wrote: > External email : Please do not click links or open attachments until > you have verified the sender or the content. > > > Quoting Runyang Chen (2023-05-05 06:13:08) > > @@ -176,9 +177,32 @@ static const struct mtk_gate infra_ao_clks[] = > > { > > "infra_ao_aes_msdcfde_0p", > > "top_aes_msdcfde", 18), > > }; > > > > +static u16 infra_ao_rst_ofs[] = { > > const? The infra_ao_rst_ofs and infra_ao_idx_map will be modified by the reset controller driver, so it could not be constified. And previous code did not set it as const. > > > + INFRA_RST0_SET_OFFSET, > > + INFRA_RST1_SET_OFFSET, > > + INFRA_RST2_SET_OFFSET, > > + INFRA_RST3_SET_OFFSET, > > + INFRA_RST4_SET_OFFSET, > > +}; > > + > > +static u16 infra_ao_idx_map[] = { > > const? > > > + [MT8188_INFRA_RST1_THERMAL_MCU_RST] = 1 * RST_NR_PER_BANK + > > 2, > > + [MT8188_INFRA_RST1_THERMAL_CTRL_RST] = 1 * RST_NR_PER_BANK > > + 4, > > + [MT8188_INFRA_RST3_PTP_CTRL_RST] = 3 * RST_NR_PER_BANK + 5, > > +}; > > + > > +static struct mtk_clk_rst_desc infra_ao_rst_desc = { infra_ao_rst_desc will be constified at V4. > > + .version = MTK_RST_SET_CLR, > > + .rst_bank_ofs = infra_ao_rst_ofs, > > + .rst_bank_nr = ARRAY_SIZE(infra_ao_rst_ofs), > > + .rst_idx_map = infra_ao_idx_map, > > + .rst_idx_map_nr = ARRAY_SIZE(infra_ao_idx_map), > > +}; > > + > > static const struct mtk_clk_desc infra_ao_desc = { > > .clks = infra_ao_clks, > > .num_clks = ARRAY_SIZE(infra_ao_clks), > > + .rst_desc = &infra_ao_rst_desc, > > }; ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-05-25 7:29 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-05-05 13:13 [PATCH v2 0/2] Add infra_ao reset support for MT8188 Soc Runyang Chen 2023-05-05 13:13 ` [PATCH v2 1/2] dt-bindings: reset: mt8188: add thermal reset control bit Runyang Chen 2023-05-05 13:24 ` Krzysztof Kozlowski 2023-05-05 13:13 ` [PATCH v2 2/2] clk: mediatek: reset: add infra_ao reset support for MT8188 Runyang Chen 2023-05-10 21:20 ` Stephen Boyd 2023-05-25 6:46 ` Runyang Chen (陈润洋) 2023-05-25 7:12 ` Runyang Chen (陈润洋)
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox