Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions kernel/configs/vamos.config
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ CONFIG_ATH10K_SNOC=y

# Remoteproc / Modem
CONFIG_QCOM_RMTFS_MEM=y
CONFIG_QCOM_Q6V5_ADSP=y
CONFIG_QCOM_Q6V5_MSS=y
CONFIG_QCOM_Q6V5_PAS=y
CONFIG_QCOM_SYSMON=y
CONFIG_RPMSG_QCOM_GLINK_SMEM=y
CONFIG_QRTR=y
Expand Down Expand Up @@ -83,6 +85,19 @@ CONFIG_SENSORS_INA2XX=y
CONFIG_TOUCHSCREEN_EDT_FT5X06=y
CONFIG_TOUCHSCREEN_S6SY761=y

# Sound
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_PCM=y
CONFIG_SND_DMAENGINE_PCM=y
CONFIG_SND_SOC=y
CONFIG_QCOM_APR=y
CONFIG_SOUNDWIRE=y
CONFIG_SND_SOC_QCOM=y
CONFIG_SND_SOC_QDSP6=y
CONFIG_SND_SOC_SDM845=y
CONFIG_SND_SOC_GENERIC_CODEC=y

# GPIO
# TODO: migrate gpio.sh, lte.sh, and power_drop_monitor.py to chardev (libgpiod)
# and remove GPIO_SYSFS (deprecated)
Expand Down
154 changes: 154 additions & 0 deletions kernel/dts/sdm845-comma-common.dtsi
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/dts-v1/;

#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/sound/qcom,q6afe.h>
#include <dt-bindings/sound/qcom,q6asm.h>
#include "sdm845.dtsi"
#include "pm8998.dtsi"
#include "pmi8998.dtsi"
Expand All @@ -14,6 +17,13 @@
stdout-path = "serial0:115200n8";
};

generic_codec: audio-codec {
compatible = "commaai,generic-codec";
#sound-dai-cells = <0>;
clock-names = "mclk";
clocks = <&rpmhcc RPMH_LN_BB_CLK2>;
};

lcd3v3: lcd3v3 {
compatible = "regulator-fixed";
regulator-name = "lcd3v3";
Expand Down Expand Up @@ -344,6 +354,11 @@
};
};

&adsp_pas {
status = "okay";
firmware-name = "qcom/sdm845/adsp.mdt";
};

&gcc {
protected-clocks = <GCC_QSPI_CORE_CLK>,
<GCC_QSPI_CORE_CLK_SRC>,
Expand Down Expand Up @@ -391,6 +406,145 @@
status = "okay";
};

&q6afedai {
qi2s@18 {
reg = <SECONDARY_MI2S_RX>;
qcom,sd-lines = <1>;
};

qi2s@19 {
reg = <SECONDARY_MI2S_TX>;
qcom,sd-lines = <0>;
};
};

&q6asmdai {
dai@0 {
reg = <MSM_FRONTEND_DAI_MULTIMEDIA1>;
};

dai@1 {
reg = <MSM_FRONTEND_DAI_MULTIMEDIA2>;
};
};

&sound {
status = "okay";

compatible = "qcom,sdm845-sndcard";
model = "comma four";

pinctrl-names = "default", "sleep";
pinctrl-0 = <&sec_mi2s_mclk_active &sec_mi2s_active &sec_mi2s_sd0_active &sec_mi2s_sd1_active>;
pinctrl-1 = <&sec_mi2s_mclk_sleep &sec_mi2s_sleep &sec_mi2s_sd0_sleep &sec_mi2s_sd1_sleep>;

mm1-dai-link {
link-name = "MultiMedia1";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
};
};

mm2-dai-link {
link-name = "MultiMedia2";
cpu {
sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>;
};
};

capture-dai-link {
link-name = "Capture";
cpu {
sound-dai = <&q6afedai SECONDARY_MI2S_TX>;
};

platform {
sound-dai = <&q6routing>;
};

codec {
sound-dai = <&generic_codec>;
};
};

playback-dai-link {
link-name = "Playback";
cpu {
sound-dai = <&q6afedai SECONDARY_MI2S_RX>;
};

platform {
sound-dai = <&q6routing>;
};

codec {
sound-dai = <&generic_codec>;
};
};
};

&tlmm {
sec_mi2s_mclk_sleep: sec-mi2s-mclk-sleep-state {
pins = "gpio79";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
input-enable;
};

sec_mi2s_mclk_active: sec-mi2s-mclk-active-state {
pins = "gpio79";
function = "sec_mi2s";
drive-strength = <8>;
bias-disable;
};

sec_mi2s_sleep: sec-mi2s-sleep-state {
pins = "gpio80", "gpio81";
function = "gpio";
drive-strength = <2>;
bias-disable;
input-enable;
};

sec_mi2s_active: sec-mi2s-active-state {
pins = "gpio80", "gpio81";
function = "sec_mi2s";
drive-strength = <8>;
bias-disable;
};

sec_mi2s_sd0_sleep: sec-mi2s-sd0-sleep-state {
pins = "gpio82";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
input-enable;
};

sec_mi2s_sd0_active: sec-mi2s-sd0-active-state {
pins = "gpio82";
function = "sec_mi2s";
drive-strength = <8>;
bias-disable;
};

sec_mi2s_sd1_sleep: sec-mi2s-sd1-sleep-state {
pins = "gpio83";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
input-enable;
};

sec_mi2s_sd1_active: sec-mi2s-sd1-active-state {
pins = "gpio83";
function = "sec_mi2s";
drive-strength = <8>;
bias-disable;
};
};

&spi0 {
status = "okay";

Expand Down
104 changes: 104 additions & 0 deletions kernel/dts/sdm845-comma-tizi.dts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@
qcom,msm-id = <341 0x20001>, <321 0x20001>, <321 0x20000>, <348 0x20001>;
qcom,board-id = <0x21 0>;

main5v: main5v {
status = "okay";
compatible = "regulator-fixed";
regulator-name = "main5v";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&tlmm 25 0>;
enable-active-high;
regulator-always-on;
regulator-boot-on;
};

tp3v3: tp3v3 {
status = "okay";
compatible = "regulator-fixed";
Expand Down Expand Up @@ -66,3 +78,95 @@
remote-endpoint = <&panel_in>;
data-lanes = <0 1 2 3>;
};

&tlmm {
tert_mi2s_mclk_sleep: tert-mi2s-mclk-sleep-state {
pins = "gpio74";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
input-enable;
};

tert_mi2s_mclk_active: tert-mi2s-mclk-active-state {
pins = "gpio74";
function = "tert_mi2s";
drive-strength = <8>;
bias-disable;
};

tert_mi2s_sleep: tert-mi2s-sleep-state {
pins = "gpio75", "gpio76";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
input-enable;
};

tert_mi2s_active: tert-mi2s-active-state {
pins = "gpio75", "gpio76";
function = "ter_mi2s";
drive-strength = <8>;
bias-disable;
output-high;
};

tert_mi2s_sd0_sleep: tert-mi2s-sd0-sleep-state {
pins = "gpio77";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
input-enable;
};

tert_mi2s_sd0_active: tert-mi2s-sd0-active-state {
pins = "gpio77";
function = "ter_mi2s";
drive-strength = <8>;
bias-disable;
};

tert_mi2s_sd1_sleep: tert-mi2s-sd1-sleep-state {
pins = "gpio78";
function = "gpio";
drive-strength = <2>;
bias-pull-down;
input-enable;
};

tert_mi2s_sd1_active: tert-mi2s-sd1-active-state {
pins = "gpio78";
function = "ter_mi2s";
drive-strength = <8>;
bias-disable;
};
};

&q6afedai {
qi2s@18 {
reg = <SECONDARY_MI2S_RX>;
qcom,sd-lines = <0>;
};

qi2s@21 {
reg = <TERTIARY_MI2S_TX>;
qcom,sd-lines = <0>;
};
};

&sound {
model = "comma tizi";

pinctrl-names = "default", "sleep";
pinctrl-0 = <&sec_mi2s_mclk_active &sec_mi2s_active &sec_mi2s_sd0_active &sec_mi2s_sd1_active
&tert_mi2s_active &tert_mi2s_sd0_active &tert_mi2s_sd1_active>;
pinctrl-1 = <&sec_mi2s_mclk_sleep &sec_mi2s_sleep &sec_mi2s_sd0_sleep &sec_mi2s_sd1_sleep
&tert_mi2s_sleep &tert_mi2s_sd0_sleep &tert_mi2s_sd1_sleep>;

capture-dai-link {
link-name = "Capture";
cpu {
sound-dai = <&q6afedai TERTIARY_MI2S_TX>;
};
};
};
Loading
Loading