From c2891f15fdc1a18220477485e2fe2f8a84a51bc2 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Wed, 29 Apr 2020 12:34:38 -0700 Subject: drivers/intel/soundwire: Add Intel SoundWire controller driver This driver provides support for Intel SoundWire controllers. It is intended to be used by multiple Intel SoCs and relies on retrieving controller/master information from the SoC itself. As such it provides a function that must be implemented by the SoC to fill out this structure. The Intel SoundWire driver in the Linux kernel expects firmware to inform it which master links are unused by adding a custom property to the link descriptor. This is done by looking for any children attached to the device that use each link and disabling the ones that are unused. Mainboards will enable this driver and define the controller in devicetree.cb in order provide the required ACPI tables, but the mainboard should not need to provide any configuration itself as that should all come from the SoC directly. This was tested with the volteer board by adding this controller and a codec to devicetree.cb and ensuring that the properties are all present, including the custom properties for the device clock and quirk mask for disabled links. Device (SNDW) { Name (_ADR, 0x40000003) Name (_CID, Package () { "PRP0001", "PNP0A05" }) Name (_DDN, "Intel SoundWire Controller") Name (_DSD, Package () { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () { "mipi-sdw-sw-interface-revision", 0x00010000 }, Package () { "mipi-sdw-master-count", 0x04 } }, ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), Package () { Package () { "mipi-sdw-link-0-subproperties", "LNK0" }, Package () { "mipi-sdw-link-1-subproperties", "LNK1" }, Package () { "mipi-sdw-link-2-subproperties", "LNK2" }, Package () { "mipi-sdw-link-3-subproperties", "LNK3" }, } } Name (LNK0, Package () { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), Package () { Package () { "mipi-sdw-clock-stop-mode0-supported", One }, [...] Package () { "intel-sdw-ip-clock", 0x0249F000 }, Package () { "intel-quirk-mask", Zero }, } } [...] } BUG=b:146482091 Signed-off-by: Duncan Laurie Change-Id: I4b4f843a7e5ea170b070a1697c8eedc7c103e127 Reviewed-on: https://review.coreboot.org/c/coreboot/+/40888 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/drivers/intel/soundwire/Makefile.inc | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/drivers/intel/soundwire/Makefile.inc (limited to 'src/drivers/intel/soundwire/Makefile.inc') diff --git a/src/drivers/intel/soundwire/Makefile.inc b/src/drivers/intel/soundwire/Makefile.inc new file mode 100644 index 0000000000..1f6773ec26 --- /dev/null +++ b/src/drivers/intel/soundwire/Makefile.inc @@ -0,0 +1 @@ +ramstage-$(CONFIG_DRIVERS_INTEL_SOUNDWIRE) += soundwire.c -- cgit v1.2.3