socfpga_cyclone5_vining_fpga.dts 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. /*
  2. * Copyright (C) 2015 Marek Vasut <marex@denx.de>
  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
  12. * the 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. #include "socfpga_cyclone5.dtsi"
  48. #include <dt-bindings/gpio/gpio.h>
  49. #include <dt-bindings/input/input.h>
  50. / {
  51. model = "samtec VIN|ING FPGA";
  52. compatible = "altr,socfpga-cyclone5", "altr,socfpga";
  53. chosen {
  54. bootargs = "console=ttyS0,115200";
  55. };
  56. memory {
  57. name = "memory";
  58. device_type = "memory";
  59. reg = <0x0 0x40000000>; /* 1GB */
  60. };
  61. aliases {
  62. /*
  63. * This allow the ethaddr uboot environment variable contents
  64. * to be added to the gmac1 device tree blob.
  65. */
  66. ethernet0 = &gmac1;
  67. };
  68. leds {
  69. compatible = "gpio-leds";
  70. hps_led0 {
  71. label = "hps:green:led0"; /* ALIVE_LED_GR */
  72. gpios = <&portb 19 0>; /* HPS_GPIO48 */
  73. linux,default-trigger = "heartbeat";
  74. };
  75. hps_led1 {
  76. label = "hps:red:led0"; /* ALIVE_LED_RD */
  77. gpios = <&portb 24 0>; /* HPS_GPIO53 */
  78. linux,default-trigger = "none";
  79. };
  80. hps_led2 {
  81. label = "hps:green:led1"; /* LINK2HOST_LED_GR */
  82. gpios = <&portb 25 0>; /* HPS_GPIO54 */
  83. linux,default-trigger = "heartbeat";
  84. };
  85. hps_led3 {
  86. label = "hps:red:led1"; /* LINK2HOST_LED_RD */
  87. gpios = <&portc 7 0>; /* HPS_GPIO65 */
  88. linux,default-trigger = "none";
  89. };
  90. };
  91. gpio-keys {
  92. compatible = "gpio-keys";
  93. hps_temp0 {
  94. label = "BTN_0"; /* TEMP_OS */
  95. gpios = <&portc 18 GPIO_ACTIVE_LOW>; /* HPS_GPIO60 */
  96. linux,code = <BTN_0>;
  97. };
  98. hps_hkey0 {
  99. label = "BTN_1"; /* DIS_PWR */
  100. gpios = <&portc 19 GPIO_ACTIVE_LOW>; /* HPS_GPIO61 */
  101. linux,code = <BTN_1>;
  102. };
  103. hps_hkey1 {
  104. label = "hps_hkey1"; /* POWER_DOWN */
  105. gpios = <&portc 20 GPIO_ACTIVE_LOW>; /* HPS_GPIO62 */
  106. linux,code = <KEY_POWER>;
  107. };
  108. };
  109. regulator-usb-nrst {
  110. compatible = "regulator-fixed";
  111. regulator-name = "usb_nrst";
  112. regulator-min-microvolt = <5000000>;
  113. regulator-max-microvolt = <5000000>;
  114. gpio = <&portb 5 GPIO_ACTIVE_HIGH>;
  115. startup-delay-us = <70000>;
  116. enable-active-high;
  117. regulator-always-on;
  118. };
  119. };
  120. &gmac1 {
  121. status = "okay";
  122. phy-mode = "rgmii";
  123. phy-handle = <&phy1>;
  124. snps,reset-gpio = <&porta 0 GPIO_ACTIVE_LOW>;
  125. snps,reset-active-low;
  126. snps,reset-delays-us = <10000 10000 10000>;
  127. mdio0 {
  128. #address-cells = <1>;
  129. #size-cells = <0>;
  130. compatible = "snps,dwmac-mdio";
  131. phy1: ethernet-phy@1 {
  132. reg = <1>;
  133. rxd0-skew-ps = <0>;
  134. rxd1-skew-ps = <0>;
  135. rxd2-skew-ps = <0>;
  136. rxd3-skew-ps = <0>;
  137. txen-skew-ps = <0>;
  138. txc-skew-ps = <2600>;
  139. rxdv-skew-ps = <0>;
  140. rxc-skew-ps = <2000>;
  141. };
  142. };
  143. };
  144. &gpio0 { /* GPIO 0..29 */
  145. status = "okay";
  146. };
  147. &gpio1 { /* GPIO 30..57 */
  148. status = "okay";
  149. };
  150. &gpio2 { /* GPIO 58..66 (HLGPI 0..13 at offset 13) */
  151. status = "okay";
  152. };
  153. &i2c0 {
  154. status = "okay";
  155. gpio: pca9557@1f {
  156. compatible = "nxp,pca9557";
  157. reg = <0x1f>;
  158. gpio-controller;
  159. #gpio-cells = <2>;
  160. };
  161. temp: lm75@48 {
  162. compatible = "lm75";
  163. reg = <0x48>;
  164. };
  165. at24@50 {
  166. compatible = "at24,24c01";
  167. pagesize = <8>;
  168. reg = <0x50>;
  169. };
  170. i2cswitch@70 {
  171. compatible = "nxp,pca9548";
  172. #address-cells = <1>;
  173. #size-cells = <0>;
  174. reg = <0x70>;
  175. i2c@0 {
  176. #address-cells = <1>;
  177. #size-cells = <0>;
  178. reg = <0>;
  179. eeprom@51 {
  180. compatible = "at,24c01";
  181. pagesize = <8>;
  182. reg = <0x51>;
  183. };
  184. };
  185. i2c@1 {
  186. #address-cells = <1>;
  187. #size-cells = <0>;
  188. reg = <1>;
  189. eeprom@51 {
  190. compatible = "at,24c01";
  191. pagesize = <8>;
  192. reg = <0x51>;
  193. };
  194. };
  195. i2c@2 {
  196. #address-cells = <1>;
  197. #size-cells = <0>;
  198. reg = <2>;
  199. eeprom@51 {
  200. compatible = "at,24c01";
  201. pagesize = <8>;
  202. reg = <0x51>;
  203. };
  204. };
  205. i2c@3 {
  206. #address-cells = <1>;
  207. #size-cells = <0>;
  208. reg = <3>;
  209. eeprom@51 {
  210. compatible = "at,24c01";
  211. pagesize = <8>;
  212. reg = <0x51>;
  213. };
  214. };
  215. i2c@4 {
  216. #address-cells = <1>;
  217. #size-cells = <0>;
  218. reg = <4>;
  219. eeprom@51 {
  220. compatible = "at,24c01";
  221. pagesize = <8>;
  222. reg = <0x51>;
  223. };
  224. };
  225. i2c@5 {
  226. #address-cells = <1>;
  227. #size-cells = <0>;
  228. reg = <5>;
  229. eeprom@51 {
  230. compatible = "at,24c01";
  231. pagesize = <8>;
  232. reg = <0x51>;
  233. };
  234. };
  235. i2c@6 {
  236. #address-cells = <1>;
  237. #size-cells = <0>;
  238. reg = <6>;
  239. eeprom@51 {
  240. compatible = "at,24c01";
  241. pagesize = <8>;
  242. reg = <0x51>;
  243. };
  244. };
  245. i2c@7 {
  246. #address-cells = <1>;
  247. #size-cells = <0>;
  248. reg = <7>;
  249. eeprom@51 {
  250. compatible = "at,24c01";
  251. pagesize = <8>;
  252. reg = <0x51>;
  253. };
  254. };
  255. };
  256. };
  257. &i2c1 {
  258. status = "okay";
  259. clock-frequency = <100000>;
  260. at24@50 {
  261. compatible = "at24,24c02";
  262. pagesize = <8>;
  263. reg = <0x50>;
  264. };
  265. };
  266. &usb0 {
  267. dr_mode = "host";
  268. status = "okay";
  269. };
  270. &usb1 {
  271. dr_mode = "peripheral";
  272. status = "okay";
  273. };