diff options
author | Andrey Gusakov <andrey.gusakov@cogentembedded.com> | 2017-08-10 16:43:56 +0300 |
---|---|---|
committer | Andrey Gusakov <andrey.gusakov@cogentembedded.com> | 2017-08-10 18:32:32 +0300 |
commit | 0cf6512fd0659a87ae77905ba0194a140e50dc83 (patch) | |
tree | c60f8a84f750dd058458703cfead8214a14ce4c4 /meta-rcar-gen3-adas/recipes-kernel | |
parent | 5b99b3df6f892690a99d2cc7d60e1496fd6a37bd (diff) |
Kingfisher: enable PCM audio between CPU and BT module
Add dummy driver for wl18xx PCM.
Update dtb's. Update pulseaudio config.
Also add ofono-test.
Diffstat (limited to 'meta-rcar-gen3-adas/recipes-kernel')
4 files changed, 234 insertions, 14 deletions
diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0040-arm64-dts-renesas-add-ADAS-boards.patch b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0040-arm64-dts-renesas-add-ADAS-boards.patch index fa1cff3..f2f15aa 100644 --- a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0040-arm64-dts-renesas-add-ADAS-boards.patch +++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0040-arm64-dts-renesas-add-ADAS-boards.patch @@ -21,34 +21,34 @@ Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com> --- arch/arm64/boot/dts/renesas/Makefile | 13 + arch/arm64/boot/dts/renesas/legacy/Makefile | 7 + - .../renesas/legacy/r8a7795-es1-h3ulcb-kf-v0.dts | 1717 ++++++++++++++++++ + .../renesas/legacy/r8a7795-es1-h3ulcb-kf-v0.dts | 1717 +++++++++++++++++ .../renesas/legacy/r8a7795-es1-h3ulcb-kf-v1.dts | 440 +++++ - .../dts/renesas/legacy/r8a7795-h3ulcb-kf-v0.dts | 1720 ++++++++++++++++++ + .../dts/renesas/legacy/r8a7795-h3ulcb-kf-v0.dts | 1724 +++++++++++++++++ .../dts/renesas/legacy/r8a7795-h3ulcb-kf-v1.dts | 464 +++++ - .../dts/renesas/legacy/r8a7796-m3ulcb-kf-v0.dts | 1214 +++++++++++++ + .../dts/renesas/legacy/r8a7796-m3ulcb-kf-v0.dts | 1214 ++++++++++++ .../dts/renesas/legacy/r8a7796-m3ulcb-kf-v1.dts | 464 +++++ .../dts/renesas/r8a7795-es1-h3ulcb-had-alfa.dts | 22 + .../dts/renesas/r8a7795-es1-h3ulcb-had-beta.dts | 23 + .../boot/dts/renesas/r8a7795-es1-h3ulcb-had.dtsi | 225 +++ - .../boot/dts/renesas/r8a7795-es1-h3ulcb-kf.dts | 1910 ++++++++++++++++++++ + .../boot/dts/renesas/r8a7795-es1-h3ulcb-kf.dts | 1940 ++++++++++++++++++++ .../boot/dts/renesas/r8a7795-es1-h3ulcb-vb.dts | 1787 ++++++++++++++++++ .../boot/dts/renesas/r8a7795-es1-h3ulcb-view.dts | 546 ++++++ .../dts/renesas/r8a7795-es1-salvator-x-view.dts | 552 ++++++ .../boot/dts/renesas/r8a7795-h3ulcb-had-alfa.dts | 22 + .../boot/dts/renesas/r8a7795-h3ulcb-had-beta.dts | 23 + .../arm64/boot/dts/renesas/r8a7795-h3ulcb-had.dtsi | 219 +++ - arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-kf.dts | 1906 +++++++++++++++++++ + arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-kf.dts | 1940 ++++++++++++++++++++ arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-vb.dts | 1787 ++++++++++++++++++ .../arm64/boot/dts/renesas/r8a7795-h3ulcb-view.dts | 546 ++++++ .../boot/dts/renesas/r8a7795-salvator-x-view.dts | 552 ++++++ - arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts | 1400 ++++++++++++++ + arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts | 1430 +++++++++++++++ .../arm64/boot/dts/renesas/r8a7796-m3ulcb-view.dts | 287 +++ .../boot/dts/renesas/r8a7796-salvator-x-view.dts | 318 ++++ arch/arm64/boot/dts/renesas/ulcb-kf-cmos.dtsi | 75 + arch/arm64/boot/dts/renesas/ulcb-kf-rpi.dtsi | 77 + - arch/arm64/boot/dts/renesas/ulcb-kf-sd3.dtsi | 44 + + arch/arm64/boot/dts/renesas/ulcb-kf-sd3.dtsi | 46 + arch/arm64/boot/dts/renesas/ulcb-vb-cn12.dtsi | 515 ++++++ - 29 files changed, 18875 insertions(+) + 29 files changed, 18975 insertions(+) create mode 100644 arch/arm64/boot/dts/renesas/legacy/Makefile create mode 100644 arch/arm64/boot/dts/renesas/legacy/r8a7795-es1-h3ulcb-kf-v0.dts create mode 100644 arch/arm64/boot/dts/renesas/legacy/r8a7795-es1-h3ulcb-kf-v1.dts @@ -6466,7 +6466,7 @@ new file mode 100644 index 0000000..f117af0 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/r8a7795-es1-h3ulcb-kf.dts -@@ -0,0 +1,1910 @@ +@@ -0,0 +1,1940 @@ +/* + * Device Tree Source for the H3ULCB Kingfisher board on r8a7795 ES1.x + * @@ -6670,6 +6670,25 @@ index 0000000..f117af0 + }; + }; + ++ sound_wl18xx: sound@3 { ++ pinctrl-0 = <&sound_3_pins>; ++ pinctrl-names = "default"; ++ compatible = "simple-audio-card"; ++ ++ simple-audio-card,format = "i2s"; ++ simple-audio-card,name = "wl18xx"; ++ ++ simple-audio-card,bitclock-master = <&sound_wl18xx_master>; ++ simple-audio-card,frame-master = <&sound_wl18xx_master>; ++ sound_wl18xx_master: simple-audio-card,cpu@3 { ++ sound-dai = <&rcar_sound 3>; ++ }; ++ ++ simple-audio-card,codec@3 { ++ sound-dai = <&wl18xx_pcm>; ++ }; ++ }; ++ + lvds-encoder { + compatible = "thine,thc63lvdm83d"; + @@ -6734,6 +6753,13 @@ index 0000000..f117af0 + + #sound-dai-cells = <0>; + }; ++ ++ wl18xx_pcm: wl18xx_pcm@0 { ++ compatible = "ti,wl18xx-pcm"; ++ status = "okay"; ++ ++ #sound-dai-cells = <0>; ++ }; +}; + +&pfc { @@ -8251,7 +8277,7 @@ index 0000000..f117af0 +}; + +&rcar_sound { -+ pinctrl-0 = <&sound_clk_pins &sound_3_pins>; ++ pinctrl-0 = <&sound_clk_pins>; + pinctrl-names = "default"; + + /* Multi DAI */ @@ -8366,6 +8392,10 @@ index 0000000..f117af0 + shared-pin; +}; + ++&ssi8 { ++ shared-pin; ++}; ++ +&pciec1 { + pcie3v3-supply = <&mpcie_3v3>; + pcie1v8-supply = <&mpcie_1v8>; @@ -11567,7 +11597,7 @@ new file mode 100644 index 0000000..5b61059 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/r8a7795-h3ulcb-kf.dts -@@ -0,0 +1,1910 @@ +@@ -0,0 +1,1940 @@ +/* + * Device Tree Source for the H3ULCB Kingfisher board on r8a7795 + * @@ -11771,6 +11801,25 @@ index 0000000..5b61059 + }; + }; + ++ sound_wl18xx: sound@3 { ++ pinctrl-0 = <&sound_3_pins>; ++ pinctrl-names = "default"; ++ compatible = "simple-audio-card"; ++ ++ simple-audio-card,format = "i2s"; ++ simple-audio-card,name = "wl18xx"; ++ ++ simple-audio-card,bitclock-master = <&sound_wl18xx_master>; ++ simple-audio-card,frame-master = <&sound_wl18xx_master>; ++ sound_wl18xx_master: simple-audio-card,cpu@3 { ++ sound-dai = <&rcar_sound 3>; ++ }; ++ ++ simple-audio-card,codec@3 { ++ sound-dai = <&wl18xx_pcm>; ++ }; ++ }; ++ + lvds-encoder { + compatible = "thine,thc63lvdm83d"; + @@ -11835,6 +11884,13 @@ index 0000000..5b61059 + + #sound-dai-cells = <0>; + }; ++ ++ wl18xx_pcm: wl18xx_pcm@0 { ++ compatible = "ti,wl18xx-pcm"; ++ status = "okay"; ++ ++ #sound-dai-cells = <0>; ++ }; +}; + +&pfc { @@ -13352,7 +13408,7 @@ index 0000000..5b61059 +}; + +&rcar_sound { -+ pinctrl-0 = <&sound_clk_pins &sound_3_pins>; ++ pinctrl-0 = <&sound_clk_pins>; + pinctrl-names = "default"; + + /* Multi DAI */ @@ -13467,6 +13523,10 @@ index 0000000..5b61059 + shared-pin; +}; + ++&ssi8 { ++ shared-pin; ++}; ++ +&pciec1 { + pcie3v3-supply = <&mpcie_3v3>; + pcie1v8-supply = <&mpcie_1v8>; @@ -16386,7 +16446,7 @@ new file mode 100644 index 0000000..a037f16 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/r8a7796-m3ulcb-kf.dts -@@ -0,0 +1,1400 @@ +@@ -0,0 +1,1430 @@ +/* + * Device Tree Source for the M3ULCB Kingfisher board on r8a7796 + * @@ -16590,6 +16650,25 @@ index 0000000..a037f16 + }; + }; + ++ sound_wl18xx: sound@3 { ++ pinctrl-0 = <&sound_3_pins>; ++ pinctrl-names = "default"; ++ compatible = "simple-audio-card"; ++ ++ simple-audio-card,format = "i2s"; ++ simple-audio-card,name = "wl18xx"; ++ ++ simple-audio-card,bitclock-master = <&sound_wl18xx_master>; ++ simple-audio-card,frame-master = <&sound_wl18xx_master>; ++ sound_wl18xx_master: simple-audio-card,cpu@3 { ++ sound-dai = <&rcar_sound 3>; ++ }; ++ ++ simple-audio-card,codec@3 { ++ sound-dai = <&wl18xx_pcm>; ++ }; ++ }; ++ + lvds-encoder { + compatible = "thine,thc63lvdm83d"; + @@ -16654,6 +16733,13 @@ index 0000000..a037f16 + + #sound-dai-cells = <0>; + }; ++ ++ wl18xx_pcm: wl18xx_pcm@0 { ++ compatible = "ti,wl18xx-pcm"; ++ status = "okay"; ++ ++ #sound-dai-cells = <0>; ++ }; +}; + +&pfc { @@ -17661,7 +17747,7 @@ index 0000000..a037f16 +}; + +&rcar_sound { -+ pinctrl-0 = <&sound_clk_pins &sound_3_pins>; ++ pinctrl-0 = <&sound_clk_pins>; + pinctrl-names = "default"; + + /* Multi DAI */ @@ -17776,6 +17862,10 @@ index 0000000..a037f16 + shared-pin; +}; + ++&ssi8 { ++ shared-pin; ++}; ++ +&pciec1 { + pcie3v3-supply = <&mpcie_3v3>; + pcie1v8-supply = <&mpcie_1v8>; diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0071-ASoC-add-dummy-device-for-WL18xx-PCM-audio.patch b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0071-ASoC-add-dummy-device-for-WL18xx-PCM-audio.patch new file mode 100644 index 0000000..71be565 --- /dev/null +++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0071-ASoC-add-dummy-device-for-WL18xx-PCM-audio.patch @@ -0,0 +1,128 @@ +From 81ddd8a5dbf200938ef70efaa9254742f49d3034 Mon Sep 17 00:00:00 2001 +From: Andrey Gusakov <andrey.gusakov@cogentembedded.com> +Date: Thu, 10 Aug 2017 16:29:01 +0300 +Subject: [PATCH] ASoC: add dummy device for WL18xx PCM audio + +Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> +--- + sound/soc/codecs/Kconfig | 3 ++ + sound/soc/codecs/Makefile | 2 ++ + sound/soc/codecs/wl18xx.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 77 insertions(+) + create mode 100644 sound/soc/codecs/wl18xx.c + +diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig +index 140f1597966a..6658d05f1648 100644 +--- a/sound/soc/codecs/Kconfig ++++ b/sound/soc/codecs/Kconfig +@@ -625,6 +625,9 @@ config SND_SOC_PCM3168A_SPI + config SND_SOC_SI468X + tristate "Dummy sound driver for Si468x radio" + ++config SND_SOC_WL18XX ++ tristate "Dummy sound driver for WL18xx BT" ++ + config SND_SOC_PCM5102A + tristate + +diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile +index 8e02341428d8..17fd313489de 100644 +--- a/sound/soc/codecs/Makefile ++++ b/sound/soc/codecs/Makefile +@@ -126,6 +126,7 @@ snd-soc-sigmadsp-i2c-objs := sigmadsp-i2c.o + snd-soc-sigmadsp-regmap-objs := sigmadsp-regmap.o + snd-soc-si476x-objs := si476x.o + snd-soc-si468x-objs := si468x.o ++snd-soc-wl18xx-objs := wl18xx.o + snd-soc-sirf-audio-codec-objs := sirf-audio-codec.o + snd-soc-sn95031-objs := sn95031.o + snd-soc-spdif-tx-objs := spdif_transmitter.o +@@ -349,6 +350,7 @@ obj-$(CONFIG_SND_SOC_SIGMADSP_I2C) += snd-soc-sigmadsp-i2c.o + obj-$(CONFIG_SND_SOC_SIGMADSP_REGMAP) += snd-soc-sigmadsp-regmap.o + obj-$(CONFIG_SND_SOC_SI476X) += snd-soc-si476x.o + obj-$(CONFIG_SND_SOC_SI468X) += snd-soc-si468x.o ++obj-$(CONFIG_SND_SOC_WL18XX) += snd-soc-wl18xx.o + obj-$(CONFIG_SND_SOC_SN95031) +=snd-soc-sn95031.o + obj-$(CONFIG_SND_SOC_SPDIF) += snd-soc-spdif-rx.o snd-soc-spdif-tx.o + obj-$(CONFIG_SND_SOC_SSM2518) += snd-soc-ssm2518.o +diff --git a/sound/soc/codecs/wl18xx.c b/sound/soc/codecs/wl18xx.c +new file mode 100644 +index 000000000000..50ebbd4c0013 +--- /dev/null ++++ b/sound/soc/codecs/wl18xx.c +@@ -0,0 +1,72 @@ ++/* ++ * Dummy sound driver for wl18xx BT modules ++ * Copyright 2016 Andrey Gusakov <andrey.gusakov@cogentembedded.com> ++ * ++ * Based on: Driver for the DFBM-CS320 bluetooth module ++ * Copyright 2011 Lars-Peter Clausen <lars@metafoo.de> ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ */ ++ ++#include <linux/init.h> ++#include <linux/module.h> ++#include <linux/platform_device.h> ++ ++#include <sound/soc.h> ++ ++static struct snd_soc_dai_driver wl18xx_dai = { ++ .name = "wl18xx-pcm", ++ .capture = { ++ .channels_min = 2, ++ .channels_max = 2, ++ .rates = SNDRV_PCM_RATE_8000, ++ .formats = SNDRV_PCM_FMTBIT_S16_LE, ++ }, ++ .playback = { ++ .channels_min = 2, ++ .channels_max = 2, ++ .rates = SNDRV_PCM_RATE_8000, ++ .formats = SNDRV_PCM_FMTBIT_S16_LE, ++ }, ++}; ++ ++static struct snd_soc_codec_driver soc_codec_dev_wl18xx; ++ ++static int wl18xx_probe(struct platform_device *pdev) ++{ ++ return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_wl18xx, ++ &wl18xx_dai, 1); ++} ++ ++static int wl18xx_remove(struct platform_device *pdev) ++{ ++ snd_soc_unregister_codec(&pdev->dev); ++ ++ return 0; ++} ++ ++static const struct of_device_id wl18xx_of_match[] = { ++ { .compatible = "ti,wl18xx-pcm", }, ++ { } ++}; ++MODULE_DEVICE_TABLE(of, wl18xx_of_match); ++ ++static struct platform_driver wl18xx_driver = { ++ .driver = { ++ .name = "wl18xx", ++ .of_match_table = wl18xx_of_match, ++ .owner = THIS_MODULE, ++ }, ++ .probe = wl18xx_probe, ++ .remove = wl18xx_remove, ++}; ++ ++module_platform_driver(wl18xx_driver); ++ ++MODULE_AUTHOR("Andrey Gusakov <andrey.gusakov@cogentembedded.com>"); ++MODULE_DESCRIPTION("ASoC wl18xx driver"); ++MODULE_LICENSE("GPL"); +-- +2.13.0 + diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/ulcb.cfg b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/ulcb.cfg index a8befb9..b199cde 100644 --- a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/ulcb.cfg +++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/ulcb.cfg @@ -55,6 +55,7 @@ CONFIG_WLCORE_SDIO=m CONFIG_SND_SOC_SI468X=y CONFIG_SND_SOC_PCM3168A=y CONFIG_SND_SOC_PCM3168A_I2C=y +CONFIG_SND_SOC_WL18XX=y CONFIG_INPUT_TOUCHSCREEN=y CONFIG_TOUCHSCREEN_PROPERTIES=y CONFIG_HID_MULTITOUCH=y diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend index 91c5390..c3ea9ea 100644 --- a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend +++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend @@ -54,6 +54,7 @@ SRC_URI_append = " \ file://0068-drm-adv7511-use-smbus-to-retrieve-edid.patch \ file://0069-ASoC-ak4613-Improve-counting-DAI-number.patch \ file://0070-clk-clk-5p49x-add-5P49V5925-chip.patch \ + file://0071-ASoC-add-dummy-device-for-WL18xx-PCM-audio.patch \ " SRC_URI_append_h3ulcb = " file://ulcb.cfg" |