027-arm64-dts-marvell-espressobin-Add-ethernet-switch-al.patch 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. From b64d814257b027e29a474bcd660f6372490138c7 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <[email protected]>
  3. Date: Mon, 7 Sep 2020 13:27:17 +0200
  4. Subject: [PATCH] arm64: dts: marvell: espressobin: Add ethernet switch aliases
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Espressobin boards have 3 ethernet ports and some of them got assigned more
  9. then one MAC address. MAC addresses are stored in U-Boot environment.
  10. Since commit a2c7023f7075c ("net: dsa: read mac address from DT for slave
  11. device") kernel can use MAC addresses from DT for particular DSA port.
  12. Currently Espressobin DTS file contains alias just for ethernet0.
  13. This patch defines additional ethernet aliases in Espressobin DTS files, so
  14. bootloader can fill correct MAC address for DSA switch ports if more MAC
  15. addresses were specified.
  16. DT alias ethernet1 is used for wan port, DT aliases ethernet2 and ethernet3
  17. are used for lan ports for both Espressobin revisions (V5 and V7).
  18. Fixes: 5253cb8c00a6f ("arm64: dts: marvell: espressobin: add ethernet alias")
  19. Cc: <[email protected]> # a2c7023f7075c: dsa: read mac address
  20. Signed-off-by: Pali Rohár <[email protected]>
  21. Reviewed-by: Andrew Lunn <[email protected]>
  22. Reviewed-by: Andre Heider <[email protected]>
  23. Signed-off-by: Gregory CLEMENT <[email protected]>
  24. ---
  25. .../dts/marvell/armada-3720-espressobin-v7-emmc.dts | 10 ++++++++--
  26. .../boot/dts/marvell/armada-3720-espressobin-v7.dts | 10 ++++++++--
  27. 3 files changed, 24 insertions(+), 8 deletions(-)
  28. --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
  29. +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
  30. @@ -15,16 +15,22 @@
  31. compatible = "globalscale,espressobin-v7-emmc", "globalscale,espressobin-v7",
  32. "globalscale,espressobin", "marvell,armada3720",
  33. "marvell,armada3710";
  34. +
  35. + aliases {
  36. + /* ethernet1 is wan port */
  37. + ethernet1 = &switch0port3;
  38. + ethernet3 = &switch0port1;
  39. + };
  40. };
  41. &ports {
  42. - port@1 {
  43. + switch0port1: port@1 {
  44. reg = <1>;
  45. label = "lan1";
  46. phy-handle = <&switch0phy0>;
  47. };
  48. - port@3 {
  49. + switch0port3: port@3 {
  50. reg = <3>;
  51. label = "wan";
  52. phy-handle = <&switch0phy2>;
  53. --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts
  54. +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts
  55. @@ -14,16 +14,22 @@
  56. model = "Globalscale Marvell ESPRESSOBin Board V7";
  57. compatible = "globalscale,espressobin-v7", "globalscale,espressobin",
  58. "marvell,armada3720", "marvell,armada3710";
  59. +
  60. + aliases {
  61. + /* ethernet1 is wan port */
  62. + ethernet1 = &switch0port3;
  63. + ethernet3 = &switch0port1;
  64. + };
  65. };
  66. &ports {
  67. - port@1 {
  68. + switch0port1: port@1 {
  69. reg = <1>;
  70. label = "lan1";
  71. phy-handle = <&switch0phy0>;
  72. };
  73. - port@3 {
  74. + switch0port3: port@3 {
  75. reg = <3>;
  76. label = "wan";
  77. phy-handle = <&switch0phy2>;