devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: "David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Benoît Cousson" <bcousson@baylibre.com>,
	"Tony Lindgren" <tony@atomide.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	devicetree@vger.kernel.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-omap <linux-omap@vger.kernel.org>,
	"Discussions about the Letux Kernel"
	<letux-kernel@openphoenux.org>,
	kernel@pyra-handheld.com
Subject: Re: [PATCH 1/7] dt-bindings: gpu: pvrsgx: add initial bindings
Date: Mon, 21 Oct 2019 10:07:51 -0500	[thread overview]
Message-ID: <CAL_Jsq+obsTSU3iP1wm_3-FsAJ4Mxiz0NbMY1_h5NeFn67Sj+A@mail.gmail.com> (raw)
In-Reply-To: <f0fb68dc7bc027e5e911721852f6bc6fa2d77a63.1571424390.git.hns@goldelico.com>

On Fri, Oct 18, 2019 at 1:46 PM H. Nikolaus Schaller <hns@goldelico.com> wrote:
>
> The Imagination PVR/SGX GPU is part of several SoC from
> multiple vendors, e.g. TI OMAP, Ingenic JZ4780, Intel Poulsbo
> and others.
>
> Here we describe how the SGX processor is interfaced to
> the SoC (registers, interrupt etc.).
>
> Clock, Reset and power management should be handled
> by the parent node.

That's TI specific.

>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>  .../devicetree/bindings/gpu/img,pvrsgx.txt    | 76 +++++++++++++++++++
>  1 file changed, 76 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/gpu/img,pvrsgx.txt

Please make this DT schema format.

> diff --git a/Documentation/devicetree/bindings/gpu/img,pvrsgx.txt b/Documentation/devicetree/bindings/gpu/img,pvrsgx.txt
> new file mode 100644
> index 000000000000..4ad87c075791
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpu/img,pvrsgx.txt
> @@ -0,0 +1,76 @@
> +Imagination PVR/SGX GPU
> +
> +Only the Imagination SGX530, SGX540 and SGX544 GPUs are currently covered by this binding.
> +
> +Required properties:
> +- compatible:  Should be one of
> +               "img,sgx530-121", "img,sgx530", "ti,omap-omap3-sgx530-121";
> +                 - BeagleBoard ABC, OpenPandora 600MHz
> +               "img,sgx530-125", "img,sgx530", "ti,omap-omap3-sgx530-125";
> +                 - BeagleBoard XM, GTA04, OpenPandora 1GHz
> +               "img,sgx530-125", "img,sgx530", "ti,omap-am3517-sgx530-125";
> +               "img,sgx530-125", "img,sgx530", "ti,omap-am335x-sgx530-125";
> +                 - BeagleBone Black
> +               "img,sgx540-120", "img,sgx540", "ti,omap-omap4-sgx540-120";
> +                 - Pandaboard (ES)
> +               "img,sgx544-112", "img,sgx544", "ti,omap-omap4-sgx544-112";
> +               "img,sgx544-116", "img,sgx544", "ti,omap-omap5-sgx544-116";
> +                 - OMAP5 UEVM, Pyra Handheld
> +               "img,sgx544-116", "img,sgx544", "ti,omap-dra7-sgx544-116";

The order here is wrong. Should be most specific first.

Drop 'omap-' from the compatible.

> +
> +               For further study:
> +                       "ti,omap-am3517-sgx530-?"
> +                       "ti,omap-am43xx-sgx530-?"
> +                       "ti,ti43xx-sgx"
> +                       "ti,ti81xx-sgx"
> +                       "img,jz4780-sgx5??-?"
> +                       "intel,poulsbo-sgx?"
> +                       "intel,cedarview-sgx?"
> +                       "sunxi,sgx-544-?" - Banana-Pi-M3 (Allwinner A83T)

Just drop these.

> +
> +               The "ti,omap..." entries are needed temporarily to handle SoC
> +               specific builds of the kernel module.
> +
> +               In the long run, only the "img,sgx..." entry should suffice
> +               to match a generic driver for all architectures and driver
> +               code can dynamically find out on which SoC it is running.

Drop this. Which compatible an OS matches on is not relevant to the
binding. And 'temporarily' is wrong as the SoC specific compatible
strings are what are used for handling errata or other integration
specific things.

> +
> +
> +- reg:         Physical base addresses and lengths of the register areas.

How many?

> +- reg-names:   Names for the register areas.

If only 1 as the example suggests, then you don't need this.

> +- interrupts:  The interrupt numbers.
> +
> +Optional properties:
> +- timer:       the timer to be used by the driver.

Needs a better description and vendor prefix at least.

Why is this needed rather than using the OS's timers?

> +- img,cores:   number of cores. Defaults to <1>.

Not discoverable?

> +
> +/ {
> +       ocp {
> +               sgx_module: target-module@56000000 {

This is TI specific and this binding covers other chips in theory at
least. This part is outside the scope

> +                       compatible = "ti,sysc-omap4", "ti,sysc";
> +                       reg = <0x5600fe00 0x4>,
> +                             <0x5600fe10 0x4>;

How does it work that these registers overlap the GPU registers?

> +                       reg-names = "rev", "sysc";
> +                       ti,sysc-midle = <SYSC_IDLE_FORCE>,
> +                                       <SYSC_IDLE_NO>,
> +                                       <SYSC_IDLE_SMART>;
> +                       ti,sysc-sidle = <SYSC_IDLE_FORCE>,
> +                                       <SYSC_IDLE_NO>,
> +                                       <SYSC_IDLE_SMART>;
> +                       clocks = <&gpu_clkctrl OMAP5_GPU_CLKCTRL 0>;
> +                       clock-names = "fck";
> +                       #address-cells = <1>;
> +                       #size-cells = <1>;
> +                       ranges = <0 0x56000000 0x2000000>;
> +
> +                       sgx@fe00 {

gpu@...



> +                               compatible = "img,sgx544-116", "img,sgx544", "ti,omap-omap5-sgx544-116";
> +                               reg = <0xfe00 0x200>;
> +                               reg-names = "sgx";
> +                               interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
> +                               timer = <&timer11>;
> +                               img,cores = <2>;
> +                       };
> +               };
> +       };
> +};
> --
> 2.19.1
>

  reply	other threads:[~2019-10-21 15:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 18:46 [PATCH 0/7] ARM: DTS: OMAP: add child nodes describing the PVRSGX present in some OMAP SoC H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 1/7] dt-bindings: gpu: pvrsgx: add initial bindings H. Nikolaus Schaller
2019-10-21 15:07   ` Rob Herring [this message]
2019-10-21 15:45     ` H. Nikolaus Schaller
2019-10-21 17:10       ` Tony Lindgren
2019-10-21 17:25       ` Tony Lindgren
2019-10-21 18:07         ` H. Nikolaus Schaller
2019-10-22 15:02           ` Tony Lindgren
2019-10-22 15:11             ` H. Nikolaus Schaller
2019-10-22 15:36               ` Tony Lindgren
2019-10-22 16:14                 ` H. Nikolaus Schaller
2019-10-30 16:16   ` Tony Lindgren
2019-10-30 16:39     ` H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 2/7] ARM: DTS: am33xx: add sgx gpu child node H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 3/7] ARM: DTS: am3517: " H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 4/7] ARM: DTS: omap3: " H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 5/7] ARM: DTS: omap36xx: " H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 6/7] ARM: DTS: omap4: " H. Nikolaus Schaller
2019-10-18 18:46 ` [PATCH 7/7] ARM: DTS: omap5: " H. Nikolaus Schaller

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=CAL_Jsq+obsTSU3iP1wm_3-FsAJ4Mxiz0NbMY1_h5NeFn67Sj+A@mail.gmail.com \
    --to=robh+dt@kernel.org \
    --cc=airlied@linux.ie \
    --cc=bcousson@baylibre.com \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hns@goldelico.com \
    --cc=kernel@pyra-handheld.com \
    --cc=letux-kernel@openphoenux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=tony@atomide.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 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).