Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: Sebastian Reichel <sebastian.reichel@collabora.com>,
	Heiko Stuebner <heiko@sntech.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>,
	Vinod Koul <vkoul@kernel.org>,
	Kishon Vijay Abraham I <kishon@kernel.org>,
	linux-ide@vger.kernel.org, linux-phy@lists.infradead.org,
	linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel@collabora.com
Subject: Re: [PATCH v3 2/5] dt-bindings: ata: dwc-ahci: add Rockchip RK3588
Date: Tue, 13 Jun 2023 08:55:13 +0200	[thread overview]
Message-ID: <399ac8fd-b5b1-50ae-c1bd-88951679cf83@linaro.org> (raw)
In-Reply-To: <20230612085200.5okxcipiw5sofo62@mobilestation>

On 12/06/2023 10:52, Serge Semin wrote:
> On Mon, Jun 12, 2023 at 10:39:57AM +0200, Krzysztof Kozlowski wrote:
>> On 12/06/2023 10:35, Serge Semin wrote:
>>> On Mon, Jun 12, 2023 at 10:24:06AM +0200, Krzysztof Kozlowski wrote:
>>>> On 08/06/2023 18:22, Sebastian Reichel wrote:
>>>>> This adds Rockchip RK3588 AHCI binding. In order to narrow down the
>>>>> allowed clocks without bloating the generic binding, the description
>>>>> of Rockchip's AHCI controllers has been moved to its own file.
>>>>>
>>>>> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
>>>>> ---
>>>>
>>>> ...
>>>>
>>>>> +
>>>>> +properties:
>>>>> +  compatible:
>>>>> +    items:
>>>>> +      - enum:
>>>>> +          - rockchip,rk3568-dwc-ahci
>>>>> +          - rockchip,rk3588-dwc-ahci
>>>>> +      - const: snps,dwc-ahci
>>>>> +
>>>>> +  ports-implemented:
>>>>> +    const: 1
>>>>> +
>>>>> +patternProperties:
>>>>> +  "^sata-port@[0-9a-e]$":
>>>>> +    $ref: /schemas/ata/snps,dwc-ahci-common.yaml#/$defs/dwc-ahci-port
>>>>> +
>>>>> +    unevaluatedProperties: false
>>>>
>>>
>>>> You should be able to skip this patternProperties entirely, because it
>>>> comes from dwc-ahci-common -> ahci-common schema. Did you try the patch
>>>> without it?
>>>
> 
>>> Please see my message about this. The "sata-port@[0-9a-e]$" sub-node
>>> bindings could be updated with the "reg" property constraint which,
>>> based on the "ports-implemented" property value, most likely is
>>> supposed to be always set to const: 1.
>>
>> Then anyway the pattern is wrong as it should be @1 always.
> 
> * I miscalculated a bit, it should have been zero but in general
> the pattern-property is indeed redundant.
> 
> As a conclusion the change should look like this:
> 
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - rockchip,rk3568-dwc-ahci
> +          - rockchip,rk3588-dwc-ahci
> +      - const: snps,dwc-ahci
> +
> +  ports-implemented:
> +    const: 1
> +
> +  "sata-port@0":
> +    $ref: /schemas/ata/snps,dwc-ahci-common.yaml#/$defs/dwc-ahci-port
> +
> +    properties:
> +      reg:
> +        const: 0
> +
> +    unevaluatedProperties: false
> +
> + ...
> 
> Right?

Code is correct but as I said - probably meaningless. All other ports
are also accepted via referenced schema. You would need to disallow
other ports or switch to additionalProperties: false in top-level.

Best regards,
Krzysztof


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2023-06-13  6:55 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08 16:22 [PATCH v3 0/5] Add RK3588 SATA support Sebastian Reichel
2023-06-08 16:22 ` [PATCH v3 1/5] dt-bindings: ata: dwc-ahci: add PHY clocks Sebastian Reichel
2023-06-11 20:07   ` Serge Semin
2023-06-12  8:18   ` Krzysztof Kozlowski
2023-06-12  8:20     ` Krzysztof Kozlowski
2023-06-08 16:22 ` [PATCH v3 2/5] dt-bindings: ata: dwc-ahci: add Rockchip RK3588 Sebastian Reichel
2023-06-11 20:45   ` Serge Semin
2023-06-12  8:24   ` Krzysztof Kozlowski
2023-06-12  8:35     ` Serge Semin
2023-06-12  8:39       ` Krzysztof Kozlowski
2023-06-12  8:52         ` Serge Semin
2023-06-13  6:55           ` Krzysztof Kozlowski [this message]
2023-06-08 16:22 ` [PATCH v3 3/5] dt-bindings: phy: rockchip: rk3588 has two reset lines Sebastian Reichel
2023-06-12  8:24   ` Krzysztof Kozlowski
2023-06-08 16:22 ` [PATCH v3 4/5] arm64: dts: rockchip: rk3588: add combo PHYs Sebastian Reichel
2023-06-08 16:22 ` [PATCH v3 5/5] arm64: dts: rockchip: rk3588: add SATA support Sebastian Reichel

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=399ac8fd-b5b1-50ae-c1bd-88951679cf83@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=devicetree@vger.kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=heiko@sntech.de \
    --cc=kernel@collabora.com \
    --cc=kishon@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=vkoul@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