Advertisement
Guest User

dts

a guest
Jan 23rd, 2015
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.83 KB | None | 0 0
  1. /*
  2. * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
  3. *
  4. * This file is dual-licensed: you can use it either under the terms
  5. * of the GPL or the X11 license, at your option. Note that this dual
  6. * licensing only applies to this file, and not this project as a
  7. * whole.
  8. *
  9. * a) This file is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of the
  12. * License, or (at your option) any later version.
  13. *
  14. * This file is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public
  20. * License along with this file; if not, write to the Free
  21. * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
  22. * MA 02110-1301 USA
  23. *
  24. * Or, alternatively,
  25. *
  26. * b) Permission is hereby granted, free of charge, to any person
  27. * obtaining a copy of this software and associated documentation
  28. * files (the "Software"), to deal in the Software without
  29. * restriction, including without limitation the rights to use,
  30. * copy, modify, merge, publish, distribute, sublicense, and/or
  31. * sell copies of the Software, and to permit persons to whom the
  32. * Software is furnished to do so, subject to the following
  33. * conditions:
  34. *
  35. * The above copyright notice and this permission notice shall be
  36. * included in all copies or substantial portions of the Software.
  37. *
  38. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  39. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  40. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  41. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  42. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  43. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  44. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  45. * OTHER DEALINGS IN THE SOFTWARE.
  46. */
  47.  
  48. /dts-v1/;
  49. #include "sun7i-a20.dtsi"
  50. #include "sunxi-common-regulators.dtsi"
  51. #include <dt-bindings/gpio/gpio.h>
  52. #include <dt-bindings/interrupt-controller/arm-gic.h>
  53.  
  54. / {
  55. model = "LeMaker Banana Pro";
  56. compatible = "lemaker,bananapro", "allwinner,sun7i-a20";
  57. };
  58.  
  59. &spi0 {
  60. pinctrl-names = "default";
  61. pinctrl-0 = <&spi0_pins_a>;
  62. status = "okay";
  63. };
  64.  
  65. &mmc0 {
  66. pinctrl-names = "default";
  67. pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
  68. vmmc-supply = <&reg_vcc3v3>;
  69. bus-width = <4>;
  70. cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
  71. cd-inverted;
  72. status = "okay";
  73. };
  74.  
  75. &mmc3 {
  76. pinctrl-names = "default";
  77. pinctrl-0 = <&mmc3_pins_a>;
  78. vmmc-supply = <&reg_vmmc3>;
  79. bus-width = <4>;
  80. non-removable;
  81. status = "okay";
  82. };
  83.  
  84. &usbphy {
  85. usb1_vbus-supply = <&reg_usb1_vbus>;
  86. usb2_vbus-supply = <&reg_usb2_vbus>;
  87. status = "okay";
  88. };
  89.  
  90. &ehci0 {
  91. status = "okay";
  92. };
  93.  
  94. &ohci0 {
  95. status = "okay";
  96. };
  97.  
  98. &ahci {
  99. status = "okay";
  100. };
  101.  
  102. &ehci1 {
  103. status = "okay";
  104. };
  105.  
  106. &ohci1 {
  107. status = "okay";
  108. };
  109.  
  110. &pio {
  111. usb1_vbus_pin_bananapro: usb1_vbus_pin@0 {
  112. allwinner,pins = "PH0";
  113. allwinner,function = "gpio_out";
  114. allwinner,drive = <0>;
  115. allwinner,pull = <0>;
  116. };
  117.  
  118. usb2_vbus_pin_bananapro: usb2_vbus_pin@0 {
  119. allwinner,pins = "PH1";
  120. allwinner,function = "gpio_out";
  121. allwinner,drive = <0>;
  122. allwinner,pull = <0>;
  123. };
  124.  
  125. mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
  126. allwinner,pins = "PH10";
  127. allwinner,function = "gpio_in";
  128. allwinner,drive = <0>;
  129. allwinner,pull = <1>;
  130. };
  131.  
  132. vmmc3_pin_bananapro: vmmc3_pin@0 {
  133. allwinner,pins = "PH22";
  134. allwinner,function = "gpio_out";
  135. allwinner,drive = <0>;
  136. allwinner,pull = <0>;
  137. };
  138.  
  139. gmac_power_pin_bananapi: gmac_power_pin@0 {
  140. allwinner,pins = "PH23";
  141. allwinner,function = "gpio_out";
  142. allwinner,drive = <0>;
  143. allwinner,pull = <0>;
  144. };
  145.  
  146. led_pins_bananapi: led_pins@0 {
  147. allwinner,pins = "PH24", "PG2";
  148. allwinner,function = "gpio_out";
  149. allwinner,drive = <0>;
  150. allwinner,pull = <0>;
  151. };
  152. };
  153.  
  154. &ir0 {
  155. pinctrl-names = "default";
  156. pinctrl-0 = <&ir0_pins_a>;
  157. status = "okay";
  158. };
  159.  
  160. &uart0 {
  161. pinctrl-names = "default";
  162. pinctrl-0 = <&uart0_pins_a>;
  163. status = "okay";
  164. };
  165.  
  166. &uart2 {
  167. pinctrl-names = "default";
  168. pinctrl-0 = <&uart2_pins_a>;
  169. status = "okay";
  170. };
  171.  
  172. &uart7 {
  173. pinctrl-names = "default";
  174. pinctrl-0 = <&uart7_pins_a>;
  175. status = "okay";
  176. };
  177.  
  178. &i2c0 {
  179. pinctrl-names = "default";
  180. pinctrl-0 = <&i2c0_pins_a>;
  181. status = "okay";
  182.  
  183. axp209: pmic@34 {
  184. compatible = "x-powers,axp209";
  185. reg = <0x34>;
  186. interrupt-parent = <&nmi_intc>;
  187. interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
  188.  
  189. interrupt-controller;
  190. #interrupt-cells = <1>;
  191. };
  192. };
  193.  
  194. &i2c2 {
  195. pinctrl-names = "default";
  196. pinctrl-0 = <&i2c2_pins_a>;
  197. status = "okay";
  198. };
  199.  
  200. &gmac {
  201. pinctrl-names = "default";
  202. pinctrl-0 = <&gmac_pins_rgmii_a>;
  203. phy = <&phy1>;
  204. phy-mode = "rgmii";
  205. phy-supply = <&reg_gmac_3v3>;
  206. status = "okay";
  207.  
  208. phy1: ethernet-phy@1 {
  209. reg = <1>;
  210. };
  211. };
  212.  
  213. &reg_usb1_vbus {
  214. pinctrl-0 = <&usb1_vbus_pin_bananapro>;
  215. gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
  216. status = "okay";
  217. };
  218.  
  219. &reg_usb2_vbus {
  220. pinctrl-0 = <&usb2_vbus_pin_bananapro>;
  221. gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
  222. status = "okay";
  223. };
  224.  
  225. / {
  226. reg_gmac_3v3: gmac-3v3 {
  227. compatible = "regulator-fixed";
  228. pinctrl-names = "default";
  229. pinctrl-0 = <&gmac_power_pin_bananapi>;
  230. regulator-name = "gmac-3v3";
  231. regulator-min-microvolt = <3300000>;
  232. regulator-max-microvolt = <3300000>;
  233. startup-delay-us = <100000>;
  234. enable-active-high;
  235. gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>;
  236. };
  237.  
  238. reg_vmmc3: vmmc3 {
  239. compatible = "regulator-fixed";
  240. pinctrl-names = "default";
  241. pinctrl-0 = <&vmmc3_pin_bananapro>;
  242. regulator-name = "vmmc3";
  243. regulator-min-microvolt = <3300000>;
  244. regulator-max-microvolt = <3300000>;
  245. enable-active-high;
  246. gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>;
  247. };
  248.  
  249. leds {
  250. compatible = "gpio-leds";
  251. pinctrl-names = "default";
  252. pinctrl-0 = <&led_pins_bananapi>;
  253.  
  254. green {
  255. label = "bananapi:green:usr";
  256. gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
  257. };
  258. blue {
  259. label = "bananapi:blue:usr";
  260. gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>;
  261. };
  262. };
  263.  
  264. };
  265. &spi0 {
  266. /* this is provided here to make it easy to enable SPI when editing this file */
  267. // status = "okay";
  268. };
  269.  
  270.  
  271.  
  272. /*
  273. * Texy
  274. * 2.8" TFT + Touch Shield Board (320x240) HY28A
  275. *
  276. */
  277. &spi0 {
  278. hy28a@0{
  279. compatible = "ilitek,ili9320";
  280. reg = <0>;
  281. status = "disabled";
  282.  
  283. spi-max-frequency = <32000000>;
  284. spi-cpol;
  285. spi-cpha;
  286. rotate = <270>;
  287. bgr;
  288. fps = <50>;
  289. buswidth = <8>;
  290. startbyte = <0x70>;
  291. reset-gpios = <&pio 25 0>;
  292. led-gpios = <&pio 18 1>;
  293. debug = <0>;
  294. };
  295.  
  296. hy28a_ts@1 {
  297. compatible = "ti,ads7846";
  298. reg = <1>;
  299. status = "disabled";
  300.  
  301. spi-max-frequency = <2000000>;
  302. interrupts = <3 17>;
  303. pendown-gpio = <&pio 17 0>;
  304. ti,x-plate-ohms = /bits/ 16 <100>;
  305. ti,pressure-max = /bits/ 16 <255>;
  306. };
  307. };
  308.  
  309.  
  310.  
  311.  
  312. /*
  313. * Texy
  314. * 2.8" TFT + Touch Shield Board (320x240) HY28B
  315. * NOT TESTED
  316. */
  317. &spi0 {
  318. hy28b@0{
  319. compatible = "ilitek,ili9325";
  320. reg = <0>;
  321. status = "disabled";
  322.  
  323. spi-max-frequency = <48000000>;
  324. rotate = <270>;
  325. bgr;
  326. fps = <50>;
  327. buswidth = <8>;
  328. startbyte = <0x70>;
  329. reset-gpios = <&pio 25 0>;
  330. led-gpios = <&pio 18 1>;
  331.  
  332. gamma = "04 1F 4 7 7 0 7 7 6 0\n0F 00 1 7 4 0 0 0 6 7";
  333.  
  334. init = <0x10000e7 0x0010
  335. 0x1000000 0x0001
  336. 0x1000001 0x0100
  337. 0x1000002 0x0700
  338. 0x1000003 0x1030
  339. 0x1000004 0x0000
  340. 0x1000008 0x0207
  341. 0x1000009 0x0000
  342. 0x100000a 0x0000
  343. 0x100000c 0x0001
  344. 0x100000d 0x0000
  345. 0x100000f 0x0000
  346. 0x1000010 0x0000
  347. 0x1000011 0x0007
  348. 0x1000012 0x0000
  349. 0x1000013 0x0000
  350. 0x2000032
  351. 0x1000010 0x1590
  352. 0x1000011 0x0227
  353. 0x2000032
  354. 0x1000012 0x009c
  355. 0x2000032
  356. 0x1000013 0x1900
  357. 0x1000029 0x0023
  358. 0x100002b 0x000e
  359. 0x2000032
  360. 0x1000020 0x0000
  361. 0x1000021 0x0000
  362. 0x2000032
  363. 0x1000050 0x0000
  364. 0x1000051 0x00ef
  365. 0x1000052 0x0000
  366. 0x1000053 0x013f
  367. 0x1000060 0xa700
  368. 0x1000061 0x0001
  369. 0x100006a 0x0000
  370. 0x1000080 0x0000
  371. 0x1000081 0x0000
  372. 0x1000082 0x0000
  373. 0x1000083 0x0000
  374. 0x1000084 0x0000
  375. 0x1000085 0x0000
  376. 0x1000090 0x0010
  377. 0x1000092 0x0000
  378. 0x1000093 0x0003
  379. 0x1000095 0x0110
  380. 0x1000097 0x0000
  381. 0x1000098 0x0000
  382. 0x1000007 0x0133
  383. 0x1000020 0x0000
  384. 0x1000021 0x0000
  385. 0x2000064>;
  386. debug = <0>;
  387. };
  388.  
  389. hy28b_ts@1 {
  390. compatible = "ti,ads7846";
  391. reg = <1>;
  392. status = "disabled";
  393.  
  394. spi-max-frequency = <2000000>;
  395. interrupts = <3 17>;
  396. pendown-gpio = <&pio 17 0>;
  397. ti,x-plate-ohms = /bits/ 16 <100>;
  398. ti,pressure-max = /bits/ 16 <255>;
  399. };
  400. };
  401.  
  402.  
  403.  
  404.  
  405. /*
  406. * ITEAD
  407. * ITDB02-2.8
  408. *
  409. */
  410. / {
  411. itdb28 {
  412. compatible = "ilitek,ili9325";
  413. status = "disabled";
  414.  
  415. rotate = <0>;
  416. bgr;
  417. buswidth = <8>;
  418. reset-gpios = <&pio 17 0>;
  419. dc-gpios = <&pio 3 0>;
  420. cs-gpios = <&pio 27 0>;
  421. wr-gpios = <&pio 2 0>;
  422. db-gpios = <&pio 9 0>,
  423. <&pio 11 0>,
  424. <&pio 18 0>,
  425. <&pio 23 0>,
  426. <&pio 24 0>,
  427. <&pio 25 0>,
  428. <&pio 8 0>,
  429. <&pio 7 0>;
  430. /* LED pin drives backlight directly. Use transistor (50mA) */
  431. /* led-gpios = <&pio 4 1>; */
  432. debug = <0>;
  433. };
  434. };
  435.  
  436.  
  437.  
  438.  
  439. /*
  440. * Watterott
  441. * RPi-Display - 2.8" Touch-Display (320x240)
  442. *
  443. */
  444. &spi0 {
  445. rpi-display@0{
  446. compatible = "ilitek,ili9341";
  447. reg = <0>;
  448. status = "disabled";
  449.  
  450. spi-max-frequency = <32000000>;
  451. rotate = <270>;
  452. bgr;
  453. fps = <30>;
  454. buswidth = <8>;
  455. reset-gpios = <&pio 23 0>;
  456. dc-gpios = <&pio 24 0>;
  457. led-gpios = <&pio 18 1>;
  458. debug = <0>;
  459. };
  460.  
  461. rpi-display_ts@1 {
  462. compatible = "ti,ads7846";
  463. reg = <1>;
  464. status = "disabled";
  465.  
  466. spi-max-frequency = <2000000>;
  467. interrupts = <3 25>;
  468. pendown-gpio = <&pio 25 0>;
  469. ti,x-plate-ohms = /bits/ 16 <60>;
  470. ti,pressure-max = /bits/ 16 <255>;
  471. };
  472. };
  473.  
  474.  
  475.  
  476.  
  477. /*
  478. * Ozzmaker
  479. * PiScreen - 3.5" TFT touchscreen (480x320)
  480. *
  481. */
  482. &spi0 {
  483. piscreen@0{
  484. compatible = "ilitek,ili9486";
  485. reg = <0>;
  486. status = "disabled";
  487.  
  488. spi-max-frequency = <20000000>;
  489. rotate = <270>;
  490. bgr;
  491. fps = <30>;
  492. buswidth = <8>;
  493. reset-gpios = <&pio 25 0>;
  494. dc-gpios = <&pio 24 0>;
  495. led-gpios = <&pio 22 1>;
  496.  
  497. init = <0x10000b0 0x00
  498. 0x1000011
  499. 0x20000FF
  500. 0x100003A 0x55
  501. 0x1000036 0x28
  502. 0x10000C2 0x44
  503. 0x10000C5 0x00 0x00 0x00 0x00
  504. 0x10000E0 0x0F 0x1F 0x1C 0x0C 0x0F 0x08 0x48 0x98 0x37 0x0A 0x13 0x04 0x11 0x0D 0x00
  505. 0x10000E1 0x0F 0x32 0x2E 0x0B 0x0D 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
  506. 0x10000E2 0x0F 0x32 0x2E 0x0B 0x0D 0x05 0x47 0x75 0x37 0x06 0x10 0x03 0x24 0x20 0x00
  507. 0x1000011
  508. 0X1000029>;
  509. debug = <0>;
  510. };
  511.  
  512. piscreen_ts@1 {
  513. compatible = "ti,ads7846";
  514. reg = <1>;
  515. status = "disabled";
  516.  
  517. spi-max-frequency = <2000000>;
  518. interrupts = <3 17>;
  519. pendown-gpio = <&pio 17 0>;
  520. ti,x-plate-ohms = /bits/ 16 <100>;
  521. ti,pressure-max = /bits/ 16 <255>;
  522. };
  523. };
  524.  
  525. /*
  526. * NeoSec LLC
  527. * 3.5 inch TFT Display (320x480)
  528. *
  529. */
  530. &spi0 {
  531. tinylcd35@0{
  532. compatible = "neosec,tinylcd";
  533. reg = <0>;
  534. status = "disabled";
  535.  
  536. spi-max-frequency = <48000000>;
  537. rotate = <270>;
  538. bgr;
  539. fps = <50>;
  540. buswidth = <8>;
  541. reset-gpios = <&pio 25 0>;
  542. dc-gpios = <&pio 24 0>;
  543. led-gpios = <&pio 18 1>;
  544. debug = <0>;
  545. };
  546.  
  547. tinylcd35@1 {
  548. compatible = "ti,ads7846";
  549. reg = <1>;
  550. status = "disabled";
  551.  
  552. spi-max-frequency = <2000000>;
  553. interrupts = <3 3>;
  554. pendown-gpio = <&pio 3 0>;
  555. ti,x-plate-ohms = /bits/ 16 <100>;
  556. ti,pressure-max = /bits/ 16 <255>;
  557. };
  558. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement