|  | 
| 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-gpio.h> | 
| 13 | 14 | #include <dt-bindings/pinctrl/qcom,pmic-mpp.h> | 
| 14 | 15 | 
 | 
|  | 
| 73 | 74 | 		}; | 
| 74 | 75 | 	}; | 
| 75 | 76 | 
 | 
|  | 77 | +/*	regulator-spk { | 
|  | 78 | +		compatible = "regulator-fixed"; | 
|  | 79 | +		regulator-name = "spk_vreg"; | 
|  | 80 | +		startup-delay-us = <0>; | 
|  | 81 | +		enable-active-high; | 
|  | 82 | +		regulator-boot-on; | 
|  | 83 | +		regulator-always-on; | 
|  | 84 | +		gpio = <&tlmm 101 GPIO_ACTIVE_HIGH>; | 
|  | 85 | +	};*/ | 
|  | 86 | + | 
| 76 | 87 | 	reg_ts_vdd: regulator-vdd-ts { | 
| 77 | 88 | 		compatible = "regulator-fixed"; | 
| 78 | 89 | 		regulator-name = "regulator-vdd-ts"; | 
|  | 
| 122 | 133 | 
 | 
| 123 | 134 | }; | 
| 124 | 135 | 
 | 
|  | 136 | +&blsp_i2c1 { | 
|  | 137 | +	status = "okay"; | 
|  | 138 | + | 
|  | 139 | +	speaker_codec: audio-codec@1a { | 
|  | 140 | +		compatible = "wlf,wm8998"; | 
|  | 141 | +		reg = <0x1a>; | 
|  | 142 | + | 
|  | 143 | +		reset-gpios = <&tlmm 120 GPIO_ACTIVE_HIGH>; | 
|  | 144 | +		wlf,ldoena-gpios = <&tlmm 114 GPIO_ACTIVE_HIGH>; | 
|  | 145 | + | 
|  | 146 | +		pinctrl-0 = <&wlf_int_active &speaker_codec_default &speaker_codec_reset_default>; | 
|  | 147 | +		pinctrl-1 = <&wlf_int_suspend &speaker_codec_sleep &speaker_codec_reset_sleep>; | 
|  | 148 | +		pinctrl-names = "default", "sleep"; | 
|  | 149 | + | 
|  | 150 | +        // TODO add pinctl for 114? | 
|  | 151 | +        // TODO add pinctl for 101? | 
|  | 152 | + | 
|  | 153 | +		gpio-controller; | 
|  | 154 | +		#gpio-cells = <2>; | 
|  | 155 | + | 
|  | 156 | +		sound-name-prefix = "Speaker"; | 
|  | 157 | +		#sound-dai-cells = <1>; | 
|  | 158 | + | 
|  | 159 | +		AVDD-supply = <&pm8916_l6>; | 
|  | 160 | +		DBVDD1-supply = <&pm8916_l6>; | 
|  | 161 | +		DBVDD2-supply = <&pm8916_l6>; | 
|  | 162 | +		DBVDD3-supply = <&pm8916_l6>; | 
|  | 163 | +		CPVDD-supply = <&pm8916_l6>; | 
|  | 164 | +		SPKVDDL-supply = <&pm8916_l6>; | 
|  | 165 | +		SPKVDDR-supply = <&pm8916_l6>; | 
|  | 166 | + | 
|  | 167 | +		interrupt-controller; | 
|  | 168 | +		#interrupt-cells = <2>; | 
|  | 169 | +		interrupts-extended = <&tlmm 69 IRQ_TYPE_LEVEL_LOW>; | 
|  | 170 | + | 
|  | 171 | +		clocks = <&rpmcc RPM_SMD_BB_CLK2>; | 
|  | 172 | +		clock-names = "mclk1"; | 
|  | 173 | + | 
|  | 174 | +		wlf,gpio-defaults = < | 
|  | 175 | +			ARIZONA_GP_DEFAULT | 
|  | 176 | +			ARIZONA_GP_DEFAULT | 
|  | 177 | +			ARIZONA_GP_DEFAULT | 
|  | 178 | +			ARIZONA_GP_DEFAULT | 
|  | 179 | +			ARIZONA_GP_DEFAULT | 
|  | 180 | +		>; | 
|  | 181 | + | 
|  | 182 | +		wlf,inmode = <0 0 0>; | 
|  | 183 | +		wlf,micd-detect-debounce = <500>; | 
|  | 184 | +		wlf,micd-rate = <ARIZONA_MICD_TIME_8MS>; | 
|  | 185 | +		wlf,micd-configs = <0 ARIZONA_DMIC_MICBIAS2 1>; | 
|  | 186 | +		wlf,micd-bias-start-time = <ARIZONA_MICD_TIME_16MS>; | 
|  | 187 | + | 
|  | 188 | +		// TODO: | 
|  | 189 | +//		wlf,infinite_micd = <0x01>; | 
|  | 190 | +//		wlf,micbias1 = <0xaf0 0x01 0x00 0x01 0x00>; | 
|  | 191 | +//		wlf,micbias2 = <0xaf0 0x01 0x00 0x01 0x00>; | 
|  | 192 | +//		wlf,micbias3 = <0xaf0 0x01 0x00 0x01 0x00>; | 
|  | 193 | +//		wlf,ldo-enable = <0x77 28 0x00>; | 
|  | 194 | +//		wlf,ena-ldo = <0x77 114 0x00>; | 
|  | 195 | +//		wlf,clk-gpio = <0x77 116 0x00>; | 
|  | 196 | +//		wlf,ldospk = <0x77 0x00 0x00>;	// gpio101? downstream spk_vreg | 
|  | 197 | +//		wlf,init-mic-delay = <0x1f4>; | 
|  | 198 | + | 
|  | 199 | +		ldo1 { | 
|  | 200 | +			regulator-boot-on; | 
|  | 201 | +			regulator-always-on; | 
|  | 202 | +		}; | 
|  | 203 | + | 
|  | 204 | +		micvdd { | 
|  | 205 | +			regulator-min-microvolt = <3000000>; | 
|  | 206 | +			regulator-max-microvolt = <3000000>; | 
|  | 207 | +		}; | 
|  | 208 | +	}; | 
|  | 209 | +}; | 
|  | 210 | + | 
| 125 | 211 | &blsp_i2c2 { | 
| 126 | 212 | 	status = "okay"; | 
| 127 | 213 | 
 | 
|  | 
| 388 | 474 | 	status = "okay"; | 
| 389 | 475 | }; | 
| 390 | 476 | 
 | 
|  | 477 | +&q6afedai { | 
|  | 478 | +	dai@18 { | 
|  | 479 | +		reg = <SECONDARY_MI2S_RX>; | 
|  | 480 | +		qcom,sd-lines = <0>; | 
|  | 481 | +	}; | 
|  | 482 | + | 
|  | 483 | +	dai@22 { | 
|  | 484 | +		reg = <QUATERNARY_MI2S_RX>; | 
|  | 485 | +		qcom,sd-lines = <0>; | 
|  | 486 | +	}; | 
|  | 487 | +}; | 
|  | 488 | + | 
| 391 | 489 | &sdhc_1 { | 
| 392 | 490 | 	status = "okay"; | 
| 393 | 491 | }; | 
|  | 
| 403 | 501 | }; | 
| 404 | 502 | 
 | 
| 405 | 503 | &sound { | 
| 406 |  | -	status = "disabled"; /* TODO */ | 
|  | 504 | +/*	pinctrl-0 = <&ext_mclk_tlmm_lines_act &ext_sec_tlmm_lines_act>;*/ | 
|  | 505 | +/*	pinctrl-1 = <&ext_mclk_tlmm_lines_sus &ext_sec_tlmm_lines_sus>;*/ | 
|  | 506 | +	pinctrl-0 = <&pri_mi2s_mclk_default &sec_mi2s_default>; | 
|  | 507 | +	pinctrl-1 = <&pri_mi2s_mclk_sleep &sec_mi2s_sleep>; | 
|  | 508 | +	pinctrl-names = "default", "sleep"; | 
|  | 509 | + | 
|  | 510 | +	model = "bq-piccolo"; | 
|  | 511 | +	widgets = | 
|  | 512 | +		"Speaker", "Speaker", | 
|  | 513 | +		"Headphone", "Headphones"; | 
|  | 514 | +	pin-switches = "Speaker"; | 
|  | 515 | +	audio-routing = | 
|  | 516 | +		"Speaker IN1AL", "Speaker MICBIAS1", | 
|  | 517 | +		"Speaker IN1AR", "Speaker MICBIAS1", | 
|  | 518 | +		"Speaker IN2A", "Speaker MICBIAS2"; | 
|  | 519 | + | 
|  | 520 | +	status = "okay"; | 
|  | 521 | + | 
|  | 522 | +	/delete-node/ backend1-dai-link; | 
|  | 523 | +}; | 
|  | 524 | + | 
|  | 525 | +&sound_link_backend0 { | 
|  | 526 | +	/* Primary MI2S is not used, replace with Quaternary MI2S */ | 
|  | 527 | +	link-name = "Quaternary MI2S"; | 
|  | 528 | + | 
|  | 529 | +	cpu { | 
|  | 530 | +		sound-dai = <&q6afedai QUATERNARY_MI2S_RX>; | 
|  | 531 | +	}; | 
|  | 532 | +	platform { | 
|  | 533 | +		sound-dai = <&q6routing>; | 
|  | 534 | +	}; | 
|  | 535 | +	codec { | 
|  | 536 | +		sound-dai = <&speaker_codec 0>; | 
|  | 537 | +	}; | 
| 407 | 538 | }; | 
| 408 | 539 | 
 | 
| 409 | 540 | &usb { | 
|  | 
| 428 | 559 | 	status = "okay"; | 
| 429 | 560 | }; | 
| 430 | 561 | 
 | 
|  | 562 | +&lpass { | 
|  | 563 | +	status = "okay"; | 
|  | 564 | +}; | 
|  | 565 | + | 
|  | 566 | +&pm8916_codec { | 
|  | 567 | +	qcom,micbias-lvl = <2800>; | 
|  | 568 | +	qcom,mbhc-vthreshold-low = <25 50 75 112 137>; | 
|  | 569 | +	qcom,mbhc-vthreshold-high = <25 50 75 112 137>; | 
|  | 570 | +	qcom,micbias1-ext-cap; | 
|  | 571 | +	//qcom,hphl-jack-type-normally-open; | 
|  | 572 | +}; | 
|  | 573 | + | 
| 431 | 574 | &tlmm { | 
| 432 | 575 | 	button_backlight_default: button-backlight-default-state { | 
| 433 | 576 | 		pins = "gpio17"; | 
|  | 
| 540 | 683 | 		drive-strength = <2>; | 
| 541 | 684 | 		output-high; | 
| 542 | 685 | 	}; | 
|  | 686 | + | 
|  | 687 | +	speaker_codec_reset_default: speaker-codec-reset-default-state { | 
|  | 688 | +		pins = "gpio120"; | 
|  | 689 | +		function = "ldo_update"; | 
|  | 690 | + | 
|  | 691 | +		drive-strength = <6>; | 
|  | 692 | +		bias-pull-up; | 
|  | 693 | +	}; | 
|  | 694 | + | 
|  | 695 | +	speaker_codec_reset_sleep: speaker-codec-reset-sleep-state { | 
|  | 696 | +		pins = "gpio120"; | 
|  | 697 | +		function = "ldo_update"; | 
|  | 698 | + | 
|  | 699 | +		drive-strength = <2>; | 
|  | 700 | +		bias-pull-down; | 
|  | 701 | +	}; | 
|  | 702 | + | 
|  | 703 | +	speaker_codec_default: speaker-codec-default-state {    // ldo_enable | 
|  | 704 | +		pins = "gpio28"; | 
|  | 705 | +		function = "gpio"; | 
|  | 706 | +		drive-strength = <6>; | 
|  | 707 | +		bias-pull-up; | 
|  | 708 | +	}; | 
|  | 709 | + | 
|  | 710 | +	speaker_codec_sleep: speaker-codec-sleep-state {    // ldo_enable | 
|  | 711 | +		pins = "gpio28"; | 
|  | 712 | +		function = "gpio"; | 
|  | 713 | +		drive-strength = <2>; | 
|  | 714 | +		bias-pull-down; | 
|  | 715 | +	}; | 
|  | 716 | +/* | 
|  | 717 | +	speaker_enaldo_default: speaker-ena-ldo-default-state {    // ena_ldo | 
|  | 718 | +		pins = "gpio114"; | 
|  | 719 | +		function = "gpio"; | 
|  | 720 | +		drive-strength = <6>; | 
|  | 721 | +		bias-pull-up; | 
|  | 722 | +	}; | 
|  | 723 | + | 
|  | 724 | +	speaker_enaldo_sleep: speaker-ena-ldo-sleep-state {    // ena_ldo | 
|  | 725 | +		pins = "gpio114"; | 
|  | 726 | +		function = "gpio"; | 
|  | 727 | +		drive-strength = <2>; | 
|  | 728 | +		bias-pull-down; | 
|  | 729 | +	};*/ | 
|  | 730 | + | 
|  | 731 | +/*	wlf_ldospk_pin { | 
|  | 732 | +		pins = "gpio101"; | 
|  | 733 | +		label = "wlf_speaker_ldo"; | 
|  | 734 | + | 
|  | 735 | +		wlf_ldospk_active { | 
|  | 736 | +			drive-strength = <6>; | 
|  | 737 | +			bias-pull-up; | 
|  | 738 | +		}; | 
|  | 739 | + | 
|  | 740 | +		wlf_ldospk_suspend { | 
|  | 741 | +			drive-strength = <2>; | 
|  | 742 | +			bias-pull-down; | 
|  | 743 | +		}; | 
|  | 744 | +	};*/ | 
|  | 745 | + | 
|  | 746 | +	wlf_int_pin { | 
|  | 747 | +		/* wolfson codec */ | 
|  | 748 | +		wlf_int_active: wlf-int-active { | 
|  | 749 | +			pins = "gpio69"; | 
|  | 750 | +			drive-strength = <6>; | 
|  | 751 | +			bias-pull-up; | 
|  | 752 | +		}; | 
|  | 753 | +		wlf_int_suspend: wlf-int-suspend { | 
|  | 754 | +			pins = "gpio69"; | 
|  | 755 | +			drive-strength = <2>; | 
|  | 756 | +			bias-pull-down; | 
|  | 757 | +		}; | 
|  | 758 | +	}; | 
| 543 | 759 | }; | 
0 commit comments