Commit graph

26 commits

Author SHA1 Message Date
Pierre-Louis Bossart
6d9afd36af drivers: dai: intel: ssp: don't set ACE2.x LCTL::OFLEN
The OFLEN bit has to be set by the host driver for ACE2.x. The
ownership of the IP is now handled at the host driver level, no longer
the firmware.

Setting it at the firmware level is a no-op if the bit is already set
by the host driver, and will fail it isn't already set.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2023-04-18 10:48:18 -04:00
Jaroslaw Stelter
1659aa2e0c intel_adsp: ace20_lnl: Fix i2svss DT field initialization
This patch fixes i2svss field initialisation in Device Tree for LNL
platform. It fixes this bug: #482

Problem is observed only when using SSP_BLOB_VER_1_5 version.
Unfortunatelly this version is not tested in FW validation tests.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-04-18 10:48:18 -04:00
Jaroslaw Stelter
b75b4153d6 intel_adsp: ace20_lnl: Add I2S clock source configuration
Add I2CLCTL_MLCS programming in SSP driver.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-04-18 10:48:18 -04:00
Jaroslaw Stelter
b252673f13 intel_adsp: ace20_lnl: Fix hang issue on SSP power off
Clearing SPA bit together with OFFLEN bit causes FW hang.
This patch changes sequence to avoid that situation.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-18 10:48:18 -04:00
Jaroslaw Stelter
3b518743d2 drivers: ssp: Program slot number basing on blob
The upper ssp slot number should be retrieved from configuration
blob to support all possible settings. This patch fix this issue.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-18 10:48:18 -04:00
Jaroslaw Stelter
99d5d9aaa8 drivers: ssp: Repleace shim2 with hdamlssp
Repleace usage of shim2 device tree field with hdamlssp.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-04-18 10:48:18 -04:00
Jaroslaw Stelter
1e5550d262 intel_adsp: ace20_lnl: ssp: Program new HW registers
In LNL platform GPDMA and ALH is no longer used. SSP uses LINK HDA
as a DMA engine. Therefore new shim, new register definitions and new
programming flows were defined.

This patch implements new SSP programming requirements for LNL.
Since HDA is shared between Host and DSP, link_config field was added to
dai_config structure. This one is provided by Host in new IPC4 fields
during interface configuration.

Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
2023-04-18 10:48:18 -04:00
Ranjani Sridharan
c56f5d53b7 drivers: ssp: Ignore link clock_source for non-ACE platforms
Ignore the link clock_source for non-ACE platforms instead of throwing
an error when it is set in the topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2023-04-06 11:50:27 +02:00
Tomasz Leman
0a00253313 driver: ssp: set initial state as off
Since the device need to be first powered-up by the power domain, it has
more sense that device is in off state at the beginning.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2023-04-05 08:31:16 +02:00
Jaska Uimonen
26e4da9511 drivers: dai: intel: ssp: add aux data support
Intel SSP configuration can have auxiliary data embedded after it in a
variable length tlv array. Enable the parsing of this data and add the
data structs to describe the contents.

For now add support only for new version 1.5 blob. This is because
legacy blob doesn't have size field to describe its variable size.
Auxiliary data parsing has currently only 1 setting for link clock
needed in ACE platforms.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2023-02-19 20:43:34 -05:00
Jaska Uimonen
c64f91de1a drivers: dai: intel: ssp: add blob 1.5 support
Add support for newer data blob version 1.5. Refactor the code to re-use
the common register setting. Clock setting will be handled differently
with legacy and version 1.5 blob.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2023-02-19 20:43:34 -05:00
Jaska Uimonen
3b7f9c320d drivers: dai: modify dai_config_get API func
Modify dai_config_get function to have the config struct as argument.
This was not a showstopper but a request in the API review.

In the same patch modify all Intel dai drivers using the API to preserve
bisect/compile.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2023-02-19 20:43:14 -05:00
Hein Wessels
3210541c86 toolchain: gcc: rename popcount to avoid conflict with C++20
The macro conflicts with the C++20 feature std::popcount

fixes zephyrproject-rtos/zephyr#53421

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-01-03 11:06:45 +01:00
Adrian Bonislawski
fa57cd613b drivers: dai: ssp: clear RSE bits on ACE
On ACE RSE bits should be cleared unconditionally
if ssp is no longer in use

This will allow to successfully disable SSP in
dai_ssp_pm_runtime_dis_ssp_power()
and enable it correctly in the next run

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
2022-11-18 12:01:24 +00:00
Ranjani Sridharan
33687cd403 drivers: dai: intel: ssp: Fix log level typo
Print all SSP registers at level info.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-11-16 11:21:32 +01:00
Ranjani Sridharan
5f9c20db5a drivers/dai/intel/ssp: Skip setting config when playback/capture is active
The reference count, dp->sref, is never incremented for the SSP DAI as
we use the runtime PM API's to probe/remove the DAI during
resume/suspend. Therefore, use the DAI state to check if the DAI is
active in any direction before proceesing to set the config. This fixes
the IO errors seen during simultaenous playback and capture on the same
SSP.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2022-11-09 09:27:51 +00:00
Ederson de Souza
c1dc2683b9 drivers/dai/intel/ssp: Get number of SSP ports from Kconfig
Instead of using SoC versions, define the information about base and
extended ports on Kconfig, and use this information from there.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Ederson de Souza
79980f250c drivers/dai/intel/ssp: Decide about clock gating based on Kconfig
Instead of using version of the SoC, declare on Kconfig the need for it,
and use this information to decide upon enabling the code or not.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2022-09-08 18:03:33 -04:00
Jaska Uimonen
108b76eb16 drivers: dai: intel: ssp: add dai index to config
Dai index should be added to config as it can be queried by the
application like sof. Also check for dynamically allocated params
when returning the config.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2022-08-19 12:09:14 +02:00
Krzysztof Frydryk
8dd57467cc drivers: dai: Enable Zephyr runtime power mgmt in Intel SSP driver
Enable Zephyr device runtime power management mechanisms in Intel SSP
driver. This allows Zephyr to track usage reference for power
domain gating.

Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2022-08-10 11:58:45 +02:00
Kai Vehmanen
0aa116a914 drivers: dai: intel: reduce log clutter in ssp_trigger
With addition of DAI_TRIGGER_COPY, the trigger callback may
be called at a very high rate.

Reduce the logging level from INF to DBG for the logs in
dai_ssp_trigger().

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2022-08-02 07:11:51 -04:00
Krzysztof Frydryk
6254274420 ssp: Use sampling rate from config
Use sampling rate passed in config instead of a default one when using
config blob.

Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
2022-08-01 10:31:42 +02:00
Anas Nashif
43371d0414 intel_adsp: move cavs to be a series
Intel ADSP CAVS is now a proper series with all CAVS SoCs running under
it. This will give us to Intel ADSP series:
- CAVS
- ACE v1.x

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-07-25 16:50:24 -04:00
Arsen Eloglian
d4c1c1ebef ssp: SSCR reset - hardware specific flow
hardware specific flow using bit 20 (SSCR2_SFRMEN)  for reset

Signed-off-by: Arsen Eloglian <ArsenX.Eloglian@intel.com>
2022-06-05 14:45:59 +02:00
Gerard Marull-Paretas
fb60aab245 drivers: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all drivers to the new
prefix <zephyr/...>. Note that the conversion has been scripted, refer
to #45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 19:58:21 +02:00
Jaska Uimonen
8d38b64fdc drivers: dai: add dai driver subdir and ssp driver
Add Intel ssp driver using dai interface.

Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
2022-04-14 11:42:08 -04:00