Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nícolas F. R. A. Prado" <nfraprado@collabora.com>
To: Mark Brown <broonie@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>
Cc: kernel@collabora.com,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Nícolas F. R. A. Prado" <nfraprado@collabora.com>,
	"Akihiko Odaki" <akihiko.odaki@gmail.com>,
	"Chunxu Li" <chunxu.li@mediatek.com>,
	"Dan Carpenter" <dan.carpenter@oracle.com>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Jiaxin Yu" <jiaxin.yu@mediatek.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Miaoqian Lin" <linmq006@gmail.com>,
	"Rikard Falkeborn" <rikard.falkeborn@gmail.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Tzung-Bi Shih" <tzungbi@google.com>,
	alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org
Subject: [PATCH 00/10] ASoC: mediatek: Set i2s clock sharing from machine drivers
Date: Thu,  8 Sep 2022 12:11:44 -0400	[thread overview]
Message-ID: <20220908161154.648557-1-nfraprado@collabora.com> (raw)


The i2s ports on MediaTek SoCs only support a single data lane. In order
to achieve full-duplex operation thus two i2s ports, one for input and
one for output, need to be used together and sharing a single clock from
one of the ports.

This clock sharing setting was previously read by the sound platform
driver from the devicetree, but given that the input/output pairing is
closely related to which codecs are connected to which ports, the
machine sound driver can infer and set it, so that no DT property is
required.

At this point only mt8183-kukui was using the DT property, but given
that this property was never documented, and that the API introduced in
this series makes it obsolete, the undocumented DT property can safely
be removed.

This series adds a function to allow setting the i2s shared clocks,
makes use of it in the machine drivers as required, and removes the no
longer required DT properties and support for them in the drivers, for
all of mt8192, mt8183 and mt8186.


Nícolas F. R. A. Prado (10):
  ASoC: mediatek: mt8192: Allow setting shared clocks from machine
    driver
  ASoC: mediatek: mt8192-mt6359: Make i2s9 share the clock from i2s8
  ASoC: mediatek: mt8192: Remove clock share parsing from DT
  ASoC: mediatek: mt8183: Allow setting shared clocks from machine
    driver
  ASoC: mediatek: mt8183: Configure shared clocks
  ASoC: mediatek: mt8183: Remove clock share parsing from DT
  arm64: dts: mediatek: kukui: Remove i2s-share properties
  ASoC: mediatek: mt8186: Allow setting shared clocks from machine
    driver
  ASoC: mediatek: mt8186: Configure shared clocks
  ASoC: mediatek: mt8186: Remove clock share parsing from DT

 .../arm64/boot/dts/mediatek/mt8183-kukui.dtsi |  5 --
 sound/soc/mediatek/mt8183/mt8183-afe-common.h |  3 ++
 .../mediatek/mt8183/mt8183-da7219-max98357.c  | 33 +++++++++++++
 sound/soc/mediatek/mt8183/mt8183-dai-i2s.c    | 45 ++++++++---------
 .../mt8183/mt8183-mt6358-ts3a227-max98357.c   | 33 +++++++++++++
 sound/soc/mediatek/mt8186/mt8186-afe-common.h |  3 ++
 sound/soc/mediatek/mt8186/mt8186-dai-i2s.c    | 44 ++++++++---------
 .../mt8186/mt8186-mt6366-da7219-max98357.c    | 18 +++++++
 .../mt8186/mt8186-mt6366-rt1019-rt5682s.c     | 18 +++++++
 sound/soc/mediatek/mt8192/mt8192-afe-common.h |  3 ++
 sound/soc/mediatek/mt8192/mt8192-dai-i2s.c    | 49 ++++++++-----------
 .../mt8192/mt8192-mt6359-rt1015-rt5682.c      |  9 ++++
 12 files changed, 180 insertions(+), 83 deletions(-)

-- 
2.37.3



             reply	other threads:[~2022-09-08 16:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08 16:11 Nícolas F. R. A. Prado [this message]
2022-09-08 16:11 ` [PATCH 01/10] ASoC: mediatek: mt8192: Allow setting shared clocks from machine driver Nícolas F. R. A. Prado
2022-09-09  7:34   ` AngeloGioacchino Del Regno
2022-09-08 16:11 ` [PATCH 02/10] ASoC: mediatek: mt8192-mt6359: Make i2s9 share the clock from i2s8 Nícolas F. R. A. Prado
2022-09-09  7:34   ` AngeloGioacchino Del Regno
2022-09-08 16:11 ` [PATCH 03/10] ASoC: mediatek: mt8192: Remove clock share parsing from DT Nícolas F. R. A. Prado
2022-09-09  7:34   ` AngeloGioacchino Del Regno
2022-09-08 16:11 ` [PATCH 04/10] ASoC: mediatek: mt8183: Allow setting shared clocks from machine driver Nícolas F. R. A. Prado
2022-09-09  7:34   ` AngeloGioacchino Del Regno
2022-09-08 16:11 ` [PATCH 05/10] ASoC: mediatek: mt8183: Configure shared clocks Nícolas F. R. A. Prado
2022-09-09  7:34   ` AngeloGioacchino Del Regno
2022-09-08 16:11 ` [PATCH 06/10] ASoC: mediatek: mt8183: Remove clock share parsing from DT Nícolas F. R. A. Prado
2022-09-09  7:34   ` AngeloGioacchino Del Regno
2022-09-08 16:11 ` [PATCH 07/10] arm64: dts: mediatek: kukui: Remove i2s-share properties Nícolas F. R. A. Prado
2022-09-09  7:34   ` AngeloGioacchino Del Regno
2022-11-08 12:43   ` Matthias Brugger
2022-09-08 16:11 ` [PATCH 08/10] ASoC: mediatek: mt8186: Allow setting shared clocks from machine driver Nícolas F. R. A. Prado
2022-09-09  7:34   ` AngeloGioacchino Del Regno
2022-09-08 16:11 ` [PATCH 09/10] ASoC: mediatek: mt8186: Configure shared clocks Nícolas F. R. A. Prado
2022-09-09  7:34   ` AngeloGioacchino Del Regno
2022-09-08 16:11 ` [PATCH 10/10] ASoC: mediatek: mt8186: Remove clock share parsing from DT Nícolas F. R. A. Prado
2022-09-09  7:34   ` AngeloGioacchino Del Regno
2022-09-09 22:45 ` [PATCH 00/10] ASoC: mediatek: Set i2s clock sharing from machine drivers Mark Brown
2022-09-13 15:56   ` Matthias Brugger
2022-09-13 16:07     ` Mark Brown
2022-09-13 16:12 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220908161154.648557-1-nfraprado@collabora.com \
    --to=nfraprado@collabora.com \
    --cc=akihiko.odaki@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=chunxu.li@mediatek.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jiaxin.yu@mediatek.com \
    --cc=kernel@collabora.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linmq006@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=perex@perex.cz \
    --cc=rikard.falkeborn@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=tiwai@suse.com \
    --cc=tzungbi@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox