All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Joey Lu" <a0987203069@gmail.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org, vkoul@kernel.org,
	neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH v8 2/4] arm64: dts: nuvoton: ma35d1: add USB controllers and dual-port PHY node
Date: Mon, 09 Nov 2026 07:16:34 +0000	[thread overview]
Message-ID: <sashiko-outbox-204536@kernel.org> (raw)
In-Reply-To: <20261109065606.62641-3-a0987203069@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] arm64: dts: nuvoton: ma35d1: usb@40200000 reg size 0x1000
  truncates DWC2 FIFOs
--

commit aa9ff21b68491f1e002468f4d400c0d7fd2b192f
Author: Joey Lu <a0987203069@gmail.com>

arm64: dts: nuvoton: ma35d1: add USB controllers and dual-port PHY node

This commit adds the dual-port USB 2.0 phy, dwc2 gadget, and ehci/ohci host
controller nodes to the ma35d1 device tree and enables them on the som-256m
and iot-512m boards.

> diff --git a/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi b/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi
> index 7228ad4735b5c..72a1659207fa7 100644
> --- a/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi
> +++ b/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi

[ ... ]

> @@ -431,5 +439,62 @@ mdio1: mdio {
>  				#size-cells = <0>;
>  			};
>  		};
> +
> +		usb: usb@40200000 {
> +			compatible = "snps,dwc2";
> +			reg = <0x0 0x40200000 0x0 0x1000>;

[Severity: Medium]
Does the 0x1000 register size for usb@40200000 truncate the dwc2 per-endpoint
data fifo region?

A 0x1000 window only covers the core global, host, device, and power control
registers (offsets 0x000 through 0xe04), while the dwc2 driver defines
per-endpoint fifos starting at offset 0x1000:

drivers/usb/dwc2/hw.h:
#define EPFIFO(_a)			HSOTG_REG(0x1000 + ((_a) * 0x1000))

dwc2_driver_probe() maps the exact length from reg via
devm_platform_get_and_ioremap_resource().  If the controller runs in slave/pio
mode, dwc2_hsotg_write_fifo() and dwc2_hsotg_rx_data() access these fifo
registers at offset 0x1000 and above, faulting outside the 4 kb mapping.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261109065606.62641-1-a0987203069@gmail.com?part=2

WARNING: multiple messages have this Message-ID (diff)
From: sashiko-bot@kernel.org
To: "Joey Lu" <a0987203069@gmail.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org, vkoul@kernel.org,
	neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH v8 2/4] arm64: dts: nuvoton: ma35d1: add USB controllers and dual-port PHY node
Date: Mon, 09 Nov 2026 07:16:34 +0000	[thread overview]
Message-ID: <sashiko-outbox-204536@kernel.org> (raw)
In-Reply-To: <20261109065606.62641-3-a0987203069@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] arm64: dts: nuvoton: ma35d1: usb@40200000 reg size 0x1000
  truncates DWC2 FIFOs
--

commit aa9ff21b68491f1e002468f4d400c0d7fd2b192f
Author: Joey Lu <a0987203069@gmail.com>

arm64: dts: nuvoton: ma35d1: add USB controllers and dual-port PHY node

This commit adds the dual-port USB 2.0 phy, dwc2 gadget, and ehci/ohci host
controller nodes to the ma35d1 device tree and enables them on the som-256m
and iot-512m boards.

> diff --git a/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi b/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi
> index 7228ad4735b5c..72a1659207fa7 100644
> --- a/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi
> +++ b/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi

[ ... ]

> @@ -431,5 +439,62 @@ mdio1: mdio {
>  				#size-cells = <0>;
>  			};
>  		};
> +
> +		usb: usb@40200000 {
> +			compatible = "snps,dwc2";
> +			reg = <0x0 0x40200000 0x0 0x1000>;

[Severity: Medium]
Does the 0x1000 register size for usb@40200000 truncate the dwc2 per-endpoint
data fifo region?

A 0x1000 window only covers the core global, host, device, and power control
registers (offsets 0x000 through 0xe04), while the dwc2 driver defines
per-endpoint fifos starting at offset 0x1000:

drivers/usb/dwc2/hw.h:
#define EPFIFO(_a)			HSOTG_REG(0x1000 + ((_a) * 0x1000))

dwc2_driver_probe() maps the exact length from reg via
devm_platform_get_and_ioremap_resource().  If the controller runs in slave/pio
mode, dwc2_hsotg_write_fifo() and dwc2_hsotg_rx_data() access these fifo
registers at offset 0x1000 and above, faulting outside the 4 kb mapping.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261109065606.62641-1-a0987203069@gmail.com?part=2

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

  reply	other threads:[~2026-11-09  7:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09  6:56 [PATCH v8 0/4] phy: nuvoton: extend MA35D1 USB2 PHY driver for dual-port OTG support Joey Lu
2026-11-09  6:56 ` Joey Lu
2026-11-09  6:56 ` [PATCH v8 1/4] dt-bindings: phy: nuvoton,ma35d1-usb2-phy: extend for dual-port and OTG Joey Lu
2026-11-09  6:56   ` Joey Lu
2026-11-09  6:56 ` [PATCH v8 2/4] arm64: dts: nuvoton: ma35d1: add USB controllers and dual-port PHY node Joey Lu
2026-11-09  6:56   ` Joey Lu
2026-11-09  7:16   ` sashiko-bot [this message]
2026-11-09  7:16     ` sashiko-bot
2026-11-10  1:36     ` Joey Lu
2026-11-10  1:36       ` Joey Lu
2026-11-09  6:56 ` [PATCH v8 3/4] phy: nuvoton: phy-ma35d1-usb2: remove unused linux/io.h include Joey Lu
2026-11-09  6:56   ` Joey Lu
2026-11-09  6:56 ` [PATCH v8 4/4] phy: nuvoton: phy-ma35d1-usb2: extend to dual-port with OTG support Joey Lu
2026-11-09  6:56   ` Joey Lu
2026-11-09  7:14   ` sashiko-bot
2026-11-09  7:14     ` sashiko-bot
2026-11-10  1:37     ` Joey Lu
2026-11-10  1:37       ` Joey Lu

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-204536@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=a0987203069@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.