[PATCH v5 12/12] riscv: dts: starfive: visionfive 2: Enable gmac device tree node

Samin Guo posted 12 patches 3 years, 1 month ago
There is a newer version of this series
[PATCH v5 12/12] riscv: dts: starfive: visionfive 2: Enable gmac device tree node
Posted by Samin Guo 3 years, 1 month ago
From: Yanhong Wang <yanhong.wang@starfivetech.com>

Update gmac device tree node status to okay.

Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
---
 .../dts/starfive/jh7110-starfive-visionfive-2.dtsi     | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
index c2aa8946a0f1..d1c409f40014 100644
--- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
+++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
@@ -12,6 +12,8 @@
 / {
 	aliases {
 		serial0 = &uart0;
+		ethernet0 = &gmac0;
+		ethernet1 = &gmac1;
 		i2c0 = &i2c0;
 		i2c2 = &i2c2;
 		i2c5 = &i2c5;
@@ -92,6 +94,14 @@
 	status = "okay";
 };
 
+&gmac0 {
+	status = "okay";
+};
+
+&gmac1 {
+	status = "okay";
+};
+
 &i2c0 {
 	clock-frequency = <100000>;
 	i2c-sda-hold-time-ns = <300>;
-- 
2.17.1
Re: [PATCH v5 12/12] riscv: dts: starfive: visionfive 2: Enable gmac device tree node
Posted by Emil Renner Berthing 3 years, 1 month ago
On Fri, 3 Mar 2023 at 10:01, Samin Guo <samin.guo@starfivetech.com> wrote:
> From: Yanhong Wang <yanhong.wang@starfivetech.com>
>
> Update gmac device tree node status to okay.
>
> Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
> Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
> ---
>  .../dts/starfive/jh7110-starfive-visionfive-2.dtsi     | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> index c2aa8946a0f1..d1c409f40014 100644
> --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> @@ -12,6 +12,8 @@
>  / {
>         aliases {
>                 serial0 = &uart0;
> +               ethernet0 = &gmac0;
> +               ethernet1 = &gmac1;

Please sort these alphabetically.

>                 i2c0 = &i2c0;
>                 i2c2 = &i2c2;
>                 i2c5 = &i2c5;
> @@ -92,6 +94,14 @@
>         status = "okay";
>  };
>
> +&gmac0 {
> +       status = "okay";
> +};
> +
> +&gmac1 {
> +       status = "okay";
> +};

Since you'll need to add to the gmac0 and gmac1 nodes in the board
specific files too and it's only one line, consider just dropping this
here and add the status = "okay" there instead.

>  &i2c0 {
>         clock-frequency = <100000>;
>         i2c-sda-hold-time-ns = <300>;
> --
> 2.17.1
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v5 12/12] riscv: dts: starfive: visionfive 2: Enable gmac device tree node
Posted by Guo Samin 3 years, 1 month ago

在 2023/3/6 21:04:28, Emil Renner Berthing 写道:
> On Fri, 3 Mar 2023 at 10:01, Samin Guo <samin.guo@starfivetech.com> wrote:
>> From: Yanhong Wang <yanhong.wang@starfivetech.com>
>>
>> Update gmac device tree node status to okay.
>>
>> Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
>> Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
>> ---
>>  .../dts/starfive/jh7110-starfive-visionfive-2.dtsi     | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
>> index c2aa8946a0f1..d1c409f40014 100644
>> --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
>> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
>> @@ -12,6 +12,8 @@
>>  / {
>>         aliases {
>>                 serial0 = &uart0;
>> +               ethernet0 = &gmac0;
>> +               ethernet1 = &gmac1;
> 
> Please sort these alphabetically.
Thanks, will fix.
> 
>>                 i2c0 = &i2c0;
>>                 i2c2 = &i2c2;
>>                 i2c5 = &i2c5;
>> @@ -92,6 +94,14 @@
>>         status = "okay";
>>  };
>>
>> +&gmac0 {
>> +       status = "okay";
>> +};
>> +
>> +&gmac1 {
>> +       status = "okay";
>> +};
> 
> Since you'll need to add to the gmac0 and gmac1 nodes in the board
> specific files too and it's only one line, consider just dropping this
> here and add the status = "okay" there instead.
> 
According to Andrew's suggestion, can I put the nodes of mdio and phy here?
>>  &i2c0 {
>>         clock-frequency = <100000>;
>>         i2c-sda-hold-time-ns = <300>;
>> --
>> 2.17.1
>>
>>
>> _______________________________________________
>> linux-riscv mailing list
>> linux-riscv@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-riscv

Best regards,
Samin
-- 
Best regards,
Samin
Re: [PATCH v5 12/12] riscv: dts: starfive: visionfive 2: Enable gmac device tree node
Posted by Emil Renner Berthing 3 years, 1 month ago
On Tue, 7 Mar 2023 at 02:21, Guo Samin <samin.guo@starfivetech.com> wrote:

> 在 2023/3/6 21:04:28, Emil Renner Berthing 写道:
> > On Fri, 3 Mar 2023 at 10:01, Samin Guo <samin.guo@starfivetech.com> wrote:
> >> From: Yanhong Wang <yanhong.wang@starfivetech.com>
> >>
> >> Update gmac device tree node status to okay.
> >>
> >> Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
> >> Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
> >> ---
> >>  .../dts/starfive/jh7110-starfive-visionfive-2.dtsi     | 10 ++++++++++
> >>  1 file changed, 10 insertions(+)
> >>
> >> diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> >> index c2aa8946a0f1..d1c409f40014 100644
> >> --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> >> +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi
> >> @@ -12,6 +12,8 @@
> >>  / {
> >>         aliases {
> >>                 serial0 = &uart0;
> >> +               ethernet0 = &gmac0;
> >> +               ethernet1 = &gmac1;
> >
> > Please sort these alphabetically.
> Thanks, will fix.
> >
> >>                 i2c0 = &i2c0;
> >>                 i2c2 = &i2c2;
> >>                 i2c5 = &i2c5;
> >> @@ -92,6 +94,14 @@
> >>         status = "okay";
> >>  };
> >>
> >> +&gmac0 {
> >> +       status = "okay";
> >> +};
> >> +
> >> +&gmac1 {
> >> +       status = "okay";
> >> +};
> >
> > Since you'll need to add to the gmac0 and gmac1 nodes in the board
> > specific files too and it's only one line, consider just dropping this
> > here and add the status = "okay" there instead.
> >
> According to Andrew's suggestion, can I put the nodes of mdio and phy here?

Yeah, if the boards then end up sharing more information it's fine to
put it here. It just seemed a little much to add 8 lines here when all
the boards shared was a status = "okay";

> >>  &i2c0 {
> >>         clock-frequency = <100000>;
> >>         i2c-sda-hold-time-ns = <300>;
> >> --
> >> 2.17.1
> >>
> >>
> >> _______________________________________________
> >> linux-riscv mailing list
> >> linux-riscv@lists.infradead.org
> >> http://lists.infradead.org/mailman/listinfo/linux-riscv
>
> Best regards,
> Samin
> --
> Best regards,
> Samin