ar9331_arduino_yun.dts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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. #include <dt-bindings/leds/common.h>
  6. / {
  7. model = "Arduino Yun";
  8. compatible = "arduino,yun", "qca,ar9331";
  9. chosen {
  10. bootargs = "console=ttyATH0,250000";
  11. };
  12. ahb {
  13. apb {
  14. pinmux_extended: pinmux@18040030 {
  15. compatible = "pinctrl-single";
  16. reg = <0x18040030 0x4>;
  17. pinctrl-single,bit-per-mux;
  18. pinctrl-single,register-width = <32>;
  19. pinctrl-single,function-mask = <0x1>;
  20. #pinctrl-cells = <2>;
  21. enable_gpio11: pinmux_enable_gpio11 {
  22. pinctrl-single,bits = <0x0 0x200 0x200>;
  23. };
  24. };
  25. pinmux_bootstrap: pinmux@180600ac {
  26. compatible = "pinctrl-single";
  27. reg = <0x180600ac 0x4>;
  28. pinctrl-single,bit-per-mux;
  29. pinctrl-single,register-width = <32>;
  30. pinctrl-single,function-mask = <0x1>;
  31. #pinctrl-cells = <2>;
  32. enable_gpio26_gpio27: pinmux_enable_gpio26_gpio27 {
  33. pinctrl-single,bits = <0x0 0x40000 0x40000>;
  34. };
  35. };
  36. };
  37. };
  38. leds {
  39. compatible = "gpio-leds";
  40. wlan {
  41. function = LED_FUNCTION_WLAN;
  42. color = <LED_COLOR_ID_BLUE>;
  43. gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
  44. linux,default-trigger = "phy0tpt";
  45. };
  46. usb {
  47. function = LED_FUNCTION_USB;
  48. color = <LED_COLOR_ID_WHITE>;
  49. gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
  50. trigger-sources = <&hub_port>;
  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. &pinmux {
  89. pinctrl-names = "default";
  90. pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins>;
  91. };
  92. &switch_led_disable_pins {
  93. pinctrl-single,bits = <0x0 0x80 0xf8>;
  94. };
  95. &pinmux_extended {
  96. pinctrl-names = "default";
  97. pinctrl-0 = <&enable_gpio11>;
  98. };
  99. &pinmux_bootstrap {
  100. pinctrl-names = "default";
  101. pinctrl-0 = <&enable_gpio26_gpio27>;
  102. };
  103. &usb {
  104. status = "okay";
  105. dr_mode = "host";
  106. vbus-supply = <&reg_usb_vbus>;
  107. };
  108. &usb_phy {
  109. status = "okay";
  110. };
  111. &spi {
  112. status = "okay";
  113. flash@0 {
  114. compatible = "jedec,spi-nor";
  115. reg = <0>;
  116. spi-max-frequency = <50000000>;
  117. partitions {
  118. compatible = "fixed-partitions";
  119. #address-cells = <1>;
  120. #size-cells = <1>;
  121. partition@0 {
  122. label = "u-boot";
  123. reg = <0x0 0x40000>;
  124. read-only;
  125. };
  126. partition@40000 {
  127. label = "u-boot-env";
  128. reg = <0x40000 0x10000>;
  129. };
  130. partition@50000 {
  131. compatible = "denx,uimage";
  132. label = "firmware";
  133. reg = <0x50000 0xf90000>;
  134. };
  135. partition@fe0000 {
  136. label = "nvram";
  137. reg = <0xfe0000 0x10000>;
  138. };
  139. art: partition@ff0000 {
  140. label = "art";
  141. reg = <0xff0000 0x10000>;
  142. read-only;
  143. };
  144. };
  145. };
  146. };
  147. &eth0 {
  148. status = "okay";
  149. };
  150. &eth1 {
  151. status = "okay";
  152. compatible = "syscon", "simple-mfd";
  153. };
  154. &wmac {
  155. status = "okay";
  156. mtd-cal-data = <&art 0x1000>;
  157. };