sun5i-a13-licheepi-one.dts 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. /*
  2. * Copyright 2016 Icenowy Zheng <[email protected]>
  3. *
  4. * Based on sun5i-a13-olinuxino.dts, which is
  5. * Copyright 2012 Maxime Ripard <[email protected]>
  6. * Copyright 2013 Hans de Goede <[email protected]>
  7. *
  8. * This file is dual-licensed: you can use it either under the terms
  9. * of the GPL or the X11 license, at your option. Note that this dual
  10. * licensing only applies to this file, and not this project as a
  11. * whole.
  12. *
  13. * a) This file is free software; you can redistribute it and/or
  14. * modify it under the terms of the GNU General Public License as
  15. * published by the Free Software Foundation; either version 2 of the
  16. * License, or (at your option) any later version.
  17. *
  18. * This file is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * Or, alternatively,
  24. *
  25. * b) Permission is hereby granted, free of charge, to any person
  26. * obtaining a copy of this software and associated documentation
  27. * files (the "Software"), to deal in the Software without
  28. * restriction, including without limitation the rights to use,
  29. * copy, modify, merge, publish, distribute, sublicense, and/or
  30. * sell copies of the Software, and to permit persons to whom the
  31. * Software is furnished to do so, subject to the following
  32. * conditions:
  33. *
  34. * The above copyright notice and this permission notice shall be
  35. * included in all copies or substantial portions of the Software.
  36. *
  37. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  38. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  39. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  40. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  41. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  42. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  43. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  44. * OTHER DEALINGS IN THE SOFTWARE.
  45. */
  46. /dts-v1/;
  47. #include "sun5i-a13.dtsi"
  48. #include "sunxi-common-regulators.dtsi"
  49. #include <dt-bindings/gpio/gpio.h>
  50. #include <dt-bindings/input/input.h>
  51. / {
  52. model = "Lichee Pi One";
  53. compatible = "licheepi,licheepi-one", "allwinner,sun5i-a13";
  54. aliases {
  55. serial0 = &uart1;
  56. };
  57. chosen {
  58. stdout-path = "serial0:115200n8";
  59. };
  60. leds {
  61. compatible = "gpio-leds";
  62. led-0 {
  63. label = "licheepi:red:usr";
  64. gpios = <&pio 2 5 GPIO_ACTIVE_LOW>;
  65. };
  66. led-1 {
  67. label = "licheepi:green:usr";
  68. gpios = <&pio 2 19 GPIO_ACTIVE_LOW>;
  69. default-state = "on";
  70. };
  71. led-2 {
  72. label = "licheepi:blue:usr";
  73. gpios = <&pio 2 4 GPIO_ACTIVE_LOW>;
  74. };
  75. };
  76. };
  77. &cpu0 {
  78. cpu-supply = <&reg_dcdc2>;
  79. };
  80. &ehci0 {
  81. status = "okay";
  82. };
  83. &i2c0 {
  84. status = "okay";
  85. axp209: pmic@34 {
  86. compatible = "x-powers,axp209";
  87. reg = <0x34>;
  88. interrupts = <0>;
  89. interrupt-controller;
  90. #interrupt-cells = <1>;
  91. };
  92. };
  93. &i2c1 {
  94. status = "disabled";
  95. };
  96. &i2c2 {
  97. status = "disabled";
  98. };
  99. &lradc {
  100. vref-supply = <&reg_ldo2>;
  101. status = "okay";
  102. button-984 {
  103. label = "Home";
  104. linux,code = <KEY_HOMEPAGE>;
  105. channel = <0>;
  106. voltage = <984126>;
  107. };
  108. };
  109. &mmc0 {
  110. vmmc-supply = <&reg_vcc3v3>;
  111. bus-width = <4>;
  112. broken-cd;
  113. status = "okay";
  114. };
  115. &mmc2 {
  116. pinctrl-names = "default";
  117. pinctrl-0 = <&mmc2_4bit_pc_pins>;
  118. vmmc-supply = <&reg_vcc3v3>;
  119. bus-width = <4>;
  120. broken-cd;
  121. status = "okay";
  122. };
  123. &ohci0 {
  124. status = "okay";
  125. };
  126. &otg_sram {
  127. status = "okay";
  128. };
  129. #include "axp209.dtsi"
  130. &reg_dcdc2 {
  131. regulator-always-on;
  132. regulator-min-microvolt = <1000000>;
  133. regulator-max-microvolt = <1500000>;
  134. regulator-name = "vdd-cpu";
  135. };
  136. &reg_dcdc3 {
  137. regulator-always-on;
  138. regulator-min-microvolt = <1000000>;
  139. regulator-max-microvolt = <1400000>;
  140. regulator-name = "vdd-int-dll";
  141. };
  142. &reg_ldo1 {
  143. regulator-name = "vdd-rtc";
  144. };
  145. &reg_ldo2 {
  146. regulator-always-on;
  147. regulator-min-microvolt = <3000000>;
  148. regulator-max-microvolt = <3000000>;
  149. regulator-name = "avcc";
  150. };
  151. &reg_ldo3 {
  152. regulator-min-microvolt = <1800000>;
  153. regulator-max-microvolt = <1800000>;
  154. regulator-name = "csi-1.8v";
  155. };
  156. &reg_ldo4 {
  157. regulator-min-microvolt = <2800000>;
  158. regulator-max-microvolt = <2800000>;
  159. regulator-name = "csi-2.8v";
  160. };
  161. &reg_usb0_vbus {
  162. gpio = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
  163. status = "okay";
  164. };
  165. &uart1 {
  166. pinctrl-names = "default";
  167. pinctrl-0 = <&uart1_pg_pins>;
  168. status = "okay";
  169. };
  170. &usb_otg {
  171. dr_mode = "otg";
  172. status = "okay";
  173. };
  174. &usbphy {
  175. usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
  176. usb0_vbus_det-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
  177. usb0_vbus-supply = <&reg_usb0_vbus>;
  178. usb1_vbus-supply = <&reg_vcc5v0>;
  179. status = "okay";
  180. };