From: Stefan Agner <stefan@agner.ch>
To: Rob Herring <robh@kernel.org>
Cc: Sanchayan Maity <maitysanchayan@gmail.com>,
Arnd Bergmann <arnd@arndb.de>, Shawn Guo <shawnguo@kernel.org>,
Lee Jones <lee.jones@linaro.org>,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/5] vf610-soc: Add Vybrid SoC device tree binding documentation
Date: Mon, 09 May 2016 18:13:05 -0700 [thread overview]
Message-ID: <cab9edb2184ec13341a1dae1de9c7ebc@agner.ch> (raw)
In-Reply-To: <CAL_JsqL7sjdONYad6sXM1KXFCjooANuN7WYg-paV9LnKnuMTnA@mail.gmail.com>
On 2016-05-09 15:58, Rob Herring wrote:
> On Mon, May 9, 2016 at 1:25 PM, Stefan Agner <stefan@agner.ch> wrote:
>> On 2016-05-09 10:14, Rob Herring wrote:
>>> On Thu, May 5, 2016 at 3:27 AM, <maitysanchayan@gmail.com> wrote:
>>>> Hello Rob,
>>>>
>>>> On 16-05-03 21:30:26, Rob Herring wrote:
>>>>> On Mon, May 02, 2016 at 12:35:04PM +0530, Sanchayan Maity wrote:
>>>>> > Add device tree binding documentation for Vybrid SoC.
>>>>> >
>>>>> > Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
>>>>> > ---
>>>>> > .../bindings/arm/freescale/fsl,vf610-soc.txt | 35 ++++++++++++++++++++++
>>>>> > 1 file changed, 35 insertions(+)
>>>>> > create mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,vf610-soc.txt
>>>>> >
>>>>> > diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,vf610-soc.txt b/Documentation/devicetree/bindings/arm/freescale/fsl,vf610-soc.txt
>>>>> > new file mode 100644
>>>>> > index 0000000..bdd95e8
>>>>> > --- /dev/null
>>>>> > +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,vf610-soc.txt
>>>>> > @@ -0,0 +1,35 @@
>>>>> > +Vybrid System-on-Chip
>>>>> > +---------------------
>>>>> > +
>>>>> > +Required properties:
>>>>> > +
>>>>> > +- #address-cells: must be 1
>>>>> > +- #size-cells: must be 1
>>>>> > +- compatible: "fsl,vf610-soc-bus", "simple-bus"
>>>>>
>>>>> If this is a bus, put the file in bindings/bus/...
>>>>
>>>> The fsl,vf610-soc-bus binding is used to bind the driver in question with
>>>> an appropriate compatible node.
>>>>
>>>> Basically being a standalone platform driver, there was need of a compatible
>>>> property to bind on. Introducing a separate device tree node for it's sake
>>>> didn't seem appropriate so the alteration to SoC node's compatible.
>>>
>>> Ah, so you are designing a node around the needs of a Linux specific
>>> driver. Don't do that. DT describes the h/w and this node is not a h/w
>>> block.
>>>
>>> Create a platform device based on a matching SOC compatible string
>>> instead and make your driver find the information it needs directly
>>> from the relevant nodes like the ROM node.
>>
>> That reads like my words a year ago:
>> https://lkml.org/lkml/2015/5/22/408
>>
>> Initially pretty much everything was hard-coded in the driver.
>>
>> Arnd then pushed to use more descriptive in the device tree.
>>
>> Of course, we should not end up making up relations which are not there
>> in hardware. We need to find the right balance.
>>
>> Here is my suggestion:
>> 1. Add "fsl,vf610-soc-bus" as compatible string to the soc node, use it
>> to bind the "soc bus driver" as a platform driver located in driver/soc/
>
> I'm not convinced this is a h/w block. This keeps coming up and I
> think this is a kernel problem, not a DT problem. Let's face it that
> there are drivers at the SOC level which don't fit into a DT node.
> They may be the exception, but they are a common exception. My
> proposal for how to deal with these cases is here[1].
Probably "fsl,vf610-soc" would be better than "fsl,vf610-soc-bus".
But the SoC is definitely a h/w block! Despite all the individual
silicon in there, I can even touch the SoC ;-)
But yeah, I understand what you are saying... We model it as a
container, and do not attribute any specific thing directly to it. But
aren't there other containers where we bind to? Is it wrong to bind a
driver to a container, if that driver implements issues concerning that
level..?
The two drivers under drivers/soc/ which implement the SoC bus API and
both use a compatible string on a container level (e.g.
arm,realview-pb11mp-soc in arch/arm/boot/dts/arm-realview-pb11mp.dts).
>
> I also think drivers/soc is a mess because it is randomly used or not.
> IMO, using it should not be at the whim of whomever does SOC support.
Are you talking about random drivers under drivers/soc/ or the ones
which implement the SoC bus API? I think that is not the same...
If SoC bus, agreed, it is a mess. Not only its adoption is sparse, the
specification is also interpreted differently across different SoC's,
which I brought up in the past:
http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/333765.html
But it exports really useful information to user space, and that has
real value in practice.
next prev parent reply other threads:[~2016-05-10 1:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-02 7:04 [PATCH v2 0/5] Implement SoC bus driver for Vybrid Sanchayan Maity
2016-05-02 7:05 ` [PATCH v2 1/5] mfd: syscon: Introduce syscon_regmap_read_from_offset Sanchayan Maity
2016-05-02 7:05 ` [PATCH v2 2/5] ARM: dts: vfxxx: Add device tree node for OCOTP Sanchayan Maity
[not found] ` <b5c1ff5a805eae3e53f07f8d0161f0af51586c00.1462171990.git.maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-02 7:31 ` Arnd Bergmann
2016-05-02 8:12 ` maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w
2016-05-02 7:05 ` [PATCH v2 3/5] ARM: dts: vfxxx: Add OCROM and phandle entries for Vybrid SoC bus driver Sanchayan Maity
[not found] ` <cover.1462171989.git.maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-02 7:05 ` [PATCH v2 4/5] soc: Add SoC bus driver for Freescale Vybrid Platform Sanchayan Maity
2016-05-02 7:05 ` [PATCH v2 5/5] vf610-soc: Add Vybrid SoC device tree binding documentation Sanchayan Maity
[not found] ` <65f3a7bd7a9faf1b390644d7c599c69683c753c4.1462171990.git.maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-05-04 2:30 ` Rob Herring
2016-05-05 8:27 ` maitysanchayan-Re5JQEeQqe8AvxtiuMwx3w
[not found] ` <20160505082758.GB18151-2b/appYahYDPUjlVagVGR1Kr0EmMEXJSn9A1Ff6Mc9Q@public.gmane.org>
2016-05-09 17:14 ` Rob Herring
2016-05-09 18:25 ` Stefan Agner
[not found] ` <4ca82be6c1d434c612868b441e9f6e1f-XLVq0VzYD2Y@public.gmane.org>
2016-05-09 22:58 ` Rob Herring
2016-05-10 1:13 ` Stefan Agner [this message]
2016-05-11 3:24 ` Rob Herring
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=cab9edb2184ec13341a1dae1de9c7ebc@agner.ch \
--to=stefan@agner.ch \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maitysanchayan@gmail.com \
--cc=robh@kernel.org \
--cc=shawnguo@kernel.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).