Commit d40dac7a authored by Mark Brown's avatar Mark Brown

Merge series "MFD/ASoC: Add support for Intel Bay Trail boards with WM5102...

Merge series "MFD/ASoC: Add support for Intel Bay Trail boards with WM5102 codec" from Hans de Goede <hdegoede@redhat.com>:

Hi All,

Here is v4 of my series to add support for Intel Bay Trail based devices
which use a WM5102 codec for audio output/input.

This was developed and tested on a Lenovo Yoga Tablet 1051L.

The MFD and ASoC parts do not have any build-time dependencies
on each other. But the follow-up jack-detect series does have
patches depending on each-other and on this series. So IMHO it
would be best if this entire series would be merged through the
MFD tree to make merging the follow-up series easier.

Mark, if that is ok with you (and you are happy with the ASoC
changes) can you please Ack this ?

Changes in v4:
- Add a comment to the irq-flags override explaining that theoretically
  DSDTs using IRQF_TRIGGER_FALLING could be correct on boards where the
  IRQ controller does not support active low level interrupts

Changes in v3:
- Fix compilation error when CONFIG_ACPI is not set

Changes in v2:
- Split my WM5102 work into 2 series, one series adding basic support
  for Bay Trail boards with a WM5102 codec and a second series with
  the jack-detect work
- Various other minor code tweaks

Hans de Goede (4):
  mfd: arizona: Add MODULE_SOFTDEP("pre: arizona_ldo1")
  mfd: arizona: Replace arizona_of_get_type() with
    device_get_match_data()
  mfd: arizona: Add support for ACPI enumeration of WM5102 connected
    over SPI
  ASoC: Intel: Add DMI quirk table to soc_intel_is_byt_cr()

Pierre-Louis Bossart (1):
  ASoC: Intel: bytcr_wm5102: Add machine driver for BYT/WM5102

 drivers/mfd/arizona-core.c                    |  11 -
 drivers/mfd/arizona-i2c.c                     |  11 +-
 drivers/mfd/arizona-spi.c                     | 138 +++++-
 drivers/mfd/arizona.h                         |   9 -
 sound/soc/intel/boards/Kconfig                |  12 +
 sound/soc/intel/boards/Makefile               |   2 +
 sound/soc/intel/boards/bytcr_wm5102.c         | 465 ++++++++++++++++++
 .../intel/common/soc-acpi-intel-byt-match.c   |  16 +
 sound/soc/intel/common/soc-intel-quirks.h     |  25 +
 9 files changed, 661 insertions(+), 28 deletions(-)
 create mode 100644 sound/soc/intel/boards/bytcr_wm5102.c

Regards,

Hans
parents 45a90d4a 9a87fc1e
......@@ -111,6 +111,18 @@ config SND_SOC_INTEL_BYTCR_RT5651_MACH
Say Y or m if you have such a device. This is a recommended option.
If unsure select "N".
config SND_SOC_INTEL_BYTCR_WM5102_MACH
tristate "Baytrail and Baytrail-CR with WM5102 codec"
depends on MFD_ARIZONA && MFD_WM5102 && SPI_MASTER && ACPI
depends on X86_INTEL_LPSS || COMPILE_TEST
select SND_SOC_ACPI
select SND_SOC_WM5102
help
This adds support for ASoC machine driver for Intel(R) Baytrail and Baytrail-CR
platforms with WM5102 audio codec.
Say Y if you have such a device.
If unsure select "N".
config SND_SOC_INTEL_CHT_BSW_RT5672_MACH
tristate "Cherrytrail & Braswell with RT5672 codec"
depends on I2C && ACPI
......
......@@ -10,6 +10,7 @@ snd-soc-sst-sof-wm8804-objs := sof_wm8804.o
snd-soc-sst-glk-rt5682_max98357a-objs := glk_rt5682_max98357a.o hda_dsp_common.o
snd-soc-sst-bytcr-rt5640-objs := bytcr_rt5640.o
snd-soc-sst-bytcr-rt5651-objs := bytcr_rt5651.o
snd-soc-sst-bytcr-wm5102-objs := bytcr_wm5102.o
snd-soc-sst-cht-bsw-rt5672-objs := cht_bsw_rt5672.o
snd-soc-sst-cht-bsw-rt5645-objs := cht_bsw_rt5645.o
snd-soc-sst-cht-bsw-max98090_ti-objs := cht_bsw_max98090_ti.o
......@@ -51,6 +52,7 @@ obj-$(CONFIG_SND_SOC_INTEL_BDW_RT5650_MACH) += snd-soc-sst-bdw-rt5650-mach.o
obj-$(CONFIG_SND_SOC_INTEL_BDW_RT5677_MACH) += snd-soc-sst-bdw-rt5677-mach.o
obj-$(CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH) += snd-soc-sst-bytcr-rt5640.o
obj-$(CONFIG_SND_SOC_INTEL_BYTCR_RT5651_MACH) += snd-soc-sst-bytcr-rt5651.o
obj-$(CONFIG_SND_SOC_INTEL_BYTCR_WM5102_MACH) += snd-soc-sst-bytcr-wm5102.o
obj-$(CONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH) += snd-soc-sst-cht-bsw-rt5672.o
obj-$(CONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH) += snd-soc-sst-cht-bsw-rt5645.o
obj-$(CONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH) += snd-soc-sst-cht-bsw-max98090_ti.o
......
This diff is collapsed.
......@@ -154,6 +154,22 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[] = {
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-rt5651.tplg",
},
{
.id = "WM510204",
.drv_name = "bytcr_wm5102",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "bytcr_wm5102",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-wm5102.tplg",
},
{
.id = "WM510205",
.drv_name = "bytcr_wm5102",
.fw_filename = "intel/fw_sst_0f28.bin",
.board = "bytcr_wm5102",
.sof_fw_filename = "sof-byt.ri",
.sof_tplg_filename = "sof-byt-wm5102.tplg",
},
{
.id = "DLGS7212",
.drv_name = "bytcht_da7213",
......
......@@ -11,6 +11,7 @@
#if IS_ENABLED(CONFIG_X86)
#include <linux/dmi.h>
#include <asm/cpu_device_id.h>
#include <asm/intel-family.h>
#include <asm/iosf_mbi.h>
......@@ -38,12 +39,36 @@ SOC_INTEL_IS_CPU(cml, KABYLAKE_L);
static inline bool soc_intel_is_byt_cr(struct platform_device *pdev)
{
/*
* List of systems which:
* 1. Use a non CR version of the Bay Trail SoC
* 2. Contain at least 6 interrupt resources so that the
* platform_get_resource(pdev, IORESOURCE_IRQ, 5) check below
* succeeds
* 3. Despite 1. and 2. still have their IPC IRQ at index 0 rather then 5
*
* This needs to be here so that it can be shared between the SST and
* SOF drivers. We rely on the compiler to optimize this out in files
* where soc_intel_is_byt_cr is not used.
*/
static const struct dmi_system_id force_bytcr_table[] = {
{ /* Lenovo Yoga Tablet 2 series */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
DMI_MATCH(DMI_PRODUCT_FAMILY, "YOGATablet2"),
},
},
{}
};
struct device *dev = &pdev->dev;
int status = 0;
if (!soc_intel_is_byt())
return false;
if (dmi_check_system(force_bytcr_table))
return true;
if (iosf_mbi_available()) {
u32 bios_status;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment