Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1972833rdb; Mon, 9 Oct 2023 08:34:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGT30ZlW5iKHkUmHsBi8zOa9UjmAcf73AN80wLD+Q5L1SaDxKX++otslTzvPA7S3gSPk36s X-Received: by 2002:a17:90b:3911:b0:276:d357:c4bd with SMTP id ob17-20020a17090b391100b00276d357c4bdmr13593394pjb.28.1696865683766; Mon, 09 Oct 2023 08:34:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696865683; cv=none; d=google.com; s=arc-20160816; b=pEU5H/aZg07eh2XzCSU3Sw0vIg/0JIbUJj7KZYM4ZO1uDa7BIn31cJ2DcU3hSTs8IU Y+hvh5VYT8wxCFzl4cxXoyRDMkWPw5Q4dYn5DLzQUHYqDJATDHqVejfSHEeAdMYly2Jy 8wmDKMx/m+o5FNkZ2XeYcmNLjgVoa1eLzMOvjglzTwGb9ylqNnLCACVK2F60kIhgYdk+ HAmGau2RJ89j1aQ67QsgRfmQ9QXQMm0VqQ639pTD1jue1LxJwJRk7ZTTsf/QqJaoQKs+ a70Hq+zb5WYEMeu5gUeMLTGeAvFEbA6d3liczwL0W6jtW2X5Vl8u9UDDqPG654aeAOTn +42g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=YF8GMFdoqe5hznvMm3y2/t2RPeHrqis4CldRU1rABgw=; fh=hZleMIk3Uoie8xbqbMc+vM4Ee3X4Shq6Vxm2DXP/qT8=; b=EpSXda3ygQPOe84sZpjnMrxbRN6APL4/aItMLIvpqK6q1TaqFVpC8HawV8wbmPrGeW gEr5fIVt8qkbkV60fGXmgg3ztG/DiT+bUxPIgncUk4SivOij+IFkjCJEYn6p7NU83xl1 QYv9+yT6hfNebVZpW9uwY5raK69jNTtcVdhrCw6grnoN+xxvBsTW8zJB/SXgkFLAN5pi 5CxQhJnBJMvxZieNCd7viJSqBq89SET7oEkayyCPB9TX0+PqV8zIq+zpvW9Sx9DqBUVt iS/73crIOh4FBanEsbtDAcUa7mlWBu93pMNOQ2uXiqEyoaiIzLv7g1/pblTdiNyAX/DX BDpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=QsaUCaqh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id na4-20020a17090b4c0400b00263c23a5693si10553134pjb.13.2023.10.09.08.34.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 08:34:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=QsaUCaqh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2A9158108357; Mon, 9 Oct 2023 08:34:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376553AbjJIPee (ORCPT + 99 others); Mon, 9 Oct 2023 11:34:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376478AbjJIPec (ORCPT ); Mon, 9 Oct 2023 11:34:32 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D315A8F for ; Mon, 9 Oct 2023 08:34:31 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 3998HnwY015992; Mon, 9 Oct 2023 10:34:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=PODMain02222019; bh=Y F8GMFdoqe5hznvMm3y2/t2RPeHrqis4CldRU1rABgw=; b=QsaUCaqh1Wbzs/Jt3 f+uizHqbTqVVG/3d3v3SYpbStO7gPr7zGJVJxmc4dnjHj2wXE1MrekR9+7+wzy0g 9/6u/eF+q0s7KcltCJjoWflfX16EdKiuqFPN30k9WVg+x9OOUNekPs0nmeEntNGN ySUion/ca1y/+EEEvjC5MnQ3fmwUx+liiE+7/rK6cnOrpGwLDGUEJrlUgjqF/feW mbGtAOTGWv6P9+n5nj45KDhGFX8N3NbbvALLcNqBKr5l9YhfZeTc7gsyEw9v5sGa 5QXEhl4OMq9X7cLxgw4py+XszGF0NcoTb531AV8nbSSHVeE4XTDKBwBN8j/fC6zJ 8mXnQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3tkhkc1tyh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 09 Oct 2023 10:34:18 -0500 (CDT) Received: from ediex01.ad.cirrus.com (198.61.84.80) 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.1118.37; Mon, 9 Oct 2023 16:34:16 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.37 via Frontend Transport; Mon, 9 Oct 2023 16:34:16 +0100 Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.61.65.230]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id B14D5B06; Mon, 9 Oct 2023 15:34:15 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , Richard Fitzgerald Subject: [PATCH] ASoC: cs35l56: ASP1 DOUT must default to Hi-Z when not transmitting Date: Mon, 9 Oct 2023 16:34:12 +0100 Message-ID: <20231009153412.30380-1-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: etGRMJSsjEDt_F24RyJ-U4IEtwZvHZzI X-Proofpoint-GUID: etGRMJSsjEDt_F24RyJ-U4IEtwZvHZzI X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=2.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 09 Oct 2023 08:34:41 -0700 (PDT) X-Spam-Level: ** The ASP1 DOUT line must be defaulted to be high-impedance when it is not actually transmitting data for an active channel. In non-SoundWire modes ASP1 will usually be shared by multiple amps so each amp must only drive the line during the slot for an enabled TX channel. In SoundWire mode a custom firmware can use ASP1 as a secondary chip-to-chip audio link or as GPIO. It should be defaulted to high-impedance since by default the purpose of this pin is not known. Backport note: On kernel versions before 6.6 the cs35l56->base.regmap argument to regmap_set_bits() must be changed to cs35l56->regmap. Signed-off-by: Richard Fitzgerald Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") --- sound/soc/codecs/cs35l56.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c index 8ccdd3f134a5..45b4de3eff94 100644 --- a/sound/soc/codecs/cs35l56.c +++ b/sound/soc/codecs/cs35l56.c @@ -1197,6 +1197,12 @@ int cs35l56_init(struct cs35l56_private *cs35l56) /* Registers could be dirty after soft reset or SoundWire enumeration */ regcache_sync(cs35l56->base.regmap); + /* Set ASP1 DOUT to high-impedance when it is not transmitting audio data. */ + ret = regmap_set_bits(cs35l56->base.regmap, CS35L56_ASP1_CONTROL3, + CS35L56_ASP1_DOUT_HIZ_CTRL_MASK); + if (ret) + return dev_err_probe(cs35l56->base.dev, ret, "Failed to write ASP1_CONTROL3\n"); + cs35l56->base.init_done = true; complete(&cs35l56->init_completion); -- 2.30.2