2019-07-19 11:11:43

by Yash Shah

[permalink] [raw]
Subject: [PATCH 1/3] macb: bindings doc: update sifive fu540-c000 binding

As per the discussion with Nicolas Ferre, rename the compatible property
to a more appropriate and specific string.
LINK: https://lkml.org/lkml/2019/7/17/200

Signed-off-by: Yash Shah <[email protected]>
---
Documentation/devicetree/bindings/net/macb.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt
index 63c73fa..0b61a90 100644
--- a/Documentation/devicetree/bindings/net/macb.txt
+++ b/Documentation/devicetree/bindings/net/macb.txt
@@ -15,10 +15,10 @@ Required properties:
Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs.
Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.
Use "cdns,zynqmp-gem" for Zynq Ultrascale+ MPSoC.
- Use "sifive,fu540-macb" for SiFive FU540-C000 SoC.
+ Use "sifive,fu540-c000-gem" for SiFive FU540-C000 SoC.
Or the generic form: "cdns,emac".
- reg: Address and length of the register set for the device
- For "sifive,fu540-macb", second range is required to specify the
+ For "sifive,fu540-c000-gem", second range is required to specify the
address and length of the registers for GEMGXL Management block.
- interrupts: Should contain macb interrupt
- phy-mode: See ethernet.txt file in the same directory.
--
1.9.1


2019-07-19 11:11:56

by Yash Shah

[permalink] [raw]
Subject: [PATCH 2/3] macb: Update compatibility string for SiFive FU540-C000

Update the compatibility string for SiFive FU540-C000 as per the new
string updated in the binding doc.
Reference: https://lkml.org/lkml/2019/7/17/200

Signed-off-by: Yash Shah <[email protected]>
---
drivers/net/ethernet/cadence/macb_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 15d0737..305371c 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -4112,7 +4112,7 @@ static int fu540_c000_init(struct platform_device *pdev)
{ .compatible = "cdns,emac", .data = &emac_config },
{ .compatible = "cdns,zynqmp-gem", .data = &zynqmp_config},
{ .compatible = "cdns,zynq-gem", .data = &zynq_config },
- { .compatible = "sifive,fu540-macb", .data = &fu540_c000_config },
+ { .compatible = "sifive,fu540-c000-gem", .data = &fu540_c000_config },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, macb_dt_ids);
--
1.9.1

2019-07-19 11:13:53

by Yash Shah

[permalink] [raw]
Subject: [PATCH 3/3] riscv: dts: Add DT node for SiFive FU540 Ethernet controller driver

DT node for SiFive FU540-C000 GEMGXL Ethernet controller driver added

Signed-off-by: Yash Shah <[email protected]>
---
arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 15 +++++++++++++++
arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts | 9 +++++++++
2 files changed, 24 insertions(+)

diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi
index cc73522..588669f0 100644
--- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi
+++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi
@@ -231,5 +231,20 @@
#size-cells = <0>;
status = "disabled";
};
+ eth0: ethernet@10090000 {
+ compatible = "sifive,fu540-c000-gem";
+ interrupt-parent = <&plic0>;
+ interrupts = <53>;
+ reg = <0x0 0x10090000 0x0 0x2000
+ 0x0 0x100a0000 0x0 0x1000>;
+ local-mac-address = [00 00 00 00 00 00];
+ clock-names = "pclk", "hclk";
+ clocks = <&prci PRCI_CLK_GEMGXLPLL>,
+ <&prci PRCI_CLK_GEMGXLPLL>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+
};
};
diff --git a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
index 0b55c53..85c17a7 100644
--- a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
+++ b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
@@ -76,3 +76,12 @@
disable-wp;
};
};
+
+&eth0 {
+ status = "okay";
+ phy-mode = "gmii";
+ phy-handle = <&phy1>;
+ phy1: ethernet-phy@0 {
+ reg = <0>;
+ };
+};
--
1.9.1

2019-07-19 11:55:16

by Sagar Shrikant Kadam

[permalink] [raw]
Subject: Re: [PATCH 3/3] riscv: dts: Add DT node for SiFive FU540 Ethernet controller driver

The series looks good to me.

Reviewed-by: Sagar Kadam <[email protected]>

On Fri, Jul 19, 2019 at 4:41 PM Yash Shah <[email protected]> wrote:
>
> DT node for SiFive FU540-C000 GEMGXL Ethernet controller driver added
>
> Signed-off-by: Yash Shah <[email protected]>
> ---
> arch/riscv/boot/dts/sifive/fu540-c000.dtsi | 15 +++++++++++++++
> arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts | 9 +++++++++
> 2 files changed, 24 insertions(+)
>
> diff --git a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi
> index cc73522..588669f0 100644
> --- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi
> +++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi
> @@ -231,5 +231,20 @@
> #size-cells = <0>;
> status = "disabled";
> };
> + eth0: ethernet@10090000 {
> + compatible = "sifive,fu540-c000-gem";
> + interrupt-parent = <&plic0>;
> + interrupts = <53>;
> + reg = <0x0 0x10090000 0x0 0x2000
> + 0x0 0x100a0000 0x0 0x1000>;
> + local-mac-address = [00 00 00 00 00 00];
> + clock-names = "pclk", "hclk";
> + clocks = <&prci PRCI_CLK_GEMGXLPLL>,
> + <&prci PRCI_CLK_GEMGXLPLL>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> + status = "disabled";
> + };
> +
> };
> };
> diff --git a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
> index 0b55c53..85c17a7 100644
> --- a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
> +++ b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
> @@ -76,3 +76,12 @@
> disable-wp;
> };
> };
> +
> +&eth0 {
> + status = "okay";
> + phy-mode = "gmii";
> + phy-handle = <&phy1>;
> + phy1: ethernet-phy@0 {
> + reg = <0>;
> + };
> +};
> --
> 1.9.1
>
>
> _______________________________________________
> linux-riscv mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-riscv

2019-07-19 12:03:12

by Nicolas Ferre

[permalink] [raw]
Subject: Re: [PATCH 1/3] macb: bindings doc: update sifive fu540-c000 binding

On 19/07/2019 at 13:10, Yash Shah wrote:
> As per the discussion with Nicolas Ferre, rename the compatible property
> to a more appropriate and specific string.
> LINK: https://lkml.org/lkml/2019/7/17/200
>
> Signed-off-by: Yash Shah <[email protected]>

Acked-by: Nicolas Ferre <[email protected]>

> ---
> Documentation/devicetree/bindings/net/macb.txt | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/net/macb.txt b/Documentation/devicetree/bindings/net/macb.txt
> index 63c73fa..0b61a90 100644
> --- a/Documentation/devicetree/bindings/net/macb.txt
> +++ b/Documentation/devicetree/bindings/net/macb.txt
> @@ -15,10 +15,10 @@ Required properties:
> Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs.
> Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.
> Use "cdns,zynqmp-gem" for Zynq Ultrascale+ MPSoC.
> - Use "sifive,fu540-macb" for SiFive FU540-C000 SoC.
> + Use "sifive,fu540-c000-gem" for SiFive FU540-C000 SoC.
> Or the generic form: "cdns,emac".
> - reg: Address and length of the register set for the device
> - For "sifive,fu540-macb", second range is required to specify the
> + For "sifive,fu540-c000-gem", second range is required to specify the
> address and length of the registers for GEMGXL Management block.
> - interrupts: Should contain macb interrupt
> - phy-mode: See ethernet.txt file in the same directory.
>


--
Nicolas Ferre

2019-07-19 12:08:36

by Nicolas Ferre

[permalink] [raw]
Subject: Re: [PATCH 2/3] macb: Update compatibility string for SiFive FU540-C000

On 19/07/2019 at 13:10, Yash Shah wrote:
> Update the compatibility string for SiFive FU540-C000 as per the new
> string updated in the binding doc.
> Reference: https://lkml.org/lkml/2019/7/17/200

Maybe referring to lore.kernel.org is better:
https://lore.kernel.org/netdev/CAJ2_jOFEVZQat0Yprg4hem4jRrqkB72FKSeQj4p8P5KA-+rgww@mail.gmail.com/

> Signed-off-by: Yash Shah <[email protected]>

Acked-by: Nicolas Ferre <[email protected]>

Thanks, best regards,
Nicolas

> ---
> drivers/net/ethernet/cadence/macb_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index 15d0737..305371c 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -4112,7 +4112,7 @@ static int fu540_c000_init(struct platform_device *pdev)
> { .compatible = "cdns,emac", .data = &emac_config },
> { .compatible = "cdns,zynqmp-gem", .data = &zynqmp_config},
> { .compatible = "cdns,zynq-gem", .data = &zynq_config },
> - { .compatible = "sifive,fu540-macb", .data = &fu540_c000_config },
> + { .compatible = "sifive,fu540-c000-gem", .data = &fu540_c000_config },
> { /* sentinel */ }
> };
> MODULE_DEVICE_TABLE(of, macb_dt_ids);
>


--
Nicolas Ferre

2019-07-19 15:12:15

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH 3/3] riscv: dts: Add DT node for SiFive FU540 Ethernet controller driver

On Fri, Jul 19, 2019 at 05:23:45PM +0530, Sagar Kadam wrote:
> > +&eth0 {
> > + status = "okay";
> > + phy-mode = "gmii";
> > + phy-handle = <&phy1>;
> > + phy1: ethernet-phy@0 {
> > + reg = <0>;
> > + };

Hi Sagar

Is there a good reason to call it phy1? Is there a phy0?

Thanks

Andrew

2019-07-22 05:56:07

by Yash Shah

[permalink] [raw]
Subject: Re: [PATCH 2/3] macb: Update compatibility string for SiFive FU540-C000

On Fri, Jul 19, 2019 at 5:36 PM <[email protected]> wrote:
>
> On 19/07/2019 at 13:10, Yash Shah wrote:
> > Update the compatibility string for SiFive FU540-C000 as per the new
> > string updated in the binding doc.
> > Reference: https://lkml.org/lkml/2019/7/17/200
>
> Maybe referring to lore.kernel.org is better:
> https://lore.kernel.org/netdev/CAJ2_jOFEVZQat0Yprg4hem4jRrqkB72FKSeQj4p8P5KA-+rgww@mail.gmail.com/

Sure. Will keep that in mind for future reference.

>
> > Signed-off-by: Yash Shah <[email protected]>
>
> Acked-by: Nicolas Ferre <[email protected]>

Thanks.

- Yash

2019-07-22 09:12:06

by Sagar Shrikant Kadam

[permalink] [raw]
Subject: Re: [PATCH 3/3] riscv: dts: Add DT node for SiFive FU540 Ethernet controller driver

Hello Andrew,

On Fri, Jul 19, 2019 at 6:57 PM Andrew Lunn <[email protected]> wrote:
>
> On Fri, Jul 19, 2019 at 05:23:45PM +0530, Sagar Kadam wrote:
> > > +&eth0 {
> > > + status = "okay";
> > > + phy-mode = "gmii";
> > > + phy-handle = <&phy1>;
> > > + phy1: ethernet-phy@0 {
> > > + reg = <0>;
> > > + };
>
> Hi Sagar
>
> Is there a good reason to call it phy1? Is there a phy0?
>

Sorry for the delayed response.
There is a single phy, so yes phy0 is a better name.
Thank you for pointing this out.

Thanks & Regards,
Sagar Kadam




> Thanks
>
> Andrew
>
> _______________________________________________
> linux-riscv mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-riscv

2019-07-23 03:09:33

by Paul Walmsley

[permalink] [raw]
Subject: Re: [PATCH 2/3] macb: Update compatibility string for SiFive FU540-C000

On Fri, 19 Jul 2019, Yash Shah wrote:

> Update the compatibility string for SiFive FU540-C000 as per the new
> string updated in the binding doc.
> Reference: https://lkml.org/lkml/2019/7/17/200
>
> Signed-off-by: Yash Shah <[email protected]>

Reviewed-by: Paul Walmsley <[email protected]>

- Paul

2019-07-23 03:36:34

by Paul Walmsley

[permalink] [raw]
Subject: Re: [PATCH 2/3] macb: Update compatibility string for SiFive FU540-C000

On Fri, 19 Jul 2019, Yash Shah wrote:

> Update the compatibility string for SiFive FU540-C000 as per the new
> string updated in the binding doc.
> Reference: https://lkml.org/lkml/2019/7/17/200
>
> Signed-off-by: Yash Shah <[email protected]>

Tested-by: Paul Walmsley <[email protected]>


- Paul

2019-07-23 03:36:50

by Paul Walmsley

[permalink] [raw]
Subject: Re: [PATCH 3/3] riscv: dts: Add DT node for SiFive FU540 Ethernet controller driver

On Fri, 19 Jul 2019, Yash Shah wrote:

> DT node for SiFive FU540-C000 GEMGXL Ethernet controller driver added
>
> Signed-off-by: Yash Shah <[email protected]>

Thanks, queuing this one for v5.3-rc with Andrew's suggested change to
change phy1 to phy0.

Am assuming patches 1 and 2 will go in via -net.


- Paul

2019-07-23 05:22:13

by Paul Walmsley

[permalink] [raw]
Subject: Re: [PATCH 1/3] macb: bindings doc: update sifive fu540-c000 binding

On Fri, 19 Jul 2019, Yash Shah wrote:

> As per the discussion with Nicolas Ferre, rename the compatible property
> to a more appropriate and specific string.
> LINK: https://lkml.org/lkml/2019/7/17/200
>
> Signed-off-by: Yash Shah <[email protected]>

Reviewed-by: Paul Walmsley <[email protected]>

- Paul

2019-08-12 23:33:45

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 1/3] macb: bindings doc: update sifive fu540-c000 binding

On Fri, 19 Jul 2019 16:40:29 +0530, Yash Shah wrote:
> As per the discussion with Nicolas Ferre, rename the compatible property
> to a more appropriate and specific string.
> LINK: https://lkml.org/lkml/2019/7/17/200
>
> Signed-off-by: Yash Shah <[email protected]>
> ---
> Documentation/devicetree/bindings/net/macb.txt | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Rob Herring <[email protected]>

2019-08-13 00:16:35

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH 3/3] riscv: dts: Add DT node for SiFive FU540 Ethernet controller driver

On Mon, Jul 22, 2019 at 02:48:40PM -0700, Paul Walmsley wrote:
> On Fri, 19 Jul 2019, Yash Shah wrote:
>
> > DT node for SiFive FU540-C000 GEMGXL Ethernet controller driver added
> >
> > Signed-off-by: Yash Shah <[email protected]>
>
> Thanks, queuing this one for v5.3-rc with Andrew's suggested change to
> change phy1 to phy0.
>
> Am assuming patches 1 and 2 will go in via -net.

I don't think that has happened.

Rob

2019-08-13 18:42:46

by Paul Walmsley

[permalink] [raw]
Subject: Re: [PATCH 1/3] macb: bindings doc: update sifive fu540-c000 binding

Nicolas, Dave,

On Mon, 12 Aug 2019, Rob Herring wrote:

> On Fri, 19 Jul 2019 16:40:29 +0530, Yash Shah wrote:
> > As per the discussion with Nicolas Ferre, rename the compatible property
> > to a more appropriate and specific string.
> > LINK: https://lkml.org/lkml/2019/7/17/200
> >
> > Signed-off-by: Yash Shah <[email protected]>
> > ---
> > Documentation/devicetree/bindings/net/macb.txt | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
>
> Reviewed-by: Rob Herring <[email protected]>

Am assuming you'll pick this up for the -net tree for v5.4-rc1 or earlier.
If not, please let us know.


- Paul

2019-08-13 18:43:59

by Paul Walmsley

[permalink] [raw]
Subject: Re: [PATCH 2/3] macb: Update compatibility string for SiFive FU540-C000

Dave, Nicolas,

On Mon, 22 Jul 2019, Yash Shah wrote:

> On Fri, Jul 19, 2019 at 5:36 PM <[email protected]> wrote:
> >
> > On 19/07/2019 at 13:10, Yash Shah wrote:
> > > Update the compatibility string for SiFive FU540-C000 as per the new
> > > string updated in the binding doc.
> > > Reference: https://lkml.org/lkml/2019/7/17/200
> >
> > Maybe referring to lore.kernel.org is better:
> > https://lore.kernel.org/netdev/CAJ2_jOFEVZQat0Yprg4hem4jRrqkB72FKSeQj4p8P5KA-+rgww@mail.gmail.com/
>
> Sure. Will keep that in mind for future reference.
>
> >
> > > Signed-off-by: Yash Shah <[email protected]>
> >
> > Acked-by: Nicolas Ferre <[email protected]>
>
> Thanks.

Am assuming you'll pick this up for the -net tree for v5.4-rc1 or earlier.
If not, please let us know.


- Paul

2019-08-20 09:11:42

by Andreas Schwab

[permalink] [raw]
Subject: Re: [PATCH 2/3] macb: Update compatibility string for SiFive FU540-C000

On Aug 13 2019, Paul Walmsley <[email protected]> wrote:

> Dave, Nicolas,
>
> On Mon, 22 Jul 2019, Yash Shah wrote:
>
>> On Fri, Jul 19, 2019 at 5:36 PM <[email protected]> wrote:
>> >
>> > On 19/07/2019 at 13:10, Yash Shah wrote:
>> > > Update the compatibility string for SiFive FU540-C000 as per the new
>> > > string updated in the binding doc.
>> > > Reference: https://lkml.org/lkml/2019/7/17/200
>> >
>> > Maybe referring to lore.kernel.org is better:
>> > https://lore.kernel.org/netdev/CAJ2_jOFEVZQat0Yprg4hem4jRrqkB72FKSeQj4p8P5KA-+rgww@mail.gmail.com/
>>
>> Sure. Will keep that in mind for future reference.
>>
>> >
>> > > Signed-off-by: Yash Shah <[email protected]>
>> >
>> > Acked-by: Nicolas Ferre <[email protected]>
>>
>> Thanks.
>
> Am assuming you'll pick this up for the -net tree for v5.4-rc1 or earlier.
> If not, please let us know.

This is still missing in v5.4-rc5, which means that networking is broken.

Andreas.

--
Andreas Schwab, SUSE Labs, [email protected]
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

2019-08-20 10:18:27

by Nicolas Ferre

[permalink] [raw]
Subject: Re: [PATCH 2/3] macb: Update compatibility string for SiFive FU540-C000

On 20/08/2019 at 11:10, Andreas Schwab wrote:
> External E-Mail
>
>
> On Aug 13 2019, Paul Walmsley <[email protected]> wrote:
>
>> Dave, Nicolas,
>>
>> On Mon, 22 Jul 2019, Yash Shah wrote:
>>
>>> On Fri, Jul 19, 2019 at 5:36 PM <[email protected]> wrote:
>>>>
>>>> On 19/07/2019 at 13:10, Yash Shah wrote:
>>>>> Update the compatibility string for SiFive FU540-C000 as per the new
>>>>> string updated in the binding doc.
>>>>> Reference: https://lkml.org/lkml/2019/7/17/200
>>>>
>>>> Maybe referring to lore.kernel.org is better:
>>>> https://lore.kernel.org/netdev/CAJ2_jOFEVZQat0Yprg4hem4jRrqkB72FKSeQj4p8P5KA-+rgww@mail.gmail.com/
>>>
>>> Sure. Will keep that in mind for future reference.
>>>
>>>>
>>>>> Signed-off-by: Yash Shah <[email protected]>
>>>>
>>>> Acked-by: Nicolas Ferre <[email protected]>
>>>
>>> Thanks.
>>
>> Am assuming you'll pick this up for the -net tree for v5.4-rc1 or earlier.
>> If not, please let us know.
>
> This is still missing in v5.4-rc5, which means that networking is broken.

Andreas, Paul,

The patchwork state for the 2 first patches of this series is "Changes
Requested". It's probably due to my advice of using lore.kernel.org (or
something else).

I'm perfectly fine in accepting the patches are they are today but can't
change their patchwork state myself. We would need Dave or Jakub to take
them.

Dave, Jakub,

All tags are collected in patchwork and all should be fine on DT (Rob)
side as well.
Please tell me if you're waiting some sign from me.

Best regards,
--
Nicolas Ferre