devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <briannorris-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
To: "Heiko Stübner" <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Cc: Guillaume Tucker
	<guillaume.tucker-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Neil Armstrong
	<narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Sjoerd Simons
	<sjoerd.simons-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>,
	Wookey <wookey-Xpnwy/r4z8dg9hUCZPvPmw@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	John Reitan <john.reitan-5wv7dgnIgG8@public.gmane.org>,
	Enric Balletbo i Serra
	<enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Subject: Re: [PATCH v5 1/5] dt-bindings: gpu: add bindings for the ARM Mali Midgard GPU
Date: Wed, 12 Jul 2017 11:43:39 -0700	[thread overview]
Message-ID: <20170712184338.GA140539@google.com> (raw)
In-Reply-To: <1692483.PxpH1MfcPQ@diego>

Hi Heiko,

On Wed, Jul 12, 2017 at 08:30:55PM +0200, Heiko Stuebner wrote:
> Am Mittwoch, 12. Juli 2017, 10:26:39 CEST schrieb Brian Norris:
> > On Wed, May 03, 2017 at 10:56:25AM +0100, Guillaume Tucker wrote:
> > > The ARM Mali Midgard GPU family is present in a number of SoCs
> > > from many different vendors such as Samsung Exynos and Rockchip.
> > > 
> > > Import the device tree bindings documentation from the r16p0
> > > 
> > > release of the Mali Midgard GPU kernel driver:
> > >   https://developer.arm.com/-/media/Files/downloads/mali-drivers/kernel/ma
> > >   li-midgard-gpu/TX011-SW-99002-r16p0-00rel0.tgz> 
> > > Remove the copyright and GPL licence header as deemed not necessary.
> > > 
> > > Redesign the "compatible" property strings to list all the Mali
> > > Midgard GPU types and add vendor specific ones.
> > > 
> > > Drop the "clock-names" property as the Mali Midgard GPU uses only one
> > > clock (the driver now needs to call clk_get with NULL).
> > > 
> > > Convert the "interrupt-names" property values to lower-case: "job",
> > > "mmu" and "gpu".
> > > 
> > > Replace the deprecated "operating-points" optional property with
> > > "operating-points-v2".
> > > 
> > > Omit the following optional properties in this initial version as they
> > > 
> > > are only used in very specific cases:
> > >   * snoop_enable_smc
> > >   * snoop_disable_smc
> > >   * jm_config
> > >   * power_model
> > >   * system-coherency
> > >   * ipa-model
> > > 
> > > Update the example accordingly to reflect all these changes, based on
> > > rk3288 mali-t760.
> > > 
> > > CC: John Reitan <john.reitan-5wv7dgnIgG8@public.gmane.org>
> > > Tested-by: Enric Balletbo i Serra <enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
> > > Signed-off-by: Guillaume Tucker <guillaume.tucker-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
> > > ---
> > > 
> > >  .../devicetree/bindings/gpu/arm,mali-midgard.txt   | 86
> > >  ++++++++++++++++++++++ 1 file changed, 86 insertions(+)
> > >  create mode 100644
> > >  Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt> 
> > > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> > > b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt new file
> > > mode 100644
> > > index 000000000000..d3b6e1a4713a
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> > 
> > ^^ This file name implies we're talking about a base "arm,mali-midgard"
> > compatible property.
> 
> it follows the precedent of arm,mali-utgard.txt and while the file-name
> is not part of the compatible list, it feels way better collecting all the 
> variants in one file, compared to spawning multiple ones for each soc
> vendor using a mali gpu.
> 
> Also in other places the naming of binding descriptions does not follow
> any compatible at all, so the filename = main-compatible does not seem
> to be the rule.

Well, when they do get a name in the form of "<vendor>,<foo>.txt", the
"<vendor>,<foo>" is usually at least *a* valid compatible string. For
example, "nvidia,gk20a.txt" has several other strings, but its filename
is one of the supported ones.

Anyway, that wasn't my main worry. I was mostly curious about the body
of the text.

> > > @@ -0,0 +1,86 @@
> > > +ARM Mali Midgard GPU
> > > +====================
> > > +
> > > +Required properties:
> > > +
> > > +- compatible :
> > > +  * Must contain one of the following:
> > > +    + "arm,mali-t604"
> > > +    + "arm,mali-t624"
> > > +    + "arm,mali-t628"
> > > +    + "arm,mali-t720"
> > > +    + "arm,mali-t760"
> > > +    + "arm,mali-t820"
> > > +    + "arm,mali-t830"
> > > +    + "arm,mali-t860"
> > > +    + "arm,mali-t880"
> > > +  * which must be preceded by one of the following vendor specifics:
> > > +    + "amlogic,meson-gxm-mali"
> > > +    + "rockchip,rk3288-mali"
> > 
> > But it's not listed here.
> > 
> > > +
> > > +- reg : Physical base address of the device and length of the register
> > > area. +
> > > +- interrupts : Contains the three IRQ lines required by Mali Midgard
> > > devices. +
> > > +- interrupt-names : Contains the names of IRQ resources in the order they
> > > were +  provided in the interrupts property. Must contain: "job", "mmu",
> > > "gpu". +
> > > +
> > > +Optional properties:
> > > +
> > > +- clocks : Phandle to clock for the Mali Midgard device.
> > > +
> > > +- mali-supply : Phandle to regulator for the Mali device. Refer to
> > > +  Documentation/devicetree/bindings/regulator/regulator.txt for details.
> > > +
> > > +- operating-points-v2 : Refer to
> > > Documentation/devicetree/bindings/power/opp.txt +  for details.
> > > +
> > > +
> > > +Example for a Mali-T760:
> > > +
> > > +gpu@ffa30000 {
> > > +	compatible = "rockchip,rk3288-mali", "arm,mali-t760",
> > > "arm,mali-midgard";
> > 
> > And it *is* used here in this example.
> > 
> > So, should it be used/documented or not?
> 
> No I don't think it should and have patches that drop the mali-midgard from
> the example + rk3288 dtsi to not confuse people:
> - https://patchwork.kernel.org/patch/9832811/
> - https://patchwork.kernel.org/patch/9832807/

I didn't notice those. Thanks.

> Devicetree supposedly should not contain wildcards and without knowing
> for real that all of then in fact are compatible we should not assume so
> [and that's hard to check with all the secrecy :-) ] . Using the real name 
> (tXXX) sounds nice enough.

Fine with me.

Brian
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-07-12 18:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03  9:56 [PATCH v5 0/5] Add ARM Mali Midgard device tree bindings and gpu node for rk3288 Guillaume Tucker
2017-05-03  9:56 ` [PATCH v5 1/5] dt-bindings: gpu: add bindings for the ARM Mali Midgard GPU Guillaume Tucker
2017-05-08 16:18   ` Rob Herring
     [not found]   ` <bebe578ba130de5fa320ca7c6427b2fae83d61d7.1493804968.git.guillaume.tucker-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-07-12 17:26     ` Brian Norris
     [not found]       ` <20170712172636.GA90759-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2017-07-12 18:30         ` Heiko Stübner
2017-07-12 18:43           ` Brian Norris [this message]
2017-07-14  6:41         ` Guillaume Tucker
2017-07-14  7:42           ` Guillaume Tucker
2017-05-03  9:56 ` [PATCH v5 2/5] ARM: dts: rockchip: add ARM Mali GPU node for rk3288 Guillaume Tucker
2017-05-03  9:56 ` [PATCH v5 3/5] ARM: dts: rockchip: enable ARM Mali GPU on rk3288-rock2-som Guillaume Tucker
2017-05-03  9:56 ` [PATCH v5 4/5] ARM: dts: rockchip: enable ARM Mali GPU on rk3288-firefly Guillaume Tucker
2017-05-03  9:56 ` [PATCH v5 5/5] ARM: dts: rockchip: enable ARM Mali GPU on rk3288-veyron Guillaume Tucker
     [not found] ` <cover.1493804968.git.guillaume.tucker-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-05-08 16:27   ` [PATCH v5 0/5] Add ARM Mali Midgard device tree bindings and gpu node for rk3288 Heiko Stübner
2017-05-09  1:16     ` Randy Li
     [not found]       ` <b63475e9-21f6-5995-90b6-e0eeae8144ab-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-05-09  7:40         ` Guillaume Tucker
     [not found]           ` <b43fc703-3c39-58e9-6006-1aa7f9d0cea6-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-05-09  7:45             ` Randy Li
     [not found]               ` <ddec5773-43ef-a4c3-2280-8f0c5b1f1c4d-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-05-10 10:10                 ` Guillaume Tucker
     [not found]                   ` <425541fd-e648-1db7-9c31-13d2d4f094b4-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-05-10 10:26                     ` Heiko Stübner
2017-05-10 14:52                     ` Wookey
2017-05-19 22:25   ` Heiko Stuebner

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=20170712184338.GA140539@google.com \
    --to=briannorris-f7+t8e8rja9g9huczpvpmw@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org \
    --cc=guillaume.tucker-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=john.reitan-5wv7dgnIgG8@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=narmstrong-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=sjoerd.simons-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org \
    --cc=wookey-Xpnwy/r4z8dg9hUCZPvPmw@public.gmane.org \
    /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 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).