* [PATCH 0/2] cpufreq: mediatek-hw: add support for mt8188 @ 2022-08-05 9:12 jia-wei.chang 2022-08-05 9:12 ` [PATCH 1/2] dt-bindings: cpufreq: add mt8188 cpufreq hw dt-bindings jia-wei.chang 2022-08-05 9:12 ` [PATCH 2/2] cpufreq: mediatek-hw: add support for mt8188 jia-wei.chang 0 siblings, 2 replies; 5+ messages in thread From: jia-wei.chang @ 2022-08-05 9:12 UTC (permalink / raw) To: Rafael J . Wysocki, Viresh Kumar, Rob Herring, Krzysztof Kozlowski, Matthias Brugger, Hector Yuan Cc: Jia-Wei Chang, devicetree, linux-arm-kernel, linux-mediatek, linux-kernel, Project_Global_Chrome_Upstream_Group, hsinyi From: Jia-Wei Chang <jia-wei.chang@mediatek.com> This series supports MT8188 cpufreq hw driver which used for power saving to scale the clock frequency and supply the voltage for CPUs. Jia-Wei Chang (2): dt-bindings: cpufreq: add mt8188 cpufreq hw dt-bindings cpufreq: mediatek-hw: add support for mt8188 .../bindings/cpufreq/cpufreq-mediatek-hw.yaml | 4 +++- drivers/cpufreq/mediatek-cpufreq-hw.c | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) -- 2.18.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] dt-bindings: cpufreq: add mt8188 cpufreq hw dt-bindings 2022-08-05 9:12 [PATCH 0/2] cpufreq: mediatek-hw: add support for mt8188 jia-wei.chang @ 2022-08-05 9:12 ` jia-wei.chang 2022-08-05 9:18 ` Krzysztof Kozlowski 2022-08-05 9:12 ` [PATCH 2/2] cpufreq: mediatek-hw: add support for mt8188 jia-wei.chang 1 sibling, 1 reply; 5+ messages in thread From: jia-wei.chang @ 2022-08-05 9:12 UTC (permalink / raw) To: Rafael J . Wysocki, Viresh Kumar, Rob Herring, Krzysztof Kozlowski, Matthias Brugger, Hector Yuan Cc: Jia-Wei Chang, devicetree, linux-arm-kernel, linux-mediatek, linux-kernel, Project_Global_Chrome_Upstream_Group, hsinyi From: Jia-Wei Chang <jia-wei.chang@mediatek.com> Add mt8188 cpufreq hw compatible in dt-bindings. Signed-off-by: Jia-Wei Chang <jia-wei.chang@mediatek.com> --- .../devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml index 9cd42a64b13e..b56d36224612 100644 --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml @@ -16,7 +16,9 @@ description: properties: compatible: - const: mediatek,cpufreq-hw + enum: + - mediatek,cpufreq-hw + - mediatek,mt8188-cpufreq-hw reg: minItems: 1 -- 2.18.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: cpufreq: add mt8188 cpufreq hw dt-bindings 2022-08-05 9:12 ` [PATCH 1/2] dt-bindings: cpufreq: add mt8188 cpufreq hw dt-bindings jia-wei.chang @ 2022-08-05 9:18 ` Krzysztof Kozlowski 2022-08-19 9:21 ` Jia-Wei Chang 0 siblings, 1 reply; 5+ messages in thread From: Krzysztof Kozlowski @ 2022-08-05 9:18 UTC (permalink / raw) To: jia-wei.chang, Rafael J . Wysocki, Viresh Kumar, Rob Herring, Krzysztof Kozlowski, Matthias Brugger, Hector Yuan Cc: devicetree, linux-arm-kernel, linux-mediatek, linux-kernel, Project_Global_Chrome_Upstream_Group, hsinyi On 05/08/2022 11:12, jia-wei.chang wrote: > From: Jia-Wei Chang <jia-wei.chang@mediatek.com> > > Add mt8188 cpufreq hw compatible in dt-bindings. > > Signed-off-by: Jia-Wei Chang <jia-wei.chang@mediatek.com> > --- > .../devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml > index 9cd42a64b13e..b56d36224612 100644 > --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml > +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml > @@ -16,7 +16,9 @@ description: > > properties: > compatible: > - const: mediatek,cpufreq-hw > + enum: > + - mediatek,cpufreq-hw Can you add a comment mentioning for which SoCs this is? Someone added a generic compatible covering all MediaTek cpufreq-hw (all!) and now you say it does not cover all? Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: cpufreq: add mt8188 cpufreq hw dt-bindings 2022-08-05 9:18 ` Krzysztof Kozlowski @ 2022-08-19 9:21 ` Jia-Wei Chang 0 siblings, 0 replies; 5+ messages in thread From: Jia-Wei Chang @ 2022-08-19 9:21 UTC (permalink / raw) To: Krzysztof Kozlowski, Rafael J . Wysocki, Viresh Kumar, Rob Herring, Krzysztof Kozlowski, Matthias Brugger, Hector Yuan Cc: devicetree, linux-arm-kernel, linux-mediatek, linux-kernel, Project_Global_Chrome_Upstream_Group, hsinyi On Fri, 2022-08-05 at 11:18 +0200, Krzysztof Kozlowski wrote: > On 05/08/2022 11:12, jia-wei.chang wrote: > > From: Jia-Wei Chang <jia-wei.chang@mediatek.com> > > > > Add mt8188 cpufreq hw compatible in dt-bindings. > > > > Signed-off-by: Jia-Wei Chang <jia-wei.chang@mediatek.com> > > --- > > .../devicetree/bindings/cpufreq/cpufreq-mediatek-hw.yaml | 4 > > +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq- > > mediatek-hw.yaml > > b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek- > > hw.yaml > > index 9cd42a64b13e..b56d36224612 100644 > > --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek- > > hw.yaml > > +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-mediatek- > > hw.yaml > > @@ -16,7 +16,9 @@ description: > > > > properties: > > compatible: > > - const: mediatek,cpufreq-hw > > + enum: > > + - mediatek,cpufreq-hw > > Can you add a comment mentioning for which SoCs this is? Someone > added a > generic compatible covering all MediaTek cpufreq-hw (all!) and now > you > say it does not cover all? > > Best regards, > Krzysztof Hi Krzysztof, I realized it is possible to make MT8188 completely reuse the compatibles "mediatek,cpufreq-hw" and platform driver as well. This series for MT8188 mediatek-cpufreq-hw is no longer required to be reviewed. Thanks for your help. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] cpufreq: mediatek-hw: add support for mt8188 2022-08-05 9:12 [PATCH 0/2] cpufreq: mediatek-hw: add support for mt8188 jia-wei.chang 2022-08-05 9:12 ` [PATCH 1/2] dt-bindings: cpufreq: add mt8188 cpufreq hw dt-bindings jia-wei.chang @ 2022-08-05 9:12 ` jia-wei.chang 1 sibling, 0 replies; 5+ messages in thread From: jia-wei.chang @ 2022-08-05 9:12 UTC (permalink / raw) To: Rafael J . Wysocki, Viresh Kumar, Rob Herring, Krzysztof Kozlowski, Matthias Brugger, Hector Yuan Cc: Jia-Wei Chang, devicetree, linux-arm-kernel, linux-mediatek, linux-kernel, Project_Global_Chrome_Upstream_Group, hsinyi From: Jia-Wei Chang <jia-wei.chang@mediatek.com> MT8188 mediatek-cpufreq-hw uses different register layout so it requires a new compatible and platform data. Signed-off-by: Jia-Wei Chang <jia-wei.chang@mediatek.com> --- drivers/cpufreq/mediatek-cpufreq-hw.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/cpufreq/mediatek-cpufreq-hw.c b/drivers/cpufreq/mediatek-cpufreq-hw.c index f0e0a35c7f21..83ba87545ee7 100644 --- a/drivers/cpufreq/mediatek-cpufreq-hw.c +++ b/drivers/cpufreq/mediatek-cpufreq-hw.c @@ -50,6 +50,15 @@ static const u16 cpufreq_mtk_offsets[REG_ARRAY_SIZE] = { [REG_FREQ_LATENCY] = 0x110, }; +static const u16 cpufreq_mt8188_offsets[REG_ARRAY_SIZE] = { + [REG_FREQ_LUT_TABLE] = 0x0, + [REG_FREQ_ENABLE] = 0x84, + [REG_FREQ_PERF_STATE] = 0x88, + [REG_FREQ_HW_STATE] = 0x8c, + [REG_EM_POWER_TBL] = 0x90, + [REG_FREQ_LATENCY] = 0x114, +}; + static int __maybe_unused mtk_cpufreq_get_cpu_power(struct device *cpu_dev, unsigned long *uW, unsigned long *KHz) @@ -318,6 +327,7 @@ static int mtk_cpufreq_hw_driver_remove(struct platform_device *pdev) static const struct of_device_id mtk_cpufreq_hw_match[] = { { .compatible = "mediatek,cpufreq-hw", .data = &cpufreq_mtk_offsets }, + { .compatible = "mediatek,mt8188-cpufreq-hw", .data = &cpufreq_mt8188_offsets }, {} }; -- 2.18.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-08-19 9:53 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-08-05 9:12 [PATCH 0/2] cpufreq: mediatek-hw: add support for mt8188 jia-wei.chang 2022-08-05 9:12 ` [PATCH 1/2] dt-bindings: cpufreq: add mt8188 cpufreq hw dt-bindings jia-wei.chang 2022-08-05 9:18 ` Krzysztof Kozlowski 2022-08-19 9:21 ` Jia-Wei Chang 2022-08-05 9:12 ` [PATCH 2/2] cpufreq: mediatek-hw: add support for mt8188 jia-wei.chang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox