Skip to content
Snippets Groups Projects
Commit fa1f3489 authored by Jianhua Lu's avatar Jianhua Lu
Browse files

arm64: dts: qcom: sm8250-xiaomi-elish: Add sound support

parent 3e62e862
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,8 @@
#include <dt-bindings/arm/qcom,ids.h>
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
#include <dt-bindings/usb/pd.h>
#include "sm8250.dtsi"
#include "pm8150.dtsi"
......@@ -572,6 +574,152 @@ fuel-gauge@55 {
};
};
&i2c1 {
clock-frequency = <400000>;
status = "okay";
cs35l41_brh: speaker-amp@40 {
compatible = "cirrus,cs35l41";
reg = <0x40>;
interrupt-parent = <&tlmm>;
interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
cirrus,boost-type = <0>;
cirrus,boost-peak-milliamp = <4000>;
cirrus,boost-ind-nanohenry = <1000>;
cirrus,boost-cap-microfarad = <15>;
cirrus,asp-sdout-hiz = <3>;
cirrus,gpio2-src-select = <4>;
cirrus,gpio2-output-enable;
sound-name-prefix = "BRH";
#sound-dai-cells = <1>;
};
cs35l41_blh: speaker-amp@41 {
compatible = "cirrus,cs35l41";
reg = <0x41>;
interrupt-parent = <&tlmm>;
interrupts = <67 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>;
cirrus,boost-type = <0>;
cirrus,boost-peak-milliamp = <4000>;
cirrus,boost-ind-nanohenry = <1000>;
cirrus,boost-cap-microfarad = <15>;
cirrus,asp-sdout-hiz = <3>;
cirrus,gpio2-src-select = <4>;
cirrus,gpio2-output-enable;
sound-name-prefix = "BLH";
#sound-dai-cells = <1>;
};
cs35l41_brl: speaker-amp@42 {
compatible = "cirrus,cs35l41";
reg = <0x42>;
interrupt-parent = <&tlmm>;
interrupts = <100 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>;
cirrus,boost-type = <0>;
cirrus,boost-peak-milliamp = <4000>;
cirrus,boost-ind-nanohenry = <1000>;
cirrus,boost-cap-microfarad = <15>;
cirrus,asp-sdout-hiz = <3>;
cirrus,gpio2-src-select = <4>;
cirrus,gpio2-output-enable;
sound-name-prefix = "BRL";
#sound-dai-cells = <1>;
};
cs35l41_bll: speaker-amp@43 {
compatible = "cirrus,cs35l41";
reg = <0x43>;
interrupt-parent = <&tlmm>;
interrupts = <126 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>;
cirrus,boost-type = <0>;
cirrus,boost-peak-milliamp = <4000>;
cirrus,boost-ind-nanohenry = <1000>;
cirrus,boost-cap-microfarad = <15>;
cirrus,asp-sdout-hiz = <3>;
cirrus,gpio2-src-select = <4>;
cirrus,gpio2-output-enable;
sound-name-prefix = "BLL";
#sound-dai-cells = <1>;
};
};
&i2c3 {
clock-frequency = <400000>;
status = "okay";
cs35l41_trh: speaker-amp@40 {
compatible = "cirrus,cs35l41";
reg = <0x40>;
interrupt-parent = <&tlmm>;
interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
cirrus,boost-type = <0>;
cirrus,boost-peak-milliamp = <4000>;
cirrus,boost-ind-nanohenry = <1000>;
cirrus,boost-cap-microfarad = <15>;
cirrus,asp-sdout-hiz = <3>;
cirrus,gpio2-src-select = <4>;
cirrus,gpio2-output-enable;
sound-name-prefix = "TRH";
#sound-dai-cells = <1>;
};
cs35l41_tlh: speaker-amp@41 {
compatible = "cirrus,cs35l41";
reg = <0x41>;
interrupt-parent = <&tlmm>;
interrupts = <92 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 78 GPIO_ACTIVE_HIGH>;
cirrus,boost-type = <0>;
cirrus,boost-peak-milliamp = <4000>;
cirrus,boost-ind-nanohenry = <1000>;
cirrus,boost-cap-microfarad = <15>;
cirrus,asp-sdout-hiz = <3>;
cirrus,gpio2-src-select = <4>;
cirrus,gpio2-output-enable;
sound-name-prefix = "TLH";
#sound-dai-cells = <1>;
};
cs35l41_tll: speaker-amp@42 {
compatible = "cirrus,cs35l41";
reg = <0x42>;
interrupt-parent = <&tlmm>;
interrupts = <112 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
cirrus,boost-type = <0>;
cirrus,boost-peak-milliamp = <4000>;
cirrus,boost-ind-nanohenry = <1000>;
cirrus,boost-cap-microfarad = <15>;
cirrus,asp-sdout-hiz = <3>;
cirrus,gpio2-src-select = <4>;
cirrus,gpio2-output-enable;
sound-name-prefix = "TLL";
#sound-dai-cells = <1>;
};
cs35l41_trl: speaker-amp@43 {
compatible = "cirrus,cs35l41";
reg = <0x43>;
interrupt-parent = <&tlmm>;
interrupts = <129 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&tlmm 144 GPIO_ACTIVE_HIGH>;
cirrus,boost-type = <0>;
cirrus,boost-peak-milliamp = <4000>;
cirrus,boost-ind-nanohenry = <1000>;
cirrus,boost-cap-microfarad = <15>;
cirrus,asp-sdout-hiz = <3>;
cirrus,gpio2-src-select = <4>;
cirrus,gpio2-output-enable;
sound-name-prefix = "TRL";
#sound-dai-cells = <1>;
};
};
&i2c11 {
clock-frequency = <400000>;
status = "okay";
......@@ -788,11 +936,63 @@ &qupv3_id_2 {
status = "okay";
};
&q6afedai {
dai@56 {
reg = <TERTIARY_TDM_RX_0>;
qcom,tdm-sync-mode = <0>;
qcom,tdm-sync-src = <1>;
qcom,tdm-data-out = <0>;
qcom,tdm-invert-sync = <1>;
qcom,tdm-data-delay = <1>;
qcom,tdm-data-align = <0>;
};
};
&q6asmdai {
dai@0 {
reg = <0>;
};
};
&slpi {
firmware-name = "qcom/sm8250/xiaomi/elish/slpi.mbn";
status = "okay";
};
&sound {
compatible = "qcom,sm8250-sndcard";
model = "Xiaomi Mi Pad 5 Pro";
pinctrl-names = "default";
pinctrl-0 = <&tert_tdm_active>;
mm1-dai-link {
link-name = "MultiMedia1";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
};
};
speaker-dai-link {
link-name = "Tertiary TDM Playback";
cpu {
sound-dai = <&q6afedai TERTIARY_TDM_RX_0>;
};
platform {
sound-dai = <&q6routing>;
};
codec {
sound-dai = <&cs35l41_tlh 0>, <&cs35l41_tll 0>,
<&cs35l41_trh 0>, <&cs35l41_trl 0>,
<&cs35l41_blh 0>, <&cs35l41_bll 0>,
<&cs35l41_brh 0>, <&cs35l41_brl 0>;
};
};
};
&spi4 {
status = "okay";
pinctrl-names = "default";
......@@ -833,6 +1033,38 @@ wlan_en_state: wlan-default-state {
output-low;
bias-pull-up;
};
tert_tdm_active: tert-tdm-active-state {
sck-pins {
pins = "gpio133";
function = "mi2s2_sck";
drive-strength = <8>;
bias-disable;
output-high;
};
din-pins {
pins = "gpio134";
function = "mi2s2_data0";
drive-strength = <8>;
bias-disable;
};
ws-pins {
pins = "gpio135";
function = "mi2s2_ws";
drive-strength = <8>;
bias-disable;
output-high;
};
dout-pins {
pins = "gpio137";
function = "mi2s2_data1";
drive-strength = <8>;
bias-disable;
};
};
};
&uart6 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment