sun4i-a10-cubieboard.dts 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. /*
  2. * Copyright 2012 Stefan Roese
  3. * Stefan Roese <sr@denx.de>
  4. *
  5. * This file is dual-licensed: you can use it either under the terms
  6. * of the GPL or the X11 license, at your option. Note that this dual
  7. * licensing only applies to this file, and not this project as a
  8. * whole.
  9. *
  10. * a) This file is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This file is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * Or, alternatively,
  21. *
  22. * b) Permission is hereby granted, free of charge, to any person
  23. * obtaining a copy of this software and associated documentation
  24. * files (the "Software"), to deal in the Software without
  25. * restriction, including without limitation the rights to use,
  26. * copy, modify, merge, publish, distribute, sublicense, and/or
  27. * sell copies of the Software, and to permit persons to whom the
  28. * Software is furnished to do so, subject to the following
  29. * conditions:
  30. *
  31. * The above copyright notice and this permission notice shall be
  32. * included in all copies or substantial portions of the Software.
  33. *
  34. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  35. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  36. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  37. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  38. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  39. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  40. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  41. * OTHER DEALINGS IN THE SOFTWARE.
  42. */
  43. /dts-v1/;
  44. #include "sun4i-a10.dtsi"
  45. #include "sunxi-common-regulators.dtsi"
  46. #include <dt-bindings/gpio/gpio.h>
  47. #include <dt-bindings/pinctrl/sun4i-a10.h>
  48. / {
  49. model = "Cubietech Cubieboard";
  50. compatible = "cubietech,a10-cubieboard", "allwinner,sun4i-a10";
  51. aliases {
  52. serial0 = &uart0;
  53. };
  54. chosen {
  55. stdout-path = "serial0:115200n8";
  56. };
  57. leds {
  58. compatible = "gpio-leds";
  59. pinctrl-names = "default";
  60. pinctrl-0 = <&led_pins_cubieboard>;
  61. blue {
  62. label = "cubieboard:blue:usr";
  63. gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; /* LED1 */
  64. };
  65. green {
  66. label = "cubieboard:green:usr";
  67. gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; /* LED2 */
  68. linux,default-trigger = "heartbeat";
  69. };
  70. };
  71. };
  72. &ahci {
  73. target-supply = <&reg_ahci_5v>;
  74. status = "okay";
  75. };
  76. &codec {
  77. status = "okay";
  78. };
  79. &cpu0 {
  80. cpu-supply = <&reg_dcdc2>;
  81. };
  82. &ehci0 {
  83. status = "okay";
  84. };
  85. &ehci1 {
  86. status = "okay";
  87. };
  88. &emac {
  89. pinctrl-names = "default";
  90. pinctrl-0 = <&emac_pins_a>;
  91. phy = <&phy1>;
  92. status = "okay";
  93. };
  94. &emac_sram {
  95. status = "okay";
  96. };
  97. &i2c0 {
  98. pinctrl-names = "default";
  99. pinctrl-0 = <&i2c0_pins_a>;
  100. status = "okay";
  101. axp209: pmic@34 {
  102. reg = <0x34>;
  103. interrupts = <0>;
  104. };
  105. };
  106. &i2c1 {
  107. pinctrl-names = "default";
  108. pinctrl-0 = <&i2c1_pins_a>;
  109. status = "okay";
  110. };
  111. &ir0 {
  112. pinctrl-names = "default";
  113. pinctrl-0 = <&ir0_rx_pins_a>;
  114. status = "okay";
  115. };
  116. &mdio {
  117. status = "okay";
  118. phy1: ethernet-phy@1 {
  119. reg = <1>;
  120. };
  121. };
  122. &mmc0 {
  123. pinctrl-names = "default";
  124. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
  125. vmmc-supply = <&reg_vcc3v3>;
  126. bus-width = <4>;
  127. cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  128. cd-inverted;
  129. status = "okay";
  130. };
  131. &ohci0 {
  132. status = "okay";
  133. };
  134. &ohci1 {
  135. status = "okay";
  136. };
  137. &otg_sram {
  138. status = "okay";
  139. };
  140. &pio {
  141. led_pins_cubieboard: led_pins@0 {
  142. allwinner,pins = "PH20", "PH21";
  143. allwinner,function = "gpio_out";
  144. allwinner,drive = <SUN4I_PINCTRL_20_MA>;
  145. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  146. };
  147. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  148. allwinner,pins = "PH4";
  149. allwinner,function = "gpio_in";
  150. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  151. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  152. };
  153. };
  154. &reg_ahci_5v {
  155. status = "okay";
  156. };
  157. #include "axp209.dtsi"
  158. &reg_dcdc2 {
  159. regulator-always-on;
  160. regulator-min-microvolt = <1000000>;
  161. regulator-max-microvolt = <1450000>;
  162. regulator-name = "vdd-cpu";
  163. };
  164. &reg_dcdc3 {
  165. regulator-always-on;
  166. regulator-min-microvolt = <1000000>;
  167. regulator-max-microvolt = <1400000>;
  168. regulator-name = "vdd-int-dll";
  169. };
  170. &reg_ldo1 {
  171. regulator-name = "vdd-rtc";
  172. };
  173. &reg_ldo2 {
  174. regulator-always-on;
  175. regulator-min-microvolt = <3000000>;
  176. regulator-max-microvolt = <3000000>;
  177. regulator-name = "avcc";
  178. };
  179. &reg_usb1_vbus {
  180. status = "okay";
  181. };
  182. &reg_usb2_vbus {
  183. status = "okay";
  184. };
  185. &spi0 {
  186. pinctrl-names = "default";
  187. pinctrl-0 = <&spi0_pins_a>,
  188. <&spi0_cs0_pins_a>;
  189. status = "okay";
  190. };
  191. &uart0 {
  192. pinctrl-names = "default";
  193. pinctrl-0 = <&uart0_pins_a>;
  194. status = "okay";
  195. };
  196. &usb_otg {
  197. dr_mode = "otg";
  198. status = "okay";
  199. };
  200. &usbphy {
  201. pinctrl-names = "default";
  202. pinctrl-0 = <&usb0_id_detect_pin>;
  203. usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  204. usb1_vbus-supply = <&reg_usb1_vbus>;
  205. usb2_vbus-supply = <&reg_usb2_vbus>;
  206. status = "okay";
  207. };