Re: [PATCH v3 8/9] arm64: dts: st: Add USB nodes on stm32mp231

[email protected]
Newsgroups org.kernel.vger.linux-devicetree,org.infradead.lists.linux-phy
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing `ranges` property in the `simple-mfd` `syscfg` node causes a kernel WARN_ON during boot.
--

--- Patch [8]: [PATCH v3 8/9] arm64: dts: st: Add USB nodes on stm32mp231 ---
commit b21748ed09e5c154d11bfc7972df50b9735bfab9
Author: Marek Vasut <[email protected]>

arm64: dts: st: Add USB nodes on stm32mp231

This commit adds USB controller and PHY nodes to the stm32mp231 device tree.
It also converts the syscfg node into a simple-mfd to contain the new PHY
subnodes.

> diff --git a/arch/arm64/boot/dts/st/stm32mp231.dtsi b/arch/arm64/boot/dts/st/stm32mp231.dtsi
> index 9e1d240888ff2..db66777a8c9a0 100644
> --- a/arch/arm64/boot/dts/st/stm32mp231.dtsi
> +++ b/arch/arm64/boot/dts/st/stm32mp231.dtsi

[ ... ]

>  		syscfg: syscon@44230000 {
> -			compatible = "st,stm32mp23-syscfg", "syscon";
> +			compatible = "st,stm32mp23-syscfg", "syscon", "simple-mfd";
>  			reg = <0x44230000 0x10000>;
>  			#clock-cells = <0>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;

[Severity: Medium]
Is there a missing ranges property here?

Since the syscfg node is now a simple-mfd bus with children that have reg
properties (usb2_phy1 and usb2_phy2), omitting the ranges property causes
address translation to fail.

During boot, when of_platform_populate() tries to instantiate the children,
of_address_to_resource() will fail to translate the child addresses. This
triggers a WARN_ON() in drivers/of/platform.c:of_device_alloc() for each
child device, which pollutes the boot log and could cause boot failures if
panic_on_warn is enabled.

> +
> +			usb2_phy1: phy@2400 {
> +				compatible = "st,stm32mp25-usb2phy1";
> +				reg = <0x2400 0x24>;

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=8
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.