rtl8380_netgear_gigabit.dtsi 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. #include "rtl838x.dtsi"
  3. #include <dt-bindings/input/input.h>
  4. #include <dt-bindings/gpio/gpio.h>
  5. / {
  6. compatible = "realtek,rtl838x-soc";
  7. memory@0 {
  8. device_type = "memory";
  9. reg = <0x0 0x8000000>;
  10. };
  11. keys {
  12. pinctrl-names = "default";
  13. pinctrl-0 = <&pinmux_disable_sys_led>;
  14. compatible = "gpio-keys";
  15. mode {
  16. label = "reset";
  17. gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
  18. linux,code = <KEY_RESTART>;
  19. };
  20. };
  21. gpio-restart {
  22. compatible = "gpio-restart";
  23. gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
  24. open-source;
  25. };
  26. };
  27. &mdio_aux {
  28. status = "okay";
  29. gpio1: expander@31 {
  30. compatible = "realtek,rtl8231";
  31. reg = <31>;
  32. gpio-controller;
  33. #gpio-cells = <2>;
  34. gpio-ranges = <&gpio1 0 0 37>;
  35. led-controller {
  36. compatible = "realtek,rtl8231-leds";
  37. status = "disabled";
  38. };
  39. };
  40. };
  41. &ethernet0 {
  42. mdio: mdio-bus {
  43. compatible = "realtek,rtl838x-mdio";
  44. regmap = <&ethernet0>;
  45. #address-cells = <1>;
  46. #size-cells = <0>;
  47. INTERNAL_PHY(8)
  48. INTERNAL_PHY(9)
  49. INTERNAL_PHY(10)
  50. INTERNAL_PHY(11)
  51. INTERNAL_PHY(12)
  52. INTERNAL_PHY(13)
  53. INTERNAL_PHY(14)
  54. INTERNAL_PHY(15)
  55. };
  56. };
  57. &spi0 {
  58. status = "okay";
  59. flash@0 {
  60. compatible = "jedec,spi-nor";
  61. reg = <0>;
  62. spi-max-frequency = <50000000>;
  63. partitions {
  64. compatible = "fixed-partitions";
  65. #address-cells = <1>;
  66. #size-cells = <1>;
  67. partition@0 {
  68. label = "u-boot";
  69. reg = <0x0000000 0x00e0000>;
  70. read-only;
  71. };
  72. partition@e0000 {
  73. label = "u-boot-env";
  74. reg = <0x00e0000 0x0010000>;
  75. };
  76. partition@f0000 {
  77. label = "u-boot-env2";
  78. reg = <0x00f0000 0x0010000>;
  79. };
  80. partition@100000 {
  81. label = "jffs";
  82. reg = <0x0100000 0x0100000>;
  83. read-only;
  84. };
  85. partition@200000 {
  86. label = "jffs2";
  87. reg = <0x0200000 0x0100000>;
  88. read-only;
  89. };
  90. firmware: partition@300000 {
  91. label = "firmware";
  92. compatible = "openwrt,uimage", "denx,uimage";
  93. reg = <0x0300000 0x0e80000>;
  94. };
  95. partition@1180000 {
  96. label = "runtime2";
  97. reg = <0x1180000 0x0e80000>;
  98. read-only;
  99. };
  100. };
  101. };
  102. };
  103. &switch0 {
  104. ports {
  105. #address-cells = <1>;
  106. #size-cells = <0>;
  107. SWITCH_PORT(8, 1, internal)
  108. SWITCH_PORT(9, 2, internal)
  109. SWITCH_PORT(10, 3, internal)
  110. SWITCH_PORT(11, 4, internal)
  111. SWITCH_PORT(12, 5, internal)
  112. SWITCH_PORT(13, 6, internal)
  113. SWITCH_PORT(14, 7, internal)
  114. SWITCH_PORT(15, 8, internal)
  115. port@28 {
  116. ethernet = <&ethernet0>;
  117. reg = <28>;
  118. phy-mode = "internal";
  119. fixed-link {
  120. speed = <1000>;
  121. full-duplex;
  122. };
  123. };
  124. };
  125. };