PageRenderTime 26ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/arm/boot/dts/stm32746g-eval.dts

http://github.com/torvalds/linux
Device Tree | 212 lines | 151 code | 20 blank | 41 comment | 0 complexity | 5e8fc50d1640908a68718f0af29bc948 MD5 | raw file
Possible License(s): LGPL-2.0, AGPL-1.0, GPL-2.0
  1. /*
  2. * Copyright 2015 - Maxime Coquelin <mcoquelin.stm32@gmail.com>
  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. green {
  64. gpios = <&gpiof 10 1>;
  65. linux,default-trigger = "heartbeat";
  66. };
  67. orange {
  68. gpios = <&stmfx_pinctrl 17 1>;
  69. };
  70. red {
  71. gpios = <&gpiob 7 1>;
  72. };
  73. blue {
  74. gpios = <&stmfx_pinctrl 19 1>;
  75. };
  76. };
  77. gpio_keys {
  78. compatible = "gpio-keys";
  79. #address-cells = <1>;
  80. #size-cells = <0>;
  81. autorepeat;
  82. button@0 {
  83. label = "Wake up";
  84. linux,code = <KEY_WAKEUP>;
  85. gpios = <&gpioc 13 0>;
  86. };
  87. };
  88. joystick {
  89. compatible = "gpio-keys";
  90. pinctrl-0 = <&joystick_pins>;
  91. pinctrl-names = "default";
  92. button-0 {
  93. label = "JoySel";
  94. linux,code = <KEY_ENTER>;
  95. interrupt-parent = <&stmfx_pinctrl>;
  96. interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
  97. };
  98. button-1 {
  99. label = "JoyDown";
  100. linux,code = <KEY_DOWN>;
  101. interrupt-parent = <&stmfx_pinctrl>;
  102. interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
  103. };
  104. button-2 {
  105. label = "JoyLeft";
  106. linux,code = <KEY_LEFT>;
  107. interrupt-parent = <&stmfx_pinctrl>;
  108. interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
  109. };
  110. button-3 {
  111. label = "JoyRight";
  112. linux,code = <KEY_RIGHT>;
  113. interrupt-parent = <&stmfx_pinctrl>;
  114. interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
  115. };
  116. button-4 {
  117. label = "JoyUp";
  118. linux,code = <KEY_UP>;
  119. interrupt-parent = <&stmfx_pinctrl>;
  120. interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
  121. };
  122. };
  123. usbotg_hs_phy: usb-phy {
  124. #phy-cells = <0>;
  125. compatible = "usb-nop-xceiv";
  126. clocks = <&rcc 0 STM32F7_AHB1_CLOCK(OTGHSULPI)>;
  127. clock-names = "main_clk";
  128. };
  129. mmc_vcard: mmc_vcard {
  130. compatible = "regulator-fixed";
  131. regulator-name = "mmc_vcard";
  132. regulator-min-microvolt = <3300000>;
  133. regulator-max-microvolt = <3300000>;
  134. };
  135. };
  136. &clk_hse {
  137. clock-frequency = <25000000>;
  138. };
  139. &crc {
  140. status = "okay";
  141. };
  142. &i2c1 {
  143. pinctrl-0 = <&i2c1_pins_b>;
  144. pinctrl-names = "default";
  145. i2c-scl-rising-time-ns = <185>;
  146. i2c-scl-falling-time-ns = <20>;
  147. status = "okay";
  148. stmfx: stmfx@42 {
  149. compatible = "st,stmfx-0300";
  150. reg = <0x42>;
  151. interrupts = <8 IRQ_TYPE_EDGE_RISING>;
  152. interrupt-parent = <&gpioi>;
  153. stmfx_pinctrl: pinctrl {
  154. compatible = "st,stmfx-0300-pinctrl";
  155. gpio-controller;
  156. #gpio-cells = <2>;
  157. interrupt-controller;
  158. #interrupt-cells = <2>;
  159. gpio-ranges = <&stmfx_pinctrl 0 0 24>;
  160. joystick_pins: joystick {
  161. pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
  162. drive-push-pull;
  163. bias-pull-up;
  164. };
  165. };
  166. };
  167. };
  168. &rtc {
  169. status = "okay";
  170. };
  171. &sdio1 {
  172. status = "okay";
  173. vmmc-supply = <&mmc_vcard>;
  174. broken-cd;
  175. pinctrl-names = "default", "opendrain";
  176. pinctrl-0 = <&sdio_pins_a>;
  177. pinctrl-1 = <&sdio_pins_od_a>;
  178. bus-width = <4>;
  179. };
  180. &usart1 {
  181. pinctrl-0 = <&usart1_pins_a>;
  182. pinctrl-names = "default";
  183. status = "okay";
  184. };
  185. &usbotg_hs {
  186. dr_mode = "otg";
  187. phys = <&usbotg_hs_phy>;
  188. phy-names = "usb2-phy";
  189. pinctrl-0 = <&usbotg_hs_pins_a>;
  190. pinctrl-names = "default";
  191. status = "okay";
  192. };