From: Marek Szyprowski <m.szyprowski@samsung.com> To: "Anand Moon" <linux.amoon@gmail.com>, "Łukasz Stelmach" <l.stelmach@samsung.com> Cc: Rob Herring <robh+dt@kernel.org>, Kukjin Kim <kgene@kernel.org>, Krzysztof Kozlowski <krzk@kernel.org>, devicetree <devicetree@vger.kernel.org>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org>, linux-samsung-soc@vger.kernel.org, Linux Kernel <linux-kernel@vger.kernel.org>, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Subject: Re: [PATCH v2] ARM: dts: exynos: Add a placeholder for a MAC address Date: Mon, 2 Nov 2020 17:22:27 +0100 [thread overview] Message-ID: <5ecd2e6d-6aaf-bff5-c000-2c56086ed95b@samsung.com> (raw) In-Reply-To: <CANAwSgSvH+q21Tj9NijPa87ju+1LOJ07-is1Sucx1y5ggT6zCA@mail.gmail.com> Hi Anand, On 01.11.2020 15:07, Anand Moon wrote: > Hi Lukasz, > > On Thu, 1 Oct 2020 at 19:25, Łukasz Stelmach <l.stelmach@samsung.com> wrote: >> Add a placeholder for a MAC address. A bootloader may fill it >> to set the MAC address and override EEPROM settings. >> >> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> >> --- >> Changes in v2: >> - use local-mac-address and leave mac-address to be added by a bootloader >> >> arch/arm/boot/dts/exynos5422-odroidxu3.dts | 18 ++++++++++++++++++ >> 1 file changed, 18 insertions(+) >> >> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts >> index db0bc17a667b..d0f6ac5fa79d 100644 >> --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts >> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts >> @@ -70,3 +70,21 @@ &pwm { >> &usbdrd_dwc3_1 { >> dr_mode = "peripheral"; >> }; >> + >> +&usbhost2 { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + hub@1 { >> + compatible = "usb8087,0024"; >> + reg = <1>; >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + ethernet: usbether@1 { >> + compatible = "usb0c45,6310"; >> + reg = <1>; >> + local-mac-address = [00 00 00 00 00 00]; /* Filled in by a bootloader */ >> + }; >> + }; >> +}; >> -- >> 2.26.2 >> > Thanks for this patch, can you share some example on how to set the > mac address via u-boot bootargs A little bit hacky script to set permanent board unique MAC address: # setexp.b u0 *0x10000014; setexp.b u1 *0x10000015; setexp.b u2 *0x10000016; setexp.b u3 *0x10000017; setenv ethaddr 0:0:${u0}:${u1}:${u2}:${u3}; setenv usbethaddr ${ethaddr}; Then if there is proper ethernet0 alias set, u-boot will then automatically save the configured MAC address to the device tree. I've just check this on recent u-boot v2020.10 and Odroid U3 board. Lukasz will send updated patch soon (with proper alias entry). If you want to hack setting MAC address manually, this will work with the current patch: # setexp.b u0 *0x10000014; setexp.b u1 *0x10000015; setexp.b u2 *0x10000016; setexp.b u3 *0x10000017; fdt addr ${fdtaddr}; fdt set /soc/usb@12110000/hub@1/usbether@1 local-mac-address [ 0 0 ${u0} ${u1} ${u2} ${u3} ] > also can you update this patch for exynos5422-odroidxu3-lite.dts and > exynos4412-odroidu3.dts. Also odroid-x2 and odroid-xu. Lukasz will take care of them. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland
WARNING: multiple messages have this Message-ID (diff)
From: Marek Szyprowski <m.szyprowski@samsung.com> To: "Anand Moon" <linux.amoon@gmail.com>, "Łukasz Stelmach" <l.stelmach@samsung.com> Cc: devicetree <devicetree@vger.kernel.org>, linux-samsung-soc@vger.kernel.org, Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>, Linux Kernel <linux-kernel@vger.kernel.org>, Krzysztof Kozlowski <krzk@kernel.org>, Rob Herring <robh+dt@kernel.org>, Kukjin Kim <kgene@kernel.org>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH v2] ARM: dts: exynos: Add a placeholder for a MAC address Date: Mon, 2 Nov 2020 17:22:27 +0100 [thread overview] Message-ID: <5ecd2e6d-6aaf-bff5-c000-2c56086ed95b@samsung.com> (raw) In-Reply-To: <CANAwSgSvH+q21Tj9NijPa87ju+1LOJ07-is1Sucx1y5ggT6zCA@mail.gmail.com> Hi Anand, On 01.11.2020 15:07, Anand Moon wrote: > Hi Lukasz, > > On Thu, 1 Oct 2020 at 19:25, Łukasz Stelmach <l.stelmach@samsung.com> wrote: >> Add a placeholder for a MAC address. A bootloader may fill it >> to set the MAC address and override EEPROM settings. >> >> Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com> >> --- >> Changes in v2: >> - use local-mac-address and leave mac-address to be added by a bootloader >> >> arch/arm/boot/dts/exynos5422-odroidxu3.dts | 18 ++++++++++++++++++ >> 1 file changed, 18 insertions(+) >> >> diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3.dts b/arch/arm/boot/dts/exynos5422-odroidxu3.dts >> index db0bc17a667b..d0f6ac5fa79d 100644 >> --- a/arch/arm/boot/dts/exynos5422-odroidxu3.dts >> +++ b/arch/arm/boot/dts/exynos5422-odroidxu3.dts >> @@ -70,3 +70,21 @@ &pwm { >> &usbdrd_dwc3_1 { >> dr_mode = "peripheral"; >> }; >> + >> +&usbhost2 { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + hub@1 { >> + compatible = "usb8087,0024"; >> + reg = <1>; >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + ethernet: usbether@1 { >> + compatible = "usb0c45,6310"; >> + reg = <1>; >> + local-mac-address = [00 00 00 00 00 00]; /* Filled in by a bootloader */ >> + }; >> + }; >> +}; >> -- >> 2.26.2 >> > Thanks for this patch, can you share some example on how to set the > mac address via u-boot bootargs A little bit hacky script to set permanent board unique MAC address: # setexp.b u0 *0x10000014; setexp.b u1 *0x10000015; setexp.b u2 *0x10000016; setexp.b u3 *0x10000017; setenv ethaddr 0:0:${u0}:${u1}:${u2}:${u3}; setenv usbethaddr ${ethaddr}; Then if there is proper ethernet0 alias set, u-boot will then automatically save the configured MAC address to the device tree. I've just check this on recent u-boot v2020.10 and Odroid U3 board. Lukasz will send updated patch soon (with proper alias entry). If you want to hack setting MAC address manually, this will work with the current patch: # setexp.b u0 *0x10000014; setexp.b u1 *0x10000015; setexp.b u2 *0x10000016; setexp.b u3 *0x10000017; fdt addr ${fdtaddr}; fdt set /soc/usb@12110000/hub@1/usbether@1 local-mac-address [ 0 0 ${u0} ${u1} ${u2} ${u3} ] > also can you update this patch for exynos5422-odroidxu3-lite.dts and > exynos4412-odroidu3.dts. Also odroid-x2 and odroid-xu. Lukasz will take care of them. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-11-02 16:22 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <CGME20200930143154eucas1p22c1560c485f5d8b8be729c76028c89c7@eucas1p2.samsung.com> 2020-09-30 14:31 ` [PATCH] ARM: dts: exynos: Add a placeholder for a MAC address Łukasz Stelmach 2020-09-30 14:31 ` Łukasz Stelmach 2020-10-01 7:22 ` Krzysztof Kozlowski 2020-10-01 7:22 ` Krzysztof Kozlowski [not found] ` <CGME20201001083615eucas1p2886f47d032844823b419a92fa02994ad@eucas1p2.samsung.com> 2020-10-01 8:36 ` Lukasz Stelmach 2020-10-01 8:36 ` Lukasz Stelmach 2020-10-01 9:16 ` Krzysztof Kozlowski 2020-10-01 9:16 ` Krzysztof Kozlowski [not found] ` <CGME20201001101051eucas1p2d6237daf16a89831e9b7b5bf106c7074@eucas1p2.samsung.com> 2020-10-01 10:10 ` Lukasz Stelmach 2020-10-01 10:10 ` Lukasz Stelmach [not found] ` <CGME20201001135310eucas1p273e3799cec0ebb29891c1b7db38685e0@eucas1p2.samsung.com> 2020-10-01 13:52 ` [PATCH v2] " Łukasz Stelmach 2020-10-01 13:52 ` Łukasz Stelmach 2020-10-01 18:46 ` Krzysztof Kozlowski 2020-10-01 18:46 ` Krzysztof Kozlowski 2020-11-01 14:07 ` Anand Moon 2020-11-01 14:07 ` Anand Moon 2020-11-02 16:22 ` Marek Szyprowski [this message] 2020-11-02 16:22 ` Marek Szyprowski 2020-11-05 8:06 ` Anand Moon 2020-11-05 8:06 ` Anand Moon 2020-11-05 8:18 ` Marek Szyprowski 2020-11-05 8:18 ` Marek Szyprowski
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=5ecd2e6d-6aaf-bff5-c000-2c56086ed95b@samsung.com \ --to=m.szyprowski@samsung.com \ --cc=b.zolnierkie@samsung.com \ --cc=devicetree@vger.kernel.org \ --cc=kgene@kernel.org \ --cc=krzk@kernel.org \ --cc=l.stelmach@samsung.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=linux.amoon@gmail.com \ --cc=robh+dt@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.