ar9331_arduino_yun.dts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. #include "ar9331.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. model = "Arduino Yun";
  7. compatible = "arduino,yun", "qca,ar9331";
  8. aliases {
  9. serial0 = &uart;
  10. };
  11. chosen {
  12. bootargs = "console=ttyATH0,250000";
  13. };
  14. ahb {
  15. apb {
  16. pinmux_extended: pinmux@18040030 {
  17. compatible = "pinctrl-single";
  18. reg = <0x18040030 0x4>;
  19. pinctrl-single,bit-per-mux;
  20. pinctrl-single,register-width = <32>;
  21. pinctrl-single,function-mask = <0x1>;
  22. #pinctrl-cells = <2>;
  23. enable_gpio11: pinmux_enable_gpio11 {
  24. pinctrl-single,bits = <0x0 0x200 0x200>;
  25. };
  26. };
  27. pinmux_bootstrap: pinmux@180600ac {
  28. compatible = "pinctrl-single";
  29. reg = <0x180600ac 0x4>;
  30. pinctrl-single,bit-per-mux;
  31. pinctrl-single,register-width = <32>;
  32. pinctrl-single,function-mask = <0x1>;
  33. #pinctrl-cells = <2>;
  34. enable_gpio26_gpio27: pinmux_enable_gpio26_gpio27 {
  35. pinctrl-single,bits = <0x0 0x40000 0x40000>;
  36. };
  37. };
  38. };
  39. };
  40. leds {
  41. compatible = "gpio-leds";
  42. wlan {
  43. label = "blue:wlan";
  44. gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
  45. linux,default-trigger = "phy0tpt";
  46. };
  47. usb {
  48. label = "white:usb";
  49. gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
  50. trigger-sources = <&hub_port1>;
  51. linux,default-trigger = "usbport";
  52. };
  53. };
  54. keys {
  55. compatible = "gpio-keys";
  56. config {
  57. label = "config";
  58. linux,code = <BTN_0>;
  59. gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
  60. };
  61. };
  62. gpio-export {
  63. compatible = "gpio-export";
  64. gpio_spi_enable {
  65. gpio-export,name = "yun:oe:spi";
  66. gpio-export,output = <0>;
  67. gpios = <&gpio 21 GPIO_ACTIVE_HIGH>;
  68. };
  69. gpio_handshake_enable {
  70. gpio-export,name = "yun:oe:hs";
  71. gpio-export,output = <0>;
  72. gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
  73. };
  74. gpio_uart_enable {
  75. gpio-export,name = "yun:oe:uart";
  76. gpio-export,output = <0>;
  77. gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
  78. };
  79. };
  80. reg_usb_vbus: reg_usb_vbus {
  81. compatible = "regulator-fixed";
  82. regulator-name = "usb_vbus";
  83. regulator-min-microvolt = <5000000>;
  84. regulator-max-microvolt = <5000000>;
  85. enable-active-high;
  86. };
  87. };
  88. &uart {
  89. status = "okay";
  90. };
  91. &gpio {
  92. status = "okay";
  93. };
  94. &pinmux {
  95. pinctrl-names = "default";
  96. pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins>;
  97. };
  98. &switch_led_disable_pins {
  99. pinctrl-single,bits = <0x0 0x80 0xf8>;
  100. };
  101. &pinmux_extended {
  102. pinctrl-names = "default";
  103. pinctrl-0 = <&enable_gpio11>;
  104. };
  105. &pinmux_bootstrap {
  106. pinctrl-names = "default";
  107. pinctrl-0 = <&enable_gpio26_gpio27>;
  108. };
  109. &usb {
  110. status = "okay";
  111. #address-cells = <1>;
  112. #size-cells = <0>;
  113. dr_mode = "host";
  114. vbus-supply = <&reg_usb_vbus>;
  115. port@1 {
  116. #address-cells = <1>;
  117. #size-cells = <0>;
  118. reg = <1>;
  119. #trigger-source-cells = <0>;
  120. hub_port1: port@1 {
  121. reg = <1>;
  122. #trigger-source-cells = <0>;
  123. };
  124. };
  125. };
  126. &usb_phy {
  127. status = "okay";
  128. };
  129. &spi {
  130. status = "okay";
  131. num-cs = <1>;
  132. flash@0 {
  133. compatible = "jedec,spi-nor";
  134. reg = <0>;
  135. spi-max-frequency = <50000000>;
  136. partitions {
  137. compatible = "fixed-partitions";
  138. #address-cells = <1>;
  139. #size-cells = <1>;
  140. partition@0 {
  141. label = "u-boot";
  142. reg = <0x0 0x40000>;
  143. read-only;
  144. };
  145. partition@40000 {
  146. label = "u-boot-env";
  147. reg = <0x40000 0x10000>;
  148. };
  149. partition@50000 {
  150. compatible = "denx,uimage";
  151. label = "firmware";
  152. reg = <0x50000 0xf90000>;
  153. };
  154. partition@fe0000 {
  155. label = "nvram";
  156. reg = <0xfe0000 0x10000>;
  157. };
  158. art: partition@ff0000 {
  159. label = "art";
  160. reg = <0xff0000 0x10000>;
  161. read-only;
  162. };
  163. };
  164. };
  165. };
  166. &eth0 {
  167. status = "okay";
  168. };
  169. &eth1 {
  170. status = "okay";
  171. compatible = "syscon", "simple-mfd";
  172. };
  173. &wmac {
  174. status = "okay";
  175. mtd-cal-data = <&art 0x1000>;
  176. };