sun8i-a33-olinuxino.dts 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. /*
  2. * Copyright 2016 - Stefan Mavrodiev <stefan.mavrodiev@gmail.com>
  3. * Olimex LTD. <support@olimex.com>
  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 "sun8i-a33.dtsi"
  45. #include "sunxi-common-regulators.dtsi"
  46. #include <dt-bindings/gpio/gpio.h>
  47. #include <dt-bindings/input/input.h>
  48. / {
  49. model = "Olimex A33-OLinuXino";
  50. compatible = "olimex,a33-olinuxino","allwinner,sun8i-a33";
  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_pin_olinuxino>;
  61. green {
  62. label = "a33-olinuxino:green:usr";
  63. gpios = <&pio 1 7 GPIO_ACTIVE_HIGH>;
  64. };
  65. };
  66. };
  67. &ehci0 {
  68. status = "okay";
  69. };
  70. &mmc0 {
  71. pinctrl-names = "default";
  72. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_olinuxino>;
  73. vmmc-supply = <&reg_dcdc1>;
  74. bus-width = <4>;
  75. cd-gpios = <&pio 1 4 GPIO_ACTIVE_HIGH>; /* PB4 */
  76. cd-inverted;
  77. status = "okay";
  78. };
  79. &ohci0 {
  80. status = "okay";
  81. };
  82. &pio {
  83. led_pin_olinuxino: led_pins@0 {
  84. allwinner,pins = "PB7";
  85. allwinner,function = "gpio_out";
  86. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  87. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  88. };
  89. mmc0_cd_pin_olinuxino: mmc0_cd_pin@0 {
  90. allwinner,pins = "PB4";
  91. allwinner,function = "gpio_in";
  92. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  93. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  94. };
  95. usb0_id_detect_pin: usb0_id_detect_pin@0 {
  96. allwinner,pins = "PB3";
  97. allwinner,function = "gpio_in";
  98. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  99. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  100. };
  101. };
  102. &r_rsb {
  103. status = "okay";
  104. axp22x: pmic@3a3 {
  105. compatible = "x-powers,axp223";
  106. reg = <0x3a3>;
  107. interrupt-parent = <&nmi_intc>;
  108. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  109. eldoin-supply = <&reg_dcdc1>;
  110. x-powers,drive-vbus-en;
  111. };
  112. };
  113. #include "axp22x.dtsi"
  114. &reg_aldo1 {
  115. regulator-always-on;
  116. regulator-min-microvolt = <3300000>;
  117. regulator-max-microvolt = <3300000>;
  118. regulator-name = "vcc-io";
  119. };
  120. &reg_aldo2 {
  121. regulator-always-on;
  122. regulator-min-microvolt = <2350000>;
  123. regulator-max-microvolt = <2650000>;
  124. regulator-name = "vdd-dll";
  125. };
  126. &reg_aldo3 {
  127. regulator-always-on;
  128. regulator-min-microvolt = <3300000>;
  129. regulator-max-microvolt = <3300000>;
  130. regulator-name = "vcc-avcc";
  131. };
  132. &reg_dc1sw {
  133. regulator-name = "vcc-lcd";
  134. };
  135. &reg_dc5ldo {
  136. regulator-always-on;
  137. regulator-min-microvolt = <900000>;
  138. regulator-max-microvolt = <1400000>;
  139. regulator-name = "vdd-cpus";
  140. };
  141. &reg_dcdc1 {
  142. regulator-always-on;
  143. regulator-min-microvolt = <3300000>;
  144. regulator-max-microvolt = <3300000>;
  145. regulator-name = "vcc-3v3";
  146. };
  147. &reg_dcdc2 {
  148. regulator-always-on;
  149. regulator-min-microvolt = <900000>;
  150. regulator-max-microvolt = <1400000>;
  151. regulator-name = "vdd-sys";
  152. };
  153. &reg_dcdc3 {
  154. regulator-always-on;
  155. regulator-min-microvolt = <900000>;
  156. regulator-max-microvolt = <1400000>;
  157. regulator-name = "vdd-cpu";
  158. };
  159. &reg_dcdc5 {
  160. regulator-always-on;
  161. regulator-min-microvolt = <1500000>;
  162. regulator-max-microvolt = <1500000>;
  163. regulator-name = "vcc-dram";
  164. };
  165. &reg_drivevbus {
  166. regulator-name = "usb0-vbus";
  167. status = "okay";
  168. };
  169. &reg_rtc_ldo {
  170. regulator-name = "vcc-rtc";
  171. };
  172. &simplefb_lcd {
  173. vcc-lcd-supply = <&reg_dc1sw>;
  174. };
  175. &uart0 {
  176. pinctrl-names = "default";
  177. pinctrl-0 = <&uart0_pins_b>;
  178. status = "okay";
  179. };
  180. &usb_otg {
  181. dr_mode = "otg";
  182. status = "okay";
  183. };
  184. &usb_power_supply {
  185. status = "okay";
  186. };
  187. &usbphy {
  188. pinctrl-names = "default";
  189. pinctrl-0 = <&usb0_id_detect_pin>;
  190. usb0_id_det-gpios = <&pio 1 3 GPIO_ACTIVE_HIGH>; /* PB3 */
  191. usb0_vbus_power-supply = <&usb_power_supply>;
  192. usb0_vbus-supply = <&reg_drivevbus>;
  193. status = "okay";
  194. };