at91-kizbox3_common.dtsi 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * at91-kizbox3.dts - Device Tree Include file for Overkiz Kizbox 3
  4. * family SoC boards
  5. *
  6. * Copyright (C) 2018 Overkiz SAS
  7. *
  8. * Authors: Dorian Rocipon <[email protected]>
  9. * Kevin Carli <[email protected]>
  10. * Mickael Gardet <[email protected]>
  11. */
  12. /dts-v1/;
  13. #include "sama5d2.dtsi"
  14. #include "sama5d2-pinfunc.h"
  15. #include <dt-bindings/gpio/gpio.h>
  16. #include <dt-bindings/mfd/atmel-flexcom.h>
  17. #include <dt-bindings/pinctrl/at91.h>
  18. #include <dt-bindings/pwm/pwm.h>
  19. / {
  20. model = "Overkiz Kizbox3";
  21. compatible = "overkiz,kizbox3", "atmel,sama5d2", "atmel,sama5";
  22. aliases {
  23. serial0 = &uart0;
  24. serial1 = &uart1;
  25. serial2 = &uart2;
  26. serial3 = &uart3;
  27. serial4 = &uart4;
  28. serial5 = &uart5;
  29. serial6 = &uart8;
  30. };
  31. chosen {
  32. bootargs = "ubi.mtd=ubi";
  33. stdout-path = "serial1:115200n8";
  34. };
  35. clocks {
  36. slow_xtal {
  37. clock-frequency = <32768>;
  38. };
  39. main_xtal {
  40. clock-frequency = <12000000>;
  41. };
  42. };
  43. vdd_adc_vddana: supply_3v3_ana {
  44. compatible = "regulator-fixed";
  45. regulator-name = "adc-vddana";
  46. regulator-min-microvolt = <3300000>;
  47. regulator-max-microvolt = <3300000>;
  48. regulator-always-on;
  49. };
  50. vdd_adc_vref: supply_3v3_ref {
  51. compatible = "regulator-fixed";
  52. regulator-name = "adc-vref";
  53. regulator-min-microvolt = <3300000>;
  54. regulator-max-microvolt = <3300000>;
  55. regulator-always-on;
  56. };
  57. led-controller-1 {
  58. compatible = "pwm-leds";
  59. pinctrl-names = "default";
  60. pinctrl-0 = <&pinctrl_pwm0_pwm_h0
  61. &pinctrl_pwm0_pwm_h1
  62. &pinctrl_pwm0_pwm_h2
  63. &pinctrl_pwm0_pwm_h3>;
  64. status = "disabled";
  65. led-1 {
  66. label = "pwm:red:user";
  67. pwms = <&pwm0 0 10000000 0>;
  68. max-brightness = <255>;
  69. linux,default-trigger = "default-on";
  70. status = "disabled";
  71. };
  72. led-2 {
  73. label = "pwm:green:user";
  74. pwms = <&pwm0 1 10000000 0>;
  75. max-brightness = <255>;
  76. linux,default-trigger = "default-on";
  77. status = "disabled";
  78. };
  79. led-3 {
  80. label = "pwm:blue:user";
  81. pwms = <&pwm0 2 10000000 0>;
  82. max-brightness = <255>;
  83. status = "disabled";
  84. };
  85. led-4 {
  86. label = "pwm:white:user";
  87. pwms = <&pwm0 3 10000000 0>;
  88. max-brightness = <255>;
  89. status = "disabled";
  90. };
  91. };
  92. };
  93. &ebi {
  94. status = "okay";
  95. };
  96. &nand_controller {
  97. status = "okay";
  98. nand@3 {
  99. pinctrl-0 = <&pinctrl_ebi_nand_addr>;
  100. pinctrl-names = "default";
  101. reg = <0x3 0x0 0x800000>;
  102. atmel,rb = <0>;
  103. nand-bus-width = <8>;
  104. nand-ecc-mode = "hw";
  105. nand-ecc-strength = <4>;
  106. nand-ecc-step-size = <512>;
  107. nand-on-flash-bbt;
  108. label = "atmel_nand";
  109. partitions {
  110. compatible = "fixed-partitions";
  111. #address-cells = <1>;
  112. #size-cells = <1>;
  113. bootstrap@0 {
  114. label = "bootstrap";
  115. reg = <0x0 0x20000>;
  116. };
  117. u-boot@20000 {
  118. label = "u-boot";
  119. reg = <0x20000 0x140000>;
  120. };
  121. u-boot-factory@160000 {
  122. label = "u-boot-factory";
  123. reg = <0x160000 0x140000>;
  124. };
  125. ubi@2A0000 {
  126. label = "ubi";
  127. reg = <0x2A0000 0x7D60000>;
  128. };
  129. };
  130. };
  131. };
  132. &rtc {
  133. status = "okay";
  134. };
  135. &pioA {
  136. pinctrl_ebi_nand_addr: ebi-addr-1 {
  137. pinmux = <PIN_PA0__D0>,
  138. <PIN_PA1__D1>,
  139. <PIN_PA2__D2>,
  140. <PIN_PA3__D3>,
  141. <PIN_PA4__D4>,
  142. <PIN_PA5__D5>,
  143. <PIN_PA6__D6>,
  144. <PIN_PA7__D7>,
  145. <PIN_PA8__NWE_NANDWE>,
  146. <PIN_PA9__NCS3>,
  147. <PIN_PA10__A21_NANDALE>,
  148. <PIN_PA11__A22_NANDCLE>,
  149. <PIN_PA21__NANDRDY>;
  150. bias-disable;
  151. };
  152. pinctrl_usart {
  153. pinctrl_usart_0: usart0-0 {
  154. pinmux = < PIN_PB26__URXD0>, <PIN_PB27__UTXD0>;
  155. bias-disable;
  156. };
  157. pinctrl_usart_1: usart1-0 {
  158. pinmux = < PIN_PD2__URXD1>, <PIN_PD3__UTXD1>;
  159. bias-disable;
  160. };
  161. pinctrl_usart_2: usart2-0 {
  162. pinmux = < PIN_PD4__URXD2>, <PIN_PD5__UTXD2>;
  163. bias-disable;
  164. };
  165. pinctrl_usart_3: usart3-0 {
  166. pinmux = < PIN_PC12__URXD3>, <PIN_PC13__UTXD3>;
  167. bias-disable;
  168. };
  169. pinctrl_usart_4: usart4-0 {
  170. pinmux = < PIN_PB3__URXD4>, <PIN_PB4__UTXD4>;
  171. bias-disable;
  172. };
  173. pinctrl_flx0_default: flx0_usart_default {
  174. pinmux = <PIN_PB28__FLEXCOM0_IO0>, //TX
  175. <PIN_PB29__FLEXCOM0_IO1>; //RX
  176. bias-disable;
  177. };
  178. pinctrl_flx3_default: flx3_usart_default {
  179. pinmux = <PIN_PB22__FLEXCOM3_IO1>, //RX
  180. <PIN_PB23__FLEXCOM3_IO0>; //TX
  181. bias-disable;
  182. };
  183. };
  184. pinctrl_flx4_default: flx4_i2c6_default {
  185. pinmux = <PIN_PD12__FLEXCOM4_IO0>, //DATA
  186. <PIN_PD13__FLEXCOM4_IO1>; //CLK
  187. bias-disable;
  188. drive-open-drain = <1>;
  189. };
  190. pinctrl_pwm0 {
  191. pinctrl_pwm0_pwm_h0: pwm0_pwm_h0 {
  192. pinmux = <PIN_PA30__PWMH0>;
  193. bias-disable;
  194. };
  195. pinctrl_pwm0_pwm_h1: pwm0_pwmh1 {
  196. pinmux = <PIN_PB0__PWMH1>;
  197. bias-disable;
  198. };
  199. pinctrl_pwm0_pwm_h2: pwm0_pwm_h2 {
  200. pinmux = <PIN_PB5__PWMH2>;
  201. bias-disable;
  202. };
  203. pinctrl_pwm0_pwm_h3: pwm0_pwm_h3 {
  204. pinmux = <PIN_PB7__PWMH3>;
  205. bias-disable;
  206. };
  207. };
  208. pinctrl_adc {
  209. pinctrl_adc2: adc2 {
  210. pinmux = <PIN_PD21__GPIO>;
  211. bias-disable;
  212. };
  213. pinctrl_adc3: adc3 {
  214. pinmux = <PIN_PD22__GPIO>;
  215. bias-disable;
  216. };
  217. pinctrl_adc4: adc4 {
  218. pinmux = <PIN_PD23__GPIO>;
  219. bias-disable;
  220. };
  221. pinctrl_adc5: adc5 {
  222. pinmux = <PIN_PD24__GPIO>;
  223. bias-disable;
  224. };
  225. };
  226. };
  227. &uart0 {
  228. pinctrl-names = "default";
  229. pinctrl-0 = <&pinctrl_usart_0>;
  230. atmel,use-dma-rx;
  231. atmel,use-dma-tx;
  232. status = "disabled";
  233. };
  234. /* debug uart */
  235. &uart1 {
  236. pinctrl-names = "default";
  237. pinctrl-0 = <&pinctrl_usart_1>;
  238. atmel,use-dma-rx;
  239. atmel,use-dma-tx;
  240. status = "disabled";
  241. };
  242. &uart2 {
  243. pinctrl-names = "default";
  244. pinctrl-0 = <&pinctrl_usart_2>;
  245. atmel,use-dma-rx;
  246. atmel,use-dma-tx;
  247. status = "disabled";
  248. };
  249. &uart3 {
  250. pinctrl-names = "default";
  251. pinctrl-0 = <&pinctrl_usart_3>;
  252. atmel,use-dma-rx;
  253. atmel,use-dma-tx;
  254. status = "disabled";
  255. };
  256. &uart4 {
  257. pinctrl-names = "default";
  258. pinctrl-0 = <&pinctrl_usart_4>;
  259. atmel,use-dma-rx;
  260. atmel,use-dma-tx;
  261. status = "disabled";
  262. };
  263. &flx0 {
  264. atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
  265. status = "disabled";
  266. uart5: serial@200 {
  267. pinctrl-names = "default";
  268. pinctrl-0 = <&pinctrl_flx0_default>;
  269. atmel,use-dma-rx;
  270. atmel,use-dma-tx;
  271. status = "disabled";
  272. };
  273. };
  274. &flx3 {
  275. atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
  276. status = "disabled";
  277. uart8: serial@200 {
  278. pinctrl-names = "default";
  279. pinctrl-0 = <&pinctrl_flx3_default>;
  280. atmel,use-dma-rx;
  281. atmel,use-dma-tx;
  282. status = "disabled";
  283. };
  284. };
  285. &flx4 {
  286. atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
  287. status = "disabled";
  288. i2c6: i2c@600 {
  289. pinctrl-names = "default";
  290. pinctrl-0 = <&pinctrl_flx4_default>;
  291. status = "disabled";
  292. };
  293. };
  294. &pwm0 {
  295. status = "okay";
  296. };
  297. &shutdown_controller {
  298. debounce-delay-us = <976>;
  299. atmel,wakeup-rtc-timer;
  300. input@0 {
  301. reg = <0>;
  302. };
  303. };
  304. &watchdog {
  305. status = "okay";
  306. };
  307. &adc {
  308. pinctrl-names = "default";
  309. pinctrl-0 = <&pinctrl_adc2
  310. &pinctrl_adc3
  311. &pinctrl_adc4
  312. &pinctrl_adc5>;
  313. vddana-supply = <&vdd_adc_vddana>;
  314. vref-supply = <&vdd_adc_vref>;
  315. status = "disabled";
  316. };
  317. &securam {
  318. export;
  319. /* export overkiz u-boot mode/version and factory */
  320. uboot@1400 {
  321. reg = <0x1400 0x20>;
  322. export;
  323. };
  324. };