Re: [PATCH 3/7] cpufreq: qcom-cpufreq-nvmem: dev_pm_opp_put_*() accepts NULL argument

2020-11-08 Thread Ilia Lin
Reviewed-by: Ilia Lin On Fri, Nov 6, 2020 at 9:05 AM Viresh Kumar wrote: > > The dev_pm_opp_put_*() APIs now accepts a NULL opp_table pointer and so > there is no need for us to carry the extra checks. Drop them. > > Signed-off-by: Viresh Kumar > --- > drivers/cpufreq

Re: [PATCH 0/7] opp: Allow dev_pm_opp_put_*() APIs to accept NULL opp_table

2020-11-08 Thread Ilia Lin
Reviewed-by: Ilia Lin On Fri, Nov 6, 2020 at 9:05 AM Viresh Kumar wrote: > > Hello, > > This patchset updates the dev_pm_opp_put_*() helpers to accept a NULL > pointer for the OPP table, in order to allow the callers to drop the > unnecessary checks they had to carry. >

Re: [PATCH] net: dev: Add API to check net_dev readiness

2020-08-05 Thread Ilia Lin
My comments inline. Thanks, Ilia Lin On Tue, Aug 4, 2020 at 10:24 PM Andrew Lunn wrote: > > On Tue, Aug 04, 2020 at 08:47:18PM +0300, Ilia Lin wrote: > > Hi Andrew and David, > > Hi Ilia > > Please don't top post. > > > > > Thank you for your comments

Re: [PATCH] net: dev: Add API to check net_dev readiness

2020-08-04 Thread Ilia Lin
Hi Andrew and David, Thank you for your comments! The client driver is still work in progress, but it can be seen here: https://source.codeaurora.org/quic/la/kernel/msm-4.19/tree/drivers/platform/msm/ipa/ipa_api.c#n3842 For HW performance reasons, it has to be in subsys_initcall. Here is the re

Re: [PATCH] net: dev: Add API to check net_dev readiness

2020-08-04 Thread Ilia Lin
Hi Andrew and David, Thank you for your comments! The client driver is still work in progress, but it can be seen here: https://source.codeaurora.org/quic/la/kernel/msm-4.19/tree/drivers/platform/msm/ipa/ipa_api.c#n3842 For HW performance reasons, it has to be in subsys_initcall. Here is the re

[PATCH] net: dev: Add API to check net_dev readiness

2020-07-26 Thread Ilia Lin
From: Ilia Lin Add an API that returns true, if the net_dev_init was already called, and the driver was initialized. Some early drivers, that are initialized during the subsys_initcall may try accessing the net_dev or NAPI APIs before the net_dev_init, and will encounter a kernel bug. This API

Re: [PATCH 04/13] cpufreq: qcom: Refactor the driver to make it easier to extend

2019-07-07 Thread Ilia Lin
Reviewed-by: Ilia Lin On Fri, Jul 5, 2019 at 12:58 PM Niklas Cassel wrote: > > Refactor the driver to make it easier to extend in a later commit. > > Create a driver struct to collect all common resources, in order to make > it easier to free up all common resources. &g

Re: [PATCH 03/13] dt-bindings: cpufreq: qcom-nvmem: Make speedbin related properties optional

2019-07-07 Thread Ilia Lin
Reviewed-by: Ilia Lin On Fri, Jul 5, 2019 at 12:58 PM Niklas Cassel wrote: > > Not all Qualcomm platforms need to care about the speedbin efuse, > nor the value blown into the speedbin efuse. > Therefore, make the nvmem-cells and opp-supported-hw properties > optional. > >

Re: [PATCH 01/13] dt-bindings: cpufreq: Re-organise kryo cpufreq to use it for other nvmem based qcom socs

2019-07-07 Thread Ilia Lin
Reviewed-by: Ilia Lin On Fri, Jul 5, 2019 at 12:57 PM Niklas Cassel wrote: > > From: Sricharan R > > The kryo cpufreq driver reads the nvmem cell and uses that data to > populate the opps. There are other qcom cpufreq socs like krait which > does similar thing. Except for the

Re: [PATCH 02/13] cpufreq: qcom: Re-organise kryo cpufreq to use it for other nvmem based qcom socs

2019-07-07 Thread Ilia Lin
Reviewed-by: Ilia Lin On Fri, Jul 5, 2019 at 12:57 PM Niklas Cassel wrote: > > From: Sricharan R > > The kryo cpufreq driver reads the nvmem cell and uses that data to > populate the opps. There are other qcom cpufreq socs like krait which > does similar thing. Except for

Re: [PATCH] cpufreq: qcom-kryo: add NULL entry to the end of_device_id array

2018-07-23 Thread Ilia Lin
ver qcom_cpufreq_kryo_driver = { > static const struct of_device_id qcom_cpufreq_kryo_match_list[] __initconst > = { > { .compatible = "qcom,apq8096", }, > { .compatible = "qcom,msm8996", }, > + {} > }; > > /* > -- > 2.7.0 > > Acked-by: Ilia Lin

Re: [PATCH v11 2/2] dt: qcom: Add qcom-cpufreq-kryo driver configuration

2018-07-10 Thread Ilia Lin
Hi Niklas, The frequency list in the DT is correct, but the initial frequency for the CPUs 0,1 is configured by the XBL, while the CPUs 2,3 stay at XO rate. Both rates are unlisted in the DT and that's OK. BR, Ilia Lin On Tue, Jul 10, 2018 at 12:29 PM Niklas Cassel wrote: > > On

[PATCH] MAINTAINERS: Update e-mail address for Ilia Lin

2018-06-18 Thread ilia . lin
From: Ilia Lin Change to the @kernel.org address Signed-off-by: Ilia Lin --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 035973b23b8b..15a836eebe9a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11799,7 +11799,7 @@ F

[PATCH v3] cpufreq: kryo: Add module remove and exit

2018-06-17 Thread ilia . lin
From: Ilia Lin Add device remove and module exit code to make the driver functioning as a loadable module. Fixes: ac28927659be (cpufreq: kryo: allow building as a loadable module) Signed-off-by: Ilia Lin --- drivers/cpufreq/qcom-cpufreq-kryo.c | 22 +++--- 1 file changed, 19

[PATCH v2] cpufreq: kryo: Fix possible error code dereference

2018-06-17 Thread ilia . lin
From: Ilia Lin In event of error returned by the nvmem_cell_read() non-pointer value may be dereferenced. Fix this with error handling. Additionally free the allocated speedbin buffer, as per the API. Fixes: 9ce36edd1a52 (cpufreq: Add Kryo CPU scaling driver) Signed-off-by: Ilia Lin

[PATCH v13 1/8] soc: qcom: Separate kryo l2 accessors from PMU driver

2018-06-14 Thread ilia . lin
From: Ilia Lin The driver provides kernel level API for other drivers to access the MSM8996 L2 cache registers. Separating the L2 access code from the PMU driver and making it public to allow other drivers use it. The accesses must be separated with a single spinlock, maintained in this driver

[PATCH v13 4/8] clk: qcom: Add CPU clock driver for msm8996

2018-06-14 Thread ilia . lin
From: Ilia Lin Each of the CPU clusters (Power and Perf) on msm8996 are clocked via 2 PLLs, a primary and alternate. There are also 2 Mux'es, a primary and secondary all connected together as shown below +---+

[PATCH v13 5/8] dt-bindings: clk: qcom: Add bindings for CPU clock for msm8996

2018-06-14 Thread ilia . lin
From: Ilia Lin Each of the CPU clusters (Power and Perf) on msm8996 are clocked via 2 PLLs, a primary and alternate. There are also 2 Mux'es, a primary and secondary all connected together as shown below +---+

[PATCH v13 7/8] clk: qcom: cpu-8996: Add support to switch below 600Mhz

2018-06-14 Thread ilia . lin
--> CPU clk Signed-off-by: Rajendra Nayak Signed-off-by: Ilia Lin Tested-by: Amit Kucheria --- drivers/clk/qcom/clk-cpu-8996.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/clk-cpu-8996.c b/drivers/clk/qcom/clk-cpu

[PATCH v13 2/8] clk: qcom: Make clk_alpha_pll_configure available to modules

2018-06-14 Thread ilia . lin
From: Rajendra Nayak Allow clk_alpha_pll_configure to be called from loadable kernel modules. Signed-off-by: Rajendra Nayak Signed-off-by: Ilia Lin Tested-by: Amit Kucheria --- drivers/clk/qcom/clk-alpha-pll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/qcom/clk-alpha

[PATCH v13 8/8] clk: qcom: Add ACD path to CPU clock driver for msm8996

2018-06-14 Thread ilia . lin
From: Ilia Lin The PMUX for each duplex allows for selection of ACD clock source. The DVM (Dynamic Variation Monitor) will flag an error when a voltage droop event is detected. This flagged error enables ACD to provide a div-by-2 clock, sourced from the primary PLL. The duplex will be provided

[PATCH v13 3/8] clk: Use devm_ in the register fixed factor clock

2018-06-14 Thread ilia . lin
From: Ilia Lin Use devm_clk_hw_register instead of clk_hw_register to simplify the usage of this API. This way drivers that call the clk_hw_register_fixed_factor won't need to maintain a data structure for further cleanup. Signed-off-by: Ilia Lin Tested-by: Amit Kucheria --- drivers/cl

[PATCH v13 6/8] clk: qcom: cpu-8996: Add support to switch to alternate PLL

2018-06-14 Thread ilia . lin
support this. Signed-off-by: Rajendra Nayak Signed-off-by: Ilia Lin Tested-by: Amit Kucheria --- drivers/clk/qcom/clk-cpu-8996.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/clk/qcom/clk-cpu-8996.c b/drivers/clk/qcom/clk-cpu-8996.c index

[PATCH v13 0/8] Clock for CPU scaling support for msm8996

2018-06-14 Thread ilia . lin
From: Ilia Lin [v13] * Rebased [v12] * Addressed the kbuild fail on arm architecture [v11] * Split the series into domains [v9] * Addressed comments from Viresh and Russel about the error handling [v8] * Reordered the patch series into 4 groups * Addressed comments from Amit about the

[PATCH v2] cpufreq: kryo: Add module remove and exit

2018-06-14 Thread ilia . lin
From: Ilia Lin Add device remove and module exit code to make the driver functioning as a loadable module. Fixes: ac28927659be (cpufreq: kryo: allow building as a loadable module) Signed-off-by: Ilia Lin --- drivers/cpufreq/qcom-cpufreq-kryo.c | 23 --- 1 file changed, 20

[PATCH] cpufreq: kryo: Fix possible error code dereference

2018-06-14 Thread ilia . lin
From: Ilia Lin In event of error returned by the nvmem_cell_read() non-pointer value may be dereferenced. Fix this with error handling. Signed-off-by: Ilia Lin --- drivers/cpufreq/qcom-cpufreq-kryo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/cpufreq/qcom-cpufreq-kryo.c b

[PATCH] cpufreq: kryo: Add module remove and exit

2018-06-07 Thread ilia . lin
From: Ilia Lin Add device remove and module exit code to make the driver functioning as a loadable module. Fixes: ac28927659be (cpufreq: kryo: allow building as a loadable module) Signed-off-by: Ilia Lin --- drivers/cpufreq/qcom-cpufreq-kryo.c | 24 +--- 1 file changed, 21

Re: [PATCH] cpufreq: kryo: allow building as a loadable module

2018-06-05 Thread Ilia Lin
Viresh got ahead of my answer a bit. :) Sure I'll post the module exit later. On June 6, 2018 7:09:29 AM GMT+03:00, Viresh Kumar wrote: >On 05-06-18, 13:44, Arnd Bergmann wrote: >> Building the kryo cpufreq driver while QCOM_SMEM is a loadable module >> results in a link error: >> >> drivers/cp

Re: [PATCH v14 0/2] Kryo CPU scaling driver

2018-05-30 Thread Ilia Lin
Just like Viresh said, this is fixed in the v15. On May 30, 2018 12:15:35 PM GMT+03:00, Viresh Kumar wrote: >On 30-05-18, 10:08, Rafael J. Wysocki wrote: >> On Fri, May 25, 2018 at 2:07 PM, Ilia Lin >wrote: >> > [v14] >> > * Addressed comment from Sudeep abo

[PATCH v15 1/2] cpufreq: Add Kryo CPU scaling driver

2018-05-29 Thread Ilia Lin
. Signed-off-by: Ilia Lin Acked-by: Viresh Kumar Reviewed-by: Amit Kucheria Tested-by: Amit Kucheria --- MAINTAINERS | 7 ++ drivers/cpufreq/Kconfig.arm | 11 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers

[PATCH v15 2/2] dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu

2018-05-29 Thread Ilia Lin
M8996 SG, speedbin 1 6: MSM8996 SG, speedbin 2 7-31: unused Signed-off-by: Ilia Lin Reviewed-by: Rob Herring Reviewed-by: Amit Kucheria Tested-by: Amit Kucheria Acked-by: Viresh Kumar --- .../devicetree/bindings/opp/kryo-cpufreq.txt | 680 +

[PATCH v15 0/2] Kryo CPU scaling driver

2018-05-29 Thread Ilia Lin
://patchwork.kernel.org/patch/10427315/ Ilia Lin (2): cpufreq: Add Kryo CPU scaling driver dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu .../devicetree/bindings/opp/kryo-cpufreq.txt | 680 + MAINTAINERS| 7 + drivers/cpufreq

[PATCH v14 1/2] cpufreq: Add Kryo CPU scaling driver

2018-05-25 Thread Ilia Lin
. Signed-off-by: Ilia Lin --- MAINTAINERS | 7 ++ drivers/cpufreq/Kconfig.arm | 10 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers/cpufreq/qcom-cpufreq-kryo.c | 212 +++ 5

[PATCH v14 2/2] dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu

2018-05-25 Thread Ilia Lin
M8996 SG, speedbin 1 6: MSM8996 SG, speedbin 2 7-31: unused Signed-off-by: Ilia Lin Reviewed-by: Rob Herring Acked-by: Viresh Kumar --- .../devicetree/bindings/opp/kryo-cpufreq.txt | 680 + 1 file changed, 680 insertions(+)

[PATCH v14 0/2] Kryo CPU scaling driver

2018-05-25 Thread Ilia Lin
versions. The driver reads eFuse information and chooses the required OPP subset by passing the OPP supported-hw parameter. The series depends on the series from Viresh: https://patchwork.kernel.org/patch/10418139/ The previous spin was here: https://patchwork.kernel.org/patch/10424949/ Ilia Lin (2

[PATCH v14 2/2] dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu

2018-05-25 Thread Ilia Lin
M8996 SG, speedbin 1 6: MSM8996 SG, speedbin 2 7-31: unused Signed-off-by: Ilia Lin Reviewed-by: Rob Herring Acked-by: Viresh Kumar --- .../devicetree/bindings/opp/kryo-cpufreq.txt | 680 + 1 file changed, 680 insertions(+)

[PATCH v14 1/2] cpufreq: Add Kryo CPU scaling driver

2018-05-25 Thread Ilia Lin
. Signed-off-by: Ilia Lin --- MAINTAINERS | 7 ++ drivers/cpufreq/Kconfig.arm | 10 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers/cpufreq/qcom-cpufreq-kryo.c | 206 +++ 5

[PATCH v14 0/2] Kryo CPU scaling driver

2018-05-25 Thread Ilia Lin
versions. The driver reads eFuse information and chooses the required OPP subset by passing the OPP supported-hw parameter. The series depends on the series from Viresh: https://patchwork.kernel.org/patch/10418139/ The previous spin was here: https://patchwork.kernel.org/patch/10424949/ Ilia Lin (2

[PATCH v13 2/2] dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu

2018-05-24 Thread Ilia Lin
M8996 SG, speedbin 1 6: MSM8996 SG, speedbin 2 7-31: unused Signed-off-by: Ilia Lin Reviewed-by: Rob Herring Acked-by: Viresh Kumar --- .../devicetree/bindings/opp/kryo-cpufreq.txt | 680 + 1 file changed, 680 insertions(+)

[PATCH v13 0/2] Kryo CPU scaling driver

2018-05-24 Thread Ilia Lin
the OPP supported-hw parameter. The series depends on the series from Viresh: https://patchwork.kernel.org/patch/10418139/ The previous spin was here: https://patchwork.kernel.org/patch/10423137/ Ilia Lin (2): cpufreq: Add Kryo CPU scaling driver dt-bindings: cpufreq: Document operating

[PATCH v13 1/2] cpufreq: Add Kryo CPU scaling driver

2018-05-24 Thread Ilia Lin
. Signed-off-by: Ilia Lin --- drivers/cpufreq/Kconfig.arm | 10 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers/cpufreq/qcom-cpufreq-kryo.c | 206 +++ 4 files changed, 220 insertions(+) create mode

[PATCH v12 1/2] cpufreq: Add Kryo CPU scaling driver

2018-05-24 Thread Ilia Lin
. Signed-off-by: Ilia Lin --- drivers/cpufreq/Kconfig.arm | 10 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers/cpufreq/qcom-cpufreq-kryo.c | 194 +++ 4 files changed, 208 insertions(+) create mode

[PATCH v12 2/2] dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu

2018-05-24 Thread Ilia Lin
M8996 SG, speedbin 1 6: MSM8996 SG, speedbin 2 7-31: unused Signed-off-by: Ilia Lin Reviewed-by: Rob Herring Acked-by: Viresh Kumar --- .../devicetree/bindings/opp/kryo-cpufreq.txt | 680 + 1 file changed, 680 insertions(+)

[PATCH v12 0/2] Kryo CPU scaling driver

2018-05-24 Thread Ilia Lin
Viresh: https://patchwork.kernel.org/patch/10418139/ The previous spin was here: https://patchwork.kernel.org/patch/10421143/ Ilia Lin (2): cpufreq: Add Kryo CPU scaling driver dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu .../devicetree/bindings/opp/kryo-cpufreq.txt | 680

[PATCH v12 5/8] dt-bindings: clk: qcom: Add bindings for CPU clock for msm8996

2018-05-24 Thread Ilia Lin
ates on a single VCO range, between 600MHz and 3GHz. However the CPUs do support OPPs with frequencies between 300MHz and 600MHz. In order to support running the CPUs at those frequencies we end up having to lock the PLL at twice the rate and drive the CPU clk via the PLL/2 output and SMUX. Signed-off

[PATCH v12 3/8] clk: Use devm_ in the register fixed factor clock

2018-05-24 Thread Ilia Lin
Use devm_clk_hw_register instead of clk_hw_register to simplify the usage of this API. This way drivers that call the clk_hw_register_fixed_factor won't need to maintain a data structure for further cleanup. Signed-off-by: Ilia Lin --- drivers/clk/clk-fixed-factor.c | 2 +- 1 file chang

[PATCH v12 0/8] Clock for CPU scaling support for msm8996

2018-05-24 Thread Ilia Lin
the MSM8996. Ilia Lin (6): soc: qcom: Separate kryo l2 accessors from PMU driver clk: Use devm_ in the register fixed factor clock clk: qcom: Add CPU clock driver for msm8996 dt-bindings: clk: qcom: Add bindings for CPU clock for msm8996 clk: qcom: cpu-8996: Add support to switch below

[PATCH v12 4/8] clk: qcom: Add CPU clock driver for msm8996

2018-05-24 Thread Ilia Lin
D stands for Adaptive Clock Distribution and is used to detect voltage droops. Signed-off-by: Rajendra Nayak Signed-off-by: Ilia Lin --- drivers/clk/qcom/Kconfig | 10 + drivers/clk/qcom/Makefile| 1 + drivers/clk/qcom/clk-alpha-pll.h | 6 + drivers/clk/qcom/clk-cpu-8996.c |

[PATCH v12 7/8] clk: qcom: cpu-8996: Add support to switch below 600Mhz

2018-05-24 Thread Ilia Lin
ned-off-by: Rajendra Nayak Signed-off-by: Ilia Lin --- drivers/clk/qcom/clk-cpu-8996.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/clk-cpu-8996.c b/drivers/clk/qcom/clk-cpu-8996.c index 620fdc2..ff5c0a5 100644 --- a/drivers/clk

[PATCH v12 6/8] clk: qcom: cpu-8996: Add support to switch to alternate PLL

2018-05-24 Thread Ilia Lin
support this. Signed-off-by: Rajendra Nayak Signed-off-by: Ilia Lin --- drivers/clk/qcom/clk-cpu-8996.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/clk/qcom/clk-cpu-8996.c b/drivers/clk/qcom/clk-cpu-8996.c index d92cad93..620fdc2 100644 --- a

[PATCH v12 8/8] clk: qcom: Add ACD path to CPU clock driver for msm8996

2018-05-24 Thread Ilia Lin
until a pre-programmed delay has expired. This change configures ACD during the probe and switches the PMUXes to the ACD clock source. Signed-off-by: Ilia Lin --- drivers/clk/qcom/clk-cpu-8996.c | 75 +++-- 1 file changed, 65 insertions(+), 10 deletions

[PATCH v12 2/8] clk: qcom: Make clk_alpha_pll_configure available to modules

2018-05-24 Thread Ilia Lin
From: Rajendra Nayak Allow clk_alpha_pll_configure to be called from loadable kernel modules. Signed-off-by: Rajendra Nayak Signed-off-by: Ilia Lin --- drivers/clk/qcom/clk-alpha-pll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk

[PATCH v12 1/8] soc: qcom: Separate kryo l2 accessors from PMU driver

2018-05-24 Thread Ilia Lin
: Ilia Lin --- drivers/perf/Kconfig | 1 + drivers/perf/qcom_l2_pmu.c | 90 ++-- drivers/soc/qcom/Kconfig | 3 ++ drivers/soc/qcom/Makefile| 1 + drivers/soc/qcom/kryo-l2-accessors.c | 56

[PATCH v11 2/2] dt: qcom: Add qcom-cpufreq-kryo driver configuration

2018-05-23 Thread Ilia Lin
1. Add NVMEM node for the speedbin 2. Add definitions for all possible MSM8996 CPU OPPs. The qcom-cpufreq-kryo driver will select the appropriate subset. Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 2 +- arch/arm64/boot/dts/qcom/msm8996

[PATCH v11 1/2] dt: qcom: Add opp and thermal to the msm8996

2018-05-23 Thread Ilia Lin
Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 269 -- 1 file changed, 260 insertions(+), 9 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 37b7152c

[PATCH v11 0/2] CPU scaling support for msm8996 DT

2018-05-23 Thread Ilia Lin
[v11] * Split the series into domains The series adds OPP tables, thermal and CPU definitions in order to support the CPU frequency scaling on msm8996 CPUs. Ilia Lin (2): dt: qcom: Add opp and thermal to the msm8996 dt: qcom: Add qcom-cpufreq-kryo driver configuration arch/arm64/boot/dts

[PATCH v11 3/8] clk: Use devm_ in the register fixed factor clock

2018-05-23 Thread Ilia Lin
Use devm_clk_hw_register instead of clk_hw_register to simplify the usage of this API. This way drivers that call the clk_hw_register_fixed_factor won't need to maintain a data structure for further cleanup. Signed-off-by: Ilia Lin --- drivers/clk/clk-fixed-factor.c | 2 +- 1 file chang

[PATCH v11 6/8] clk: qcom: cpu-8996: Add support to switch to alternate PLL

2018-05-23 Thread Ilia Lin
support this. Signed-off-by: Rajendra Nayak Signed-off-by: Ilia Lin --- drivers/clk/qcom/clk-cpu-8996.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/clk/qcom/clk-cpu-8996.c b/drivers/clk/qcom/clk-cpu-8996.c index d92cad93..620fdc2 100644 --- a

[PATCH v11 8/8] clk: qcom: Add ACD path to CPU clock driver for msm8996

2018-05-23 Thread Ilia Lin
until a pre-programmed delay has expired. This change configures ACD during the probe and switches the PMUXes to the ACD clock source. Signed-off-by: Ilia Lin --- drivers/clk/qcom/clk-cpu-8996.c | 75 +++-- 1 file changed, 65 insertions(+), 10 deletions

[PATCH v11 7/8] clk: qcom: cpu-8996: Add support to switch below 600Mhz

2018-05-23 Thread Ilia Lin
ned-off-by: Rajendra Nayak Signed-off-by: Ilia Lin --- drivers/clk/qcom/clk-cpu-8996.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/clk-cpu-8996.c b/drivers/clk/qcom/clk-cpu-8996.c index 620fdc2..ff5c0a5 100644 --- a/drivers/clk

[PATCH v11 5/8] dt-bindings: clk: qcom: Add bindings for CPU clock for msm8996

2018-05-23 Thread Ilia Lin
ates on a single VCO range, between 600MHz and 3GHz. However the CPUs do support OPPs with frequencies between 300MHz and 600MHz. In order to support running the CPUs at those frequencies we end up having to lock the PLL at twice the rate and drive the CPU clk via the PLL/2 output and SMUX. Signed-off

[PATCH v11 4/8] clk: qcom: Add CPU clock driver for msm8996

2018-05-23 Thread Ilia Lin
D stands for Adaptive Clock Distribution and is used to detect voltage droops. Signed-off-by: Rajendra Nayak Signed-off-by: Ilia Lin --- drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile| 1 + drivers/clk/qcom/clk-alpha-pll.h | 6 + drivers/clk/qcom/clk-cpu-8996.c |

[PATCH v11 2/8] clk: qcom: Make clk_alpha_pll_configure available to modules

2018-05-23 Thread Ilia Lin
From: Rajendra Nayak Allow clk_alpha_pll_configure to be called from loadable kernel modules. Signed-off-by: Rajendra Nayak Signed-off-by: Ilia Lin --- drivers/clk/qcom/clk-alpha-pll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk

[PATCH v11 0/8] CPU scaling support for msm8996

2018-05-23 Thread Ilia Lin
): Extracts the kryo l2 accessors driver from the QCOM PMU driver Clocks (2/15-9/15): This series adds support for the CPU clocks on msm8996 devices. The driver uses the existing PLL drivers and is required to control the CPU frequency scaling on the MSM8996. Ilia Lin (6): soc: qcom: Separate kryo l2

[PATCH v11 1/8] soc: qcom: Separate kryo l2 accessors from PMU driver

2018-05-23 Thread Ilia Lin
: Ilia Lin --- drivers/perf/Kconfig | 1 + drivers/perf/qcom_l2_pmu.c | 90 ++-- drivers/soc/qcom/Kconfig | 3 ++ drivers/soc/qcom/Makefile| 1 + drivers/soc/qcom/kryo-l2-accessors.c | 56

[PATCH v11 1/2] cpufreq: Add Kryo CPU scaling driver

2018-05-23 Thread Ilia Lin
. Signed-off-by: Ilia Lin --- drivers/cpufreq/Kconfig.arm | 10 ++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers/cpufreq/qcom-cpufreq-kryo.c | 181 +++ 4 files changed, 195 insertions(+) create mode

[PATCH v11 2/2] dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu

2018-05-23 Thread Ilia Lin
M8996 SG, speedbin 1 6: MSM8996 SG, speedbin 2 7-31: unused Signed-off-by: Ilia Lin Reviewed-by: Rob Herring Acked-by: Viresh Kumar --- .../devicetree/bindings/opp/kryo-cpufreq.txt | 680 + 1 file changed, 680 insertions(+)

[PATCH v11 0/2] Kryo CPU scaling driver

2018-05-23 Thread Ilia Lin
here: https://patchwork.kernel.org/patch/10420809/ Ilia Lin (2): cpufreq: Add Kryo CPU scaling driver dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu .../devicetree/bindings/opp/kryo-cpufreq.txt | 680 + drivers/cpufreq/Kconfig.arm

[PATCH v10 1/2] cpufreq: Add Kryo CPU scaling driver

2018-05-23 Thread Ilia Lin
. Signed-off-by: Ilia Lin --- drivers/cpufreq/Kconfig.arm | 10 +++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers/cpufreq/qcom-cpufreq-kryo.c | 163 +++ 4 files changed, 177 insertions(+) create mode

[PATCH v10 0/2] Kryo CPU scaling driver

2018-05-23 Thread Ilia Lin
parameter. The series depends on the series from Viresh: https://patchwork.kernel.org/patch/10418139/ The previous spin was here: https://patchwork.kernel.org/patch/10420751/ https://patchwork.kernel.org/patch/10414761/ Ilia Lin (2): cpufreq: Add Kryo CPU scaling driver dt-bindings: cpufreq: Document

[PATCH v10 2/2] dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu

2018-05-23 Thread Ilia Lin
M8996 SG, speedbin 1 6: MSM8996 SG, speedbin 2 7-31: unused Signed-off-by: Ilia Lin Reviewed-by: Rob Herring Acked-by: Viresh Kumar --- .../devicetree/bindings/opp/kryo-cpufreq.txt | 680 + 1 file changed, 680 insertions(+)

[PATCH] cpufreq: Add Kryo CPU scaling driver

2018-05-23 Thread Ilia Lin
. Signed-off-by: Ilia Lin --- drivers/cpufreq/Kconfig.arm | 10 +++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers/cpufreq/qcom-cpufreq-kryo.c | 163 +++ 4 files changed, 177 insertions(+) create mode

[PATCH] cpufreq: Add Kryo CPU scaling driver

2018-05-22 Thread Ilia Lin
. Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- drivers/cpufreq/Kconfig.arm | 10 +++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers/cpufreq/qcom-cpufreq-kryo.c | 163 +++ 4 files changed, 177

[PATCH v9 03/15] clk: Use devm_ in the register fixed factor clock

2018-05-21 Thread Ilia Lin
Use devm_clk_hw_register instead of clk_hw_register to simplify the usage of this API. This way drivers that call the clk_hw_register_fixed_factor won't need to maintain a data structure for further cleanup. Signed-off-by: Ilia Lin --- drivers/clk/clk-fixed-factor.c | 2 +- 1 file chang

[PATCH v9 06/15] clk: qcom: cpu-8996: Add support to switch to alternate PLL

2018-05-21 Thread Ilia Lin
support this. Signed-off-by: Rajendra Nayak Signed-off-by: Ilia Lin --- drivers/clk/qcom/clk-cpu-8996.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/clk/qcom/clk-cpu-8996.c b/drivers/clk/qcom/clk-cpu-8996.c index d92cad93..620fdc2 100644 --- a

[PATCH v9 04/15] clk: qcom: Add CPU clock driver for msm8996

2018-05-21 Thread Ilia Lin
D stands for Adaptive Clock Distribution and is used to detect voltage droops. Signed-off-by: Rajendra Nayak Signed-off-by: Ilia Lin --- drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile| 1 + drivers/clk/qcom/clk-alpha-pll.h | 6 + drivers/clk/qcom/clk-cpu-8996.c |

[PATCH v9 05/15] dt-bindings: clk: qcom: Add bindings for CPU clock for msm8996

2018-05-21 Thread Ilia Lin
ates on a single VCO range, between 600MHz and 3GHz. However the CPUs do support OPPs with frequencies between 300MHz and 600MHz. In order to support running the CPUs at those frequencies we end up having to lock the PLL at twice the rate and drive the CPU clk via the PLL/2 output and SMUX. Signed-off

[PATCH v9 11/15] dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu

2018-05-21 Thread Ilia Lin
M8996 SG, speedbin 1 6: MSM8996 SG, speedbin 2 7-31: unused Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- .../devicetree/bindings/opp/kryo-cpufreq.txt | 680 + 1 file changed, 680 insertions(+) create mode 100644 Documentation

[PATCH v9 09/15] dt: qcom: Add opp and thermal to the msm8996

2018-05-21 Thread Ilia Lin
Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 269 -- 1 file changed, 260 insertions(+), 9 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 37b7152c

[PATCH v9 14/15] dt-bindings: qcom_spmi: Document SAW support

2018-05-21 Thread Ilia Lin
Document the DT bindings for the SAW regulators. The saw-leader is the only property that is configurable in DT. The saw-slave property allows ganging (grouping) of several regulators so that their outputs can be combined. Signed-off-by: Ilia Lin Reviewed-by: Rob Herring --- .../bindings

[PATCH v9 15/15] dt: qcom: Add SAW regulator for 8x96 CPUs

2018-05-21 Thread Ilia Lin
1. Add syscon node for the SAW CPU registers 2. Add SAW regulators gang definition for s8-s11 3. Add voltages to the OPP tables 4. Add the s11 SAW regulator as CPU regulator Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 119

[PATCH v9 12/15] dt: qcom: Add qcom-cpufreq-kryo driver configuration

2018-05-21 Thread Ilia Lin
1. Add NVMEM node for the speedbin 2. Add definitions for all possible MSM8996 CPU OPPs. The qcom-cpufreq-kryo driver will select the appropriate subset. Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 2 +- arch/arm64/boot/dts/qcom/msm8996

[PATCH v9 13/15] regulator: qcom_spmi: Add support for SAW

2018-05-21 Thread Ilia Lin
Switching. Signed-off-by: Ilia Lin --- drivers/regulator/qcom_spmi-regulator.c | 133 +++- 1 file changed, 130 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 63c7a0c..9817f1a 100644

[PATCH v9 07/15] clk: qcom: cpu-8996: Add support to switch below 600Mhz

2018-05-21 Thread Ilia Lin
ned-off-by: Rajendra Nayak Signed-off-by: Ilia Lin --- drivers/clk/qcom/clk-cpu-8996.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/clk-cpu-8996.c b/drivers/clk/qcom/clk-cpu-8996.c index 620fdc2..ff5c0a5 100644 --- a/drivers/clk

[PATCH v9 10/15] cpufreq: Add Kryo CPU scaling driver

2018-05-21 Thread Ilia Lin
. Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- drivers/cpufreq/Kconfig.arm | 10 +++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers/cpufreq/qcom-cpufreq-kryo.c | 164 +++ 4 files changed, 178

[PATCH v9 08/15] clk: qcom: Add ACD path to CPU clock driver for msm8996

2018-05-21 Thread Ilia Lin
until a pre-programmed delay has expired. This change configures ACD during the probe and switches the PMUXes to the ACD clock source. Signed-off-by: Ilia Lin --- drivers/clk/qcom/clk-cpu-8996.c | 75 +++-- 1 file changed, 65 insertions(+), 10 deletions

[PATCH v9 00/15] CPU scaling support for msm8996

2018-05-21 Thread Ilia Lin
by passing the OPP supported-hw parameter. Regulators (13/15-15/15): Added SAW regulator support to the SPMI regulator driver. The SAW regulators will be controlled through special CPU registers instead of direct SPMI accesses. Ilia Lin (13): soc: qcom: Separate kryo l2 accessors from PMU

[PATCH v9 02/15] clk: qcom: Make clk_alpha_pll_configure available to modules

2018-05-21 Thread Ilia Lin
From: Rajendra Nayak Allow clk_alpha_pll_configure to be called from loadable kernel modules. Signed-off-by: Rajendra Nayak Signed-off-by: Ilia Lin --- drivers/clk/qcom/clk-alpha-pll.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk

[PATCH v9 01/15] soc: qcom: Separate kryo l2 accessors from PMU driver

2018-05-21 Thread Ilia Lin
: Ilia Lin --- drivers/perf/Kconfig | 1 + drivers/perf/qcom_l2_pmu.c | 90 ++-- drivers/soc/qcom/Kconfig | 3 ++ drivers/soc/qcom/Makefile| 1 + drivers/soc/qcom/kryo-l2-accessors.c | 56

[PATCH] cpufreq: Add Kryo CPU scaling driver

2018-05-21 Thread Ilia Lin
. Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- drivers/cpufreq/Kconfig.arm | 10 +++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers/cpufreq/qcom-cpufreq-kryo.c | 164 +++ 4 files changed, 178

[PATCH] cpufreq: Add Kryo CPU scaling driver

2018-05-19 Thread Ilia Lin
. Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- drivers/cpufreq/Kconfig.arm | 10 +++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers/cpufreq/qcom-cpufreq-kryo.c | 164 +++ 4 files changed, 178

[PATCH v8 04/15] clk: qcom: Add CPU clock driver for msm8996

2018-05-17 Thread Ilia Lin
D stands for Adaptive Clock Distribution and is used to detect voltage droops. Signed-off-by: Rajendra Nayak Signed-off-by: Ilia Lin --- drivers/clk/qcom/Kconfig | 9 + drivers/clk/qcom/Makefile| 1 + drivers/clk/qcom/clk-alpha-pll.h | 6 + drivers/clk/qcom/clk-cpu-8996.c |

[PATCH v8 10/15] cpufreq: Add Kryo CPU scaling driver

2018-05-17 Thread Ilia Lin
. Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- drivers/cpufreq/Kconfig.arm | 10 +++ drivers/cpufreq/Makefile | 1 + drivers/cpufreq/cpufreq-dt-platdev.c | 3 + drivers/cpufreq/qcom-cpufreq-kryo.c | 166 +++ 4 files changed, 180

[PATCH v8 09/15] dt: qcom: Add opp and thermal to the msm8996

2018-05-17 Thread Ilia Lin
Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 269 -- 1 file changed, 260 insertions(+), 9 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 37b7152c

[PATCH v8 11/15] dt-bindings: cpufreq: Document operating-points-v2-kryo-cpu

2018-05-17 Thread Ilia Lin
M8996 SG, speedbin 1 6: MSM8996 SG, speedbin 2 7-31: unused Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- .../devicetree/bindings/opp/kryo-cpufreq.txt | 680 + 1 file changed, 680 insertions(+) create mode 100644 Documentation

[PATCH v8 12/15] dt: qcom: Add qcom-cpufreq-kryo driver configuration

2018-05-17 Thread Ilia Lin
1. Add NVMEM node for the speedbin 2. Add definitions for all possible MSM8996 CPU OPPs. The qcom-cpufreq-kryo driver will select the appropriate subset. Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 2 +- arch/arm64/boot/dts/qcom/msm8996

[PATCH v8 14/15] dt-bindings: qcom_spmi: Document SAW support

2018-05-17 Thread Ilia Lin
Document the DT bindings for the SAW regulators. The saw-leader is the only property that is configurable in DT. The saw-slave property allows ganging (grouping) of several regulators so that their outputs can be combined. Signed-off-by: Ilia Lin Reviewed-by: Rob Herring --- .../bindings

[PATCH v8 15/15] dt: qcom: Add SAW regulator for 8x96 CPUs

2018-05-17 Thread Ilia Lin
1. Add syscon node for the SAW CPU registers 2. Add SAW regulators gang definition for s8-s11 3. Add voltages to the OPP tables 4. Add the s11 SAW regulator as CPU regulator Signed-off-by: Ilia Lin Acked-by: Viresh Kumar --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 119

[PATCH v8 13/15] regulator: qcom_spmi: Add support for SAW

2018-05-17 Thread Ilia Lin
Switching. Signed-off-by: Ilia Lin --- drivers/regulator/qcom_spmi-regulator.c | 133 +++- 1 file changed, 130 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 63c7a0c..9817f1a 100644

[PATCH v8 08/15] clk: qcom: Add ACD path to CPU clock driver for msm8996

2018-05-17 Thread Ilia Lin
until a pre-programmed delay has expired. This change configures ACD during the probe and switches the PMUXes to the ACD clock source. Signed-off-by: Ilia Lin --- drivers/clk/qcom/clk-cpu-8996.c | 75 +++-- 1 file changed, 65 insertions(+), 10 deletions

  1   2   >