devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
To: Manivannan Sadhasivam <mani@kernel.org>
Cc: "Rob Herring" <robh+dt@kernel.org>,
	"Andreas Färber" <afaerber@suse.de>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-actions@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/6] dt-bindings: soc: actions: Add Actions Semi Owl socinfo binding
Date: Fri, 2 Apr 2021 22:25:55 +0300	[thread overview]
Message-ID: <20210402192555.GA2052516@BV030612LT> (raw)
In-Reply-To: <20210402180407.GA31906@thinkpad>

On Fri, Apr 02, 2021 at 11:34:07PM +0530, Manivannan Sadhasivam wrote:
> On Tue, Mar 30, 2021 at 04:48:17PM +0300, Cristian Ciocaltea wrote:
> > Add devicetree binding for the Actions Semi Owl socinfo driver.
> > 
> 
> Devicetree binding shouldn't be added for a driver instead for an IP or hw.
> 
> > Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
> > ---
> >  .../bindings/soc/actions/owl-socinfo.yaml     | 57 +++++++++++++++++++
> >  1 file changed, 57 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml b/Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml
> > new file mode 100644
> > index 000000000000..01e4a8b4f5ac
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/soc/actions/owl-socinfo.yaml
> > @@ -0,0 +1,57 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/soc/actions/owl-socinfo.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Actions Semi Owl SoC info module
> > +
> > +maintainers:
> > +  - Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
> > +
> > +description: |
> > +  Actions Semi Owl SoC info module provides access to various information
> > +  about the S500, S700 and S900 SoC variants, such as serial number or id.
> > +
> 
> S700/S900 are not yet confirmed, so please avoid them.
> 
> > +select:
> > +  properties:
> > +    compatible:
> > +      contains:
> > +        enum:
> > +          - actions,s500-soc
> > +          - actions,s700-soc
> > +          - actions,s900-soc
> > +  required:
> > +    - compatible
> > +
> > +properties:
> > +  compatible:
> > +    items:
> > +      - enum:
> > +          - actions,s500-soc
> > +          - actions,s700-soc
> > +          - actions,s900-soc
> > +      - const: simple-bus
> > +
> > +required:
> > +  - compatible
> > +
> > +additionalProperties: true
> > +
> > +examples:
> > +  - |
> > +    / {
> > +        compatible = "roseapplepi,roseapplepi", "actions,s500";
> > +        model = "Roseapple Pi";
> > +        #address-cells = <1>;
> > +        #size-cells = <1>;
> > +
> > +        soc {
> > +            compatible = "actions,s500-soc", "simple-bus";
> 
> No. This shouldn't fall under /soc. I think you should added a separate
> compatible for the reserved memory itself and add a corresponding socinfo
> driver under drivers/soc.
> 
> This way it is obvious that the information is contained in a memory region and
> a driver is used for parsing that.

I avoided on purpose to bind the driver on the reserved memory node
in order to be able to handle also the S700 and S900 SoCs, for which
we currently provide (only) the following information: machine, family,
soc_id.

I assumed the serial_number is not mandatory and we can use the driver
as it is for all SoC variants. I don't know how the serial number for
S700 and S900 could be read, but I think it is very likely they require
a different access method.

Hence my intention was to keep the driver generic, not coupled strictly
with the serial number information.

Regards,
Cristi

> Thanks,
> Mani
> 
> > +            #address-cells = <1>;
> > +            #size-cells = <1>;
> > +            ranges;
> > +        };
> > +    };
> > +
> > +...
> > -- 
> > 2.31.1
> > 

  reply	other threads:[~2021-04-02 19:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30 13:48 [PATCH v2 0/6] Add support for Actions Semi Owl socinfo Cristian Ciocaltea
2021-03-30 13:48 ` [PATCH v2 1/6] dt-bindings: reserved-memory: Add Owl SoC serial number binding Cristian Ciocaltea
2021-04-01 17:07   ` Rob Herring
2021-04-01 17:40     ` Cristian Ciocaltea
2021-04-02 18:06       ` Manivannan Sadhasivam
2021-04-02 19:44         ` Cristian Ciocaltea
2021-03-30 13:48 ` [PATCH v2 2/6] dt-bindings: soc: actions: Add Actions Semi Owl socinfo binding Cristian Ciocaltea
2021-04-01 17:08   ` Rob Herring
2021-04-01 17:57     ` Cristian Ciocaltea
2021-04-02 18:04   ` Manivannan Sadhasivam
2021-04-02 19:25     ` Cristian Ciocaltea [this message]
2021-03-30 13:48 ` [PATCH v2 3/6] soc: actions: Add Actions Semi Owl socinfo driver Cristian Ciocaltea
2021-04-02 18:16   ` Manivannan Sadhasivam
2021-04-02 19:36     ` Cristian Ciocaltea
2021-03-30 13:48 ` [PATCH v2 4/6] arm: dts: owl-s500: Add reserved-memory range for Owl SoC serial number Cristian Ciocaltea
2021-03-30 13:48 ` [PATCH v2 5/6] arm: dts: owl-s500: Add socinfo support Cristian Ciocaltea
2021-03-30 13:48 ` [PATCH v2 6/6] MAINTAINERS: Add entries for Owl reserved-memory and socinfo bindings Cristian Ciocaltea
2021-04-01  5:24 ` [PATCH v2 0/6] Add support for Actions Semi Owl socinfo Manivannan Sadhasivam
2021-04-01  9:40   ` Cristian Ciocaltea
2021-04-01 10:27     ` Manivannan Sadhasivam
2021-04-01 10:49       ` Andreas Färber
2021-04-01 10:58         ` Cristian Ciocaltea
2021-04-01 11:07           ` Manivannan Sadhasivam
2021-04-01 13:19             ` Cristian Ciocaltea

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=20210402192555.GA2052516@BV030612LT \
    --to=cristian.ciocaltea@gmail.com \
    --cc=afaerber@suse.de \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-actions@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=robh+dt@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).