ARM: dts: s5pv210: Enable audio on Aries boards

Both the Galaxy S and the Fascinate4G have a WM8994 codec, but they
differ slightly in their jack detection and micbias configuration.

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
This commit is contained in:
Jonathan Bakker
2020-09-01 17:38:58 -07:00
committed by Krzysztof Kozlowski
parent a6b5a1977c
commit cd972fe900
3 changed files with 193 additions and 0 deletions

View File

@@ -47,6 +47,11 @@ mfc_right: region@51000000 {
};
};
bt_codec: bt_sco {
compatible = "linux,bt-sco";
#sound-dai-cells = <0>;
};
vibrator_pwr: regulator-fixed-0 {
compatible = "regulator-fixed";
regulator-name = "vibrator-en";
@@ -624,6 +629,11 @@ touchscreen@4a {
};
};
&i2s0 {
dmas = <&pdma0 9>, <&pdma0 10>, <&pdma0 11>;
status = "okay";
};
&mfc {
memory-region = <&mfc_left>, <&mfc_right>;
};

View File

@@ -35,6 +35,80 @@ vol-up {
linux,code = <KEY_VOLUMEUP>;
};
};
headset_micbias_reg: regulator-fixed-3 {
compatible = "regulator-fixed";
regulator-name = "Headset_Micbias";
gpio = <&gpj2 5 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-names = "default";
pinctrl-0 = <&headset_micbias_ena>;
};
main_micbias_reg: regulator-fixed-4 {
compatible = "regulator-fixed";
regulator-name = "Main_Micbias";
gpio = <&gpj4 2 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-names = "default";
pinctrl-0 = <&main_micbias_ena>;
};
sound {
compatible = "samsung,fascinate4g-wm8994";
model = "Fascinate4G";
extcon = <&fsa9480>;
main-micbias-supply = <&main_micbias_reg>;
headset-micbias-supply = <&headset_micbias_reg>;
earpath-sel-gpios = <&gpj2 6 GPIO_ACTIVE_HIGH>;
io-channels = <&adc 3>;
io-channel-names = "headset-detect";
headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_HIGH>;
headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>;
samsung,audio-routing =
"HP", "HPOUT1L",
"HP", "HPOUT1R",
"SPK", "SPKOUTLN",
"SPK", "SPKOUTLP",
"RCV", "HPOUT2N",
"RCV", "HPOUT2P",
"LINE", "LINEOUT2N",
"LINE", "LINEOUT2P",
"IN1LP", "Main Mic",
"IN1LN", "Main Mic",
"IN1RP", "Headset Mic",
"IN1RN", "Headset Mic",
"Modem Out", "Modem TX",
"Modem RX", "Modem In",
"Bluetooth SPK", "TX",
"RX", "Bluetooth Mic";
pinctrl-names = "default";
pinctrl-0 = <&headset_det &earpath_sel>;
cpu {
sound-dai = <&i2s0>, <&bt_codec>;
};
codec {
sound-dai = <&wm8994>;
};
};
};
&fg {
@@ -51,6 +125,12 @@ &pinctrl0 {
pinctrl-names = "default";
pinctrl-0 = <&sleep_cfg>;
headset_det: headset-det {
samsung,pins = "gph0-6", "gph3-6";
samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
};
fg_irq: fg-irq {
samsung,pins = "gph3-3";
samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
@@ -58,6 +138,24 @@ fg_irq: fg-irq {
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
};
headset_micbias_ena: headset-micbias-ena {
samsung,pins = "gpj2-5";
samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
};
earpath_sel: earpath-sel {
samsung,pins = "gpj2-6";
samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
};
main_micbias_ena: main-micbias-ena {
samsung,pins = "gpj4-2";
samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
};
/* Based on vendor kernel v2.6.35.7 */
sleep_cfg: sleep-cfg {
PIN_SLP(gpa0-0, PREV, NONE);

View File

@@ -72,6 +72,73 @@ fmradio@10 {
pinctrl-0 = <&fm_irq &fm_rst>;
};
};
micbias_reg: regulator-fixed-3 {
compatible = "regulator-fixed";
regulator-name = "MICBIAS";
gpio = <&gpj4 2 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-names = "default";
pinctrl-0 = <&micbias_reg_ena>;
};
sound {
compatible = "samsung,aries-wm8994";
model = "Aries";
extcon = <&fsa9480>;
main-micbias-supply = <&micbias_reg>;
headset-micbias-supply = <&micbias_reg>;
earpath-sel-gpios = <&gpj2 6 GPIO_ACTIVE_HIGH>;
io-channels = <&adc 3>;
io-channel-names = "headset-detect";
headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_LOW>;
headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>;
samsung,audio-routing =
"HP", "HPOUT1L",
"HP", "HPOUT1R",
"SPK", "SPKOUTLN",
"SPK", "SPKOUTLP",
"RCV", "HPOUT2N",
"RCV", "HPOUT2P",
"LINE", "LINEOUT2N",
"LINE", "LINEOUT2P",
"IN1LP", "Main Mic",
"IN1LN", "Main Mic",
"IN1RP", "Headset Mic",
"IN1RN", "Headset Mic",
"IN2LN", "FM In",
"IN2RN", "FM In",
"Modem Out", "Modem TX",
"Modem RX", "Modem In",
"Bluetooth SPK", "TX",
"RX", "Bluetooth Mic";
pinctrl-names = "default";
pinctrl-0 = <&headset_det &earpath_sel>;
cpu {
sound-dai = <&i2s0>, <&bt_codec>;
};
codec {
sound-dai = <&wm8994>;
};
};
};
&aliases {
@@ -88,6 +155,12 @@ fm_i2c_pins: fm-i2c-pins {
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
};
headset_det: headset-det {
samsung,pins = "gph0-6", "gph3-6";
samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
};
fm_irq: fm-irq {
samsung,pins = "gpj2-4";
samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
@@ -102,6 +175,12 @@ fm_rst: fm-rst {
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
};
earpath_sel: earpath-sel {
samsung,pins = "gpj2-6";
samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
};
massmemory_en: massmemory-en {
samsung,pins = "gpj2-7";
samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
@@ -109,6 +188,12 @@ massmemory_en: massmemory-en {
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
};
micbias_reg_ena: micbias-reg-ena {
samsung,pins = "gpj4-2";
samsung,pin-pud = <S3C64XX_PIN_PULL_NONE>;
samsung,pin-drv = <EXYNOS4_PIN_DRV_LV1>;
};
/* Based on CyanogenMod 3.0.101 kernel */
sleep_cfg: sleep-cfg {
PIN_SLP(gpa0-0, PREV, NONE);