* [PATCH 2/2] imx6qdl.dtsi: use MAC-address from nvmem
@ 2022-11-02 14:27 Nikolaus Voss
2022-12-31 6:49 ` Shawn Guo
2023-01-01 2:32 ` Shawn Guo
0 siblings, 2 replies; 5+ messages in thread
From: Nikolaus Voss @ 2022-11-02 14:27 UTC (permalink / raw)
To: Srinivas Kandagatla, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Krzysztof Kozlowski, Rob Herring, nv
Cc: linux-arm-kernel, linux-kernel, devicetree
IMX6QDL has fuse locations specified for storing the MAC for the
built-in ethernet (Table 5-8 in Reference Manual).
Define the fuse location in ocotp and refer to them in fec-ethernet.
If the cells are not flashed, the driver behavior is unchanged, i.e.
other MAC sources will be probed and a random MAC will be used as a
last resort.
Signed-off-by: Nikolaus Voss <nikolaus.voss@haag-streit.com>
---
arch/arm/boot/dts/imx6qdl.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index 4f7fefc14d0ac..7449d554ef1aa 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -1053,6 +1053,8 @@ fec: ethernet@2188000 {
<&clks IMX6QDL_CLK_ENET_REF>;
clock-names = "ipg", "ahb", "ptp", "enet_out";
fsl,stop-mode = <&gpr 0x34 27>;
+ nvmem-cells = <&fec_mac_addr>;
+ nvmem-cell-names = "mac-address";
status = "disabled";
};
@@ -1186,6 +1188,10 @@ tempmon_calib: calib@38 {
tempmon_temp_grade: temp-grade@20 {
reg = <0x20 4>;
};
+
+ fec_mac_addr: mac-addr@88 {
+ reg = <0x88 6>;
+ };
};
tzasc@21d0000 { /* TZASC1 */
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] imx6qdl.dtsi: use MAC-address from nvmem
2022-11-02 14:27 [PATCH 2/2] imx6qdl.dtsi: use MAC-address from nvmem Nikolaus Voss
@ 2022-12-31 6:49 ` Shawn Guo
2022-12-31 17:08 ` Andrew Lunn
2023-01-01 2:32 ` Shawn Guo
1 sibling, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2022-12-31 6:49 UTC (permalink / raw)
To: Nikolaus Voss
Cc: Srinivas Kandagatla, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Krzysztof Kozlowski, Rob Herring,
nv, linux-arm-kernel, linux-kernel, devicetree
On Wed, Nov 02, 2022 at 03:27:19PM +0100, Nikolaus Voss wrote:
> IMX6QDL has fuse locations specified for storing the MAC for the
> built-in ethernet (Table 5-8 in Reference Manual).
> Define the fuse location in ocotp and refer to them in fec-ethernet.
>
> If the cells are not flashed, the driver behavior is unchanged, i.e.
> other MAC sources will be probed and a random MAC will be used as a
> last resort.
>
> Signed-off-by: Nikolaus Voss <nikolaus.voss@haag-streit.com>
> ---
> arch/arm/boot/dts/imx6qdl.dtsi | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
> index 4f7fefc14d0ac..7449d554ef1aa 100644
> --- a/arch/arm/boot/dts/imx6qdl.dtsi
> +++ b/arch/arm/boot/dts/imx6qdl.dtsi
> @@ -1053,6 +1053,8 @@ fec: ethernet@2188000 {
> <&clks IMX6QDL_CLK_ENET_REF>;
> clock-names = "ipg", "ahb", "ptp", "enet_out";
> fsl,stop-mode = <&gpr 0x34 27>;
> + nvmem-cells = <&fec_mac_addr>;
> + nvmem-cell-names = "mac-address";
May I ask where is the support of FEC driver for this?
Shawn
> status = "disabled";
> };
>
> @@ -1186,6 +1188,10 @@ tempmon_calib: calib@38 {
> tempmon_temp_grade: temp-grade@20 {
> reg = <0x20 4>;
> };
> +
> + fec_mac_addr: mac-addr@88 {
> + reg = <0x88 6>;
> + };
> };
>
> tzasc@21d0000 { /* TZASC1 */
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] imx6qdl.dtsi: use MAC-address from nvmem
2022-12-31 6:49 ` Shawn Guo
@ 2022-12-31 17:08 ` Andrew Lunn
2023-01-01 2:19 ` Shawn Guo
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2022-12-31 17:08 UTC (permalink / raw)
To: Shawn Guo
Cc: Nikolaus Voss, Srinivas Kandagatla, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Krzysztof Kozlowski, Rob Herring, nv, linux-arm-kernel,
linux-kernel, devicetree
> > @@ -1053,6 +1053,8 @@ fec: ethernet@2188000 {
> > <&clks IMX6QDL_CLK_ENET_REF>;
> > clock-names = "ipg", "ahb", "ptp", "enet_out";
> > fsl,stop-mode = <&gpr 0x34 27>;
> > + nvmem-cells = <&fec_mac_addr>;
> > + nvmem-cell-names = "mac-address";
>
> May I ask where is the support of FEC driver for this?
The fec uses of_get_mac_address() which calls
of_get_mac_address_nvmem() as its last place to look for the MAC
address.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] imx6qdl.dtsi: use MAC-address from nvmem
2022-12-31 17:08 ` Andrew Lunn
@ 2023-01-01 2:19 ` Shawn Guo
0 siblings, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2023-01-01 2:19 UTC (permalink / raw)
To: Andrew Lunn
Cc: Nikolaus Voss, Srinivas Kandagatla, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Krzysztof Kozlowski, Rob Herring, nv, linux-arm-kernel,
linux-kernel, devicetree
On Sat, Dec 31, 2022 at 06:08:41PM +0100, Andrew Lunn wrote:
> > > @@ -1053,6 +1053,8 @@ fec: ethernet@2188000 {
> > > <&clks IMX6QDL_CLK_ENET_REF>;
> > > clock-names = "ipg", "ahb", "ptp", "enet_out";
> > > fsl,stop-mode = <&gpr 0x34 27>;
> > > + nvmem-cells = <&fec_mac_addr>;
> > > + nvmem-cell-names = "mac-address";
> >
> > May I ask where is the support of FEC driver for this?
>
> The fec uses of_get_mac_address() which calls
> of_get_mac_address_nvmem() as its last place to look for the MAC
> address.
Ah, of_get_mac_address() gets extended to call of_get_mac_address_nvmem()
nowadays. Thanks, Andrew!
Shawn
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] imx6qdl.dtsi: use MAC-address from nvmem
2022-11-02 14:27 [PATCH 2/2] imx6qdl.dtsi: use MAC-address from nvmem Nikolaus Voss
2022-12-31 6:49 ` Shawn Guo
@ 2023-01-01 2:32 ` Shawn Guo
1 sibling, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2023-01-01 2:32 UTC (permalink / raw)
To: Nikolaus Voss
Cc: Srinivas Kandagatla, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Krzysztof Kozlowski, Rob Herring,
nv, linux-arm-kernel, linux-kernel, devicetree
On Wed, Nov 02, 2022 at 03:27:19PM +0100, Nikolaus Voss wrote:
> IMX6QDL has fuse locations specified for storing the MAC for the
> built-in ethernet (Table 5-8 in Reference Manual).
> Define the fuse location in ocotp and refer to them in fec-ethernet.
>
> If the cells are not flashed, the driver behavior is unchanged, i.e.
> other MAC sources will be probed and a random MAC will be used as a
> last resort.
>
> Signed-off-by: Nikolaus Voss <nikolaus.voss@haag-streit.com>
I fixed the patch subject prefix like:
ARM: dts: imx6qdl: use MAC-address from nvmem
Applied, thanks!
Shawn
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-01 2:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02 14:27 [PATCH 2/2] imx6qdl.dtsi: use MAC-address from nvmem Nikolaus Voss
2022-12-31 6:49 ` Shawn Guo
2022-12-31 17:08 ` Andrew Lunn
2023-01-01 2:19 ` Shawn Guo
2023-01-01 2:32 ` Shawn Guo
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).