sun8i-s3-pinecube.dts 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. // SPDX-License-Identifier: (GPL-2.0+ OR X11)
  2. /*
  3. * Copyright 2019 Icenowy Zheng <[email protected]>
  4. */
  5. /dts-v1/;
  6. #include "sun8i-v3.dtsi"
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include <dt-bindings/input/input.h>
  9. / {
  10. model = "PineCube IP Camera";
  11. compatible = "pine64,pinecube", "sochip,s3", "allwinner,sun8i-v3";
  12. aliases {
  13. serial0 = &uart2;
  14. };
  15. chosen {
  16. stdout-path = "serial0:115200n8";
  17. };
  18. leds {
  19. compatible = "gpio-leds";
  20. led1 {
  21. label = "pine64:ir:led1";
  22. gpios = <&pio 1 10 GPIO_ACTIVE_LOW>; /* PB10 */
  23. };
  24. led2 {
  25. label = "pine64:ir:led2";
  26. gpios = <&pio 1 12 GPIO_ACTIVE_LOW>; /* PB12 */
  27. };
  28. };
  29. reg_vcc5v0: vcc5v0 {
  30. compatible = "regulator-fixed";
  31. regulator-name = "vcc5v0";
  32. regulator-min-microvolt = <5000000>;
  33. regulator-max-microvolt = <5000000>;
  34. };
  35. reg_vcc_wifi: vcc-wifi {
  36. compatible = "regulator-fixed";
  37. regulator-name = "vcc-wifi";
  38. regulator-min-microvolt = <3300000>;
  39. regulator-max-microvolt = <3300000>;
  40. gpio = <&pio 1 2 GPIO_ACTIVE_LOW>; /* PB2 WIFI-EN */
  41. vin-supply = <&reg_dcdc3>;
  42. startup-delay-us = <200000>;
  43. };
  44. wifi_pwrseq: wifi_pwrseq {
  45. compatible = "mmc-pwrseq-simple";
  46. reset-gpios = <&pio 1 3 GPIO_ACTIVE_LOW>; /* PB3 WIFI-RST */
  47. post-power-on-delay-ms = <200>;
  48. };
  49. };
  50. &csi1 {
  51. pinctrl-names = "default";
  52. pinctrl-0 = <&csi1_8bit_pins>;
  53. status = "okay";
  54. port {
  55. csi1_ep: endpoint {
  56. remote-endpoint = <&ov5640_ep>;
  57. bus-width = <8>;
  58. hsync-active = <1>; /* Active high */
  59. vsync-active = <0>; /* Active low */
  60. data-active = <1>; /* Active high */
  61. pclk-sample = <1>; /* Rising */
  62. };
  63. };
  64. };
  65. &emac {
  66. phy-handle = <&int_mii_phy>;
  67. phy-mode = "mii";
  68. status = "okay";
  69. };
  70. &i2c0 {
  71. status = "okay";
  72. axp209: pmic@34 {
  73. reg = <0x34>;
  74. interrupt-parent = <&nmi_intc>;
  75. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  76. };
  77. };
  78. &i2c1 {
  79. pinctrl-names = "default";
  80. pinctrl-0 = <&i2c1_pe_pins>;
  81. status = "okay";
  82. ov5640: camera@3c {
  83. compatible = "ovti,ov5640";
  84. reg = <0x3c>;
  85. pinctrl-names = "default";
  86. pinctrl-0 = <&csi1_mclk_pin>;
  87. clocks = <&ccu CLK_CSI1_MCLK>;
  88. clock-names = "xclk";
  89. AVDD-supply = <&reg_ldo3>;
  90. DOVDD-supply = <&reg_ldo3>;
  91. DVDD-supply = <&reg_ldo4>;
  92. reset-gpios = <&pio 4 23 GPIO_ACTIVE_LOW>; /* PE23 */
  93. powerdown-gpios = <&pio 4 24 GPIO_ACTIVE_HIGH>; /* PE24 */
  94. port {
  95. ov5640_ep: endpoint {
  96. remote-endpoint = <&csi1_ep>;
  97. bus-width = <8>;
  98. hsync-active = <1>; /* Active high */
  99. vsync-active = <0>; /* Active low */
  100. data-active = <1>; /* Active high */
  101. pclk-sample = <1>; /* Rising */
  102. };
  103. };
  104. };
  105. };
  106. &lradc {
  107. vref-supply = <&reg_ldo2>;
  108. status = "okay";
  109. button-200 {
  110. label = "Setup";
  111. linux,code = <KEY_SETUP>;
  112. channel = <0>;
  113. voltage = <190000>;
  114. };
  115. };
  116. &mmc0 {
  117. vmmc-supply = <&reg_dcdc3>;
  118. bus-width = <4>;
  119. cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
  120. status = "okay";
  121. };
  122. &mmc1 {
  123. vmmc-supply = <&reg_vcc_wifi>;
  124. vqmmc-supply = <&reg_dcdc3>;
  125. mmc-pwrseq = <&wifi_pwrseq>;
  126. bus-width = <4>;
  127. non-removable;
  128. status = "okay";
  129. };
  130. &pio {
  131. vcc-pd-supply = <&reg_dcdc3>;
  132. vcc-pe-supply = <&reg_ldo3>;
  133. };
  134. #include "axp209.dtsi"
  135. &ac_power_supply {
  136. status = "okay";
  137. };
  138. &reg_dcdc2 {
  139. regulator-always-on;
  140. regulator-min-microvolt = <1250000>;
  141. regulator-max-microvolt = <1250000>;
  142. regulator-name = "vdd-sys-cpu-ephy";
  143. };
  144. &reg_dcdc3 {
  145. regulator-always-on;
  146. regulator-min-microvolt = <3300000>;
  147. regulator-max-microvolt = <3300000>;
  148. regulator-name = "vcc-3v3";
  149. };
  150. &reg_ldo1 {
  151. regulator-name = "vdd-rtc";
  152. };
  153. &reg_ldo2 {
  154. regulator-always-on;
  155. regulator-min-microvolt = <3000000>;
  156. regulator-max-microvolt = <3000000>;
  157. regulator-name = "avcc";
  158. };
  159. &reg_ldo3 {
  160. regulator-min-microvolt = <2800000>;
  161. regulator-max-microvolt = <2800000>;
  162. regulator-name = "avdd-dovdd-2v8-csi";
  163. regulator-soft-start;
  164. regulator-ramp-delay = <1600>;
  165. };
  166. &reg_ldo4 {
  167. regulator-min-microvolt = <1800000>;
  168. regulator-max-microvolt = <1800000>;
  169. regulator-name = "dvdd-1v8-csi";
  170. };
  171. &spi0 {
  172. status = "okay";
  173. flash@0 {
  174. #address-cells = <1>;
  175. #size-cells = <1>;
  176. compatible = "winbond,w25q128", "jedec,spi-nor";
  177. reg = <0>;
  178. spi-max-frequency = <40000000>;
  179. };
  180. };
  181. &uart2 {
  182. status = "okay";
  183. };
  184. &usb_otg {
  185. dr_mode = "host";
  186. status = "okay";
  187. };
  188. &usbphy {
  189. usb0_vbus-supply = <&reg_vcc5v0>;
  190. status = "okay";
  191. };