stm32f429-disco.dts 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. /*
  2. * Copyright 2015 - Maxime Coquelin <[email protected]>
  3. *
  4. * This file is dual-licensed: you can use it either under the terms
  5. * of the GPL or the X11 license, at your option. Note that this dual
  6. * licensing only applies to this file, and not this project as a
  7. * whole.
  8. *
  9. * a) This file is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of the
  12. * License, or (at your option) any later version.
  13. *
  14. * This file is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public
  20. * License along with this file; if not, write to the Free
  21. * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
  22. * MA 02110-1301 USA
  23. *
  24. * Or, alternatively,
  25. *
  26. * b) Permission is hereby granted, free of charge, to any person
  27. * obtaining a copy of this software and associated documentation
  28. * files (the "Software"), to deal in the Software without
  29. * restriction, including without limitation the rights to use,
  30. * copy, modify, merge, publish, distribute, sublicense, and/or
  31. * sell copies of the Software, and to permit persons to whom the
  32. * Software is furnished to do so, subject to the following
  33. * conditions:
  34. *
  35. * The above copyright notice and this permission notice shall be
  36. * included in all copies or substantial portions of the Software.
  37. *
  38. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  39. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  40. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  41. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  42. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  43. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  44. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  45. * OTHER DEALINGS IN THE SOFTWARE.
  46. */
  47. /dts-v1/;
  48. #include "stm32f429.dtsi"
  49. #include "stm32f429-pinctrl.dtsi"
  50. #include <dt-bindings/input/input.h>
  51. #include <dt-bindings/interrupt-controller/irq.h>
  52. #include <dt-bindings/gpio/gpio.h>
  53. / {
  54. model = "STMicroelectronics STM32F429i-DISCO board";
  55. compatible = "st,stm32f429i-disco", "st,stm32f429";
  56. chosen {
  57. bootargs = "root=/dev/ram";
  58. stdout-path = "serial0:115200n8";
  59. };
  60. memory@90000000 {
  61. device_type = "memory";
  62. reg = <0x90000000 0x800000>;
  63. };
  64. aliases {
  65. serial0 = &usart1;
  66. };
  67. leds {
  68. compatible = "gpio-leds";
  69. led-red {
  70. gpios = <&gpiog 14 0>;
  71. };
  72. led-green {
  73. gpios = <&gpiog 13 0>;
  74. linux,default-trigger = "heartbeat";
  75. };
  76. };
  77. gpio-keys {
  78. compatible = "gpio-keys";
  79. autorepeat;
  80. button-0 {
  81. label = "User";
  82. linux,code = <KEY_HOME>;
  83. gpios = <&gpioa 0 0>;
  84. };
  85. };
  86. /* This turns on vbus for otg for host mode (dwc2) */
  87. vcc5v_otg: vcc5v-otg-regulator {
  88. compatible = "regulator-fixed";
  89. gpio = <&gpioc 4 0>;
  90. regulator-name = "vcc5_host1";
  91. regulator-always-on;
  92. };
  93. };
  94. &clk_hse {
  95. clock-frequency = <8000000>;
  96. };
  97. &crc {
  98. status = "okay";
  99. };
  100. &i2c3 {
  101. pinctrl-names = "default";
  102. pinctrl-0 = <&i2c3_pins>;
  103. clock-frequency = <100000>;
  104. status = "okay";
  105. stmpe811@41 {
  106. compatible = "st,stmpe811";
  107. reg = <0x41>;
  108. interrupts = <15 IRQ_TYPE_EDGE_FALLING>;
  109. interrupt-parent = <&gpioa>;
  110. /* 3.25 MHz ADC clock speed */
  111. st,adc-freq = <1>;
  112. /* 12-bit ADC */
  113. st,mod-12b = <1>;
  114. /* internal ADC reference */
  115. st,ref-sel = <0>;
  116. /* ADC converstion time: 80 clocks */
  117. st,sample-time = <4>;
  118. stmpe_touchscreen {
  119. compatible = "st,stmpe-ts";
  120. /* 8 sample average control */
  121. st,ave-ctrl = <3>;
  122. /* 7 length fractional part in z */
  123. st,fraction-z = <7>;
  124. /*
  125. * 50 mA typical 80 mA max touchscreen drivers
  126. * current limit value
  127. */
  128. st,i-drive = <1>;
  129. /* 1 ms panel driver settling time */
  130. st,settling = <3>;
  131. /* 5 ms touch detect interrupt delay */
  132. st,touch-det-delay = <5>;
  133. };
  134. stmpe_adc {
  135. compatible = "st,stmpe-adc";
  136. /* forbid to use ADC channels 3-0 (touch) */
  137. st,norequest-mask = <0x0F>;
  138. };
  139. };
  140. };
  141. &ltdc {
  142. status = "okay";
  143. pinctrl-0 = <&ltdc_pins_b>;
  144. pinctrl-names = "default";
  145. port {
  146. ltdc_out_rgb: endpoint {
  147. remote-endpoint = <&panel_in_rgb>;
  148. };
  149. };
  150. };
  151. &rtc {
  152. assigned-clocks = <&rcc 1 CLK_RTC>;
  153. assigned-clock-parents = <&rcc 1 CLK_LSI>;
  154. status = "okay";
  155. };
  156. &spi5 {
  157. status = "okay";
  158. pinctrl-0 = <&spi5_pins>;
  159. pinctrl-names = "default";
  160. #address-cells = <1>;
  161. #size-cells = <0>;
  162. cs-gpios = <&gpioc 1 GPIO_ACTIVE_LOW>, <&gpioc 2 GPIO_ACTIVE_LOW>;
  163. l3gd20: l3gd20@0 {
  164. compatible = "st,l3gd20-gyro";
  165. spi-max-frequency = <10000000>;
  166. st,drdy-int-pin = <2>;
  167. interrupt-parent = <&gpioa>;
  168. interrupts = <1 IRQ_TYPE_EDGE_RISING>,
  169. <2 IRQ_TYPE_EDGE_RISING>;
  170. reg = <0>;
  171. status = "okay";
  172. };
  173. display: display@1{
  174. /* Connect panel-ilitek-9341 to ltdc */
  175. compatible = "st,sf-tc240t-9370-t", "ilitek,ili9341";
  176. reg = <1>;
  177. spi-3wire;
  178. spi-max-frequency = <10000000>;
  179. dc-gpios = <&gpiod 13 0>;
  180. port {
  181. panel_in_rgb: endpoint {
  182. remote-endpoint = <&ltdc_out_rgb>;
  183. };
  184. };
  185. };
  186. };
  187. &timers5 {
  188. /* Override timer5 to act as clockevent */
  189. compatible = "st,stm32-timer";
  190. interrupts = <50>;
  191. status = "okay";
  192. /delete-property/#address-cells;
  193. /delete-property/#size-cells;
  194. /delete-property/clock-names;
  195. /delete-node/pwm;
  196. /delete-node/timer@4;
  197. };
  198. &usart1 {
  199. pinctrl-0 = <&usart1_pins_a>;
  200. pinctrl-names = "default";
  201. status = "okay";
  202. };
  203. &usbotg_hs {
  204. compatible = "st,stm32f4x9-fsotg";
  205. dr_mode = "host";
  206. pinctrl-0 = <&usbotg_fs_pins_b>;
  207. pinctrl-names = "default";
  208. status = "okay";
  209. };