PBR-D1.dts 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. /dts-v1/;
  2. #include "mt7628an.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "d-team,pbr-d1", "mediatek,mt7628an-soc";
  7. model = "PBR-D1";
  8. aliases {
  9. led-boot = &led_power;
  10. led-failsafe = &led_power;
  11. led-running = &led_power;
  12. led-upgrade = &led_power;
  13. };
  14. chosen {
  15. bootargs = "console=ttyS0,115200";
  16. };
  17. aliases {
  18. serial0 = &uart2;
  19. };
  20. memory@0 {
  21. device_type = "memory";
  22. reg = <0x0 0x8000000>;
  23. };
  24. gpio-leds {
  25. compatible = "gpio-leds";
  26. usb {
  27. label = "pbr-d1:orange:usb";
  28. gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
  29. trigger-sources = <&ohci_port1>, <&ehci_port1>;
  30. linux,default-trigger = "usbport";
  31. default-state = "off";
  32. };
  33. led_power: power {
  34. label = "pbr-d1:orange:power";
  35. gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  36. default-state = "on";
  37. };
  38. };
  39. gpio-keys-polled {
  40. compatible = "gpio-keys-polled";
  41. poll-interval = <20>;
  42. reset {
  43. label = "reset";
  44. gpios = <&gpio1 38 GPIO_ACTIVE_LOW>;
  45. linux,code = <KEY_RESTART>;
  46. };
  47. };
  48. wgpio: gpio-wifi {
  49. compatible = "mediatek,gpio-wifi";
  50. #address-cells = <1>;
  51. #size-cells = <0>;
  52. gpio-controller;
  53. #gpio-cells = <2>;
  54. };
  55. };
  56. &pinctrl {
  57. state_default: pinctrl0 {
  58. gpio {
  59. ralink,group = "gpio";
  60. ralink,function = "gpio";
  61. };
  62. i2c {
  63. ralink,group = "i2c";
  64. ralink,function = "gpio";
  65. };
  66. i2s {
  67. ralink,group = "i2s";
  68. ralink,function = "gpio";
  69. };
  70. spis {
  71. ralink,group = "spis";
  72. ralink,function = "gpio";
  73. };
  74. wdt {
  75. ralink,group = "wdt";
  76. ralink,function = "gpio";
  77. };
  78. };
  79. };
  80. &spi0 {
  81. status = "okay";
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
  84. m25p80@0 {
  85. compatible = "jedec,spi-nor";
  86. reg = <0>;
  87. spi-max-frequency = <40000000>;
  88. m25p,chunked-io = <31>;
  89. partitions {
  90. compatible = "fixed-partitions";
  91. #address-cells = <1>;
  92. #size-cells = <1>;
  93. partition@0 {
  94. label = "u-boot";
  95. reg = <0x0 0x30000>;
  96. read-only;
  97. };
  98. partition@30000 {
  99. label = "u-boot-env";
  100. reg = <0x30000 0x10000>;
  101. };
  102. factory: partition@40000 {
  103. label = "factory";
  104. reg = <0x40000 0x10000>;
  105. read-only;
  106. };
  107. partition@50000 {
  108. label = "firmware";
  109. reg = <0x50000 0x0fb0000>;
  110. };
  111. };
  112. };
  113. spidev@1 {
  114. #address-cells = <1>;
  115. #size-cells = <1>;
  116. compatible = "linux,spidev";
  117. reg = <1>;
  118. spi-max-frequency = <40000000>;
  119. };
  120. };
  121. &i2c {
  122. status = "okay";
  123. };
  124. &uart1 {
  125. status = "okay";
  126. };
  127. &uart2 {
  128. status = "okay";
  129. };
  130. &pwm {
  131. status = "okay";
  132. };
  133. &ethernet {
  134. mtd-mac-address = <&factory 0x28>;
  135. };
  136. &sdhci {
  137. status = "okay";
  138. mediatek,cd-high;
  139. };