From nobody Sat Nov 30 16:31:48 2024 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 833121D8E1E; Tue, 26 Nov 2024 16:45:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732639516; cv=none; b=s0Ybwuu9Ka0eqjzNlXaAhaAHBnrW5n1VqV1HuSbBsR3KIbwWHQY5n9SKeJEWiHwCWhSWi05l95vRJ9KtvZgNioP1lboGDssb3Ui2QKo4AfJKRAM3HxgmEvd9LlSc9KuMmJiZicjRBjcNsVbYasG1LwHsoEwb8jxTq2kTV9LUAWw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732639516; c=relaxed/simple; bh=khRN4s58tWHnZ8JZzMUG8MRVrkfMP+cl/uKoXkmgylk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BzsglqtTAG0VUyG97E1YIWHFC8+HBkeCtyoi+Gawf+4f1I2go6w8bF+tV+q+lXt4ilJCF9jTamP1by5/7XL1rtlnMpL6lNUPdwFPRcpK7fZAggNzthoubLdWPYlYhu5oJcnXyVTjJYGv1jv7kZ3T97LJRN/gymqunCJl0R9Emww= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=DnQYNNIp; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="DnQYNNIp" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AQDjDoO032291; Tue, 26 Nov 2024 16:44:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= i147ChdZnlEZdK4XlMeJAHpSdB9mk5quIXMEE6428gw=; b=DnQYNNIpyknMkofp pwqzGkYfH/06ZxDVNYNExyssnM97YZeyJMGFnqcFdnmx0O8KxLHQd5DEMok1vBQN fV9Nt6CeCe0NpY7ZBFIpjTPU1vXbW44QxQGFhwYA7NQp31FB9QdGjzhJLnRyoKZ4 yHpi7zN0/9zKmyLRO8u2blLYYND/Z10ZvUQRB/tZNCQVcSOhrX4koojEjYiTu8VL hz0SWXIOFa5xXNHaGlFkvE6ua2Uy4pSmD22361jgHhmwaYQMAinFejqUugzdwSZY FiQM4QxteKvQJLMdDkX97YcgQQzxboTFQ/81jOzxRNFP2UPID+boTbsAA83KAU96 qZfkaw== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 435ffyre9t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Nov 2024 16:44:45 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4AQGiiAP008216 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 26 Nov 2024 16:44:44 GMT Received: from hu-mohs-hyd.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 26 Nov 2024 08:44:36 -0800 From: Mohammad Rafi Shaik To: Srinivas Kandagatla , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul , Bard Liao , Jaroslav Kysela , "Takashi Iwai" CC: Pierre-Louis Bossart , Sanyog Kale , , , , , , , Mohammad Rafi Shaik Subject: [PATCH v3 2/5] ASoC: dt-bindings: wcd937x-sdw: Add static channel mapping support Date: Tue, 26 Nov 2024 22:12:57 +0530 Message-ID: <20241126164300.3305903-3-quic_mohs@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241126164300.3305903-1-quic_mohs@quicinc.com> References: <20241126164300.3305903-1-quic_mohs@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: HU-5G5kmbhB3XH0Y4aOmGjio1-w08qwZ X-Proofpoint-ORIG-GUID: HU-5G5kmbhB3XH0Y4aOmGjio1-w08qwZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 bulkscore=0 lowpriorityscore=0 spamscore=0 impostorscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 adultscore=0 phishscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411260134 Content-Type: text/plain; charset="utf-8" Add static channel mapping between master and slave rx/tx ports for Qualcomm wcd937x soundwire codec. Currently, the channel map index value for each soundwire port is hardcoded in the wcd937x-sdw driver, and the same channel map index value is configured in the soundwire master. The Qualcomm board like the QCM6490-IDP require static channel map settings for the soundwire master and slave ports. If another boards which are using enable wcd937x, the channel mapping index values between master and slave may be different depending on the board hw design and requirements. If the above properties are not used in a SoC specific device tree, the channel mapping index values are set to default. With the introduction of the following channel mapping properties, it is now possible to configure the master channel mapping directly from the device tree. The qcom,tx-channel-mapping property specifies the static channel mapping between the slave and master tx ports in the order of slave port channels which is adc1, adc2, adc3, adc4, dmic0, dmic1, mbhc, dmic2, dmic3, dmci4, dmic5, dmic6, dmic7. The qcom,rx-channel-mapping property specifies the static channel mapping between the slave and master rx ports in the order of slave port channels which is hph_l, hph_r, clsh, comp_l, comp_r, lo, dsd_r, dsd_l. Signed-off-by: Mohammad Rafi Shaik --- .../bindings/sound/qcom,wcd937x-sdw.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/qcom,wcd937x-sdw.yaml = b/Documentation/devicetree/bindings/sound/qcom,wcd937x-sdw.yaml index d3cf8f59cb23..7893b1c1f80b 100644 --- a/Documentation/devicetree/bindings/sound/qcom,wcd937x-sdw.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,wcd937x-sdw.yaml @@ -58,6 +58,44 @@ properties: items: enum: [1, 2, 3, 4, 5] =20 + qcom,tx-channel-mapping: + description: | + Specifies static channel mapping between slave and master tx port + channels. + In the order of slave port channels which is adc1, adc2, adc3, + dmic0, dmic1, mbhc, dmic2, dmic3, dmci4, dmic5, dmic6, dmic7. + The channel map index values are fixed values. + SWRM_CH1 =3D=3D> 1 + SWRM_CH2 =3D=3D> 2 + SWRM_CH3 =3D=3D> 4 + SWRM_CH4 =3D=3D> 8 + + $ref: /schemas/types.yaml#/definitions/uint8-array + minItems: 12 + maxItems: 12 + additionalItems: false + items: + enum: [1, 2, 4, 8] + + qcom,rx-channel-mapping: + description: | + Specifies static channels mapping between slave and master rx port + channels. + In the order of slave port channels, which is + hph_l, hph_r, clsh, comp_l, comp_r, lo, dsd_r, dsd_l. + The channel map index values are fixed values. + SWRM_CH1 =3D=3D> 1 + SWRM_CH2 =3D=3D> 2 + SWRM_CH3 =3D=3D> 4 + SWRM_CH4 =3D=3D> 8 + + $ref: /schemas/types.yaml#/definitions/uint8-array + minItems: 8 + maxItems: 8 + additionalItems: false + items: + enum: [1, 2, 4, 8] + required: - compatible - reg @@ -66,6 +104,9 @@ additionalProperties: false =20 examples: - | + + #include + soundwire@3210000 { reg =3D <0x03210000 0x2000>; #address-cells =3D <2>; @@ -74,6 +115,9 @@ examples: compatible =3D "sdw20217010a00"; reg =3D <0 4>; qcom,rx-port-mapping =3D <1 2 3 4 5>; + qcom,rx-channel-mapping =3D /bits/ 8 ; }; }; =20 @@ -85,6 +129,10 @@ examples: compatible =3D "sdw20217010a00"; reg =3D <0 3>; qcom,tx-port-mapping =3D <2 2 3 4>; + qcom,tx-channel-mapping =3D /bits/ 8 ; }; }; =20 --=20 2.25.1