* [PATCH 0/4] Add TMU support for Exynos7
@ 2014-11-14 11:17 Abhilash Kesavan
2014-11-14 11:17 ` [PATCH 1/4] thermal: exynos: add optional sclk support Abhilash Kesavan
` (4 more replies)
0 siblings, 5 replies; 21+ messages in thread
From: Abhilash Kesavan @ 2014-11-14 11:17 UTC (permalink / raw)
To: rui.zhang, edubezval, linux-pm
Cc: b.zolnierkie, amit.daniel, kesavan.abhilash
The Thermal Management Unit (TMU) in Exynos7 provides software-controlled
(thermal throttling) and hardware-controlled (thermal tripping) management
schemes.
There are several changes in terms of the register and bit offsets in the
Exynos7 TMU from that in older SoCs. There are also new bits, more trigger
levels and a special clock for TMU that has been introduced in Exynos7.
This patchset modifies the thermal driver to handle all these changes.
This series is based on linux-next(20141114) and tested on an Exynos7-based
espresso board.
Abhilash Kesavan (4):
thermal: exynos: add optional sclk support
thermal: exynos: add a triminfo_mask field in exynos_tmu_register
structure
thermal: exynos: modify the prototype for code_to_temp function
thermal: exynos: Add TMU support for Exynos7 SoC
.../devicetree/bindings/thermal/exynos-thermal.txt | 4 +
drivers/thermal/samsung/exynos_tmu.c | 106 ++++++++++++++----
drivers/thermal/samsung/exynos_tmu.h | 13 ++-
drivers/thermal/samsung/exynos_tmu_data.c | 117 ++++++++++++++++++++
drivers/thermal/samsung/exynos_tmu_data.h | 27 +++++
5 files changed, 247 insertions(+), 20 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 21+ messages in thread* [PATCH 1/4] thermal: exynos: add optional sclk support 2014-11-14 11:17 [PATCH 0/4] Add TMU support for Exynos7 Abhilash Kesavan @ 2014-11-14 11:17 ` Abhilash Kesavan 2014-11-14 11:18 ` [PATCH 2/4] thermal: exynos: add a triminfo_mask field in exynos_tmu_register structure Abhilash Kesavan ` (3 subsequent siblings) 4 siblings, 0 replies; 21+ messages in thread From: Abhilash Kesavan @ 2014-11-14 11:17 UTC (permalink / raw) To: rui.zhang, edubezval, linux-pm Cc: b.zolnierkie, amit.daniel, kesavan.abhilash Exynos7 has a special clock required for the functional operation of the TMU that is not present in earlier SoCs. Add support for this optional clock and update the binding documentation. Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> --- .../devicetree/bindings/thermal/exynos-thermal.txt | 3 ++ drivers/thermal/samsung/exynos_tmu.c | 29 ++++++++++++++++---- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt index ae738f5..2393eac 100644 --- a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt @@ -32,10 +32,13 @@ - clocks : The main clocks for TMU device -- 1. operational clock for TMU channel -- 2. optional clock to access the shared registers of TMU channel + -- 3. optional special clock for functional operation - clock-names : Thermal system clock name -- "tmu_apbif" operational clock for current TMU channel -- "tmu_triminfo_apbif" clock to access the shared triminfo register for current TMU channel + -- "tmu_sclk" clock for functional operation of the current TMU + channel - vtmu-supply: This entry is optional and provides the regulator node supplying voltage to TMU. If needed this entry can be placed inside board/platform specific dts file. diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 1e7d073..c8caf5b 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -48,6 +48,7 @@ * @lock: lock to implement synchronization. * @clk: pointer to the clock structure. * @clk_sec: pointer to the clock structure for accessing the base_second. + * @sclk: pointer to the clock structure for accessing the tmu special clk. * @temp_error1: fused value of the first point trim. * @temp_error2: fused value of the second point trim. * @regulator: pointer to the TMU regulator structure. @@ -62,7 +63,7 @@ struct exynos_tmu_data { enum soc_type soc; struct work_struct irq_work; struct mutex lock; - struct clk *clk, *clk_sec; + struct clk *clk, *clk_sec, *sclk; u8 temp_error1, temp_error2; struct regulator *regulator; struct thermal_sensor_conf *reg_conf; @@ -625,6 +626,17 @@ static int exynos_tmu_probe(struct platform_device *pdev) goto err_clk_sec; } + data->sclk = devm_clk_get(&pdev->dev, "tmu_sclk"); + if (IS_ERR(data->sclk)) { + dev_err(&pdev->dev, "Failed to get optional special clock\n"); + } else { + ret = clk_prepare_enable(data->sclk); + if (ret) { + dev_err(&pdev->dev, "Failed to enable special clock\n"); + goto err_clk; + } + } + if (pdata->type == SOC_ARCH_EXYNOS3250 || pdata->type == SOC_ARCH_EXYNOS4210 || pdata->type == SOC_ARCH_EXYNOS4412 || @@ -636,13 +648,13 @@ static int exynos_tmu_probe(struct platform_device *pdev) else { ret = -EINVAL; dev_err(&pdev->dev, "Platform not supported\n"); - goto err_clk; + goto err_sclk; } ret = exynos_tmu_initialize(pdev); if (ret) { dev_err(&pdev->dev, "Failed to initialize TMU\n"); - goto err_clk; + goto err_sclk; } exynos_tmu_control(pdev, true); @@ -652,7 +664,7 @@ static int exynos_tmu_probe(struct platform_device *pdev) sizeof(struct thermal_sensor_conf), GFP_KERNEL); if (!sensor_conf) { ret = -ENOMEM; - goto err_clk; + goto err_sclk; } sprintf(sensor_conf->name, "therm_zone%d", data->id); sensor_conf->read_temperature = (int (*)(void *))exynos_tmu_read; @@ -684,7 +696,7 @@ static int exynos_tmu_probe(struct platform_device *pdev) ret = exynos_register_thermal(sensor_conf); if (ret) { dev_err(&pdev->dev, "Failed to register thermal interface\n"); - goto err_clk; + goto err_sclk; } data->reg_conf = sensor_conf; @@ -692,10 +704,13 @@ static int exynos_tmu_probe(struct platform_device *pdev) IRQF_TRIGGER_RISING | IRQF_SHARED, dev_name(&pdev->dev), data); if (ret) { dev_err(&pdev->dev, "Failed to request irq: %d\n", data->irq); - goto err_clk; + goto err_sclk; } return 0; +err_sclk: + if (!IS_ERR(data->sclk)) + clk_disable_unprepare(data->sclk); err_clk: clk_unprepare(data->clk); err_clk_sec: @@ -712,6 +727,8 @@ static int exynos_tmu_remove(struct platform_device *pdev) exynos_tmu_control(pdev, false); + if (!IS_ERR(data->sclk)) + clk_disable_unprepare(data->sclk); clk_unprepare(data->clk); if (!IS_ERR(data->clk_sec)) clk_unprepare(data->clk_sec); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 2/4] thermal: exynos: add a triminfo_mask field in exynos_tmu_register structure 2014-11-14 11:17 [PATCH 0/4] Add TMU support for Exynos7 Abhilash Kesavan 2014-11-14 11:17 ` [PATCH 1/4] thermal: exynos: add optional sclk support Abhilash Kesavan @ 2014-11-14 11:18 ` Abhilash Kesavan 2014-11-14 11:18 ` [PATCH 3/4] thermal: exynos: modify the prototype for code_to_temp function Abhilash Kesavan ` (2 subsequent siblings) 4 siblings, 0 replies; 21+ messages in thread From: Abhilash Kesavan @ 2014-11-14 11:18 UTC (permalink / raw) To: rui.zhang, edubezval, linux-pm Cc: b.zolnierkie, amit.daniel, kesavan.abhilash Exynos7 has 9 bits for triminfo_25 as against older SoCs which had only 8 bits. Add a new triminfo_mask field, to the exynos_tmu_register structure, which will hold the mask value for the triminfo_25 register. Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> --- drivers/thermal/samsung/exynos_tmu.c | 8 ++++---- drivers/thermal/samsung/exynos_tmu.h | 2 ++ drivers/thermal/samsung/exynos_tmu_data.c | 6 ++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index c8caf5b..49d3bcb 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -200,19 +200,19 @@ static int exynos_tmu_initialize(struct platform_device *pdev) else trim_info = readl(data->base + reg->triminfo_data); } - data->temp_error1 = trim_info & EXYNOS_TMU_TEMP_MASK; + data->temp_error1 = trim_info & reg->triminfo_mask; data->temp_error2 = ((trim_info >> EXYNOS_TRIMINFO_85_SHIFT) & - EXYNOS_TMU_TEMP_MASK); + reg->triminfo_mask); if (!data->temp_error1 || (pdata->min_efuse_value > data->temp_error1) || (data->temp_error1 > pdata->max_efuse_value)) - data->temp_error1 = pdata->efuse_value & EXYNOS_TMU_TEMP_MASK; + data->temp_error1 = pdata->efuse_value & reg->triminfo_mask; if (!data->temp_error2) data->temp_error2 = (pdata->efuse_value >> EXYNOS_TRIMINFO_85_SHIFT) & - EXYNOS_TMU_TEMP_MASK; + reg->triminfo_mask; rising_threshold = readl(data->base + reg->threshold_th0); diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index c58c766..70e0d961 100644 --- a/drivers/thermal/samsung/exynos_tmu.h +++ b/drivers/thermal/samsung/exynos_tmu.h @@ -79,6 +79,7 @@ enum soc_type { * @triminfo_data: register containing 2 pont trimming data * @triminfo_ctrl: trim info controller register. * @triminfo_ctrl_count: the number of trim info controller register. + * @triminfo_mask: mask bits for triminfo_25 in trim info controller register. * @tmu_ctrl: TMU main controller register. * @test_mux_addr_shift: shift bits of test mux address. * @therm_trip_mode_shift: shift bits of tripping mode in tmu_ctrl register. @@ -111,6 +112,7 @@ struct exynos_tmu_registers { u32 triminfo_ctrl[MAX_TRIMINFO_CTRL_REG]; u32 triminfo_ctrl_count; + u32 triminfo_mask; u32 tmu_ctrl; u32 test_mux_addr_shift; diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c index 1724f6c..c4f12d0 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.c +++ b/drivers/thermal/samsung/exynos_tmu_data.c @@ -27,6 +27,7 @@ #if defined(CONFIG_CPU_EXYNOS4210) static const struct exynos_tmu_registers exynos4210_tmu_registers = { .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, + .triminfo_mask = EXYNOS_TMU_TEMP_MASK, .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, .tmu_status = EXYNOS_TMU_REG_STATUS, .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, @@ -89,6 +90,7 @@ static const struct exynos_tmu_registers exynos3250_tmu_registers = { .triminfo_ctrl[0] = EXYNOS_TMU_TRIMINFO_CON1, .triminfo_ctrl[1] = EXYNOS_TMU_TRIMINFO_CON2, .triminfo_ctrl_count = 2, + .triminfo_mask = EXYNOS_TMU_TEMP_MASK, .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, .test_mux_addr_shift = EXYNOS4412_MUX_ADDR_SHIFT, .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, @@ -171,6 +173,7 @@ static const struct exynos_tmu_registers exynos4412_tmu_registers = { .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, .triminfo_ctrl[0] = EXYNOS_TMU_TRIMINFO_CON2, .triminfo_ctrl_count = 1, + .triminfo_mask = EXYNOS_TMU_TEMP_MASK, .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, .test_mux_addr_shift = EXYNOS4412_MUX_ADDR_SHIFT, .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, @@ -263,6 +266,7 @@ struct exynos_tmu_init_data const exynos5250_default_tmu_data = { #if defined(CONFIG_SOC_EXYNOS5260) static const struct exynos_tmu_registers exynos5260_tmu_registers = { .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, + .triminfo_mask = EXYNOS_TMU_TEMP_MASK, .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, @@ -342,6 +346,7 @@ struct exynos_tmu_init_data const exynos5260_default_tmu_data = { #if defined(CONFIG_SOC_EXYNOS5420) static const struct exynos_tmu_registers exynos5420_tmu_registers = { .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, + .triminfo_mask = EXYNOS_TMU_TEMP_MASK, .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, @@ -429,6 +434,7 @@ struct exynos_tmu_init_data const exynos5420_default_tmu_data = { #if defined(CONFIG_SOC_EXYNOS5440) static const struct exynos_tmu_registers exynos5440_tmu_registers = { .triminfo_data = EXYNOS5440_TMU_S0_7_TRIM, + .triminfo_mask = EXYNOS_TMU_TEMP_MASK, .tmu_ctrl = EXYNOS5440_TMU_S0_7_CTRL, .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 3/4] thermal: exynos: modify the prototype for code_to_temp function 2014-11-14 11:17 [PATCH 0/4] Add TMU support for Exynos7 Abhilash Kesavan 2014-11-14 11:17 ` [PATCH 1/4] thermal: exynos: add optional sclk support Abhilash Kesavan 2014-11-14 11:18 ` [PATCH 2/4] thermal: exynos: add a triminfo_mask field in exynos_tmu_register structure Abhilash Kesavan @ 2014-11-14 11:18 ` Abhilash Kesavan 2014-11-14 11:18 ` [PATCH 4/4] thermal: exynos: Add TMU support for Exynos7 SoC Abhilash Kesavan 2014-11-14 12:19 ` [PATCH 0/4] Add TMU support for Exynos7 Bartlomiej Zolnierkiewicz 4 siblings, 0 replies; 21+ messages in thread From: Abhilash Kesavan @ 2014-11-14 11:18 UTC (permalink / raw) To: rui.zhang, edubezval, linux-pm Cc: b.zolnierkie, amit.daniel, kesavan.abhilash Exynos7 has a 9 bit code associated with a temperature as against 8 bits used in earlier SoCs. Modify the code_to_temp function to support this. Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> --- drivers/thermal/samsung/exynos_tmu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 49d3bcb..9695638 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -64,7 +64,7 @@ struct exynos_tmu_data { struct work_struct irq_work; struct mutex lock; struct clk *clk, *clk_sec, *sclk; - u8 temp_error1, temp_error2; + u16 temp_error1, temp_error2; struct regulator *regulator; struct thermal_sensor_conf *reg_conf; }; @@ -100,7 +100,7 @@ static int temp_to_code(struct exynos_tmu_data *data, u8 temp) * Calculate a temperature value from a temperature code. * The unit of the temperature is degree Celsius. */ -static int code_to_temp(struct exynos_tmu_data *data, u8 temp_code) +static int code_to_temp(struct exynos_tmu_data *data, u16 temp_code) { struct exynos_tmu_platform_data *pdata = data->pdata; int temp; @@ -336,13 +336,14 @@ static int exynos_tmu_read(struct exynos_tmu_data *data) { struct exynos_tmu_platform_data *pdata = data->pdata; const struct exynos_tmu_registers *reg = pdata->registers; - u8 temp_code; + u16 temp_code; int temp; mutex_lock(&data->lock); clk_enable(data->clk); - temp_code = readb(data->base + reg->tmu_cur_temp); + temp_code = readw(data->base + reg->tmu_cur_temp); + temp_code &= reg->triminfo_mask; if (data->soc == SOC_ARCH_EXYNOS4210) /* temp_code should range between 75 and 175 */ -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH 4/4] thermal: exynos: Add TMU support for Exynos7 SoC 2014-11-14 11:17 [PATCH 0/4] Add TMU support for Exynos7 Abhilash Kesavan ` (2 preceding siblings ...) 2014-11-14 11:18 ` [PATCH 3/4] thermal: exynos: modify the prototype for code_to_temp function Abhilash Kesavan @ 2014-11-14 11:18 ` Abhilash Kesavan 2014-11-14 12:19 ` [PATCH 0/4] Add TMU support for Exynos7 Bartlomiej Zolnierkiewicz 4 siblings, 0 replies; 21+ messages in thread From: Abhilash Kesavan @ 2014-11-14 11:18 UTC (permalink / raw) To: rui.zhang, edubezval, linux-pm Cc: b.zolnierkie, amit.daniel, kesavan.abhilash Add registers, bit fields and compatible strings for Exynos7 TMU (Thermal Management Unit). Following are a few of the differences in the Exynos7 TMU from earlier SoCs: - 8 trigger levels - Different bit offsets and more registers for the rising and falling thresholds. - New power down detection bit in the TMU_CONTROL register which does not update the CURRENT_TEMP0 when tmu power down is detected. - Change in bit offset for the NEXT_DATA field of EMUL_CON register. EMUL_CON register address has also changed. - INTSTAT and INTCLEAR registers present in earlier SoCs have been combined into one INTPEND register. The register address for INTCLEAR and INTPEND is also different. - Since there are 8 rising/falling interrupts as against at most 4 in earlier SoCs the INTEN bit offsets are different. - Multiple probe support which is handled by a TMU_CONTROL1 register (No support for this in the current patch). Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> --- .../devicetree/bindings/thermal/exynos-thermal.txt | 1 + drivers/thermal/samsung/exynos_tmu.c | 60 ++++++++++- drivers/thermal/samsung/exynos_tmu.h | 11 +- drivers/thermal/samsung/exynos_tmu_data.c | 111 ++++++++++++++++++++ drivers/thermal/samsung/exynos_tmu_data.h | 27 +++++ 5 files changed, 204 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt index 2393eac..7c1c6f1 100644 --- a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt @@ -12,6 +12,7 @@ "samsung,exynos5420-tmu-ext-triminfo" for TMU channels 2, 3 and 4 Exynos5420 (Must pass triminfo base and triminfo clock) "samsung,exynos5440-tmu" + "samsung,exynos7-tmu" - interrupt-parent : The phandle for the interrupt controller - reg : Address range of the thermal registers. For soc's which has multiple instances of TMU and some registers are shared across all TMU's like diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 9695638..1f658d2 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -147,6 +147,7 @@ static int exynos_tmu_initialize(struct platform_device *pdev) const struct exynos_tmu_registers *reg = pdata->registers; unsigned int status, trim_info = 0, con, ctrl; unsigned int rising_threshold = 0, falling_threshold = 0; + unsigned int reg_off, bit_off; int ret = 0, threshold_code, i; mutex_lock(&data->lock); @@ -214,9 +215,10 @@ static int exynos_tmu_initialize(struct platform_device *pdev) (pdata->efuse_value >> EXYNOS_TRIMINFO_85_SHIFT) & reg->triminfo_mask; - rising_threshold = readl(data->base + reg->threshold_th0); if (data->soc == SOC_ARCH_EXYNOS4210) { + rising_threshold = readl(data->base + reg->threshold_th0); + /* Write temperature code for threshold */ threshold_code = temp_to_code(data, pdata->threshold); writeb(threshold_code, @@ -226,7 +228,37 @@ static int exynos_tmu_initialize(struct platform_device *pdev) reg->threshold_th0 + i * sizeof(reg->threshold_th0)); exynos_tmu_clear_irqs(data); + } else if (data->soc == SOC_ARCH_EXYNOS7) { + /* Write temperature code for rising and falling thresholds */ + for (i = pdata->non_hw_trigger_levels; i >= 0; i--) { + reg_off = ((pdata->non_hw_trigger_levels - i) / 2) * 4; + bit_off = ((pdata->non_hw_trigger_levels - i) % 2); + + threshold_code = temp_to_code(data, + pdata->trigger_levels[i]); + rising_threshold = readl(data->base + + reg->threshold_th0 + reg_off); + rising_threshold &= ~(0x1ff << (16 * bit_off)); + rising_threshold |= threshold_code << (16 * bit_off); + writel(rising_threshold, + data->base + reg->threshold_th0 + reg_off); + + threshold_code = temp_to_code(data, + pdata->trigger_levels[i] - + pdata->threshold_falling); + falling_threshold |= threshold_code << (16 * bit_off); + writel(falling_threshold, + data->base + reg->threshold_th1 + reg_off); + } + + exynos_tmu_clear_irqs(data); + + con = readl(data->base + reg->tmu_ctrl); + con |= (1 << reg->therm_trip_en_shift); + writel(con, data->base + reg->tmu_ctrl); } else { + rising_threshold = readl(data->base + reg->threshold_th0); + /* Write temperature code for rising and falling threshold */ for (i = 0; i < pdata->non_hw_trigger_levels; i++) { threshold_code = temp_to_code(data, @@ -311,9 +343,16 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on) con |= (pdata->noise_cancel_mode << reg->therm_trip_mode_shift); } + if (data->soc == SOC_ARCH_EXYNOS7) + con |= 1 << EXYNOS7_PD_DET_EN_SHIFT; + if (on) { con |= (1 << EXYNOS_TMU_CORE_EN_SHIFT); interrupt_en = + pdata->trigger_enable[7] << reg->inten_rise7_shift | + pdata->trigger_enable[6] << reg->inten_rise6_shift | + pdata->trigger_enable[5] << reg->inten_rise5_shift | + pdata->trigger_enable[4] << reg->inten_rise4_shift | pdata->trigger_enable[3] << reg->inten_rise3_shift | pdata->trigger_enable[2] << reg->inten_rise2_shift | pdata->trigger_enable[1] << reg->inten_rise1_shift | @@ -387,7 +426,11 @@ static int exynos_tmu_set_emulation(void *drv_data, unsigned long temp) val &= ~(EXYNOS_EMUL_TIME_MASK << reg->emul_time_shift); val |= (EXYNOS_EMUL_TIME << reg->emul_time_shift); } - val &= ~(EXYNOS_EMUL_DATA_MASK << reg->emul_temp_shift); + if (data->soc == SOC_ARCH_EXYNOS7) + val &= ~(EXYNOS7_EMUL_DATA_MASK << + reg->emul_temp_shift); + else + val &= ~(EXYNOS_EMUL_DATA_MASK << reg->emul_temp_shift); val |= (temp_to_code(data, temp) << reg->emul_temp_shift) | EXYNOS_EMUL_ENABLE; } else { @@ -482,6 +525,10 @@ static const struct of_device_id exynos_tmu_match[] = { .compatible = "samsung,exynos5440-tmu", .data = (void *)EXYNOS5440_TMU_DRV_DATA, }, + { + .compatible = "samsung,exynos7-tmu", + .data = (void *)EXYNOS7_TMU_DRV_DATA, + }, {}, }; MODULE_DEVICE_TABLE(of, exynos_tmu_match); @@ -644,7 +691,8 @@ static int exynos_tmu_probe(struct platform_device *pdev) pdata->type == SOC_ARCH_EXYNOS5250 || pdata->type == SOC_ARCH_EXYNOS5260 || pdata->type == SOC_ARCH_EXYNOS5420_TRIMINFO || - pdata->type == SOC_ARCH_EXYNOS5440) + pdata->type == SOC_ARCH_EXYNOS5440 || + pdata->type == SOC_ARCH_EXYNOS7) data->soc = pdata->type; else { ret = -EINVAL; @@ -673,8 +721,10 @@ static int exynos_tmu_probe(struct platform_device *pdev) (int (*)(void *, unsigned long))exynos_tmu_set_emulation; sensor_conf->driver_data = data; sensor_conf->trip_data.trip_count = pdata->trigger_enable[0] + - pdata->trigger_enable[1] + pdata->trigger_enable[2]+ - pdata->trigger_enable[3]; + pdata->trigger_enable[1] + pdata->trigger_enable[2] + + pdata->trigger_enable[3] + pdata->trigger_enable[4] + + pdata->trigger_enable[5] + pdata->trigger_enable[6] + + pdata->trigger_enable[7]; for (i = 0; i < sensor_conf->trip_data.trip_count; i++) { sensor_conf->trip_data.trip_val[i] = diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index 70e0d961..a7e8758 100644 --- a/drivers/thermal/samsung/exynos_tmu.h +++ b/drivers/thermal/samsung/exynos_tmu.h @@ -42,6 +42,7 @@ enum soc_type { SOC_ARCH_EXYNOS5260, SOC_ARCH_EXYNOS5420_TRIMINFO, SOC_ARCH_EXYNOS5440, + SOC_ARCH_EXYNOS7, }; /** @@ -98,6 +99,10 @@ enum soc_type { * @inten_rise1_shift: shift bits of rising 1 interrupt bits. * @inten_rise2_shift: shift bits of rising 2 interrupt bits. * @inten_rise3_shift: shift bits of rising 3 interrupt bits. + * @inten_rise4_shift: shift bits of rising 4 interrupt bits. + * @inten_rise5_shift: shift bits of rising 5 interrupt bits. + * @inten_rise6_shift: shift bits of rising 6 interrupt bits. + * @inten_rise7_shift: shift bits of rising 7 interrupt bits. * @inten_fall0_shift: shift bits of falling 0 interrupt bits. * @tmu_intstat: Register containing the interrupt status values. * @tmu_intclear: Register for clearing the raised interrupt status. @@ -136,6 +141,10 @@ struct exynos_tmu_registers { u32 inten_rise1_shift; u32 inten_rise2_shift; u32 inten_rise3_shift; + u32 inten_rise4_shift; + u32 inten_rise5_shift; + u32 inten_rise6_shift; + u32 inten_rise7_shift; u32 inten_fall0_shift; u32 tmu_intstat; @@ -230,7 +239,7 @@ struct exynos_tmu_platform_data { enum calibration_type cal_type; enum soc_type type; - struct freq_clip_table freq_tab[4]; + struct freq_clip_table freq_tab[8]; unsigned int freq_tab_count; const struct exynos_tmu_registers *registers; unsigned int features; diff --git a/drivers/thermal/samsung/exynos_tmu_data.c b/drivers/thermal/samsung/exynos_tmu_data.c index c4f12d0..523bf4d 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.c +++ b/drivers/thermal/samsung/exynos_tmu_data.c @@ -491,3 +491,114 @@ struct exynos_tmu_init_data const exynos5440_default_tmu_data = { .tmu_count = 3, }; #endif + +#if defined(CONFIG_ARCH_EXYNOS7) +static const struct exynos_tmu_registers exynos7_tmu_registers = { + .triminfo_data = EXYNOS_TMU_REG_TRIMINFO, + .tmu_ctrl = EXYNOS_TMU_REG_CONTROL, + .triminfo_mask = EXYNOS_TMU_TEMP_MASK, + .therm_trip_mode_shift = EXYNOS_TMU_TRIP_MODE_SHIFT, + .therm_trip_mode_mask = EXYNOS_TMU_TRIP_MODE_MASK, + .therm_trip_en_shift = EXYNOS_TMU_THERM_TRIP_EN_SHIFT, + .tmu_status = EXYNOS_TMU_REG_STATUS, + .tmu_cur_temp = EXYNOS_TMU_REG_CURRENT_TEMP, + .threshold_th0 = EXYNOS7_THD_TEMP_RISE7_6, + .threshold_th1 = EXYNOS7_THD_TEMP_FALL7_6, + .tmu_inten = EXYNOS7_TMU_REG_INTEN, + .inten_rise0_shift = EXYNOS7_TMU_INTEN_RISE0_SHIFT, + .inten_rise1_shift = EXYNOS7_TMU_INTEN_RISE1_SHIFT, + .inten_rise2_shift = EXYNOS7_TMU_INTEN_RISE2_SHIFT, + .inten_rise3_shift = EXYNOS7_TMU_INTEN_RISE3_SHIFT, + .inten_rise4_shift = EXYNOS7_TMU_INTEN_RISE4_SHIFT, + .inten_rise5_shift = EXYNOS7_TMU_INTEN_RISE5_SHIFT, + .inten_rise6_shift = EXYNOS7_TMU_INTEN_RISE6_SHIFT, + .inten_rise7_shift = EXYNOS7_TMU_INTEN_RISE7_SHIFT, + .inten_fall0_shift = EXYNOS_TMU_INTEN_FALL0_SHIFT, + .tmu_intstat = EXYNOS7_TMU_REG_INTPEND, + .tmu_intclear = EXYNOS7_TMU_REG_INTPEND, + .emul_con = EXYNOS7_TMU_REG_EMUL_CON, + .emul_temp_shift = EXYNOS7_EMUL_DATA_SHIFT, + .emul_time_shift = EXYNOS_EMUL_TIME_SHIFT, +}; + +#define __EXYNOS7_TMU_DATA \ + .threshold_falling = 10, \ + .trigger_levels[0] = 65, \ + .trigger_levels[1] = 72, \ + .trigger_levels[2] = 80, \ + .trigger_levels[3] = 88, \ + .trigger_levels[4] = 95, \ + .trigger_levels[5] = 103, \ + .trigger_levels[6] = 110, \ + .trigger_levels[7] = 115, \ + .trigger_enable[0] = true, \ + .trigger_enable[1] = true, \ + .trigger_enable[2] = true, \ + .trigger_enable[3] = true, \ + .trigger_enable[4] = true, \ + .trigger_enable[5] = true, \ + .trigger_enable[6] = true, \ + .trigger_enable[7] = false, \ + .trigger_type[0] = THROTTLE_ACTIVE, \ + .trigger_type[1] = THROTTLE_ACTIVE, \ + .trigger_type[2] = THROTTLE_ACTIVE, \ + .trigger_type[3] = THROTTLE_ACTIVE, \ + .trigger_type[4] = THROTTLE_ACTIVE, \ + .trigger_type[5] = THROTTLE_ACTIVE, \ + .trigger_type[6] = SW_TRIP, \ + .trigger_type[7] = HW_TRIP, \ + .max_trigger_level = 8, \ + .non_hw_trigger_levels = 7, \ + .gain = 8, \ + .reference_voltage = 16, \ + .noise_cancel_mode = 4, \ + .cal_type = TYPE_ONE_POINT_TRIMMING, \ + .efuse_value = 55, \ + .min_efuse_value = 15, \ + .max_efuse_value = 100, \ + .first_point_trim = 25, \ + .second_point_trim = 85, \ + .default_temp_offset = 50, \ + .freq_tab[0] = { \ + .freq_clip_max = 1400 * 1000, \ + .temp_level = 70, \ + }, \ + .freq_tab[1] = { \ + .freq_clip_max = 1200 * 1000, \ + .temp_level = 80, \ + }, \ + .freq_tab[2] = { \ + .freq_clip_max = 1000 * 1000, \ + .temp_level = 85, \ + }, \ + .freq_tab[3] = { \ + .freq_clip_max = 800 * 1000, \ + .temp_level = 90, \ + }, \ + .freq_tab[4] = { \ + .freq_clip_max = 600 * 1000, \ + .temp_level = 95, \ + }, \ + .freq_tab[5] = { \ + .freq_clip_max = 200 * 1000, \ + .temp_level = 100, \ + }, \ + .freq_tab_count = 6, \ + .registers = &exynos7_tmu_registers, \ + +#define EXYNOS7_TMU_DATA \ + __EXYNOS7_TMU_DATA \ + .type = SOC_ARCH_EXYNOS7, \ + .features = (TMU_SUPPORT_EMULATION | TMU_SUPPORT_FALLING_TRIP | \ + TMU_SUPPORT_READY_STATUS | TMU_SUPPORT_EMUL_TIME) + +struct exynos_tmu_init_data const exynos7_default_tmu_data = { + .tmu_data = { + { EXYNOS7_TMU_DATA }, + { EXYNOS7_TMU_DATA }, + { EXYNOS7_TMU_DATA }, + { EXYNOS7_TMU_DATA }, + }, + .tmu_count = 4, +}; +#endif diff --git a/drivers/thermal/samsung/exynos_tmu_data.h b/drivers/thermal/samsung/exynos_tmu_data.h index 63de598..5dc9b2f 100644 --- a/drivers/thermal/samsung/exynos_tmu_data.h +++ b/drivers/thermal/samsung/exynos_tmu_data.h @@ -107,6 +107,26 @@ #define EXYNOS5440_TMU_TH_RISE4_SHIFT 24 #define EXYNOS5440_EFUSE_SWAP_OFFSET 8 +/* Exynos7 specific registers */ +#define EXYNOS7_THD_TEMP_RISE7_6 0x50 +#define EXYNOS7_THD_TEMP_FALL7_6 0x60 +#define EXYNOS7_TMU_REG_INTEN 0x110 +#define EXYNOS7_TMU_REG_INTPEND 0x118 +#define EXYNOS7_TMU_REG_EMUL_CON 0x160 + +#define EXYNOS7_TMU_TEMP_MASK 0x1FF +#define EXYNOS7_PD_DET_EN_SHIFT 23 +#define EXYNOS7_TMU_INTEN_RISE0_SHIFT 0 +#define EXYNOS7_TMU_INTEN_RISE1_SHIFT 1 +#define EXYNOS7_TMU_INTEN_RISE2_SHIFT 2 +#define EXYNOS7_TMU_INTEN_RISE3_SHIFT 3 +#define EXYNOS7_TMU_INTEN_RISE4_SHIFT 4 +#define EXYNOS7_TMU_INTEN_RISE5_SHIFT 5 +#define EXYNOS7_TMU_INTEN_RISE6_SHIFT 6 +#define EXYNOS7_TMU_INTEN_RISE7_SHIFT 7 +#define EXYNOS7_EMUL_DATA_SHIFT 7 +#define EXYNOS7_EMUL_DATA_MASK 0x1FF + #if defined(CONFIG_SOC_EXYNOS3250) extern struct exynos_tmu_init_data const exynos3250_default_tmu_data; #define EXYNOS3250_TMU_DRV_DATA (&exynos3250_default_tmu_data) @@ -156,4 +176,11 @@ extern struct exynos_tmu_init_data const exynos5440_default_tmu_data; #define EXYNOS5440_TMU_DRV_DATA (NULL) #endif +#if defined(CONFIG_ARCH_EXYNOS7) +extern struct exynos_tmu_init_data const exynos7_default_tmu_data; +#define EXYNOS7_TMU_DRV_DATA (&exynos7_default_tmu_data) +#else +#define EXYNOS7_TMU_DRV_DATA (NULL) +#endif + #endif /*_EXYNOS_TMU_DATA_H*/ -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-14 11:17 [PATCH 0/4] Add TMU support for Exynos7 Abhilash Kesavan ` (3 preceding siblings ...) 2014-11-14 11:18 ` [PATCH 4/4] thermal: exynos: Add TMU support for Exynos7 SoC Abhilash Kesavan @ 2014-11-14 12:19 ` Bartlomiej Zolnierkiewicz 2014-11-14 12:30 ` Abhilash Kesavan 4 siblings, 1 reply; 21+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2014-11-14 12:19 UTC (permalink / raw) To: Abhilash Kesavan Cc: rui.zhang, edubezval, linux-pm, amit.daniel, kesavan.abhilash, l.majewski Hi, On Friday, November 14, 2014 04:47:58 PM Abhilash Kesavan wrote: > The Thermal Management Unit (TMU) in Exynos7 provides software-controlled > (thermal throttling) and hardware-controlled (thermal tripping) management > schemes. > There are several changes in terms of the register and bit offsets in the > Exynos7 TMU from that in older SoCs. There are also new bits, more trigger > levels and a special clock for TMU that has been introduced in Exynos7. > This patchset modifies the thermal driver to handle all these changes. > > This series is based on linux-next(20141114) and tested on an Exynos7-based > espresso board. Please rebase your patchset on top of: http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html There is also ongoing work to convert Exynos thermal driver to use device tree but Lukasz Majewski (added to Cc:) knows better the current state of the work. > Abhilash Kesavan (4): > thermal: exynos: add optional sclk support > thermal: exynos: add a triminfo_mask field in exynos_tmu_register > structure > thermal: exynos: modify the prototype for code_to_temp function > thermal: exynos: Add TMU support for Exynos7 SoC > > .../devicetree/bindings/thermal/exynos-thermal.txt | 4 + > drivers/thermal/samsung/exynos_tmu.c | 106 ++++++++++++++---- > drivers/thermal/samsung/exynos_tmu.h | 13 ++- > drivers/thermal/samsung/exynos_tmu_data.c | 117 ++++++++++++++++++++ > drivers/thermal/samsung/exynos_tmu_data.h | 27 +++++ > 5 files changed, 247 insertions(+), 20 deletions(-) Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-14 12:19 ` [PATCH 0/4] Add TMU support for Exynos7 Bartlomiej Zolnierkiewicz @ 2014-11-14 12:30 ` Abhilash Kesavan 2014-11-14 13:02 ` Lukasz Majewski 0 siblings, 1 reply; 21+ messages in thread From: Abhilash Kesavan @ 2014-11-14 12:30 UTC (permalink / raw) To: Bartlomiej Zolnierkiewicz Cc: rui.zhang, edubezval, linux-pm@vger.kernel.org, amit.daniel, l.majewski Hi Bartlomiej, On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> wrote: > > Hi, > > On Friday, November 14, 2014 04:47:58 PM Abhilash Kesavan wrote: >> The Thermal Management Unit (TMU) in Exynos7 provides software-controlled >> (thermal throttling) and hardware-controlled (thermal tripping) management >> schemes. >> There are several changes in terms of the register and bit offsets in the >> Exynos7 TMU from that in older SoCs. There are also new bits, more trigger >> levels and a special clock for TMU that has been introduced in Exynos7. >> This patchset modifies the thermal driver to handle all these changes. >> >> This series is based on linux-next(20141114) and tested on an Exynos7-based >> espresso board. > > Please rebase your patchset on top of: > > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html Sure, will rebase on top of your patchset. Is this patchset going to be merged into Eduardo's tree soon ? > > There is also ongoing work to convert Exynos thermal driver to use device > tree but Lukasz Majewski (added to Cc:) knows better the current state of > the work. Lukasz, are you in the process of making changes to the existing exynos tmu bindings ? Regards, Abhilash > >> Abhilash Kesavan (4): >> thermal: exynos: add optional sclk support >> thermal: exynos: add a triminfo_mask field in exynos_tmu_register >> structure >> thermal: exynos: modify the prototype for code_to_temp function >> thermal: exynos: Add TMU support for Exynos7 SoC >> >> .../devicetree/bindings/thermal/exynos-thermal.txt | 4 + >> drivers/thermal/samsung/exynos_tmu.c | 106 ++++++++++++++---- >> drivers/thermal/samsung/exynos_tmu.h | 13 ++- >> drivers/thermal/samsung/exynos_tmu_data.c | 117 ++++++++++++++++++++ >> drivers/thermal/samsung/exynos_tmu_data.h | 27 +++++ >> 5 files changed, 247 insertions(+), 20 deletions(-) > > Best regards, > -- > Bartlomiej Zolnierkiewicz > Samsung R&D Institute Poland > Samsung Electronics > ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-14 12:30 ` Abhilash Kesavan @ 2014-11-14 13:02 ` Lukasz Majewski 2014-11-14 14:07 ` Abhilash Kesavan 0 siblings, 1 reply; 21+ messages in thread From: Lukasz Majewski @ 2014-11-14 13:02 UTC (permalink / raw) To: Abhilash Kesavan, edubezval Cc: Bartlomiej Zolnierkiewicz, rui.zhang, linux-pm@vger.kernel.org, amit.daniel Hi Abhilash, > Hi Bartlomiej, > > On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej Zolnierkiewicz > <b.zolnierkie@samsung.com> wrote: > > > > Hi, > > > > On Friday, November 14, 2014 04:47:58 PM Abhilash Kesavan wrote: > >> The Thermal Management Unit (TMU) in Exynos7 provides > >> software-controlled (thermal throttling) and hardware-controlled > >> (thermal tripping) management schemes. > >> There are several changes in terms of the register and bit offsets > >> in the Exynos7 TMU from that in older SoCs. There are also new > >> bits, more trigger levels and a special clock for TMU that has > >> been introduced in Exynos7. This patchset modifies the thermal > >> driver to handle all these changes. > >> > >> This series is based on linux-next(20141114) and tested on an > >> Exynos7-based espresso board. > > > > Please rebase your patchset on top of: > > > > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html > > Sure, will rebase on top of your patchset. Is this patchset going to > be merged into Eduardo's tree soon ? > > > > > There is also ongoing work to convert Exynos thermal driver to use > > device tree but Lukasz Majewski (added to Cc:) knows better the > > current state of the work. > > Lukasz, are you in the process of making changes to the existing > exynos tmu bindings ? Yes. I'm working on them. Please consider following patches [1]: http://www.spinics.net/lists/linux-samsung-soc/msg37719.html They are based on top of Bartek's work. Patch set status: 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 posted yesterday. http://www.spinics.net/lists/linux-samsung-soc/msg37719.html 2. of-thermal rework - I'm working on it now (to export common data from of-thermal.c and provide structure with ops). Patches [1] replace configuration available in exynos_tmu_data.c to the one from device tree. Also it handles setting cpu cooling frequencies per CPUs via device tree. I think that it is Eduardo's decision about how Exynos patches should be serialized. I can only say that after Bartek's and my [1] patch sets the exynos TMU driver is much simpler with significant code base reduction. Personally I think that it may be far more easier to add Exynos7 TMU support to reworked driver. > > Regards, > Abhilash > > > >> Abhilash Kesavan (4): > >> thermal: exynos: add optional sclk support > >> thermal: exynos: add a triminfo_mask field in exynos_tmu_register > >> structure > >> thermal: exynos: modify the prototype for code_to_temp function > >> thermal: exynos: Add TMU support for Exynos7 SoC > >> > >> .../devicetree/bindings/thermal/exynos-thermal.txt | 4 + > >> drivers/thermal/samsung/exynos_tmu.c | 106 > >> ++++++++++++++---- > >> drivers/thermal/samsung/exynos_tmu.h | 13 ++- > >> drivers/thermal/samsung/exynos_tmu_data.c | 117 > >> ++++++++++++++++++++ > >> drivers/thermal/samsung/exynos_tmu_data.h | 27 +++++ 5 > >> files changed, 247 insertions(+), 20 deletions(-) > > > > Best regards, > > -- > > Bartlomiej Zolnierkiewicz > > Samsung R&D Institute Poland > > Samsung Electronics > > -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-14 13:02 ` Lukasz Majewski @ 2014-11-14 14:07 ` Abhilash Kesavan 2014-11-14 14:50 ` Lukasz Majewski 2014-11-18 8:08 ` Lukasz Majewski 0 siblings, 2 replies; 21+ messages in thread From: Abhilash Kesavan @ 2014-11-14 14:07 UTC (permalink / raw) To: Lukasz Majewski Cc: Eduardo Valentin, Bartlomiej Zolnierkiewicz, rui.zhang, linux-pm@vger.kernel.org, amit.daniel Hi Lukasz, On Fri, Nov 14, 2014 at 6:32 PM, Lukasz Majewski <l.majewski@samsung.com> wrote: > Hi Abhilash, > >> Hi Bartlomiej, >> >> On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej Zolnierkiewicz >> <b.zolnierkie@samsung.com> wrote: >> > >> > Hi, >> > >> > On Friday, November 14, 2014 04:47:58 PM Abhilash Kesavan wrote: >> >> The Thermal Management Unit (TMU) in Exynos7 provides >> >> software-controlled (thermal throttling) and hardware-controlled >> >> (thermal tripping) management schemes. >> >> There are several changes in terms of the register and bit offsets >> >> in the Exynos7 TMU from that in older SoCs. There are also new >> >> bits, more trigger levels and a special clock for TMU that has >> >> been introduced in Exynos7. This patchset modifies the thermal >> >> driver to handle all these changes. >> >> >> >> This series is based on linux-next(20141114) and tested on an >> >> Exynos7-based espresso board. >> > >> > Please rebase your patchset on top of: >> > >> > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html >> >> Sure, will rebase on top of your patchset. Is this patchset going to >> be merged into Eduardo's tree soon ? >> >> > >> > There is also ongoing work to convert Exynos thermal driver to use >> > device tree but Lukasz Majewski (added to Cc:) knows better the >> > current state of the work. >> >> Lukasz, are you in the process of making changes to the existing >> exynos tmu bindings ? > > Yes. I'm working on them. > > Please consider following patches [1]: > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > > They are based on top of Bartek's work. > Patch set status: > 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 posted yesterday. > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > > 2. of-thermal rework - I'm working on it now (to export common data > from of-thermal.c and provide structure with ops). > > Patches [1] replace configuration available in exynos_tmu_data.c to the > one from device tree. Also it handles setting cpu cooling frequencies > per CPUs via device tree. > > > I think that it is Eduardo's decision about how Exynos patches should > be serialized. > > I can only say that after Bartek's and my [1] patch sets the exynos TMU > driver is much simpler with significant code base reduction. > > Personally I think that it may be far more easier to add Exynos7 TMU > support to reworked driver. Thanks for the details. I am OK with rebasing my patches over Bartlomiej and your patch sets. Do you have any public tree with both these patch sets merged ? > > >> >> Regards, >> Abhilash >> > >> >> Abhilash Kesavan (4): >> >> thermal: exynos: add optional sclk support >> >> thermal: exynos: add a triminfo_mask field in exynos_tmu_register >> >> structure >> >> thermal: exynos: modify the prototype for code_to_temp function >> >> thermal: exynos: Add TMU support for Exynos7 SoC >> >> >> >> .../devicetree/bindings/thermal/exynos-thermal.txt | 4 + >> >> drivers/thermal/samsung/exynos_tmu.c | 106 >> >> ++++++++++++++---- >> >> drivers/thermal/samsung/exynos_tmu.h | 13 ++- >> >> drivers/thermal/samsung/exynos_tmu_data.c | 117 >> >> ++++++++++++++++++++ >> >> drivers/thermal/samsung/exynos_tmu_data.h | 27 +++++ 5 >> >> files changed, 247 insertions(+), 20 deletions(-) >> > >> > Best regards, >> > -- >> > Bartlomiej Zolnierkiewicz >> > Samsung R&D Institute Poland >> > Samsung Electronics >> > > > > > -- > Best regards, > > Lukasz Majewski > > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-14 14:07 ` Abhilash Kesavan @ 2014-11-14 14:50 ` Lukasz Majewski 2014-11-18 8:08 ` Lukasz Majewski 1 sibling, 0 replies; 21+ messages in thread From: Lukasz Majewski @ 2014-11-14 14:50 UTC (permalink / raw) To: Abhilash Kesavan Cc: Eduardo Valentin, Bartlomiej Zolnierkiewicz, rui.zhang, linux-pm@vger.kernel.org, amit.daniel Hi Abhilash, > Hi Lukasz, > > On Fri, Nov 14, 2014 at 6:32 PM, Lukasz Majewski > <l.majewski@samsung.com> wrote: > > Hi Abhilash, > > > >> Hi Bartlomiej, > >> > >> On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej Zolnierkiewicz > >> <b.zolnierkie@samsung.com> wrote: > >> > > >> > Hi, > >> > > >> > On Friday, November 14, 2014 04:47:58 PM Abhilash Kesavan wrote: > >> >> The Thermal Management Unit (TMU) in Exynos7 provides > >> >> software-controlled (thermal throttling) and hardware-controlled > >> >> (thermal tripping) management schemes. > >> >> There are several changes in terms of the register and bit > >> >> offsets in the Exynos7 TMU from that in older SoCs. There are > >> >> also new bits, more trigger levels and a special clock for TMU > >> >> that has been introduced in Exynos7. This patchset modifies the > >> >> thermal driver to handle all these changes. > >> >> > >> >> This series is based on linux-next(20141114) and tested on an > >> >> Exynos7-based espresso board. > >> > > >> > Please rebase your patchset on top of: > >> > > >> > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html > >> > >> Sure, will rebase on top of your patchset. Is this patchset going > >> to be merged into Eduardo's tree soon ? > >> > >> > > >> > There is also ongoing work to convert Exynos thermal driver to > >> > use device tree but Lukasz Majewski (added to Cc:) knows better > >> > the current state of the work. > >> > >> Lukasz, are you in the process of making changes to the existing > >> exynos tmu bindings ? > > > > Yes. I'm working on them. > > > > Please consider following patches [1]: > > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > > > > They are based on top of Bartek's work. > > Patch set status: > > 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 posted > > yesterday. > > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > > > > 2. of-thermal rework - I'm working on it now (to export common data > > from of-thermal.c and provide structure with ops). > > > > Patches [1] replace configuration available in exynos_tmu_data.c to > > the one from device tree. Also it handles setting cpu cooling > > frequencies per CPUs via device tree. > > > > > > I think that it is Eduardo's decision about how Exynos patches > > should be serialized. > > > > I can only say that after Bartek's and my [1] patch sets the exynos > > TMU driver is much simpler with significant code base reduction. > > > > Personally I think that it may be far more easier to add Exynos7 TMU > > support to reworked driver. > > Thanks for the details. I am OK with rebasing my patches over > Bartlomiej and your patch sets. Thanks. > Do you have any public tree with both > these patch sets merged ? We will try to setup a GitHub repository with combined code. > > > > > >> > >> Regards, > >> Abhilash > >> > > >> >> Abhilash Kesavan (4): > >> >> thermal: exynos: add optional sclk support > >> >> thermal: exynos: add a triminfo_mask field in > >> >> exynos_tmu_register structure > >> >> thermal: exynos: modify the prototype for code_to_temp > >> >> function thermal: exynos: Add TMU support for Exynos7 SoC > >> >> > >> >> .../devicetree/bindings/thermal/exynos-thermal.txt | 4 + > >> >> drivers/thermal/samsung/exynos_tmu.c | 106 > >> >> ++++++++++++++---- > >> >> drivers/thermal/samsung/exynos_tmu.h | 13 ++- > >> >> drivers/thermal/samsung/exynos_tmu_data.c | 117 > >> >> ++++++++++++++++++++ > >> >> drivers/thermal/samsung/exynos_tmu_data.h | 27 +++++ > >> >> 5 files changed, 247 insertions(+), 20 deletions(-) > >> > > >> > Best regards, > >> > -- > >> > Bartlomiej Zolnierkiewicz > >> > Samsung R&D Institute Poland > >> > Samsung Electronics > >> > > > > > > > > > -- > > Best regards, > > > > Lukasz Majewski > > > > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group > -- > To unsubscribe from this list: send the line "unsubscribe linux-pm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-14 14:07 ` Abhilash Kesavan 2014-11-14 14:50 ` Lukasz Majewski @ 2014-11-18 8:08 ` Lukasz Majewski 2014-11-18 8:14 ` Abhilash Kesavan 1 sibling, 1 reply; 21+ messages in thread From: Lukasz Majewski @ 2014-11-18 8:08 UTC (permalink / raw) To: Abhilash Kesavan, Abhilash Kesavan Cc: Eduardo Valentin, Bartlomiej Zolnierkiewicz, rui.zhang, linux-pm@vger.kernel.org, amit.daniel Hi Abhilash, > Hi Lukasz, > > On Fri, Nov 14, 2014 at 6:32 PM, Lukasz Majewski > <l.majewski@samsung.com> wrote: > > Hi Abhilash, > > > >> Hi Bartlomiej, > >> > >> On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej Zolnierkiewicz > >> <b.zolnierkie@samsung.com> wrote: > >> > > >> > Hi, > >> > > >> > On Friday, November 14, 2014 04:47:58 PM Abhilash Kesavan wrote: > >> >> The Thermal Management Unit (TMU) in Exynos7 provides > >> >> software-controlled (thermal throttling) and hardware-controlled > >> >> (thermal tripping) management schemes. > >> >> There are several changes in terms of the register and bit > >> >> offsets in the Exynos7 TMU from that in older SoCs. There are > >> >> also new bits, more trigger levels and a special clock for TMU > >> >> that has been introduced in Exynos7. This patchset modifies the > >> >> thermal driver to handle all these changes. > >> >> > >> >> This series is based on linux-next(20141114) and tested on an > >> >> Exynos7-based espresso board. > >> > > >> > Please rebase your patchset on top of: > >> > > >> > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html > >> > >> Sure, will rebase on top of your patchset. Is this patchset going > >> to be merged into Eduardo's tree soon ? > >> > >> > > >> > There is also ongoing work to convert Exynos thermal driver to > >> > use device tree but Lukasz Majewski (added to Cc:) knows better > >> > the current state of the work. > >> > >> Lukasz, are you in the process of making changes to the existing > >> exynos tmu bindings ? > > > > Yes. I'm working on them. > > > > Please consider following patches [1]: > > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > > > > They are based on top of Bartek's work. > > Patch set status: > > 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 posted > > yesterday. > > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > > > > 2. of-thermal rework - I'm working on it now (to export common data > > from of-thermal.c and provide structure with ops). > > > > Patches [1] replace configuration available in exynos_tmu_data.c to > > the one from device tree. Also it handles setting cpu cooling > > frequencies per CPUs via device tree. > > > > > > I think that it is Eduardo's decision about how Exynos patches > > should be serialized. > > > > I can only say that after Bartek's and my [1] patch sets the exynos > > TMU driver is much simpler with significant code base reduction. > > > > Personally I think that it may be far more easier to add Exynos7 TMU > > support to reworked driver. > > Thanks for the details. I am OK with rebasing my patches over > Bartlomiej and your patch sets. Do you have any public tree with both > these patch sets merged ? I've managed to export my ongoing Exynos TMU work to a public tree. You can find it at: https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal Please be aware that this code is under development (and review) and some parts may be changed. However, this shows how the Exynos TMU driver would look like after the rework. If in any doubts, please ask. > > > > > >> > >> Regards, > >> Abhilash > >> > > >> >> Abhilash Kesavan (4): > >> >> thermal: exynos: add optional sclk support > >> >> thermal: exynos: add a triminfo_mask field in > >> >> exynos_tmu_register structure > >> >> thermal: exynos: modify the prototype for code_to_temp > >> >> function thermal: exynos: Add TMU support for Exynos7 SoC > >> >> > >> >> .../devicetree/bindings/thermal/exynos-thermal.txt | 4 + > >> >> drivers/thermal/samsung/exynos_tmu.c | 106 > >> >> ++++++++++++++---- > >> >> drivers/thermal/samsung/exynos_tmu.h | 13 ++- > >> >> drivers/thermal/samsung/exynos_tmu_data.c | 117 > >> >> ++++++++++++++++++++ > >> >> drivers/thermal/samsung/exynos_tmu_data.h | 27 +++++ > >> >> 5 files changed, 247 insertions(+), 20 deletions(-) > >> > > >> > Best regards, > >> > -- > >> > Bartlomiej Zolnierkiewicz > >> > Samsung R&D Institute Poland > >> > Samsung Electronics > >> > > > > > > > > > -- > > Best regards, > > > > Lukasz Majewski > > > > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-18 8:08 ` Lukasz Majewski @ 2014-11-18 8:14 ` Abhilash Kesavan 2014-11-19 13:18 ` Eduardo Valentin 0 siblings, 1 reply; 21+ messages in thread From: Abhilash Kesavan @ 2014-11-18 8:14 UTC (permalink / raw) To: Lukasz Majewski Cc: Eduardo Valentin, Bartlomiej Zolnierkiewicz, rui.zhang, linux-pm@vger.kernel.org, amit.daniel Hi Lukasz, On Tue, Nov 18, 2014 at 1:38 PM, Lukasz Majewski <l.majewski@samsung.com> wrote: > Hi Abhilash, > >> Hi Lukasz, >> >> On Fri, Nov 14, 2014 at 6:32 PM, Lukasz Majewski >> <l.majewski@samsung.com> wrote: >> > Hi Abhilash, >> > >> >> Hi Bartlomiej, >> >> >> >> On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej Zolnierkiewicz >> >> <b.zolnierkie@samsung.com> wrote: >> >> > >> >> > Hi, >> >> > >> >> > On Friday, November 14, 2014 04:47:58 PM Abhilash Kesavan wrote: >> >> >> The Thermal Management Unit (TMU) in Exynos7 provides >> >> >> software-controlled (thermal throttling) and hardware-controlled >> >> >> (thermal tripping) management schemes. >> >> >> There are several changes in terms of the register and bit >> >> >> offsets in the Exynos7 TMU from that in older SoCs. There are >> >> >> also new bits, more trigger levels and a special clock for TMU >> >> >> that has been introduced in Exynos7. This patchset modifies the >> >> >> thermal driver to handle all these changes. >> >> >> >> >> >> This series is based on linux-next(20141114) and tested on an >> >> >> Exynos7-based espresso board. >> >> > >> >> > Please rebase your patchset on top of: >> >> > >> >> > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html >> >> >> >> Sure, will rebase on top of your patchset. Is this patchset going >> >> to be merged into Eduardo's tree soon ? >> >> >> >> > >> >> > There is also ongoing work to convert Exynos thermal driver to >> >> > use device tree but Lukasz Majewski (added to Cc:) knows better >> >> > the current state of the work. >> >> >> >> Lukasz, are you in the process of making changes to the existing >> >> exynos tmu bindings ? >> > >> > Yes. I'm working on them. >> > >> > Please consider following patches [1]: >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html >> > >> > They are based on top of Bartek's work. >> > Patch set status: >> > 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 posted >> > yesterday. >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html >> > >> > 2. of-thermal rework - I'm working on it now (to export common data >> > from of-thermal.c and provide structure with ops). >> > >> > Patches [1] replace configuration available in exynos_tmu_data.c to >> > the one from device tree. Also it handles setting cpu cooling >> > frequencies per CPUs via device tree. >> > >> > >> > I think that it is Eduardo's decision about how Exynos patches >> > should be serialized. >> > >> > I can only say that after Bartek's and my [1] patch sets the exynos >> > TMU driver is much simpler with significant code base reduction. >> > >> > Personally I think that it may be far more easier to add Exynos7 TMU >> > support to reworked driver. >> >> Thanks for the details. I am OK with rebasing my patches over >> Bartlomiej and your patch sets. Do you have any public tree with both >> these patch sets merged ? > > I've managed to export my ongoing Exynos TMU work to a public tree. > You can find it at: > https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal > > > Please be aware that this code is under development (and review) and > some parts may be changed. > > However, this shows how the Exynos TMU driver would look like after the > rework. > > If in any doubts, please ask. Thanks a lot for this. I will start rebasing my exynos7 patches on your tree. Abhilash > >> > >> > >> >> >> >> Regards, >> >> Abhilash >> >> > >> >> >> Abhilash Kesavan (4): >> >> >> thermal: exynos: add optional sclk support >> >> >> thermal: exynos: add a triminfo_mask field in >> >> >> exynos_tmu_register structure >> >> >> thermal: exynos: modify the prototype for code_to_temp >> >> >> function thermal: exynos: Add TMU support for Exynos7 SoC >> >> >> >> >> >> .../devicetree/bindings/thermal/exynos-thermal.txt | 4 + >> >> >> drivers/thermal/samsung/exynos_tmu.c | 106 >> >> >> ++++++++++++++---- >> >> >> drivers/thermal/samsung/exynos_tmu.h | 13 ++- >> >> >> drivers/thermal/samsung/exynos_tmu_data.c | 117 >> >> >> ++++++++++++++++++++ >> >> >> drivers/thermal/samsung/exynos_tmu_data.h | 27 +++++ >> >> >> 5 files changed, 247 insertions(+), 20 deletions(-) >> >> > >> >> > Best regards, >> >> > -- >> >> > Bartlomiej Zolnierkiewicz >> >> > Samsung R&D Institute Poland >> >> > Samsung Electronics >> >> > >> > >> > >> > >> > -- >> > Best regards, >> > >> > Lukasz Majewski >> > >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group > > > > -- > Best regards, > > Lukasz Majewski > > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-18 8:14 ` Abhilash Kesavan @ 2014-11-19 13:18 ` Eduardo Valentin 2014-11-20 13:05 ` Abhilash Kesavan 0 siblings, 1 reply; 21+ messages in thread From: Eduardo Valentin @ 2014-11-19 13:18 UTC (permalink / raw) To: Abhilash Kesavan Cc: Lukasz Majewski, Bartlomiej Zolnierkiewicz, rui.zhang, linux-pm@vger.kernel.org, amit.daniel [-- Attachment #1: Type: text/plain, Size: 6187 bytes --] Abhilash, On Tue, Nov 18, 2014 at 01:44:16PM +0530, Abhilash Kesavan wrote: > Hi Lukasz, > > On Tue, Nov 18, 2014 at 1:38 PM, Lukasz Majewski <l.majewski@samsung.com> wrote: > > Hi Abhilash, > > > >> Hi Lukasz, > >> > >> On Fri, Nov 14, 2014 at 6:32 PM, Lukasz Majewski > >> <l.majewski@samsung.com> wrote: > >> > Hi Abhilash, > >> > > >> >> Hi Bartlomiej, > >> >> > >> >> On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej Zolnierkiewicz > >> >> <b.zolnierkie@samsung.com> wrote: > >> >> > > >> >> > Hi, > >> >> > > >> >> > On Friday, November 14, 2014 04:47:58 PM Abhilash Kesavan wrote: > >> >> >> The Thermal Management Unit (TMU) in Exynos7 provides > >> >> >> software-controlled (thermal throttling) and hardware-controlled > >> >> >> (thermal tripping) management schemes. > >> >> >> There are several changes in terms of the register and bit > >> >> >> offsets in the Exynos7 TMU from that in older SoCs. There are > >> >> >> also new bits, more trigger levels and a special clock for TMU > >> >> >> that has been introduced in Exynos7. This patchset modifies the > >> >> >> thermal driver to handle all these changes. > >> >> >> > >> >> >> This series is based on linux-next(20141114) and tested on an > >> >> >> Exynos7-based espresso board. > >> >> > > >> >> > Please rebase your patchset on top of: > >> >> > > >> >> > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html > >> >> > >> >> Sure, will rebase on top of your patchset. Is this patchset going > >> >> to be merged into Eduardo's tree soon ? > >> >> > >> >> > > >> >> > There is also ongoing work to convert Exynos thermal driver to > >> >> > use device tree but Lukasz Majewski (added to Cc:) knows better > >> >> > the current state of the work. > >> >> > >> >> Lukasz, are you in the process of making changes to the existing > >> >> exynos tmu bindings ? > >> > > >> > Yes. I'm working on them. > >> > > >> > Please consider following patches [1]: > >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > >> > > >> > They are based on top of Bartek's work. Bartlomiej work is in linux-next already. I am planning to send his refactoring work for 3.19. But I do require more testing to cover for all supported chips, because it is a big change. Can you please also try his series in different boards to see if all chip support is still in one piece? > >> > Patch set status: > >> > 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 posted > >> > yesterday. > >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > >> > > >> > 2. of-thermal rework - I'm working on it now (to export common data > >> > from of-thermal.c and provide structure with ops). > >> > > >> > Patches [1] replace configuration available in exynos_tmu_data.c to > >> > the one from device tree. Also it handles setting cpu cooling > >> > frequencies per CPUs via device tree. > >> > > >> > > >> > I think that it is Eduardo's decision about how Exynos patches > >> > should be serialized. > >> > This is correct. We need some serialization to have a proper flow into Linus tree. > >> > I can only say that after Bartek's and my [1] patch sets the exynos > >> > TMU driver is much simpler with significant code base reduction. > >> > > >> > Personally I think that it may be far more easier to add Exynos7 TMU > >> > support to reworked driver. > >> > >> Thanks for the details. I am OK with rebasing my patches over > >> Bartlomiej and your patch sets. Do you have any public tree with both > >> these patch sets merged ? > > > > I've managed to export my ongoing Exynos TMU work to a public tree. > > You can find it at: > > https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal > > > > > > Please be aware that this code is under development (and review) and > > some parts may be changed. > > > > However, this shows how the Exynos TMU driver would look like after the > > rework. > > > > If in any doubts, please ask. > > Thanks a lot for this. I will start rebasing my exynos7 patches on your tree. > Good! Please rebase your work on top of Bart's and Lukasz's work. New Exynos chip support, at this point, makes sense to hold until we get the rework done. The proposals for change in of-thermal are more or less alined. The rework at the exynos driver as well. So, things should go smoothly, from my perspective. One point I want you, Abhilash, is to check Bartlomiej series. He has ripped several things in his refactoring, like register abstraction, etc. It would be good if you check the impact of those changes in your new chip support, before we send his series for merge. Please have a word there. > Abhilash > > > >> > > >> > > >> >> > >> >> Regards, > >> >> Abhilash > >> >> > > >> >> >> Abhilash Kesavan (4): > >> >> >> thermal: exynos: add optional sclk support > >> >> >> thermal: exynos: add a triminfo_mask field in > >> >> >> exynos_tmu_register structure > >> >> >> thermal: exynos: modify the prototype for code_to_temp > >> >> >> function thermal: exynos: Add TMU support for Exynos7 SoC > >> >> >> > >> >> >> .../devicetree/bindings/thermal/exynos-thermal.txt | 4 + > >> >> >> drivers/thermal/samsung/exynos_tmu.c | 106 > >> >> >> ++++++++++++++---- > >> >> >> drivers/thermal/samsung/exynos_tmu.h | 13 ++- > >> >> >> drivers/thermal/samsung/exynos_tmu_data.c | 117 > >> >> >> ++++++++++++++++++++ > >> >> >> drivers/thermal/samsung/exynos_tmu_data.h | 27 +++++ > >> >> >> 5 files changed, 247 insertions(+), 20 deletions(-) > >> >> > > >> >> > Best regards, > >> >> > -- > >> >> > Bartlomiej Zolnierkiewicz > >> >> > Samsung R&D Institute Poland > >> >> > Samsung Electronics > >> >> > > >> > > >> > > >> > > >> > -- > >> > Best regards, > >> > > >> > Lukasz Majewski > >> > > >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group > > > > > > > > -- > > Best regards, > > > > Lukasz Majewski > > > > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 473 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-19 13:18 ` Eduardo Valentin @ 2014-11-20 13:05 ` Abhilash Kesavan 2014-11-20 13:22 ` Lukasz Majewski 0 siblings, 1 reply; 21+ messages in thread From: Abhilash Kesavan @ 2014-11-20 13:05 UTC (permalink / raw) To: Eduardo Valentin Cc: Lukasz Majewski, Bartlomiej Zolnierkiewicz, rui.zhang, linux-pm@vger.kernel.org, amit.daniel Hi, On Wed, Nov 19, 2014 at 6:48 PM, Eduardo Valentin <edubezval@gmail.com> wrote: > Abhilash, > > On Tue, Nov 18, 2014 at 01:44:16PM +0530, Abhilash Kesavan wrote: >> Hi Lukasz, >> >> On Tue, Nov 18, 2014 at 1:38 PM, Lukasz Majewski <l.majewski@samsung.com> wrote: >> > Hi Abhilash, >> > >> >> Hi Lukasz, >> >> >> >> On Fri, Nov 14, 2014 at 6:32 PM, Lukasz Majewski >> >> <l.majewski@samsung.com> wrote: >> >> > Hi Abhilash, >> >> > >> >> >> Hi Bartlomiej, >> >> >> >> >> >> On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej Zolnierkiewicz >> >> >> <b.zolnierkie@samsung.com> wrote: >> >> >> > >> >> >> > Hi, >> >> >> > >> >> >> > On Friday, November 14, 2014 04:47:58 PM Abhilash Kesavan wrote: >> >> >> >> The Thermal Management Unit (TMU) in Exynos7 provides >> >> >> >> software-controlled (thermal throttling) and hardware-controlled >> >> >> >> (thermal tripping) management schemes. >> >> >> >> There are several changes in terms of the register and bit >> >> >> >> offsets in the Exynos7 TMU from that in older SoCs. There are >> >> >> >> also new bits, more trigger levels and a special clock for TMU >> >> >> >> that has been introduced in Exynos7. This patchset modifies the >> >> >> >> thermal driver to handle all these changes. >> >> >> >> >> >> >> >> This series is based on linux-next(20141114) and tested on an >> >> >> >> Exynos7-based espresso board. >> >> >> > >> >> >> > Please rebase your patchset on top of: >> >> >> > >> >> >> > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html >> >> >> >> >> >> Sure, will rebase on top of your patchset. Is this patchset going >> >> >> to be merged into Eduardo's tree soon ? >> >> >> >> >> >> > >> >> >> > There is also ongoing work to convert Exynos thermal driver to >> >> >> > use device tree but Lukasz Majewski (added to Cc:) knows better >> >> >> > the current state of the work. >> >> >> >> >> >> Lukasz, are you in the process of making changes to the existing >> >> >> exynos tmu bindings ? >> >> > >> >> > Yes. I'm working on them. >> >> > >> >> > Please consider following patches [1]: >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html >> >> > >> >> > They are based on top of Bartek's work. > > Bartlomiej work is in linux-next already. I am planning to send his > refactoring work for 3.19. But I do require more testing > to cover for all supported chips, because it is a big change. > Can you please also try his series in different boards to see if all > chip support is still in one piece? I have tested the exynos TMU driver in linux-next (20141119), which has Bartlomiej's patch series applied, on an SMDK5420 and Exynos5800 based chromebook. Both the boards are working fine (saw the temperature vary in sysfs and the board shutdown when it hit the s/w trip temperature). > >> >> > Patch set status: >> >> > 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 posted >> >> > yesterday. >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html >> >> > >> >> > 2. of-thermal rework - I'm working on it now (to export common data >> >> > from of-thermal.c and provide structure with ops). >> >> > >> >> > Patches [1] replace configuration available in exynos_tmu_data.c to >> >> > the one from device tree. Also it handles setting cpu cooling >> >> > frequencies per CPUs via device tree. >> >> > >> >> > >> >> > I think that it is Eduardo's decision about how Exynos patches >> >> > should be serialized. >> >> > > > This is correct. We need some serialization to have a proper flow into > Linus tree. > >> >> > I can only say that after Bartek's and my [1] patch sets the exynos >> >> > TMU driver is much simpler with significant code base reduction. >> >> > >> >> > Personally I think that it may be far more easier to add Exynos7 TMU >> >> > support to reworked driver. >> >> >> >> Thanks for the details. I am OK with rebasing my patches over >> >> Bartlomiej and your patch sets. Do you have any public tree with both >> >> these patch sets merged ? >> > >> > I've managed to export my ongoing Exynos TMU work to a public tree. >> > You can find it at: >> > https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal >> > >> > >> > Please be aware that this code is under development (and review) and >> > some parts may be changed. >> > >> > However, this shows how the Exynos TMU driver would look like after the >> > rework. >> > >> > If in any doubts, please ask. >> >> Thanks a lot for this. I will start rebasing my exynos7 patches on your tree. >> > > Good! Please rebase your work on top of Bart's and Lukasz's work. > > New Exynos chip support, at this point, makes sense to hold until we get > the rework done. The proposals for change in of-thermal are more or less > alined. The rework at the exynos driver as well. So, things should go > smoothly, from my perspective. Sure I will wait for Lukasz's consolidation to get in. However, there is a patch in my series [1] which adds support for an optional special clock. Could that be picked up independently now if I rebase it over Bartlomiej's patchset ? [1] http://permalink.gmane.org/gmane.linux.power-management.general/52826 > > One point I want you, Abhilash, is to check Bartlomiej series. He has ripped > several things in his refactoring, like register abstraction, etc. It would > be good if you check the impact of those changes in your new chip > support, before we send his series for merge. Please have a word there. Lukasz, I tested the tree with your patches applied on a SMDK5420 and 5800-Peach-Pi. However, the boards hang at boot-up after failing to get the trip points ("get_th_reg: Cannot get trip points from of-thermal.c!"). I have not debugged this yet and was wondering if you have noticed similar issues or have already fixed this. I am currently in the process of porting the Exynos7 changes over yours, will let you know if I have any other questions. Regards, Abhilash >> >> >> >> Abhilash Kesavan (4): >> >> >> >> thermal: exynos: add optional sclk support >> >> >> >> thermal: exynos: add a triminfo_mask field in >> >> >> >> exynos_tmu_register structure >> >> >> >> thermal: exynos: modify the prototype for code_to_temp >> >> >> >> function thermal: exynos: Add TMU support for Exynos7 SoC >> >> >> >> >> >> >> >> .../devicetree/bindings/thermal/exynos-thermal.txt | 4 + >> >> >> >> drivers/thermal/samsung/exynos_tmu.c | 106 >> >> >> >> ++++++++++++++---- >> >> >> >> drivers/thermal/samsung/exynos_tmu.h | 13 ++- >> >> >> >> drivers/thermal/samsung/exynos_tmu_data.c | 117 >> >> >> >> ++++++++++++++++++++ >> >> >> >> drivers/thermal/samsung/exynos_tmu_data.h | 27 +++++ >> >> >> >> 5 files changed, 247 insertions(+), 20 deletions(-) >> >> >> > >> >> >> > Best regards, >> >> >> > -- >> >> >> > Bartlomiej Zolnierkiewicz >> >> >> > Samsung R&D Institute Poland >> >> >> > Samsung Electronics >> >> >> > >> >> > >> >> > >> >> > >> >> > -- >> >> > Best regards, >> >> > >> >> > Lukasz Majewski >> >> > >> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group >> > >> > >> > >> > -- >> > Best regards, >> > >> > Lukasz Majewski >> > >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group > > ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-20 13:05 ` Abhilash Kesavan @ 2014-11-20 13:22 ` Lukasz Majewski 2014-11-20 14:49 ` Abhilash Kesavan 0 siblings, 1 reply; 21+ messages in thread From: Lukasz Majewski @ 2014-11-20 13:22 UTC (permalink / raw) To: Abhilash Kesavan Cc: Eduardo Valentin, Bartlomiej Zolnierkiewicz, rui.zhang, linux-pm@vger.kernel.org, amit.daniel Hi Abhilash, > Hi, > > On Wed, Nov 19, 2014 at 6:48 PM, Eduardo Valentin > <edubezval@gmail.com> wrote: > > Abhilash, > > > > On Tue, Nov 18, 2014 at 01:44:16PM +0530, Abhilash Kesavan wrote: > >> Hi Lukasz, > >> > >> On Tue, Nov 18, 2014 at 1:38 PM, Lukasz Majewski > >> <l.majewski@samsung.com> wrote: > >> > Hi Abhilash, > >> > > >> >> Hi Lukasz, > >> >> > >> >> On Fri, Nov 14, 2014 at 6:32 PM, Lukasz Majewski > >> >> <l.majewski@samsung.com> wrote: > >> >> > Hi Abhilash, > >> >> > > >> >> >> Hi Bartlomiej, > >> >> >> > >> >> >> On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej Zolnierkiewicz > >> >> >> <b.zolnierkie@samsung.com> wrote: > >> >> >> > > >> >> >> > Hi, > >> >> >> > > >> >> >> > On Friday, November 14, 2014 04:47:58 PM Abhilash Kesavan > >> >> >> > wrote: > >> >> >> >> The Thermal Management Unit (TMU) in Exynos7 provides > >> >> >> >> software-controlled (thermal throttling) and > >> >> >> >> hardware-controlled (thermal tripping) management schemes. > >> >> >> >> There are several changes in terms of the register and bit > >> >> >> >> offsets in the Exynos7 TMU from that in older SoCs. There > >> >> >> >> are also new bits, more trigger levels and a special > >> >> >> >> clock for TMU that has been introduced in Exynos7. This > >> >> >> >> patchset modifies the thermal driver to handle all these > >> >> >> >> changes. > >> >> >> >> > >> >> >> >> This series is based on linux-next(20141114) and tested > >> >> >> >> on an Exynos7-based espresso board. > >> >> >> > > >> >> >> > Please rebase your patchset on top of: > >> >> >> > > >> >> >> > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html > >> >> >> > >> >> >> Sure, will rebase on top of your patchset. Is this patchset > >> >> >> going to be merged into Eduardo's tree soon ? > >> >> >> > >> >> >> > > >> >> >> > There is also ongoing work to convert Exynos thermal > >> >> >> > driver to use device tree but Lukasz Majewski (added to > >> >> >> > Cc:) knows better the current state of the work. > >> >> >> > >> >> >> Lukasz, are you in the process of making changes to the > >> >> >> existing exynos tmu bindings ? > >> >> > > >> >> > Yes. I'm working on them. > >> >> > > >> >> > Please consider following patches [1]: > >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > >> >> > > >> >> > They are based on top of Bartek's work. > > > > Bartlomiej work is in linux-next already. I am planning to send his > > refactoring work for 3.19. But I do require more testing > > to cover for all supported chips, because it is a big change. > > Can you please also try his series in different boards to see if all > > chip support is still in one piece? > > I have tested the exynos TMU driver in linux-next (20141119), which > has Bartlomiej's patch series applied, on an SMDK5420 and Exynos5800 > based chromebook. Both the boards are working fine (saw the > temperature vary in sysfs and the board shutdown when it hit the s/w > trip temperature). Thanks. > > > > >> >> > Patch set status: > >> >> > 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 posted > >> >> > yesterday. > >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > >> >> > > >> >> > 2. of-thermal rework - I'm working on it now (to export > >> >> > common data from of-thermal.c and provide structure with ops). > >> >> > > >> >> > Patches [1] replace configuration available in > >> >> > exynos_tmu_data.c to the one from device tree. Also it > >> >> > handles setting cpu cooling frequencies per CPUs via device > >> >> > tree. > >> >> > > >> >> > > >> >> > I think that it is Eduardo's decision about how Exynos patches > >> >> > should be serialized. > >> >> > > > > > This is correct. We need some serialization to have a proper flow > > into Linus tree. > > > >> >> > I can only say that after Bartek's and my [1] patch sets the > >> >> > exynos TMU driver is much simpler with significant code base > >> >> > reduction. > >> >> > > >> >> > Personally I think that it may be far more easier to add > >> >> > Exynos7 TMU support to reworked driver. > >> >> > >> >> Thanks for the details. I am OK with rebasing my patches over > >> >> Bartlomiej and your patch sets. Do you have any public tree > >> >> with both these patch sets merged ? > >> > > >> > I've managed to export my ongoing Exynos TMU work to a public > >> > tree. You can find it at: > >> > https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal > >> > > >> > > >> > Please be aware that this code is under development (and review) > >> > and some parts may be changed. > >> > > >> > However, this shows how the Exynos TMU driver would look like > >> > after the rework. > >> > > >> > If in any doubts, please ask. > >> > >> Thanks a lot for this. I will start rebasing my exynos7 patches on > >> your tree. > >> > > > > Good! Please rebase your work on top of Bart's and Lukasz's work. > > > > New Exynos chip support, at this point, makes sense to hold until > > we get the rework done. The proposals for change in of-thermal are > > more or less alined. The rework at the exynos driver as well. So, > > things should go smoothly, from my perspective. > > Sure I will wait for Lukasz's consolidation to get in. However, there > is a patch in my series [1] which adds support for an optional special > clock. Could that be picked up independently now if I rebase it over > Bartlomiej's patchset ? > > [1] > http://permalink.gmane.org/gmane.linux.power-management.general/52826 > > > > One point I want you, Abhilash, is to check Bartlomiej series. He > > has ripped several things in his refactoring, like register > > abstraction, etc. It would be good if you check the impact of those > > changes in your new chip support, before we send his series for > > merge. Please have a word there. > > Lukasz, I tested the tree with your patches applied on a SMDK5420 and > 5800-Peach-Pi. However, the boards hang at boot-up after failing to > get the trip points ("get_th_reg: Cannot get trip points from > of-thermal.c!"). I have not debugged this yet and was wondering if you > have noticed similar issues or have already fixed this. I suspect that some nodes in the device tree are missing. I've tested those patches on [1]: - Exynos4210 - Trats (TMU zone + cpu_cooling) [exynos4210-trats.dts] - Exynos4412 - Trats2/Odroid U3 (TMU zone + cpu_cooling) [exynos4412-trats2.dts, exynos4412-odroidu3.dts] - Exynos5250 - Arndale (TMU zone + cpu_cooling) [exynos5250-arndale.dts] - Exynos5420 - Arndale-octa (only TMU zones) [exynos5420-arndale-octa.dts] I might have overlooked some entries for dts files since I don't have Peach-Pi and SMDK devices. Please, look on above device tree sources [1] for a reference. > > I am currently in the process of porting the Exynos7 changes over > yours, will let you know if I have any other questions. Thanks for feedback. Comments are more than welcome :-) > > Regards, > Abhilash > > >> >> >> >> Abhilash Kesavan (4): > >> >> >> >> thermal: exynos: add optional sclk support > >> >> >> >> thermal: exynos: add a triminfo_mask field in > >> >> >> >> exynos_tmu_register structure > >> >> >> >> thermal: exynos: modify the prototype for code_to_temp > >> >> >> >> function thermal: exynos: Add TMU support for Exynos7 SoC > >> >> >> >> > >> >> >> >> .../devicetree/bindings/thermal/exynos-thermal.txt | > >> >> >> >> 4 + drivers/thermal/samsung/exynos_tmu.c | > >> >> >> >> 106 ++++++++++++++---- > >> >> >> >> drivers/thermal/samsung/exynos_tmu.h | 13 > >> >> >> >> ++- drivers/thermal/samsung/exynos_tmu_data.c | > >> >> >> >> 117 ++++++++++++++++++++ > >> >> >> >> drivers/thermal/samsung/exynos_tmu_data.h | 27 > >> >> >> >> +++++ 5 files changed, 247 insertions(+), 20 deletions(-) > >> >> >> > > >> >> >> > Best regards, > >> >> >> > -- > >> >> >> > Bartlomiej Zolnierkiewicz > >> >> >> > Samsung R&D Institute Poland > >> >> >> > Samsung Electronics > >> >> >> > > >> >> > > >> >> > > >> >> > > >> >> > -- > >> >> > Best regards, > >> >> > > >> >> > Lukasz Majewski > >> >> > > >> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group > >> > > >> > > >> > > >> > -- > >> > Best regards, > >> > > >> > Lukasz Majewski > >> > > >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group > > > > -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-20 13:22 ` Lukasz Majewski @ 2014-11-20 14:49 ` Abhilash Kesavan 2014-11-22 7:45 ` Abhilash Kesavan 0 siblings, 1 reply; 21+ messages in thread From: Abhilash Kesavan @ 2014-11-20 14:49 UTC (permalink / raw) To: Lukasz Majewski Cc: Eduardo Valentin, Bartlomiej Zolnierkiewicz, rui.zhang, linux-pm@vger.kernel.org, amit.daniel Hi Lukasz, On Thu, Nov 20, 2014 at 6:52 PM, Lukasz Majewski <l.majewski@samsung.com> wrote: > Hi Abhilash, > >> Hi, >> >> On Wed, Nov 19, 2014 at 6:48 PM, Eduardo Valentin >> <edubezval@gmail.com> wrote: >> > Abhilash, >> > >> > On Tue, Nov 18, 2014 at 01:44:16PM +0530, Abhilash Kesavan wrote: >> >> Hi Lukasz, >> >> >> >> On Tue, Nov 18, 2014 at 1:38 PM, Lukasz Majewski >> >> <l.majewski@samsung.com> wrote: >> >> > Hi Abhilash, >> >> > >> >> >> Hi Lukasz, >> >> >> >> >> >> On Fri, Nov 14, 2014 at 6:32 PM, Lukasz Majewski >> >> >> <l.majewski@samsung.com> wrote: >> >> >> > Hi Abhilash, >> >> >> > >> >> >> >> Hi Bartlomiej, >> >> >> >> >> >> >> >> On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej Zolnierkiewicz >> >> >> >> <b.zolnierkie@samsung.com> wrote: >> >> >> >> > >> >> >> >> > Hi, >> >> >> >> > >> >> >> >> > On Friday, November 14, 2014 04:47:58 PM Abhilash Kesavan >> >> >> >> > wrote: >> >> >> >> >> The Thermal Management Unit (TMU) in Exynos7 provides >> >> >> >> >> software-controlled (thermal throttling) and >> >> >> >> >> hardware-controlled (thermal tripping) management schemes. >> >> >> >> >> There are several changes in terms of the register and bit >> >> >> >> >> offsets in the Exynos7 TMU from that in older SoCs. There >> >> >> >> >> are also new bits, more trigger levels and a special >> >> >> >> >> clock for TMU that has been introduced in Exynos7. This >> >> >> >> >> patchset modifies the thermal driver to handle all these >> >> >> >> >> changes. >> >> >> >> >> >> >> >> >> >> This series is based on linux-next(20141114) and tested >> >> >> >> >> on an Exynos7-based espresso board. >> >> >> >> > >> >> >> >> > Please rebase your patchset on top of: >> >> >> >> > >> >> >> >> > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html >> >> >> >> >> >> >> >> Sure, will rebase on top of your patchset. Is this patchset >> >> >> >> going to be merged into Eduardo's tree soon ? >> >> >> >> >> >> >> >> > >> >> >> >> > There is also ongoing work to convert Exynos thermal >> >> >> >> > driver to use device tree but Lukasz Majewski (added to >> >> >> >> > Cc:) knows better the current state of the work. >> >> >> >> >> >> >> >> Lukasz, are you in the process of making changes to the >> >> >> >> existing exynos tmu bindings ? >> >> >> > >> >> >> > Yes. I'm working on them. >> >> >> > >> >> >> > Please consider following patches [1]: >> >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html >> >> >> > >> >> >> > They are based on top of Bartek's work. >> > >> > Bartlomiej work is in linux-next already. I am planning to send his >> > refactoring work for 3.19. But I do require more testing >> > to cover for all supported chips, because it is a big change. >> > Can you please also try his series in different boards to see if all >> > chip support is still in one piece? >> >> I have tested the exynos TMU driver in linux-next (20141119), which >> has Bartlomiej's patch series applied, on an SMDK5420 and Exynos5800 >> based chromebook. Both the boards are working fine (saw the >> temperature vary in sysfs and the board shutdown when it hit the s/w >> trip temperature). > > Thanks. > >> >> > >> >> >> > Patch set status: >> >> >> > 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 posted >> >> >> > yesterday. >> >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html >> >> >> > >> >> >> > 2. of-thermal rework - I'm working on it now (to export >> >> >> > common data from of-thermal.c and provide structure with ops). >> >> >> > >> >> >> > Patches [1] replace configuration available in >> >> >> > exynos_tmu_data.c to the one from device tree. Also it >> >> >> > handles setting cpu cooling frequencies per CPUs via device >> >> >> > tree. >> >> >> > >> >> >> > >> >> >> > I think that it is Eduardo's decision about how Exynos patches >> >> >> > should be serialized. >> >> >> > >> > >> > This is correct. We need some serialization to have a proper flow >> > into Linus tree. >> > >> >> >> > I can only say that after Bartek's and my [1] patch sets the >> >> >> > exynos TMU driver is much simpler with significant code base >> >> >> > reduction. >> >> >> > >> >> >> > Personally I think that it may be far more easier to add >> >> >> > Exynos7 TMU support to reworked driver. >> >> >> >> >> >> Thanks for the details. I am OK with rebasing my patches over >> >> >> Bartlomiej and your patch sets. Do you have any public tree >> >> >> with both these patch sets merged ? >> >> > >> >> > I've managed to export my ongoing Exynos TMU work to a public >> >> > tree. You can find it at: >> >> > https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal >> >> > >> >> > >> >> > Please be aware that this code is under development (and review) >> >> > and some parts may be changed. >> >> > >> >> > However, this shows how the Exynos TMU driver would look like >> >> > after the rework. >> >> > >> >> > If in any doubts, please ask. >> >> >> >> Thanks a lot for this. I will start rebasing my exynos7 patches on >> >> your tree. >> >> >> > >> > Good! Please rebase your work on top of Bart's and Lukasz's work. >> > >> > New Exynos chip support, at this point, makes sense to hold until >> > we get the rework done. The proposals for change in of-thermal are >> > more or less alined. The rework at the exynos driver as well. So, >> > things should go smoothly, from my perspective. >> >> Sure I will wait for Lukasz's consolidation to get in. However, there >> is a patch in my series [1] which adds support for an optional special >> clock. Could that be picked up independently now if I rebase it over >> Bartlomiej's patchset ? >> >> [1] >> http://permalink.gmane.org/gmane.linux.power-management.general/52826 >> > >> > One point I want you, Abhilash, is to check Bartlomiej series. He >> > has ripped several things in his refactoring, like register >> > abstraction, etc. It would be good if you check the impact of those >> > changes in your new chip support, before we send his series for >> > merge. Please have a word there. >> >> Lukasz, I tested the tree with your patches applied on a SMDK5420 and >> 5800-Peach-Pi. However, the boards hang at boot-up after failing to >> get the trip points ("get_th_reg: Cannot get trip points from >> of-thermal.c!"). I have not debugged this yet and was wondering if you >> have noticed similar issues or have already fixed this. > > I suspect that some nodes in the device tree are missing. > > I've tested those patches on [1]: > > - Exynos4210 - Trats (TMU zone + cpu_cooling) [exynos4210-trats.dts] > - Exynos4412 - Trats2/Odroid U3 (TMU zone + cpu_cooling) > [exynos4412-trats2.dts, exynos4412-odroidu3.dts] > - Exynos5250 - Arndale (TMU zone + cpu_cooling) [exynos5250-arndale.dts] > - Exynos5420 - Arndale-octa (only TMU zones) > [exynos5420-arndale-octa.dts] > > > I might have overlooked some entries for dts files since I don't have > Peach-Pi and SMDK devices. > > Please, look on above device tree sources [1] for a reference. I don't think that the dt entries are the problem as you are including the exynos5420-trip-points.dtsi file in exynos5420.dtsi and this would apply for all 5420 based boards. Considering that 5420 based arndale-octa is working for you, I will re-check my setup. Can you confirm "https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal" has all your latest changes as that is the tree I am currently using. Also, can you or Eduardo comment on if my SCLK patch can be considered before your patch set gets in or does that need to wait as well. Regards, Abhilash > >> >> I am currently in the process of porting the Exynos7 changes over >> yours, will let you know if I have any other questions. > > Thanks for feedback. Comments are more than welcome :-) > >> >> Regards, >> Abhilash >> >> >> >> >> >> Abhilash Kesavan (4): >> >> >> >> >> thermal: exynos: add optional sclk support >> >> >> >> >> thermal: exynos: add a triminfo_mask field in >> >> >> >> >> exynos_tmu_register structure >> >> >> >> >> thermal: exynos: modify the prototype for code_to_temp >> >> >> >> >> function thermal: exynos: Add TMU support for Exynos7 SoC >> >> >> >> >> >> >> >> >> >> .../devicetree/bindings/thermal/exynos-thermal.txt | >> >> >> >> >> 4 + drivers/thermal/samsung/exynos_tmu.c | >> >> >> >> >> 106 ++++++++++++++---- >> >> >> >> >> drivers/thermal/samsung/exynos_tmu.h | 13 >> >> >> >> >> ++- drivers/thermal/samsung/exynos_tmu_data.c | >> >> >> >> >> 117 ++++++++++++++++++++ >> >> >> >> >> drivers/thermal/samsung/exynos_tmu_data.h | 27 >> >> >> >> >> +++++ 5 files changed, 247 insertions(+), 20 deletions(-) >> >> >> >> > >> >> >> >> > Best regards, >> >> >> >> > -- >> >> >> >> > Bartlomiej Zolnierkiewicz >> >> >> >> > Samsung R&D Institute Poland >> >> >> >> > Samsung Electronics >> >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> > -- >> >> >> > Best regards, >> >> >> > >> >> >> > Lukasz Majewski >> >> >> > >> >> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group >> >> > >> >> > >> >> > >> >> > -- >> >> > Best regards, >> >> > >> >> > Lukasz Majewski >> >> > >> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group >> > >> > > > > > -- > Best regards, > > Lukasz Majewski > > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-20 14:49 ` Abhilash Kesavan @ 2014-11-22 7:45 ` Abhilash Kesavan 2014-11-24 9:24 ` Lukasz Majewski 0 siblings, 1 reply; 21+ messages in thread From: Abhilash Kesavan @ 2014-11-22 7:45 UTC (permalink / raw) To: Lukasz Majewski Cc: Eduardo Valentin, Bartlomiej Zolnierkiewicz, rui.zhang, linux-pm@vger.kernel.org, amit.daniel Hi Lukasz, On Thu, Nov 20, 2014 at 8:19 PM, Abhilash Kesavan <kesavan.abhilash@gmail.com> wrote: > Hi Lukasz, > > On Thu, Nov 20, 2014 at 6:52 PM, Lukasz Majewski <l.majewski@samsung.com> wrote: >> Hi Abhilash, >> >>> Hi, >>> >>> On Wed, Nov 19, 2014 at 6:48 PM, Eduardo Valentin >>> <edubezval@gmail.com> wrote: >>> > Abhilash, >>> > >>> > On Tue, Nov 18, 2014 at 01:44:16PM +0530, Abhilash Kesavan wrote: >>> >> Hi Lukasz, >>> >> >>> >> On Tue, Nov 18, 2014 at 1:38 PM, Lukasz Majewski >>> >> <l.majewski@samsung.com> wrote: >>> >> > Hi Abhilash, >>> >> > >>> >> >> Hi Lukasz, >>> >> >> >>> >> >> On Fri, Nov 14, 2014 at 6:32 PM, Lukasz Majewski >>> >> >> <l.majewski@samsung.com> wrote: >>> >> >> > Hi Abhilash, >>> >> >> > >>> >> >> >> Hi Bartlomiej, >>> >> >> >> >>> >> >> >> On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej Zolnierkiewicz >>> >> >> >> <b.zolnierkie@samsung.com> wrote: >>> >> >> >> > >>> >> >> >> > Hi, >>> >> >> >> > >>> >> >> >> > On Friday, November 14, 2014 04:47:58 PM Abhilash Kesavan >>> >> >> >> > wrote: >>> >> >> >> >> The Thermal Management Unit (TMU) in Exynos7 provides >>> >> >> >> >> software-controlled (thermal throttling) and >>> >> >> >> >> hardware-controlled (thermal tripping) management schemes. >>> >> >> >> >> There are several changes in terms of the register and bit >>> >> >> >> >> offsets in the Exynos7 TMU from that in older SoCs. There >>> >> >> >> >> are also new bits, more trigger levels and a special >>> >> >> >> >> clock for TMU that has been introduced in Exynos7. This >>> >> >> >> >> patchset modifies the thermal driver to handle all these >>> >> >> >> >> changes. >>> >> >> >> >> >>> >> >> >> >> This series is based on linux-next(20141114) and tested >>> >> >> >> >> on an Exynos7-based espresso board. >>> >> >> >> > >>> >> >> >> > Please rebase your patchset on top of: >>> >> >> >> > >>> >> >> >> > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html >>> >> >> >> >>> >> >> >> Sure, will rebase on top of your patchset. Is this patchset >>> >> >> >> going to be merged into Eduardo's tree soon ? >>> >> >> >> >>> >> >> >> > >>> >> >> >> > There is also ongoing work to convert Exynos thermal >>> >> >> >> > driver to use device tree but Lukasz Majewski (added to >>> >> >> >> > Cc:) knows better the current state of the work. >>> >> >> >> >>> >> >> >> Lukasz, are you in the process of making changes to the >>> >> >> >> existing exynos tmu bindings ? >>> >> >> > >>> >> >> > Yes. I'm working on them. >>> >> >> > >>> >> >> > Please consider following patches [1]: >>> >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html >>> >> >> > >>> >> >> > They are based on top of Bartek's work. >>> > >>> > Bartlomiej work is in linux-next already. I am planning to send his >>> > refactoring work for 3.19. But I do require more testing >>> > to cover for all supported chips, because it is a big change. >>> > Can you please also try his series in different boards to see if all >>> > chip support is still in one piece? >>> >>> I have tested the exynos TMU driver in linux-next (20141119), which >>> has Bartlomiej's patch series applied, on an SMDK5420 and Exynos5800 >>> based chromebook. Both the boards are working fine (saw the >>> temperature vary in sysfs and the board shutdown when it hit the s/w >>> trip temperature). >> >> Thanks. >> >>> >>> > >>> >> >> > Patch set status: >>> >> >> > 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 posted >>> >> >> > yesterday. >>> >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html >>> >> >> > >>> >> >> > 2. of-thermal rework - I'm working on it now (to export >>> >> >> > common data from of-thermal.c and provide structure with ops). >>> >> >> > >>> >> >> > Patches [1] replace configuration available in >>> >> >> > exynos_tmu_data.c to the one from device tree. Also it >>> >> >> > handles setting cpu cooling frequencies per CPUs via device >>> >> >> > tree. >>> >> >> > >>> >> >> > >>> >> >> > I think that it is Eduardo's decision about how Exynos patches >>> >> >> > should be serialized. >>> >> >> > >>> > >>> > This is correct. We need some serialization to have a proper flow >>> > into Linus tree. >>> > >>> >> >> > I can only say that after Bartek's and my [1] patch sets the >>> >> >> > exynos TMU driver is much simpler with significant code base >>> >> >> > reduction. >>> >> >> > >>> >> >> > Personally I think that it may be far more easier to add >>> >> >> > Exynos7 TMU support to reworked driver. >>> >> >> >>> >> >> Thanks for the details. I am OK with rebasing my patches over >>> >> >> Bartlomiej and your patch sets. Do you have any public tree >>> >> >> with both these patch sets merged ? >>> >> > >>> >> > I've managed to export my ongoing Exynos TMU work to a public >>> >> > tree. You can find it at: >>> >> > https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal >>> >> > >>> >> > >>> >> > Please be aware that this code is under development (and review) >>> >> > and some parts may be changed. >>> >> > >>> >> > However, this shows how the Exynos TMU driver would look like >>> >> > after the rework. >>> >> > >>> >> > If in any doubts, please ask. >>> >> >>> >> Thanks a lot for this. I will start rebasing my exynos7 patches on >>> >> your tree. >>> >> >>> > >>> > Good! Please rebase your work on top of Bart's and Lukasz's work. >>> > >>> > New Exynos chip support, at this point, makes sense to hold until >>> > we get the rework done. The proposals for change in of-thermal are >>> > more or less alined. The rework at the exynos driver as well. So, >>> > things should go smoothly, from my perspective. >>> >>> Sure I will wait for Lukasz's consolidation to get in. However, there >>> is a patch in my series [1] which adds support for an optional special >>> clock. Could that be picked up independently now if I rebase it over >>> Bartlomiej's patchset ? >>> >>> [1] >>> http://permalink.gmane.org/gmane.linux.power-management.general/52826 >>> > >>> > One point I want you, Abhilash, is to check Bartlomiej series. He >>> > has ripped several things in his refactoring, like register >>> > abstraction, etc. It would be good if you check the impact of those >>> > changes in your new chip support, before we send his series for >>> > merge. Please have a word there. >>> >>> Lukasz, I tested the tree with your patches applied on a SMDK5420 and >>> 5800-Peach-Pi. However, the boards hang at boot-up after failing to >>> get the trip points ("get_th_reg: Cannot get trip points from >>> of-thermal.c!"). I have not debugged this yet and was wondering if you >>> have noticed similar issues or have already fixed this. >> >> I suspect that some nodes in the device tree are missing. >> >> I've tested those patches on [1]: >> >> - Exynos4210 - Trats (TMU zone + cpu_cooling) [exynos4210-trats.dts] >> - Exynos4412 - Trats2/Odroid U3 (TMU zone + cpu_cooling) >> [exynos4412-trats2.dts, exynos4412-odroidu3.dts] >> - Exynos5250 - Arndale (TMU zone + cpu_cooling) [exynos5250-arndale.dts] >> - Exynos5420 - Arndale-octa (only TMU zones) >> [exynos5420-arndale-octa.dts] >> >> >> I might have overlooked some entries for dts files since I don't have >> Peach-Pi and SMDK devices. >> >> Please, look on above device tree sources [1] for a reference. > > I don't think that the dt entries are the problem as you are including > the exynos5420-trip-points.dtsi file in exynos5420.dtsi and this would > apply for all 5420 based boards. Considering that 5420 based > arndale-octa is working for you, I will re-check my setup. It was the DT entries after all, specifically the cooling map bits are missing for 5420. I am not sure why you didn't see the same issue with Arndale 5420 Octa. Anyway, after adding entries similar to the ones present for other SoCs, both the SMDK5420 and 5800 Peach-Pi are working fine. > > Can you confirm > "https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal" > has all your latest changes as that is the tree I am currently using. > > Also, can you or Eduardo comment on if my SCLK patch can be considered > before your patch set gets in or does that need to wait as well. OK, I guess I'll just post it separately and maybe Eduardo can consider picking it up. >>> >>> I am currently in the process of porting the Exynos7 changes over >>> yours, will let you know if I have any other questions. >> >> Thanks for feedback. Comments are more than welcome :-) >From what I have tested so far, there are a couple of things I have noticed. The thermal zone mode shows as being disabled in sysfs with your patches, when it used to be enabled prior to your patches. Not sure if this is expected. Also, your 17/21 seems to be adding exynos_tmu_initialize again to the probe function even though it is already present. Regards, Abhilash >> >>> >>> Regards, >>> Abhilash >>> >>> >> >> >> >> Abhilash Kesavan (4): >>> >> >> >> >> thermal: exynos: add optional sclk support >>> >> >> >> >> thermal: exynos: add a triminfo_mask field in >>> >> >> >> >> exynos_tmu_register structure >>> >> >> >> >> thermal: exynos: modify the prototype for code_to_temp >>> >> >> >> >> function thermal: exynos: Add TMU support for Exynos7 SoC >>> >> >> >> >> >>> >> >> >> >> .../devicetree/bindings/thermal/exynos-thermal.txt | >>> >> >> >> >> 4 + drivers/thermal/samsung/exynos_tmu.c | >>> >> >> >> >> 106 ++++++++++++++---- >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu.h | 13 >>> >> >> >> >> ++- drivers/thermal/samsung/exynos_tmu_data.c | >>> >> >> >> >> 117 ++++++++++++++++++++ >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu_data.h | 27 >>> >> >> >> >> +++++ 5 files changed, 247 insertions(+), 20 deletions(-) >>> >> >> >> > >>> >> >> >> > Best regards, >>> >> >> >> > -- >>> >> >> >> > Bartlomiej Zolnierkiewicz >>> >> >> >> > Samsung R&D Institute Poland >>> >> >> >> > Samsung Electronics >>> >> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > -- >>> >> >> > Best regards, >>> >> >> > >>> >> >> > Lukasz Majewski >>> >> >> > >>> >> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group >>> >> > >>> >> > >>> >> > >>> >> > -- >>> >> > Best regards, >>> >> > >>> >> > Lukasz Majewski >>> >> > >>> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group >>> > >>> > >> >> >> >> -- >> Best regards, >> >> Lukasz Majewski >> >> Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-22 7:45 ` Abhilash Kesavan @ 2014-11-24 9:24 ` Lukasz Majewski 2014-11-24 10:50 ` Abhilash Kesavan 0 siblings, 1 reply; 21+ messages in thread From: Lukasz Majewski @ 2014-11-24 9:24 UTC (permalink / raw) To: Abhilash Kesavan Cc: Eduardo Valentin, Bartlomiej Zolnierkiewicz, rui.zhang, linux-pm@vger.kernel.org, amit.daniel Hi Abhilash, > Hi Lukasz, > > On Thu, Nov 20, 2014 at 8:19 PM, Abhilash Kesavan > <kesavan.abhilash@gmail.com> wrote: > > Hi Lukasz, > > > > On Thu, Nov 20, 2014 at 6:52 PM, Lukasz Majewski > > <l.majewski@samsung.com> wrote: > >> Hi Abhilash, > >> > >>> Hi, > >>> > >>> On Wed, Nov 19, 2014 at 6:48 PM, Eduardo Valentin > >>> <edubezval@gmail.com> wrote: > >>> > Abhilash, > >>> > > >>> > On Tue, Nov 18, 2014 at 01:44:16PM +0530, Abhilash Kesavan > >>> > wrote: > >>> >> Hi Lukasz, > >>> >> > >>> >> On Tue, Nov 18, 2014 at 1:38 PM, Lukasz Majewski > >>> >> <l.majewski@samsung.com> wrote: > >>> >> > Hi Abhilash, > >>> >> > > >>> >> >> Hi Lukasz, > >>> >> >> > >>> >> >> On Fri, Nov 14, 2014 at 6:32 PM, Lukasz Majewski > >>> >> >> <l.majewski@samsung.com> wrote: > >>> >> >> > Hi Abhilash, > >>> >> >> > > >>> >> >> >> Hi Bartlomiej, > >>> >> >> >> > >>> >> >> >> On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej > >>> >> >> >> Zolnierkiewicz <b.zolnierkie@samsung.com> wrote: > >>> >> >> >> > > >>> >> >> >> > Hi, > >>> >> >> >> > > >>> >> >> >> > On Friday, November 14, 2014 04:47:58 PM Abhilash > >>> >> >> >> > Kesavan wrote: > >>> >> >> >> >> The Thermal Management Unit (TMU) in Exynos7 provides > >>> >> >> >> >> software-controlled (thermal throttling) and > >>> >> >> >> >> hardware-controlled (thermal tripping) management > >>> >> >> >> >> schemes. There are several changes in terms of the > >>> >> >> >> >> register and bit offsets in the Exynos7 TMU from that > >>> >> >> >> >> in older SoCs. There are also new bits, more trigger > >>> >> >> >> >> levels and a special clock for TMU that has been > >>> >> >> >> >> introduced in Exynos7. This patchset modifies the > >>> >> >> >> >> thermal driver to handle all these changes. > >>> >> >> >> >> > >>> >> >> >> >> This series is based on linux-next(20141114) and > >>> >> >> >> >> tested on an Exynos7-based espresso board. > >>> >> >> >> > > >>> >> >> >> > Please rebase your patchset on top of: > >>> >> >> >> > > >>> >> >> >> > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html > >>> >> >> >> > >>> >> >> >> Sure, will rebase on top of your patchset. Is this > >>> >> >> >> patchset going to be merged into Eduardo's tree soon ? > >>> >> >> >> > >>> >> >> >> > > >>> >> >> >> > There is also ongoing work to convert Exynos thermal > >>> >> >> >> > driver to use device tree but Lukasz Majewski (added to > >>> >> >> >> > Cc:) knows better the current state of the work. > >>> >> >> >> > >>> >> >> >> Lukasz, are you in the process of making changes to the > >>> >> >> >> existing exynos tmu bindings ? > >>> >> >> > > >>> >> >> > Yes. I'm working on them. > >>> >> >> > > >>> >> >> > Please consider following patches [1]: > >>> >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > >>> >> >> > > >>> >> >> > They are based on top of Bartek's work. > >>> > > >>> > Bartlomiej work is in linux-next already. I am planning to send > >>> > his refactoring work for 3.19. But I do require more testing > >>> > to cover for all supported chips, because it is a big change. > >>> > Can you please also try his series in different boards to see > >>> > if all chip support is still in one piece? > >>> > >>> I have tested the exynos TMU driver in linux-next (20141119), > >>> which has Bartlomiej's patch series applied, on an SMDK5420 and > >>> Exynos5800 based chromebook. Both the boards are working fine > >>> (saw the temperature vary in sysfs and the board shutdown when it > >>> hit the s/w trip temperature). > >> > >> Thanks. > >> > >>> > >>> > > >>> >> >> > Patch set status: > >>> >> >> > 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 posted > >>> >> >> > yesterday. > >>> >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > >>> >> >> > > >>> >> >> > 2. of-thermal rework - I'm working on it now (to export > >>> >> >> > common data from of-thermal.c and provide structure with > >>> >> >> > ops). > >>> >> >> > > >>> >> >> > Patches [1] replace configuration available in > >>> >> >> > exynos_tmu_data.c to the one from device tree. Also it > >>> >> >> > handles setting cpu cooling frequencies per CPUs via > >>> >> >> > device tree. > >>> >> >> > > >>> >> >> > > >>> >> >> > I think that it is Eduardo's decision about how Exynos > >>> >> >> > patches should be serialized. > >>> >> >> > > >>> > > >>> > This is correct. We need some serialization to have a proper > >>> > flow into Linus tree. > >>> > > >>> >> >> > I can only say that after Bartek's and my [1] patch sets > >>> >> >> > the exynos TMU driver is much simpler with significant > >>> >> >> > code base reduction. > >>> >> >> > > >>> >> >> > Personally I think that it may be far more easier to add > >>> >> >> > Exynos7 TMU support to reworked driver. > >>> >> >> > >>> >> >> Thanks for the details. I am OK with rebasing my patches > >>> >> >> over Bartlomiej and your patch sets. Do you have any public > >>> >> >> tree with both these patch sets merged ? > >>> >> > > >>> >> > I've managed to export my ongoing Exynos TMU work to a public > >>> >> > tree. You can find it at: > >>> >> > https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal > >>> >> > > >>> >> > > >>> >> > Please be aware that this code is under development (and > >>> >> > review) and some parts may be changed. > >>> >> > > >>> >> > However, this shows how the Exynos TMU driver would look like > >>> >> > after the rework. > >>> >> > > >>> >> > If in any doubts, please ask. > >>> >> > >>> >> Thanks a lot for this. I will start rebasing my exynos7 > >>> >> patches on your tree. > >>> >> > >>> > > >>> > Good! Please rebase your work on top of Bart's and Lukasz's > >>> > work. > >>> > > >>> > New Exynos chip support, at this point, makes sense to hold > >>> > until we get the rework done. The proposals for change in > >>> > of-thermal are more or less alined. The rework at the exynos > >>> > driver as well. So, things should go smoothly, from my > >>> > perspective. > >>> > >>> Sure I will wait for Lukasz's consolidation to get in. However, > >>> there is a patch in my series [1] which adds support for an > >>> optional special clock. Could that be picked up independently now > >>> if I rebase it over Bartlomiej's patchset ? > >>> > >>> [1] > >>> http://permalink.gmane.org/gmane.linux.power-management.general/52826 > >>> > > >>> > One point I want you, Abhilash, is to check Bartlomiej series. > >>> > He has ripped several things in his refactoring, like register > >>> > abstraction, etc. It would be good if you check the impact of > >>> > those changes in your new chip support, before we send his > >>> > series for merge. Please have a word there. > >>> > >>> Lukasz, I tested the tree with your patches applied on a > >>> SMDK5420 and 5800-Peach-Pi. However, the boards hang at boot-up > >>> after failing to get the trip points ("get_th_reg: Cannot get > >>> trip points from of-thermal.c!"). I have not debugged this yet > >>> and was wondering if you have noticed similar issues or have > >>> already fixed this. > >> > >> I suspect that some nodes in the device tree are missing. > >> > >> I've tested those patches on [1]: > >> > >> - Exynos4210 - Trats (TMU zone + cpu_cooling) > >> [exynos4210-trats.dts] > >> - Exynos4412 - Trats2/Odroid U3 (TMU zone + cpu_cooling) > >> [exynos4412-trats2.dts, exynos4412-odroidu3.dts] > >> - Exynos5250 - Arndale (TMU zone + cpu_cooling) > >> [exynos5250-arndale.dts] > >> - Exynos5420 - Arndale-octa (only TMU zones) > >> [exynos5420-arndale-octa.dts] > >> > >> > >> I might have overlooked some entries for dts files since I don't > >> have Peach-Pi and SMDK devices. > >> > >> Please, look on above device tree sources [1] for a reference. > > > > I don't think that the dt entries are the problem as you are > > including the exynos5420-trip-points.dtsi file in exynos5420.dtsi > > and this would apply for all 5420 based boards. Considering that > > 5420 based arndale-octa is working for you, I will re-check my > > setup. > > It was the DT entries after all, specifically the cooling map bits are > missing for 5420. This is strange. As fair as I remember with 5420 it was only possible to read the temperature from /sys/class/thermal/thermal_zoneX. The exynos5420-trip-points.dtsi was added in: thermal: dts: Default trip points definition for Exynos5420 SoCs With the current implementation (before those patches) there aren't any settings for cpu_cooling for Exynos5420. > I am not sure why you didn't see the same issue with > Arndale 5420 Octa. As I've said, it was possible to read temperatures from several thermal_zone's. > Anyway, after adding entries similar to the ones > present for other SoCs, both the SMDK5420 and 5800 Peach-Pi are > working fine. Could you post/share code necessary to run on your setup? > > > > > Can you confirm > > "https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal" > > has all your latest changes as that is the tree I am currently > > using. > > > > Also, can you or Eduardo comment on if my SCLK patch can be > > considered before your patch set gets in or does that need to wait > > as well. > > OK, I guess I'll just post it separately and maybe Eduardo can > consider picking it up. I'm going to give you the feedback in a moment. > > >>> > >>> I am currently in the process of porting the Exynos7 changes over > >>> yours, will let you know if I have any other questions. > >> > >> Thanks for feedback. Comments are more than welcome :-) > From what I have tested so far, there are a couple of things I have > noticed. The thermal zone mode shows as being disabled in sysfs with > your patches, when it used to be enabled prior to your patches. On my setup I need to mount /sysfs by hand. After mounting I can read temperature from thermal_zones. > Not > sure if this is expected. I was able to read temperature from thermal_zones (5 if I remember correctly) with and without those patches. I assume that this is the correct behaviour. > Also, your 17/21 seems to be adding > exynos_tmu_initialize again to the probe function even though it is > already present. You are right. My mistake. I will fix it for v2. Thanks for feedback - more is welcome :-) > > Regards, > Abhilash > >> > >>> > >>> Regards, > >>> Abhilash > >>> > >>> >> >> >> >> Abhilash Kesavan (4): > >>> >> >> >> >> thermal: exynos: add optional sclk support > >>> >> >> >> >> thermal: exynos: add a triminfo_mask field in > >>> >> >> >> >> exynos_tmu_register structure > >>> >> >> >> >> thermal: exynos: modify the prototype for > >>> >> >> >> >> code_to_temp function thermal: exynos: Add TMU > >>> >> >> >> >> support for Exynos7 SoC > >>> >> >> >> >> > >>> >> >> >> >> .../devicetree/bindings/thermal/exynos-thermal.txt | > >>> >> >> >> >> 4 + > >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu.c | > >>> >> >> >> >> 106 ++++++++++++++---- > >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu.h > >>> >> >> >> >> | 13 ++- > >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu_data.c | > >>> >> >> >> >> 117 ++++++++++++++++++++ > >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu_data.h > >>> >> >> >> >> | 27 +++++ 5 files changed, 247 insertions(+), 20 > >>> >> >> >> >> deletions(-) > >>> >> >> >> > > >>> >> >> >> > Best regards, > >>> >> >> >> > -- > >>> >> >> >> > Bartlomiej Zolnierkiewicz > >>> >> >> >> > Samsung R&D Institute Poland > >>> >> >> >> > Samsung Electronics > >>> >> >> >> > > >>> >> >> > > >>> >> >> > > >>> >> >> > > >>> >> >> > -- > >>> >> >> > Best regards, > >>> >> >> > > >>> >> >> > Lukasz Majewski > >>> >> >> > > >>> >> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform > >>> >> >> > Group > >>> >> > > >>> >> > > >>> >> > > >>> >> > -- > >>> >> > Best regards, > >>> >> > > >>> >> > Lukasz Majewski > >>> >> > > >>> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group > >>> > > >>> > > >> > >> > >> > >> -- > >> Best regards, > >> > >> Lukasz Majewski > >> > >> Samsung R&D Institute Poland (SRPOL) | Linux Platform Group -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-24 9:24 ` Lukasz Majewski @ 2014-11-24 10:50 ` Abhilash Kesavan 2014-11-24 11:04 ` Lukasz Majewski 0 siblings, 1 reply; 21+ messages in thread From: Abhilash Kesavan @ 2014-11-24 10:50 UTC (permalink / raw) To: Lukasz Majewski Cc: Eduardo Valentin, Bartlomiej Zolnierkiewicz, Zhang Rui, linux-pm@vger.kernel.org, Amit Kachhap Hi Lukasz, On Mon, Nov 24, 2014 at 2:54 PM, Lukasz Majewski <l.majewski@samsung.com> wrote: > Hi Abhilash, > >> Hi Lukasz, >> >> On Thu, Nov 20, 2014 at 8:19 PM, Abhilash Kesavan >> <kesavan.abhilash@gmail.com> wrote: >> > Hi Lukasz, >> > >> > On Thu, Nov 20, 2014 at 6:52 PM, Lukasz Majewski >> > <l.majewski@samsung.com> wrote: >> >> Hi Abhilash, >> >> >> >>> Hi, >> >>> >> >>> On Wed, Nov 19, 2014 at 6:48 PM, Eduardo Valentin >> >>> <edubezval@gmail.com> wrote: >> >>> > Abhilash, >> >>> > >> >>> > On Tue, Nov 18, 2014 at 01:44:16PM +0530, Abhilash Kesavan >> >>> > wrote: >> >>> >> Hi Lukasz, >> >>> >> >> >>> >> On Tue, Nov 18, 2014 at 1:38 PM, Lukasz Majewski >> >>> >> <l.majewski@samsung.com> wrote: >> >>> >> > Hi Abhilash, >> >>> >> > >> >>> >> >> Hi Lukasz, >> >>> >> >> >> >>> >> >> On Fri, Nov 14, 2014 at 6:32 PM, Lukasz Majewski >> >>> >> >> <l.majewski@samsung.com> wrote: >> >>> >> >> > Hi Abhilash, >> >>> >> >> > >> >>> >> >> >> Hi Bartlomiej, >> >>> >> >> >> >> >>> >> >> >> On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej >> >>> >> >> >> Zolnierkiewicz <b.zolnierkie@samsung.com> wrote: >> >>> >> >> >> > >> >>> >> >> >> > Hi, >> >>> >> >> >> > >> >>> >> >> >> > On Friday, November 14, 2014 04:47:58 PM Abhilash >> >>> >> >> >> > Kesavan wrote: >> >>> >> >> >> >> The Thermal Management Unit (TMU) in Exynos7 provides >> >>> >> >> >> >> software-controlled (thermal throttling) and >> >>> >> >> >> >> hardware-controlled (thermal tripping) management >> >>> >> >> >> >> schemes. There are several changes in terms of the >> >>> >> >> >> >> register and bit offsets in the Exynos7 TMU from that >> >>> >> >> >> >> in older SoCs. There are also new bits, more trigger >> >>> >> >> >> >> levels and a special clock for TMU that has been >> >>> >> >> >> >> introduced in Exynos7. This patchset modifies the >> >>> >> >> >> >> thermal driver to handle all these changes. >> >>> >> >> >> >> >> >>> >> >> >> >> This series is based on linux-next(20141114) and >> >>> >> >> >> >> tested on an Exynos7-based espresso board. >> >>> >> >> >> > >> >>> >> >> >> > Please rebase your patchset on top of: >> >>> >> >> >> > >> >>> >> >> >> > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html >> >>> >> >> >> >> >>> >> >> >> Sure, will rebase on top of your patchset. Is this >> >>> >> >> >> patchset going to be merged into Eduardo's tree soon ? >> >>> >> >> >> >> >>> >> >> >> > >> >>> >> >> >> > There is also ongoing work to convert Exynos thermal >> >>> >> >> >> > driver to use device tree but Lukasz Majewski (added to >> >>> >> >> >> > Cc:) knows better the current state of the work. >> >>> >> >> >> >> >>> >> >> >> Lukasz, are you in the process of making changes to the >> >>> >> >> >> existing exynos tmu bindings ? >> >>> >> >> > >> >>> >> >> > Yes. I'm working on them. >> >>> >> >> > >> >>> >> >> > Please consider following patches [1]: >> >>> >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html >> >>> >> >> > >> >>> >> >> > They are based on top of Bartek's work. >> >>> > >> >>> > Bartlomiej work is in linux-next already. I am planning to send >> >>> > his refactoring work for 3.19. But I do require more testing >> >>> > to cover for all supported chips, because it is a big change. >> >>> > Can you please also try his series in different boards to see >> >>> > if all chip support is still in one piece? >> >>> >> >>> I have tested the exynos TMU driver in linux-next (20141119), >> >>> which has Bartlomiej's patch series applied, on an SMDK5420 and >> >>> Exynos5800 based chromebook. Both the boards are working fine >> >>> (saw the temperature vary in sysfs and the board shutdown when it >> >>> hit the s/w trip temperature). >> >> >> >> Thanks. >> >> >> >>> >> >>> > >> >>> >> >> > Patch set status: >> >>> >> >> > 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 posted >> >>> >> >> > yesterday. >> >>> >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html >> >>> >> >> > >> >>> >> >> > 2. of-thermal rework - I'm working on it now (to export >> >>> >> >> > common data from of-thermal.c and provide structure with >> >>> >> >> > ops). >> >>> >> >> > >> >>> >> >> > Patches [1] replace configuration available in >> >>> >> >> > exynos_tmu_data.c to the one from device tree. Also it >> >>> >> >> > handles setting cpu cooling frequencies per CPUs via >> >>> >> >> > device tree. >> >>> >> >> > >> >>> >> >> > >> >>> >> >> > I think that it is Eduardo's decision about how Exynos >> >>> >> >> > patches should be serialized. >> >>> >> >> > >> >>> > >> >>> > This is correct. We need some serialization to have a proper >> >>> > flow into Linus tree. >> >>> > >> >>> >> >> > I can only say that after Bartek's and my [1] patch sets >> >>> >> >> > the exynos TMU driver is much simpler with significant >> >>> >> >> > code base reduction. >> >>> >> >> > >> >>> >> >> > Personally I think that it may be far more easier to add >> >>> >> >> > Exynos7 TMU support to reworked driver. >> >>> >> >> >> >>> >> >> Thanks for the details. I am OK with rebasing my patches >> >>> >> >> over Bartlomiej and your patch sets. Do you have any public >> >>> >> >> tree with both these patch sets merged ? >> >>> >> > >> >>> >> > I've managed to export my ongoing Exynos TMU work to a public >> >>> >> > tree. You can find it at: >> >>> >> > https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal >> >>> >> > >> >>> >> > >> >>> >> > Please be aware that this code is under development (and >> >>> >> > review) and some parts may be changed. >> >>> >> > >> >>> >> > However, this shows how the Exynos TMU driver would look like >> >>> >> > after the rework. >> >>> >> > >> >>> >> > If in any doubts, please ask. >> >>> >> >> >>> >> Thanks a lot for this. I will start rebasing my exynos7 >> >>> >> patches on your tree. >> >>> >> >> >>> > >> >>> > Good! Please rebase your work on top of Bart's and Lukasz's >> >>> > work. >> >>> > >> >>> > New Exynos chip support, at this point, makes sense to hold >> >>> > until we get the rework done. The proposals for change in >> >>> > of-thermal are more or less alined. The rework at the exynos >> >>> > driver as well. So, things should go smoothly, from my >> >>> > perspective. >> >>> >> >>> Sure I will wait for Lukasz's consolidation to get in. However, >> >>> there is a patch in my series [1] which adds support for an >> >>> optional special clock. Could that be picked up independently now >> >>> if I rebase it over Bartlomiej's patchset ? >> >>> >> >>> [1] >> >>> http://permalink.gmane.org/gmane.linux.power-management.general/52826 >> >>> > >> >>> > One point I want you, Abhilash, is to check Bartlomiej series. >> >>> > He has ripped several things in his refactoring, like register >> >>> > abstraction, etc. It would be good if you check the impact of >> >>> > those changes in your new chip support, before we send his >> >>> > series for merge. Please have a word there. >> >>> >> >>> Lukasz, I tested the tree with your patches applied on a >> >>> SMDK5420 and 5800-Peach-Pi. However, the boards hang at boot-up >> >>> after failing to get the trip points ("get_th_reg: Cannot get >> >>> trip points from of-thermal.c!"). I have not debugged this yet >> >>> and was wondering if you have noticed similar issues or have >> >>> already fixed this. >> >> >> >> I suspect that some nodes in the device tree are missing. >> >> >> >> I've tested those patches on [1]: >> >> >> >> - Exynos4210 - Trats (TMU zone + cpu_cooling) >> >> [exynos4210-trats.dts] >> >> - Exynos4412 - Trats2/Odroid U3 (TMU zone + cpu_cooling) >> >> [exynos4412-trats2.dts, exynos4412-odroidu3.dts] >> >> - Exynos5250 - Arndale (TMU zone + cpu_cooling) >> >> [exynos5250-arndale.dts] >> >> - Exynos5420 - Arndale-octa (only TMU zones) >> >> [exynos5420-arndale-octa.dts] >> >> >> >> >> >> I might have overlooked some entries for dts files since I don't >> >> have Peach-Pi and SMDK devices. >> >> >> >> Please, look on above device tree sources [1] for a reference. >> > >> > I don't think that the dt entries are the problem as you are >> > including the exynos5420-trip-points.dtsi file in exynos5420.dtsi >> > and this would apply for all 5420 based boards. Considering that >> > 5420 based arndale-octa is working for you, I will re-check my >> > setup. >> >> It was the DT entries after all, specifically the cooling map bits are >> missing for 5420. > > This is strange. As fair as I remember with 5420 it was only possible > to read the temperature from /sys/class/thermal/thermal_zoneX. > > The exynos5420-trip-points.dtsi was added in: > thermal: dts: Default trip points definition for Exynos5420 SoCs > > With the current implementation (before those patches) there aren't any > settings for cpu_cooling for Exynos5420. I am not clear about this, prior to your patches we have 2 throttling frequencies for 5420 (even though cpufreq support is still on-going for this SoC). I will send you the code needed for me to get 5420/5800 to work. > >> I am not sure why you didn't see the same issue with >> Arndale 5420 Octa. > > As I've said, it was possible to read temperatures from several > thermal_zone's. > >> Anyway, after adding entries similar to the ones >> present for other SoCs, both the SMDK5420 and 5800 Peach-Pi are >> working fine. > > Could you post/share code necessary to run on your setup? Will do. > >> >> > >> > Can you confirm >> > "https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal" >> > has all your latest changes as that is the tree I am currently >> > using. >> > >> > Also, can you or Eduardo comment on if my SCLK patch can be >> > considered before your patch set gets in or does that need to wait >> > as well. >> >> OK, I guess I'll just post it separately and maybe Eduardo can >> consider picking it up. > > I'm going to give you the feedback in a moment. > >> >> >>> >> >>> I am currently in the process of porting the Exynos7 changes over >> >>> yours, will let you know if I have any other questions. >> >> >> >> Thanks for feedback. Comments are more than welcome :-) >> From what I have tested so far, there are a couple of things I have >> noticed. The thermal zone mode shows as being disabled in sysfs with >> your patches, when it used to be enabled prior to your patches. > > On my setup I need to mount /sysfs by > hand. After mounting I can read temperature from thermal_zones. I can read the temperature too and there does not appear to be any problem with the functionality. What I was trying to point out was that, cat /sys/class/thermal/thermal_zone*/mode shows "disabled" for the thermal zones even though reading of temperature is fine. Regards, Abhilash > >> Not >> sure if this is expected. > > I was able to read temperature from thermal_zones (5 if I remember > correctly) with and without those patches. I assume that this is the > correct behaviour. > >> Also, your 17/21 seems to be adding >> exynos_tmu_initialize again to the probe function even though it is >> already present. > > You are right. My mistake. I will fix it for v2. > Thanks for feedback - more is welcome :-) > >> >> Regards, >> Abhilash >> >> >> >>> >> >>> Regards, >> >>> Abhilash >> >>> >> >>> >> >> >> >> Abhilash Kesavan (4): >> >>> >> >> >> >> thermal: exynos: add optional sclk support >> >>> >> >> >> >> thermal: exynos: add a triminfo_mask field in >> >>> >> >> >> >> exynos_tmu_register structure >> >>> >> >> >> >> thermal: exynos: modify the prototype for >> >>> >> >> >> >> code_to_temp function thermal: exynos: Add TMU >> >>> >> >> >> >> support for Exynos7 SoC >> >>> >> >> >> >> >> >>> >> >> >> >> .../devicetree/bindings/thermal/exynos-thermal.txt | >> >>> >> >> >> >> 4 + >> >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu.c | >> >>> >> >> >> >> 106 ++++++++++++++---- >> >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu.h >> >>> >> >> >> >> | 13 ++- >> >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu_data.c | >> >>> >> >> >> >> 117 ++++++++++++++++++++ >> >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu_data.h >> >>> >> >> >> >> | 27 +++++ 5 files changed, 247 insertions(+), 20 >> >>> >> >> >> >> deletions(-) >> >>> >> >> >> > >> >>> >> >> >> > Best regards, >> >>> >> >> >> > -- >> >>> >> >> >> > Bartlomiej Zolnierkiewicz >> >>> >> >> >> > Samsung R&D Institute Poland >> >>> >> >> >> > Samsung Electronics >> >>> >> >> >> > >> >>> >> >> > >> >>> >> >> > >> >>> >> >> > >> >>> >> >> > -- >> >>> >> >> > Best regards, >> >>> >> >> > >> >>> >> >> > Lukasz Majewski >> >>> >> >> > >> >>> >> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform >> >>> >> >> > Group >> >>> >> > >> >>> >> > >> >>> >> > >> >>> >> > -- >> >>> >> > Best regards, >> >>> >> > >> >>> >> > Lukasz Majewski >> >>> >> > >> >>> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group >> >>> > >> >>> > >> >> >> >> >> >> >> >> -- >> >> Best regards, >> >> >> >> Lukasz Majewski >> >> >> >> Samsung R&D Institute Poland (SRPOL) | Linux Platform Group > > > > -- > Best regards, > > Lukasz Majewski > > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-24 10:50 ` Abhilash Kesavan @ 2014-11-24 11:04 ` Lukasz Majewski 2014-11-24 11:09 ` Abhilash Kesavan 0 siblings, 1 reply; 21+ messages in thread From: Lukasz Majewski @ 2014-11-24 11:04 UTC (permalink / raw) To: Abhilash Kesavan Cc: Eduardo Valentin, Bartlomiej Zolnierkiewicz, Zhang Rui, linux-pm@vger.kernel.org, Amit Kachhap Hi Abhilash, > Hi Lukasz, > > On Mon, Nov 24, 2014 at 2:54 PM, Lukasz Majewski > <l.majewski@samsung.com> wrote: > > Hi Abhilash, > > > >> Hi Lukasz, > >> > >> On Thu, Nov 20, 2014 at 8:19 PM, Abhilash Kesavan > >> <kesavan.abhilash@gmail.com> wrote: > >> > Hi Lukasz, > >> > > >> > On Thu, Nov 20, 2014 at 6:52 PM, Lukasz Majewski > >> > <l.majewski@samsung.com> wrote: > >> >> Hi Abhilash, > >> >> > >> >>> Hi, > >> >>> > >> >>> On Wed, Nov 19, 2014 at 6:48 PM, Eduardo Valentin > >> >>> <edubezval@gmail.com> wrote: > >> >>> > Abhilash, > >> >>> > > >> >>> > On Tue, Nov 18, 2014 at 01:44:16PM +0530, Abhilash Kesavan > >> >>> > wrote: > >> >>> >> Hi Lukasz, > >> >>> >> > >> >>> >> On Tue, Nov 18, 2014 at 1:38 PM, Lukasz Majewski > >> >>> >> <l.majewski@samsung.com> wrote: > >> >>> >> > Hi Abhilash, > >> >>> >> > > >> >>> >> >> Hi Lukasz, > >> >>> >> >> > >> >>> >> >> On Fri, Nov 14, 2014 at 6:32 PM, Lukasz Majewski > >> >>> >> >> <l.majewski@samsung.com> wrote: > >> >>> >> >> > Hi Abhilash, > >> >>> >> >> > > >> >>> >> >> >> Hi Bartlomiej, > >> >>> >> >> >> > >> >>> >> >> >> On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej > >> >>> >> >> >> Zolnierkiewicz <b.zolnierkie@samsung.com> wrote: > >> >>> >> >> >> > > >> >>> >> >> >> > Hi, > >> >>> >> >> >> > > >> >>> >> >> >> > On Friday, November 14, 2014 04:47:58 PM Abhilash > >> >>> >> >> >> > Kesavan wrote: > >> >>> >> >> >> >> The Thermal Management Unit (TMU) in Exynos7 > >> >>> >> >> >> >> provides software-controlled (thermal throttling) > >> >>> >> >> >> >> and hardware-controlled (thermal tripping) > >> >>> >> >> >> >> management schemes. There are several changes in > >> >>> >> >> >> >> terms of the register and bit offsets in the > >> >>> >> >> >> >> Exynos7 TMU from that in older SoCs. There are > >> >>> >> >> >> >> also new bits, more trigger levels and a special > >> >>> >> >> >> >> clock for TMU that has been introduced in Exynos7. > >> >>> >> >> >> >> This patchset modifies the thermal driver to > >> >>> >> >> >> >> handle all these changes. > >> >>> >> >> >> >> > >> >>> >> >> >> >> This series is based on linux-next(20141114) and > >> >>> >> >> >> >> tested on an Exynos7-based espresso board. > >> >>> >> >> >> > > >> >>> >> >> >> > Please rebase your patchset on top of: > >> >>> >> >> >> > > >> >>> >> >> >> > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html > >> >>> >> >> >> > >> >>> >> >> >> Sure, will rebase on top of your patchset. Is this > >> >>> >> >> >> patchset going to be merged into Eduardo's tree soon ? > >> >>> >> >> >> > >> >>> >> >> >> > > >> >>> >> >> >> > There is also ongoing work to convert Exynos thermal > >> >>> >> >> >> > driver to use device tree but Lukasz Majewski > >> >>> >> >> >> > (added to Cc:) knows better the current state of > >> >>> >> >> >> > the work. > >> >>> >> >> >> > >> >>> >> >> >> Lukasz, are you in the process of making changes to > >> >>> >> >> >> the existing exynos tmu bindings ? > >> >>> >> >> > > >> >>> >> >> > Yes. I'm working on them. > >> >>> >> >> > > >> >>> >> >> > Please consider following patches [1]: > >> >>> >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > >> >>> >> >> > > >> >>> >> >> > They are based on top of Bartek's work. > >> >>> > > >> >>> > Bartlomiej work is in linux-next already. I am planning to > >> >>> > send his refactoring work for 3.19. But I do require more > >> >>> > testing to cover for all supported chips, because it is a > >> >>> > big change. Can you please also try his series in different > >> >>> > boards to see if all chip support is still in one piece? > >> >>> > >> >>> I have tested the exynos TMU driver in linux-next (20141119), > >> >>> which has Bartlomiej's patch series applied, on an SMDK5420 and > >> >>> Exynos5800 based chromebook. Both the boards are working fine > >> >>> (saw the temperature vary in sysfs and the board shutdown when > >> >>> it hit the s/w trip temperature). > >> >> > >> >> Thanks. > >> >> > >> >>> > >> >>> > > >> >>> >> >> > Patch set status: > >> >>> >> >> > 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 > >> >>> >> >> > posted yesterday. > >> >>> >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html > >> >>> >> >> > > >> >>> >> >> > 2. of-thermal rework - I'm working on it now (to export > >> >>> >> >> > common data from of-thermal.c and provide structure > >> >>> >> >> > with ops). > >> >>> >> >> > > >> >>> >> >> > Patches [1] replace configuration available in > >> >>> >> >> > exynos_tmu_data.c to the one from device tree. Also it > >> >>> >> >> > handles setting cpu cooling frequencies per CPUs via > >> >>> >> >> > device tree. > >> >>> >> >> > > >> >>> >> >> > > >> >>> >> >> > I think that it is Eduardo's decision about how Exynos > >> >>> >> >> > patches should be serialized. > >> >>> >> >> > > >> >>> > > >> >>> > This is correct. We need some serialization to have a proper > >> >>> > flow into Linus tree. > >> >>> > > >> >>> >> >> > I can only say that after Bartek's and my [1] patch > >> >>> >> >> > sets the exynos TMU driver is much simpler with > >> >>> >> >> > significant code base reduction. > >> >>> >> >> > > >> >>> >> >> > Personally I think that it may be far more easier to > >> >>> >> >> > add Exynos7 TMU support to reworked driver. > >> >>> >> >> > >> >>> >> >> Thanks for the details. I am OK with rebasing my patches > >> >>> >> >> over Bartlomiej and your patch sets. Do you have any > >> >>> >> >> public tree with both these patch sets merged ? > >> >>> >> > > >> >>> >> > I've managed to export my ongoing Exynos TMU work to a > >> >>> >> > public tree. You can find it at: > >> >>> >> > https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal > >> >>> >> > > >> >>> >> > > >> >>> >> > Please be aware that this code is under development (and > >> >>> >> > review) and some parts may be changed. > >> >>> >> > > >> >>> >> > However, this shows how the Exynos TMU driver would look > >> >>> >> > like after the rework. > >> >>> >> > > >> >>> >> > If in any doubts, please ask. > >> >>> >> > >> >>> >> Thanks a lot for this. I will start rebasing my exynos7 > >> >>> >> patches on your tree. > >> >>> >> > >> >>> > > >> >>> > Good! Please rebase your work on top of Bart's and Lukasz's > >> >>> > work. > >> >>> > > >> >>> > New Exynos chip support, at this point, makes sense to hold > >> >>> > until we get the rework done. The proposals for change in > >> >>> > of-thermal are more or less alined. The rework at the exynos > >> >>> > driver as well. So, things should go smoothly, from my > >> >>> > perspective. > >> >>> > >> >>> Sure I will wait for Lukasz's consolidation to get in. However, > >> >>> there is a patch in my series [1] which adds support for an > >> >>> optional special clock. Could that be picked up independently > >> >>> now if I rebase it over Bartlomiej's patchset ? > >> >>> > >> >>> [1] > >> >>> http://permalink.gmane.org/gmane.linux.power-management.general/52826 > >> >>> > > >> >>> > One point I want you, Abhilash, is to check Bartlomiej > >> >>> > series. He has ripped several things in his refactoring, > >> >>> > like register abstraction, etc. It would be good if you > >> >>> > check the impact of those changes in your new chip support, > >> >>> > before we send his series for merge. Please have a word > >> >>> > there. > >> >>> > >> >>> Lukasz, I tested the tree with your patches applied on a > >> >>> SMDK5420 and 5800-Peach-Pi. However, the boards hang at boot-up > >> >>> after failing to get the trip points ("get_th_reg: Cannot get > >> >>> trip points from of-thermal.c!"). I have not debugged this yet > >> >>> and was wondering if you have noticed similar issues or have > >> >>> already fixed this. > >> >> > >> >> I suspect that some nodes in the device tree are missing. > >> >> > >> >> I've tested those patches on [1]: > >> >> > >> >> - Exynos4210 - Trats (TMU zone + cpu_cooling) > >> >> [exynos4210-trats.dts] > >> >> - Exynos4412 - Trats2/Odroid U3 (TMU zone + cpu_cooling) > >> >> [exynos4412-trats2.dts, exynos4412-odroidu3.dts] > >> >> - Exynos5250 - Arndale (TMU zone + cpu_cooling) > >> >> [exynos5250-arndale.dts] > >> >> - Exynos5420 - Arndale-octa (only TMU zones) > >> >> [exynos5420-arndale-octa.dts] > >> >> > >> >> > >> >> I might have overlooked some entries for dts files since I don't > >> >> have Peach-Pi and SMDK devices. > >> >> > >> >> Please, look on above device tree sources [1] for a reference. > >> > > >> > I don't think that the dt entries are the problem as you are > >> > including the exynos5420-trip-points.dtsi file in exynos5420.dtsi > >> > and this would apply for all 5420 based boards. Considering that > >> > 5420 based arndale-octa is working for you, I will re-check my > >> > setup. > >> > >> It was the DT entries after all, specifically the cooling map bits > >> are missing for 5420. > > > > This is strange. As fair as I remember with 5420 it was only > > possible to read the temperature > > from /sys/class/thermal/thermal_zoneX. > > > > The exynos5420-trip-points.dtsi was added in: > > thermal: dts: Default trip points definition for Exynos5420 SoCs > > > > With the current implementation (before those patches) there aren't > > any settings for cpu_cooling for Exynos5420. > > I am not clear about this, prior to your patches we have 2 throttling > frequencies for 5420 (even though cpufreq support is still on-going > for this SoC). I will send you the code needed for me to get 5420/5800 > to work. Hmm. I've checked Exynos5420 mainline support with v1 of this patch, which was based on 3.17-rc6. At this time in exynos_tmu_data.c there wasn't cpu_cooling() support for Exynos 5420 available in the mainline. No problem to add this in v2. > > > > >> I am not sure why you didn't see the same issue with > >> Arndale 5420 Octa. > > > > As I've said, it was possible to read temperatures from several > > thermal_zone's. > > > >> Anyway, after adding entries similar to the ones > >> present for other SoCs, both the SMDK5420 and 5800 Peach-Pi are > >> working fine. > > > > Could you post/share code necessary to run on your setup? > > Will do. That would be great. Thanks. > > > > >> > >> > > >> > Can you confirm > >> > "https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal" > >> > has all your latest changes as that is the tree I am currently > >> > using. > >> > > >> > Also, can you or Eduardo comment on if my SCLK patch can be > >> > considered before your patch set gets in or does that need to > >> > wait as well. > >> > >> OK, I guess I'll just post it separately and maybe Eduardo can > >> consider picking it up. > > > > I'm going to give you the feedback in a moment. > > > >> > >> >>> > >> >>> I am currently in the process of porting the Exynos7 changes > >> >>> over yours, will let you know if I have any other questions. > >> >> > >> >> Thanks for feedback. Comments are more than welcome :-) > >> From what I have tested so far, there are a couple of things I have > >> noticed. The thermal zone mode shows as being disabled in sysfs > >> with your patches, when it used to be enabled prior to your > >> patches. > > > > On my setup I need to mount /sysfs by > > hand. After mounting I can read temperature from thermal_zones. > > I can read the temperature too and there does not appear to be any > problem with the functionality. Ok. > What I was trying to point out was > that, cat /sys/class/thermal/thermal_zone*/mode shows "disabled" for > the thermal zones even though reading of temperature is fine. Frankly speaking I didn't check for this particular case. I assume that without my patches the /mode is "enabled"? > > Regards, > Abhilash > > > > >> Not > >> sure if this is expected. > > > > I was able to read temperature from thermal_zones (5 if I remember > > correctly) with and without those patches. I assume that this is the > > correct behaviour. > > > >> Also, your 17/21 seems to be adding > >> exynos_tmu_initialize again to the probe function even though it is > >> already present. > > > > You are right. My mistake. I will fix it for v2. > > Thanks for feedback - more is welcome :-) > > > >> > >> Regards, > >> Abhilash > >> >> > >> >>> > >> >>> Regards, > >> >>> Abhilash > >> >>> > >> >>> >> >> >> >> Abhilash Kesavan (4): > >> >>> >> >> >> >> thermal: exynos: add optional sclk support > >> >>> >> >> >> >> thermal: exynos: add a triminfo_mask field in > >> >>> >> >> >> >> exynos_tmu_register structure > >> >>> >> >> >> >> thermal: exynos: modify the prototype for > >> >>> >> >> >> >> code_to_temp function thermal: exynos: Add TMU > >> >>> >> >> >> >> support for Exynos7 SoC > >> >>> >> >> >> >> > >> >>> >> >> >> >> .../devicetree/bindings/thermal/exynos-thermal.txt > >> >>> >> >> >> >> | 4 + > >> >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu.c > >> >>> >> >> >> >> | 106 ++++++++++++++---- > >> >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu.h > >> >>> >> >> >> >> | 13 ++- > >> >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu_data.c > >> >>> >> >> >> >> | 117 ++++++++++++++++++++ > >> >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu_data.h > >> >>> >> >> >> >> | 27 +++++ 5 files changed, 247 insertions(+), 20 > >> >>> >> >> >> >> deletions(-) > >> >>> >> >> >> > > >> >>> >> >> >> > Best regards, > >> >>> >> >> >> > -- > >> >>> >> >> >> > Bartlomiej Zolnierkiewicz > >> >>> >> >> >> > Samsung R&D Institute Poland > >> >>> >> >> >> > Samsung Electronics > >> >>> >> >> >> > > >> >>> >> >> > > >> >>> >> >> > > >> >>> >> >> > > >> >>> >> >> > -- > >> >>> >> >> > Best regards, > >> >>> >> >> > > >> >>> >> >> > Lukasz Majewski > >> >>> >> >> > > >> >>> >> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform > >> >>> >> >> > Group > >> >>> >> > > >> >>> >> > > >> >>> >> > > >> >>> >> > -- > >> >>> >> > Best regards, > >> >>> >> > > >> >>> >> > Lukasz Majewski > >> >>> >> > > >> >>> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform > >> >>> >> > Group > >> >>> > > >> >>> > > >> >> > >> >> > >> >> > >> >> -- > >> >> Best regards, > >> >> > >> >> Lukasz Majewski > >> >> > >> >> Samsung R&D Institute Poland (SRPOL) | Linux Platform Group > > > > > > > > -- > > Best regards, > > > > Lukasz Majewski > > > > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH 0/4] Add TMU support for Exynos7 2014-11-24 11:04 ` Lukasz Majewski @ 2014-11-24 11:09 ` Abhilash Kesavan 0 siblings, 0 replies; 21+ messages in thread From: Abhilash Kesavan @ 2014-11-24 11:09 UTC (permalink / raw) To: Lukasz Majewski Cc: Eduardo Valentin, Bartlomiej Zolnierkiewicz, Zhang Rui, linux-pm@vger.kernel.org, Amit Kachhap Hi Lukasz, On Mon, Nov 24, 2014 at 4:34 PM, Lukasz Majewski <l.majewski@samsung.com> wrote: > Hi Abhilash, > >> Hi Lukasz, >> >> On Mon, Nov 24, 2014 at 2:54 PM, Lukasz Majewski >> <l.majewski@samsung.com> wrote: >> > Hi Abhilash, >> > >> >> Hi Lukasz, >> >> >> >> On Thu, Nov 20, 2014 at 8:19 PM, Abhilash Kesavan >> >> <kesavan.abhilash@gmail.com> wrote: >> >> > Hi Lukasz, >> >> > >> >> > On Thu, Nov 20, 2014 at 6:52 PM, Lukasz Majewski >> >> > <l.majewski@samsung.com> wrote: >> >> >> Hi Abhilash, >> >> >> >> >> >>> Hi, >> >> >>> >> >> >>> On Wed, Nov 19, 2014 at 6:48 PM, Eduardo Valentin >> >> >>> <edubezval@gmail.com> wrote: >> >> >>> > Abhilash, >> >> >>> > >> >> >>> > On Tue, Nov 18, 2014 at 01:44:16PM +0530, Abhilash Kesavan >> >> >>> > wrote: >> >> >>> >> Hi Lukasz, >> >> >>> >> >> >> >>> >> On Tue, Nov 18, 2014 at 1:38 PM, Lukasz Majewski >> >> >>> >> <l.majewski@samsung.com> wrote: >> >> >>> >> > Hi Abhilash, >> >> >>> >> > >> >> >>> >> >> Hi Lukasz, >> >> >>> >> >> >> >> >>> >> >> On Fri, Nov 14, 2014 at 6:32 PM, Lukasz Majewski >> >> >>> >> >> <l.majewski@samsung.com> wrote: >> >> >>> >> >> > Hi Abhilash, >> >> >>> >> >> > >> >> >>> >> >> >> Hi Bartlomiej, >> >> >>> >> >> >> >> >> >>> >> >> >> On Fri, Nov 14, 2014 at 5:49 PM, Bartlomiej >> >> >>> >> >> >> Zolnierkiewicz <b.zolnierkie@samsung.com> wrote: >> >> >>> >> >> >> > >> >> >>> >> >> >> > Hi, >> >> >>> >> >> >> > >> >> >>> >> >> >> > On Friday, November 14, 2014 04:47:58 PM Abhilash >> >> >>> >> >> >> > Kesavan wrote: >> >> >>> >> >> >> >> The Thermal Management Unit (TMU) in Exynos7 >> >> >>> >> >> >> >> provides software-controlled (thermal throttling) >> >> >>> >> >> >> >> and hardware-controlled (thermal tripping) >> >> >>> >> >> >> >> management schemes. There are several changes in >> >> >>> >> >> >> >> terms of the register and bit offsets in the >> >> >>> >> >> >> >> Exynos7 TMU from that in older SoCs. There are >> >> >>> >> >> >> >> also new bits, more trigger levels and a special >> >> >>> >> >> >> >> clock for TMU that has been introduced in Exynos7. >> >> >>> >> >> >> >> This patchset modifies the thermal driver to >> >> >>> >> >> >> >> handle all these changes. >> >> >>> >> >> >> >> >> >> >>> >> >> >> >> This series is based on linux-next(20141114) and >> >> >>> >> >> >> >> tested on an Exynos7-based espresso board. >> >> >>> >> >> >> > >> >> >>> >> >> >> > Please rebase your patchset on top of: >> >> >>> >> >> >> > >> >> >>> >> >> >> > http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg38717.html >> >> >>> >> >> >> >> >> >>> >> >> >> Sure, will rebase on top of your patchset. Is this >> >> >>> >> >> >> patchset going to be merged into Eduardo's tree soon ? >> >> >>> >> >> >> >> >> >>> >> >> >> > >> >> >>> >> >> >> > There is also ongoing work to convert Exynos thermal >> >> >>> >> >> >> > driver to use device tree but Lukasz Majewski >> >> >>> >> >> >> > (added to Cc:) knows better the current state of >> >> >>> >> >> >> > the work. >> >> >>> >> >> >> >> >> >>> >> >> >> Lukasz, are you in the process of making changes to >> >> >>> >> >> >> the existing exynos tmu bindings ? >> >> >>> >> >> > >> >> >>> >> >> > Yes. I'm working on them. >> >> >>> >> >> > >> >> >>> >> >> > Please consider following patches [1]: >> >> >>> >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html >> >> >>> >> >> > >> >> >>> >> >> > They are based on top of Bartek's work. >> >> >>> > >> >> >>> > Bartlomiej work is in linux-next already. I am planning to >> >> >>> > send his refactoring work for 3.19. But I do require more >> >> >>> > testing to cover for all supported chips, because it is a >> >> >>> > big change. Can you please also try his series in different >> >> >>> > boards to see if all chip support is still in one piece? >> >> >>> >> >> >>> I have tested the exynos TMU driver in linux-next (20141119), >> >> >>> which has Bartlomiej's patch series applied, on an SMDK5420 and >> >> >>> Exynos5800 based chromebook. Both the boards are working fine >> >> >>> (saw the temperature vary in sysfs and the board shutdown when >> >> >>> it hit the s/w trip temperature). >> >> >> >> >> >> Thanks. >> >> >> >> >> >>> >> >> >>> > >> >> >>> >> >> > Patch set status: >> >> >>> >> >> > 1. Fixes for thermal_core (with -EPROBE_DEFER) - v2 >> >> >>> >> >> > posted yesterday. >> >> >>> >> >> > http://www.spinics.net/lists/linux-samsung-soc/msg37719.html >> >> >>> >> >> > >> >> >>> >> >> > 2. of-thermal rework - I'm working on it now (to export >> >> >>> >> >> > common data from of-thermal.c and provide structure >> >> >>> >> >> > with ops). >> >> >>> >> >> > >> >> >>> >> >> > Patches [1] replace configuration available in >> >> >>> >> >> > exynos_tmu_data.c to the one from device tree. Also it >> >> >>> >> >> > handles setting cpu cooling frequencies per CPUs via >> >> >>> >> >> > device tree. >> >> >>> >> >> > >> >> >>> >> >> > >> >> >>> >> >> > I think that it is Eduardo's decision about how Exynos >> >> >>> >> >> > patches should be serialized. >> >> >>> >> >> > >> >> >>> > >> >> >>> > This is correct. We need some serialization to have a proper >> >> >>> > flow into Linus tree. >> >> >>> > >> >> >>> >> >> > I can only say that after Bartek's and my [1] patch >> >> >>> >> >> > sets the exynos TMU driver is much simpler with >> >> >>> >> >> > significant code base reduction. >> >> >>> >> >> > >> >> >>> >> >> > Personally I think that it may be far more easier to >> >> >>> >> >> > add Exynos7 TMU support to reworked driver. >> >> >>> >> >> >> >> >>> >> >> Thanks for the details. I am OK with rebasing my patches >> >> >>> >> >> over Bartlomiej and your patch sets. Do you have any >> >> >>> >> >> public tree with both these patch sets merged ? >> >> >>> >> > >> >> >>> >> > I've managed to export my ongoing Exynos TMU work to a >> >> >>> >> > public tree. You can find it at: >> >> >>> >> > https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal >> >> >>> >> > >> >> >>> >> > >> >> >>> >> > Please be aware that this code is under development (and >> >> >>> >> > review) and some parts may be changed. >> >> >>> >> > >> >> >>> >> > However, this shows how the Exynos TMU driver would look >> >> >>> >> > like after the rework. >> >> >>> >> > >> >> >>> >> > If in any doubts, please ask. >> >> >>> >> >> >> >>> >> Thanks a lot for this. I will start rebasing my exynos7 >> >> >>> >> patches on your tree. >> >> >>> >> >> >> >>> > >> >> >>> > Good! Please rebase your work on top of Bart's and Lukasz's >> >> >>> > work. >> >> >>> > >> >> >>> > New Exynos chip support, at this point, makes sense to hold >> >> >>> > until we get the rework done. The proposals for change in >> >> >>> > of-thermal are more or less alined. The rework at the exynos >> >> >>> > driver as well. So, things should go smoothly, from my >> >> >>> > perspective. >> >> >>> >> >> >>> Sure I will wait for Lukasz's consolidation to get in. However, >> >> >>> there is a patch in my series [1] which adds support for an >> >> >>> optional special clock. Could that be picked up independently >> >> >>> now if I rebase it over Bartlomiej's patchset ? >> >> >>> >> >> >>> [1] >> >> >>> http://permalink.gmane.org/gmane.linux.power-management.general/52826 >> >> >>> > >> >> >>> > One point I want you, Abhilash, is to check Bartlomiej >> >> >>> > series. He has ripped several things in his refactoring, >> >> >>> > like register abstraction, etc. It would be good if you >> >> >>> > check the impact of those changes in your new chip support, >> >> >>> > before we send his series for merge. Please have a word >> >> >>> > there. >> >> >>> >> >> >>> Lukasz, I tested the tree with your patches applied on a >> >> >>> SMDK5420 and 5800-Peach-Pi. However, the boards hang at boot-up >> >> >>> after failing to get the trip points ("get_th_reg: Cannot get >> >> >>> trip points from of-thermal.c!"). I have not debugged this yet >> >> >>> and was wondering if you have noticed similar issues or have >> >> >>> already fixed this. >> >> >> >> >> >> I suspect that some nodes in the device tree are missing. >> >> >> >> >> >> I've tested those patches on [1]: >> >> >> >> >> >> - Exynos4210 - Trats (TMU zone + cpu_cooling) >> >> >> [exynos4210-trats.dts] >> >> >> - Exynos4412 - Trats2/Odroid U3 (TMU zone + cpu_cooling) >> >> >> [exynos4412-trats2.dts, exynos4412-odroidu3.dts] >> >> >> - Exynos5250 - Arndale (TMU zone + cpu_cooling) >> >> >> [exynos5250-arndale.dts] >> >> >> - Exynos5420 - Arndale-octa (only TMU zones) >> >> >> [exynos5420-arndale-octa.dts] >> >> >> >> >> >> >> >> >> I might have overlooked some entries for dts files since I don't >> >> >> have Peach-Pi and SMDK devices. >> >> >> >> >> >> Please, look on above device tree sources [1] for a reference. >> >> > >> >> > I don't think that the dt entries are the problem as you are >> >> > including the exynos5420-trip-points.dtsi file in exynos5420.dtsi >> >> > and this would apply for all 5420 based boards. Considering that >> >> > 5420 based arndale-octa is working for you, I will re-check my >> >> > setup. >> >> >> >> It was the DT entries after all, specifically the cooling map bits >> >> are missing for 5420. >> > >> > This is strange. As fair as I remember with 5420 it was only >> > possible to read the temperature >> > from /sys/class/thermal/thermal_zoneX. >> > >> > The exynos5420-trip-points.dtsi was added in: >> > thermal: dts: Default trip points definition for Exynos5420 SoCs >> > >> > With the current implementation (before those patches) there aren't >> > any settings for cpu_cooling for Exynos5420. >> >> I am not clear about this, prior to your patches we have 2 throttling >> frequencies for 5420 (even though cpufreq support is still on-going >> for this SoC). I will send you the code needed for me to get 5420/5800 >> to work. > > Hmm. I've checked Exynos5420 mainline support with v1 of this patch, > which was based on 3.17-rc6. At this time in exynos_tmu_data.c there > wasn't cpu_cooling() support for Exynos 5420 available in the mainline. > > No problem to add this in v2. Great, please cc me on them I will test it out on the boards with me. > >> >> > >> >> I am not sure why you didn't see the same issue with >> >> Arndale 5420 Octa. >> > >> > As I've said, it was possible to read temperatures from several >> > thermal_zone's. >> > >> >> Anyway, after adding entries similar to the ones >> >> present for other SoCs, both the SMDK5420 and 5800 Peach-Pi are >> >> working fine. >> > >> > Could you post/share code necessary to run on your setup? >> >> Will do. I have sent the patch to your mail. > > That would be great. Thanks. > >> >> > >> >> >> >> > >> >> > Can you confirm >> >> > "https://git.linaro.org/people/marek.szyprowski/linux-srpol.git/shortlog/refs/heads/v3.18-ti-soc-thermal" >> >> > has all your latest changes as that is the tree I am currently >> >> > using. >> >> > >> >> > Also, can you or Eduardo comment on if my SCLK patch can be >> >> > considered before your patch set gets in or does that need to >> >> > wait as well. >> >> >> >> OK, I guess I'll just post it separately and maybe Eduardo can >> >> consider picking it up. >> > >> > I'm going to give you the feedback in a moment. >> > >> >> >> >> >>> >> >> >>> I am currently in the process of porting the Exynos7 changes >> >> >>> over yours, will let you know if I have any other questions. >> >> >> >> >> >> Thanks for feedback. Comments are more than welcome :-) >> >> From what I have tested so far, there are a couple of things I have >> >> noticed. The thermal zone mode shows as being disabled in sysfs >> >> with your patches, when it used to be enabled prior to your >> >> patches. >> > >> > On my setup I need to mount /sysfs by >> > hand. After mounting I can read temperature from thermal_zones. >> >> I can read the temperature too and there does not appear to be any >> problem with the functionality. > > Ok. > >> What I was trying to point out was >> that, cat /sys/class/thermal/thermal_zone*/mode shows "disabled" for >> the thermal zones even though reading of temperature is fine. > > Frankly speaking I didn't check for this particular case. I assume that > without my patches the /mode is "enabled"? Yes it is. Regards, Abhilash > >> >> Regards, >> Abhilash >> >> > >> >> Not >> >> sure if this is expected. >> > >> > I was able to read temperature from thermal_zones (5 if I remember >> > correctly) with and without those patches. I assume that this is the >> > correct behaviour. >> > >> >> Also, your 17/21 seems to be adding >> >> exynos_tmu_initialize again to the probe function even though it is >> >> already present. >> > >> > You are right. My mistake. I will fix it for v2. >> > Thanks for feedback - more is welcome :-) >> > >> >> >> >> Regards, >> >> Abhilash >> >> >> >> >> >>> >> >> >>> Regards, >> >> >>> Abhilash >> >> >>> >> >> >>> >> >> >> >> Abhilash Kesavan (4): >> >> >>> >> >> >> >> thermal: exynos: add optional sclk support >> >> >>> >> >> >> >> thermal: exynos: add a triminfo_mask field in >> >> >>> >> >> >> >> exynos_tmu_register structure >> >> >>> >> >> >> >> thermal: exynos: modify the prototype for >> >> >>> >> >> >> >> code_to_temp function thermal: exynos: Add TMU >> >> >>> >> >> >> >> support for Exynos7 SoC >> >> >>> >> >> >> >> >> >> >>> >> >> >> >> .../devicetree/bindings/thermal/exynos-thermal.txt >> >> >>> >> >> >> >> | 4 + >> >> >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu.c >> >> >>> >> >> >> >> | 106 ++++++++++++++---- >> >> >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu.h >> >> >>> >> >> >> >> | 13 ++- >> >> >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu_data.c >> >> >>> >> >> >> >> | 117 ++++++++++++++++++++ >> >> >>> >> >> >> >> drivers/thermal/samsung/exynos_tmu_data.h >> >> >>> >> >> >> >> | 27 +++++ 5 files changed, 247 insertions(+), 20 >> >> >>> >> >> >> >> deletions(-) >> >> >>> >> >> >> > >> >> >>> >> >> >> > Best regards, >> >> >>> >> >> >> > -- >> >> >>> >> >> >> > Bartlomiej Zolnierkiewicz >> >> >>> >> >> >> > Samsung R&D Institute Poland >> >> >>> >> >> >> > Samsung Electronics >> >> >>> >> >> >> > >> >> >>> >> >> > >> >> >>> >> >> > >> >> >>> >> >> > >> >> >>> >> >> > -- >> >> >>> >> >> > Best regards, >> >> >>> >> >> > >> >> >>> >> >> > Lukasz Majewski >> >> >>> >> >> > >> >> >>> >> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform >> >> >>> >> >> > Group >> >> >>> >> > >> >> >>> >> > >> >> >>> >> > >> >> >>> >> > -- >> >> >>> >> > Best regards, >> >> >>> >> > >> >> >>> >> > Lukasz Majewski >> >> >>> >> > >> >> >>> >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform >> >> >>> >> > Group >> >> >>> > >> >> >>> > >> >> >> >> >> >> >> >> >> >> >> >> -- >> >> >> Best regards, >> >> >> >> >> >> Lukasz Majewski >> >> >> >> >> >> Samsung R&D Institute Poland (SRPOL) | Linux Platform Group >> > >> > >> > >> > -- >> > Best regards, >> > >> > Lukasz Majewski >> > >> > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group > > > -- > Best regards, > > Lukasz Majewski > > Samsung R&D Institute Poland (SRPOL) | Linux Platform Group ^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2014-11-24 11:10 UTC | newest] Thread overview: 21+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-11-14 11:17 [PATCH 0/4] Add TMU support for Exynos7 Abhilash Kesavan 2014-11-14 11:17 ` [PATCH 1/4] thermal: exynos: add optional sclk support Abhilash Kesavan 2014-11-14 11:18 ` [PATCH 2/4] thermal: exynos: add a triminfo_mask field in exynos_tmu_register structure Abhilash Kesavan 2014-11-14 11:18 ` [PATCH 3/4] thermal: exynos: modify the prototype for code_to_temp function Abhilash Kesavan 2014-11-14 11:18 ` [PATCH 4/4] thermal: exynos: Add TMU support for Exynos7 SoC Abhilash Kesavan 2014-11-14 12:19 ` [PATCH 0/4] Add TMU support for Exynos7 Bartlomiej Zolnierkiewicz 2014-11-14 12:30 ` Abhilash Kesavan 2014-11-14 13:02 ` Lukasz Majewski 2014-11-14 14:07 ` Abhilash Kesavan 2014-11-14 14:50 ` Lukasz Majewski 2014-11-18 8:08 ` Lukasz Majewski 2014-11-18 8:14 ` Abhilash Kesavan 2014-11-19 13:18 ` Eduardo Valentin 2014-11-20 13:05 ` Abhilash Kesavan 2014-11-20 13:22 ` Lukasz Majewski 2014-11-20 14:49 ` Abhilash Kesavan 2014-11-22 7:45 ` Abhilash Kesavan 2014-11-24 9:24 ` Lukasz Majewski 2014-11-24 10:50 ` Abhilash Kesavan 2014-11-24 11:04 ` Lukasz Majewski 2014-11-24 11:09 ` Abhilash Kesavan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).