From: Damon Ding <damon.ding@rock-chips.com>
To: sashiko-reviews@lists.linux.dev
Cc: devicetree@vger.kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v5 01/10] dt-bindings: display: rockchip: analogix-dp: Fix hclk as third clock for RK3588
Date: Thu, 14 May 2026 15:38:08 +0800 [thread overview]
Message-ID: <58e9a6d9-b77a-45aa-8d39-294399c85cc0@rock-chips.com> (raw)
In-Reply-To: <20260514025123.D758DC19425@smtp.kernel.org>
On 5/14/2026 10:51 AM, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The device tree schema fails to correctly enforce the required number of clocks in the conditional blocks by omitting `minItems` and `maxItems` constraints.
> --
>
> commit 1eeef10904ab6c1e09008c1f85fab2353dd23f79
> Author: Damon Ding <damon.ding@rock-chips.com>
>
> dt-bindings: display: rockchip: analogix-dp: Fix hclk as third clock for RK3588
>
> This commit enforces a third clock name on a per-compatible basis for
> the analogix-dp driver. It removes the implicit clock enablement from
> the GRF phandle and explicitly defines the clocks required for each SoC.
>
>> diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip,analogix-dp.yaml b/Documentation/devicetree/bindings/display/rockchip/rockchip,analogix-dp.yaml
>> index d99b23b88cc59..8001c1facf986 100644
>> --- a/Documentation/devicetree/bindings/display/rockchip/rockchip,analogix-dp.yaml
>> +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip,analogix-dp.yaml
>
> [ ... ]
>
>> @@ -60,6 +57,33 @@ required:
>> allOf:
>> - $ref: /schemas/display/bridge/analogix,dp.yaml#
>>
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>> + - rockchip,rk3288-dp
>> + then:
>> + properties:
>> + clock-names:
>> + items:
>> + - const: dp
>> + - const: pclk
>
> Should this block include maxItems: 2? The top-level schema defines
> maxItems: 3, which might allow a device tree with an extra unvalidated
> third clock string to silently pass validation here.
>
>> +
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + enum:
>> + - rockchip,rk3399-edp
>> + then:
>> + properties:
>> + clock-names:
>> + items:
>> + - const: dp
>> + - const: pclk
>> + - const: grf
>
> Does this block need minItems: 3 to ensure the grf clock is actually
> enforced? Because the top-level schema allows minItems: 2, a device tree
> omitting the third clock might still pass validation.
>
>> +
>> - if:
>> properties:
>> compatible:
>> @@ -68,6 +92,11 @@ allOf:
>> - rockchip,rk3588-edp
>> then:
>> properties:
>> + clock-names:
>> + items:
>> + - const: dp
>> + - const: pclk
>> + - const: hclk
>
> Similarly, does this block also require minItems: 3? Without it, the
> hclk requirement might not be strictly enforced if the schema validation
> falls back to the top-level minItems: 2 allowance.
>
>> resets:
>> minItems: 2
>> reset-names:
>
After adding the maxItems and minItems as AI suggested, there are some
warnings via:
make dt_binding_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/display/rockchip/rockchip,analogix-dp.yaml
/home/ding/drm-misc/Documentation/devicetree/bindings/display/rockchip/rockchip,analogix-dp.yaml:
allOf:1:then:properties:clock-names: {'maxItems': 2, 'items': [{'const':
'dp'}, {'const': 'pclk'}]} should not be valid under {'required':
['maxItems']}
hint: "maxItems" is not needed with an "items" list
from schema $id: http://devicetree.org/meta-schemas/items.yaml#
/home/ding/drm-misc/Documentation/devicetree/bindings/display/rockchip/rockchip,analogix-dp.yaml:
allOf:2:then:properties:clock-names: 'oneOf' conditional failed, one
must be fixed:
[{'const': 'dp'}, {'const': 'pclk'}, {'const': 'grf'}] is too long
[{'const': 'dp'}, {'const': 'pclk'}, {'const': 'grf'}] is too short
False schema does not allow 3
1 was expected
3 is greater than the maximum of 2
hint: "minItems" is only needed if less than the "items" list
length
from schema $id: http://devicetree.org/meta-schemas/items.yaml#
/home/ding/drm-misc/Documentation/devicetree/bindings/display/rockchip/rockchip,analogix-dp.yaml:
allOf:3:then:properties:clock-names: 'oneOf' conditional failed, one
must be fixed:
[{'const': 'dp'}, {'const': 'pclk'}, {'const': 'hclk'}] is too long
[{'const': 'dp'}, {'const': 'pclk'}, {'const': 'hclk'}] is too
short
False schema does not allow 3
1 was expected
3 is greater than the maximum of 2
hint: "minItems" is only needed if less than the "items" list
length
from schema $id: http://devicetree.org/meta-schemas/items.yaml#
LINT ./Documentation/devicetree/bindings
DTEX
Documentation/devicetree/bindings/display/rockchip/rockchip,analogix-dp.example.dts
DTC [C]
Documentation/devicetree/bindings/display/rockchip/rockchip,analogix-dp.example.dtb
Best regards,
Damon
next prev parent reply other threads:[~2026-05-14 8:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 7:44 [PATCH v5 00/10] Add eDP support for RK3576 Damon Ding
2026-05-13 7:44 ` [PATCH v5 01/10] dt-bindings: display: rockchip: analogix-dp: Fix hclk as third clock for RK3588 Damon Ding
2026-05-14 2:51 ` sashiko-bot
2026-05-14 7:38 ` Damon Ding [this message]
2026-05-14 10:03 ` Krzysztof Kozlowski
2026-05-13 7:44 ` [PATCH v5 02/10] dt-bindings: display: rockchip: analogix-dp: Add per-clock descriptions Damon Ding
2026-05-13 7:44 ` [PATCH v5 03/10] arm64: dts: rockchip: Add missing hclk for RK3588 eDP0 Damon Ding
2026-05-13 7:44 ` [PATCH v5 04/10] arm64: dts: rockchip: Add missing hclk for RK3588 eDP1 Damon Ding
2026-05-13 7:44 ` [PATCH v5 05/10] drm/rockchip: analogix_dp: Enable hclk for RK3588 Damon Ding
2026-05-13 7:44 ` [PATCH v5 06/10] dt-bindings: display: rockchip: analogix-dp: Add support for RK3576 Damon Ding
2026-05-13 7:44 ` [PATCH v5 07/10] arm64: dts: rockchip: Add eDP node " Damon Ding
2026-05-13 7:44 ` [PATCH v5 08/10] drm/bridge: analogix_dp: Rename and simplify is_rockchip() Damon Ding
2026-05-13 7:44 ` [PATCH v5 09/10] drm/bridge: analogix_dp: Add support for RK3576 Damon Ding
2026-05-13 7:44 ` [PATCH v5 10/10] drm/rockchip: " Damon Ding
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=58e9a6d9-b77a-45aa-8d39-294399c85cc0@rock-chips.com \
--to=damon.ding@rock-chips.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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