ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Subsystems (2)
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Add support for ethernet on the imx8mn-ddr4-evk.
--- arch/arm/dts/imx8mn-evk.dtsi | 1 + board/freescale/imx8mn_evk/imx8mn_evk.c | 41 +++++++++++++++++++++++-- configs/imx8mn_ddr4_evk_defconfig | 8 +++++ 3 files changed, 47 insertions(+), 3 deletions(-)
arch/arm/dts/imx8mn-evk.dtsi +1 -0
@@ -53,6 +53,7 @@ pinctrl-0 = <&pinctrl_fec1>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; fsl,magic-packet; status = "okay";
board/freescale/imx8mn_evk/imx8mn_evk.c +38 -3
56 lines not on this page · raw message
configs/imx8mn_ddr4_evk_defconfig +8 -0
@@ -43,6 +43,9 @@ CONFIG_CMD_FUSE=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_DHCP=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_CMD_REGULATOR=y CONFIG_CMD_EXT2=y
@@ -71,7 +74,12 @@ CONFIG_MMC_HS400_ES_SUPPORT=y CONFIG_MMC_HS400_SUPPORT=y CONFIG_FSL_ESDHC_IMX=y CONFIG_PHYLIB=y +CONFIG_PHY_ATHEROS=y CONFIG_DM_ETH=y +CONFIG_DM_ETH_PHY=y +CONFIG_PHY_GIGE=y +CONFIG_FEC_MXC=y +CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8M=y
Signature · 1 line
2.30.0
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Hi Marek,
Quoted 18 lines · Marek Vasut
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>--- arch/arm/dts/imx8mn-evk.dtsi | 1 + board/freescale/imx8mn_evk/imx8mn_evk.c | 41 +++++++++++++++++++++++-- configs/imx8mn_ddr4_evk_defconfig | 8 +++++ 3 files changed, 47 insertions(+), 3 deletions(-)arch/arm/dts/imx8mn-evk.dtsi +0
-0
arch/arm/dts/imx8mn-evk.dtsi line 56
Quoted 4 lines
arch/arm/dts/imx8mn-evk.dtsi +1
-0@@ -53,6 +53,7 @@ pinctrl-0 = <&pinctrl_fec1>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;
I believe this is phy reset-gpio to be part of mdio child node. any idea why it added in fec1 node?
Jagan.
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Quoted 16 lines · Jagan Teki
Hi Marek,
Quoted 13 lines · Marek Vasut
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>--- arch/arm/dts/imx8mn-evk.dtsi | 1 + board/freescale/imx8mn_evk/imx8mn_evk.c | 41 +++++++++++++++++++++++-- configs/imx8mn_ddr4_evk_defconfig | 8 +++++ 3 files changed, 47 insertions(+), 3 deletions(-)
Quoted 12 lines
arch/arm/dts/imx8mn-evk.dtsi line 56
Quoted 9 lines
arch/arm/dts/imx8mn-evk.dtsi +1
-0@@ -53,6 +53,7 @@ pinctrl-0 = <&pinctrl_fec1>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;I believe this is phy reset-gpio to be part of mdio child node. any idea why it added in fec1 node?
Try $ git grep phy-reset drivers/net/ , that should clarify it all. In short, FEC in U-Boot still uses legacy bindings.
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Quoted 31 lines · Marek Vasut
Quoted 16 lines · Jagan Teki
Hi Marek,
Quoted 13 lines · Marek Vasut
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>--- arch/arm/dts/imx8mn-evk.dtsi | 1 + board/freescale/imx8mn_evk/imx8mn_evk.c | 41 +++++++++++++++++++++++-- configs/imx8mn_ddr4_evk_defconfig | 8 +++++ 3 files changed, 47 insertions(+), 3 deletions(-)Quoted 12 lines
arch/arm/dts/imx8mn-evk.dtsi line 56
Quoted 9 lines
arch/arm/dts/imx8mn-evk.dtsi +1
-0@@ -53,6 +53,7 @@ pinctrl-0 = <&pinctrl_fec1>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;I believe this is phy reset-gpio to be part of mdio child node. any idea why it added in fec1 node?
Quoted 2 lines
Try $ git grep phy-reset
drivers/net/, that should clarify it all. In short, FEC in U-Boot still uses legacy bindings.
True. I think it's better to add this property on -u-boot.dtsi which helps to maintain Linux bindings.
Jagan.
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Quoted 32 lines · Jagan Teki
Quoted 31 lines · Marek Vasut
Quoted 28 lines · Jagan Teki
Hi Marek,
Quoted 18 lines · Marek Vasut
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>--- arch/arm/dts/imx8mn-evk.dtsi | 1 + board/freescale/imx8mn_evk/imx8mn_evk.c | 41 +++++++++++++++++++++++-- configs/imx8mn_ddr4_evk_defconfig | 8 +++++ 3 files changed, 47 insertions(+), 3 deletions(-)arch/arm/dts/imx8mn-evk.dtsi +0
-0arch/arm/dts/imx8mn-evk.dtsi line 56
Quoted 4 lines
arch/arm/dts/imx8mn-evk.dtsi +1
-0@@ -53,6 +53,7 @@ pinctrl-0 = <&pinctrl_fec1>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;I believe this is phy reset-gpio to be part of mdio child node. any idea why it added in fec1 node?
Quoted 5 lines
Quoted 2 lines
Try $ git grep phy-reset
drivers/net/, that should clarify it all. In short, FEC in U-Boot still uses legacy bindings.True. I think it's better to add this property on
-u-boot.dtsiwhich helps to maintain Linux bindings.
The reset GPIO is not specific to U-Boot in any way, so no. Instead, the Linux DT bindings should be updated too, but that's a separate topic.
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Hi Marek
Quoted 37 lines · Marek Vasut
Quoted 35 lines · Jagan Teki
Quoted 33 lines · Marek Vasut
Quoted 16 lines · Jagan Teki
Hi Marek,
Quoted 13 lines · Marek Vasut
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>--- arch/arm/dts/imx8mn-evk.dtsi | 1 + board/freescale/imx8mn_evk/imx8mn_evk.c | 41 +++++++++++++++++++++++-- configs/imx8mn_ddr4_evk_defconfig | 8 +++++ 3 files changed, 47 insertions(+), 3 deletions(-)Quoted 12 lines
arch/arm/dts/imx8mn-evk.dtsi line 56
Quoted 9 lines
arch/arm/dts/imx8mn-evk.dtsi +1
-0@@ -53,6 +53,7 @@ pinctrl-0 = <&pinctrl_fec1>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;I believe this is phy reset-gpio to be part of mdio child node. any idea why it added in fec1 node?
Try $ git grep phy-reset
drivers/net/, that should clarify it all. In short, FEC in U-Boot still uses legacy bindings.
Quoted 6 lines
Quoted 2 lines
True. I think it's better to add this property on
-u-boot.dtsiwhich helps to maintain Linux bindings.The reset GPIO is not specific to U-Boot in any way, so no. Instead, the Linux DT bindings should be updated too, but that's a separate topic.
Deprecated optional properties:
To avoid these, create a phy node according to phy.txt in the same directory, and point the fec's "phy-handle" property to it. Then use the phy's reset binding, again described by phy.txt.
- phy-reset-gpios : Should specify the gpio for phy reset
- phy-reset-duration : Reset duration in milliseconds. Should present only if property "phy-reset-gpios" is available. Missing the property will have the duration be 1 millisecond. Numbers greater than 1000 are
Jagan refer maybe that property is deprecated
Michael
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Quoted 56 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 37 lines · Marek Vasut
Quoted 35 lines · Jagan Teki
Quoted 33 lines · Marek Vasut
Quoted 16 lines · Jagan Teki
Hi Marek,
Quoted 13 lines · Marek Vasut
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>--- arch/arm/dts/imx8mn-evk.dtsi | 1 + board/freescale/imx8mn_evk/imx8mn_evk.c | 41 +++++++++++++++++++++++-- configs/imx8mn_ddr4_evk_defconfig | 8 +++++ 3 files changed, 47 insertions(+), 3 deletions(-)Quoted 12 lines
arch/arm/dts/imx8mn-evk.dtsi line 56
Quoted 9 lines
arch/arm/dts/imx8mn-evk.dtsi +1
-0@@ -53,6 +53,7 @@ pinctrl-0 = <&pinctrl_fec1>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;I believe this is phy reset-gpio to be part of mdio child node. any idea why it added in fec1 node?
Try $ git grep phy-reset
drivers/net/, that should clarify it all. In short, FEC in U-Boot still uses legacy bindings.Quoted 6 lines
Quoted 2 lines
True. I think it's better to add this property on
-u-boot.dtsiwhich helps to maintain Linux bindings.The reset GPIO is not specific to U-Boot in any way, so no. Instead, the Linux DT bindings should be updated too, but that's a separate topic.
Deprecated optional properties:
To avoid these, create a phy node according to phy.txt in the same directory, and point the fec's "phy-handle" property to it. Then use the phy's reset binding, again described by phy.txt.
- phy-reset-gpios : Should specify the gpio for phy reset
- phy-reset-duration : Reset duration in milliseconds. Should present only if property "phy-reset-gpios" is available. Missing the property will have the duration be 1 millisecond. Numbers greater than 1000 are
Quoted 1 line
Jagan refer maybe that property is deprecated
See above, U-Boot does not support the per-PHY reset bindings with FEC. However, the PHY reset GPIO binding is not U-Boot specific, so it should not be hidden in -u-boot.dtsi .
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Hi Marek
Quoted 58 lines · Marek Vasut
Quoted 56 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 37 lines · Marek Vasut
Quoted 35 lines · Jagan Teki
Quoted 33 lines · Marek Vasut
Quoted 16 lines · Jagan Teki
Hi Marek,
Quoted 13 lines · Marek Vasut
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>--- arch/arm/dts/imx8mn-evk.dtsi | 1 + board/freescale/imx8mn_evk/imx8mn_evk.c | 41 +++++++++++++++++++++++-- configs/imx8mn_ddr4_evk_defconfig | 8 +++++ 3 files changed, 47 insertions(+), 3 deletions(-)Quoted 12 lines
arch/arm/dts/imx8mn-evk.dtsi line 56
Quoted 9 lines
arch/arm/dts/imx8mn-evk.dtsi +1
-0@@ -53,6 +53,7 @@ pinctrl-0 = <&pinctrl_fec1>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;I believe this is phy reset-gpio to be part of mdio child node. any idea why it added in fec1 node?
Try $ git grep phy-reset
drivers/net/, that should clarify it all. In short, FEC in U-Boot still uses legacy bindings.Quoted 6 lines
Quoted 2 lines
True. I think it's better to add this property on
-u-boot.dtsiwhich helps to maintain Linux bindings.The reset GPIO is not specific to U-Boot in any way, so no. Instead, the Linux DT bindings should be updated too, but that's a separate topic.
Deprecated optional properties:
To avoid these, create a phy node according to phy.txt in the same directory, and point the fec's "phy-handle" property to it. Then use the phy's reset binding, again described by phy.txt.
- phy-reset-gpios : Should specify the gpio for phy reset
- phy-reset-duration : Reset duration in milliseconds. Should present only if property "phy-reset-gpios" is available. Missing the property will have the duration be 1 millisecond. Numbers greater than 1000 are
Quoted 5 lines
Quoted 1 line
Jagan refer maybe that property is deprecated
See above, U-Boot does not support the per-PHY reset bindings with FEC. However, the PHY reset GPIO binding is not U-Boot specific, so it should not be hidden in
-u-boot.dtsi.
Yes, I understand. What Jagan is proposing is the following (that you can disagree) it's
just move deprecated part in uboot.dtsi so we can keep align dtsi from linux without
having this problem.
Michael
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Quoted 67 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 58 lines · Marek Vasut
Quoted 56 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 37 lines · Marek Vasut
Quoted 35 lines · Jagan Teki
Quoted 33 lines · Marek Vasut
Quoted 16 lines · Jagan Teki
Hi Marek,
Quoted 13 lines · Marek Vasut
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>--- arch/arm/dts/imx8mn-evk.dtsi | 1 + board/freescale/imx8mn_evk/imx8mn_evk.c | 41 +++++++++++++++++++++++-- configs/imx8mn_ddr4_evk_defconfig | 8 +++++ 3 files changed, 47 insertions(+), 3 deletions(-)Quoted 12 lines
arch/arm/dts/imx8mn-evk.dtsi line 56
Quoted 9 lines
arch/arm/dts/imx8mn-evk.dtsi +1
-0@@ -53,6 +53,7 @@ pinctrl-0 = <&pinctrl_fec1>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;I believe this is phy reset-gpio to be part of mdio child node. any idea why it added in fec1 node?
Try $ git grep phy-reset
drivers/net/, that should clarify it all. In short, FEC in U-Boot still uses legacy bindings.Quoted 6 lines
Quoted 2 lines
True. I think it's better to add this property on
-u-boot.dtsiwhich helps to maintain Linux bindings.The reset GPIO is not specific to U-Boot in any way, so no. Instead, the Linux DT bindings should be updated too, but that's a separate topic.
Deprecated optional properties:
To avoid these, create a phy node according to phy.txt in the same directory, and point the fec's "phy-handle" property to it. Then use the phy's reset binding, again described by phy.txt.
- phy-reset-gpios : Should specify the gpio for phy reset
- phy-reset-duration : Reset duration in milliseconds. Should present only if property "phy-reset-gpios" is available. Missing the property will have the duration be 1 millisecond. Numbers greater than 1000 areQuoted 5 lines
Quoted 1 line
Jagan refer maybe that property is deprecated
See above, U-Boot does not support the per-PHY reset bindings with FEC. However, the PHY reset GPIO binding is not U-Boot specific, so it should not be hidden in
-u-boot.dtsi.
Quoted 5 lines
Yes, I understand. What Jagan is proposing is the following (that you can disagree) it's
just move deprecated part inuboot.dtsiso we can keep align dtsi from linux without
having this problem.
What should happen is that this same thing should be fixed in Linux, i.e. the missing bindings should be added there, and then once a DT sync happens, whoever does the sync should also then update the FEC driver to handle per-PHY resets. But that is out of scope of this patch.
What is for certain is that if the DT sync removes the reset GPIO from DT, ethernet will no longer work in U-Boot and it will show up during testing. If there is some extra property hidden in -u-boot.dtsi, this problem will not trigger test failure then.
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Quoted 79 lines · Marek Vasut
Quoted 67 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 58 lines · Marek Vasut
Quoted 56 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 37 lines · Marek Vasut
Quoted 35 lines · Jagan Teki
Quoted 33 lines · Marek Vasut
Quoted 16 lines · Jagan Teki
Hi Marek,
Quoted 13 lines · Marek Vasut
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>--- arch/arm/dts/imx8mn-evk.dtsi | 1 + board/freescale/imx8mn_evk/imx8mn_evk.c | 41 +++++++++++++++++++++++-- configs/imx8mn_ddr4_evk_defconfig | 8 +++++ 3 files changed, 47 insertions(+), 3 deletions(-)Quoted 12 lines
arch/arm/dts/imx8mn-evk.dtsi line 56
Quoted 9 lines
arch/arm/dts/imx8mn-evk.dtsi +1
-0@@ -53,6 +53,7 @@ pinctrl-0 = <&pinctrl_fec1>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;I believe this is phy reset-gpio to be part of mdio child node. any idea why it added in fec1 node?
Try $ git grep phy-reset
drivers/net/, that should clarify it all. In short, FEC in U-Boot still uses legacy bindings.Quoted 6 lines
Quoted 2 lines
True. I think it's better to add this property on
-u-boot.dtsiwhich helps to maintain Linux bindings.The reset GPIO is not specific to U-Boot in any way, so no. Instead, the Linux DT bindings should be updated too, but that's a separate topic.
Deprecated optional properties:
To avoid these, create a phy node according to phy.txt in the same directory, and point the fec's "phy-handle" property to it. Then use the phy's reset binding, again described by phy.txt.
- phy-reset-gpios : Should specify the gpio for phy reset
- phy-reset-duration : Reset duration in milliseconds. Should present only if property "phy-reset-gpios" is available. Missing the property will have the duration be 1 millisecond. Numbers greater than 1000 areQuoted 5 lines
Quoted 1 line
Jagan refer maybe that property is deprecated
See above, U-Boot does not support the per-PHY reset bindings with FEC. However, the PHY reset GPIO binding is not U-Boot specific, so it should not be hidden in
-u-boot.dtsi.Quoted 5 lines
Yes, I understand. What Jagan is proposing is the following (that you can disagree) it's
just move deprecated part inuboot.dtsiso we can keep align dtsi from linux without
having this problem.What should happen is that this same thing should be fixed in Linux, i.e. the missing bindings should be added there, and then once a DT sync happens, whoever does the sync should also then update the FEC driver to handle per-PHY resets. But that is out of scope of this patch.
Quoted 4 lines
What is for certain is that if the DT sync removes the reset GPIO from DT, ethernet will no longer work in U-Boot and it will show up during testing. If there is some extra property hidden in
-u-boot.dtsi, this problem will not trigger test failure then.
This seems like a case where the "deprecated" property needs to be populated in the upstream dts file, even if the Linux Kernel doesn't need it strictly because we do and we might not need / want to redesign our driver to meet what Linux expects yet again.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210302/3f59caa5/attachment.sig>
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Quoted 85 lines · Tom Rini
Quoted 79 lines · Marek Vasut
Quoted 67 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 58 lines · Marek Vasut
Quoted 56 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 37 lines · Marek Vasut
Quoted 35 lines · Jagan Teki
Quoted 33 lines · Marek Vasut
Quoted 16 lines · Jagan Teki
Hi Marek,
Quoted 13 lines · Marek Vasut
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>--- arch/arm/dts/imx8mn-evk.dtsi | 1 + board/freescale/imx8mn_evk/imx8mn_evk.c | 41 +++++++++++++++++++++++-- configs/imx8mn_ddr4_evk_defconfig | 8 +++++ 3 files changed, 47 insertions(+), 3 deletions(-)Quoted 12 lines
arch/arm/dts/imx8mn-evk.dtsi line 56
Quoted 9 lines
arch/arm/dts/imx8mn-evk.dtsi +1
-0@@ -53,6 +53,7 @@ pinctrl-0 = <&pinctrl_fec1>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;I believe this is phy reset-gpio to be part of mdio child node. any idea why it added in fec1 node?
Try $ git grep phy-reset
drivers/net/, that should clarify it all. In short, FEC in U-Boot still uses legacy bindings.Quoted 6 lines
Quoted 2 lines
True. I think it's better to add this property on
-u-boot.dtsiwhich helps to maintain Linux bindings.The reset GPIO is not specific to U-Boot in any way, so no. Instead, the Linux DT bindings should be updated too, but that's a separate topic.
Deprecated optional properties:
To avoid these, create a phy node according to phy.txt in the same directory, and point the fec's "phy-handle" property to it. Then use the phy's reset binding, again described by phy.txt.
- phy-reset-gpios : Should specify the gpio for phy reset
- phy-reset-duration : Reset duration in milliseconds. Should present only if property "phy-reset-gpios" is available. Missing the property will have the duration be 1 millisecond. Numbers greater than 1000 areQuoted 5 lines
Quoted 1 line
Jagan refer maybe that property is deprecated
See above, U-Boot does not support the per-PHY reset bindings with FEC. However, the PHY reset GPIO binding is not U-Boot specific, so it should not be hidden in
-u-boot.dtsi.Quoted 5 lines
Yes, I understand. What Jagan is proposing is the following (that you can disagree) it's
just move deprecated part inuboot.dtsiso we can keep align dtsi from linux without
having this problem.What should happen is that this same thing should be fixed in Linux, i.e. the missing bindings should be added there, and then once a DT sync happens, whoever does the sync should also then update the FEC driver to handle per-PHY resets. But that is out of scope of this patch.
Quoted 4 lines
What is for certain is that if the DT sync removes the reset GPIO from DT, ethernet will no longer work in U-Boot and it will show up during testing. If there is some extra property hidden in
-u-boot.dtsi, this problem will not trigger test failure then.
Quoted 4 lines
This seems like a case where the "deprecated" property needs to be populated in the upstream dts file, even if the Linux Kernel doesn't need it strictly because we do and we might not need / want to redesign our driver to meet what Linux expects yet again.
We really should fix the FEC driver, except that its way out of scope of this patch. And before someone points out that should be simple to do, there is a real unpleasant bonus with FEC and PHY reset bindings, in the ordering in which FEC generates clock for the PHY during reset, for which Linux grew a rather convoluted logic in the FEC driver and the PHY subsystem, see the LAN8710 PHY discussions in Linux which seem to pop up every now and then. So implementing the whole PHY reset handling in FEC driver, to behave just like Linux, isn't as trivial as it seems at first.
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Quoted 91 lines · Marek Vasut
Quoted 85 lines · Tom Rini
Quoted 79 lines · Marek Vasut
Quoted 67 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 58 lines · Marek Vasut
Quoted 56 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 37 lines · Marek Vasut
Quoted 35 lines · Jagan Teki
Quoted 33 lines · Marek Vasut
Quoted 16 lines · Jagan Teki
Hi Marek,
Quoted 13 lines · Marek Vasut
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>--- arch/arm/dts/imx8mn-evk.dtsi | 1 + board/freescale/imx8mn_evk/imx8mn_evk.c | 41 +++++++++++++++++++++++-- configs/imx8mn_ddr4_evk_defconfig | 8 +++++ 3 files changed, 47 insertions(+), 3 deletions(-)Quoted 12 lines
arch/arm/dts/imx8mn-evk.dtsi line 56
Quoted 9 lines
arch/arm/dts/imx8mn-evk.dtsi +1
-0@@ -53,6 +53,7 @@ pinctrl-0 = <&pinctrl_fec1>; phy-mode = "rgmii-id"; phy-handle = <ðphy0>; + phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;I believe this is phy reset-gpio to be part of mdio child node. any idea why it added in fec1 node?
Try $ git grep phy-reset
drivers/net/, that should clarify it all. In short, FEC in U-Boot still uses legacy bindings.Quoted 6 lines
Quoted 2 lines
True. I think it's better to add this property on
-u-boot.dtsiwhich helps to maintain Linux bindings.The reset GPIO is not specific to U-Boot in any way, so no. Instead, the Linux DT bindings should be updated too, but that's a separate topic.
Deprecated optional properties:
To avoid these, create a phy node according to phy.txt in the same directory, and point the fec's "phy-handle" property to it. Then use the phy's reset binding, again described by phy.txt.
- phy-reset-gpios : Should specify the gpio for phy reset
- phy-reset-duration : Reset duration in milliseconds. Should present only if property "phy-reset-gpios" is available. Missing the property will have the duration be 1 millisecond. Numbers greater than 1000 areQuoted 5 lines
Quoted 1 line
Jagan refer maybe that property is deprecated
See above, U-Boot does not support the per-PHY reset bindings with FEC. However, the PHY reset GPIO binding is not U-Boot specific, so it should not be hidden in
-u-boot.dtsi.Quoted 5 lines
Yes, I understand. What Jagan is proposing is the following (that you can disagree) it's
just move deprecated part inuboot.dtsiso we can keep align dtsi from linux without
having this problem.What should happen is that this same thing should be fixed in Linux, i.e. the missing bindings should be added there, and then once a DT sync happens, whoever does the sync should also then update the FEC driver to handle per-PHY resets. But that is out of scope of this patch.
Quoted 4 lines
What is for certain is that if the DT sync removes the reset GPIO from DT, ethernet will no longer work in U-Boot and it will show up during testing. If there is some extra property hidden in
-u-boot.dtsi, this problem will not trigger test failure then.Quoted 4 lines
This seems like a case where the "deprecated" property needs to be populated in the upstream dts file, even if the Linux Kernel doesn't need it strictly because we do and we might not need / want to redesign our driver to meet what Linux expects yet again.
Quoted 8 lines
We really should fix the FEC driver, except that its way out of scope of this patch. And before someone points out that should be simple to do, there is a real unpleasant bonus with FEC and PHY reset bindings, in the ordering in which FEC generates clock for the PHY during reset, for which Linux grew a rather convoluted logic in the FEC driver and the PHY subsystem, see the LAN8710 PHY discussions in Linux which seem to pop up every now and then. So implementing the whole PHY reset handling in FEC driver, to behave just like Linux, isn't as trivial as it seems at first.
It's out of scope for this patch, yes. And given what you note here I'm not even sure it's really required / a great idea for U-Boot. I added Rob to the list here because this is another case of "Is DT ABI or Linux driver description?".
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210302/a8390de2/attachment.sig>
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
In reply to Marek VasutQuoted 109 lines · Marek Vasut
Quoted 103 lines · Tom Rini
Quoted 94 lines · Marek Vasut
Quoted 80 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 69 lines · Marek Vasut
Quoted 67 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 42 lines · Marek Vasut
Quoted 40 lines · Jagan Teki
Quoted 38 lines · Marek Vasut
Quoted 18 lines · Jagan Teki
Hi Marek,
Quoted 14 lines · Marek Vasut
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>---
?????arch/arm/dts/imx8mn-evk.dtsi??????????? |? 1 + ?????board/freescale/imx8mn_evk/imx8mn_evk.c| 41
+++++++++++++++++++++++--
????? configs/imx8mn_ddr4_evk_defconfig?????? |? 8 +++++ ????? 3 files changed, 47 insertions(+), 3 deletions(-)Quoted 14 lines
arch/arm/dts/imx8mn-evk.dtsi line 56
Quoted 10 lines
arch/arm/dts/imx8mn-evk.dtsi +1
-0@@ -53,6 +53,7 @@ ???????????? pinctrl-0 = <&pinctrl_fec1>; ???????????? phy-mode = "rgmii-id"; ???????????? phy-handle = <ðphy0>; +?????? phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;I believe this is phy reset-gpio to be part of mdio child node. any
idea why it added in fec1 node?Try $ git grep phy-reset
drivers/net/, that should clarify it all.
In short, FEC in U-Boot still uses legacy bindings.Quoted 7 lines
Quoted 3 lines
True. I think it's better to add this property on
-u-boot.dtsiwhich
helps to maintain Linux bindings.The reset GPIO is not specific to U-Boot in any way, so no. Instead, the Linux DT bindings should be updated too, but that's a separate topic.
Deprecated optional properties:
?????????? To avoid these, create a phy node according to phy.txt in the same
?????????? directory, and point the fec's "phy-handle" property to it. Then use
?????????? the phy's reset binding, again described by phy.txt.
- phy-reset-gpios : Should specify the gpio for phy reset
- phy-reset-duration : Reset duration in milliseconds.? Should present
???? only if property "phy-reset-gpios" is available.? Missing the property
???? will have the duration be 1 millisecond.? Numbers greater than 1000 areQuoted 7 lines
Quoted 1 line
Jagan refer maybe that property is deprecated
See above, U-Boot does not support the per-PHY reset bindings with FEC.
However, the PHY reset GPIO binding is not U-Boot specific, so it should
not be hidden in-u-boot.dtsi.Quoted 5 lines
Yes, I understand. What Jagan is proposing is the following (that you can disagree) it's
just move deprecated part inuboot.dtsiso we can keep align dtsi from linux without
having this problem.What should happen is that this same thing should be fixed in Linux, i.e.
the missing bindings should be added there, and then once a DT sync happens,
whoever does the sync should also then update the FEC driver to handle per-PHY resets. But that is out of scope of this patch.Quoted 7 lines
What is for certain is that if the DT sync removes the reset GPIO from DT,
ethernet will no longer work in U-Boot and it will show up during testing.
If there is some extra property hidden in-u-boot.dtsi, this problem will
not trigger test failure then.Quoted 4 lines
This seems like a case where the "deprecated" property needs to be populated in the upstream dts file, even if the Linux Kernel doesn't need it strictly because we do and we might not need / want to redesign our driver to meet what Linux expects yet again.
Quoted 8 lines
We really should fix the FEC driver, except that its way out of scope of this patch. And before someone points out that should be simple to do, there is a real unpleasant bonus with FEC and PHY reset bindings, in the ordering in which FEC generates clock for the PHY during reset, for which Linux grew a rather convoluted logic in the FEC driver and the PHY subsystem, see the LAN8710 PHY discussions in Linux which seem to pop up every now and then. So implementing the whole PHY reset handling in FEC driver, to behave just like Linux, isn't as trivial as it seems at first.
The simple rule of thumb here is to fix the driver in u-boot, and then think about if such as big effort makes sense in U-Boot. I vote for applying this.
Regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Quoted 122 lines · Stefano Babic
Quoted 111 lines · Marek Vasut
Quoted 105 lines · Tom Rini
Quoted 96 lines · Marek Vasut
Quoted 82 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 71 lines · Marek Vasut
Quoted 69 lines · Michael Nazzareno Trimarchi
Hi Marek
Quoted 44 lines · Marek Vasut
Quoted 42 lines · Jagan Teki
Quoted 40 lines · Marek Vasut
Quoted 19 lines · Jagan Teki
Hi Marek,
Quoted 15 lines · Marek Vasut
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>---
?????arch/arm/dts/imx8mn-evk.dtsi??????????? |? 1 + ?????board/freescale/imx8mn_evk/imx8mn_evk.c
| 41 +++++++++++++++++++++++--
????? configs/imx8mn_ddr4_evk_defconfig?????? |? 8 +++++ ????? 3 files changed, 47 insertions(+), 3 deletions(-)Quoted 15 lines
arch/arm/dts/imx8mn-evk.dtsi line 56
Quoted 11 lines
diff --git
a/arch/arm/dts/imx8mn-evk.dtsib/arch/arm/dts/imx8mn-evk.dtsiindex76d042a4cf0..416fadb22b1100644arch/arm/dts/imx8mn-evk.dtsi +1
-0@@ -53,6 +53,7 @@ ???????????? pinctrl-0 = <&pinctrl_fec1>; ???????????? phy-mode = "rgmii-id"; ???????????? phy-handle = <ðphy0>; +?????? phy-reset-gpios = <&gpio4 22 GPIO_ACTIVE_LOW>;I believe this is phy reset-gpio to
be part of mdio child node. any
idea why it added in fec1 node?Try $ git grep phy-reset
drivers/net/, that should clarify it all.
In short, FEC in U-Boot still uses legacy bindings.Quoted 7 lines
Quoted 3 lines
True. I think it's better to add this
property on-u-boot.dtsiwhich
helps to maintain Linux bindings.The reset GPIO is not specific to U-Boot in any way, so no. Instead, the Linux DT bindings should be updated too, but that's a separate topic.
Deprecated optional properties:
?????????? To avoid these, create a phy node according to phy.txt in the same
?????????? directory, and point the fec's "phy-handle" property to it. Then use
?????????? the phy's reset binding, again described by phy.txt.
- phy-reset-gpios : Should specify the gpio for phy reset
- phy-reset-duration : Reset duration in milliseconds.? Should present
???? only if property "phy-reset-gpios" is available.? Missing the property
???? will have the duration be 1 millisecond.? Numbers greater than 1000 areQuoted 7 lines
Quoted 1 line
Jagan refer maybe that property is deprecated
See above, U-Boot does not support the per-PHY reset bindings with FEC.
However, the PHY reset GPIO binding is not U-Boot specific, so it should
not be hidden in-u-boot.dtsi.Quoted 5 lines
Yes, I understand. What Jagan is proposing is the following (that you can disagree) it's
just move deprecated part inuboot.dtsiso we can keep align dtsi from linux without
having this problem.What should happen is that this same thing should be fixed in Linux, i.e.
the missing bindings should be added there, and then once a DT sync happens,
whoever does the sync should also then update the FEC driver to handle per-PHY resets. But that is out of scope of this patch.Quoted 7 lines
What is for certain is that if the DT sync removes the reset GPIO from DT,
ethernet will no longer work in U-Boot and it will show up during testing.
If there is some extra property hidden in-u-boot.dtsi, this problem will
not trigger test failure then.Quoted 4 lines
This seems like a case where the "deprecated" property needs to be populated in the upstream dts file, even if the Linux Kernel doesn't need it strictly because we do and we might not need / want to redesign our driver to meet what Linux expects yet again.
Quoted 9 lines
We really should fix the FEC driver, except that its way out of scope of this patch. And before someone points out that should be simple to do, there is a real unpleasant bonus with FEC and PHY reset bindings, in the ordering in which FEC generates clock for the PHY during reset, for which Linux grew a rather convoluted logic in the FEC driver and the PHY subsystem, see the LAN8710 PHY discussions in Linux which seem to pop up every now and then. So implementing the whole PHY reset handling in FEC driver, to behave just like Linux, isn't as trivial as it seems at first.
Quoted 2 lines
The simple rule of thumb here is to fix the driver in u-boot, and then think about if such as big effort makes sense in U-Boot. I vote for applying this.
To be extra clear, I too believe this patch should come in.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210302/397bb650/attachment.sig>
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
In reply to Marek VasutQuoted 5 lines
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH 1/1 ARM: imx: imx8mn-ddr4-evk: Add ethernet support
Hi Marek,
sorry, false positive. This patch creates warnings for the imx8mn_evk board:
aarch64: + imx8mn_evk
+(imx8mn_evk) board/freescale/imx8mn_evk/imx8mn_evk.c: In function 'board_init':
+(imx8mn_evk) board/freescale/imx8mn_evk/imx8mn_evk.c:53:3: error:
implicit declaration of function 'setup_fec' [-Werror=implicit-function-declaration]
+(imx8mn_evk) 53 | setup_fec(); +(imx8mn_evk) | ^~~~~~~~~
+(imx8mn_evk) cc1: all warnings being treated as errors +(imx8mn_evk) make[2]: *** [scripts/Makefile.build:266:board/freescale/imx8mn_evk/imx8mn_evk.o] Error 1 +(imx8mn_evk) make[1]: *** [Makefile:1746: board/freescale/imx8mn_evk] Error 2
+(imx8mn_evk) make: *** [Makefile:171: sub-make] Error 2
Can you check this ? Thanks !
Best regards,
Stefano
Quoted 10 lines · sbabic at denx.de
Quoted 5 lines
Add support for ethernet on the imx8mn-ddr4-evk.
Signed-off-by Marek Vasut <[email protected]>Cc Fabio Estevam <[email protected]>Cc Peng Fan <[email protected]>Cc Stefano Babic <[email protected]>Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic