sun5i-a10s-wobo-i5.dts 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. /*
  2. * Copyright 2015 Jelle van der Waa <jelle@vdwaa.nl>
  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 "sun5i-a10s.dtsi"
  44. #include "sunxi-common-regulators.dtsi"
  45. #include <dt-bindings/gpio/gpio.h>
  46. #include <dt-bindings/interrupt-controller/irq.h>
  47. #include <dt-bindings/pinctrl/sun4i-a10.h>
  48. / {
  49. model = "A10s-Wobo i5";
  50. compatible = "wobo,a10s-wobo-i5", "allwinner,sun5i-a10s";
  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_wobo_i5>;
  61. blue {
  62. label = "a10s-wobo-i5:blue:usr";
  63. gpios = <&pio 1 2 GPIO_ACTIVE_HIGH>;
  64. default-state = "on";
  65. };
  66. };
  67. reg_emac_3v3: emac-3v3 {
  68. compatible = "regulator-fixed";
  69. pinctrl-names = "default";
  70. pinctrl-0 = <&emac_power_pin_wobo>;
  71. regulator-name = "emac-3v3";
  72. regulator-min-microvolt = <3300000>;
  73. regulator-max-microvolt = <3300000>;
  74. startup-delay-us = <20000>;
  75. enable-active-high;
  76. gpio = <&pio 0 2 GPIO_ACTIVE_HIGH>;
  77. };
  78. };
  79. &cpu0 {
  80. cpu-supply = <&reg_dcdc2>;
  81. };
  82. &ehci0 {
  83. status = "okay";
  84. };
  85. &emac {
  86. pinctrl-names = "default";
  87. pinctrl-0 = <&emac_pins_b>;
  88. phy = <&phy1>;
  89. status = "okay";
  90. };
  91. &emac_sram {
  92. status = "okay";
  93. };
  94. &i2c0 {
  95. pinctrl-names = "default";
  96. pinctrl-0 = <&i2c0_pins_a>;
  97. status = "okay";
  98. axp209: pmic@34 {
  99. reg = <0x34>;
  100. interrupts = <0>;
  101. };
  102. };
  103. #include "axp209.dtsi"
  104. &mdio {
  105. phy-supply = <&reg_emac_3v3>;
  106. status = "okay";
  107. phy1: ethernet-phy@1 {
  108. reg = <1>;
  109. };
  110. };
  111. &mmc0 {
  112. pinctrl-names = "default";
  113. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_wobo_i5>;
  114. vmmc-supply = <&reg_vcc3v3>;
  115. bus-width = <4>;
  116. cd-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
  117. cd-inverted;
  118. status = "okay";
  119. };
  120. &ohci0 {
  121. status = "okay";
  122. };
  123. &otg_sram {
  124. status = "okay";
  125. };
  126. &pio {
  127. led_pins_wobo_i5: led_pins@0 {
  128. allwinner,pins = "PB2";
  129. allwinner,function = "gpio_out";
  130. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  131. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  132. };
  133. mmc0_cd_pin_wobo_i5: mmc0_cd_pin@0 {
  134. allwinner,pins = "PB3";
  135. allwinner,function = "gpio_in";
  136. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  137. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  138. };
  139. emac_power_pin_wobo: emac_power_pin@0 {
  140. allwinner,pins = "PA02";
  141. allwinner,function = "gpio_out";
  142. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  143. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  144. };
  145. };
  146. &reg_dcdc2 {
  147. regulator-always-on;
  148. regulator-min-microvolt = <1000000>;
  149. regulator-max-microvolt = <1400000>;
  150. regulator-name = "vdd-cpu";
  151. };
  152. &reg_dcdc3 {
  153. regulator-always-on;
  154. regulator-min-microvolt = <1250000>;
  155. regulator-max-microvolt = <1250000>;
  156. regulator-name = "vdd-int-dll";
  157. };
  158. &reg_ldo1 {
  159. regulator-name = "vdd-rtc";
  160. };
  161. &reg_ldo2 {
  162. regulator-always-on;
  163. regulator-min-microvolt = <3000000>;
  164. regulator-max-microvolt = <3000000>;
  165. regulator-name = "avcc";
  166. };
  167. &reg_ldo3 {
  168. regulator-always-on;
  169. regulator-min-microvolt = <3300000>;
  170. regulator-max-microvolt = <3300000>;
  171. regulator-name = "vcc-wifi1";
  172. };
  173. &reg_ldo4 {
  174. regulator-always-on;
  175. regulator-min-microvolt = <3300000>;
  176. regulator-max-microvolt = <3300000>;
  177. regulator-name = "vcc-wifi2";
  178. };
  179. &reg_usb1_vbus {
  180. gpio = <&pio 6 12 GPIO_ACTIVE_HIGH>;
  181. status = "okay";
  182. };
  183. &uart0 {
  184. pinctrl-names = "default";
  185. pinctrl-0 = <&uart0_pins_a>;
  186. status = "okay";
  187. };
  188. &usb_otg {
  189. dr_mode = "host";
  190. status = "okay";
  191. };
  192. &usb1_vbus_pin_a {
  193. allwinner,pins = "PG12";
  194. };
  195. &usbphy {
  196. usb1_vbus-supply = <&reg_usb1_vbus>;
  197. status = "okay";
  198. };