All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>, Nishanth Menon <nm@ti.com>,
	Roger Quadros <rogerq@ti.com>, Lee Jones <lee.jones@linaro.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	devicetree@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	PCI <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/7] dt-bindings: mfd: ti,j721e-system-controller.yaml: Document "syscon"
Date: Thu, 12 Nov 2020 10:46:21 -0600	[thread overview]
Message-ID: <CAL_JsqKiUcO76bo1GoepWM1TusJWoty_BRy2hFSgtEVMqtrvvQ@mail.gmail.com> (raw)
In-Reply-To: <f6d1b886-5c78-842c-c33c-16b5b9325130@ti.com>

On Wed, Nov 11, 2020 at 11:25 PM Kishon Vijay Abraham I <kishon@ti.com> wrote:
>
> Hi Rob,
>
> On 12/11/20 2:58 am, Rob Herring wrote:
> > On Mon, Nov 09, 2020 at 10:34:03PM +0530, Kishon Vijay Abraham I wrote:
> >> Add binding documentation for "syscon" which should be a subnode of
> >> the system controller (scm-conf).
> >>
> >> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> >> ---
> >>  .../mfd/ti,j721e-system-controller.yaml       | 40 +++++++++++++++++++
> >>  1 file changed, 40 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml
> >> index 19fcf59fd2fe..0b115b707ab2 100644
> >> --- a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml
> >> +++ b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml
> >> @@ -50,6 +50,38 @@ patternProperties:
> >>        specified in
> >>        Documentation/devicetree/bindings/mux/reg-mux.txt
> >>
> >> +  "^syscon@[0-9a-f]+$":
> >> +    type: object
> >> +    description: |
> >
> > Don't need '|' if there's no formatting.
>
> Okay, will fix this.
> >
> >> +      This is the system controller configuration required to configure PCIe
> >> +      mode, lane width and speed.
> >> +
> >> +    properties:
> >> +      compatible:
> >> +        items:
> >> +          - enum:
> >> +              - ti,j721e-system-controller
> >> +          - const: syscon
> >> +          - const: simple-mfd
> >
> > Humm, then what are this node's sub-nodes? And the same compatible as
> > the parent?
> >
>
> This node doesn't have sub-nodes.
>
> So one is the parent syscon node which has the entire system control
> region and then sub-nodes for each of the modules. In this case the PCIe
> in system control has only one 4 byte register that has to be configured.
>
> Both the parent node and sub-node are syscon, so given the same
> compatible for both.

'syscon' is just a hint. It doesn't define what any h/w is. IMO, we
never should have added it.

A compatible defines what the programming interface is for the node.
This one should only ever appear more than once if you have multiple
instances of the same block. So different registers, different
compatible. What you have here is just completely broken.

I don't think you even need a child node here. Just have PCIe node
point to the parent with an offset arg.

Rob

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Nishanth Menon <nm@ti.com>,
	devicetree@vger.kernel.org, PCI <linux-pci@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Tero Kristo <t-kristo@ti.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Lee Jones <lee.jones@linaro.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Roger Quadros <rogerq@ti.com>
Subject: Re: [PATCH v2 1/7] dt-bindings: mfd: ti, j721e-system-controller.yaml: Document "syscon"
Date: Thu, 12 Nov 2020 10:46:21 -0600	[thread overview]
Message-ID: <CAL_JsqKiUcO76bo1GoepWM1TusJWoty_BRy2hFSgtEVMqtrvvQ@mail.gmail.com> (raw)
In-Reply-To: <f6d1b886-5c78-842c-c33c-16b5b9325130@ti.com>

On Wed, Nov 11, 2020 at 11:25 PM Kishon Vijay Abraham I <kishon@ti.com> wrote:
>
> Hi Rob,
>
> On 12/11/20 2:58 am, Rob Herring wrote:
> > On Mon, Nov 09, 2020 at 10:34:03PM +0530, Kishon Vijay Abraham I wrote:
> >> Add binding documentation for "syscon" which should be a subnode of
> >> the system controller (scm-conf).
> >>
> >> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> >> ---
> >>  .../mfd/ti,j721e-system-controller.yaml       | 40 +++++++++++++++++++
> >>  1 file changed, 40 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml
> >> index 19fcf59fd2fe..0b115b707ab2 100644
> >> --- a/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml
> >> +++ b/Documentation/devicetree/bindings/mfd/ti,j721e-system-controller.yaml
> >> @@ -50,6 +50,38 @@ patternProperties:
> >>        specified in
> >>        Documentation/devicetree/bindings/mux/reg-mux.txt
> >>
> >> +  "^syscon@[0-9a-f]+$":
> >> +    type: object
> >> +    description: |
> >
> > Don't need '|' if there's no formatting.
>
> Okay, will fix this.
> >
> >> +      This is the system controller configuration required to configure PCIe
> >> +      mode, lane width and speed.
> >> +
> >> +    properties:
> >> +      compatible:
> >> +        items:
> >> +          - enum:
> >> +              - ti,j721e-system-controller
> >> +          - const: syscon
> >> +          - const: simple-mfd
> >
> > Humm, then what are this node's sub-nodes? And the same compatible as
> > the parent?
> >
>
> This node doesn't have sub-nodes.
>
> So one is the parent syscon node which has the entire system control
> region and then sub-nodes for each of the modules. In this case the PCIe
> in system control has only one 4 byte register that has to be configured.
>
> Both the parent node and sub-node are syscon, so given the same
> compatible for both.

'syscon' is just a hint. It doesn't define what any h/w is. IMO, we
never should have added it.

A compatible defines what the programming interface is for the node.
This one should only ever appear more than once if you have multiple
instances of the same block. So different registers, different
compatible. What you have here is just completely broken.

I don't think you even need a child node here. Just have PCIe node
point to the parent with an offset arg.

Rob

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

  reply	other threads:[~2020-11-12 16:46 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-09 17:04 [PATCH v2 0/7] J7200: Add PCIe DT nodes to Enable PCIe Kishon Vijay Abraham I
2020-11-09 17:04 ` Kishon Vijay Abraham I
2020-11-09 17:04 ` [PATCH v2 1/7] dt-bindings: mfd: ti,j721e-system-controller.yaml: Document "syscon" Kishon Vijay Abraham I
2020-11-09 17:04   ` [PATCH v2 1/7] dt-bindings: mfd: ti, j721e-system-controller.yaml: " Kishon Vijay Abraham I
2020-11-11 21:28   ` [PATCH v2 1/7] dt-bindings: mfd: ti,j721e-system-controller.yaml: " Rob Herring
2020-11-11 21:28     ` Rob Herring
2020-11-12  5:25     ` Kishon Vijay Abraham I
2020-11-12  5:25       ` [PATCH v2 1/7] dt-bindings: mfd: ti, j721e-system-controller.yaml: " Kishon Vijay Abraham I
2020-11-12 16:46       ` Rob Herring [this message]
2020-11-12 16:46         ` Rob Herring
2020-11-09 17:04 ` [PATCH v2 2/7] dt-bindings: PCI: Add host mode dt-bindings for TI's J7200 SoC Kishon Vijay Abraham I
2020-11-09 17:04   ` Kishon Vijay Abraham I
2020-11-09 17:04 ` [PATCH v2 3/7] dt-bindings: PCI: Add EP " Kishon Vijay Abraham I
2020-11-09 17:04   ` Kishon Vijay Abraham I
2020-11-09 17:04 ` [PATCH v2 4/7] arm64: dts: ti: k3-j7200-main: Add DT for WIZ and SERDES Kishon Vijay Abraham I
2020-11-09 17:04   ` Kishon Vijay Abraham I
2020-11-09 17:04 ` [PATCH v2 5/7] arm64: dts: ti: k3-j7200-main: Add PCIe device tree node Kishon Vijay Abraham I
2020-11-09 17:04   ` Kishon Vijay Abraham I
2020-11-12 16:05   ` Vignesh Raghavendra
2020-11-12 16:05     ` Vignesh Raghavendra
2020-11-09 17:04 ` [PATCH v2 6/7] arm64: dts: ti: k3-j7200-common-proc-board: Enable SERDES0 Kishon Vijay Abraham I
2020-11-09 17:04   ` Kishon Vijay Abraham I
2020-11-12 15:58   ` Vignesh Raghavendra
2020-11-12 15:58     ` Vignesh Raghavendra
2020-11-09 17:04 ` [PATCH v2 7/7] arm64: dts: ti: k3-j7200-common-proc-board: Enable PCIe Kishon Vijay Abraham I
2020-11-09 17:04   ` Kishon Vijay Abraham I
2020-11-12 15:56   ` Vignesh Raghavendra
2020-11-12 15:56     ` Vignesh Raghavendra

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_JsqKiUcO76bo1GoepWM1TusJWoty_BRy2hFSgtEVMqtrvvQ@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=kishon@ti.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=rogerq@ti.com \
    --cc=t-kristo@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.