Devicetree
 help / color / mirror / Atom feed
From: Binbin Zhou <zhoubinbin@loongson.cn>
To: Binbin Zhou <zhoubb.aaron@gmail.com>,
	Huacai Chen <chenhuacai@loongson.cn>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	Keguang Zhang <keguang.zhang@gmail.com>
Cc: Huacai Chen <chenhuacai@kernel.org>,
	Xuerui Wang <kernel@xen0n.name>,
	loongarch@lists.linux.dev, devicetree@vger.kernel.org,
	linux-sound@vger.kernel.org, Binbin Zhou <zhoubinbin@loongson.cn>
Subject: [PATCH v3 0/9] ASoC: Add Loongson-2K0300 I2S controller and sound card support
Date: Fri, 26 Jun 2026 10:27:02 +0800	[thread overview]
Message-ID: <cover.1782439646.git.zhoubinbin@loongson.cn> (raw)

Hi all:

This series adds ASoC support for the Loongson-2K0300 SoC and its
associated development boards, including the CTCISZ Forever Pi and the
ATK-DL2K0300B.

Key changes:
- Extend DT bindings to support ls2k0300-i2s and new audio card
  compatibles.
- Refactor the platform I2S driver to handle SoC differences via per-device
  configuration (rev_id, optional APB DMA config, reset sequence).
- Refactor the audio machine driver to support board-specific DAI formats,
  GPIO-based headphone detection/control, speaker enable, and DAPM routing.
- Add jack detection and automatic switching between headphones and
  speakers for the DL2K0300B board.

The patchset also cleans up the existing audio card binding by
referencing the common sound-card properties, and adds new compatibles
for the Loongson-2K0300 variants with proper DAI format handling.

All changes have been tested on Loongson-2K2000 (PCI), Loongson-2K0300
Forever Pi and Loongson-2K0300 DL2K0300B boards.

Thanks.
Binbin

========
V3:
Patch (1/9):
  - New patch;
  - Error handling reported by AI Sashiko;
Patch (3/9):
  - Mark platform configuration structures as `const`;
Patch (4/9):
  - Add Acked-by tag from Rob, thanks;
Patch (5/9):
  - Correct commit message;
Patch (7/9):
  - Drop `loongson` prefix;
  - Change `gpiod_hp_mute` to `gpiod_hp_ctl`;
Patch (8/9):
  - Add `add_dapm_routes` to  loongson_card_config;
  - Move gpiod* register ops into loongson_card_parse_of();
  - Change `gpiod_hp_mute` to `gpiod_hp_ctl`;
  - Add `ls_priv->gpiod_hp_det` judgment in loongson_asoc_machine_init()
    to avoid double-free;
Patch (9/9):
  - New patch;
  - Add DAPM routes from MIC inputs to Mic Bias. 

Link to V2:
https://lore.kernel.org/all/cover.1780538113.git.zhoubinbin@loongson.cn/

v2:
- The first four patches for V1 (related to code cleanup) have been
  accepted as a separate series. The link is as follows:
https://lore.kernel.org/all/178041371415.93058.4794135670349989571.b4-ty@b4/

Patch (1/7):
  - Add Reviewed-by tag from Krzysztof Kozlowski;
Patch (3/7):
  - New patch;
  - Reference sound-card-common.yaml, drop custom model property;
Patch (4/7)(5/7):
  - New patches;
  - Support Forever Pi board with different DAI format;
Patch (6/7)(7/7):
  - New patches;
  - Implement headphone jack detection and DAPM routing for ATK-DL2K0300B
    board.

Link to V1:
https://lore.kernel.org/all/cover.1773107475.git.zhoubinbin@loongson.cn/

Binbin Zhou (9):
  ASoC: loongson: Fix error handling in ACPI property parsing
  ASoC: dt-bindings: loongson,ls2k1000-i2s: Document Loongson-2K0300
    compatible
  ASoC: loongson: Add Loongson-2K0300 I2S controller support
  ASoC: dt-bindings: loongson,ls-audio-card: Use common sound card
  ASoC: dt-bindings: loongson,ls-audio-card: Add ctcisz forever pi
    compatible
  ASoC: loongson: Add Loongson-2K0300 CTCISZ Forever Pi sound card
    support
  ASoC: dt-bindings: loongson,ls-audio-card: Add ATK-DL2K0300B
    compatible
  ASoC: loongson: Add headphone jack detection and DAPM routing
  ASoC: es8328: Add DAPM routes from MIC inputs to Mic Bias

 .../sound/loongson,ls-audio-card.yaml         |  53 +++++-
 .../bindings/sound/loongson,ls2k1000-i2s.yaml |  22 ++-
 sound/soc/codecs/es8328.c                     |   5 +
 sound/soc/loongson/loongson_card.c            | 171 ++++++++++++++++--
 sound/soc/loongson/loongson_i2s_plat.c        |  42 ++++-
 5 files changed, 267 insertions(+), 26 deletions(-)

-- 
2.52.0


             reply	other threads:[~2026-06-26  2:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26  2:27 Binbin Zhou [this message]
2026-06-26  2:27 ` [PATCH v3 1/9] ASoC: loongson: Fix error handling in ACPI property parsing Binbin Zhou
2026-06-26  2:38   ` sashiko-bot
2026-06-26  2:27 ` [PATCH v3 2/9] ASoC: dt-bindings: loongson,ls2k1000-i2s: Document Loongson-2K0300 compatible Binbin Zhou
2026-06-26  2:27 ` [PATCH v3 3/9] ASoC: loongson: Add Loongson-2K0300 I2S controller support Binbin Zhou
2026-06-26  2:37   ` sashiko-bot
2026-06-26  2:27 ` [PATCH v3 4/9] ASoC: dt-bindings: loongson,ls-audio-card: Use common sound card Binbin Zhou
2026-06-26  2:37   ` sashiko-bot
2026-06-26  2:27 ` [PATCH v3 5/9] ASoC: dt-bindings: loongson,ls-audio-card: Add ctcisz forever pi compatible Binbin Zhou
2026-06-26  8:39   ` Krzysztof Kozlowski
2026-06-26  2:27 ` [PATCH v3 6/9] ASoC: loongson: Add Loongson-2K0300 CTCISZ Forever Pi sound card support Binbin Zhou
2026-06-26  2:38   ` sashiko-bot
2026-06-26  2:27 ` [PATCH v3 7/9] ASoC: dt-bindings: loongson,ls-audio-card: Add ATK-DL2K0300B compatible Binbin Zhou
2026-06-26  2:38   ` sashiko-bot
2026-06-26  2:27 ` [PATCH v3 8/9] ASoC: loongson: Add headphone jack detection and DAPM routing Binbin Zhou
2026-06-26  2:44   ` sashiko-bot
2026-06-26  2:27 ` [PATCH v3 9/9] ASoC: es8328: Add DAPM routes from MIC inputs to Mic Bias Binbin Zhou
2026-06-26  2:40   ` sashiko-bot

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=cover.1782439646.git.zhoubinbin@loongson.cn \
    --to=zhoubinbin@loongson.cn \
    --cc=broonie@kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=keguang.zhang@gmail.com \
    --cc=kernel@xen0n.name \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=tiwai@suse.com \
    --cc=zhoubb.aaron@gmail.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