|
9 | 9 | #include <dt-bindings/input/input.h>
|
10 | 10 | #include <dt-bindings/interrupt-controller/irq.h>
|
11 | 11 | #include <dt-bindings/leds/common.h>
|
| 12 | +#include <dt-bindings/mfd/arizona.h> |
12 | 13 | #include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
|
13 | 14 |
|
14 | 15 | / {
|
|
77 | 78 | };
|
78 | 79 | };
|
79 | 80 |
|
| 81 | +/* regulator-spk { |
| 82 | + compatible = "regulator-fixed"; |
| 83 | + regulator-name = "spk_vreg"; |
| 84 | + startup-delay-us = <0>; |
| 85 | + enable-active-high; |
| 86 | + regulator-boot-on; |
| 87 | + regulator-always-on; |
| 88 | + gpio = <&msmgpio 101 GPIO_ACTIVE_HIGH>; |
| 89 | + };*/ |
| 90 | + |
| 91 | + regulator-wm8998-ldo { |
| 92 | + compatible = "regulator-fixed"; |
| 93 | + regulator-name = "wm8998_ldo"; |
| 94 | + |
| 95 | + enable-active-high; |
| 96 | + regulator-boot-on; |
| 97 | + regulator-always-on; |
| 98 | + gpio = <&msmgpio 114 GPIO_ACTIVE_HIGH>; |
| 99 | + }; |
| 100 | + |
80 | 101 | reg_ts_vdd: regulator-vdd-ts {
|
81 | 102 | compatible = "regulator-fixed";
|
82 | 103 | regulator-name = "regulator-vdd-ts";
|
|
126 | 147 |
|
127 | 148 | };
|
128 | 149 |
|
| 150 | +&blsp_i2c1 { |
| 151 | + status = "okay"; |
| 152 | + |
| 153 | + speaker_codec: audio-codec@1a { |
| 154 | + compatible = "wlf,wm8998"; |
| 155 | + reg = <0x1a>; |
| 156 | + |
| 157 | + reset-gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>; |
| 158 | + wlf,ldoena = <&msmgpio 28 GPIO_ACTIVE_HIGH>; |
| 159 | + |
| 160 | + pinctrl-names = "default", "sleep"; |
| 161 | + pinctrl-0 = <&wlf_int_active &speaker_codec_default &speaker_codec_reset_default>; |
| 162 | + pinctrl-1 = <&wlf_int_suspend &speaker_codec_sleep &speaker_codec_reset_sleep>; |
| 163 | + |
| 164 | + // TODO add pinctl for 114? |
| 165 | + // TODO add pinctl for 101? |
| 166 | + |
| 167 | + gpio-controller; |
| 168 | + #gpio-cells = <2>; |
| 169 | + |
| 170 | + sound-name-prefix = "Speaker"; |
| 171 | + #sound-dai-cells = <1>; |
| 172 | + |
| 173 | + AVDD-supply = <&pm8916_l6>; |
| 174 | + DBVDD1-supply = <&pm8916_l6>; |
| 175 | + DBVDD2-supply = <&pm8916_l6>; |
| 176 | + DBVDD3-supply = <&pm8916_l6>; |
| 177 | + CPVDD-supply = <&pm8916_l6>; |
| 178 | + SPKVDDL-supply = <&pm8916_l6>; |
| 179 | + SPKVDDR-supply = <&pm8916_l6>; |
| 180 | + |
| 181 | + interrupt-controller; |
| 182 | + #interrupt-cells = <2>; |
| 183 | + interrupt-parent = <&msmgpio>; |
| 184 | + interrupts = <69 IRQ_TYPE_LEVEL_LOW>; |
| 185 | + |
| 186 | + clocks = <&rpmcc RPM_SMD_BB_CLK2>; |
| 187 | + clock-names = "mclk2"; |
| 188 | + |
| 189 | + wlf,gpio-defaults = < |
| 190 | + ARIZONA_GP_DEFAULT |
| 191 | + ARIZONA_GP_DEFAULT |
| 192 | + ARIZONA_GP_DEFAULT |
| 193 | + ARIZONA_GP_DEFAULT |
| 194 | + ARIZONA_GP_DEFAULT |
| 195 | + >; |
| 196 | + |
| 197 | + wlf,inmode = <0 0 0>; |
| 198 | + wlf,micd-detect-debounce = <500>; |
| 199 | + wlf,micd-rate = <ARIZONA_MICD_TIME_8MS>; |
| 200 | + wlf,micd-configs = <0 ARIZONA_DMIC_MICBIAS2 1>; |
| 201 | + wlf,micd-bias-start-time = <ARIZONA_MICD_TIME_16MS>; |
| 202 | + |
| 203 | + // TODO: |
| 204 | +// wlf,infinite_micd = <0x01>; |
| 205 | +// wlf,micbias1 = <0xaf0 0x01 0x00 0x01 0x00>; |
| 206 | +// wlf,micbias2 = <0xaf0 0x01 0x00 0x01 0x00>; |
| 207 | +// wlf,micbias3 = <0xaf0 0x01 0x00 0x01 0x00>; |
| 208 | +// wlf,ldo-enable = <0x77 28 0x00>; |
| 209 | +// wlf,ena-ldo = <0x77 114 0x00>; |
| 210 | +// wlf,clk-gpio = <0x77 116 0x00>; |
| 211 | +// wlf,ldospk = <0x77 0x00 0x00>; // gpio101? downstream spk_vreg |
| 212 | +// wlf,init-mic-delay = <0x1f4>; |
| 213 | + |
| 214 | +/* ldo1 { |
| 215 | + compatible = "regulator-gpio"; |
| 216 | + |
| 217 | + regulator-name = "wm8998-supply-ldo"; |
| 218 | + regulator-min-microvolt = <1200000>; |
| 219 | + regulator-max-microvolt = <1800000>; |
| 220 | + regulator-boot-on; |
| 221 | + regulator-always-on; |
| 222 | + |
| 223 | + gpios = <&msmgpio 114 GPIO_ACTIVE_HIGH>; |
| 224 | + states = <1200000 1>, |
| 225 | + <1800000 0>; |
| 226 | + |
| 227 | + enable-active-high; |
| 228 | + |
| 229 | + // pinctrl needed? |
| 230 | + };*/ |
| 231 | + |
| 232 | + micvdd { |
| 233 | + regulator-min-microvolt = <3000000>; |
| 234 | + regulator-max-microvolt = <3000000>; |
| 235 | + }; |
| 236 | + }; |
| 237 | +}; |
| 238 | + |
129 | 239 | &blsp_i2c3 {
|
130 | 240 | status = "okay";
|
131 | 241 |
|
|
313 | 423 | status = "okay";
|
314 | 424 | };
|
315 | 425 |
|
| 426 | +&sound { |
| 427 | + pinctrl-names = "default", "sleep"; |
| 428 | + pinctrl-0 = <&ext_mclk_tlmm_lines_act &ext_sec_tlmm_lines_act>; |
| 429 | + pinctrl-1 = <&ext_mclk_tlmm_lines_sus &ext_sec_tlmm_lines_sus>; |
| 430 | + |
| 431 | + model = "bq-piccolo"; |
| 432 | + widgets = |
| 433 | + "Speaker", "Speaker", |
| 434 | + "Headphone", "Headphones"; |
| 435 | + pin-switches = "Speaker"; |
| 436 | + /*audio-routing = |
| 437 | + "IN1AL", "MICBIAS1", |
| 438 | + "IN1AR", "MICBIAS1", |
| 439 | + "IN2A", "MICBIAS2";*/ |
| 440 | + |
| 441 | + status = "okay"; |
| 442 | +}; |
| 443 | + |
| 444 | +&sound_dai_primary { |
| 445 | + status = "disabled"; |
| 446 | +}; |
| 447 | + |
| 448 | +&sound_dai_tertiary { |
| 449 | + status = "disabled"; |
| 450 | +}; |
| 451 | + |
| 452 | +&sound_dai_quaternary { |
| 453 | + status = "okay"; |
| 454 | + |
| 455 | + codec { |
| 456 | + sound-dai = <&speaker_codec 0>; |
| 457 | + }; |
| 458 | +}; |
| 459 | + |
316 | 460 | &usb {
|
317 | 461 | extcon = <&charger>, <&usb_id>;
|
318 | 462 | vbus-supply = <&usb_otg_vbus>;
|
|
331 | 475 | compatible = "qcom,wcn3620";
|
332 | 476 | };
|
333 | 477 |
|
| 478 | +&lpass_codec { |
| 479 | + status = "disabled"; |
| 480 | +}; |
| 481 | + |
| 482 | +&wcd_codec { |
| 483 | + status = "disabled"; |
| 484 | +/* qcom,micbias-lvl = <2800>; |
| 485 | + qcom,mbhc-vthreshold-low = <25 50 75 112 137>; |
| 486 | + qcom,mbhc-vthreshold-high = <25 50 75 112 137>; |
| 487 | + //qcom,hphl-jack-type-normally-open; |
| 488 | + */ |
| 489 | +}; |
| 490 | + |
334 | 491 | &smd_rpm_regulators {
|
335 | 492 | vdd_l1_l2_l3-supply = <&pm8916_s3>;
|
336 | 493 | vdd_l4_l5_l6-supply = <&pm8916_s4>;
|
|
530 | 687 | drive-strength = <2>;
|
531 | 688 | output-high;
|
532 | 689 | };
|
| 690 | + |
| 691 | + speaker_codec_reset_default: speaker-codec-reset-default-state { |
| 692 | + pins = "gpio120"; |
| 693 | + function = "ldo_update"; |
| 694 | + |
| 695 | + drive-strength = <6>; |
| 696 | + bias-pull-up; |
| 697 | + }; |
| 698 | + |
| 699 | + speaker_codec_reset_sleep: speaker-codec-reset-sleep-state { |
| 700 | + pins = "gpio120"; |
| 701 | + function = "ldo_update"; |
| 702 | + |
| 703 | + drive-strength = <2>; |
| 704 | + bias-pull-down; |
| 705 | + }; |
| 706 | + |
| 707 | + speaker_codec_default: speaker-codec-default-state { // ldo_enable |
| 708 | + pins = "gpio28"; |
| 709 | + function = "gpio"; |
| 710 | + drive-strength = <6>; |
| 711 | + bias-pull-up; |
| 712 | + }; |
| 713 | + |
| 714 | + speaker_codec_sleep: speaker-codec-sleep-state { // ldo_enable |
| 715 | + pins = "gpio28"; |
| 716 | + function = "gpio"; |
| 717 | + drive-strength = <2>; |
| 718 | + bias-pull-down; |
| 719 | + }; |
| 720 | +/* |
| 721 | + speaker_enaldo_default: speaker-ena-ldo-default-state { // ena_ldo |
| 722 | + pins = "gpio114"; |
| 723 | + function = "gpio"; |
| 724 | + drive-strength = <6>; |
| 725 | + bias-pull-up; |
| 726 | + }; |
| 727 | + |
| 728 | + speaker_enaldo_sleep: speaker-ena-ldo-sleep-state { // ena_ldo |
| 729 | + pins = "gpio114"; |
| 730 | + function = "gpio"; |
| 731 | + drive-strength = <2>; |
| 732 | + bias-pull-down; |
| 733 | + };*/ |
| 734 | + |
| 735 | +/* wlf_ldospk_pin { |
| 736 | + pins = "gpio101"; |
| 737 | + label = "wlf_speaker_ldo"; |
| 738 | + |
| 739 | + wlf_ldospk_active { |
| 740 | + drive-strength = <6>; |
| 741 | + bias-pull-up; |
| 742 | + }; |
| 743 | + |
| 744 | + wlf_ldospk_suspend { |
| 745 | + drive-strength = <2>; |
| 746 | + bias-pull-down; |
| 747 | + }; |
| 748 | + };*/ |
| 749 | + |
| 750 | + wlf_int_pin { |
| 751 | + /* wolfson codec */ |
| 752 | + wlf_int_active: wlf-int-active { |
| 753 | + pins = "gpio69"; |
| 754 | + drive-strength = <6>; |
| 755 | + bias-pull-up; |
| 756 | + }; |
| 757 | + wlf_int_suspend: wlf-int-suspend { |
| 758 | + pins = "gpio69"; |
| 759 | + drive-strength = <2>; |
| 760 | + bias-pull-down; |
| 761 | + }; |
| 762 | + }; |
533 | 763 | };
|
534 | 764 |
|
535 | 765 | &pm8916_mpps {
|
|
0 commit comments