Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Yauhen Kharuzhy <jekhor@gmail.com>
To: linux-sound@vger.kernel.org,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
	Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, Hans de Goede <hansg@kernel.org>,
	Yauhen Kharuzhy <jekhor@gmail.com>
Subject: [PATCH v1 0/2] Add ASoC machine driver for Lenovo YB1 tablets
Date: Wed, 18 Feb 2026 01:13:22 +0200	[thread overview]
Message-ID: <20260217231324.1319392-1-jekhor@gmail.com> (raw)

This is the first iteration of my submission for sound support for Lenovo
Yoga Book YB1-X90/X91 tablets.

These are Cherry Trail-based platforms that use the RT5677 codec and
TS3A227E jack detection IC.

The YB1-X90 is an Android-designated device and has incorrect ACPI entries
for many onboard peripherals, including sound devices. The YB1-X91 has a
DSDT node for the codec, and the same node is shared with the TS3A227E
jack detection IC (see below).

Matching with ACPI entries is somewhat tricky; see the corresponding
commit. Jack detection IC info is defined in the x86-android-tablets driver
for both platforms to simplify the code.

The machine driver is called 'cht_yogabook' because it has some
hardcoded device-specific elements and it seems this is the only known
Cherry Trail platform using the RT5677 codec. This naming is open
to discussion: a more generic name like 'cht_rt5677' or 'cht_bsw_rt5677'
may be better (requiring reworking of the driver to make it
more generic with device-specific quirks).

The driver requires support for the RT5677 definition as an ACPI node or
i2c_board_info, submitted earlier in [1].

1. https://lore.kernel.org/linux-sound/20260211002255.4090440-1-jekhor@gmail.com/

For reference, there is an ACPI node for sound configuration from YB1-X91
DSDT below:

HID: 10EC5677
_CRS resources:

  I2C devices:
  0: rt5677 codec
  1: ts3a227e jack detection IC

  GPIOs:
  0: rt5677 codec reset
  1: rt5677 codec pow-ldo2
  2: speaker enable

  INTs:
  0: rt5677 codec
  1: ts3a227e jack detection IC

  SPI device:
  0: rt5677 codec SPI connection

ACPI decompiled dump fragment:

    Device (RTEK)
    {
        Name (_ADR, Zero)  // _ADR: Address
        Name (_HID, "10EC5677")  // _HID: Hardware ID
        Name (_CID, "10EC5677")  // _CID: Compatible ID
        Name (_DDN, "Realtek IIS Audio Codec")  // _DDN: DOS Device Name
        Name (_SUB, "17AA7005")  // _SUB: Subsystem ID
        Name (_UID, One)  // _UID: Unique ID
        Name (_PR0, Package (0x01)  // _PR0: Power Resources for D0
        {
            CLK3
        })
        Name (CHAN, Package (0x02)
        {
            One,
            0x0124F800
        })
        Method (_CRS, 0, NotSerialized)  // _CRS: Current Resource Settings
        {
            Name (SBUF, ResourceTemplate ()
            {
                I2cSerialBusV2 (0x002C, ControllerInitiated, 0x000186A0,
                    AddressingMode7Bit, "\\_SB.PCI0.I2C1",
                    0x00, ResourceConsumer, , Exclusive,
                    )
                I2cSerialBusV2 (0x003B, ControllerInitiated, 0x000186A0,
                    AddressingMode7Bit, "\\_SB.PCI0.I2C1",
                    0x00, ResourceConsumer, , Exclusive,
                    )
                GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly,
                    "\\_SB.GPO3", 0x00, ResourceConsumer, ,
                    )
                    {   // Pin list
                        0x0019
                    }
                GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly,
                    "\\_SB.GPO3", 0x00, ResourceConsumer, ,
                    )
                    {   // Pin list
                        0x0012
                    }
                GpioIo (Exclusive, PullDefault, 0x0000, 0x0000, IoRestrictionOutputOnly,
                    "\\_SB.GPO3", 0x00, ResourceConsumer, ,
                    )
                    {   // Pin list
                        0x0030
                    }
                GpioInt (Edge, ActiveLow, Exclusive, PullNone, 0x0000,
                    "\\_SB.GPO0", 0x00, ResourceConsumer, ,
                    )
                    {   // Pin list
                        0x005B
                    }
                GpioInt (Edge, ActiveLow, Exclusive, PullNone, 0x0000,
                    "\\_SB.GPO0", 0x00, ResourceConsumer, ,
                    )
                    {   // Pin list
                        0x004D
                    }
                SpiSerialBusV2 (0x0001, PolarityLow, FourWireMode, 0x08,
                    ControllerInitiated, 0x003D0900, ClockPolarityHigh,
                    ClockPhaseSecond, "\\_SB.PCI0.SPI1",
                    0x00, ResourceConsumer, , Exclusive,
                    )
            })
            Return (SBUF) /* \_SB_.PCI0.I2C1.RTEK._CRS.SBUF */
        }
    }


Yauhen Kharuzhy (2):
  ASoC: Intel: cht_yogabook: Add driver for Lenovo Yoga Book tablets
  ASoC: Intel: soc-acpi-cht: Add Lenovo Yoga Book entries

 sound/soc/intel/boards/Kconfig                |  15 +
 sound/soc/intel/boards/Makefile               |   2 +
 sound/soc/intel/boards/cht_yogabook.c         | 602 ++++++++++++++++++
 .../intel/common/soc-acpi-intel-cht-match.c   | 144 +++--
 4 files changed, 713 insertions(+), 50 deletions(-)
 create mode 100644 sound/soc/intel/boards/cht_yogabook.c


base-commit: 635c467cc14ebdffab3f77610217c1dacaf88e8c
message-id: 20260211002255.4090440-1-jekhor@gmail.com

-- 
2.51.0


             reply	other threads:[~2026-02-17 23:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-17 23:13 Yauhen Kharuzhy [this message]
2026-02-17 23:13 ` [PATCH v1 1/2] ASoC: Intel: cht_yogabook: Add driver for Lenovo Yoga Book tablets Yauhen Kharuzhy
2026-02-18 10:31   ` Pierre-Louis Bossart
2026-02-18 22:37     ` Yauhen Kharuzhy
2026-02-17 23:13 ` [PATCH v1 2/2] ASoC: Intel: soc-acpi-cht: Add Lenovo Yoga Book entries Yauhen Kharuzhy
2026-02-18 10:35   ` Pierre-Louis Bossart
2026-02-18 22:45     ` Yauhen Kharuzhy

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=20260217231324.1319392-1-jekhor@gmail.com \
    --to=jekhor@gmail.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=hansg@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.dev \
    /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