Re: [PATCH] arm64: dts: qcom: sm8150: add reset name for ethernet node

From: Volodymyr Babchuk
Date: Thu Mar 07 2024 - 08:14:04 EST



Hello Linux Maintainers, Sumit

First, I am terribly sorry about this half-assed patch. Generally I am
doing all the required checks. But this change seemed so
trivial... Anyways, lesson taken, this will not happen anymore.

Sumit Garg <sumit.garg@xxxxxxxxxx> writes:

> On Thu, 7 Mar 2024 at 12:40, Dmitry Baryshkov
> <dmitry.baryshkov@xxxxxxxxxx> wrote:
>>
>> On Thu, 7 Mar 2024 at 00:22, Volodymyr Babchuk
>> <Volodymyr_Babchuk@xxxxxxxx> wrote:
>> >
>> > Add reset-names property to the ethernet@20000 node. This patch does
>> > not change behavior on Linux, but it is needed for U-Boot, as it tries
>> > to find the reset by name, not by index.
>> >
>> > Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
>> > ---
>> > arch/arm64/boot/dts/qcom/sm8150.dtsi | 1 +
>> > 1 file changed, 1 insertion(+)
>> >
>> > diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
>> > index 761a6757dc26f..c2e65d6a2ac62 100644
>> > --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
>> > +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
>> > @@ -951,6 +951,7 @@ ethernet: ethernet@20000 {
>> >
>> > power-domains = <&gcc EMAC_GDSC>;
>> > resets = <&gcc GCC_EMAC_BCR>;
>> > + resets-names = "emac";
>>
>> According to the snps,dwmac.yaml schema the "emac" is invalid here.
>> Only "stmmaceth" and / or "ahb" are permitted here.
>
> Okay, it looks like earlier the Linux kernel on Qcom SoCs always
> assumed that the EMAC reset signal is deserted by prior boot stages.
> So I suppose we can reuse "stmmaceth" here instead of "emac" with a
> corresponding change to U-Boot driver as well.

Maybe it would be better to access reset in U-Boot by index, in the
same way as linux kernel does? I am not sure that "stmmaceth" will be
correct from the semantic point of view.

As I understand, "stmmac" name is used due to historical reasons in
Linux, as this driver was introduced for STM SoC initially. But the same
IP block is being used in many different SoCs made by different vendors
and there is nothing STM-specific left in it anymore. Especially taking
into account that this IP-block was designed not by STM but by
Synopsys/DesignWare.

--
WBR, Volodymyr