Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sandie Cao" <sandie.cao@deepcomputing.io>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH 2/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller and USB phy support
Date: Tue, 22 Sep 2026 11:19:02 +0000	[thread overview]
Message-ID: <20260922111903.32BC41F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260922110434.3426051-1-sandie.cao@deepcomputing.io>

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] dt: incorrect clock assignment for USB3 port B and C companion PHYs
- [High] dt: incorrect hardware interrupt number assigned to usb3b controller
- [Low] dt: missing Type-C and PD bindings for claimed port features
- [Low] dt: space indentation used instead of tabs for usb3c node
--

commit 01e320732a69960438751a5d51ee72cfcf2179bc
Author: Sandie Cao <sandie.cao@deepcomputing.io>

riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller and USB phy support

This commit adds USB device nodes to the DeepComputing FML13V05 board,
configuring four USB-C ports with various features like PD 3.0 and DP 1.4.

> diff --git a/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts b/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
> index 804abc85602ab..55b0f63dcb2e3 100644
> --- a/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts
> +++ b/arch/riscv/boot/dts/spacemit/k3-deepcomputing-fml13v05.dts

[ ... ]

> +&usb3b {
> +	status = "okay";
> +};

[Severity: Low]
Are the 'usb-c-connector' nodes and OF graph linkages missing here? The
commit message claims Power Delivery and DisplayPort Alt-Mode capabilities,
but without these bindings, any kernel-managed role switching, PD negotiation,
or DisplayPort muxing might not function when a Type-C device is connected.

[ ... ]

> diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
> index b9977e78e096a..ae3f8bb1e5ed1 100644
> --- a/arch/riscv/boot/dts/spacemit/k3.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k3.dtsi

[ ... ]

> +		usb3b: usb@81400000 {
> +			compatible = "spacemit,k3-dwc3";
> +			reg = <0x0 0x81400000 0x0 0x10000>;
> +			interrupts = <125 IRQ_TYPE_LEVEL_HIGH>;
                                      ^^^

[Severity: High]
Is this the correct hardware interrupt number for usb3b? Since the adjacent
controllers usb3c and usb3d use 148 and 149, 125 appears to be a copy-paste
error (perhaps it should be 147?). Using the wrong interrupt vector could
prevent the kernel from processing USB events on Port B, causing it to fail on
boot.

> +			interrupt-parent = <&saplic>;
> +			clocks = <&syscon_apmu CLK_APMU_USB3_PORTB_BUS>;

[ ... ]

> +		usb3b_u2phy: phy@81500000 {
> +			compatible = "spacemit,k3-usb2-phy";
> +			reg = <0x0 0x81500000 0x0 0x200>;
> +			clocks = <&syscon_apmu CLK_APMU_USB2_BUS>;
                                                ^^^^^^^^^^^^^^^^^

[Severity: High]
Should this use the port-specific clock (CLK_APMU_USB3_PORTB_BUS) instead of
the shared USB2 bus clock? If the independent USB2 host controller is disabled
or runtime gated, the USB3 ports could lose their companion PHY clocks,
leading to initialization failures or USB disconnects during power management.

> +			#phy-cells = <0>;
> +			status = "disabled";
> +		};
> +
> +               usb3c: usb@81700000 {
  ^^^^^^^^^^^^^^^

[Severity: Low]
Does this node use space indentation? It looks like 15 spaces were used
instead of tabs.

> +			compatible = "spacemit,k3-dwc3";
> +			reg = <0x0 0x81700000 0x0 0x10000>;

[ ... ]

> +		usb3c_u2phy: phy@81800000 {
> +			compatible = "spacemit,k3-usb2-phy";
> +			reg = <0x0 0x81800000 0x0 0x200>;
> +			clocks = <&syscon_apmu CLK_APMU_USB2_BUS>;
                                                ^^^^^^^^^^^^^^^^^

[Severity: High]
Should this also use its port-specific clock (CLK_APMU_USB3_PORTC_BUS) instead
of the shared USB2 bus clock? Similar to usb3b_u2phy above, relying on the
standalone USB2 bus clock could cause power management issues for this PHY.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260922110231.3426011-1-sandie.cao@deepcomputing.io?part=2

  reply	other threads:[~2026-09-22 11:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 11:02 [PATCH 0/3] Enable USB and SD for Deepcomputing FML13V05 board Sandie Cao
2026-09-22 11:04 ` [PATCH 1/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add P1 PMIC regulator tree Sandie Cao
2026-09-22 11:04 ` [PATCH 2/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: add USB controller and USB phy support Sandie Cao
2026-09-22 11:19   ` sashiko-bot [this message]
2026-09-23  2:18   ` Troy Mitchell
2026-09-23  4:07     ` Sandie Cao
2026-09-23  6:36       ` Troy Mitchell
2026-09-23  6:44         ` Sandie Cao
2026-09-23 17:33   ` Yao Zi
2026-09-22 11:04 ` [PATCH 3/3] riscv: dts: spacemit: k3-deepcomputing-fml13v05: Enable SD card support Sandie Cao
2026-09-23  2:23   ` Troy Mitchell
2026-09-23  6:35     ` Sandie Cao
2026-09-23  7:02       ` Troy Mitchell
2026-09-23  8:01         ` Sandie Cao
2026-09-23  9:13           ` Troy Mitchell
2026-09-23  9:51             ` Sandie Cao
2026-09-24  1:18               ` Troy Mitchell

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=20260922111903.32BC41F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sandie.cao@deepcomputing.io \
    --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