Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Marek Vasut" <marek.vasut+renesas@mailbox.org>,
	linux-phy@lists.infradead.org
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
	vkoul@kernel.org, neil.armstrong@linaro.org, olteanv@gmail.com,
	wsa+renesas@sang-engineering.com
Subject: Re: [PATCH v2 1/3] dt-bindings: phy: Document Renesas Multi-Protocol PHY driver for R-Car X5H
Date: Sun, 29 Nov 2026 17:51:14 +0000	[thread overview]
Message-ID: <sashiko-outbox-239853@kernel.org> (raw)
In-Reply-To: <20261129173739.282027-1-marek.vasut+renesas@mailbox.org>

Thank you for your contribution! Sashiko AI review found 5 potential
issues to consider:
- [Medium] dt-bindings: phy: renesas,phy-type uint32-array mismatches
  4x2 tuple example
- [Medium] dt-bindings: phy: clocks and power-domains mismatch upstream
  r8a78000 MDLC/CPG
- [Low] dt-bindings: phy: missing description of specifier cells on
  #phy-cells
- [Low] dt-bindings: phy: unconstrained and undocumented ref-clock
  vendor arrays
- [Low] dt-bindings: phy: subject mentions driver and example property
  order/indent
--

commit e528bb3b019038b1410864451cd8d7e2fe68cd8c
Author: Marek Vasut <marek.vasut+renesas@mailbox.org>

dt-bindings: phy: Document Renesas Multi-Protocol PHY driver for R-Car X5H

This commit adds the Device Tree binding schema for the Renesas R-Car
Generation 5 Multi-Protocol PHY present in the R-Car X5H (R8A78000) SoC.

> diff --git a/Documentation/devicetree/bindings/phy/renesas,rcar-gen5-mpphy.yaml b/Documentation/devicetree/bindings/phy/renesas,rcar-gen5-mpphy.yaml
> new file mode 100644
> index 0000000000000..f0271eef3e2e8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/renesas,rcar-gen5-mpphy.yaml
> @@ -0,0 +1,128 @@
[ ... ]
> +  clocks:
> +    items:
> +      - description: PHY0 module STOP clock gating
> +      - description: PHY1 module STOP clock gating
> +      - description: PHY2 module STOP clock gating
> +      - description: PHY3 module STOP clock gating
> +      - description: MPPHY common part module STOP clock gating
> +
> +  clock-names:
> +    items:
> +      - const: mpphy01
> +      - const: mpphy11
> +      - const: mpphy21
> +      - const: mpphy31
> +      - const: mpphy02
> +
> +  power-domains:
> +    items:
> +      - description: PD_MPP0 power domain
> +      - description: PD_MPP1 power domain
> +      - description: PD_MPP2 power domain
> +      - description: PD_MPP3 power domain
> +
> +  power-domain-names:
> +    items:
> +      - const: mpp0
> +      - const: mpp1
> +      - const: mpp2
> +      - const: mpp3

[Severity: Medium]
Do clocks and power-domains match the upstream R8A78000 CPG and MDLC
bindings?

In Documentation/devicetree/bindings/power/renesas,r8a78000-mdlc.yaml and
arch/arm64/boot/dts/renesas/r8a78000.dtsi, module standby (STOP) gating is
controlled by the Module Controller (renesas,r8a78000-mdlc) via 2-cell
power-domains specifiers rather than CPG clocks.  Modeling the five module
STOP gates as clocks and restricting power-domains to four items (following
the downstream SCMI providers used in the example below) makes this schema
incompatible with the upstream R8A78000 DT architecture, where power-domains
needs the five MDLC entries (including the common mpphy02 domain) and clocks
should describe the functional or reference clocks.

[ ... ]
> +  '#phy-cells':
> +    const: 2

[Severity: Low]
Could '#phy-cells' include a description explaining what each of the two
specifier cells represents (such as the output channel index and lane or
mode argument) so consumers know how to populate phys properties?

> +
> +  renesas,phy-type:
> +    description: PHY multiplexing configuration for each output.
> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    minItems: 8
> +    maxItems: 8

[Severity: Medium]
Does renesas,phy-type fail dt_binding_check against the example below?

The schema types renesas,phy-type as a flat 8-element uint32-array, whereas
the example encodes four 2-cell tuples (<PHY_TYPE_PCIE 0>, <PHY_TYPE_PCIE 0>,
<PHY_TYPE_XPCS 2>, <PHY_TYPE_USB3 1>), which requires uint32-matrix with four
outer items of two inner items each.  The schema also leaves the meaning and
valid values of the two cells in each tuple (the PHY_TYPE_* constant and
controller instance index) undocumented and unconstrained, and hardcodes
protocol mode selection in a vendor property on the PHY provider instead of
passing it from consumers via '#phy-cells' phandle arguments or per-output
child nodes.

> +
> +  renesas,external-ref-clock:
> +    description: PHY external reference clock select for each output.
> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    minItems: 4
> +    maxItems: 4
> +
> +  renesas,output-repeat-ref-clock:
> +    description: PHY repeat reference clock select for each output.
> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    minItems: 4
> +    maxItems: 4

[Severity: Low]
What values are valid for each entry in renesas,external-ref-clock and
renesas,output-repeat-ref-clock?

Neither property documents what its array elements represent or constrains
them in the schema (for example with enum: [0, 1]), nor are standard DT
clock properties used to describe the external reference clock inputs and
outputs.

[ ... ]
> +examples:
> +  - |
> +    #include <dt-bindings/phy/phy.h>
> +
> +    phy@c9a00000 {
> +      compatible = "renesas,r8a78000-mpphy", "renesas,rcar-gen5-mpphy";
> +      reg = <0xc9a00000 0x100000>;
> +      #phy-cells = <2>;
> +
> +      clocks = <&scmi_clk 340>, <&scmi_clk 341>, <&scmi_clk 342>,
> +               <&scmi_clk 343>, <&scmi_clk 344>;
> +      clock-names = "mpphy01", "mpphy11", "mpphy21", "mpphy31", "mpphy02";
> +      power-domains = <&scmi_devpd 17>, <&scmi_devpd 18>,
> +                      <&scmi_devpd 19>, <&scmi_devpd 20>;
> +      power-domain-names = "mpp0", "mpp1", "mpp2", "mpp3";
> +      resets = <&scmi_reset 340>, <&scmi_reset 341>, <&scmi_reset 342>,
> +               <&scmi_reset 343>, <&scmi_reset 344>;
> +      reset-names = "mpphy01", "mpphy11", "mpphy21", "mpphy31", "mpphy02";
> +
> +      renesas,phy-type = <PHY_TYPE_PCIE 0>, <PHY_TYPE_PCIE 0>,
> +                         <PHY_TYPE_XPCS 2>, <PHY_TYPE_USB3 1>;
> +      renesas,external-ref-clock = <1 1 1 1>;
> +      renesas,output-repeat-ref-clock = <0 0 0 0>;
> +    };

[Severity: Low]
This isn't a bug, but in the example node '#phy-cells' is placed before
clocks, power-domains and resets instead of after reset-names as in
properties: and required:, and the node body uses 2-space indentation
instead of the standard 4-space indentation.  Also, the commit subject
mentions "PHY driver", whereas DT bindings describe hardware rather than
drivers.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261129173739.282027-1-marek.vasut+renesas@mailbox.org?part=1

      parent reply	other threads:[~2026-11-29 17:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 17:37 [PATCH v2 1/3] dt-bindings: phy: Document Renesas Multi-Protocol PHY driver for R-Car X5H Marek Vasut
2026-11-29 17:37 ` [PATCH v2 2/3] phy: renesas: Add " Marek Vasut
2026-11-29 17:55   ` sashiko-bot
2026-11-29 17:37 ` [PATCH v2 3/3] phy: renesas: rcar-gen5-mpphy: Document how to obtain firmware Marek Vasut
2026-11-29 17:46   ` sashiko-bot
2026-11-29 17:51 ` sashiko-bot [this message]

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=sashiko-outbox-239853@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkoul@kernel.org \
    --cc=wsa+renesas@sang-engineering.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox