[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqKJQwfDJbpmwW+oCxiDkSp5+6mG-uoURmCQVEMP_jFOEg@mail.gmail.com>
Date: Mon, 19 Nov 2018 13:15:16 -0600
From: Rob Herring <robh@...nel.org>
To: Matthias Brugger <matthias.bgg@...il.com>
Cc: matthias.bgg@...nel.org, Mark Rutland <mark.rutland@....com>,
CK Hu <ck.hu@...iatek.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
David Airlie <airlied@...ux.ie>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...eaurora.org>,
Ulrich Hecht <ulrich.hecht+renesas@...il.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Sean Wang <sean.wang@...iatek.com>,
Sean Wang <sean.wang@...nel.org>,
Randy Dunlap <rdunlap@...radead.org>,
Chen-Yu Tsai <wens@...e.org>,
dri-devel <dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>,
linux-mediatek@...ts.infradead.org,
linux-clk <linux-clk@...r.kernel.org>,
devicetree@...r.kernel.org, Matthias Brugger <mbrugger@...e.com>
Subject: Re: [PATCH v5 08/12] dt-bindings: mediatek: Change the binding for
mmsys clocks
On Sun, Nov 18, 2018 at 11:12 AM Matthias Brugger
<matthias.bgg@...il.com> wrote:
>
>
>
> On 11/17/18 12:15 AM, Rob Herring wrote:
> > On Fri, Nov 16, 2018 at 01:54:45PM +0100, matthias.bgg@...nel.org wrote:
> >> From: Matthias Brugger <mbrugger@...e.com>
> >>
> >> On SoCs with no publical available HW or no working graphic stack
> >> we change the devicetree binding for the mmsys clock part. This
> >> way we don't need to register a platform device explicitly in the
> >> drm driver. Instead we can create a mmsys child which invokes the
> >> clock driver.
> >>
> >> Signed-off-by: Matthias Brugger <mbrugger@...e.com>
> >> ---
> >> .../bindings/arm/mediatek/mediatek,mmsys.txt | 21 ++++++++++++-------
> >> .../display/mediatek/mediatek,disp.txt | 4 ++++
> >> 2 files changed, 18 insertions(+), 7 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
> >> index 4468345f8b1a..d4e205981363 100644
> >> --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
> >> +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.txt
> >> @@ -1,4 +1,4 @@
> >> -Mediatek mmsys controller
> >> +Mediatek mmsys clock controller
> >> ============================
> >>
> >> The Mediatek mmsys controller provides various clocks to the system.
> >> @@ -6,18 +6,25 @@ The Mediatek mmsys controller provides various clocks to the system.
> >> Required Properties:
> >>
> >> - compatible: Should be one of:
> >> - - "mediatek,mt2712-mmsys", "syscon"
> >> - - "mediatek,mt6797-mmsys", "syscon"
> >> + - "mediatek,mt2712-mmsys-clk", "syscon"
> >> + - "mediatek,mt6797-mmsys-clk", "syscon"
> >
> > Doesn't match the example.>
> >> - #clock-cells: Must be 1
> >>
> >> -The mmsys controller uses the common clk binding from
> >> +The mmsys clock controller uses the common clk binding from
> >> Documentation/devicetree/bindings/clock/clock-bindings.txt
> >> The available clocks are defined in dt-bindings/clock/mt*-clk.h.
> >> +It is a child of the mmsys block, see binding at:
> >> +Documentation/devicetree/bindings/display/mediatek/mediatek,disp.txt
> >>
> >> Example:
> >>
> >> -mmsys: clock-controller@...00000 {
> >> - compatible = "mediatek,mt8173-mmsys", "syscon";
> >> +mmsys: syscon@...00000 {
> >> + compatible = "mediatek,mt2712-mmsys", "syscon", "simple-mfd";
> >> reg = <0 0x14000000 0 0x1000>;
> >> - #clock-cells = <1>;
> >> +
> >> + mmsys_clk: clock-controller@...00000 {
> >> + compatible = "mediatek,mt2712-mmsys-clk";
> >> + #clock-cells = <1>;
> >
> > This goes against the general direction of not defining separate nodes
> > for providers with no resources.
> >
> > Why do you need this and what does it buy if you have to continue to
> > support the existing chips?
> >
>
> It would show explicitly that the mmsys block is used to probe two
> drivers, one for the gpu and one for the clocks. Otherwise that is
> hidden in the drm driver code. I think it is cleaner to describe that in
> the device tree.
No, that's maybe cleaner for the driver implementation in the Linux
kernel. What about other OS's or when Linux drivers and subsystems
needs change? Cleaner for DT is design bindings that reflect the h/w.
Hardware is sometimes just messy.
Rob
Powered by blists - more mailing lists