stm32746g-eval.dts 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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. * Or, alternatively,
  20. *
  21. * b) Permission is hereby granted, free of charge, to any person
  22. * obtaining a copy of this software and associated documentation
  23. * files (the "Software"), to deal in the Software without
  24. * restriction, including without limitation the rights to use,
  25. * copy, modify, merge, publish, distribute, sublicense, and/or
  26. * sell copies of the Software, and to permit persons to whom the
  27. * Software is furnished to do so, subject to the following
  28. * conditions:
  29. *
  30. * The above copyright notice and this permission notice shall be
  31. * included in all copies or substantial portions of the Software.
  32. *
  33. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  34. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  35. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  36. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  37. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  38. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  39. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  40. * OTHER DEALINGS IN THE SOFTWARE.
  41. */
  42. /dts-v1/;
  43. #include "stm32f746.dtsi"
  44. #include "stm32f746-pinctrl.dtsi"
  45. #include <dt-bindings/input/input.h>
  46. #include <dt-bindings/interrupt-controller/irq.h>
  47. / {
  48. model = "STMicroelectronics STM32746g-EVAL board";
  49. compatible = "st,stm32746g-eval", "st,stm32f746";
  50. chosen {
  51. bootargs = "root=/dev/ram";
  52. stdout-path = "serial0:115200n8";
  53. };
  54. memory@c0000000 {
  55. device_type = "memory";
  56. reg = <0xc0000000 0x2000000>;
  57. };
  58. aliases {
  59. serial0 = &usart1;
  60. };
  61. leds {
  62. compatible = "gpio-leds";
  63. led-green {
  64. gpios = <&gpiof 10 1>;
  65. linux,default-trigger = "heartbeat";
  66. };
  67. led-orange {
  68. gpios = <&stmfx_pinctrl 17 1>;
  69. };
  70. led-red {
  71. gpios = <&gpiob 7 1>;
  72. };
  73. led-blue {
  74. gpios = <&stmfx_pinctrl 19 1>;
  75. };
  76. };
  77. gpio-keys {
  78. compatible = "gpio-keys";
  79. autorepeat;
  80. button-0 {
  81. label = "Wake up";
  82. linux,code = <KEY_WAKEUP>;
  83. gpios = <&gpioc 13 0>;
  84. };
  85. };
  86. joystick {
  87. compatible = "gpio-keys";
  88. pinctrl-0 = <&joystick_pins>;
  89. pinctrl-names = "default";
  90. button-0 {
  91. label = "JoySel";
  92. linux,code = <KEY_ENTER>;
  93. interrupt-parent = <&stmfx_pinctrl>;
  94. interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
  95. };
  96. button-1 {
  97. label = "JoyDown";
  98. linux,code = <KEY_DOWN>;
  99. interrupt-parent = <&stmfx_pinctrl>;
  100. interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
  101. };
  102. button-2 {
  103. label = "JoyLeft";
  104. linux,code = <KEY_LEFT>;
  105. interrupt-parent = <&stmfx_pinctrl>;
  106. interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
  107. };
  108. button-3 {
  109. label = "JoyRight";
  110. linux,code = <KEY_RIGHT>;
  111. interrupt-parent = <&stmfx_pinctrl>;
  112. interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
  113. };
  114. button-4 {
  115. label = "JoyUp";
  116. linux,code = <KEY_UP>;
  117. interrupt-parent = <&stmfx_pinctrl>;
  118. interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
  119. };
  120. };
  121. usbotg_hs_phy: usb-phy {
  122. #phy-cells = <0>;
  123. compatible = "usb-nop-xceiv";
  124. clocks = <&rcc 0 STM32F7_AHB1_CLOCK(OTGHSULPI)>;
  125. clock-names = "main_clk";
  126. };
  127. mmc_vcard: mmc_vcard {
  128. compatible = "regulator-fixed";
  129. regulator-name = "mmc_vcard";
  130. regulator-min-microvolt = <3300000>;
  131. regulator-max-microvolt = <3300000>;
  132. };
  133. };
  134. &clk_hse {
  135. clock-frequency = <25000000>;
  136. };
  137. &crc {
  138. status = "okay";
  139. };
  140. &i2c1 {
  141. pinctrl-0 = <&i2c1_pins_b>;
  142. pinctrl-names = "default";
  143. i2c-scl-rising-time-ns = <185>;
  144. i2c-scl-falling-time-ns = <20>;
  145. status = "okay";
  146. stmfx: stmfx@42 {
  147. compatible = "st,stmfx-0300";
  148. reg = <0x42>;
  149. interrupts = <8 IRQ_TYPE_EDGE_RISING>;
  150. interrupt-parent = <&gpioi>;
  151. stmfx_pinctrl: pinctrl {
  152. compatible = "st,stmfx-0300-pinctrl";
  153. gpio-controller;
  154. #gpio-cells = <2>;
  155. interrupt-controller;
  156. #interrupt-cells = <2>;
  157. gpio-ranges = <&stmfx_pinctrl 0 0 24>;
  158. joystick_pins: joystick {
  159. pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
  160. drive-push-pull;
  161. bias-pull-up;
  162. };
  163. };
  164. };
  165. };
  166. &rtc {
  167. status = "okay";
  168. };
  169. &sdio1 {
  170. status = "okay";
  171. vmmc-supply = <&mmc_vcard>;
  172. broken-cd;
  173. pinctrl-names = "default", "opendrain";
  174. pinctrl-0 = <&sdio_pins_a>;
  175. pinctrl-1 = <&sdio_pins_od_a>;
  176. bus-width = <4>;
  177. };
  178. &timers5 {
  179. /* Override timer5 to act as clockevent */
  180. compatible = "st,stm32-timer";
  181. interrupts = <50>;
  182. status = "okay";
  183. /delete-property/#address-cells;
  184. /delete-property/#size-cells;
  185. /delete-property/clock-names;
  186. /delete-node/pwm;
  187. /delete-node/timer@4;
  188. };
  189. &usart1 {
  190. pinctrl-0 = <&usart1_pins_a>;
  191. pinctrl-names = "default";
  192. status = "okay";
  193. };
  194. &usbotg_hs {
  195. dr_mode = "otg";
  196. phys = <&usbotg_hs_phy>;
  197. phy-names = "usb2-phy";
  198. pinctrl-0 = <&usbotg_hs_pins_a>;
  199. pinctrl-names = "default";
  200. status = "okay";
  201. };