Advertisement
Guest User

Untitled

a guest
Mar 31st, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.13 KB | None | 0 0
  1. /*
  2. * Copyright (c) 2015, The Linux Foundation. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 and
  6. * only version 2 as published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13.  
  14. #include <dt-bindings/gpio/gpio.h>
  15. #include <dt-bindings/input/input.h>
  16. #include <dt-bindings/sound/apq8016-lpass.h>
  17. #include "msm8916.dtsi"
  18. #include "pm8916.dtsi"
  19. #include "apq8016-sbc-soc-pins.dtsi"
  20. #include "apq8016-sbc-pmic-pins.dtsi"
  21. #include "msm8916-mdss.dtsi"
  22.  
  23.  
  24. / {
  25. aliases {
  26. serial0 = &blsp1_uart2;
  27. serial1 = &blsp1_uart1;
  28. usid0 = &pm8916_0;
  29. i2c0 = &blsp_i2c2;
  30. i2c1 = &blsp_i2c6;
  31. i2c3 = &blsp_i2c4;
  32. spi0 = &blsp_spi5;
  33. spi1 = &blsp_spi3;
  34. };
  35.  
  36. chosen {
  37. stdout-path = "serial0";
  38. };
  39.  
  40. backlight: backlight {
  41. compatible = "gpio-backlight";
  42. gpios = <&pm8916_mpps 4 GPIO_ACTIVE_HIGH>;
  43. default-on;
  44. };
  45.  
  46.  
  47. smd {
  48. rpm {
  49. rpm_requests {
  50. pm8916-regulators {
  51.  
  52. vdd_l1_l2_l3-supply = <&pm8916_s3>;
  53. vdd_l5-supply = <&pm8916_s3>;
  54. vdd_l4_l5_l6-supply = <&pm8916_s4>;
  55. vdd_l7-supply = <&pm8916_s4>;
  56.  
  57. s1 {
  58. regulator-min-microvolt = <375000>;
  59. regulator-max-microvolt = <1562000>;
  60.  
  61. };
  62. s2 {
  63. regulator-min-microvolt = <375000>;
  64. regulator-max-microvolt = <1562000>;
  65.  
  66. };
  67. s3 {
  68. regulator-min-microvolt = <375000>;
  69. regulator-max-microvolt = <1562000>;
  70.  
  71. };
  72. s4 {
  73. regulator-min-microvolt = <1800000>;
  74. regulator-max-microvolt = <1800000>;
  75.  
  76. regulator-always-on;
  77. regulator-boot-on;
  78. };
  79.  
  80. l1 {
  81. regulator-min-microvolt = <375000>;
  82. regulator-max-microvolt = <1525000>;
  83.  
  84. };
  85. l2 {
  86. regulator-min-microvolt = <375000>;
  87. regulator-max-microvolt = <1525000>;
  88.  
  89. };
  90. l3 {
  91. regulator-min-microvolt = <375000>;
  92. regulator-max-microvolt = <1525000>;
  93.  
  94. };
  95. l4 {
  96. regulator-min-microvolt = <1750000>;
  97. regulator-max-microvolt = <3337000>;
  98.  
  99. };
  100. l5 {
  101. regulator-min-microvolt = <1750000>;
  102. regulator-max-microvolt = <3337000>;
  103.  
  104. };
  105. l6 {
  106. regulator-min-microvolt = <1750000>;
  107. regulator-max-microvolt = <3337000>;
  108.  
  109. };
  110. l7 {
  111. regulator-min-microvolt = <1750000>;
  112. regulator-max-microvolt = <3337000>;
  113.  
  114. };
  115. l8 {
  116. regulator-min-microvolt = <1750000>;
  117. regulator-max-microvolt = <3337000>;
  118.  
  119. };
  120. l9 {
  121. regulator-min-microvolt = <1750000>;
  122. regulator-max-microvolt = <3337000>;
  123.  
  124. };
  125. l10 {
  126. regulator-min-microvolt = <1750000>;
  127. regulator-max-microvolt = <3337000>;
  128.  
  129. };
  130. l11 {
  131. regulator-min-microvolt = <1750000>;
  132. regulator-max-microvolt = <3337000>;
  133.  
  134. };
  135. l12 {
  136. regulator-min-microvolt = <1750000>;
  137. regulator-max-microvolt = <3337000>;
  138.  
  139. };
  140. l13 {
  141. regulator-min-microvolt = <1750000>;
  142. regulator-max-microvolt = <3337000>;
  143.  
  144. };
  145. l14 {
  146. regulator-min-microvolt = <1750000>;
  147. regulator-max-microvolt = <3337000>;
  148.  
  149. };
  150. l15 {
  151. regulator-min-microvolt = <1750000>;
  152. regulator-max-microvolt = <3337000>;
  153.  
  154. };
  155. l16 {
  156. regulator-min-microvolt = <1750000>;
  157. regulator-max-microvolt = <3337000>;
  158.  
  159. };
  160. l17 {
  161. regulator-min-microvolt = <1750000>;
  162. regulator-max-microvolt = <3337000>;
  163.  
  164. };
  165. l18 {
  166. regulator-min-microvolt = <1750000>;
  167. regulator-max-microvolt = <3337000>;
  168.  
  169. };
  170. };
  171. };
  172. };
  173. };
  174.  
  175. soc {
  176. serial@78af000 {
  177. label = "LS-UART0";
  178. status = "okay";
  179. pinctrl-names = "default", "sleep";
  180. pinctrl-0 = <&blsp1_uart1_default>;
  181. pinctrl-1 = <&blsp1_uart1_sleep>;
  182. };
  183.  
  184. serial@78b0000 {
  185. label = "LS-UART1";
  186. status = "okay";
  187. pinctrl-names = "default", "sleep";
  188. pinctrl-0 = <&blsp1_uart2_default>;
  189. pinctrl-1 = <&blsp1_uart2_sleep>;
  190. };
  191.  
  192. i2c@78b6000 {
  193. /* On Low speed expansion */
  194. label = "LS-I2C0";
  195. status = "okay";
  196.  
  197. himax@4a {
  198. compatible = "himax,hx8527-d48";
  199. reg = <0x4a>;
  200. interrupt-parent = <&msmgpio>;
  201. interrupts = <62 0x2>;
  202. vdd-supply = <&vph_pwr_vreg>;
  203. vcc_i2c-supply = <&vph_pwr_vreg>;
  204. himax,name = "hx8527-d48";
  205. himax,reset-gpio = <&tca9539 1 0>;
  206. himax,irq-gpio = <&msmgpio 62 0x00>;
  207. himax,i2c-pull-up;
  208. himax,reg-en;
  209. himax,num-max-touches = <5>;
  210. };
  211. };
  212.  
  213. i2c@78b8000 {
  214.  
  215. tca9539: tca9539@20 {
  216. compatible = "ti,tca9539";
  217. reg = <0x20>;
  218. gpio-controller;
  219. #gpio-cells = <2>;
  220. interrupt-controller;
  221. #interrupt-cells = <2>;
  222. /* On High speed expansion */
  223. label = "HS-I2C2";
  224. status = "okay";
  225. };
  226. };
  227.  
  228. /*
  229. * vph_pwr_vreg represents the unregulated battery voltage supply
  230. * VPH_PWR that is present whenever the device is powered on.
  231. */
  232. vph_pwr_vreg: vph_pwr_vreg {
  233. compatible = "regulator-fixed";
  234. regulator-name = "vph_pwr";
  235. status = "ok";
  236. regulator-always-on;
  237. enable-active-high;
  238. };
  239.  
  240. i2c@78ba000 {
  241. /* On Low speed expansion */
  242. status = "okay";
  243. };
  244.  
  245. spi@78b7000 {
  246. /* On High speed expansion */
  247. label = "HS-SPI1";
  248. status = "okay";
  249. };
  250.  
  251. spi@78b9000 {
  252. /* On Low speed expansion */
  253. label = "LS-SPI0";
  254. status = "okay";
  255. };
  256.  
  257. leds {
  258. pinctrl-names = "default";
  259. pinctrl-0 = <&msmgpio_leds>,
  260. <&pm8916_gpios_leds>,
  261. <&pm8916_mpps_leds>;
  262.  
  263. compatible = "gpio-leds";
  264.  
  265. /*
  266. led@1 {
  267. label = "apq8016-sbc:green:user1";
  268. gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>;
  269. linux,default-trigger = "heartbeat";
  270. default-state = "off";
  271. };
  272. */
  273.  
  274. led@2 {
  275. label = "apq8016-sbc:green:user2";
  276. gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>;
  277. linux,default-trigger = "mmc0";
  278. default-state = "off";
  279. };
  280.  
  281. led@3 {
  282. label = "apq8016-sbc:green:user3";
  283. gpios = <&pm8916_gpios 1 GPIO_ACTIVE_HIGH>;
  284. linux,default-trigger = "mmc1";
  285. default-state = "off";
  286. };
  287.  
  288. led@4 {
  289. label = "apq8016-sbc:green:user4";
  290. gpios = <&pm8916_gpios 2 GPIO_ACTIVE_HIGH>;
  291. linux,default-trigger = "none";
  292. default-state = "off";
  293. };
  294.  
  295. led@5 {
  296. label = "apq8016-sbc:yellow:wlan";
  297. gpios = <&pm8916_mpps 2 GPIO_ACTIVE_HIGH>;
  298. linux,default-trigger = "wlan";
  299. default-state = "off";
  300. };
  301.  
  302. led@6 {
  303. label = "apq8016-sbc:blue:bt";
  304. gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>;
  305. linux,default-trigger = "bt";
  306. default-state = "off";
  307. };
  308. /* TOUCH_GPIO */
  309. led@7 {
  310. label = "touch_gpio";
  311. gpios = <&tca9539 2 GPIO_ACTIVE_HIGH>;
  312. linux,default-trigger = "none";
  313. default-state = "on";
  314. };
  315. /* SCAM_PWDN
  316. * Disble SCAM_PWDN, MCAM_PWDN gpio registration
  317. * will be used in camera driver
  318. */
  319.  
  320. /*led@8 {
  321. label = "scam_pwdn";
  322. gpios = <&tca9539 3 GPIO_ACTIVE_HIGH>;
  323. linux,default-trigger = "none";
  324. default-state = "on";
  325. };
  326.  
  327. MCAM_PWDN
  328. led@9 {
  329. label = "mcam_pwdn";
  330. gpios = <&tca9539 4 GPIO_ACTIVE_HIGH>;
  331. linux,default-trigger = "none";
  332. default-state = "on";
  333. };
  334. */
  335.  
  336. /* CAM_GPIO_1 */
  337. led@10 {
  338. label = "cam_gpio_1";
  339. gpios = <&tca9539 5 GPIO_ACTIVE_HIGH>;
  340. linux,default-trigger = "none";
  341. default-state = "on";
  342. };
  343. /* CAM_GPIO_2 */
  344. led@11 {
  345. label = "cam_gpio_2";
  346. gpios = <&tca9539 6 GPIO_ACTIVE_HIGH>;
  347. linux,default-trigger = "none";
  348. default-state = "on";
  349. };
  350. /* LS_EXP_GPIO_10 */
  351. led@12 {
  352. label = "ls_exp_gpio_10";
  353. gpios = <&tca9539 8 GPIO_ACTIVE_HIGH>;
  354. linux,default-trigger = "none";
  355. default-state = "on";
  356. };
  357. /* LS_EXP_GPIO_11*/
  358. led@13 {
  359. label = "ls_exp_gpio_11";
  360. gpios = <&tca9539 9 GPIO_ACTIVE_HIGH>;
  361. linux,default-trigger = "none";
  362. default-state = "off";
  363. };
  364. /* LS_EXP_GPIO_12 */
  365. led@14 {
  366. label = "ls_exp_gpio_12";
  367. gpios = <&tca9539 10 GPIO_ACTIVE_HIGH>;
  368. linux,default-trigger = "none";
  369. default-state = "off";
  370. };
  371. /* LS_EXP_GPIO_13 */
  372. led@15 {
  373. label = "ls_exp_gpio_13";
  374. gpios = <&tca9539 11 GPIO_ACTIVE_HIGH>;
  375. linux,default-trigger = "none";
  376. default-state = "off";
  377. };
  378. /* LS_EXP_GPIO_14 */
  379. led@16 {
  380. label = "ls_exp_gpio_14";
  381. gpios = <&tca9539 12 GPIO_ACTIVE_HIGH>;
  382. linux,default-trigger = "none";
  383. default-state = "off";
  384. };
  385. /* LS_EXP_GPIO_15 */
  386. led@17 {
  387. label = "ls_exp_gpio_15";
  388. gpios = <&tca9539 13 GPIO_ACTIVE_HIGH>;
  389. linux,default-trigger = "none";
  390. default-state = "on";
  391. };
  392. /* LS_EXP_GPIO_16 */
  393. led@18 {
  394. label = "ls_exp_gpio_16";
  395. gpios = <&tca9539 14 GPIO_ACTIVE_HIGH>;
  396. linux,default-trigger = "none";
  397. default-state = "on";
  398. };
  399. /* LS_EXP_GPIO_17 */
  400. led@19 {
  401. label = "ls_exp_gpio_17";
  402. gpios = <&tca9539 15 GPIO_ACTIVE_HIGH>;
  403. linux,default-trigger = "none";
  404. default-state = "on";
  405. };
  406. };
  407.  
  408. usb2513 {
  409. compatible = "smsc,usb3503";
  410. reset-gpios = <&pm8916_gpios 3 GPIO_ACTIVE_LOW>;
  411. initial-mode = <1>;
  412. };
  413.  
  414. usb_id: usb-id {
  415. interrupt-parent = <&msmgpio>;
  416. compatible = "linux,extcon-usb-gpio";
  417. id-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>;
  418. pinctrl-names = "default";
  419. pinctrl-0 = <&usb_id_default>;
  420. };
  421.  
  422. gpio_keys {
  423. compatible = "gpio-keys";
  424. #address-cells = <1>;
  425. #size-cells = <0>;
  426. autorepeat;
  427. /*i2c-bus = <&blsp_i2c0>;*/
  428. pinctrl-names = "default";
  429. pinctrl-0 = <&msm_key_volp_n_default>;
  430.  
  431. button@0 {
  432. label = "Volume Up";
  433. linux,code = <KEY_VOLUMEUP>;
  434. gpios = <&msmgpio 107 GPIO_ACTIVE_LOW>;
  435. };
  436. };
  437. };
  438.  
  439. };
  440. &spmi_pon {
  441. /* Overwrite RESETIN_N keyboard scan code*/
  442. linux,code = <KEY_VOLUMEDOWN>;
  443. };
  444.  
  445. &blsp_dma {
  446. status = "okay";
  447. };
  448.  
  449. &blsp_spi5 {
  450. status = "okay";
  451. };
  452.  
  453. &blsp_spi3 {
  454. status = "okay";
  455. };
  456.  
  457. &sdhc_1 {
  458. vmmc-supply = <&pm8916_l8>;
  459. vqmmc-supply = <&pm8916_l5>;
  460.  
  461. pinctrl-names = "default", "sleep";
  462. pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
  463. pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
  464. status = "okay";
  465. };
  466.  
  467. &sdhc_2 {
  468. vmmc-supply = <&pm8916_l11>;
  469. vqmmc-supply = <&pm8916_l12>;
  470.  
  471. pinctrl-names = "default", "sleep";
  472. pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
  473. pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
  474. #address-cells = <0>;
  475. interrupt-parent = <&sdhc_2>;
  476. interrupts = <0 1 2>;
  477. #interrupt-cells = <1>;
  478. interrupt-map-mask = <0xffffffff>;
  479. interrupt-map = <0 &intc 0 125 0
  480. 1 &intc 0 221 0
  481. 2 &msmgpio 38 0>;
  482. interrupt-names = "hc_irq", "pwr_irq", "status_irq";
  483. cd-gpios = <&msmgpio 38 0x1>;
  484.  
  485. status = "okay";
  486. };
  487.  
  488. &usb_dev {
  489. extcon = <&usb_id>, <&usb_id>;
  490. status = "okay";
  491. };
  492.  
  493. &usb_host {
  494. status = "okay";
  495. };
  496.  
  497. &sdhc_1 {
  498. status = "okay";
  499. };
  500.  
  501. &usb_otg {
  502. extcon = <&usb_id>, <&usb_id>;
  503. dr_mode = "otg";
  504. status = "okay";
  505. switch-gpio = <&pm8916_gpios 4 GPIO_ACTIVE_HIGH>; // D+/D- lines: 1 - Routed to HUB, 0 - Device
  506. pinctrl-names = "default";
  507. pinctrl-0 = <&usb_sw_sel_pm>;
  508. };
  509.  
  510. &blsp_i2c2 {
  511. status = "ok";
  512. /*adv_bridge: bridge@39 {
  513. status = "ok";
  514. compatible = "adi,adv7533";
  515. reg = <0x39>;
  516. interrupt-parent = <&msmgpio>;
  517. interrupts = <31 2>;
  518. avdd-supply = <&pm8916_l6>;
  519. v3p3-supply = <&pm8916_l17>;
  520. adi,dsi-lanes = <4>;
  521. pd-gpios = <&msmgpio 32 0>;
  522. pinctrl-names = "default","sleep";
  523. pinctrl-0 = <&adv7533_int_active &adv7533_switch_active>;
  524. pinctrl-1 = <&adv7533_int_suspend &adv7533_switch_suspend>;
  525. #sound-dai-cells = <1>;
  526. port {
  527. adv_in: endpoint {
  528. remote-endpoint = <&dsi_out>;
  529. };
  530. };
  531. };
  532. */
  533. };
  534.  
  535.  
  536.  
  537. &blsp_i2c4 {
  538. status = "ok";
  539.  
  540. };
  541.  
  542.  
  543. /*
  544. &mdss_dsi0 {
  545. status = "ok";
  546. port {
  547. dsi_out: endpoint {
  548. remote-endpoint = <&adv_in>;
  549. };
  550. };
  551. };
  552. */
  553.  
  554. &mdss_dsi0
  555. {
  556. status = "ok";
  557. panel@0 {
  558. compatible = "truely,ssd2080m";
  559. reg = <0>;
  560. power-supply = <&pm8916_l6>;
  561. backlight = <&backlight>;
  562. reset-gpio = <&tca9539 0 0>;
  563. port {
  564. truly_in: endpoint {
  565. remote-endpoint = <&dsi0_out>;
  566. };
  567. };
  568. };
  569. port {
  570. dsi0_out: endpoint {
  571. remote-endpoint = <&truly_in>;
  572. };
  573. };
  574. };
  575.  
  576. &lpass {
  577. status = "okay";
  578. };
  579.  
  580. &wcd_codec {
  581. status = "okay";
  582. clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
  583. clock-names = "mclk";
  584. qcom,lpass-codec-core = <&lpass_codec_core>;
  585. };
  586. /*
  587. Internal Codec
  588. playback - Primary MI2S
  589. capture - Ter MI2S
  590.  
  591. External Primary:
  592. playback - secondary MI2S
  593. capture - Quat MI2S
  594.  
  595. External Secondary:
  596. playback - Quat MI2S
  597. capture - Quat MI2S
  598. */
  599. &sound {
  600. status = "okay";
  601. pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>;
  602. pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>;
  603. pinctrl-names = "default", "sleep";
  604. qcom,model = "DB410c";
  605. qcom,audio-routing =
  606. "AMIC1", "MIC BIAS External",
  607. "AMIC2", "MIC BIAS Internal2",
  608. "AMIC3", "MIC BIAS External",
  609. "DMIC1", "MIC BIAS Internal1";
  610.  
  611. /* External Primary or External Secondary -ADV7533 HDMI */
  612. /*
  613. external-dai-link@0 {
  614. link-name = "ADV7533";
  615.  
  616. cpu {
  617. sound-dai = <&lpass MI2S_QUATERNARY>;
  618. };
  619. codec {
  620. sound-dai = <&adv_bridge 0>;
  621. };
  622. };
  623. */
  624.  
  625. internal-codec-playback-dai-link@0 { /* I2S - Internal codec */
  626. link-name = "WCD";
  627. cpu { /* PRIMARY */
  628. sound-dai = <&lpass MI2S_PRIMARY>;
  629. };
  630. codec {
  631. sound-dai = <&wcd_codec 0>;
  632. };
  633. };
  634.  
  635. internal-codec-capture-dai-link@0 { /* I2S - Internal codec */
  636. link-name = "WCD-Capture";
  637. cpu { /* PRIMARY */
  638. sound-dai = <&lpass MI2S_TERTIARY>;
  639. };
  640. codec {
  641. sound-dai = <&wcd_codec 1>;
  642. };
  643. };
  644.  
  645. };
  646.  
  647. /* default regulators required for mezzanine boards */
  648. &pm8916_l15 {
  649. regulator-always-on;
  650. };
  651.  
  652. &vidc_rproc {
  653. status = "okay";
  654. };
  655.  
  656. &vidc {
  657. status = "okay";
  658. };
  659.  
  660. &ov5640_pri_camera{
  661. pwdn-gpios = <&tca9539 4 0>;
  662. };
  663.  
  664. &ov5640_sec_camera{
  665. pwdn-gpios = <&tca9539 3 0>;
  666. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement