LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v2 1/2] riscv: dts: microchip: Use 'local-mac-address' for emac1
@ 2021-08-04 12:30 Bin Meng
  2021-08-04 12:30 ` [PATCH v2 2/2] riscv: dts: microchip: Add ethernet0 to the aliases node Bin Meng
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Bin Meng @ 2021-08-04 12:30 UTC (permalink / raw)
  To: Palmer Dabbelt, Conor Dooley, Atish Patra, linux-kernel, linux-riscv
  Cc: Geert Uytterhoeven, Bin Meng, conor dooley

From: Bin Meng <bin.meng@windriver.com>

Per the DT spec, 'local-mac-address' is used to specify MAC address
that was assigned to the network device, while 'mac-address' is used
to specify the MAC address that was last used by the boot program,
and shall be used only if the value differs from 'local-mac-address'
property value.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: conor dooley <conor.dooley@microchip.com>
---

(no changes since v1)

 arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
index 0659068b62f7..a9c558366d61 100644
--- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
+++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
@@ -317,7 +317,7 @@ emac1: ethernet@20112000 {
 			reg = <0x0 0x20112000 0x0 0x2000>;
 			interrupt-parent = <&plic>;
 			interrupts = <70 71 72 73>;
-			mac-address = [00 00 00 00 00 00];
+			local-mac-address = [00 00 00 00 00 00];
 			clocks = <&clkcfg 5>, <&clkcfg 2>;
 			status = "disabled";
 			clock-names = "pclk", "hclk";
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 2/2] riscv: dts: microchip: Add ethernet0 to the aliases node
  2021-08-04 12:30 [PATCH v2 1/2] riscv: dts: microchip: Use 'local-mac-address' for emac1 Bin Meng
@ 2021-08-04 12:30 ` Bin Meng
  2021-08-24 15:46   ` Geert Uytterhoeven
  2021-08-19  3:10 ` [PATCH v2 1/2] riscv: dts: microchip: Use 'local-mac-address' for emac1 Bin Meng
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Bin Meng @ 2021-08-04 12:30 UTC (permalink / raw)
  To: Palmer Dabbelt, Conor Dooley, Atish Patra, linux-kernel, linux-riscv
  Cc: Geert Uytterhoeven, Bin Meng

From: Bin Meng <bin.meng@windriver.com>

U-Boot expects this alias to be in place in order to fix up the mac
address of the ethernet node.

Note on the Icicle Kit board, currently only emac1 is enabled so it
becomes the 'ethernet0'.

Signed-off-by: Bin Meng <bin.meng@windriver.com>

---

Changes in v2:
- move the aliases node to board dts

 arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts
index ec79944065c9..baea7d204639 100644
--- a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts
+++ b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts
@@ -14,6 +14,10 @@ / {
 	model = "Microchip PolarFire-SoC Icicle Kit";
 	compatible = "microchip,mpfs-icicle-kit";
 
+	aliases {
+		ethernet0 = &emac1;
+	};
+
 	chosen {
 		stdout-path = &serial0;
 	};
-- 
2.25.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] riscv: dts: microchip: Use 'local-mac-address' for emac1
  2021-08-04 12:30 [PATCH v2 1/2] riscv: dts: microchip: Use 'local-mac-address' for emac1 Bin Meng
  2021-08-04 12:30 ` [PATCH v2 2/2] riscv: dts: microchip: Add ethernet0 to the aliases node Bin Meng
@ 2021-08-19  3:10 ` Bin Meng
  2021-08-24 15:41 ` Geert Uytterhoeven
  2021-08-25  4:44 ` Palmer Dabbelt
  3 siblings, 0 replies; 6+ messages in thread
From: Bin Meng @ 2021-08-19  3:10 UTC (permalink / raw)
  To: Palmer Dabbelt, Conor Dooley, Atish Patra, linux-kernel, linux-riscv
  Cc: Geert Uytterhoeven, Bin Meng

On Wed, Aug 4, 2021 at 8:30 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> From: Bin Meng <bin.meng@windriver.com>
>
> Per the DT spec, 'local-mac-address' is used to specify MAC address
> that was assigned to the network device, while 'mac-address' is used
> to specify the MAC address that was last used by the boot program,
> and shall be used only if the value differs from 'local-mac-address'
> property value.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> Reviewed-by: conor dooley <conor.dooley@microchip.com>
> ---
>
> (no changes since v1)
>
>  arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Ping?

It looks like these dts patches are still not applied...

Regards,
Bin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] riscv: dts: microchip: Use 'local-mac-address' for emac1
  2021-08-04 12:30 [PATCH v2 1/2] riscv: dts: microchip: Use 'local-mac-address' for emac1 Bin Meng
  2021-08-04 12:30 ` [PATCH v2 2/2] riscv: dts: microchip: Add ethernet0 to the aliases node Bin Meng
  2021-08-19  3:10 ` [PATCH v2 1/2] riscv: dts: microchip: Use 'local-mac-address' for emac1 Bin Meng
@ 2021-08-24 15:41 ` Geert Uytterhoeven
  2021-08-25  4:44 ` Palmer Dabbelt
  3 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2021-08-24 15:41 UTC (permalink / raw)
  To: Bin Meng
  Cc: Palmer Dabbelt, Conor Dooley, Atish Patra,
	Linux Kernel Mailing List, linux-riscv, Bin Meng, Rob Herring

Hi Bin,

On Wed, Aug 4, 2021 at 2:30 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> From: Bin Meng <bin.meng@windriver.com>
>
> Per the DT spec, 'local-mac-address' is used to specify MAC address
> that was assigned to the network device, while 'mac-address' is used
> to specify the MAC address that was last used by the boot program,
> and shall be used only if the value differs from 'local-mac-address'
> property value.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> Reviewed-by: conor dooley <conor.dooley@microchip.com>

Thanks for your patch!

> ---
>
> (no changes since v1)
>
>  arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
> index 0659068b62f7..a9c558366d61 100644
> --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
> +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
> @@ -317,7 +317,7 @@ emac1: ethernet@20112000 {
>                         reg = <0x0 0x20112000 0x0 0x2000>;
>                         interrupt-parent = <&plic>;
>                         interrupts = <70 71 72 73>;
> -                       mac-address = [00 00 00 00 00 00];
> +                       local-mac-address = [00 00 00 00 00 00];

Is there any point in providing an all-zeros MAC address at all?
Can't it just be removed?

>                         clocks = <&clkcfg 5>, <&clkcfg 2>;
>                         status = "disabled";
>                         clock-names = "pclk", "hclk";

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 2/2] riscv: dts: microchip: Add ethernet0 to the aliases node
  2021-08-04 12:30 ` [PATCH v2 2/2] riscv: dts: microchip: Add ethernet0 to the aliases node Bin Meng
@ 2021-08-24 15:46   ` Geert Uytterhoeven
  0 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2021-08-24 15:46 UTC (permalink / raw)
  To: Bin Meng
  Cc: Palmer Dabbelt, Conor Dooley, Atish Patra,
	Linux Kernel Mailing List, linux-riscv, Bin Meng

Hi Bin,

On Wed, Aug 4, 2021 at 2:30 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> From: Bin Meng <bin.meng@windriver.com>
>
> U-Boot expects this alias to be in place in order to fix up the mac
> address of the ethernet node.
>
> Note on the Icicle Kit board, currently only emac1 is enabled so it
> becomes the 'ethernet0'.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
>
> ---
>
> Changes in v2:
> - move the aliases node to board dts

Thanks for the update!

> --- a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts
> +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts
> @@ -14,6 +14,10 @@ / {
>         model = "Microchip PolarFire-SoC Icicle Kit";
>         compatible = "microchip,mpfs-icicle-kit";
>
> +       aliases {
> +               ethernet0 = &emac1;
> +       };
> +
>         chosen {
>                 stdout-path = &serial0;
>         };

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

BTW, is Ethernet working in Linux for you?
IP-Config is always timing out for me.

Thanks!

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/2] riscv: dts: microchip: Use 'local-mac-address' for emac1
  2021-08-04 12:30 [PATCH v2 1/2] riscv: dts: microchip: Use 'local-mac-address' for emac1 Bin Meng
                   ` (2 preceding siblings ...)
  2021-08-24 15:41 ` Geert Uytterhoeven
@ 2021-08-25  4:44 ` Palmer Dabbelt
  3 siblings, 0 replies; 6+ messages in thread
From: Palmer Dabbelt @ 2021-08-25  4:44 UTC (permalink / raw)
  To: bmeng.cn
  Cc: Conor.Dooley, Atish Patra, linux-kernel, linux-riscv, geert,
	bin.meng, conor.dooley

On Wed, 04 Aug 2021 05:30:14 PDT (-0700), bmeng.cn@gmail.com wrote:
> From: Bin Meng <bin.meng@windriver.com>
>
> Per the DT spec, 'local-mac-address' is used to specify MAC address
> that was assigned to the network device, while 'mac-address' is used
> to specify the MAC address that was last used by the boot program,
> and shall be used only if the value differs from 'local-mac-address'
> property value.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
> Reviewed-by: conor dooley <conor.dooley@microchip.com>
> ---
>
> (no changes since v1)
>
>  arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
> index 0659068b62f7..a9c558366d61 100644
> --- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
> +++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
> @@ -317,7 +317,7 @@ emac1: ethernet@20112000 {
>  			reg = <0x0 0x20112000 0x0 0x2000>;
>  			interrupt-parent = <&plic>;
>  			interrupts = <70 71 72 73>;
> -			mac-address = [00 00 00 00 00 00];
> +			local-mac-address = [00 00 00 00 00 00];
>  			clocks = <&clkcfg 5>, <&clkcfg 2>;
>  			status = "disabled";
>  			clock-names = "pclk", "hclk";

Thanks, these are on fixes.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-08-25  4:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04 12:30 [PATCH v2 1/2] riscv: dts: microchip: Use 'local-mac-address' for emac1 Bin Meng
2021-08-04 12:30 ` [PATCH v2 2/2] riscv: dts: microchip: Add ethernet0 to the aliases node Bin Meng
2021-08-24 15:46   ` Geert Uytterhoeven
2021-08-19  3:10 ` [PATCH v2 1/2] riscv: dts: microchip: Use 'local-mac-address' for emac1 Bin Meng
2021-08-24 15:41 ` Geert Uytterhoeven
2021-08-25  4:44 ` Palmer Dabbelt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).