mt7981b-unielec-u7981-01.dtsi 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /*
  3. * Copyright (C) 2023 Allen Zhao <[email protected]>
  4. */
  5. /dts-v1/;
  6. #include "mt7981.dtsi"
  7. / {
  8. model = "Unielec U7981-01 (EMMC)";
  9. compatible = "unielec,u7981-01-emmc", "mediatek,mt7981";
  10. chosen {
  11. bootargs = "console=ttyS0,115200n1 loglevel=8 \
  12. earlycon=uart8250,mmio32,0x11002000 \
  13. ";
  14. };
  15. gpio-keys {
  16. compatible = "gpio-keys";
  17. reset {
  18. label = "reset";
  19. linux,code = <KEY_RESTART>;
  20. gpios = <&pio 1 GPIO_ACTIVE_LOW>;
  21. };
  22. };
  23. };
  24. &uart0 {
  25. status = "okay";
  26. };
  27. &watchdog {
  28. status = "okay";
  29. };
  30. &eth {
  31. pinctrl-names = "default";
  32. pinctrl-0 = <&mdio_pins &gbe_led0_pins &gbe_led1_pins>;
  33. status = "okay";
  34. gmac0: mac@0 {
  35. /* LAN */
  36. compatible = "mediatek,eth-mac";
  37. reg = <0>;
  38. phy-mode = "2500base-x";
  39. fixed-link {
  40. speed = <2500>;
  41. full-duplex;
  42. pause;
  43. };
  44. };
  45. gmac1: mac@1 {
  46. /* WAN */
  47. compatible = "mediatek,eth-mac";
  48. reg = <1>;
  49. phy-mode = "gmii";
  50. phy-handle = <&int_gbe_phy>;
  51. };
  52. };
  53. &mdio_bus {
  54. switch: switch@1f {
  55. compatible = "mediatek,mt7531";
  56. reg = <31>;
  57. reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
  58. interrupt-controller;
  59. #interrupt-cells = <1>;
  60. interrupt-parent = <&pio>;
  61. interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
  62. };
  63. };
  64. &switch {
  65. ports {
  66. #address-cells = <1>;
  67. #size-cells = <0>;
  68. port@0 {
  69. reg = <0>;
  70. label = "lan1";
  71. };
  72. port@1 {
  73. reg = <1>;
  74. label = "lan2";
  75. };
  76. port@2 {
  77. reg = <2>;
  78. label = "lan3";
  79. };
  80. port@3 {
  81. reg = <3>;
  82. label = "lan4";
  83. };
  84. port@6 {
  85. reg = <6>;
  86. label = "cpu";
  87. ethernet = <&gmac0>;
  88. phy-mode = "2500base-x";
  89. fixed-link {
  90. speed = <2500>;
  91. full-duplex;
  92. pause;
  93. };
  94. };
  95. };
  96. };
  97. &usb_phy {
  98. status = "okay";
  99. };
  100. &xhci {
  101. mediatek,u3p-dis-msk = <0x0>;
  102. phys = <&u2port0 PHY_TYPE_USB2>,
  103. <&u3port0 PHY_TYPE_USB3>;
  104. status = "okay";
  105. };