Advertisement
Guest User

Untitled

a guest
May 9th, 2023
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. #include "mt7628an.dtsi"
  2.  
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5.  
  6. / {
  7. compatible = "flashforge,adventurer-3", "mediatek,mt7628an-soc";
  8. model = "flashforge adventurer 3";
  9.  
  10. aliases {
  11. led-boot = &led_wifi;
  12. led-failsafe = &led_wifi;
  13. led-running = &led_wifi;
  14. led-upgrade = &led_wifi;
  15. };
  16.  
  17. chosen {
  18. bootargs = "console=ttyS0,115200";
  19. };
  20.  
  21. aliases {
  22. serial0 = &uart2;
  23. };
  24.  
  25. bootstrap {
  26. compatible = "flashforge,adventurer-3";
  27.  
  28. status = "okay";
  29. };
  30.  
  31. leds {
  32. compatible = "gpio-leds";
  33.  
  34. led_wifi: wifi {
  35. label = "orange:wifi";
  36. gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
  37. };
  38. };
  39.  
  40. keys {
  41. compatible = "gpio-keys";
  42.  
  43. wps {
  44. label = "reset";
  45. gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
  46. linux,code = <KEY_WPS_BUTTON>;
  47. };
  48. };
  49. };
  50.  
  51. &state_default {
  52. gpio {
  53. groups = "gpio";
  54. function = "gpio";
  55. };
  56.  
  57. refclk {
  58. groups = "refclk";
  59. function = "gpio";
  60. };
  61.  
  62. i2s {
  63. groups = "i2s";
  64. function = "gpio";
  65. };
  66.  
  67. spis {
  68. groups = "spis";
  69. function = "gpio";
  70. };
  71.  
  72. wled_an {
  73. groups = "wled_an";
  74. function = "gpio";
  75. };
  76.  
  77. wdt {
  78. groups = "wdt";
  79. function = "gpio";
  80. };
  81. };
  82.  
  83. &state_default {
  84. gpio {
  85. groups = "gpio";
  86. function = "gpio";
  87. };
  88.  
  89. refclk {
  90. groups = "refclk";
  91. function = "gpio";
  92. };
  93.  
  94. i2s {
  95. groups = "i2s";
  96. function = "gpio";
  97. };
  98.  
  99. i2c {
  100. groups = "i2c";
  101. function = "gpio";
  102. };
  103.  
  104. spis {
  105. groups = "spis";
  106. function = "gpio";
  107. };
  108.  
  109. uart1 {
  110. groups = "uart1";
  111. function = "gpio";
  112. };
  113.  
  114. pwm1 {
  115. groups = "pwm1";
  116. function = "gpio";
  117. };
  118.  
  119. wled_an {
  120. groups = "wled_an";
  121. function = "gpio";
  122. };
  123.  
  124. wdt {
  125. groups = "wdt";
  126. function = "gpio";
  127. };
  128. };
  129.  
  130. &spi0 {
  131. status = "okay";
  132.  
  133. pinctrl-names = "default";
  134. pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
  135. num-chipselects = <4>;
  136. cs-gpios = <0>, <0>, <&gpio 4 GPIO_ACTIVE_LOW>, <&gpio 5 GPIO_ACTIVE_LOW>;
  137.  
  138. mx25l6405d@0 {
  139. compatible = "macronix,mx25l6405d", "jedec,spi-nor";
  140. reg = <0>;
  141. spi-max-frequency = <40000000>;
  142.  
  143. partitions {
  144. compatible = "fixed-partitions";
  145. #address-cells = <1>;
  146. #size-cells = <1>;
  147.  
  148. partition@0 {
  149. label = "u-boot";
  150. reg = <0x0 0x30000>;
  151. read-only;
  152. };
  153.  
  154. partition@30000 {
  155. label = "u-boot-env";
  156. reg = <0x30000 0x10000>;
  157. };
  158.  
  159. factory: partition@40000 {
  160. label = "factory";
  161. reg = <0x40000 0x10000>;
  162. read-only;
  163. };
  164.  
  165. partition@50000 {
  166. compatible = "denx,uimage";
  167. label = "firmware";
  168. reg = <0x50000 0x7b0000>;
  169. };
  170. };
  171. };
  172.  
  173. ads7843@2 {
  174. #address-cells = <1>;
  175. #size-cells = <1>;
  176. compatible = "ti,ads7846";
  177. reg = <2>;
  178. spi-max-frequency = <0xea60>;
  179. ti,x-min = [00 00];
  180. ti,x-max = [1f 40];
  181. ti,y-min = [00 00];
  182. ti,y-max = [12 c0];
  183. ti,x-plate-ohms = [00 28];
  184. ti,pressure-max = [3a 98];
  185. };
  186.  
  187. ili9341@3 {
  188. #address-cells = <1>;
  189. #size-cells = <1>;
  190. compatible = "ilitek,ili9341";
  191. reg = <1>;
  192. spi-max-frequency = <24000000>;
  193. status = "okay";
  194. buswidth = <8>;
  195. backlight = <1>;
  196. debug = <8>;
  197. bgr;
  198. fps = <20>;
  199. txbuflen = <32>;
  200. reset-gpios = <&gpio 0 0>;
  201. dc-gpios = <&gpio 10 0>;
  202. led-gpios = <&gpio 3 0>;
  203. };
  204. };
  205.  
  206. &i2c {
  207. status = "okay";
  208. };
  209.  
  210. &uart2 {
  211. status = "okay";
  212. };
  213.  
  214. &pwm {
  215. status = "okay";
  216. };
  217.  
  218. &ethernet {
  219. nvmem-cells = <&macaddr_factory_2e>;
  220. nvmem-cell-names = "mac-address";
  221. };
  222.  
  223. &sdhci {
  224. status = "okay";
  225. mediatek,cd-high;
  226. };
  227.  
  228. &wmac {
  229. status = "okay";
  230.  
  231. mediatek,mtd-eeprom = <&factory 0x0>;
  232. };
  233.  
  234. &factory {
  235. compatible = "nvmem-cells";
  236. #address-cells = <1>;
  237. #size-cells = <1>;
  238.  
  239. macaddr_factory_2e: macaddr@2e {
  240. reg = <0x2e 0x6>;
  241. };
  242. };
  243.  
  244.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement