Re: [PATCH V3 5/5] Thermal: Add ST-Ericsson DB8500 thermal properties and platform data.
On 31 October 2012 10:18, viresh kumar wrote: > On Tue, Oct 30, 2012 at 10:19 PM, hongbo.zhang > wrote: >> From: "hongbo.zhang" > > Just a minor comment below. > >> This patch adds device tree properties for ST-Ericsson DB8500 thermal driver, >> also adds the platform data to support the old fashion. >> >> Signed-off-by: hongbo.zhang > > Reviewed-by: Viresh Kumar > >> --- >> arch/arm/boot/dts/dbx5x0.dtsi | 14 + >> arch/arm/boot/dts/snowball.dts | 31 ++ >> arch/arm/configs/u8500_defconfig | 4 +++ >> arch/arm/mach-ux500/board-mop500.c | 64 >> ++ >> 4 files changed, 113 insertions(+) > >> diff --git a/arch/arm/configs/u8500_defconfig >> b/arch/arm/configs/u8500_defconfig >> index cc5e7a8..34918c4 100644 >> --- a/arch/arm/configs/u8500_defconfig >> +++ b/arch/arm/configs/u8500_defconfig >> @@ -118,3 +118,7 @@ CONFIG_DEBUG_KERNEL=y >> CONFIG_DEBUG_INFO=y >> # CONFIG_FTRACE is not set >> CONFIG_DEBUG_USER=y >> +CONFIG_THERMAL=y >> +CONFIG_CPU_THERMAL=y >> +CONFIG_DB8500_THERMAL=y >> +CONFIG_DB8500_CPUFREQ_COOLING=y > > Have you entered these manually?? Or used make savedefconfig? Yes these are added manually, make savedefconfig should be better, but it seems the original defconfig file are not well generated by savedefconfig, this file will be changed too much if I use make savedefconfig. If this is an issue, I will inform the maintainer to update this. After consideration, for this time, I will use savedefconfig to find right places for my configs, discarding the other dis-order ones. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH V3 5/5] Thermal: Add ST-Ericsson DB8500 thermal properties and platform data.
On 31 October 2012 10:18, viresh kumar viresh.ku...@linaro.org wrote: On Tue, Oct 30, 2012 at 10:19 PM, hongbo.zhang hongbo.zh...@linaro.org wrote: From: hongbo.zhang hongbo.zh...@linaro.com Just a minor comment below. This patch adds device tree properties for ST-Ericsson DB8500 thermal driver, also adds the platform data to support the old fashion. Signed-off-by: hongbo.zhang hongbo.zh...@linaro.com Reviewed-by: Viresh Kumar viresh.ku...@linaro.org --- arch/arm/boot/dts/dbx5x0.dtsi | 14 + arch/arm/boot/dts/snowball.dts | 31 ++ arch/arm/configs/u8500_defconfig | 4 +++ arch/arm/mach-ux500/board-mop500.c | 64 ++ 4 files changed, 113 insertions(+) diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig index cc5e7a8..34918c4 100644 --- a/arch/arm/configs/u8500_defconfig +++ b/arch/arm/configs/u8500_defconfig @@ -118,3 +118,7 @@ CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_INFO=y # CONFIG_FTRACE is not set CONFIG_DEBUG_USER=y +CONFIG_THERMAL=y +CONFIG_CPU_THERMAL=y +CONFIG_DB8500_THERMAL=y +CONFIG_DB8500_CPUFREQ_COOLING=y Have you entered these manually?? Or used make savedefconfig? Yes these are added manually, make savedefconfig should be better, but it seems the original defconfig file are not well generated by savedefconfig, this file will be changed too much if I use make savedefconfig. If this is an issue, I will inform the maintainer to update this. After consideration, for this time, I will use savedefconfig to find right places for my configs, discarding the other dis-order ones. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH V3 5/5] Thermal: Add ST-Ericsson DB8500 thermal properties and platform data.
On Tue, Oct 30, 2012 at 10:19 PM, hongbo.zhang wrote: > From: "hongbo.zhang" Just a minor comment below. > This patch adds device tree properties for ST-Ericsson DB8500 thermal driver, > also adds the platform data to support the old fashion. > > Signed-off-by: hongbo.zhang Reviewed-by: Viresh Kumar > --- > arch/arm/boot/dts/dbx5x0.dtsi | 14 + > arch/arm/boot/dts/snowball.dts | 31 ++ > arch/arm/configs/u8500_defconfig | 4 +++ > arch/arm/mach-ux500/board-mop500.c | 64 > ++ > 4 files changed, 113 insertions(+) > diff --git a/arch/arm/configs/u8500_defconfig > b/arch/arm/configs/u8500_defconfig > index cc5e7a8..34918c4 100644 > --- a/arch/arm/configs/u8500_defconfig > +++ b/arch/arm/configs/u8500_defconfig > @@ -118,3 +118,7 @@ CONFIG_DEBUG_KERNEL=y > CONFIG_DEBUG_INFO=y > # CONFIG_FTRACE is not set > CONFIG_DEBUG_USER=y > +CONFIG_THERMAL=y > +CONFIG_CPU_THERMAL=y > +CONFIG_DB8500_THERMAL=y > +CONFIG_DB8500_CPUFREQ_COOLING=y Have you entered these manually?? Or used make savedefconfig? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH V3 5/5] Thermal: Add ST-Ericsson DB8500 thermal properties and platform data.
From: "hongbo.zhang" This patch adds device tree properties for ST-Ericsson DB8500 thermal driver, also adds the platform data to support the old fashion. Signed-off-by: hongbo.zhang --- arch/arm/boot/dts/dbx5x0.dtsi | 14 + arch/arm/boot/dts/snowball.dts | 31 ++ arch/arm/configs/u8500_defconfig | 4 +++ arch/arm/mach-ux500/board-mop500.c | 64 ++ 4 files changed, 113 insertions(+) diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi index 4b0e0ca..731086b 100644 --- a/arch/arm/boot/dts/dbx5x0.dtsi +++ b/arch/arm/boot/dts/dbx5x0.dtsi @@ -203,6 +203,14 @@ reg = <0x80157450 0xC>; }; + thermal@801573c0 { + compatible = "stericsson,db8500-thermal"; + reg = <0x801573c0 0x40>; + interrupts = <21 0x4>, <22 0x4>; + interrupt-names = "IRQ_HOTMON_LOW", "IRQ_HOTMON_HIGH"; + status = "disabled"; +}; + db8500-prcmu-regulators { compatible = "stericsson,db8500-prcmu-regulator"; @@ -660,5 +668,11 @@ ranges = <0 0x5000 0x400>; status = "disabled"; }; + + cpufreq-cooling { + compatible = "stericsson,db8500-cpufreq-cooling"; + status = "disabled"; +}; + }; }; diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts index 702c0ba..c6f85f0 100644 --- a/arch/arm/boot/dts/snowball.dts +++ b/arch/arm/boot/dts/snowball.dts @@ -99,6 +99,33 @@ status = "okay"; }; + prcmu@80157000 { + thermal@801573c0 { + num-trips = <4>; + + trip0-temp = <7>; + trip0-type = "active"; + trip0-cdev-num = <1>; + trip0-cdev-name0 = "thermal-cpufreq-0"; + + trip1-temp = <75000>; + trip1-type = "active"; + trip1-cdev-num = <1>; + trip1-cdev-name0 = "thermal-cpufreq-0"; + + trip2-temp = <8>; + trip2-type = "active"; + trip2-cdev-num = <1>; + trip2-cdev-name0 = "thermal-cpufreq-0"; + + trip3-temp = <85000>; + trip3-type = "critical"; + trip3-cdev-num = <0>; + + status = "okay"; +}; + }; + external-bus@5000 { status = "okay"; @@ -183,5 +210,9 @@ reg = <0x33>; }; }; + + cpufreq-cooling { + status = "okay"; + }; }; }; diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig index cc5e7a8..34918c4 100644 --- a/arch/arm/configs/u8500_defconfig +++ b/arch/arm/configs/u8500_defconfig @@ -118,3 +118,7 @@ CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_INFO=y # CONFIG_FTRACE is not set CONFIG_DEBUG_USER=y +CONFIG_THERMAL=y +CONFIG_CPU_THERMAL=y +CONFIG_DB8500_THERMAL=y +CONFIG_DB8500_CPUFREQ_COOLING=y diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 416d436..b03216b 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -229,6 +230,67 @@ static struct ab8500_platform_data ab8500_platdata = { }; /* + * Thermal Sensor + */ + +static struct resource db8500_thsens_resources[] = { + { + .name = "IRQ_HOTMON_LOW", + .start = IRQ_PRCMU_HOTMON_LOW, + .end= IRQ_PRCMU_HOTMON_LOW, + .flags = IORESOURCE_IRQ, + }, + { + .name = "IRQ_HOTMON_HIGH", + .start = IRQ_PRCMU_HOTMON_HIGH, + .end= IRQ_PRCMU_HOTMON_HIGH, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct db8500_thsens_platform_data db8500_thsens_data = { + .trip_points[0] = { + .temp = 7, + .type = THERMAL_TRIP_ACTIVE, + .cdev_name = { + [0] = "thermal-cpufreq-0", + }, + }, + .trip_points[1] = { + .temp = 75000, + .type = THERMAL_TRIP_ACTIVE, + .cdev_name = { +
[PATCH V3 5/5] Thermal: Add ST-Ericsson DB8500 thermal properties and platform data.
From: hongbo.zhang hongbo.zh...@linaro.com This patch adds device tree properties for ST-Ericsson DB8500 thermal driver, also adds the platform data to support the old fashion. Signed-off-by: hongbo.zhang hongbo.zh...@linaro.com --- arch/arm/boot/dts/dbx5x0.dtsi | 14 + arch/arm/boot/dts/snowball.dts | 31 ++ arch/arm/configs/u8500_defconfig | 4 +++ arch/arm/mach-ux500/board-mop500.c | 64 ++ 4 files changed, 113 insertions(+) diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi index 4b0e0ca..731086b 100644 --- a/arch/arm/boot/dts/dbx5x0.dtsi +++ b/arch/arm/boot/dts/dbx5x0.dtsi @@ -203,6 +203,14 @@ reg = 0x80157450 0xC; }; + thermal@801573c0 { + compatible = stericsson,db8500-thermal; + reg = 0x801573c0 0x40; + interrupts = 21 0x4, 22 0x4; + interrupt-names = IRQ_HOTMON_LOW, IRQ_HOTMON_HIGH; + status = disabled; +}; + db8500-prcmu-regulators { compatible = stericsson,db8500-prcmu-regulator; @@ -660,5 +668,11 @@ ranges = 0 0x5000 0x400; status = disabled; }; + + cpufreq-cooling { + compatible = stericsson,db8500-cpufreq-cooling; + status = disabled; +}; + }; }; diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts index 702c0ba..c6f85f0 100644 --- a/arch/arm/boot/dts/snowball.dts +++ b/arch/arm/boot/dts/snowball.dts @@ -99,6 +99,33 @@ status = okay; }; + prcmu@80157000 { + thermal@801573c0 { + num-trips = 4; + + trip0-temp = 7; + trip0-type = active; + trip0-cdev-num = 1; + trip0-cdev-name0 = thermal-cpufreq-0; + + trip1-temp = 75000; + trip1-type = active; + trip1-cdev-num = 1; + trip1-cdev-name0 = thermal-cpufreq-0; + + trip2-temp = 8; + trip2-type = active; + trip2-cdev-num = 1; + trip2-cdev-name0 = thermal-cpufreq-0; + + trip3-temp = 85000; + trip3-type = critical; + trip3-cdev-num = 0; + + status = okay; +}; + }; + external-bus@5000 { status = okay; @@ -183,5 +210,9 @@ reg = 0x33; }; }; + + cpufreq-cooling { + status = okay; + }; }; }; diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig index cc5e7a8..34918c4 100644 --- a/arch/arm/configs/u8500_defconfig +++ b/arch/arm/configs/u8500_defconfig @@ -118,3 +118,7 @@ CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_INFO=y # CONFIG_FTRACE is not set CONFIG_DEBUG_USER=y +CONFIG_THERMAL=y +CONFIG_CPU_THERMAL=y +CONFIG_DB8500_THERMAL=y +CONFIG_DB8500_CPUFREQ_COOLING=y diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 416d436..b03216b 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -16,6 +16,7 @@ #include linux/io.h #include linux/i2c.h #include linux/platform_data/i2c-nomadik.h +#include linux/platform_data/db8500_thermal.h #include linux/gpio.h #include linux/amba/bus.h #include linux/amba/pl022.h @@ -229,6 +230,67 @@ static struct ab8500_platform_data ab8500_platdata = { }; /* + * Thermal Sensor + */ + +static struct resource db8500_thsens_resources[] = { + { + .name = IRQ_HOTMON_LOW, + .start = IRQ_PRCMU_HOTMON_LOW, + .end= IRQ_PRCMU_HOTMON_LOW, + .flags = IORESOURCE_IRQ, + }, + { + .name = IRQ_HOTMON_HIGH, + .start = IRQ_PRCMU_HOTMON_HIGH, + .end= IRQ_PRCMU_HOTMON_HIGH, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct db8500_thsens_platform_data db8500_thsens_data = { + .trip_points[0] = { + .temp = 7, + .type = THERMAL_TRIP_ACTIVE, + .cdev_name = { + [0] = thermal-cpufreq-0, + }, + }, + .trip_points[1] = { +
Re: [PATCH V3 5/5] Thermal: Add ST-Ericsson DB8500 thermal properties and platform data.
On Tue, Oct 30, 2012 at 10:19 PM, hongbo.zhang hongbo.zh...@linaro.org wrote: From: hongbo.zhang hongbo.zh...@linaro.com Just a minor comment below. This patch adds device tree properties for ST-Ericsson DB8500 thermal driver, also adds the platform data to support the old fashion. Signed-off-by: hongbo.zhang hongbo.zh...@linaro.com Reviewed-by: Viresh Kumar viresh.ku...@linaro.org --- arch/arm/boot/dts/dbx5x0.dtsi | 14 + arch/arm/boot/dts/snowball.dts | 31 ++ arch/arm/configs/u8500_defconfig | 4 +++ arch/arm/mach-ux500/board-mop500.c | 64 ++ 4 files changed, 113 insertions(+) diff --git a/arch/arm/configs/u8500_defconfig b/arch/arm/configs/u8500_defconfig index cc5e7a8..34918c4 100644 --- a/arch/arm/configs/u8500_defconfig +++ b/arch/arm/configs/u8500_defconfig @@ -118,3 +118,7 @@ CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_INFO=y # CONFIG_FTRACE is not set CONFIG_DEBUG_USER=y +CONFIG_THERMAL=y +CONFIG_CPU_THERMAL=y +CONFIG_DB8500_THERMAL=y +CONFIG_DB8500_CPUFREQ_COOLING=y Have you entered these manually?? Or used make savedefconfig? -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/