aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2019-01-30 06:04:37 -0500
committerAndy Gross <agross@kernel.org>2019-04-23 15:54:47 -0400
commitf3eb39a55a1f770ec768304af49d406dc92637d7 (patch)
treeb0e3f40d7128de8d562d117f5b7f6f491419c2a7
parent1ad69b69558230ed6bfdcc752bd9b69d33c932b4 (diff)
arm64: dts: db820c: Add sound card support
This patch adds support both digital and analog audio on DB820c. This board has HDMI port and 3.5mm audio jack to support both digital and analog audio respectively. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Andy Gross <agross@kernel.org>
-rw-r--r--arch/arm64/boot/dts/qcom/apq8096-db820c-pmic-pins.dtsi8
-rw-r--r--arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi94
-rw-r--r--arch/arm64/boot/dts/qcom/msm8996-pins.dtsi43
-rw-r--r--arch/arm64/boot/dts/qcom/msm8996.dtsi141
4 files changed, 286 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c-pmic-pins.dtsi b/arch/arm64/boot/dts/qcom/apq8096-db820c-pmic-pins.dtsi
index a6ad3d7fe655..31a3e3311ad5 100644
--- a/arch/arm64/boot/dts/qcom/apq8096-db820c-pmic-pins.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8096-db820c-pmic-pins.dtsi
@@ -36,6 +36,14 @@
36 }; 36 };
37 }; 37 };
38 38
39 audio_mclk: clk_div1 {
40 pinconf {
41 pins = "gpio15";
42 function = "func1";
43 power-source = <PM8994_GPIO_S4>; // 1.8V
44 };
45 };
46
39 volume_up_gpio: pm8996_gpio2 { 47 volume_up_gpio: pm8996_gpio2 {
40 pinconf { 48 pinconf {
41 pins = "gpio2"; 49 pins = "gpio2";
diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi b/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
index 1e78f0b47c89..943f69912074 100644
--- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
+++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
@@ -18,6 +18,8 @@
18#include "apq8096-db820c-pmic-pins.dtsi" 18#include "apq8096-db820c-pmic-pins.dtsi"
19#include <dt-bindings/input/input.h> 19#include <dt-bindings/input/input.h>
20#include <dt-bindings/gpio/gpio.h> 20#include <dt-bindings/gpio/gpio.h>
21#include <dt-bindings/sound/qcom,q6afe.h>
22#include <dt-bindings/sound/qcom,q6asm.h>
21 23
22/* 24/*
23 * GPIO name legend: proper name = the GPIO line is used as GPIO 25 * GPIO name legend: proper name = the GPIO line is used as GPIO
@@ -63,6 +65,7 @@
63 }; 65 };
64 66
65 clocks { 67 clocks {
68 compatible = "simple-bus";
66 divclk4: divclk4 { 69 divclk4: divclk4 {
67 compatible = "fixed-clock"; 70 compatible = "fixed-clock";
68 #clock-cells = <0>; 71 #clock-cells = <0>;
@@ -72,6 +75,15 @@
72 pinctrl-names = "default"; 75 pinctrl-names = "default";
73 pinctrl-0 = <&divclk4_pin_a>; 76 pinctrl-0 = <&divclk4_pin_a>;
74 }; 77 };
78
79 div1_mclk: divclk1 {
80 compatible = "gpio-gate-clock";
81 pinctrl-0 = <&audio_mclk>;
82 pinctrl-names = "default";
83 clocks = <&rpmcc RPM_SMD_DIV_CLK1>;
84 #clock-cells = <0>;
85 enable-gpios = <&pm8994_gpios 15 0>;
86 };
75 }; 87 };
76 88
77 soc { 89 soc {
@@ -453,6 +465,16 @@
453 }; 465 };
454 }; 466 };
455 467
468 slim_msm: slim@91c0000 {
469 ngd@1 {
470 wcd9335: codec@1{
471 clock-names = "mclk", "slimbus";
472 clocks = <&div1_mclk>,
473 <&rpmcc RPM_SMD_BB_CLK1>;
474 };
475 };
476 };
477
456 mdss@900000 { 478 mdss@900000 {
457 status = "okay"; 479 status = "okay";
458 480
@@ -666,3 +688,75 @@
666 }; 688 };
667 }; 689 };
668}; 690};
691
692&sound {
693 compatible = "qcom,apq8096-sndcard";
694 model = "DB820c";
695 audio-routing = "RX_BIAS", "MCLK";
696
697 mm1-dai-link {
698 link-name = "MultiMedia1";
699 cpu {
700 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
701 };
702 };
703
704 mm2-dai-link {
705 link-name = "MultiMedia2";
706 cpu {
707 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
708 };
709 };
710
711 mm3-dai-link {
712 link-name = "MultiMedia3";
713 cpu {
714 sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>;
715 };
716 };
717
718 hdmi-dai-link {
719 link-name = "HDMI";
720 cpu {
721 sound-dai = <&q6afedai HDMI_RX>;
722 };
723
724 platform {
725 sound-dai = <&q6routing>;
726 };
727
728 codec {
729 sound-dai = <&hdmi 0>;
730 };
731 };
732
733 slim-dai-link {
734 link-name = "SLIM Playback";
735 cpu {
736 sound-dai = <&q6afedai SLIMBUS_6_RX>;
737 };
738
739 platform {
740 sound-dai = <&q6routing>;
741 };
742
743 codec {
744 sound-dai = <&wcd9335 6>;
745 };
746 };
747
748 slimcap-dai-link {
749 link-name = "SLIM Capture";
750 cpu {
751 sound-dai = <&q6afedai SLIMBUS_0_TX>;
752 };
753
754 platform {
755 sound-dai = <&q6routing>;
756 };
757
758 codec {
759 sound-dai = <&wcd9335 1>;
760 };
761 };
762};
diff --git a/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi b/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi
index 131878db9852..fba2229b6236 100644
--- a/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996-pins.dtsi
@@ -13,6 +13,49 @@
13 13
14&msmgpio { 14&msmgpio {
15 15
16 wcd9xxx_intr {
17 wcd_intr_default: wcd_intr_default{
18 mux {
19 pins = "gpio54";
20 function = "gpio";
21 };
22
23 config {
24 pins = "gpio54";
25 drive-strength = <2>; /* 2 mA */
26 bias-pull-down; /* pull down */
27 input-enable;
28 };
29 };
30 };
31
32 cdc_reset_ctrl {
33 cdc_reset_sleep: cdc_reset_sleep {
34 mux {
35 pins = "gpio64";
36 function = "gpio";
37 };
38 config {
39 pins = "gpio64";
40 drive-strength = <16>;
41 bias-disable;
42 output-low;
43 };
44 };
45 cdc_reset_active:cdc_reset_active {
46 mux {
47 pins = "gpio64";
48 function = "gpio";
49 };
50 config {
51 pins = "gpio64";
52 drive-strength = <16>;
53 bias-pull-down;
54 output-high;
55 };
56 };
57 };
58
16 blsp1_spi0_default: blsp1_spi0_default { 59 blsp1_spi0_default: blsp1_spi0_default {
17 pinmux { 60 pinmux {
18 function = "blsp_spi1"; 61 function = "blsp_spi1";
diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi
index d46858644c3d..c4e7fde9d88e 100644
--- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
@@ -14,6 +14,7 @@
14#include <dt-bindings/clock/qcom,gcc-msm8996.h> 14#include <dt-bindings/clock/qcom,gcc-msm8996.h>
15#include <dt-bindings/clock/qcom,mmcc-msm8996.h> 15#include <dt-bindings/clock/qcom,mmcc-msm8996.h>
16#include <dt-bindings/clock/qcom,rpmcc.h> 16#include <dt-bindings/clock/qcom,rpmcc.h>
17#include <dt-bindings/soc/qcom,apr.h>
17 18
18/ { 19/ {
19 interrupt-parent = <&intc>; 20 interrupt-parent = <&intc>;
@@ -1336,6 +1337,33 @@
1336 status = "disabled"; 1337 status = "disabled";
1337 }; 1338 };
1338 1339
1340 lpass_q6_smmu: arm,smmu-lpass_q6@1600000 {
1341 compatible = "qcom,msm8996-smmu-v2", "qcom,smmu-v2";
1342 reg = <0x1600000 0x20000>;
1343 #iommu-cells = <1>;
1344 power-domains = <&gcc HLOS1_VOTE_LPASS_CORE_GDSC>;
1345
1346 #global-interrupts = <1>;
1347 interrupts = <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
1348 <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>,
1349 <GIC_SPI 393 IRQ_TYPE_LEVEL_HIGH>,
1350 <GIC_SPI 394 IRQ_TYPE_LEVEL_HIGH>,
1351 <GIC_SPI 395 IRQ_TYPE_LEVEL_HIGH>,
1352 <GIC_SPI 396 IRQ_TYPE_LEVEL_HIGH>,
1353 <GIC_SPI 397 IRQ_TYPE_LEVEL_HIGH>,
1354 <GIC_SPI 398 IRQ_TYPE_LEVEL_HIGH>,
1355 <GIC_SPI 399 IRQ_TYPE_LEVEL_HIGH>,
1356 <GIC_SPI 400 IRQ_TYPE_LEVEL_HIGH>,
1357 <GIC_SPI 401 IRQ_TYPE_LEVEL_HIGH>,
1358 <GIC_SPI 402 IRQ_TYPE_LEVEL_HIGH>,
1359 <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>;
1360
1361 clocks = <&gcc GCC_HLOS1_VOTE_LPASS_CORE_SMMU_CLK>,
1362 <&gcc GCC_HLOS1_VOTE_LPASS_ADSP_SMMU_CLK>;
1363 clock-names = "iface", "bus";
1364 status = "disabled";
1365 };
1366
1339 agnoc@0 { 1367 agnoc@0 {
1340 power-domains = <&gcc AGGRE0_NOC_GDSC>; 1368 power-domains = <&gcc AGGRE0_NOC_GDSC>;
1341 compatible = "simple-pm-bus"; 1369 compatible = "simple-pm-bus";
@@ -1502,6 +1530,66 @@
1502 }; 1530 };
1503 }; 1531 };
1504 1532
1533 slimbam:dma@9184000
1534 {
1535 compatible = "qcom,bam-v1.7.0";
1536 qcom,controlled-remotely;
1537 reg = <0x9184000 0x32000>;
1538 num-channels = <31>;
1539 interrupts = <0 164 IRQ_TYPE_LEVEL_HIGH>;
1540 #dma-cells = <1>;
1541 qcom,ee = <1>;
1542 qcom,num-ees = <2>;
1543 };
1544
1545 slim_msm: slim@91c0000 {
1546 compatible = "qcom,slim-ngd-v1.5.0";
1547 reg = <0x91c0000 0x2C000>;
1548 reg-names = "ctrl";
1549 interrupts = <0 163 IRQ_TYPE_LEVEL_HIGH>;
1550 dmas = <&slimbam 3>, <&slimbam 4>,
1551 <&slimbam 5>, <&slimbam 6>;
1552 dma-names = "rx", "tx", "tx2", "rx2";
1553 #address-cells = <1>;
1554 #size-cells = <0>;
1555 ngd@1 {
1556 reg = <1>;
1557 #address-cells = <1>;
1558 #size-cells = <1>;
1559
1560 tasha_ifd: tas-ifd {
1561 compatible = "slim217,1a0";
1562 reg = <0 0>;
1563 };
1564
1565 wcd9335: codec@1{
1566 pinctrl-0 = <&cdc_reset_active &wcd_intr_default>;
1567 pinctrl-names = "default";
1568
1569 compatible = "slim217,1a0";
1570 reg = <1 0>;
1571
1572 interrupt-parent = <&msmgpio>;
1573 interrupts = <54 IRQ_TYPE_LEVEL_HIGH>,
1574 <53 IRQ_TYPE_LEVEL_HIGH>;
1575 interrupt-names = "intr1", "intr2";
1576 interrupt-controller;
1577 #interrupt-cells = <1>;
1578 reset-gpios = <&msmgpio 64 0>;
1579
1580 slim-ifc-dev = <&tasha_ifd>;
1581
1582 vdd-buck-supply = <&pm8994_s4>;
1583 vdd-buck-sido-supply = <&pm8994_s4>;
1584 vdd-tx-supply = <&pm8994_s4>;
1585 vdd-rx-supply = <&pm8994_s4>;
1586 vdd-io-supply = <&pm8994_s4>;
1587
1588 #sound-dai-cells = <1>;
1589 };
1590 };
1591 };
1592
1505 gpu@b00000 { 1593 gpu@b00000 {
1506 compatible = "qcom,adreno-530.2", "qcom,adreno"; 1594 compatible = "qcom,adreno-530.2", "qcom,adreno";
1507 #stream-id-cells = <16>; 1595 #stream-id-cells = <16>;
@@ -1660,6 +1748,7 @@
1660 1748
1661 phys = <&hdmi_phy>; 1749 phys = <&hdmi_phy>;
1662 phy-names = "hdmi_phy"; 1750 phy-names = "hdmi_phy";
1751 #sound-dai-cells = <1>;
1663 1752
1664 ports { 1753 ports {
1665 #address-cells = <1>; 1754 #address-cells = <1>;
@@ -1698,6 +1787,9 @@
1698 }; 1787 };
1699 }; 1788 };
1700 1789
1790 sound: sound {
1791 };
1792
1701 adsp-pil { 1793 adsp-pil {
1702 compatible = "qcom,msm8996-adsp-pil"; 1794 compatible = "qcom,msm8996-adsp-pil";
1703 1795
@@ -1724,6 +1816,55 @@
1724 mboxes = <&apcs_glb 8>; 1816 mboxes = <&apcs_glb 8>;
1725 qcom,smd-edge = <1>; 1817 qcom,smd-edge = <1>;
1726 qcom,remote-pid = <2>; 1818 qcom,remote-pid = <2>;
1819 #address-cells = <1>;
1820 #size-cells = <0>;
1821 apr {
1822 power-domains = <&gcc HLOS1_VOTE_LPASS_ADSP_GDSC>;
1823 compatible = "qcom,apr-v2";
1824 qcom,smd-channels = "apr_audio_svc";
1825 reg = <APR_DOMAIN_ADSP>;
1826 #address-cells = <1>;
1827 #size-cells = <0>;
1828
1829 q6core {
1830 reg = <APR_SVC_ADSP_CORE>;
1831 compatible = "qcom,q6core";
1832 };
1833
1834 q6afe: q6afe {
1835 compatible = "qcom,q6afe";
1836 reg = <APR_SVC_AFE>;
1837 q6afedai: dais {
1838 compatible = "qcom,q6afe-dais";
1839 #address-cells = <1>;
1840 #size-cells = <0>;
1841 #sound-dai-cells = <1>;
1842 hdmi@1 {
1843 reg = <1>;
1844 };
1845 };
1846 };
1847
1848 q6asm: q6asm {
1849 compatible = "qcom,q6asm";
1850 reg = <APR_SVC_ASM>;
1851 q6asmdai: dais {
1852 compatible = "qcom,q6asm-dais";
1853 #sound-dai-cells = <1>;
1854 iommus = <&lpass_q6_smmu 1>;
1855 };
1856 };
1857
1858 q6adm: q6adm {
1859 compatible = "qcom,q6adm";
1860 reg = <APR_SVC_ADM>;
1861 q6routing: routing {
1862 compatible = "qcom,q6adm-routing";
1863 #sound-dai-cells = <0>;
1864 };
1865 };
1866 };
1867
1727 }; 1868 };
1728 }; 1869 };
1729 1870