Add infra_ao reset support for MT8188 Soc
Subsystems (4)
PATCH v4 1/2 dt-bindings: reset: mt8188: add thermal reset control bit
In reply to Runyang ChenTo support reset of infra_ao, add the index of infra_ao reset of thermal for MT8188.
--- include/dt-bindings/reset/mt8188-resets.h | 5 +++++ 1 file changed, 5 insertions(+)
include/dt-bindings/reset/mt8188-resets.h +5 -0
@@ -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 */
Signature · 1 line
2.18.0
v4 cover Add infra_ao reset support for MT8188 Soc
Based on tag: next-20230524, linux-next/master
v4:
1. Remove the attribute constant for infra_ao_rst_ofs and infra_ao_idx_map since the reset controller driver will modifiy them.
v3:
1. The infra_ao_rst_ofs, infra_ao_idx_map and infra_ao_rst_desc are not modified by the driver, so constify them.
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(+)
Signature · 1 line
2.18.0
PATCH v4 2/2 clk: mediatek: reset: add infra_ao reset support for MT8188
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.
--- drivers/clk/mediatek/clk-mt8188-infra_ao.c | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+)
drivers/clk/mediatek/clk-mt8188-infra_ao.c +24 -0
@@ -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 const 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[] = {
Signature · 1 line
2.18.0
Re: [PATCH v4 2/2] clk: mediatek: reset: add infra_ao reset support for MT8188
Il 25/05/23 09:50, Runyang Chen ha scritto:
Quoted 6 lines
The
infra_aoreset is needed for MT8188.
- Addmtk_clk_rst_descfor MT8188.
- Add register reset controller function for MT8188infra_ao.
- Addinfra_ao_idx_mapfor MT8188.Signed-off-by Runyang Chen <[email protected]>
Quoted 51 lines
Reported-by kernel test robot <[email protected]>--- drivers/clk/mediatek/clk-mt8188-infra_ao.c | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+)drivers/clk/mediatek/clk-mt8188-infra_ao.c +24
-0@@ -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 const 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[] = {
Re: [PATCH v4 1/2] dt-bindings: reset: mt8188: add thermal reset control bit
In reply to Runyang ChenIl 25/05/23 09:50, Runyang Chen ha scritto:
Quoted 5 lines
To support reset of
infra_ao, add the index ofinfra_aoreset of thermal for MT8188.Signed-off-by Runyang Chen <[email protected]>Acked-by Conor Dooley <[email protected]>
Re: [PATCH v4 1/2] dt-bindings: reset: mt8188: add thermal reset control bit
In reply to Runyang ChenQuoting Runyang Chen (2023-05-25 00:50:10)
Quoted 6 lines
To support reset of
infra_ao, add the index ofinfra_aoreset of thermal for MT8188.Signed-off-by Runyang Chen <[email protected]>Acked-by Conor Dooley <[email protected]>---
Applied to clk-next
Re: [PATCH v4 2/2] clk: mediatek: reset: add infra_ao reset support for MT8188
In reply to Runyang ChenQuoting Runyang Chen (2023-05-25 00:50:11)
Quoted 9 lines
The
infra_aoreset is needed for MT8188.
- Addmtk_clk_rst_descfor MT8188.
- Add register reset controller function for MT8188infra_ao.
- Addinfra_ao_idx_mapfor MT8188.Signed-off-by Runyang Chen <[email protected]>Reported-by kernel test robot <[email protected]>---
Applied to clk-next