linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/8] dt-bindings: soc: socionext: Add UniPhier SoC-glue logic
Date: Thu, 1 Dec 2022 17:29:58 +0900	[thread overview]
Message-ID: <411af198-d4ef-52a7-b3fd-15e9c35021b4@socionext.com> (raw)
In-Reply-To: <24add13e-5339-cc79-525a-098c2d61e8c1@linaro.org>

On 2022/12/01 0:27, Krzysztof Kozlowski wrote:
> On 30/11/2022 09:59, Kunihiko Hayashi wrote:
>> Hi Krzysztof,
>>
>> On 2022/11/29 23:43, Krzysztof Kozlowski wrote:
>>> On 29/11/2022 11:35, Kunihiko Hayashi wrote:
>>>> Add devicetree binding schema for the SoC-glue logic implemented on
>>>> Socionext Uniphier SoCs.
>>>>
>>>> This SoC-glue logic is a set of miscellaneous function registers
>>>> handling signals for specific devices outside system components,
>>>> and also has multiple functions such as I/O pinmux, usb-phy, debug,
>>>> clock-mux for a specific SoC, and so on.
>>>>
>>>> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
>>>> ---
>>>>    .../socionext,uniphier-soc-glue.yaml          | 94 +++++++++++++++++++
>>>>    1 file changed, 94 insertions(+)
>>>>    create mode 100644
>>>> Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-soc-glue.yaml
>>>>
>>>> diff --git
>>>> a/Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-soc-glue.yaml
>>>> b/Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-soc-glue.yaml
>>>> new file mode 100644
>>>> index 000000000000..3f571e3e1339
>>>> --- /dev/null
>>>> +++
>>>> b/Documentation/devicetree/bindings/soc/socionext/socionext,uniphier-soc-glue.yaml
>>>> @@ -0,0 +1,94 @@
>>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>>> +%YAML 1.2
>>>> +---
>>>> +$id:
>>>> http://devicetree.org/schemas/soc/socionext/socionext,uniphier-soc-glue.yaml#
>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>> +
>>>> +title: Socionext UniPhier SoC-glue logic
>>>> +
>>>> +maintainers:
>>>> +  - Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
>>>> +
>>>> +description: |+
>>>> +  SoC-glue logic implemented on Socionext UniPhier SoCs is a collection
>>>> of
>>>> +  miscellaneous function registers handling signals outside system
>>>> components.
>>>> +
>>>> +properties:
>>>> +  compatible:
>>>> +    items:
>>>> +      - enum:
>>>> +          - socionext,uniphier-ld4-soc-glue
>>>> +          - socionext,uniphier-pro4-soc-glue
>>>> +          - socionext,uniphier-pro5-soc-glue
>>>> +          - socionext,uniphier-pxs2-soc-glue
>>>> +          - socionext,uniphier-ld6b-soc-glue
>>>> +          - socionext,uniphier-sld8-soc-glue
>>>> +          - socionext,uniphier-ld11-soc-glue
>>>> +          - socionext,uniphier-ld20-soc-glue
>>>> +          - socionext,uniphier-pxs3-soc-glue
>>>> +          - socionext,uniphier-nx1-soc-glue
>>>> +          - socionext,uniphier-soc-glue
>>>
>>> This one looks generic - why having it next to specific ones?
>>
>> SoC-glue has the same register set, but different implementations
>> for each SoC.
> 
> Sure, but you did not model it as a compatible fallback, but like one of
> variants. It is not tied to specific SoC, thus too generic.

I understand. It should be placed in parallel with enum.

item:
   - enum:
       - ...
       - ...
   - const: socionext,uniphier-soc-glue

>> I thought of defining the same register set as a common specs,
>> but each compatibles are sufficient. I'll remove it.

So currently drop it.

>>
>>> Same question for your previous patch - socionext,uniphier-sysctrl.
>>>
>>> And similarly to previous patch, do you expect child nodes everywhere?
>>
>> In case of this SoC-glue logic, all SoCs has pinctrl, however,
>> only SoCs with USB2 host has usb-controller (phy-hub).
>> And only legacy SoCs implement clock-controller (clk-mux) here.
>>
>> Should child nodes that exist only in a specific "compatible" be defined
>> conditionally?
> 
> No, rather define them in top level but disallow for specific compatibles:
> 
> allOf:
>   - if:
>    ....
>     then:
>       patternProperties:
>         ...: false
> 
> Assuming that this does not over-complicate schema.

OK. Some properties are applied for a few compatibles, so I think it is
available to use "else:".

allOf:
   - if:
       ...
     else:
       patternProperties:
         ...: false

Thank you,

---
Best Regards
Kunihiko Hayashi

  reply	other threads:[~2022-12-01  8:30 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 10:35 [PATCH 0/8] dt-bidnings: soc: Introduce UniPhier miscelaneous register blocks Kunihiko Hayashi
2022-11-29 10:35 ` [PATCH 1/8] dt-bindings: soc: socionext: Add UniPhier system controller Kunihiko Hayashi
2022-11-29 13:32   ` Rob Herring
2022-11-29 14:41   ` Krzysztof Kozlowski
2022-11-30  8:59     ` Kunihiko Hayashi
2022-11-30 15:24       ` Krzysztof Kozlowski
2022-12-01  8:29         ` Kunihiko Hayashi
2022-11-29 10:35 ` [PATCH 2/8] dt-bindings: soc: socionext: Add UniPhier SoC-glue logic Kunihiko Hayashi
2022-11-29 14:43   ` Krzysztof Kozlowski
2022-11-30  8:59     ` Kunihiko Hayashi
2022-11-30 15:27       ` Krzysztof Kozlowski
2022-12-01  8:29         ` Kunihiko Hayashi [this message]
2022-11-29 10:35 ` [PATCH 3/8] dt-bindings: soc: socionext: Add UniPhier peripheral block Kunihiko Hayashi
2022-11-29 13:32   ` Rob Herring
2022-11-29 14:46   ` Krzysztof Kozlowski
2022-11-30  9:00     ` Kunihiko Hayashi
2022-11-29 10:35 ` [PATCH 4/8] dt-bindings: soc: socionext: Add UniPhier media I/O block Kunihiko Hayashi
2022-11-29 13:32   ` Rob Herring
2022-11-29 10:35 ` [PATCH 5/8] dt-bindings: soc: socionext: Add UniPhier SD interface block Kunihiko Hayashi
2022-11-29 10:35 ` [PATCH 6/8] dt-bindings: soc: socionext: Add UniPhier ADAMV block Kunihiko Hayashi
2022-11-29 13:32   ` Rob Herring
2022-11-29 10:35 ` [PATCH 7/8] dt-bindings: soc: socionext: Add UniPhier DWC3 USB glue layer Kunihiko Hayashi
2022-11-29 13:32   ` Rob Herring
2022-11-29 14:52   ` Krzysztof Kozlowski
2022-11-30  9:00     ` Kunihiko Hayashi
2022-11-30 15:32       ` Krzysztof Kozlowski
2022-12-01  8:30         ` Kunihiko Hayashi
2022-11-29 10:35 ` [PATCH 8/8] dt-bindings: soc: socionext: Add UniPhier AHCI " Kunihiko Hayashi
2022-11-29 13:32   ` Rob Herring
2022-12-01  9:30   ` Kunihiko Hayashi
2022-12-02 12:08     ` Krzysztof Kozlowski
2022-12-02 12:14       ` Kunihiko Hayashi

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=411af198-d4ef-52a7-b3fd-15e9c35021b4@socionext.com \
    --to=hayashi.kunihiko@socionext.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@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).