mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: christian.koever-draxl@student.uibk.ac.at
Cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
	robh@kernel.org, conor+dt@kernel.org, neil.armstrong@linaro.org
Subject: Re: [PATCH 08/10] arm64: dts: amlogic: meson-s4: add the USB host
Date: Fri, 06 Nov 2026 10:59:50 +0000	[thread overview]
Message-ID: <sashiko-outbox-201261@kernel.org> (raw)
In-Reply-To: <20261106104659.54656-9-christian.koever-draxl@student.uibk.ac.at>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [High] arm64: dts: amlogic: unmatched s4-usb2-phy compatible breaks
  USB probe
- [Medium] arm64: dts: amlogic: meson-s4 USB glue and xHCI violate DT
  binding
- [Low] arm64: dts: amlogic: meson-s4 USB2 PHY nodes out of address
  order
--

commit 52aac76c3162fb981eef1f4f1e554811e324a07e
Author: Christian Stefan Kövér-Draxl <ckoever@outlook.de>

arm64: dts: amlogic: meson-s4: add the USB host

This commit adds the two USB2 PHY nodes and the USB controller node with
its child xHCI host node to the Amlogic Meson S4 SoC device tree.

> diff --git a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
> index 8bbd70e52a299..155997649dc3a 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
> +++ b/arch/arm64/boot/dts/amlogic/meson-s4.dtsi
> @@ -770,6 +770,26 @@ cpu_temp: temperature-sensor@20000 {
>  				amlogic,secure-monitor = <&sm 1>;
>  			};
>  
> +			usb2_phy0: phy@3c000 {
> +				compatible = "amlogic,s4-usb2-phy";
> +				reg = <0x0 0x3c000 0x0 0x2000>;
> +				clocks = <&xtal>;
> +				clock-names = "xtal";
> +				resets = <&reset RESET_USBPHY20>;
> +				reset-names = "phy";
> +				#phy-cells = <0>;
> +			};
> +
> +			usb2_phy1: phy@3e000 {
> +				compatible = "amlogic,s4-usb2-phy";
> +				reg = <0x0 0x3e000 0x0 0x2000>;
> +				clocks = <&xtal>;
> +				clock-names = "xtal";
> +				resets = <&reset RESET_USBPHY21>;
> +				reset-names = "phy";
> +				#phy-cells = <0>;
> +			};

[Severity: High]
Does "amlogic,s4-usb2-phy" have a matching driver or binding in the kernel,
or does it need a fallback such as "amlogic,g12a-usb2-phy"?

phy_meson_g12a_usb2_of_match[] in drivers/phy/amlogic/phy-meson-g12a-usb2.c
and Documentation/devicetree/bindings/phy/amlogic,g12a-usb2-phy.yaml only
list "amlogic,g12a-usb2-phy" and "amlogic,a1-usb2-phy". Without a matching
driver or fallback compatible on usb2_phy0 and usb2_phy1, no PHY provider
is registered, so dwc3_meson_g12a_probe() -> dwc3_meson_g12a_get_phys() ->
devm_phy_optional_get() returns -EPROBE_DEFER permanently when usb@fe03a000
is enabled, and dtbs_check fails.

> +
>  			eth_phy: mdio-multiplexer@28000 {
>  				compatible = "amlogic,g12a-mdio-mux";
>  				reg = <0x0 0x28000 0x0 0xa4>;

[Severity: Low]
This isn't a bug, but phy@3c000 and phy@3e000 are placed before
mdio-multiplexer@28000 instead of after it in unit-address order under
apb4.

> @@ -988,6 +1008,31 @@ mdio0: mdio {
>  			};
>  		};
>  
> +		usb: usb@fe03a000 {
> +			compatible = "amlogic,meson-s4-usb-ctrl",
> +				     "amlogic,meson-g12a-usb-ctrl";
> +			reg = <0x0 0xfe03a000 0x0 0xa0>;
> +			interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>;
> +			#address-cells = <2>;
> +			#size-cells = <2>;
> +			ranges;
> +			clocks = <&clkc_periphs CLKID_USB>;
> +			resets = <&reset RESET_USBCTRL>;
> +			power-domains = <&pwrc PWRC_S4_USB_COMB_ID>;
> +			dr_mode = "host";
> +			phys = <&usb2_phy0>, <&usb2_phy1>;
> +			phy-names = "usb2-phy0", "usb2-phy1";
> +			status = "disabled";
> +
> +			crg_xhci: usb@fde00000 {
> +				compatible = "generic-xhci";
> +				reg = <0x0 0xfde00000 0x0 0x100000>;
> +				interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
> +				clocks = <&clkc_periphs CLKID_USB1_TO_DDR>;
> +				status = "okay";
> +			};
> +		};

[Severity: Medium]
Do the compatible strings on usb@fe03a000 and its child usb@fde00000 match
Documentation/devicetree/bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml and
drivers/usb/dwc3/dwc3-meson-g12a.c?

The binding only allows a single compatible entry from its enum (which does
not include "amlogic,meson-s4-usb-ctrl") and restricts child usb@ nodes to
dwc2.yaml# or snps,dwc3.yaml#, so both nodes fail dtbs_check. In addition,
dwc3_meson_g12a_otg_init() looks up the host child via
dwc3_meson_g12_find_child(dev, "snps,dwc3"), which returns NULL when the
child uses "generic-xhci".

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261106104659.54656-1-christian.koever-draxl@student.uibk.ac.at?part=8

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  parent reply	other threads:[~2026-11-06 10:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 10:46 [PATCH 00/10] arm64: dts: amlogic: S4 SoC additions and the Amediatech X98Q christian.koever-draxl
2026-11-06 10:46 ` [PATCH 01/10] dt-bindings: arm: amlogic: add " christian.koever-draxl
2026-11-06 17:17   ` Conor Dooley
2026-11-06 10:46 ` [PATCH 02/10] arm64: dts: amlogic: meson-s4: describe the CPU caches christian.koever-draxl
2026-11-06 10:52   ` neil.armstrong
2026-11-06 10:46 ` [PATCH 03/10] arm64: dts: amlogic: meson-s4: add the PSCI CPU idle state christian.koever-draxl
2026-11-06 10:54   ` neil.armstrong
2026-11-06 10:46 ` [PATCH 04/10] arm64: dts: amlogic: meson-s4: use the S4 secure monitor compatible christian.koever-draxl
2026-11-06 10:54   ` sashiko-bot
2026-11-06 10:46 ` [PATCH 05/10] arm64: dts: amlogic: meson-s4: add the Mali GPU christian.koever-draxl
2026-11-06 17:18   ` Conor Dooley
2026-11-06 10:46 ` [PATCH 06/10] arm64: dts: amlogic: meson-s4: add the CPU thermal sensor and zone christian.koever-draxl
2026-11-06 10:53   ` sashiko-bot
2026-11-06 10:46 ` [PATCH 07/10] arm64: dts: amlogic: meson-s4: add the GE2D christian.koever-draxl
2026-11-06 10:53   ` sashiko-bot
2026-11-06 10:46 ` [PATCH 08/10] arm64: dts: amlogic: meson-s4: add the USB host christian.koever-draxl
2026-11-06 10:55   ` neil.armstrong
2026-11-06 10:59   ` sashiko-bot [this message]
2026-11-06 10:46 ` [PATCH 09/10] arm64: dts: amlogic: meson-s4: add the AO CEC controller christian.koever-draxl
2026-11-06 10:55   ` neil.armstrong
2026-11-06 17:19   ` Conor Dooley
2026-11-06 10:46 ` [PATCH 10/10] arm64: dts: amlogic: add the Amediatech X98Q christian.koever-draxl
2026-11-06 11:00   ` sashiko-bot

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-201261@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=christian.koever-draxl@student.uibk.ac.at \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=neil.armstrong@linaro.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

all inboxes | Powered by JetHome®