1*5977c142SSheng-Liang Pan// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2*5977c142SSheng-Liang Pan/* 3*5977c142SSheng-Liang Pan * 4*5977c142SSheng-Liang Pan * This file defines the common audio settings for the child boards 5*5977c142SSheng-Liang Pan * using rt5682 codec and having 3 dmics connected to sc7280. 6*5977c142SSheng-Liang Pan * 7*5977c142SSheng-Liang Pan * Copyright 2022 Google LLC. 8*5977c142SSheng-Liang Pan */ 9*5977c142SSheng-Liang Pan 10*5977c142SSheng-Liang Pan/ { 11*5977c142SSheng-Liang Pan /* BOARD-SPECIFIC TOP LEVEL NODES */ 12*5977c142SSheng-Liang Pan sound: sound { 13*5977c142SSheng-Liang Pan compatible = "google,sc7280-herobrine"; 14*5977c142SSheng-Liang Pan model = "sc7280-rt5682-max98360a-3mic"; 15*5977c142SSheng-Liang Pan 16*5977c142SSheng-Liang Pan audio-routing = "VA DMIC0", "vdd-micb", 17*5977c142SSheng-Liang Pan "VA DMIC1", "vdd-micb", 18*5977c142SSheng-Liang Pan "VA DMIC2", "vdd-micb", 19*5977c142SSheng-Liang Pan "VA DMIC3", "vdd-micb", 20*5977c142SSheng-Liang Pan 21*5977c142SSheng-Liang Pan "Headphone Jack", "HPOL", 22*5977c142SSheng-Liang Pan "Headphone Jack", "HPOR"; 23*5977c142SSheng-Liang Pan 24*5977c142SSheng-Liang Pan #address-cells = <1>; 25*5977c142SSheng-Liang Pan #size-cells = <0>; 26*5977c142SSheng-Liang Pan 27*5977c142SSheng-Liang Pan dai-link@0 { 28*5977c142SSheng-Liang Pan link-name = "MAX98360"; 29*5977c142SSheng-Liang Pan reg = <0>; 30*5977c142SSheng-Liang Pan 31*5977c142SSheng-Liang Pan cpu { 32*5977c142SSheng-Liang Pan sound-dai = <&lpass_cpu MI2S_SECONDARY>; 33*5977c142SSheng-Liang Pan }; 34*5977c142SSheng-Liang Pan 35*5977c142SSheng-Liang Pan codec { 36*5977c142SSheng-Liang Pan sound-dai = <&max98360a>; 37*5977c142SSheng-Liang Pan }; 38*5977c142SSheng-Liang Pan }; 39*5977c142SSheng-Liang Pan 40*5977c142SSheng-Liang Pan dai-link@1 { 41*5977c142SSheng-Liang Pan link-name = "DisplayPort"; 42*5977c142SSheng-Liang Pan reg = <1>; 43*5977c142SSheng-Liang Pan 44*5977c142SSheng-Liang Pan cpu { 45*5977c142SSheng-Liang Pan sound-dai = <&lpass_cpu LPASS_DP_RX>; 46*5977c142SSheng-Liang Pan }; 47*5977c142SSheng-Liang Pan 48*5977c142SSheng-Liang Pan codec { 49*5977c142SSheng-Liang Pan sound-dai = <&mdss_dp>; 50*5977c142SSheng-Liang Pan }; 51*5977c142SSheng-Liang Pan }; 52*5977c142SSheng-Liang Pan 53*5977c142SSheng-Liang Pan dai-link@2 { 54*5977c142SSheng-Liang Pan link-name = "ALC5682"; 55*5977c142SSheng-Liang Pan reg = <2>; 56*5977c142SSheng-Liang Pan 57*5977c142SSheng-Liang Pan cpu { 58*5977c142SSheng-Liang Pan sound-dai = <&lpass_cpu MI2S_PRIMARY>; 59*5977c142SSheng-Liang Pan }; 60*5977c142SSheng-Liang Pan 61*5977c142SSheng-Liang Pan codec { 62*5977c142SSheng-Liang Pan sound-dai = <&alc5682 0 /* aif1 */>; 63*5977c142SSheng-Liang Pan }; 64*5977c142SSheng-Liang Pan }; 65*5977c142SSheng-Liang Pan 66*5977c142SSheng-Liang Pan dai-link@4 { 67*5977c142SSheng-Liang Pan link-name = "DMIC"; 68*5977c142SSheng-Liang Pan reg = <4>; 69*5977c142SSheng-Liang Pan 70*5977c142SSheng-Liang Pan cpu { 71*5977c142SSheng-Liang Pan sound-dai = <&lpass_cpu LPASS_CDC_DMA_VA_TX0>; 72*5977c142SSheng-Liang Pan }; 73*5977c142SSheng-Liang Pan 74*5977c142SSheng-Liang Pan codec { 75*5977c142SSheng-Liang Pan sound-dai = <&lpass_va_macro 0>; 76*5977c142SSheng-Liang Pan }; 77*5977c142SSheng-Liang Pan }; 78*5977c142SSheng-Liang Pan }; 79*5977c142SSheng-Liang Pan}; 80*5977c142SSheng-Liang Pan 81*5977c142SSheng-Liang Panhp_i2c: &i2c2 { 82*5977c142SSheng-Liang Pan clock-frequency = <400000>; 83*5977c142SSheng-Liang Pan status = "okay"; 84*5977c142SSheng-Liang Pan 85*5977c142SSheng-Liang Pan alc5682: codec@1a { 86*5977c142SSheng-Liang Pan compatible = "realtek,rt5682s"; 87*5977c142SSheng-Liang Pan reg = <0x1a>; 88*5977c142SSheng-Liang Pan pinctrl-names = "default"; 89*5977c142SSheng-Liang Pan pinctrl-0 = <&hp_irq>; 90*5977c142SSheng-Liang Pan 91*5977c142SSheng-Liang Pan #sound-dai-cells = <1>; 92*5977c142SSheng-Liang Pan 93*5977c142SSheng-Liang Pan interrupt-parent = <&tlmm>; 94*5977c142SSheng-Liang Pan interrupts = <101 IRQ_TYPE_EDGE_BOTH>; 95*5977c142SSheng-Liang Pan 96*5977c142SSheng-Liang Pan AVDD-supply = <&pp1800_alc5682>; 97*5977c142SSheng-Liang Pan MICVDD-supply = <&pp3300_codec>; 98*5977c142SSheng-Liang Pan 99*5977c142SSheng-Liang Pan realtek,dmic1-data-pin = <1>; 100*5977c142SSheng-Liang Pan realtek,dmic1-clk-pin = <2>; 101*5977c142SSheng-Liang Pan realtek,jd-src = <1>; 102*5977c142SSheng-Liang Pan realtek,dmic-clk-rate-hz = <2048000>; 103*5977c142SSheng-Liang Pan }; 104*5977c142SSheng-Liang Pan}; 105*5977c142SSheng-Liang Pan 106*5977c142SSheng-Liang Pan&lpass_cpu { 107*5977c142SSheng-Liang Pan pinctrl-names = "default"; 108*5977c142SSheng-Liang Pan pinctrl-0 = <&mi2s0_data0>, <&mi2s0_data1>, <&mi2s0_mclk>, <&mi2s0_sclk>, <&mi2s0_ws>, 109*5977c142SSheng-Liang Pan <&mi2s1_data0>, <&mi2s1_sclk>, <&mi2s1_ws>; 110*5977c142SSheng-Liang Pan 111*5977c142SSheng-Liang Pan #address-cells = <1>; 112*5977c142SSheng-Liang Pan #size-cells = <0>; 113*5977c142SSheng-Liang Pan 114*5977c142SSheng-Liang Pan status = "okay"; 115*5977c142SSheng-Liang Pan 116*5977c142SSheng-Liang Pan dai-link@0 { 117*5977c142SSheng-Liang Pan reg = <MI2S_PRIMARY>; 118*5977c142SSheng-Liang Pan qcom,playback-sd-lines = <1>; 119*5977c142SSheng-Liang Pan qcom,capture-sd-lines = <0>; 120*5977c142SSheng-Liang Pan }; 121*5977c142SSheng-Liang Pan 122*5977c142SSheng-Liang Pan dai-link@1 { 123*5977c142SSheng-Liang Pan reg = <MI2S_SECONDARY>; 124*5977c142SSheng-Liang Pan qcom,playback-sd-lines = <0>; 125*5977c142SSheng-Liang Pan }; 126*5977c142SSheng-Liang Pan 127*5977c142SSheng-Liang Pan dai-link@5 { 128*5977c142SSheng-Liang Pan reg = <LPASS_DP_RX>; 129*5977c142SSheng-Liang Pan }; 130*5977c142SSheng-Liang Pan 131*5977c142SSheng-Liang Pan dai-link@25 { 132*5977c142SSheng-Liang Pan reg = <LPASS_CDC_DMA_VA_TX0>; 133*5977c142SSheng-Liang Pan }; 134*5977c142SSheng-Liang Pan}; 135*5977c142SSheng-Liang Pan 136*5977c142SSheng-Liang Pan&lpass_va_macro { 137*5977c142SSheng-Liang Pan vdd-micb-supply = <&pp1800_l2c>; 138*5977c142SSheng-Liang Pan pinctrl-0 = <&lpass_dmic01_clk>, <&lpass_dmic01_data>, <&lpass_dmic23_clk>, 139*5977c142SSheng-Liang Pan <&lpass_dmic23_data>; 140*5977c142SSheng-Liang Pan 141*5977c142SSheng-Liang Pan status = "okay"; 142*5977c142SSheng-Liang Pan}; 143*5977c142SSheng-Liang Pan 144*5977c142SSheng-Liang Pan/* PINCTRL - ADDITIONS TO NODES IN PARENT DEVICE TREE FILES */ 145*5977c142SSheng-Liang Pan 146*5977c142SSheng-Liang Pan&lpass_dmic01_clk { 147*5977c142SSheng-Liang Pan drive-strength = <8>; 148*5977c142SSheng-Liang Pan bias-disable; 149*5977c142SSheng-Liang Pan}; 150*5977c142SSheng-Liang Pan 151*5977c142SSheng-Liang Pan&lpass_dmic01_clk_sleep { 152*5977c142SSheng-Liang Pan drive-strength = <2>; 153*5977c142SSheng-Liang Pan}; 154*5977c142SSheng-Liang Pan 155*5977c142SSheng-Liang Pan&lpass_dmic01_data { 156*5977c142SSheng-Liang Pan bias-pull-down; 157*5977c142SSheng-Liang Pan}; 158*5977c142SSheng-Liang Pan 159*5977c142SSheng-Liang Pan&lpass_dmic23_clk { 160*5977c142SSheng-Liang Pan drive-strength = <8>; 161*5977c142SSheng-Liang Pan bias-disable; 162*5977c142SSheng-Liang Pan}; 163*5977c142SSheng-Liang Pan 164*5977c142SSheng-Liang Pan&lpass_dmic23_clk_sleep { 165*5977c142SSheng-Liang Pan drive-strength = <2>; 166*5977c142SSheng-Liang Pan}; 167*5977c142SSheng-Liang Pan 168*5977c142SSheng-Liang Pan&lpass_dmic23_data { 169*5977c142SSheng-Liang Pan bias-pull-down; 170*5977c142SSheng-Liang Pan}; 171*5977c142SSheng-Liang Pan 172*5977c142SSheng-Liang Pan&mi2s0_data0 { 173*5977c142SSheng-Liang Pan drive-strength = <6>; 174*5977c142SSheng-Liang Pan bias-disable; 175*5977c142SSheng-Liang Pan}; 176*5977c142SSheng-Liang Pan 177*5977c142SSheng-Liang Pan&mi2s0_data1 { 178*5977c142SSheng-Liang Pan drive-strength = <6>; 179*5977c142SSheng-Liang Pan bias-disable; 180*5977c142SSheng-Liang Pan}; 181*5977c142SSheng-Liang Pan 182*5977c142SSheng-Liang Pan&mi2s0_mclk { 183*5977c142SSheng-Liang Pan drive-strength = <6>; 184*5977c142SSheng-Liang Pan bias-disable; 185*5977c142SSheng-Liang Pan}; 186*5977c142SSheng-Liang Pan 187*5977c142SSheng-Liang Pan&mi2s0_sclk { 188*5977c142SSheng-Liang Pan drive-strength = <6>; 189*5977c142SSheng-Liang Pan bias-disable; 190*5977c142SSheng-Liang Pan}; 191*5977c142SSheng-Liang Pan 192*5977c142SSheng-Liang Pan&mi2s0_ws { 193*5977c142SSheng-Liang Pan drive-strength = <6>; 194*5977c142SSheng-Liang Pan bias-disable; 195*5977c142SSheng-Liang Pan}; 196