linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Dong Aisheng <dongas86@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Dong Aisheng <aisheng.dong@nxp.com>,
	devicetree <devicetree@vger.kernel.org>,
	 "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	 Sascha Hauer <kernel@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>
Subject: Re: [PATCH 5/7] dt-bindings: soc: imx: add missing anatop binding
Date: Tue, 3 Aug 2021 12:04:44 +0800	[thread overview]
Message-ID: <CAA+hA=RQdpjMCivgBq2fBHD2NFqK5_8pSDgqmxGJohRiGac2wQ@mail.gmail.com> (raw)
In-Reply-To: <CAL_Jsq+4247uCgu5pDAEqO9Nn=9deeJBkiOrG3fTwdqPO+6J2w@mail.gmail.com>

On Mon, Aug 2, 2021 at 11:02 PM Rob Herring <robh@kernel.org> wrote:
>
> On Mon, Aug 2, 2021 at 5:38 AM Dong Aisheng <dongas86@gmail.com> wrote:
> >
> > Hi Rob,
> >
> > On Thu, Jul 22, 2021 at 10:49 AM Rob Herring <robh@kernel.org> wrote:
> > >
> > > On Thu, Jul 15, 2021 at 04:25:34PM +0800, Dong Aisheng wrote:
> > > > Anatop is a system combo module which supports various analog functions
> > > > like PLL, Regulators, LDOs, Sensors and etc.
> > > > This binding doc is generated based on the exist usage in dts
> > > > in order to fix dt schema check failures.
> > > >
> > > > Cc: Rob Herring <robh+dt@kernel.org>
> > > > Cc: Shawn Guo <shawnguo@kernel.org>
> > > > Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
> > > > ---
> > > >  .../bindings/soc/imx/fsl,anatop.yaml          | 68 +++++++++++++++++++
> > > >  1 file changed, 68 insertions(+)
> > > >  create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,anatop.yaml
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,anatop.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,anatop.yaml
> > > > new file mode 100644
> > > > index 000000000000..f379d960f527
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/soc/imx/fsl,anatop.yaml
> > > > @@ -0,0 +1,68 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: http://devicetree.org/schemas/soc/imx/fsl,anatop.yaml#
> > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > +
> > > > +title: Freescale Anatop binding
> > > > +
> > > > +maintainers:
> > > > +  - Dong Aisheng <aisheng.dong@nxp.com>
> > > > +
> > > > +properties:
> > > > +  compatible:
> > > > +    oneOf:
> > > > +      - items:
> > > > +          - const: fsl,imx6q-anatop
> > > > +          - const: syscon
> > > > +          - const: simple-mfd
> > > > +      - items:
> > > > +          - enum:
> > > > +              - fsl,imx6sl-anatop
> > > > +              - fsl,imx6sll-anatop
> > > > +              - fsl,imx6sx-anatop
> > > > +              - fsl,imx6ul-anatop
> > > > +              - fsl,imx7d-anatop
> > > > +          - const: fsl,imx6q-anatop
> > > > +          - const: syscon
> > > > +          - const: simple-mfd
> > > > +      - items:
> > > > +          - enum:
> > > > +              - fsl,imx8mq-anatop
> > > > +              - fsl,imx8mm-anatop
> > > > +              - fsl,vf610-anatop
> > > > +          - const: syscon
> > > > +      - items:
> > > > +          - enum:
> > > > +              - fsl,imx8mn-anatop
> > > > +              - fsl,imx8mp-anatop
> > > > +          - const: fsl,imx8mm-anatop
> > > > +          - const: syscon
> > > > +
> > > > +  reg:
> > > > +    maxItems: 1
> > > > +
> > > > +  interrupts:
> > > > +    items:
> > > > +      - description: Temperature Sensor
> > > > +      - description: PMU interrupt 1
> > > > +      - description: PMU interrupt 2
> > > > +    minItems: 1
> > > > +    maxItems: 3
> > >
> > > Don't need maxItems.
> > >
> >
> > Got it
> >
> > > > +
> > > > +required:
> > > > +  - compatible
> > > > +  - reg
> > > > +
> > > > +additionalProperties: true
> > >
> > > This should be the case only for common schemas used by other schemas.
> > >
> >
> > Like iomuxc-gpr in patch 6, the problem is that for those nodes with
> > simple-mfd backwards compatibility,
> > there could be possibly some random subnodes since there're generic
> > combo registers.
> > That's why i use additionalProperties true to cover it.
> > Do you think it's ok?
>
> No, because all that should be reviewed rather than random subnodes.
> Otherwise, how do we validate them?

anatop and iomuxc-gpr are not simple mfd devices as they're misc
registers and could contain
various sub misc functions. And those sub functions usually have a
separate dt binding doc which
already covers them and does validation.
The binding here is addressing validation itself. It does not limit
the possible various sub function nodes
which already have a binding doc. Just like a bus node.

If we define them now, it means we may need to keep updating schema when new
user node appear as current dts may not use all possible sub functions.

However, i do agree that defining them all (and may need add more in
the future) helps validation.
But i'm not sure if it's worthy to do it for such cases for a 'bus' node?

Could you help clarify a bit more?

Regards
Aisheng

>
> Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-08-03  4:09 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15  8:25 [PATCH 0/7] dt-bindings: imx8mp: fix dt schema check errors Dong Aisheng
2021-07-15  8:25 ` [PATCH 1/7] dt-bindings: can: flexcan: fix imx8mp compatbile Dong Aisheng
2021-07-15  9:12   ` Marc Kleine-Budde
2021-07-15 10:45     ` Dong Aisheng
2021-07-15 11:00       ` Joakim Zhang
2021-07-15 11:07         ` Marc Kleine-Budde
2021-07-15 11:36           ` Dong Aisheng
2021-07-15 11:44             ` Joakim Zhang
2021-07-15 11:49               ` Dong Aisheng
2021-07-15 12:10                 ` Marc Kleine-Budde
2021-07-15 12:07             ` Marc Kleine-Budde
2021-07-16  2:04               ` Joakim Zhang
2021-07-16  9:06                 ` Marc Kleine-Budde
2021-07-15  8:25 ` [PATCH 2/7] dt-bindings: spi: flexspi: convert to json schema Dong Aisheng
2021-07-15  9:25   ` [EXT] " Kuldeep Singh
2021-07-15 10:43     ` Dong Aisheng
2021-07-15  8:25 ` [PATCH 3/7] dt-bindings: net: dsa: sja1105: fix wrong indentation Dong Aisheng
2021-07-15 10:04   ` Vladimir Oltean
2021-07-15 10:43     ` Dong Aisheng
2021-07-15  8:25 ` [PATCH 4/7] dt-bindings: phy: imx8mq-usb-phy: convert to json schema Dong Aisheng
2021-07-22  2:47   ` Rob Herring
2021-08-06 11:30   ` Vinod Koul
2021-07-15  8:25 ` [PATCH 5/7] dt-bindings: soc: imx: add missing anatop binding Dong Aisheng
2021-07-22  2:49   ` Rob Herring
2021-08-02 11:36     ` Dong Aisheng
2021-08-02 15:01       ` Rob Herring
2021-08-03  4:04         ` Dong Aisheng [this message]
2021-07-15  8:25 ` [PATCH 6/7] dt-bindings: soc: imx: add missing iomuxc gpr binding Dong Aisheng
2021-07-15 13:54   ` Rob Herring
2021-07-16  3:28     ` Dong Aisheng
2021-07-28 17:30       ` Rob Herring
2021-08-02 11:36         ` Dong Aisheng
2021-07-15  8:25 ` [PATCH 7/7] arm64: dts: imx8mp: fix fspi dt schema check error Dong Aisheng

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='CAA+hA=RQdpjMCivgBq2fBHD2NFqK5_8pSDgqmxGJohRiGac2wQ@mail.gmail.com' \
    --to=dongas86@gmail.com \
    --cc=aisheng.dong@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.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).