sun4i-a10-topwise-a721.dts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright 2020 Pascal Roeleven <[email protected]>
  4. */
  5. /dts-v1/;
  6. #include "sun4i-a10.dtsi"
  7. #include "sunxi-common-regulators.dtsi"
  8. #include <dt-bindings/gpio/gpio.h>
  9. #include <dt-bindings/input/input.h>
  10. #include <dt-bindings/interrupt-controller/irq.h>
  11. #include <dt-bindings/pwm/pwm.h>
  12. / {
  13. model = "Topwise A721";
  14. compatible = "topwise,a721", "allwinner,sun4i-a10";
  15. aliases {
  16. serial0 = &uart0;
  17. };
  18. backlight: backlight {
  19. compatible = "pwm-backlight";
  20. pwms = <&pwm 0 100000 PWM_POLARITY_INVERTED>;
  21. power-supply = <&reg_vbat>;
  22. enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
  23. brightness-levels = <0 30 40 50 60 70 80 90 100>;
  24. default-brightness-level = <8>;
  25. };
  26. chosen {
  27. stdout-path = "serial0:115200n8";
  28. };
  29. panel {
  30. compatible = "starry,kr070pe2t";
  31. backlight = <&backlight>;
  32. power-supply = <&reg_lcd_power>;
  33. port {
  34. panel_input: endpoint {
  35. remote-endpoint = <&tcon0_out_panel>;
  36. };
  37. };
  38. };
  39. reg_lcd_power: reg-lcd-power {
  40. compatible = "regulator-fixed";
  41. regulator-name = "reg-lcd-power";
  42. gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
  43. enable-active-high;
  44. };
  45. reg_vbat: reg-vbat {
  46. compatible = "regulator-fixed";
  47. regulator-name = "vbat";
  48. regulator-min-microvolt = <3700000>;
  49. regulator-max-microvolt = <3700000>;
  50. };
  51. };
  52. &codec {
  53. status = "okay";
  54. };
  55. &cpu0 {
  56. cpu-supply = <&reg_dcdc2>;
  57. };
  58. &de {
  59. status = "okay";
  60. };
  61. &ehci0 {
  62. status = "okay";
  63. };
  64. &ehci1 {
  65. status = "okay";
  66. };
  67. &i2c0 {
  68. status = "okay";
  69. axp209: pmic@34 {
  70. reg = <0x34>;
  71. interrupts = <0>;
  72. };
  73. };
  74. #include "axp209.dtsi"
  75. &ac_power_supply {
  76. status = "okay";
  77. };
  78. &battery_power_supply {
  79. status = "okay";
  80. };
  81. &i2c1 {
  82. status = "okay";
  83. accelerometer@4c {
  84. compatible = "fsl,mma7660";
  85. reg = <0x4c>;
  86. };
  87. };
  88. &i2c2 {
  89. status = "okay";
  90. touchscreen@38 {
  91. compatible = "edt,edt-ft5406";
  92. reg = <0x38>;
  93. interrupt-parent = <&pio>;
  94. interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
  95. touchscreen-size-x = <800>;
  96. touchscreen-size-y = <480>;
  97. vcc-supply = <&reg_vcc3v3>;
  98. };
  99. };
  100. &lradc {
  101. vref-supply = <&reg_ldo2>;
  102. status = "okay";
  103. button-571 {
  104. label = "Volume Up";
  105. linux,code = <KEY_VOLUMEUP>;
  106. channel = <0>;
  107. voltage = <571428>;
  108. };
  109. button-761 {
  110. label = "Volume Down";
  111. linux,code = <KEY_VOLUMEDOWN>;
  112. channel = <0>;
  113. voltage = <761904>;
  114. };
  115. };
  116. &mmc0 {
  117. vmmc-supply = <&reg_vcc3v3>;
  118. bus-width = <4>;
  119. cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH01 */
  120. status = "okay";
  121. };
  122. &ohci0 {
  123. status = "okay";
  124. };
  125. &ohci1 {
  126. status = "okay";
  127. };
  128. &otg_sram {
  129. status = "okay";
  130. };
  131. &pio {
  132. vcc-pb-supply = <&reg_vcc3v3>;
  133. vcc-pf-supply = <&reg_vcc3v3>;
  134. vcc-ph-supply = <&reg_vcc3v3>;
  135. };
  136. &pwm {
  137. pinctrl-names = "default";
  138. pinctrl-0 = <&pwm0_pin>;
  139. status = "okay";
  140. };
  141. &reg_dcdc2 {
  142. regulator-always-on;
  143. regulator-min-microvolt = <1000000>;
  144. regulator-max-microvolt = <1400000>;
  145. regulator-name = "vdd-cpu";
  146. };
  147. &reg_dcdc3 {
  148. regulator-always-on;
  149. regulator-min-microvolt = <1250000>;
  150. regulator-max-microvolt = <1250000>;
  151. regulator-name = "vdd-int-dll";
  152. };
  153. &reg_ldo1 {
  154. regulator-name = "vdd-rtc";
  155. };
  156. &reg_ldo2 {
  157. regulator-always-on;
  158. regulator-min-microvolt = <3000000>;
  159. regulator-max-microvolt = <3000000>;
  160. regulator-name = "avcc";
  161. };
  162. &reg_usb0_vbus {
  163. status = "okay";
  164. };
  165. &reg_usb1_vbus {
  166. status = "okay";
  167. };
  168. &reg_usb2_vbus {
  169. status = "okay";
  170. };
  171. &tcon0_out {
  172. tcon0_out_panel: endpoint@0 {
  173. reg = <0>;
  174. remote-endpoint = <&panel_input>;
  175. };
  176. };
  177. &uart0 {
  178. pinctrl-names = "default";
  179. pinctrl-0 = <&uart0_pb_pins>;
  180. status = "okay";
  181. };
  182. &usb_otg {
  183. dr_mode = "otg";
  184. status = "okay";
  185. };
  186. &usb_power_supply {
  187. status = "okay";
  188. };
  189. &usbphy {
  190. usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
  191. usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
  192. usb0_vbus-supply = <&reg_usb0_vbus>;
  193. usb1_vbus-supply = <&reg_usb1_vbus>;
  194. usb2_vbus-supply = <&reg_usb2_vbus>;
  195. status = "okay";
  196. };