mmp2-olpc-xo-1-75.dts 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /*
  3. * OLPC XO 1.75 Laptop.
  4. *
  5. * Copyright (C) 2018,2019,2020 Lubomir Rintel <[email protected]>
  6. */
  7. /dts-v1/;
  8. #include "mmp2.dtsi"
  9. #include <dt-bindings/gpio/gpio.h>
  10. #include <dt-bindings/input/linux-event-codes.h>
  11. #include <dt-bindings/interrupt-controller/irq.h>
  12. #include <dt-bindings/clock/marvell,mmp2-audio.h>
  13. / {
  14. model = "OLPC XO-1.75";
  15. compatible = "olpc,xo-1.75", "mrvl,mmp2";
  16. chosen {
  17. #address-cells = <1>;
  18. #size-cells = <1>;
  19. ranges;
  20. framebuffer@1fc00000 {
  21. compatible = "simple-framebuffer";
  22. reg = <0x1fc00000 (1200 * 900 * 2)>;
  23. width = <1200>;
  24. height = <900>;
  25. stride = <(1200 * 2)>;
  26. format = "r5g6b5";
  27. clocks = <&soc_clocks MMP2_CLK_DISP0_LCDC>,
  28. <&soc_clocks MMP2_CLK_DISP0>;
  29. };
  30. };
  31. memory@0 {
  32. available = <0xcf000 0x1ef31000 0x1000 0xbf000>;
  33. reg = <0x0 0x20000000>;
  34. device_type = "memory";
  35. };
  36. gpio-keys {
  37. compatible = "gpio-keys";
  38. lid {
  39. label = "Lid";
  40. gpios = <&gpio 129 GPIO_ACTIVE_LOW>;
  41. linux,input-type = <EV_SW>;
  42. linux,code = <SW_LID>;
  43. wakeup-source;
  44. };
  45. tablet_mode {
  46. label = "E-Book Mode";
  47. gpios = <&gpio 128 GPIO_ACTIVE_LOW>;
  48. linux,input-type = <EV_SW>;
  49. linux,code = <SW_TABLET_MODE>;
  50. wakeup-source;
  51. };
  52. };
  53. i2c {
  54. compatible = "i2c-gpio";
  55. sda-gpios = <&gpio 109 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
  56. scl-gpios = <&gpio 108 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
  57. #address-cells = <1>;
  58. #size-cells = <0>;
  59. i2c-gpio,timeout-ms = <1000>;
  60. status = "okay";
  61. camera@21 {
  62. compatible = "ovti,ov7670";
  63. reg = <0x21>;
  64. reset-gpios = <&gpio 102 GPIO_ACTIVE_LOW>;
  65. powerdown-gpios = <&gpio 150 GPIO_ACTIVE_LOW>;
  66. clocks = <&camera0>;
  67. clock-names = "xclk";
  68. port {
  69. ov7670_0: endpoint {
  70. hsync-active = <1>;
  71. vsync-active = <1>;
  72. remote-endpoint = <&camera0_0>;
  73. };
  74. };
  75. };
  76. };
  77. battery {
  78. compatible = "olpc,xo1.5-battery", "olpc,xo1-battery";
  79. };
  80. wlan_reg: fixedregulator0 {
  81. compatible = "regulator-fixed";
  82. regulator-name = "wlan";
  83. regulator-min-microvolt = <3300000>;
  84. regulator-max-microvolt = <3300000>;
  85. gpio = <&gpio 34 GPIO_ACTIVE_HIGH>;
  86. enable-active-high;
  87. };
  88. wlan_pwrseq: pwrseq0 {
  89. compatible = "mmc-pwrseq-sd8787";
  90. powerdown-gpios = <&gpio 57 GPIO_ACTIVE_HIGH>;
  91. reset-gpios = <&gpio 58 GPIO_ACTIVE_HIGH>;
  92. };
  93. sound-card {
  94. compatible = "audio-graph-card";
  95. label = "OLPC XO";
  96. dais = <&sspa0_dai>;
  97. routing = "Headphones", "HPOL",
  98. "Headphones", "HPOR",
  99. "MIC2", "Mic Jack";
  100. widgets = "Headphone", "Headphones", "Microphone", "Mic Jack";
  101. hp-det-gpio = <&gpio 97 GPIO_ACTIVE_HIGH>;
  102. mic-det-gpio = <&gpio 96 GPIO_ACTIVE_HIGH>;
  103. };
  104. soc {
  105. axi@d4200000 {
  106. ap-sp@d4290000 {
  107. #address-cells = <1>;
  108. #size-cells = <0>;
  109. compatible = "olpc,ap-sp";
  110. interrupts = <40>;
  111. reg = <0xd4290000 0x1000>;
  112. data-gpios = <&gpio 72 GPIO_ACTIVE_HIGH>;
  113. clk-gpios = <&gpio 71 GPIO_ACTIVE_HIGH>;
  114. status = "okay";
  115. };
  116. };
  117. };
  118. };
  119. &uart3 {
  120. status = "okay";
  121. };
  122. &uart4 {
  123. status = "okay";
  124. };
  125. &rtc {
  126. status = "okay";
  127. };
  128. &usb_phy0 {
  129. status = "okay";
  130. };
  131. &usb_otg0 {
  132. status = "okay";
  133. };
  134. &mmc1 {
  135. clock-frequency = <50000000>;
  136. no-1-8-v;
  137. mrvl,clk-delay-cycles = <31>;
  138. broken-cd;
  139. status = "okay";
  140. };
  141. &mmc2 {
  142. clock-frequency = <50000000>;
  143. no-1-8-v;
  144. bus-width = <4>;
  145. non-removable;
  146. broken-cd;
  147. wakeup-source;
  148. keep-power-in-suspend;
  149. mmc-pwrseq = <&wlan_pwrseq>;
  150. vmmc-supply = <&wlan_reg>;
  151. status = "okay";
  152. };
  153. &mmc3 {
  154. clock-frequency = <50000000>;
  155. no-1-8-v;
  156. bus-width = <8>;
  157. non-removable;
  158. broken-cd;
  159. mrvl,clk-delay-cycles = <31>;
  160. status = "okay";
  161. };
  162. &twsi1 {
  163. status = "okay";
  164. audio-codec@1a {
  165. compatible = "realtek,alc5631";
  166. reg = <0x1a>;
  167. status = "okay";
  168. port {
  169. rt5631_0: endpoint {
  170. mclk-fs = <256>;
  171. clocks = <&audio_clk MMP2_CLK_AUDIO_SYSCLK>;
  172. remote-endpoint = <&sspa0_0>;
  173. };
  174. };
  175. };
  176. };
  177. &twsi2 {
  178. status = "okay";
  179. rtc@68 {
  180. compatible = "dallas,ds1338";
  181. reg = <0x68>;
  182. status = "okay";
  183. };
  184. };
  185. &twsi6 {
  186. status = "okay";
  187. accelerometer@1d {
  188. compatible = "st,lis331dlh", "st,lis3lv02d";
  189. reg = <0x1d>;
  190. status = "okay";
  191. };
  192. };
  193. &ssp3 {
  194. #address-cells = <0>;
  195. spi-slave;
  196. status = "okay";
  197. ready-gpios = <&gpio 125 GPIO_ACTIVE_HIGH>;
  198. slave {
  199. compatible = "olpc,xo1.75-ec";
  200. spi-cpha;
  201. cmd-gpios = <&gpio 155 GPIO_ACTIVE_HIGH>;
  202. };
  203. };
  204. &camera0 {
  205. status = "okay";
  206. port {
  207. camera0_0: endpoint {
  208. remote-endpoint = <&ov7670_0>;
  209. };
  210. };
  211. };
  212. &asram {
  213. status = "okay";
  214. };
  215. &adma0 {
  216. status = "okay";
  217. };
  218. &audio_clk {
  219. status = "okay";
  220. };
  221. &sspa0 {
  222. status = "okay";
  223. dmas = <&adma0 0>, <&adma0 1>;
  224. dma-names = "tx", "rx";
  225. sspa0_dai: port {
  226. sspa0_0: endpoint {
  227. remote-endpoint = <&rt5631_0>;
  228. frame-master;
  229. bitclock-master;
  230. dai-format = "i2s";
  231. };
  232. };
  233. };
  234. &gpu {
  235. status = "okay";
  236. };