at91sam9g20ek_common.dtsi 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * at91sam9g20ek_common.dtsi - Device Tree file for Atmel at91sam9g20ek board
  4. *
  5. * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
  6. */
  7. #include "at91sam9g20.dtsi"
  8. #include <dt-bindings/input/input.h>
  9. / {
  10. chosen {
  11. bootargs = "mem=64M root=/dev/mtdblock5 rw rootfstype=ubifs";
  12. stdout-path = "serial0:115200n8";
  13. };
  14. memory@20000000 {
  15. reg = <0x20000000 0x4000000>;
  16. };
  17. clocks {
  18. slow_xtal {
  19. clock-frequency = <32768>;
  20. };
  21. main_xtal {
  22. clock-frequency = <18432000>;
  23. };
  24. };
  25. ahb {
  26. apb {
  27. pinctrl@fffff400 {
  28. board {
  29. pinctrl_pck0_as_mck: pck0_as_mck {
  30. atmel,pins =
  31. <AT91_PIOC 1 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC1 periph B */
  32. };
  33. };
  34. usb1 {
  35. pinctrl_usb1_vbus_gpio: usb1_vbus_gpio {
  36. atmel,pins =
  37. <AT91_PIOC 5 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PC5 GPIO */
  38. };
  39. };
  40. mmc0_slot1 {
  41. pinctrl_board_mmc0_slot1: mmc0_slot1-board {
  42. atmel,pins =
  43. <AT91_PIOC 9 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PC9 gpio CD pin pull up and deglitch */
  44. };
  45. };
  46. };
  47. dbgu: serial@fffff200 {
  48. status = "okay";
  49. };
  50. tcb0: timer@fffa0000 {
  51. timer@0 {
  52. compatible = "atmel,tcb-timer";
  53. reg = <0>, <1>;
  54. };
  55. timer@2 {
  56. compatible = "atmel,tcb-timer";
  57. reg = <2>;
  58. };
  59. };
  60. usart0: serial@fffb0000 {
  61. pinctrl-0 =
  62. <&pinctrl_usart0
  63. &pinctrl_usart0_rts
  64. &pinctrl_usart0_cts
  65. &pinctrl_usart0_dtr_dsr
  66. &pinctrl_usart0_dcd
  67. &pinctrl_usart0_ri>;
  68. status = "okay";
  69. };
  70. usart1: serial@fffb4000 {
  71. status = "okay";
  72. };
  73. macb0: ethernet@fffc4000 {
  74. phy-mode = "rmii";
  75. status = "okay";
  76. };
  77. usb1: gadget@fffa4000 {
  78. pinctrl-0 = <&pinctrl_usb1_vbus_gpio>;
  79. pinctrl-names = "default";
  80. atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
  81. status = "okay";
  82. };
  83. mmc0: mmc@fffa8000 {
  84. pinctrl-0 = <
  85. &pinctrl_board_mmc0_slot1
  86. &pinctrl_mmc0_clk
  87. &pinctrl_mmc0_slot1_cmd_dat0
  88. &pinctrl_mmc0_slot1_dat1_3>;
  89. pinctrl-names = "default";
  90. status = "okay";
  91. slot@1 {
  92. reg = <1>;
  93. bus-width = <4>;
  94. cd-gpios = <&pioC 9 GPIO_ACTIVE_HIGH>;
  95. };
  96. };
  97. ssc0: ssc@fffbc000 {
  98. status = "okay";
  99. pinctrl-0 = <&pinctrl_ssc0_tx>;
  100. };
  101. spi0: spi@fffc8000 {
  102. cs-gpios = <0>, <&pioC 11 0>, <0>, <0>;
  103. flash@1 {
  104. compatible = "atmel,at45", "atmel,dataflash";
  105. spi-max-frequency = <50000000>;
  106. reg = <1>;
  107. };
  108. };
  109. shdwc@fffffd10 {
  110. atmel,wakeup-counter = <10>;
  111. atmel,wakeup-rtt-timer;
  112. };
  113. rtc@fffffd20 {
  114. atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
  115. status = "okay";
  116. };
  117. watchdog@fffffd40 {
  118. status = "okay";
  119. };
  120. gpbr: syscon@fffffd50 {
  121. status = "okay";
  122. };
  123. };
  124. ebi: ebi@10000000 {
  125. status = "okay";
  126. nand_controller: nand-controller {
  127. status = "okay";
  128. pinctrl-0 = <&pinctrl_nand_cs &pinctrl_nand_rb>;
  129. pinctrl-names = "default";
  130. nand@3 {
  131. reg = <0x3 0x0 0x800000>;
  132. rb-gpios = <&pioC 13 GPIO_ACTIVE_HIGH>;
  133. cs-gpios = <&pioC 14 GPIO_ACTIVE_HIGH>;
  134. nand-bus-width = <8>;
  135. nand-ecc-mode = "soft";
  136. nand-on-flash-bbt;
  137. label = "atmel_nand";
  138. partitions {
  139. compatible = "fixed-partitions";
  140. #address-cells = <1>;
  141. #size-cells = <1>;
  142. at91bootstrap@0 {
  143. label = "at91bootstrap";
  144. reg = <0x0 0x20000>;
  145. };
  146. barebox@20000 {
  147. label = "barebox";
  148. reg = <0x20000 0x40000>;
  149. };
  150. bareboxenv@60000 {
  151. label = "bareboxenv";
  152. reg = <0x60000 0x20000>;
  153. };
  154. bareboxenv2@80000 {
  155. label = "bareboxenv2";
  156. reg = <0x80000 0x20000>;
  157. };
  158. oftree@80000 {
  159. label = "oftree";
  160. reg = <0xa0000 0x20000>;
  161. };
  162. kernel@a0000 {
  163. label = "kernel";
  164. reg = <0xc0000 0x400000>;
  165. };
  166. rootfs@4a0000 {
  167. label = "rootfs";
  168. reg = <0x4c0000 0x7800000>;
  169. };
  170. data@7ca0000 {
  171. label = "data";
  172. reg = <0x7cc0000 0x8340000>;
  173. };
  174. };
  175. };
  176. };
  177. };
  178. usb0: ohci@500000 {
  179. num-ports = <2>;
  180. status = "okay";
  181. };
  182. };
  183. i2c-gpio-0 {
  184. status = "okay";
  185. 24c512@50 {
  186. compatible = "atmel,24c512";
  187. reg = <0x50>;
  188. vcc-supply = <&reg_3v3>;
  189. };
  190. wm8731: wm8731@1b {
  191. compatible = "wm8731";
  192. reg = <0x1b>;
  193. /* PCK0 at 12MHz */
  194. clocks = <&pmc PMC_TYPE_SYSTEM 8>;
  195. clock-names = "mclk";
  196. assigned-clocks = <&pmc PMC_TYPE_SYSTEM 8>;
  197. assigned-clock-rates = <12000000>;
  198. HPVDD-supply = <&vcc_dac>;
  199. AVDD-supply = <&vcc_dac>;
  200. DCVDD-supply = <&reg_3v3>;
  201. DBVDD-supply = <&reg_3v3>;
  202. };
  203. };
  204. gpio-keys {
  205. compatible = "gpio-keys";
  206. button-3 {
  207. label = "Button 3";
  208. gpios = <&pioA 30 GPIO_ACTIVE_LOW>;
  209. linux,code = <0x103>;
  210. wakeup-source;
  211. };
  212. button-4 {
  213. label = "Button 4";
  214. gpios = <&pioA 31 GPIO_ACTIVE_LOW>;
  215. linux,code = <KEY_PROG1>;
  216. wakeup-source;
  217. };
  218. };
  219. sound {
  220. compatible = "atmel,at91sam9g20ek-wm8731-audio";
  221. pinctrl-names = "default";
  222. pinctrl-0 = <&pinctrl_pck0_as_mck>;
  223. atmel,model = "wm8731 @ AT91SAMG20EK";
  224. atmel,audio-routing =
  225. "Ext Spk", "LHPOUT",
  226. "Int Mic", "MICIN";
  227. atmel,ssc-controller = <&ssc0>;
  228. atmel,audio-codec = <&wm8731>;
  229. };
  230. reg_5v: fixedregulator0 {
  231. compatible = "regulator-fixed";
  232. regulator-name = "5V";
  233. regulator-min-microvolt = <5000000>;
  234. regulator-max-microvolt = <5000000>;
  235. };
  236. reg_3v3: fixedregulator1 {
  237. compatible = "regulator-fixed";
  238. regulator-name = "3V3";
  239. vin-supply = <&reg_5v>;
  240. regulator-min-microvolt = <3300000>;
  241. regulator-max-microvolt = <3300000>;
  242. };
  243. reg_1v: fixedregulator2 {
  244. compatible = "regulator-fixed";
  245. regulator-name = "1V";
  246. vin-supply = <&reg_5v>;
  247. regulator-min-microvolt = <1000000>;
  248. regulator-max-microvolt = <1000000>;
  249. };
  250. vcc_dac: fixedregulator3 {
  251. compatible = "regulator-fixed";
  252. regulator-name = "VCC_DAC";
  253. vin-supply = <&reg_3v3>;
  254. regulator-min-microvolt = <3300000>;
  255. regulator-max-microvolt = <3300000>;
  256. };
  257. };