All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Naveen Krishna Ch <naveenkrishna.ch@gmail.com>
Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"rui.zhang@intel.com" <rui.zhang@intel.com>,
	"eduardo.valentin@ti.com" <eduardo.valentin@ti.com>,
	"linux-samsung-soc@vger.kernel.org" 
	<linux-samsung-soc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"amit.daniel@samsung.com" <amit.daniel@samsung.com>,
	Kukjin Kim <kgene.kim@samsung.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"b.zolnierkie@samsung.com" <b.zolnierkie@samsung.com>,
	"cpgs@samsung.com" <cpgs@samsung.com>,
	"t.figa@samsung.com" <t.figa@samsung.com>
Subject: Re: [PATCH 3/4 v9] thermal: samsung: Add TMU support for Exynos5420 SoCs
Date: Mon, 18 Nov 2013 11:27:12 +0000	[thread overview]
Message-ID: <20131118112712.GB30853@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <CAHfPSqAxs7qpx8pv_CnbtQBMrooyXzs7SBKPe7xrK-qmSELp=g@mail.gmail.com>

On Mon, Nov 18, 2013 at 03:22:57AM +0000, Naveen Krishna Ch wrote:
> Hello All,
> 
> On 12 November 2013 12:07, Naveen Krishna Chatradhi
> <ch.naveen@samsung.com> wrote:
> > Exynos5420 has 5 TMU channels, the TRIMINFO register is
> > misplaced for TMU channels 2, 3 and 4
> > TRIMINFO at 0x1006c000 contains data for TMU channel 3
> > TRIMINFO at 0x100a0000 contains data for TMU channel 4
> > TRIMINFO at 0x10068000 contains data for TMU channel 2
> >
> > This patch
> > 1 Adds the neccessary register changes and arch information
> >    to support Exynos5420 SoCs.
> > 2. Handles the gate clock for misplaced TRIMINFO register
> > 3. Updates the Documentation at
> >    Documentation/devicetree/bindings/thermal/exynos-thermal.txt
> >
> > Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
> > Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
> > ---
> > Changes since v8:
> > 1. rewrote the Documentation for device tree bindings
> > 2. Merged the https://lkml.org/lkml/2013/11/7/262 (as this is a fix)
> > 3. introduces "samsung,exynos5420-tmu-triminfo" and
> >    "samsung,exynos5420-tmu-triminfo-clk" to handle the TMU channels on
> >    Exynos5420 more appropriately
> >
> >  .../devicetree/bindings/thermal/exynos-thermal.txt |   45 +++++++++
> >  drivers/thermal/samsung/exynos_tmu.c               |   58 ++++++++++-
> >  drivers/thermal/samsung/exynos_tmu.h               |    2 +
> >  drivers/thermal/samsung/exynos_tmu_data.c          |  106 ++++++++++++++++++++
> >  drivers/thermal/samsung/exynos_tmu_data.h          |    8 ++
> >  5 files changed, 215 insertions(+), 4 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
> > index 116cca0..5055b31 100644
> > --- a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
> > +++ b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt
> > @@ -6,6 +6,11 @@
> >                "samsung,exynos4412-tmu"
> >                "samsung,exynos4210-tmu"
> >                "samsung,exynos5250-tmu"
> > +              "samsung,exynos5420-tmu" for TMU channel 0, 1 on Exynos5420
> > +              "samsung,exynos5420-tmu-triminfo" for TMU channel 2 Exynos5420
> > +                       (Must pass triminfo base)
> > +              "samsung,exynos5420-tmu-triminfo-clk" for TMU channel 3 and 4
> > +                       Exynos5420 (Must pass triminfo base and triminfo clock)

While this mentions what the differences the binding expects to, what is
fundamentally different about these blocks?

> >                "samsung,exynos5440-tmu"
> >  - interrupt-parent : The phandle for the interrupt controller
> >  - reg : Address range of the thermal registers. For soc's which has multiple
> > @@ -13,6 +18,18 @@
> >         interrupt related then 2 set of register has to supplied. First set
> >         belongs to each instance of TMU and second set belongs to second set
> >         of common TMU registers.
> > +
> > +  NOTE: On Exynos5420, the TRIMINFO register is misplaced for TMU
> > +       channels 2, 3 and 4
> > +       Use "samsung,exynos5420-tmu-triminfo" in cases, there is a misplaced
> > +       register but no need of another clock to access that base.
> > +       Use "samsung,exynos5420-tmu-triminfo-clk" in cases where there is a misplaced
> > +       register and we need another clock to access that base.

This would have made more sense to have next to the compatible strings.

Instead of this, you could have a boolean property
("samsung,misplaced-triminfo") to describe the misplaced triminfo
register(s), and the presence of an additional clock would imlpy that
it's required for accessing triminfo register(s).

> > +
> > +       TRIMINFO at 0x1006c000 contains data for TMU channel 3
> > +       TRIMINFO at 0x100a0000 contains data for TMU channel 4
> > +       TRIMINFO at 0x10068000 contains data for TMU channel 2
> > +
> >  - interrupts : Should contain interrupt for thermal system
> >  - clocks : The main clock for TMU device
> >  - clock-names : Thermal system clock name
> > @@ -43,6 +60,34 @@ Example 2):
> >                 clock-names = "tmu_apbif";
> >         };

I'd have expected the clock-names to have an addition. The names of the
clock inputs are presumably well known, or you should be able to come up
with some sensible names...

> >
> > +Example 3): (In case of Exynos5420 "with misplaced TRIMINFO register")
> > +       /* tmu for CPU2 */
> > +       tmu@10068000 {
> > +               compatible = "samsung,exynos5420-tmu-triminfo";
> > +               reg = <0x10068000 0x100>, <0x1006c000 0x4>;
> > +               interrupts = <0 184 0>;
> > +               clocks = <&clock 318>;
> > +               clock-names = "tmu_apbif";
> > +       };
> > +
> > +       /* tmu for CPU3 */
> > +       tmu@1006c000 {
> > +               compatible = "samsung,exynos5420-tmu-triminfo-clk";
> > +               reg = <0x1006c000 0x100>, <0x100a0000 0x4>;
> > +               interrupts = <0 185 0>;
> > +               clocks = <&clock 318>;
> > +               clock-names = "tmu_apbif", "tmu_triminfo_apbif";

Each clock-names entry should correspond to an entry in clocks. The
"tmu_triminfo_apbif" entry here doesn't correspond to anything. I assume
a copy-paste error?

The "tmu_triminfo_apbif" clock name should be documented in the binding.

> > +       };
> > +
> > +       /* tmu for GPU */
> > +       tmu@100a0000 {
> > +               compatible = "samsung,exynos5420-tmu-triminfo-clk";
> > +               reg = <0x100a0000 0x100>, <0x10068000 0x4>;
> > +               interrupts = <0 215 0>;
> > +               clocks = <&clock 318>;
> > +               clock-names = "tmu_apbif", "tmu_triminfo_apbif";

Similarly here...

Thanks,
Mark.

  reply	other threads:[~2013-11-18 11:27 UTC|newest]

Thread overview: 141+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-01  6:02 [PATCH] thermal: exynos: Handle the misplaced TRIMINFO register Naveen Krishna Chatradhi
2013-08-01  8:32 ` amit daniel kachhap
2013-08-01  8:48   ` Naveen Krishna Ch
2013-08-01 10:36 ` [PATCH v2] " Naveen Krishna Chatradhi
2013-08-07  6:36   ` amit daniel kachhap
2013-08-07  6:43     ` Naveen Krishna Ch
2013-08-28  5:45 ` [PATCH 0/3] thermal: samsung: Add TMU for Exynos5420 Naveen Krishna Chatradhi
2013-08-28  5:45   ` [PATCH 1/3] thermal: samsung: correct the fall interrupt en, status bit fields Naveen Krishna Chatradhi
2013-08-28  5:57     ` amit daniel kachhap
2013-08-28  5:57       ` amit daniel kachhap
2013-09-04  4:23     ` Naveen Krishna Chatradhi
2013-09-04  4:23       ` [PATCH 2/3] thermal: samsung: change base_common to more meaningful base_second Naveen Krishna Chatradhi
2013-09-06  4:38         ` amit daniel kachhap
2013-09-06  4:38           ` amit daniel kachhap
2013-10-16  2:52         ` [PATCH 2/3 v5] " Naveen Krishna Chatradhi
2013-10-17  3:12         ` [PATCH 2/3 v6] " Naveen Krishna Chatradhi
2013-11-06 13:28         ` [PATCH 2/3 v7] " Naveen Krishna Chatradhi
2013-11-06 13:28           ` Naveen Krishna Chatradhi
2013-11-07  5:53         ` [PATCH 2/3 v8] " Naveen Krishna Chatradhi
2013-11-12  6:36         ` [PATCH 2/4 v9] " Naveen Krishna Chatradhi
2013-11-18  3:24           ` Naveen Krishna Ch
2013-11-18  3:24             ` Naveen Krishna Ch
2013-11-19 13:04         ` [PATCH 2/4 v10] " Naveen Krishna Chatradhi
2013-11-22  8:56           ` Naveen Krishna Ch
2013-11-22  8:56             ` Naveen Krishna Ch
2013-12-09 12:48           ` Tomasz Figa
2013-12-10  6:41         ` [PATCH v11 2/4] " Naveen Krishna Chatradhi
2013-12-18 15:51           ` Tomasz Figa
2013-12-19  6:06         ` [PATCH v12 " Naveen Krishna Chatradhi
2014-02-07  9:35           ` Naveen Krishna Ch
2014-02-07  9:35             ` Naveen Krishna Ch
2013-09-04  4:23       ` [PATCH 3/3] thermal: samsung: Add TMU support for Exynos5420 SoCs Naveen Krishna Chatradhi
2013-10-03 12:01         ` Naveen Krishna Ch
2013-10-03 12:01           ` Naveen Krishna Ch
2013-10-03 12:42           ` Bartlomiej Zolnierkiewicz
2013-10-03 12:42             ` Bartlomiej Zolnierkiewicz
2013-10-09 11:45             ` Naveen Krishna Ch
2013-10-09 11:45               ` Naveen Krishna Ch
2013-10-09 12:08         ` [PATCH 1/3 v4] thermal: samsung: correct the fall interrupt en, status bit fields Naveen Krishna Chatradhi
2013-10-09 12:08           ` [PATCH 2/3 v4] thermal: samsung: change base_common to more meaningful base_second Naveen Krishna Chatradhi
2013-10-14 13:47             ` Eduardo Valentin
2013-10-14 13:47               ` Eduardo Valentin
2013-10-09 12:08           ` [PATCH 3/3 v4] thermal: samsung: Add TMU support for Exynos5420 SoCs Naveen Krishna Chatradhi
2013-10-09 14:03           ` [PATCH 1/3 v4] thermal: samsung: correct the fall interrupt en, status bit fields Bartlomiej Zolnierkiewicz
2013-10-11 15:10             ` Eduardo Valentin
2013-10-11 15:10               ` Eduardo Valentin
2013-10-11 15:57               ` Bartlomiej Zolnierkiewicz
2013-10-14 14:18                 ` Eduardo Valentin
2013-10-14 14:18                   ` Eduardo Valentin
2013-10-14 16:01                   ` Bartlomiej Zolnierkiewicz
2013-10-15 11:39                     ` Naveen Krishna Ch
2013-10-15 11:39                       ` Naveen Krishna Ch
2013-10-14 13:56             ` Eduardo Valentin
2013-10-14 13:56               ` Eduardo Valentin
2013-11-06 13:28         ` [PATCH 3/3 v7] thermal: samsung: Add TMU support for Exynos5420 SoCs Naveen Krishna Chatradhi
2013-11-06 13:44           ` Bartlomiej Zolnierkiewicz
2013-11-07  5:53         ` [PATCH 3/3 v8] " Naveen Krishna Chatradhi
2013-11-07 15:09           ` Tomasz Figa
2013-11-12  6:19             ` Naveen Krishna Ch
2013-11-12  6:19               ` Naveen Krishna Ch
2013-11-12  6:37         ` [PATCH 3/4 v9] " Naveen Krishna Chatradhi
2013-11-18  3:22           ` Naveen Krishna Ch
2013-11-18  3:22             ` Naveen Krishna Ch
2013-11-18 11:27             ` Mark Rutland [this message]
2013-11-18 11:27               ` Mark Rutland
2013-12-09 12:43           ` Tomasz Figa
2013-11-19 13:05         ` [PATCH 3/4 v10] " Naveen Krishna Chatradhi
2013-11-22  8:55           ` Naveen Krishna Ch
2013-11-22  8:55             ` Naveen Krishna Ch
2013-12-09 12:46           ` Tomasz Figa
2013-12-10  6:42         ` [PATCH v11 3/4] " Naveen Krishna Chatradhi
2013-12-18 15:50           ` Tomasz Figa
2013-12-19  4:44             ` Naveen Krishna Ch
2013-12-19  4:44               ` Naveen Krishna Ch
2013-12-19  6:06         ` [PATCH v12 " Naveen Krishna Chatradhi
2013-12-19  6:06           ` Naveen Krishna Chatradhi
2013-12-19 11:34           ` Tomasz Figa
2014-02-07  9:34             ` Naveen Krishna Ch
2014-02-07  9:34               ` Naveen Krishna Ch
2013-10-16  2:51     ` [PATCH 1/3 v5] thermal: samsung: correct the fall interrupt en, status bit fields Naveen Krishna Chatradhi
2013-10-16 10:06       ` Bartlomiej Zolnierkiewicz
2013-10-16 11:05         ` Bartlomiej Zolnierkiewicz
2013-10-17  3:11     ` [PATCH 1/3 v6] thermal: samsung: add intclr_fall_shift bit in exynos_tmu_register Naveen Krishna Chatradhi
2013-10-17 10:03       ` Bartlomiej Zolnierkiewicz
2013-10-17 10:03         ` Bartlomiej Zolnierkiewicz
2013-11-06 13:17         ` Naveen Krishna Ch
2013-11-06 13:17           ` Naveen Krishna Ch
2013-11-06 13:36           ` Bartlomiej Zolnierkiewicz
2013-11-06 13:36             ` Bartlomiej Zolnierkiewicz
2013-11-06 13:27       ` [PATCH 1/3 v7] " Naveen Krishna Chatradhi
2013-11-07  5:52       ` [PATCH 1/3 v8] thermal: samsung: add intclr_fall_shift bit in exynos_tmu_register struct Naveen Krishna Chatradhi
2013-11-07 10:48         ` Bartlomiej Zolnierkiewicz
2013-11-07 10:58           ` Naveen Krishna Ch
2013-11-07 10:58             ` Naveen Krishna Ch
2013-11-07 14:47         ` Tomasz Figa
2013-11-07 14:47           ` Tomasz Figa
2013-11-12  6:36         ` [PATCH 1/4 v9] thermal: samsung: replace inten_ bit fields with intclr_ Naveen Krishna Chatradhi
2013-11-18  3:25           ` Naveen Krishna Ch
2013-11-18  3:25             ` Naveen Krishna Ch
2013-11-19 13:04           ` [PATCH 1/4 v10] " Naveen Krishna Chatradhi
2013-12-09 12:51             ` Tomasz Figa
2013-12-10  6:41           ` [PATCH v11 1/4] " Naveen Krishna Chatradhi
2013-12-18 15:51             ` Tomasz Figa
2013-12-19  6:05           ` [PATCH v12 " Naveen Krishna Chatradhi
2013-12-19  6:05             ` Naveen Krishna Chatradhi
2014-01-02  2:33             ` Zhang Rui
2014-02-07  9:33               ` Naveen Krishna Ch
2014-02-07  9:33                 ` Naveen Krishna Ch
2014-04-10 12:43                 ` Bartlomiej Zolnierkiewicz
2014-04-10 12:43                   ` Bartlomiej Zolnierkiewicz
2013-08-28  5:45   ` [PATCH 2/3] thermal: samsung: Add TMU support for Exynos5420 SoCs Naveen Krishna Chatradhi
2013-08-28  5:58     ` amit daniel kachhap
2013-08-28  5:58       ` amit daniel kachhap
2013-08-28  9:28     ` amit daniel kachhap
2013-08-28  9:28       ` amit daniel kachhap
2013-10-16  2:52     ` [PATCH 3/3 v5] " Naveen Krishna Chatradhi
2013-10-17  3:12     ` [PATCH 3/3 v6] " Naveen Krishna Chatradhi
2013-08-28  5:45   ` [PATCH 3/3] thermal: exynos: Handle the misplaced TRIMINFO register Naveen Krishna Chatradhi
2013-08-28  6:03     ` amit daniel kachhap
2013-08-28  6:03       ` amit daniel kachhap
2013-08-28  6:19       ` Naveen Krishna Ch
2013-08-28  6:19         ` Naveen Krishna Ch
2013-08-28  8:43         ` amit daniel kachhap
2013-08-28  8:43           ` amit daniel kachhap
2013-08-28  8:57           ` Naveen Krishna Ch
2013-08-28  8:57             ` Naveen Krishna Ch
2013-08-28  9:04             ` amit daniel kachhap
2013-08-28  9:04               ` amit daniel kachhap
2013-08-28 10:06     ` Bartlomiej Zolnierkiewicz
2013-11-12  6:35   ` [PATCH 0/3] thermal: samsung: Clean up and add support for Exynos5420 Naveen Krishna Chatradhi
2013-11-18  3:25     ` Naveen Krishna Ch
2013-11-18  3:25       ` Naveen Krishna Ch
2013-12-10  6:40     ` [PATCH v11 0/4] " Naveen Krishna Chatradhi
2014-03-19 11:19       ` Leela Krishna Amudala
2014-03-19 15:58         ` Tomasz Figa
2014-03-20  2:45           ` Naveen Krishna Ch
2014-04-08  9:33             ` Javi Merino
2013-08-28  9:16 ` [PATCH 1/3 v2] thermal: samsung: correct the fall interrupt en, status bit fields Naveen Krishna Chatradhi
2013-08-28  9:16   ` [PATCH 2/3] thermal: samsung: change base_common to more meaningful base_second Naveen Krishna Chatradhi
2013-08-28  9:16   ` [PATCH v2: 3/3] thermal: samsung: Add TMU support for Exynos5420 SoCs Naveen Krishna Chatradhi
2013-08-28 10:38     ` Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131118112712.GB30853@e106331-lin.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=amit.daniel@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=ch.naveen@samsung.com \
    --cc=cpgs@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=eduardo.valentin@ti.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=naveenkrishna.ch@gmail.com \
    --cc=rui.zhang@intel.com \
    --cc=t.figa@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.