Re: [PATCH v4 1/8] thermal: qcom: tsens: Add a skeletal TSENS drivers

2015-12-10 Thread Rajendra Nayak
> [].. > +Optional properties: +- qcom,sensor-id: List of sensor instances used in a given SoC. A TSENS IP can +have a fixed number of sensors (like 11) but a given SoC can +use only 5 of these and they might not always the first 5. They

Re: [PATCH v2] arm64: dts: qcom: Add apq8096 dragonboard dts skeletons

2015-12-01 Thread Rajendra Nayak
On 12/02/2015 02:59 AM, Bryan Huntsman wrote: > On 12/01/2015 08:11 AM, Rajendra Nayak wrote: >> Add new dtsi and dts files for the apq8096 dragonboards with just >> a serial device used as debug console >> >> While at it, also rearrange the Makefile so we have one

[PATCH v2 1/6] clk: qcom: gdsc: Add support for hierarchical power domains

2015-12-01 Thread Rajendra Nayak
Some qcom SoCs' can have hierarchical power domains. Let the gdsc structs specify the parents (if any) and the driver add genpd subdomains for them. Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/common.c | 14 +- drivers/clk/qcom/gdsc.c

[PATCH v2 2/6] clk: qcom: gdsc: Add support for gdscs with gds hw controller

2015-12-01 Thread Rajendra Nayak
ktime APIs instead for busy looping on status bits. Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/gdsc.c | 44 +++- drivers/clk/qcom/gdsc.h | 2 ++ 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk

[PATCH v2 3/6] clk: qcom: gdsc: Add support for votable gdscs

2015-12-01 Thread Rajendra Nayak
boot, if these GDSCs are found to be ON, we make sure we vote for them before we inform the genpd framework about their status. If genpd gets no users, it then disables (removes the vote) them as part of genpd_poweroff_unused() Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/gdsc.c | 18

[PATCH v2 4/6] clk: qcom: gdsc: Add GDSCs in msm8996 GCC

2015-12-01 Thread Rajendra Nayak
Add all data for the GDSCs which are part of msm8996 GCC block Signed-off-by: Rajendra Nayak --- arch/arm64/boot/dts/qcom/msm8996.dtsi| 1 + drivers/clk/qcom/gcc-msm8996.c | 92 include/dt-bindings/clock/qcom,gcc-msm8996.h | 11 3 files

[PATCH v2 6/6] clk: qcom: mmcc8974: Use gdscs .parent and remove genpd calls

2015-12-01 Thread Rajendra Nayak
With gdsc driver capable of handling hierarchical power domains, specify oxili_gdsc as parent of oxilicx_gdsc. Remove all direct calls to genpd from the mmcc clock driver. The adding and removing of subdomains is now handled from within the gdsc driver. Signed-off-by: Rajendra Nayak

[PATCH v2 0/6] Add support for MSM8996 GDSCs

2015-12-01 Thread Rajendra Nayak
re all modelled gdscs can be turned on/off successfully Rajendra Nayak (6): clk: qcom: gdsc: Add support for hierarchical power domains clk: qcom: gdsc: Add support for gdscs with gds hw controller clk: qcom: gdsc: Add support for votable gdscs clk: qcom: gdsc: Add GDSCs in msm8996 GCC clk:

[PATCH v2 5/6] clk: qcom: gdsc: Add mmcc gdscs for msm8996 family

2015-12-01 Thread Rajendra Nayak
Add all gdsc data which are part of mmcc on msm8996 family Signed-off-by: Rajendra Nayak --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 1 + drivers/clk/qcom/mmcc-msm8996.c | 157 ++ include/dt-bindings/clock/qcom,mmcc-msm8996.h | 17 +++ 3 files

[PATCH v2] arm64: dts: qcom: Add apq8096 dragonboard dts skeletons

2015-12-01 Thread Rajendra Nayak
Add new dtsi and dts files for the apq8096 dragonboards with just a serial device used as debug console While at it, also rearrange the Makefile so we have one dtb per line so as to be consistent with whats done on other platforms. Signed-off-by: Rajendra Nayak --- arch/arm64/boot/dts/qcom

Re: [PATCH 2/6] clk: qcom: gdsc: Add support for gdscs with gds hw controller

2015-12-01 Thread Rajendra Nayak
[].. >> >> return -ETIMEDOUT; >> >> } >> >> >> >> @@ -165,6 +169,7 @@ static int gdsc_init(struct gdsc *sc) >> >> { >> >> u32 mask, val; >> >> int on, ret; >> >> + unsigned int reg; >> >> >> >> /* >> >>* Disable HW trigger: collapse/restore occur based on registers >> writes. >> >> @

Re: [PATCH 2/6] clk: qcom: gdsc: Add support for gdscs with gds hw controller

2015-11-30 Thread Rajendra Nayak
On 12/01/2015 07:52 AM, Stephen Boyd wrote: > On 11/26, Rajendra Nayak wrote: >> @@ -58,30 +58,34 @@ static int gdsc_toggle_logic(struct gdsc *sc, bool en) >> { >> int ret; >> u32 val = en ? 0 : SW_COLLAPSE_MASK; >> -u32 check = en ? PWR_ON_MASK :

Re: [PATCH 5/6] clk: qcom: gdsc: Do not check for disabled status on votable gdscs

2015-11-30 Thread Rajendra Nayak
On 12/01/2015 07:23 AM, Stephen Boyd wrote: > On 11/26, Rajendra Nayak wrote: >> Some gdscs might be controlled via voting registers and might not >> really disable when the kernel intends to disable them (due to other >> votes keeping them enabled) >> Mark these gdsc

Re: arm64: dts: qcom: Add apq8096 dragonboard dts skeletons

2015-11-30 Thread Rajendra Nayak
On 12/01/2015 05:18 AM, Stephen Boyd wrote: > On 11/26, Rajendra Nayak wrote: >> Add new dtsi and dts files for the apq8096 dragonboards with just >> a serial device used as debug console >> >> Signed-off-by: Rajendra Nayak >> --- >> Patch applies on top o

Re: [PATCH v4 1/8] thermal: qcom: tsens: Add a skeletal TSENS drivers

2015-11-29 Thread Rajendra Nayak
[].. >>> +Optional properties: >>> +- qcom,sensor-id: List of sensor instances used in a given SoC. A TSENS IP >>> can >>> + have a fixed number of sensors (like 11) but a given SoC can >>> + use only 5 of these and they might not always the first 5. >>> They >>> +

Re: [PATCH v8 11/13] clk: qcom: gdsc: Use PM clocks to control gdsc clocks

2015-11-27 Thread Rajendra Nayak
Hi Stephen, >> +static int gdsc_attach(struct generic_pm_domain *domain, struct device >> *dev) >> +{ >> +int ret, i = 0, j = 0; >> +struct gdsc *sc = domain_to_gdsc(domain); >> +struct of_phandle_args clkspec; >> +struct device_node *np = dev->of_node; >> + >> +if (!sc->clock_

[PATCH 5/6] clk: qcom: gdsc: Do not check for disabled status on votable gdscs

2015-11-25 Thread Rajendra Nayak
-off-by: Rajendra Nayak --- drivers/clk/qcom/gcc-msm8996.c | 4 drivers/clk/qcom/gdsc.c | 4 drivers/clk/qcom/gdsc.h | 15 --- drivers/clk/qcom/mmcc-msm8996.c | 3 +++ 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/drivers/clk/qcom/gcc

[PATCH 2/6] clk: qcom: gdsc: Add support for gdscs with gds hw controller

2015-11-25 Thread Rajendra Nayak
MMU operations or pending bus transactions before the power domain is turned off. In gdscs with gds_hw_controller block, its necessary to check the gds_hw_ctrl status bits instead of the ones in gdscr, to determine the state of the powerdomain. Signed-off-by: Rajendra Nayak --- drivers/clk/qcom

[PATCH 3/6] clk: qcom: gdsc: Add GDSCs in msm8996 GCC

2015-11-25 Thread Rajendra Nayak
Add all data for the GDSCs which are part of msm8996 GCC block Signed-off-by: Rajendra Nayak --- arch/arm64/boot/dts/qcom/msm8996.dtsi| 1 + drivers/clk/qcom/gcc-msm8996.c | 88 include/dt-bindings/clock/qcom,gcc-msm8996.h | 11 3 files

[PATCH 0/6] Add support for MSM8996 GDSCs

2015-11-25 Thread Rajendra Nayak
s not yet add support for gpu gdscs which are part of mmcc. Tested on apq8096 dragonboards to make sure all modelled gdscs can be turned on/off successfully. [1] https://lkml.org/lkml/2015/11/17/949 Rajendra Nayak (6): clk: qcom: gdsc: Add support for hierarchical power domains clk: qcom:

[PATCH 1/6] clk: qcom: gdsc: Add support for hierarchical power domains

2015-11-25 Thread Rajendra Nayak
Some qcom SoCs' can have hierarchical power domains. Let the gdsc structs specify the parents (if any) and the driver add genpd subdomains for them. Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/common.c | 14 +- drivers/clk/qcom/gdsc.c

[PATCH 4/6] clk: qcom: gdsc: Add mmcc gdscs for msm8996 family

2015-11-25 Thread Rajendra Nayak
Add all gdsc data which are part of mmcc on msm8996 family Signed-off-by: Rajendra Nayak --- arch/arm64/boot/dts/qcom/msm8996.dtsi | 1 + drivers/clk/qcom/mmcc-msm8996.c | 154 ++ include/dt-bindings/clock/qcom,mmcc-msm8996.h | 17 +++ 3 files

arm64: dts: qcom: Add apq8096 dragonboard dts skeletons

2015-11-25 Thread Rajendra Nayak
Add new dtsi and dts files for the apq8096 dragonboards with just a serial device used as debug console Signed-off-by: Rajendra Nayak --- Patch applies on top of Stephens' patches to add msm8996 dtsi https://lkml.org/lkml/2015/11/17/955 arch/arm64/boot/dts/qcom/Makefile

[PATCH 6/6] clk: qcom: mmcc8974: Use gdscs .parent and remove genpd calls

2015-11-25 Thread Rajendra Nayak
With gdsc driver capable of handling hierarchical power domains, specify oxili_gdsc as parent of oxilicx_gdsc. Remove all direct calls to genpd from the mmcc clock driver. The adding and removing of subdomains is now handled from within the gdsc driver. Signed-off-by: Rajendra Nayak

Re: [PATCH 2/4] arm64: dts: Add msm8996 SoC and MTP board support

2015-11-23 Thread Rajendra Nayak
On 11/18/2015 06:42 AM, Stephen Boyd wrote: > Add initial device tree support for the Qualcomm MSM8996 SoC and > MTP8996 evaluation board. > > Signed-off-by: Stephen Boyd > --- []... > + > + spmi_bus: qcom,spmi@400f000 { > + compatible = "qcom,spmi-pmic-arb"; > +

Re: [PATCH 0/5] Add support for MSM8996 clock controllers

2015-11-17 Thread Rajendra Nayak
is still pending, mostly adding GDSCs and configuring the I have the GDSC support patches done on top. Will post once I get some reasonable testing done. > multimedia PLLs for FSM voting mode vs. manually enabling and > disabling them. So a v2 is probably going to come out after > some

Re: [PATCH v2 2/2] clk: qcom: Make oxili GDSC parent of oxili_cx GDSC

2015-11-12 Thread Rajendra Nayak
On 11/13/2015 11:44 AM, Stephen Boyd wrote: > On 11/13, Rajendra Nayak wrote: >> >> On 10/07/2015 01:02 AM, Stephen Boyd wrote: >>> On 10/01, Stephen Boyd wrote: >>>> The oxili_cx GDSC is inside the power domain of the oxili GDSC. >>>> Add the dep

Re: [PATCH v2 2/2] clk: qcom: Make oxili GDSC parent of oxili_cx GDSC

2015-11-12 Thread Rajendra Nayak
On 10/07/2015 01:02 AM, Stephen Boyd wrote: > On 10/01, Stephen Boyd wrote: >> The oxili_cx GDSC is inside the power domain of the oxili GDSC. >> Add the dependency so that the CX domain can properly power up. >> >> Reported-by: Rob Clark >> Cc: Rajendra Naya

Re: [PATCH v4 0/8] qcom: Add support for TSENS driver

2015-11-05 Thread Rajendra Nayak
On 11/03/2015 02:24 AM, Eduardo Valentin wrote: > On Fri, Oct 09, 2015 at 03:11:02PM +0530, Rajendra Nayak wrote: >> Patches 1/8 to 4/8 will need to go via the thermal tree/Eduardo. >> Patches 5/8 to 8/8 will need to go via qcom-msm tree/Andy. >> >> Eduardo, can yo

Re: [PATCH v4 4/8] thermal: qcom: tsens-8960: Add support for 8960 family of SoCs

2015-11-05 Thread Rajendra Nayak
On 11/03/2015 02:21 AM, Eduardo Valentin wrote: > On Fri, Oct 09, 2015 at 03:11:06PM +0530, Rajendra Nayak wrote: >> 8960 family of SoCs have the TSENS device as part of GCC, hence >> the driver probes the virtual child device created by GCC and >> uses the parent to extract

Re: [PATCH v4 2/8] thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

2015-11-04 Thread Rajendra Nayak
On 11/03/2015 02:12 AM, Eduardo Valentin wrote: > On Fri, Oct 09, 2015 at 03:11:04PM +0530, Rajendra Nayak wrote: >> Add support to calibrate sensors on 8916 family and also add common >> functions to read temperature from sensors (This can be reused on >> other SoCs having

Re: [PATCH v4 1/8] thermal: qcom: tsens: Add a skeletal TSENS drivers

2015-11-04 Thread Rajendra Nayak
On 11/03/2015 02:00 AM, Eduardo Valentin wrote: > Hello Rajendra, > > On Fri, Oct 09, 2015 at 03:11:03PM +0530, Rajendra Nayak wrote: > > > >> +- #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description. >> +- Refer to Documentation/devicetree/bi

Re: [PATCH v4 0/8] qcom: Add support for TSENS driver

2015-11-04 Thread Rajendra Nayak
Hi Eduardo, On 11/03/2015 01:43 AM, Eduardo Valentin wrote: > Rajendra, > > On Fri, Oct 09, 2015 at 03:11:02PM +0530, Rajendra Nayak wrote: >> Patches 1/8 to 4/8 will need to go via the thermal tree/Eduardo. >> Patches 5/8 to 8/8 will need to go via qcom-msm tree/Andy. &

[PATCH v4 1/8] thermal: qcom: tsens: Add a skeletal TSENS drivers

2015-10-09 Thread Rajendra Nayak
riety of qcom device families which support TSENS can add driver extensions. Also add the required device tree bindings which can be used to describe the TSENS device in DT. Signed-off-by: Rajendra Nayak Reviewed-by: Lina Iyer --- .../devicetree/bindings/thermal/qcom-tsens.txt

[PATCH v4 2/8] thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

2015-10-09 Thread Rajendra Nayak
Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8916.c | 107 + drivers/thermal/qcom/tsens-common.c | 130 drivers/thermal/qcom/tsens.c

[PATCH v4 6/8] arm: dts: apq8064: Add thermal zones, tsens and qfprom nodes

2015-10-09 Thread Rajendra Nayak
TSENS is part of GCC, hence add TSENS properties as part of GCC node. Also add thermal zones and qfprom nodes. Update GCC bindings doc to mention the possibility of optional TSENS properties that can be part of GCC node. Cc: Andy Gross Signed-off-by: Rajendra Nayak --- .../devicetree/bindings

[PATCH v4 8/8] arm64: dts: msm8916: Add thermal zones, tsens and qfprom nodes

2015-10-09 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Cc: Andy Gross Signed-off-by: Rajendra Nayak --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 66 +++ 1 file changed, 66 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916

[PATCH v4 5/8] arm: dts: msm8974: Add thermal zones, tsens and qfprom nodes

2015-10-09 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Cc: Andy Gross Signed-off-by: Rajendra Nayak --- arch/arm/boot/dts/qcom-msm8974.dtsi | 105 1 file changed, 105 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi

[PATCH v4 7/8] arm: dts: apq8084: Add thermal zones, tsens and qfprom nodes

2015-10-09 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Cc: Andy Gross Signed-off-by: Rajendra Nayak --- arch/arm/boot/dts/qcom-apq8084.dtsi | 105 1 file changed, 105 insertions(+) diff --git a/arch/arm/boot/dts/qcom-apq8084.dtsi b/arch/arm/boot/dts/qcom-apq8084.dtsi

[PATCH v4 4/8] thermal: qcom: tsens-8960: Add support for 8960 family of SoCs

2015-10-09 Thread Rajendra Nayak
bootloaders) 8660 from the same family has just one sensor and hence some register offset/layout differences which need special handling in the driver. Based on the original code from Siddartha Mohanadoss, Stephen Boyd and Narendran Rajan. Signed-off-by: Rajendra Nayak --- drivers/thermal/qcom/Makefile

[PATCH v4 3/8] thermal: qcom: tsens-8974: Add support for 8974 family of SoCs

2015-10-09 Thread Rajendra Nayak
Add .calibrate support for 8974 family as part of tsens_ops. Based on the original code by Siddartha Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8974.c | 239

[PATCH v4 0/8] qcom: Add support for TSENS driver

2015-10-09 Thread Rajendra Nayak
ould be glad to change the authorship for any of the patches if needed. Rajendra Nayak (8): thermal: qcom: tsens: Add a skeletal TSENS drivers thermal: qcom: tsens-8916: Add support for 8916 family of SoCs thermal: qcom: tsens-8974: Add support for 8974 family of SoCs thermal: qcom: tsens-89

Re: [PATCH v3 4/9] clk: qcom: create virtual child device for TSENS

2015-10-08 Thread Rajendra Nayak
On 10/09/2015 04:51 AM, Stephen Boyd wrote: > On 10/08, Rajendra Nayak wrote: >> 8960 family of devices have TSENS as part of GCC in hardware. >> Hence DT would represent a GCC node with GCC properties as well >> as TSENS. Create a virtual platform child device here for TSENS

Re: [PATCH] clk: qcom: Drop calls to qcom_cc_remove()

2015-10-08 Thread Rajendra Nayak
On 10/08/2015 12:47 PM, Stephen Boyd wrote: > Now that qcom_cc_remove() is a nop, drop calls to > qcom_cc_remove() and any empty driver remove functions. > > Signed-off-by: Stephen Boyd > --- > > And here's the driver part. I left 8960_remove in place to make your patch > easier to apply. Time t

Re: [PATCH v3 5/9] thermal: qcom: tsens-8960: Add support for 8960 family of SoCs

2015-10-08 Thread Rajendra Nayak
On 10/08/2015 11:42 AM, Stephen Boyd wrote: > On 10/08, Rajendra Nayak wrote: >> diff --git a/drivers/thermal/qcom/Makefile b/drivers/thermal/qcom/Makefile >> index a471100..f3cefd1 100644 >> --- a/drivers/thermal/qcom/Makefile >> +++ b/drivers/thermal/qcom/Makefile

Re: [PATCH v3 4/9] clk: qcom: create virtual child device for TSENS

2015-10-08 Thread Rajendra Nayak
On 10/08/2015 11:35 AM, Stephen Boyd wrote: > On 10/08, Rajendra Nayak wrote: >> @@ -3520,11 +3522,26 @@ static int gcc_msm8960_probe(struct platform_device >> *pdev) >> if (IS_ERR(clk)) >> return PTR_ERR(clk); >> >> -return qcom_c

Re: [PATCH v2 2/9] thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

2015-10-07 Thread Rajendra Nayak
On 09/21/2015 09:58 AM, Rajendra Nayak wrote: > [].. > >>> +static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s) >>> +{ >>> +int degc, num, den; >>> + >>> +num = (adc_code * SLOPE_FACTOR) - s->offse

[PATCH v3 7/9] arm: dts: apq8064: Add thermal zones, tsens and qfprom nodes

2015-10-07 Thread Rajendra Nayak
TSENS is part of GCC, hence add TSENS properties as part of GCC node. Also add thermal zones and qfprom nodes. Cc: Andy Gross Signed-off-by: Rajendra Nayak --- arch/arm/boot/dts/qcom-apq8064.dtsi | 101 1 file changed, 101 insertions(+) diff --git a/arch

[PATCH v3 9/9] arm64: dts: msm8916: Add thermal zones, tsens and qfprom nodes

2015-10-07 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Cc: Andy Gross Signed-off-by: Rajendra Nayak --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 66 +++ 1 file changed, 66 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916

[PATCH v3 8/9] arm: dts: apq8084: Add thermal zones, tsens and qfprom nodes

2015-10-07 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Cc: Andy Gross Signed-off-by: Rajendra Nayak --- arch/arm/boot/dts/qcom-apq8084.dtsi | 105 1 file changed, 105 insertions(+) diff --git a/arch/arm/boot/dts/qcom-apq8084.dtsi b/arch/arm/boot/dts/qcom-apq8084.dtsi

[PATCH v3 1/9] thermal: qcom: tsens: Add a skeletal TSENS drivers

2015-10-07 Thread Rajendra Nayak
riety of qcom device families which support TSENS can add driver extensions. Also add the required device tree bindings which can be used to describe the TSENS device in DT. Signed-off-by: Rajendra Nayak Reviewed-by: Lina Iyer --- .../devicetree/bindings/thermal/qcom-tsens.txt

[PATCH v3 3/9] thermal: qcom: tsens-8974: Add support for 8974 family of SoCs

2015-10-07 Thread Rajendra Nayak
Add .calibrate support for 8974 family as part of tsens_ops. Based on the original code by Siddartha Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8974.c | 239

[PATCH v3 2/9] thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

2015-10-07 Thread Rajendra Nayak
Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8916.c | 107 + drivers/thermal/qcom/tsens-common.c | 130 drivers/thermal/qcom/tsens.c

[PATCH v3 6/9] arm: dts: msm8974: Add thermal zones, tsens and qfprom nodes

2015-10-07 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Cc: Andy Gross Signed-off-by: Rajendra Nayak --- arch/arm/boot/dts/qcom-msm8974.dtsi | 105 1 file changed, 105 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi

[PATCH v3 4/9] clk: qcom: create virtual child device for TSENS

2015-10-07 Thread Rajendra Nayak
Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/gcc-msm8960.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c index aa294b1..86d85e5 100644 --- a/drivers/clk/qcom/gcc-msm8960.c +++ b/drivers

[PATCH v3 0/9] qcom: Add support for TSENS driver

2015-10-07 Thread Rajendra Nayak
round quite a bit in an effort to have a single driver for the various devices. I would be glad to change the authorship for any of the patches if needed. Rajendra Nayak (9): thermal: qcom: tsens: Add a skeletal TSENS drivers thermal: qcom: tsens-8916: Add support for 8916 family of SoCs th

[PATCH v3 5/9] thermal: qcom: tsens-8960: Add support for 8960 family of SoCs

2015-10-07 Thread Rajendra Nayak
bootloaders) 8660 from the same family has just one sensor and hence some register offset/layout differences which need special handling in the driver. Based on the original code from Siddartha Mohanadoss, Stephen Boyd and Narendran Rajan. Signed-off-by: Rajendra Nayak --- drivers/thermal/qcom/Makefile

Re: [PATCH] clk: qcom: Make oxili GDSC parent of oxili_cx GDSC

2015-10-04 Thread Rajendra Nayak
[]... >>> It would also be nicer if this parent/child relationship can >>> somehow be represented in data (struct gdsc) that gets passed to >>> the gdsc driver which then sets it up, instead of individual >>> clock drivers doing it. >> >> Agreed. I'd rather that we do nothing besides register doma

[PATCH] arm: dts: qcom: Add #power-domain-cells property

2015-10-01 Thread Rajendra Nayak
clock controller nodes which also support power domains (gdscs') need to have a #power-domain-cells property. Add these for gcc and mmcc nodes of msm8974, gcc of apq8084 and msm8916. Also update gcc and mmcc bindings for it. Signed-off-by: Rajendra Nayak --- Andy, the rest of the power d

Re: [PATCH] clk: qcom: Make oxili GDSC parent of oxili_cx GDSC

2015-10-01 Thread Rajendra Nayak
On 09/24/2015 12:39 AM, Stephen Boyd wrote: The oxili_cx GDSC is inside the power domain of the oxili GDSC. Add the dependency so that the CX domain can properly power up. Reported-by: Rob Clark Cc: Rajendra Nayak Signed-off-by: Stephen Boyd --- drivers/clk/qcom/mmcc-msm8974.c | 10

Re: [PATCH v2 4/9] clk: qcom: create virtual child device for TSENS

2015-09-20 Thread Rajendra Nayak
On 09/17/2015 04:09 AM, Stephen Boyd wrote: On 09/16, Rajendra Nayak wrote: @@ -3520,7 +3522,26 @@ static int gcc_msm8960_probe(struct platform_device *pdev) if (IS_ERR(clk)) return PTR_ERR(clk); - return qcom_cc_probe(pdev, match->data); +

Re: [PATCH v2 2/9] thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

2015-09-20 Thread Rajendra Nayak
[].. +static inline int code_to_degc(u32 adc_code, const struct tsens_sensor *s) +{ + int degc, num, den; + + num = (adc_code * SLOPE_FACTOR) - s->offset; + den = s->slope; + + if (num > 0) + degc = num + (den / 2); + else if (num < 0) +

Re: [PATCH v2 1/9] thermal: qcom: tsens: Add a skeletal TSENS drivers

2015-09-20 Thread Rajendra Nayak
[].. +Example: +tsens: thermal-sensor@90 { + compatible = "qcom,msm8916-tsens"; + qcom,tsens-slopes = <1176 1176 1154 1176 + 1132 1132 1199 1132 1199 + 1132>; + nvmem-cells = <&tsens_ca

[PATCH v2 8/9] arm: dts: apq8084: Add thermal zones, tsens and qfprom nodes

2015-09-15 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Signed-off-by: Rajendra Nayak --- arch/arm/boot/dts/qcom-apq8084.dtsi | 105 1 file changed, 105 insertions(+) diff --git a/arch/arm/boot/dts/qcom-apq8084.dtsi b/arch/arm/boot/dts/qcom-apq8084.dtsi index 0554fbd

[PATCH v2 0/9] qcom: Add support for TSENS driver

2015-09-15 Thread Rajendra Nayak
would be glad to change the authorship for any of the patches if needed. Rajendra Nayak (9): thermal: qcom: tsens: Add a skeletal TSENS drivers thermal: qcom: tsens-8916: Add support for 8916 family of SoCs thermal: qcom: tsens-8974: Add support for 8974 family of SoCs clk: qcom: create vi

[PATCH v2 5/9] thermal: qcom: tsens-8960: Add support for 8960 family of SoCs

2015-09-15 Thread Rajendra Nayak
bootloaders) 8660 from the same family has just one sensor and hence some register offset/layout differences which need special handling in the driver. Based on the original code from Siddartha Mohanadoss, Stephen Boyd and Narendran Rajan. Signed-off-by: Rajendra Nayak --- drivers/thermal/qcom/Makefile

[PATCH v2 3/9] thermal: qcom: tsens-8974: Add support for 8974 family of SoCs

2015-09-15 Thread Rajendra Nayak
Add .calibrate support for 8974 family as part of tsens_ops. Based on the original code by Siddartha Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8974.c | 239

[PATCH v2 7/9] arm: dts: apq8064: Add thermal zones, tsens and qfprom nodes

2015-09-15 Thread Rajendra Nayak
TSENS is part of GCC, hence add TSENS properties as part of GCC node. Also add thermal zones and qfprom nodes. Signed-off-by: Rajendra Nayak --- arch/arm/boot/dts/qcom-apq8064.dtsi | 101 1 file changed, 101 insertions(+) diff --git a/arch/arm/boot/dts/qcom

[PATCH v2 9/9] arm64: dts: msm8916: Add thermal zones, tsens and qfprom nodes

2015-09-15 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Signed-off-by: Rajendra Nayak --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 66 +++ 1 file changed, 66 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 3e7083c

[PATCH v2 6/9] arm: dts: msm8974: Add thermal zones, tsens and qfprom nodes

2015-09-15 Thread Rajendra Nayak
Add thermal zones, tsens and qfprom nodes Signed-off-by: Rajendra Nayak --- arch/arm/boot/dts/qcom-msm8974.dtsi | 105 1 file changed, 105 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom-msm8974.dtsi index ab8e572

[PATCH v2 2/9] thermal: qcom: tsens-8916: Add support for 8916 family of SoCs

2015-09-15 Thread Rajendra Nayak
Mohanadoss and Stephen Boyd. Signed-off-by: Rajendra Nayak --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/tsens-8916.c | 107 + drivers/thermal/qcom/tsens-common.c | 130 drivers/thermal/qcom/tsens.c

[PATCH v2 4/9] clk: qcom: create virtual child device for TSENS

2015-09-15 Thread Rajendra Nayak
Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/gcc-msm8960.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c index aa294b1..51db3a5 100644 --- a/drivers/clk/qcom/gcc-msm8960.c +++ b

[PATCH v2 1/9] thermal: qcom: tsens: Add a skeletal TSENS drivers

2015-09-15 Thread Rajendra Nayak
riety of qcom device families which support TSENS can add driver extensions. Also add the required device tree bindings which can be used to describe the TSENS device in DT. Signed-off-by: Rajendra Nayak Reviewed-by: Lina Iyer --- .../devicetree/bindings/thermal/qcom-tsens.txt

Re: [PATCH 5/9] clk: qcom: gcc-msm8960: add child devices support.

2015-09-08 Thread Rajendra Nayak
On 09/09/2015 09:03 AM, Rajendra Nayak wrote: On 09/09/2015 12:51 AM, Stephen Boyd wrote: On 09/07, Rajendra Nayak wrote: Yeah this might happen though because we've assigned the of_node pointer to the tsens device before we register it on the platform bus. The other way to pass that

Re: [PATCH 5/9] clk: qcom: gcc-msm8960: add child devices support.

2015-09-08 Thread Rajendra Nayak
On 09/09/2015 12:51 AM, Stephen Boyd wrote: On 09/07, Rajendra Nayak wrote: Yeah this might happen though because we've assigned the of_node pointer to the tsens device before we register it on the platform bus. The other way to pass that data down from gcc to tsens would be to not ha

Re: [PATCH 5/9] clk: qcom: gcc-msm8960: add child devices support.

2015-09-06 Thread Rajendra Nayak
[].. No. The driver should work just fine without having to interrogate the device's compatible string. If we still need the compatible check for some reason, then we can always match based on qcom,gcc-msm8960, qcom,gcc-apq8064, etc. But I don't see why Thats not quite possible I guess. 2 driv

Re: [PATCH 5/9] clk: qcom: gcc-msm8960: add child devices support.

2015-09-01 Thread Rajendra Nayak
Stephen, Also, I don't like having a subnode in DT. Why can't we use the same node as the GCC node and create a virtual child device here for tsens? We can assign the same of_node that this platform device has so that DT keeps working correctly. So the current driver looks up data based on com

Re: [PATCH 5/9] clk: qcom: gcc-msm8960: add child devices support.

2015-08-13 Thread Rajendra Nayak
[].. Also, I don't like having a subnode in DT. Why can't we use the same node as the GCC node and create a virtual child device here for tsens? We can assign the same of_node that this platform device has so that DT keeps working correctly. So the current driver looks up data based on compatib

Re: [PATCH 5/9] clk: qcom: gcc-msm8960: add child devices support.

2015-08-12 Thread Rajendra Nayak
On 11/08/15 23:49, Stephen Boyd wrote: On 07/08, Rajendra Nayak wrote: diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c index eb6a4f9..2c80d03 100644 --- a/drivers/clk/qcom/gcc-msm8960.c +++ b/drivers/clk/qcom/gcc-msm8960.c @@ -15,6 +15,7 @@ #include #include

Re: [PATCH v8 10/13] arm: dts: qcom: Add #power-domain-cells property

2015-08-12 Thread Rajendra Nayak
On 08/11/2015 12:23 PM, Stephen Boyd wrote: On 08/06, Rajendra Nayak wrote: msm8974 has gcc and mmcc nodes, and apq8084 has a gcc node which implement gdsc powerdomains. Add the #power-domain-cells property to them. Signed-off-by: Rajendra Nayak --- This needs to go through Andy's tre

Re: [PATCH v8 11/13] clk: qcom: gdsc: Use PM clocks to control gdsc clocks

2015-08-12 Thread Rajendra Nayak
On 08/11/2015 12:22 PM, Stephen Boyd wrote: On 08/06, Rajendra Nayak wrote: + +static int gdsc_attach(struct generic_pm_domain *domain, struct device *dev) +{ + int ret, i = 0, j = 0; + struct gdsc *sc = domain_to_gdsc(domain); + struct of_phandle_args clkspec; + struct

[PATCH v8 06/13] clk: qcom: gdsc: Add GDSCs in msm8974 GCC

2015-08-06 Thread Rajendra Nayak
From: Stephen Boyd There's just one GDSC as part of the msm8974 GCC block. Signed-off-by: Stephen Boyd Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/gcc-msm8974.c | 15 +++ include/dt-bindings/clock/qco

[PATCH v8 05/13] clk: qcom: gdsc: Add GDSCs in msm8916 GCC

2015-08-06 Thread Rajendra Nayak
Add all data for the GDSCs which are part of msm8916 GCC block. Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/gcc-msm8916.c | 51 include/dt-bindings/clock/qcom,gcc-msm8916.h | 8 + 3 files

[PATCH v8 04/13] clk: qcom: gdsc: Add support for ON only state

2015-08-06 Thread Rajendra Nayak
ert reset lines every time the client driver would request the GDSC to be powered on/off instead. Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/common.c | 3 ++- drivers/clk/qcom/gdsc.c | 35 ++- drivers/clk/qcom/gdsc.h | 11 ++- 3 files changed, 46 i

[PATCH v8 07/13] clk: qcom: gdsc: Add GDSCs in msm8974 MMCC

2015-08-06 Thread Rajendra Nayak
From: Stephen Boyd Add the GDSC instances that exist as part of msm8974 MMCC block Signed-off-by: Stephen Boyd Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/mmcc-msm8974.c | 72 +++ include/dt

[PATCH v8 08/13] clk: qcom: gdsc: Add GDSCs in apq8084 GCC

2015-08-06 Thread Rajendra Nayak
Add the GDSC instances that exist as part of apq8084 GCC block Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/gcc-apq8084.c | 42 include/dt-bindings/clock/qcom,gcc-apq8084.h | 6 3 files

[PATCH v8 11/13] clk: qcom: gdsc: Use PM clocks to control gdsc clocks

2015-08-06 Thread Rajendra Nayak
. Use PM clocks to add support for this. A list of clock ids specified per gdsc would be the clocks turned on/off on every device start/stop callbacks. Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/gdsc.c | 58 + drivers/clk/qcom/gdsc.h | 7

[PATCH v8 12/13] clk: qcom: gdsc: Enable an RCG before turing on the gdsc

2015-08-06 Thread Rajendra Nayak
Some gdsc instances require a certain root clock (RCG) to be turned on *before* the power domain itself can be turned on. Handle this as part of the gdsc enable/disable callbacks. Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/gcc-msm8916.c | 1 + drivers/clk/qcom/gdsc.c| 14

[PATCH v8 13/13] clk: qcom: gdsc: Manage clocks with !CONFIG_PM

2015-08-06 Thread Rajendra Nayak
() isn't appropriate here since we need to only manage clocks with valid power domain associations done via DT, instead of what pm_clk_add_notifier() does, which is manage clocks for all on SoC/off SoC devices associating all of them to a dummy power domain instead Signed-off-by: Rajendra

[PATCH v8 10/13] arm: dts: qcom: Add #power-domain-cells property

2015-08-06 Thread Rajendra Nayak
msm8974 has gcc and mmcc nodes, and apq8084 has a gcc node which implement gdsc powerdomains. Add the #power-domain-cells property to them. Signed-off-by: Rajendra Nayak --- arch/arm/boot/dts/qcom-apq8084.dtsi | 1 + arch/arm/boot/dts/qcom-msm8974.dtsi | 2 ++ arch/arm64/boot/dts/qcom

[PATCH v8 09/13] clk: qcom: gdsc: Add GDSCs in apq8084 MMCC

2015-08-06 Thread Rajendra Nayak
From: Stephane Viau Add the GDSC instances that exist as part of apq8084 MMCC block. Signed-off-by: Stephane Viau Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/Kconfig | 1 + drivers/clk/qcom/mmcc-apq8084.c | 86 ++- include/dt

[PATCH v8 03/13] clk: qcom: gdsc: Add support for Memory RET/OFF

2015-08-06 Thread Rajendra Nayak
s and considers just one RET state where all memory is retained. Futher work, if needed can support multiple different levels of RET state. Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/gdsc.c | 33 + drivers/clk/qcom/gdsc.h | 13 + 2 files ch

[PATCH v8 00/13] qcom: Add support for GDSCs

2015-08-06 Thread Rajendra Nayak
d gdsc_register() in gdsc.c Rajendra Nayak (9): clk: qcom: gdsc: Prepare common clk probe to register gdscs clk: qcom: gdsc: Add support for Memory RET/OFF clk: qcom: gdsc: Add support for ON only state clk: qcom: gdsc: Add GDSCs in msm8916 GCC clk: qcom: gdsc: Add GDSCs in apq8084 GCC

[PATCH v8 02/13] clk: qcom: gdsc: Prepare common clk probe to register gdscs

2015-08-06 Thread Rajendra Nayak
The common clk probe registers a clk provider and a reset controller. Update it to register a genpd provider using the gdsc data provided by each platform. Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/common.c | 15 ++- drivers/clk/qcom/common.h | 2 ++ 2 files changed, 16

[PATCH v8 01/13] clk: qcom: Add support for GDSCs

2015-08-06 Thread Rajendra Nayak
best to have the support added through the clock driver. Signed-off-by: Stephen Boyd Signed-off-by: Rajendra Nayak --- drivers/clk/qcom/Kconfig | 4 ++ drivers/clk/qcom/Makefile | 1 + drivers/clk/qcom/gdsc.c | 171 ++ drivers/clk/qcom/gdsc.h

Re: [PATCH v7 12/13] clk: qcom: gdsc: Add GDSCs in apq8084 MMCC

2015-08-06 Thread Rajendra Nayak
On 07/31/2015 08:24 PM, Stanimir Varbanov wrote: +static struct gdsc venus0_gdsc = { + .gdscr = 0x1024, + .pd = { + .name = "venus0", + }, + .pwrsts = PWRSTS_OFF_ON, + .con_ids = { NULL }, +}; + Rajendra, according to downstream kernel apq8084

Re: [PATCH v7 01/13] clk: qcom: Add support for GDSCs

2015-08-04 Thread Rajendra Nayak
On 08/04/2015 12:54 AM, Stephen Boyd wrote: On 07/28, Rajendra Nayak wrote: + +#define PWR_ON_MASKBIT(31) +#define EN_REST_WAIT_MASK GENMASK(23, 20) +#define EN_FEW_WAIT_MASK GENMASK(19, 16) +#define CLK_DIS_WAIT_MASK GENMASK(15, 12) This trips up some static

Re: [PATCH v7 01/13] clk: qcom: Add support for GDSCs

2015-08-04 Thread Rajendra Nayak
[].. +int gdsc_register(struct device *dev, struct gdsc **scs, size_t num, + struct regmap *regmap) +{ + int i, ret; + struct genpd_onecell_data *data; + + data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); + if (!data) + return -ENOMEM; +

Re: [PATCH v6 04/13] clk: qcom: gdsc: Manage clocks with !CONFIG_PM

2015-07-29 Thread Rajendra Nayak
> On 07/29, Rajendra Nayak wrote: >> >> On 07/29/2015 06:34 AM, Stephen Boyd wrote: >> > >> >Sorry, I read the thread and I tried to understand what was going on >> but >> >I'm still lost. Can you clarify further in the commit text somehow? &g

Re: [PATCH v9 0/9] Add simple NVMEM Framework via regmap.

2015-07-29 Thread Rajendra Nayak
an you please consider this as 4.3 material, AFAIK there are more than 3 drivers depending on this framework which are wating since last 2 merge windows. I have been testing these with the qcom tsens driver, and did test v9 as well, so feel free to add my tested by for the entire series, Te

  1   2   3   >