From patchwork Fri Mar 8 13:58:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 779472 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B07D754F96; Fri, 8 Mar 2024 13:59:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.149.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709906366; cv=none; b=GsEVqu5S5u2C2edQVi9VtoFIzWWj5lD7o87nvreXkkO4lBXxeh61MKHLvIeLCzzulLb6xIFWynycCdXxG8JmK5TQhiPWmemBq47ZkX2vr3uRPBa+w5Pkv/bnEtXDPJdCzkmRdBkrGI/gfbRaMCTKFhaV1SKIXgwXaWcifbdAyr0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709906366; c=relaxed/simple; bh=U+fOKz7TGiR4Thd1clYqsJhaN+IEdPVYdQnzJseP65U=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HjuImETf9CoyAk3B4kVdmCzSIJMFu/MrEOhNshg2P30b7bf/lvTzLbgx/pXi0z1+quvifA9i2q+ufmAaqvzxD5R/psahMByinxAdZIL98mhI02aVZVyHuDpYB0zg7oL2K9b5h1gUPyM0IhpW5V46RPFldIdJw/5C5LYlblpbQTc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=oyp/I4ea; arc=none smtp.client-ip=67.231.149.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="oyp/I4ea" Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4286otF1031190; Fri, 8 Mar 2024 07:59:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=WTB9XN6od6vwedl7aoFuFijIIazO2klf7gPonNGoWoU=; b= oyp/I4eaTw+Lseg0iL78DGaDvUnLwT/U+6qZOMEafmSHnHdSTw5GDnAeSX0zBVUh 8hcq7gGya7SyADgp7+elFra1urabn1lIYCOetw86zmSvWbzjuC+NKJUgxjvmv5BT Qn6AHtX9VkjcYCCUhOdUBKvRE5jnkSi3GNEgNr6MF20Sf5KJl1tn4n9q+hWpJH1f lX9nLmnS3kBZOb9JfX12xelmRjWa79uQqRE4g5hllDOJsLe5DIl4cohuoaAKfod5 LUuDCkLg72OuAt2hWH3/OwqXHdQX0cB+vFL3aBHh3toWRyGXQ8j7p0C1Z2cCjdiN FWg/2pM1bsPJkTYR6ryOkw== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3wm2d2q9b2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Mar 2024 07:59:03 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 8 Mar 2024 13:59:00 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Fri, 8 Mar 2024 13:59:00 +0000 Received: from ediswws06.ad.cirrus.com (ediswws06.ad.cirrus.com [198.90.208.18]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id BB4A982024B; Fri, 8 Mar 2024 13:59:00 +0000 (UTC) From: Richard Fitzgerald To: , , , , CC: , , , , , , "Simon Trimmer" , Richard Fitzgerald Subject: [PATCH 1/3] ASoC: cs35l56: Add support for CS35L54 and CS35L57 Date: Fri, 8 Mar 2024 13:58:58 +0000 Message-ID: <20240308135900.603192-2-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240308135900.603192-1-rf@opensource.cirrus.com> References: <20240308135900.603192-1-rf@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: s1KbksDwxCrFPUx1zRvNEGFuo0ihwG1n X-Proofpoint-GUID: s1KbksDwxCrFPUx1zRvNEGFuo0ihwG1n X-Proofpoint-Spam-Reason: safe From: Simon Trimmer The CS35L54 and CS35L57 are Boosted Smart Amplifiers. The CS35L54 has I2C/SPI control and I2S/TDM audio. The CS35L57 also has SoundWire control and audio. The hardware differences between L54, L56 and L57 do not affect the driver control interface so they can all be handled by the same driver. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald --- include/sound/cs35l56.h | 1 + sound/soc/codecs/cs35l56-sdw.c | 3 ++- sound/soc/codecs/cs35l56-shared.c | 8 ++++++-- sound/soc/codecs/cs35l56.c | 14 +++++++++++++- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h index 4014ed7097b3..e0629699b563 100644 --- a/include/sound/cs35l56.h +++ b/include/sound/cs35l56.h @@ -261,6 +261,7 @@ struct cs35l56_base { struct regmap *regmap; int irq; struct mutex irq_lock; + u8 type; u8 rev; bool init_done; bool fw_patched; diff --git a/sound/soc/codecs/cs35l56-sdw.c b/sound/soc/codecs/cs35l56-sdw.c index eaa4c706f3a2..14a5f86019aa 100644 --- a/sound/soc/codecs/cs35l56-sdw.c +++ b/sound/soc/codecs/cs35l56-sdw.c @@ -386,7 +386,7 @@ static int cs35l56_sdw_bus_config(struct sdw_slave *peripheral, dev_dbg(cs35l56->base.dev, "%s: sclk=%u c=%u r=%u\n", __func__, sclk, params->col, params->row); - if (cs35l56->base.rev < 0xb0) + if ((cs35l56->base.type == 0x56) && (cs35l56->base.rev < 0xb0)) return cs35l56_a1_kick_divider(cs35l56, peripheral); return 0; @@ -563,6 +563,7 @@ static const struct dev_pm_ops cs35l56_sdw_pm = { static const struct sdw_device_id cs35l56_sdw_id[] = { SDW_SLAVE_ENTRY(0x01FA, 0x3556, 0), + SDW_SLAVE_ENTRY(0x01FA, 0x3557, 0), {}, }; MODULE_DEVICE_TABLE(sdw, cs35l56_sdw_id); diff --git a/sound/soc/codecs/cs35l56-shared.c b/sound/soc/codecs/cs35l56-shared.c index f3670bf85a95..08cac58e3ab2 100644 --- a/sound/soc/codecs/cs35l56-shared.c +++ b/sound/soc/codecs/cs35l56-shared.c @@ -776,13 +776,17 @@ int cs35l56_hw_init(struct cs35l56_base *cs35l56_base) devid &= CS35L56_DEVID_MASK; switch (devid) { + case 0x35A54: case 0x35A56: + case 0x35A57: break; default: dev_err(cs35l56_base->dev, "Unknown device %x\n", devid); return ret; } + cs35l56_base->type = devid & 0xFF; + ret = regmap_read(cs35l56_base->regmap, CS35L56_DSP_RESTRICT_STS1, &secured); if (ret) { dev_err(cs35l56_base->dev, "Get Secure status failed\n"); @@ -803,8 +807,8 @@ int cs35l56_hw_init(struct cs35l56_base *cs35l56_base) if (ret) return ret; - dev_info(cs35l56_base->dev, "Cirrus Logic CS35L56%s Rev %02X OTP%d fw:%d.%d.%d (patched=%u)\n", - cs35l56_base->secured ? "s" : "", cs35l56_base->rev, otpid, + dev_info(cs35l56_base->dev, "Cirrus Logic CS35L%02X%s Rev %02X OTP%d fw:%d.%d.%d (patched=%u)\n", + cs35l56_base->type, cs35l56_base->secured ? "s" : "", cs35l56_base->rev, otpid, fw_ver >> 16, (fw_ver >> 8) & 0xff, fw_ver & 0xff, !fw_missing); /* Wake source and *_BLOCKED interrupts default to unmasked, so mask them */ diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c index 8a0ca0812772..8d2f021fb362 100644 --- a/sound/soc/codecs/cs35l56.c +++ b/sound/soc/codecs/cs35l56.c @@ -1004,6 +1004,10 @@ static int cs35l56_component_probe(struct snd_soc_component *component) return -ENODEV; } + cs35l56->dsp.part = kasprintf(GFP_KERNEL, "cs35l%02x", cs35l56->base.type); + if (!cs35l56->dsp.part) + return -ENOMEM; + cs35l56->component = component; wm_adsp2_component_probe(&cs35l56->dsp, component); @@ -1034,6 +1038,9 @@ static void cs35l56_component_remove(struct snd_soc_component *component) wm_adsp2_component_remove(&cs35l56->dsp, component); + kfree(cs35l56->dsp.part); + cs35l56->dsp.part = NULL; + kfree(cs35l56->dsp.fwf_name); cs35l56->dsp.fwf_name = NULL; @@ -1253,7 +1260,12 @@ static int cs35l56_dsp_init(struct cs35l56_private *cs35l56) dsp = &cs35l56->dsp; cs35l56_init_cs_dsp(&cs35l56->base, &dsp->cs_dsp); - dsp->part = "cs35l56"; + + /* + * dsp->part is filled in later as it is based on the DEVID. In a + * SoundWire system that cannot be read until enumeration has occurred + * and the device has attached. + */ dsp->fw = 12; dsp->wmfw_optional = true; From patchwork Fri Mar 8 13:58:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 779473 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB78640853; Fri, 8 Mar 2024 13:59:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.152.168 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709906364; cv=none; b=ez4LqffcbGaZ3JKB/kqF2r7tYhdCcPlUDP0hDabwdDn2N2pUaIqRoTizqyBjTqa/aXts4qCSFWwykEHWrUL13BcuF0fpFQGX+PFJKVPUKs7hiPGRmPsZhhU5TkNUCO5erVkApqVR+jFeCWtqni7iYGGt0UFKslDN+AY011w8o1A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709906364; c=relaxed/simple; bh=o8K012Oem4PHVj4ZW/iWzvsRClfJhAeRFi3fTA52p4w=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ppF0N9KYUq447oWG93DHr5QxBUOxzocpUhdrs+L2OwodvlEJHm46tq5woYb5q3QlKj6Brs2iOZDuQKi45dRbxWnYE0WVi7vuv05RwemetGyxVAhWkuxRF3HTZ2OuhSGzekibVKFkDUFF+bT+2ijMdSSgpyi6bgpqFP5N2Qe7jxc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=W5iYzO1D; arc=none smtp.client-ip=67.231.152.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="W5iYzO1D" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4286juhU000826; Fri, 8 Mar 2024 07:59:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=rqN71B10n1AW4Euf1b7rwX3hAjupKeEilhu8pUKsMlg=; b= W5iYzO1DqWQ9A0ndo4nmPxvgsnKjYdadRJMIEKAb4RSFeebnaW2Ros/IjcFJguqb Ufn/iR5bLskfNvECFfNio6kdxAnO3UL7o0MuCbhdMZ1/cKpR/jnuYQFB4HOXH0+G zmKYsCWEEI4Kk8Pf0vAA7K6xkGyN6xNwEm9B9gRXjniZSx6CHJnvTZqdPXA8tXTZ faysQlEuV9BuSiScS9S95qcx+b51ELHDQokq2cvJ4xTP7dqQmtyaQ65M+hWd3Gl9 aWPECPiWwNY6ycnqUoEOA4LBCaGbbWRd2Qh3LLLg+cwQ+ykLom/atrKlLbyT1T9C rn/khyfZsABrSebn2X+vGA== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3wpn933f32-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Mar 2024 07:59:03 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 8 Mar 2024 13:59:01 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Fri, 8 Mar 2024 13:59:00 +0000 Received: from ediswws06.ad.cirrus.com (ediswws06.ad.cirrus.com [198.90.208.18]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id C971B82024D; Fri, 8 Mar 2024 13:59:00 +0000 (UTC) From: Richard Fitzgerald To: , , , , CC: , , , , , , "Simon Trimmer" , Richard Fitzgerald Subject: [PATCH 2/3] ALSA: hda: cs35l56: Add support for CS35L54 and CS35L57 Date: Fri, 8 Mar 2024 13:58:59 +0000 Message-ID: <20240308135900.603192-3-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240308135900.603192-1-rf@opensource.cirrus.com> References: <20240308135900.603192-1-rf@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: 6EWp8g6Yp6Keh7-6X84ADc-3WCvnAnYj X-Proofpoint-ORIG-GUID: 6EWp8g6Yp6Keh7-6X84ADc-3WCvnAnYj X-Proofpoint-Spam-Reason: safe From: Simon Trimmer Add the HID for the CS35L54 and CS35L57 Boosted Smart Amplifiers. These have the same control interface as the CS35L56 so are handled by the cs35l56-hda driver. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald --- sound/pci/hda/cs35l56_hda.c | 16 ++++++++++------ sound/pci/hda/cs35l56_hda.h | 2 +- sound/pci/hda/cs35l56_hda_i2c.c | 7 +++++-- sound/pci/hda/cs35l56_hda_spi.c | 7 +++++-- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c index 5ad76d6914c3..41974b3897a7 100644 --- a/sound/pci/hda/cs35l56_hda.c +++ b/sound/pci/hda/cs35l56_hda.c @@ -459,13 +459,15 @@ static void cs35l56_hda_request_firmware_files(struct cs35l56_hda *cs35l56, if (preloaded_fw_ver) { snprintf(base_name, sizeof(base_name), - "cirrus/cs35l56-%02x%s-%06x-dsp1-misc", + "cirrus/cs35l%02x-%02x%s-%06x-dsp1-misc", + cs35l56->base.type, cs35l56->base.rev, cs35l56->base.secured ? "-s" : "", preloaded_fw_ver & 0xffffff); } else { snprintf(base_name, sizeof(base_name), - "cirrus/cs35l56-%02x%s-dsp1-misc", + "cirrus/cs35l%02x-%02x%s-dsp1-misc", + cs35l56->base.type, cs35l56->base.rev, cs35l56->base.secured ? "-s" : ""); } @@ -852,9 +854,10 @@ static int cs35l56_hda_system_resume(struct device *dev) return 0; } -static int cs35l56_hda_read_acpi(struct cs35l56_hda *cs35l56, int id) +static int cs35l56_hda_read_acpi(struct cs35l56_hda *cs35l56, int hid, int id) { u32 values[HDA_MAX_COMPONENTS]; + char hid_string[8]; struct acpi_device *adev; const char *property, *sub; size_t nval; @@ -865,7 +868,8 @@ static int cs35l56_hda_read_acpi(struct cs35l56_hda *cs35l56, int id) * the serial-multi-instantiate driver, so lookup the node by HID */ if (!ACPI_COMPANION(cs35l56->base.dev)) { - adev = acpi_dev_get_first_match_dev("CSC3556", NULL, -1); + snprintf(hid_string, sizeof(hid_string), "CSC%04X", hid); + adev = acpi_dev_get_first_match_dev(hid_string, NULL, -1); if (!adev) { dev_err(cs35l56->base.dev, "Failed to find an ACPI device for %s\n", dev_name(cs35l56->base.dev)); @@ -953,14 +957,14 @@ static int cs35l56_hda_read_acpi(struct cs35l56_hda *cs35l56, int id) return ret; } -int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int id) +int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int hid, int id) { int ret; mutex_init(&cs35l56->base.irq_lock); dev_set_drvdata(cs35l56->base.dev, cs35l56); - ret = cs35l56_hda_read_acpi(cs35l56, id); + ret = cs35l56_hda_read_acpi(cs35l56, hid, id); if (ret) goto err; diff --git a/sound/pci/hda/cs35l56_hda.h b/sound/pci/hda/cs35l56_hda.h index 6e5bc5397db5..464e4aa63cd1 100644 --- a/sound/pci/hda/cs35l56_hda.h +++ b/sound/pci/hda/cs35l56_hda.h @@ -42,7 +42,7 @@ struct cs35l56_hda { extern const struct dev_pm_ops cs35l56_hda_pm_ops; -int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int id); +int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int hid, int id); void cs35l56_hda_remove(struct device *dev); #endif /*__CS35L56_HDA_H__*/ diff --git a/sound/pci/hda/cs35l56_hda_i2c.c b/sound/pci/hda/cs35l56_hda_i2c.c index a9ef6d86de83..13beee807308 100644 --- a/sound/pci/hda/cs35l56_hda_i2c.c +++ b/sound/pci/hda/cs35l56_hda_i2c.c @@ -13,6 +13,7 @@ static int cs35l56_hda_i2c_probe(struct i2c_client *clt) { + const struct i2c_device_id *id = i2c_client_get_device_id(clt); struct cs35l56_hda *cs35l56; int ret; @@ -33,7 +34,7 @@ static int cs35l56_hda_i2c_probe(struct i2c_client *clt) return ret; } - ret = cs35l56_hda_common_probe(cs35l56, clt->addr); + ret = cs35l56_hda_common_probe(cs35l56, id->driver_data, clt->addr); if (ret) return ret; ret = cs35l56_irq_request(&cs35l56->base, clt->irq); @@ -49,7 +50,9 @@ static void cs35l56_hda_i2c_remove(struct i2c_client *clt) } static const struct i2c_device_id cs35l56_hda_i2c_id[] = { - { "cs35l56-hda", 0 }, + { "cs35l54-hda", 0x3554 }, + { "cs35l56-hda", 0x3556 }, + { "cs35l57-hda", 0x3557 }, {} }; diff --git a/sound/pci/hda/cs35l56_hda_spi.c b/sound/pci/hda/cs35l56_hda_spi.c index 080426de9083..a3b2fa76663d 100644 --- a/sound/pci/hda/cs35l56_hda_spi.c +++ b/sound/pci/hda/cs35l56_hda_spi.c @@ -13,6 +13,7 @@ static int cs35l56_hda_spi_probe(struct spi_device *spi) { + const struct spi_device_id *id = spi_get_device_id(spi); struct cs35l56_hda *cs35l56; int ret; @@ -33,7 +34,7 @@ static int cs35l56_hda_spi_probe(struct spi_device *spi) return ret; } - ret = cs35l56_hda_common_probe(cs35l56, spi_get_chipselect(spi, 0)); + ret = cs35l56_hda_common_probe(cs35l56, id->driver_data, spi_get_chipselect(spi, 0)); if (ret) return ret; ret = cs35l56_irq_request(&cs35l56->base, spi->irq); @@ -49,7 +50,9 @@ static void cs35l56_hda_spi_remove(struct spi_device *spi) } static const struct spi_device_id cs35l56_hda_spi_id[] = { - { "cs35l56-hda", 0 }, + { "cs35l54-hda", 0x3554 }, + { "cs35l56-hda", 0x3556 }, + { "cs35l57-hda", 0x3557 }, {} }; From patchwork Fri Mar 8 13:59:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 778875 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB74A40849; Fri, 8 Mar 2024 13:59:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.152.168 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709906364; cv=none; b=IFbhXwEOx9y50NThrIlxrvGd7p/JLM0n0g7D1JQcK3ABvKyHPJAhGJ2ub5P6h6L04Fd/tv/vHbkmjWacRYqekcffIL5GJSgZyTcdtmHZ6Pw6oxrX81Ydb1fl7aJujA7+TgdmNKV8fHkVIWqU/J79CBKQwJRO3j9gMneKsHqBx7A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709906364; c=relaxed/simple; bh=HzZKrx49LiRP/+hcIzJU2iSsH5lHFHAgWUTmrOHqJA8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XSEkU6KSGDIpUMaNdIJd73UYaKCHCp8P1qyAzYdHw4B+DLtKEm68fi0myAe3EMfpa9q5ELJs3lIG+WH3XPTimbLvfy9brzlqJzzgBARL6vP1LJ/Y2rb1XCY7U9zLvVbJf8d+3wuWp0AtmZxeSWjsddRUBKi7YCm6hIirgTvS/kQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=P1bChyYR; arc=none smtp.client-ip=67.231.152.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="P1bChyYR" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4286juhV000826; Fri, 8 Mar 2024 07:59:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=vKtp8NdI4gfP7EyQ9JqAfx+6vw1jGJ8EZbr9OryAfjM=; b= P1bChyYR6lkCXXWbDGP1V48AtQirhi7u4OEch7je9K2gLBfsw6hcTU5a+bh3vOGu 2gyB29BdsDM3SC4989JW9FXkKeMQS5Cl+N0MnlseM1QpLxN2M4cBfzFbPy5UQl5E TFTWqeDKbywt28KLMPVBGSP8hjr9TMcXFwS2zHT7QXj/cS051/9lW22waHgm8ygE LneX5no1oYVcrUFBjkrhJNiB18d7o2pFxM4pIbQKe/eg9eK+Gg6A2i1So9+xWMQ8 sRmuFB/71tmlBCyk0NxcAJWm2sew8Fw9KIYJv3Dx0gwDV+WBrCbVzsMac+JU/Xgv zExJKPpiMBQV7ApCKj/xgA== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3wpn933f32-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Mar 2024 07:59:03 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 8 Mar 2024 13:59:01 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Fri, 8 Mar 2024 13:59:01 +0000 Received: from ediswws06.ad.cirrus.com (ediswws06.ad.cirrus.com [198.90.208.18]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id D90D3820257; Fri, 8 Mar 2024 13:59:00 +0000 (UTC) From: Richard Fitzgerald To: , , , , CC: , , , , , , "Simon Trimmer" , Richard Fitzgerald Subject: [PATCH 3/3] platform/x86: serial-multi-instantiate: Add support for CS35L54 and CS35L57 Date: Fri, 8 Mar 2024 13:59:00 +0000 Message-ID: <20240308135900.603192-4-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240308135900.603192-1-rf@opensource.cirrus.com> References: <20240308135900.603192-1-rf@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: iNXoHlDy2aTNEf_aR3-MYCRTWOPI73CI X-Proofpoint-ORIG-GUID: iNXoHlDy2aTNEf_aR3-MYCRTWOPI73CI X-Proofpoint-Spam-Reason: safe From: Simon Trimmer Add the ACPI HIDs and smi_node descriptions for the CS35L54 and CS35L57 Boosted Smart Amplifiers. Signed-off-by: Simon Trimmer Signed-off-by: Richard Fitzgerald Acked-by: Ilpo Järvinen --- This patch doesn't have any build dependencies on the ASOC/HDA code so can be take separately. --- drivers/acpi/scan.c | 2 ++ .../platform/x86/serial-multi-instantiate.c | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index e6ed1ba91e5c..091c501bed1f 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1725,7 +1725,9 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) {"BSG1160", }, {"BSG2150", }, {"CSC3551", }, + {"CSC3554", }, {"CSC3556", }, + {"CSC3557", }, {"INT33FE", }, {"INT3515", }, /* Non-conforming _HID for Cirrus Logic already released */ diff --git a/drivers/platform/x86/serial-multi-instantiate.c b/drivers/platform/x86/serial-multi-instantiate.c index 8158e3cf5d6d..97b9c6392230 100644 --- a/drivers/platform/x86/serial-multi-instantiate.c +++ b/drivers/platform/x86/serial-multi-instantiate.c @@ -329,6 +329,19 @@ static const struct smi_node cs35l41_hda = { .bus_type = SMI_AUTO_DETECT, }; +static const struct smi_node cs35l54_hda = { + .instances = { + { "cs35l54-hda", IRQ_RESOURCE_AUTO, 0 }, + { "cs35l54-hda", IRQ_RESOURCE_AUTO, 0 }, + { "cs35l54-hda", IRQ_RESOURCE_AUTO, 0 }, + { "cs35l54-hda", IRQ_RESOURCE_AUTO, 0 }, + /* a 5th entry is an alias address, not a real device */ + { "cs35l54-hda_dummy_dev" }, + {} + }, + .bus_type = SMI_AUTO_DETECT, +}; + static const struct smi_node cs35l56_hda = { .instances = { { "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 }, @@ -342,6 +355,19 @@ static const struct smi_node cs35l56_hda = { .bus_type = SMI_AUTO_DETECT, }; +static const struct smi_node cs35l57_hda = { + .instances = { + { "cs35l57-hda", IRQ_RESOURCE_AUTO, 0 }, + { "cs35l57-hda", IRQ_RESOURCE_AUTO, 0 }, + { "cs35l57-hda", IRQ_RESOURCE_AUTO, 0 }, + { "cs35l57-hda", IRQ_RESOURCE_AUTO, 0 }, + /* a 5th entry is an alias address, not a real device */ + { "cs35l57-hda_dummy_dev" }, + {} + }, + .bus_type = SMI_AUTO_DETECT, +}; + /* * Note new device-ids must also be added to ignore_serial_bus_ids in * drivers/acpi/scan.c: acpi_device_enumeration_by_parent(). @@ -350,7 +376,9 @@ static const struct acpi_device_id smi_acpi_ids[] = { { "BSG1160", (unsigned long)&bsg1160_data }, { "BSG2150", (unsigned long)&bsg2150_data }, { "CSC3551", (unsigned long)&cs35l41_hda }, + { "CSC3554", (unsigned long)&cs35l54_hda }, { "CSC3556", (unsigned long)&cs35l56_hda }, + { "CSC3557", (unsigned long)&cs35l57_hda }, { "INT3515", (unsigned long)&int3515_data }, /* Non-conforming _HID for Cirrus Logic already released */ { "CLSA0100", (unsigned long)&cs35l41_hda },