linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Théo Lebrun" <theo.lebrun@bootlin.com>
To: "Andrew Davis" <afd@ti.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@linaro.org>,
	"Rob Herring" <robh@kernel.org>
Cc: "Gregory CLEMENT" <gregory.clement@bootlin.com>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Rafał Miłecki" <rafal@milecki.pl>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Vladimir Kondratiev" <vladimir.kondratiev@mobileye.com>,
	linux-mips@vger.kernel.org, linux-clk@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Tawfik Bayouk" <tawfik.bayouk@mobileye.com>,
	linux-gpio@vger.kernel.org
Subject: Re: [PATCH v3 04/17] dt-bindings: soc: mobileye: add EyeQ5 OLB system controller
Date: Thu, 25 Jan 2024 15:49:55 +0100	[thread overview]
Message-ID: <CYNVD4U0M5OS.LQ2MAKOL0LAP@bootlin.com> (raw)
In-Reply-To: <9a5f017c-530c-482b-9cbf-a07281e92589@ti.com>

Hello,

On Thu Jan 25, 2024 at 3:33 PM CET, Andrew Davis wrote:
> On 1/25/24 5:01 AM, Théo Lebrun wrote:
> > Hello,
> > 
> > On Thu Jan 25, 2024 at 8:51 AM CET, Krzysztof Kozlowski wrote:
> >> On 24/01/2024 16:14, Rob Herring wrote:
> >>>> +
> >>>> +      pinctrl-b {
> >>>> +        compatible = "mobileye,eyeq5-b-pinctrl";
> >>>> +        #pinctrl-cells = <1>;
> >>>> +      };
> >>>> +    };
> >>>
> >>> This can all be simplified to:
> >>>
> >>> system-controller@e00000 {
> >>>      compatible = "mobileye,eyeq5-olb", "syscon";
> >>>      reg = <0xe00000 0x400>;
> >>>      #reset-cells = <2>;
> >>>      #clock-cells = <1>;
> >>>      clocks = <&xtal>;
> >>>      clock-names = "ref";
> >>>
> >>>      pins { ... };
> >>> };
> >>>
> >>> There is no need for sub nodes unless you have reusable blocks or each
> >>> block has its own resources in DT.
> >>
> >> Yes, however I believe there should be resources here: each subnode
> >> should get its address space. This is a bit tied to implementation,
> >> which currently assumes "everyone can fiddle with everything" in this block.
> >>
> >> Theo, can you draw memory map?
> > 
> > It would be a mess. I've counted things up. The first 147 registers are
> > used in this 0x400 block. There are 31 individual blocks, with 7
> > registers unused (holes to align next block).
> > 
> > Functions are reset, clocks, LBIST, MBIST, DDR control, GPIO,
> > accelerator control, CPU entrypoint, PDTrace, IRQs, chip info & ID
> > stuff, control registers for PCIe / eMMC / Eth / SGMII / DMA / etc.
> > 
> > Some will never get used from Linux, others might. Maybe a moderate
> > approach would be to create ressources for major blocks and make it
> > evolve organically, without imposing that all uses lead to a new
> > ressource creation.
> > 
>
> That is usually how nodes are added to DT. If you modeled this
> system-controller space as a "simple-bus" instead of a "syscon"
> device, you could add nodes as you implement them. Rather than
> all at once as you have to by treating this space as one large
> blob device.

I see where you are coming from, but in our case modeling our DT node as
a simple-bus would be lying about the hardware behind. There is no such
underlying bus. Let's try to keep the devicetree an abstraction
describing the hardware.

Also, we are having conflicts because multiple such child nodes are
being added at the same time as the base node. Once this initial series
is out (meaning dt-bindings for the OLB will exist) we'll be able to
add new nodes or ressources on a whim.

Have you got an opinion on the approach described in this email?
https://lore.kernel.org/lkml/CYNRCGYA1PJ2.FYENLB4SRJWH@bootlin.com/

Thanks,

--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2024-01-25 14:50 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 18:46 [PATCH v3 00/17] Add support for Mobileye EyeQ5 system controller Théo Lebrun
2024-01-23 18:46 ` [PATCH v3 01/17] clk: fixed-factor: add optional accuracy support Théo Lebrun
2024-01-23 18:46 ` [PATCH v3 02/17] clk: fixed-factor: add fwname-based constructor functions Théo Lebrun
2024-01-23 18:46 ` [PATCH v3 03/17] dt-bindings: pinctrl: allow pin controller device without unit address Théo Lebrun
2024-01-23 20:57   ` Rob Herring
2024-01-23 18:46 ` [PATCH v3 04/17] dt-bindings: soc: mobileye: add EyeQ5 OLB system controller Théo Lebrun
2024-01-23 20:58   ` Rob Herring
2024-01-24 15:14   ` Rob Herring
2024-01-24 17:28     ` Théo Lebrun
2024-01-24 17:40       ` Théo Lebrun
2024-01-24 19:22         ` Rob Herring
2024-01-25 11:40           ` Théo Lebrun
2024-01-26 11:52             ` Krzysztof Kozlowski
2024-01-26 12:28               ` Théo Lebrun
2024-01-26 14:54                 ` Krzysztof Kozlowski
2024-01-25  7:51     ` Krzysztof Kozlowski
2024-01-25 11:01       ` Théo Lebrun
2024-01-25 14:33         ` Andrew Davis
2024-01-25 14:49           ` Théo Lebrun [this message]
2024-01-25 15:11             ` Andrew Davis
2024-01-26 11:51         ` Krzysztof Kozlowski
2024-01-23 18:46 ` [PATCH v3 05/17] dt-bindings: clock: mobileye,eyeq5-clk: add bindings Théo Lebrun
2024-01-24  6:45   ` Krzysztof Kozlowski
2024-01-23 18:46 ` [PATCH v3 06/17] dt-bindings: reset: mobileye,eyeq5-reset: " Théo Lebrun
2024-01-24  6:47   ` Krzysztof Kozlowski
2024-01-23 18:46 ` [PATCH v3 07/17] dt-bindings: pinctrl: mobileye,eyeq5-pinctrl: " Théo Lebrun
2024-01-24  6:52   ` Krzysztof Kozlowski
2024-01-23 18:46 ` [PATCH v3 08/17] clk: eyeq5: add platform driver Théo Lebrun
2024-01-24  7:05   ` Krzysztof Kozlowski
2024-01-24 16:41     ` Théo Lebrun
2024-01-25  7:46       ` Krzysztof Kozlowski
2024-01-25 11:53         ` Théo Lebrun
2024-01-26 11:56           ` Krzysztof Kozlowski
2024-01-23 18:46 ` [PATCH v3 09/17] reset: " Théo Lebrun
2024-01-24  7:00   ` Krzysztof Kozlowski
2024-01-24 16:52     ` Théo Lebrun
2024-01-24 10:54   ` Philipp Zabel
2024-01-24 17:07     ` Théo Lebrun
2024-01-23 18:46 ` [PATCH v3 10/17] pinctrl: " Théo Lebrun
2024-01-24  7:03   ` Krzysztof Kozlowski
2024-01-24 16:55     ` Théo Lebrun
2024-01-24 15:19   ` Rob Herring
2024-01-24 17:31     ` Théo Lebrun
2024-01-23 18:46 ` [PATCH v3 11/17] MIPS: mobileye: eyeq5: rename olb@e00000 to system-controller@e00000 Théo Lebrun
2024-01-23 18:46 ` [PATCH v3 12/17] MIPS: mobileye: eyeq5: remove reg-io-width property from OLB syscon Théo Lebrun
2024-01-24  8:33   ` Sergei Shtylyov
2024-01-24 16:56     ` Théo Lebrun
2024-01-23 18:46 ` [PATCH v3 13/17] MIPS: mobileye: eyeq5: use OLB clocks controller Théo Lebrun
2024-01-23 18:46 ` [PATCH v3 14/17] MIPS: mobileye: eyeq5: add OLB reset controller node Théo Lebrun
2024-01-23 18:47 ` [PATCH v3 15/17] MIPS: mobileye: eyeq5: add reset properties to uarts Théo Lebrun
2024-01-23 18:47 ` [PATCH v3 16/17] MIPS: mobileye: eyeq5: add pinctrl nodes & pinmux function nodes Théo Lebrun
2024-01-23 18:47 ` [PATCH v3 17/17] MIPS: mobileye: eyeq5: add pinctrl properties to UART nodes Théo Lebrun
2024-01-24  6:43 ` [PATCH v3 00/17] Add support for Mobileye EyeQ5 system controller Krzysztof Kozlowski
2024-01-24 16:44   ` Théo Lebrun

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=CYNVD4U0M5OS.LQ2MAKOL0LAP@bootlin.com \
    --to=theo.lebrun@bootlin.com \
    --cc=afd@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=rafal@milecki.pl \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tawfik.bayouk@mobileye.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=vladimir.kondratiev@mobileye.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).