15977c142SSheng-Liang Pan// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 25977c142SSheng-Liang Pan/* 35977c142SSheng-Liang Pan * 45977c142SSheng-Liang Pan * This file defines the common audio settings for the child boards 55977c142SSheng-Liang Pan * using rt5682 codec and having 3 dmics connected to sc7280. 65977c142SSheng-Liang Pan * 75977c142SSheng-Liang Pan * Copyright 2022 Google LLC. 85977c142SSheng-Liang Pan */ 95977c142SSheng-Liang Pan 105977c142SSheng-Liang Pan/ { 115977c142SSheng-Liang Pan /* BOARD-SPECIFIC TOP LEVEL NODES */ 125977c142SSheng-Liang Pan sound: sound { 135977c142SSheng-Liang Pan compatible = "google,sc7280-herobrine"; 145977c142SSheng-Liang Pan model = "sc7280-rt5682-max98360a-3mic"; 155977c142SSheng-Liang Pan 165977c142SSheng-Liang Pan audio-routing = "VA DMIC0", "vdd-micb", 175977c142SSheng-Liang Pan "VA DMIC1", "vdd-micb", 185977c142SSheng-Liang Pan "VA DMIC2", "vdd-micb", 195977c142SSheng-Liang Pan "VA DMIC3", "vdd-micb", 205977c142SSheng-Liang Pan 215977c142SSheng-Liang Pan "Headphone Jack", "HPOL", 225977c142SSheng-Liang Pan "Headphone Jack", "HPOR"; 235977c142SSheng-Liang Pan 245977c142SSheng-Liang Pan #address-cells = <1>; 255977c142SSheng-Liang Pan #size-cells = <0>; 265977c142SSheng-Liang Pan 275977c142SSheng-Liang Pan dai-link@0 { 285977c142SSheng-Liang Pan link-name = "MAX98360"; 295977c142SSheng-Liang Pan reg = <0>; 305977c142SSheng-Liang Pan 315977c142SSheng-Liang Pan cpu { 325977c142SSheng-Liang Pan sound-dai = <&lpass_cpu MI2S_SECONDARY>; 335977c142SSheng-Liang Pan }; 345977c142SSheng-Liang Pan 355977c142SSheng-Liang Pan codec { 365977c142SSheng-Liang Pan sound-dai = <&max98360a>; 375977c142SSheng-Liang Pan }; 385977c142SSheng-Liang Pan }; 395977c142SSheng-Liang Pan 405977c142SSheng-Liang Pan dai-link@1 { 415977c142SSheng-Liang Pan link-name = "DisplayPort"; 425977c142SSheng-Liang Pan reg = <1>; 435977c142SSheng-Liang Pan 445977c142SSheng-Liang Pan cpu { 455977c142SSheng-Liang Pan sound-dai = <&lpass_cpu LPASS_DP_RX>; 465977c142SSheng-Liang Pan }; 475977c142SSheng-Liang Pan 485977c142SSheng-Liang Pan codec { 495977c142SSheng-Liang Pan sound-dai = <&mdss_dp>; 505977c142SSheng-Liang Pan }; 515977c142SSheng-Liang Pan }; 525977c142SSheng-Liang Pan 535977c142SSheng-Liang Pan dai-link@2 { 545977c142SSheng-Liang Pan link-name = "ALC5682"; 555977c142SSheng-Liang Pan reg = <2>; 565977c142SSheng-Liang Pan 575977c142SSheng-Liang Pan cpu { 585977c142SSheng-Liang Pan sound-dai = <&lpass_cpu MI2S_PRIMARY>; 595977c142SSheng-Liang Pan }; 605977c142SSheng-Liang Pan 615977c142SSheng-Liang Pan codec { 625977c142SSheng-Liang Pan sound-dai = <&alc5682 0 /* aif1 */>; 635977c142SSheng-Liang Pan }; 645977c142SSheng-Liang Pan }; 655977c142SSheng-Liang Pan 665977c142SSheng-Liang Pan dai-link@4 { 675977c142SSheng-Liang Pan link-name = "DMIC"; 685977c142SSheng-Liang Pan reg = <4>; 695977c142SSheng-Liang Pan 705977c142SSheng-Liang Pan cpu { 715977c142SSheng-Liang Pan sound-dai = <&lpass_cpu LPASS_CDC_DMA_VA_TX0>; 725977c142SSheng-Liang Pan }; 735977c142SSheng-Liang Pan 745977c142SSheng-Liang Pan codec { 755977c142SSheng-Liang Pan sound-dai = <&lpass_va_macro 0>; 765977c142SSheng-Liang Pan }; 775977c142SSheng-Liang Pan }; 785977c142SSheng-Liang Pan }; 795977c142SSheng-Liang Pan}; 805977c142SSheng-Liang Pan 815977c142SSheng-Liang Panhp_i2c: &i2c2 { 825977c142SSheng-Liang Pan clock-frequency = <400000>; 835977c142SSheng-Liang Pan status = "okay"; 845977c142SSheng-Liang Pan 855977c142SSheng-Liang Pan alc5682: codec@1a { 865977c142SSheng-Liang Pan compatible = "realtek,rt5682s"; 875977c142SSheng-Liang Pan reg = <0x1a>; 885977c142SSheng-Liang Pan pinctrl-names = "default"; 895977c142SSheng-Liang Pan pinctrl-0 = <&hp_irq>; 905977c142SSheng-Liang Pan 915977c142SSheng-Liang Pan #sound-dai-cells = <1>; 925977c142SSheng-Liang Pan 935977c142SSheng-Liang Pan interrupt-parent = <&tlmm>; 945977c142SSheng-Liang Pan interrupts = <101 IRQ_TYPE_EDGE_BOTH>; 955977c142SSheng-Liang Pan 965977c142SSheng-Liang Pan AVDD-supply = <&pp1800_alc5682>; 97*11c0d37dSKrzysztof Kozlowski DBVDD-supply = <&pp1800_alc5682>; 98*11c0d37dSKrzysztof Kozlowski LDO1-IN-supply = <&pp1800_alc5682>; 995977c142SSheng-Liang Pan MICVDD-supply = <&pp3300_codec>; 1005977c142SSheng-Liang Pan 1015977c142SSheng-Liang Pan realtek,dmic1-data-pin = <1>; 1025977c142SSheng-Liang Pan realtek,dmic1-clk-pin = <2>; 1035977c142SSheng-Liang Pan realtek,jd-src = <1>; 1045977c142SSheng-Liang Pan realtek,dmic-clk-rate-hz = <2048000>; 1055977c142SSheng-Liang Pan }; 1065977c142SSheng-Liang Pan}; 1075977c142SSheng-Liang Pan 1085977c142SSheng-Liang Pan&lpass_cpu { 1095977c142SSheng-Liang Pan pinctrl-names = "default"; 1105977c142SSheng-Liang Pan pinctrl-0 = <&mi2s0_data0>, <&mi2s0_data1>, <&mi2s0_mclk>, <&mi2s0_sclk>, <&mi2s0_ws>, 1115977c142SSheng-Liang Pan <&mi2s1_data0>, <&mi2s1_sclk>, <&mi2s1_ws>; 1125977c142SSheng-Liang Pan 1135977c142SSheng-Liang Pan #address-cells = <1>; 1145977c142SSheng-Liang Pan #size-cells = <0>; 1155977c142SSheng-Liang Pan 1165977c142SSheng-Liang Pan status = "okay"; 1175977c142SSheng-Liang Pan 1185977c142SSheng-Liang Pan dai-link@0 { 1195977c142SSheng-Liang Pan reg = <MI2S_PRIMARY>; 1205977c142SSheng-Liang Pan qcom,playback-sd-lines = <1>; 1215977c142SSheng-Liang Pan qcom,capture-sd-lines = <0>; 1225977c142SSheng-Liang Pan }; 1235977c142SSheng-Liang Pan 1245977c142SSheng-Liang Pan dai-link@1 { 1255977c142SSheng-Liang Pan reg = <MI2S_SECONDARY>; 1265977c142SSheng-Liang Pan qcom,playback-sd-lines = <0>; 1275977c142SSheng-Liang Pan }; 1285977c142SSheng-Liang Pan 1295977c142SSheng-Liang Pan dai-link@5 { 1305977c142SSheng-Liang Pan reg = <LPASS_DP_RX>; 1315977c142SSheng-Liang Pan }; 1325977c142SSheng-Liang Pan 1335977c142SSheng-Liang Pan dai-link@25 { 1345977c142SSheng-Liang Pan reg = <LPASS_CDC_DMA_VA_TX0>; 1355977c142SSheng-Liang Pan }; 1365977c142SSheng-Liang Pan}; 1375977c142SSheng-Liang Pan 1385977c142SSheng-Liang Pan&lpass_va_macro { 1395977c142SSheng-Liang Pan vdd-micb-supply = <&pp1800_l2c>; 1405977c142SSheng-Liang Pan pinctrl-0 = <&lpass_dmic01_clk>, <&lpass_dmic01_data>, <&lpass_dmic23_clk>, 1415977c142SSheng-Liang Pan <&lpass_dmic23_data>; 1425977c142SSheng-Liang Pan 1435977c142SSheng-Liang Pan status = "okay"; 1445977c142SSheng-Liang Pan}; 1455977c142SSheng-Liang Pan 1465977c142SSheng-Liang Pan/* PINCTRL - ADDITIONS TO NODES IN PARENT DEVICE TREE FILES */ 1475977c142SSheng-Liang Pan 1485977c142SSheng-Liang Pan&lpass_dmic01_clk { 1495977c142SSheng-Liang Pan drive-strength = <8>; 1505977c142SSheng-Liang Pan bias-disable; 1515977c142SSheng-Liang Pan}; 1525977c142SSheng-Liang Pan 1535977c142SSheng-Liang Pan&lpass_dmic01_data { 1545977c142SSheng-Liang Pan bias-pull-down; 1555977c142SSheng-Liang Pan}; 1565977c142SSheng-Liang Pan 1575977c142SSheng-Liang Pan&lpass_dmic23_clk { 1585977c142SSheng-Liang Pan drive-strength = <8>; 1595977c142SSheng-Liang Pan bias-disable; 1605977c142SSheng-Liang Pan}; 1615977c142SSheng-Liang Pan 1625977c142SSheng-Liang Pan&lpass_dmic23_data { 1635977c142SSheng-Liang Pan bias-pull-down; 1645977c142SSheng-Liang Pan}; 1655977c142SSheng-Liang Pan 1665977c142SSheng-Liang Pan&mi2s0_data0 { 1675977c142SSheng-Liang Pan drive-strength = <6>; 1685977c142SSheng-Liang Pan bias-disable; 1695977c142SSheng-Liang Pan}; 1705977c142SSheng-Liang Pan 1715977c142SSheng-Liang Pan&mi2s0_data1 { 1725977c142SSheng-Liang Pan drive-strength = <6>; 1735977c142SSheng-Liang Pan bias-disable; 1745977c142SSheng-Liang Pan}; 1755977c142SSheng-Liang Pan 1765977c142SSheng-Liang Pan&mi2s0_mclk { 1775977c142SSheng-Liang Pan drive-strength = <6>; 1785977c142SSheng-Liang Pan bias-disable; 1795977c142SSheng-Liang Pan}; 1805977c142SSheng-Liang Pan 1815977c142SSheng-Liang Pan&mi2s0_sclk { 1825977c142SSheng-Liang Pan drive-strength = <6>; 1835977c142SSheng-Liang Pan bias-disable; 1845977c142SSheng-Liang Pan}; 1855977c142SSheng-Liang Pan 1865977c142SSheng-Liang Pan&mi2s0_ws { 1875977c142SSheng-Liang Pan drive-strength = <6>; 1885977c142SSheng-Liang Pan bias-disable; 1895977c142SSheng-Liang Pan}; 190