From nobody Fri Dec 19 15:48:42 2025 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7C7C267B94 for ; Mon, 19 May 2025 09:54:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747648497; cv=none; b=fFePgzOIXaWbF79IYb8QL4HHWcJBJj+YN1y1kpuvP+c5xuW0rfMZV4HiBWDwTqSyOLzDMMgdff0TB8z4gs92OA0QRkeD+GrMo6O2J8o4xs5/abP/KT9P7eLqm5U1A8T8wUyYFBppfd27ksH1S2YW6EyQuJs051jAjJRYbuq2cPE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747648497; c=relaxed/simple; bh=5IzQO2W9y3AReFkI22LxozTjcVm+6tQWchN1ofB7LYU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=q8pbdbJ0OqmeobRm+J2PRhtcU4rloVDk07WzLnXgzIyW0ipg3Mea+vNwVHhDq8FwluG2m4ztBXUtmU6PWCL6CyTCNXxRSIm03tgILVzVqB1Hz6QF860z/4upqv/S9a1ZRuk2JyT6dGhkwPoZgxrkkVgbsG97wH0cY2yQAYwamoo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=XdPqcYHT; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XdPqcYHT" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-3a365bc0af8so262996f8f.3 for ; Mon, 19 May 2025 02:54:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747648490; x=1748253290; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=JTY2lLHiJfzC0bXx0w26HcpCndBQvAil7DOu/C1/+Wk=; b=XdPqcYHTERVBAF6L4AxBC4QtKOb6ljZPB4rSzGl+jPA0n+9Q3A3tHZMolm+38AhA9X nzygoAVKYgprNhken7LUdQD2l4p5dvLitrskCPYcpMwGZ3KqZi/O9c8K8VLR4x4PGcWl 0fg+YzFTvp/quuRZQpyCxWDbPh+qSeA5u8SOmKwkuJvTZz0mobmwXCXoV4WQGwFrMeh9 tfQ8lRQA2+4JlsDVRuBgpJnFMjIaszDp5+5j0NHKku/Gs6UBSQ/VmDiBPNs3e0HHdQf/ C1e1M1+iv2MOPB/QU3uoNuAD7Z0eU6BuCVJRn4OwjkLYjt9SuEbi+MYaAZU/8ixdORZI aWqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747648490; x=1748253290; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JTY2lLHiJfzC0bXx0w26HcpCndBQvAil7DOu/C1/+Wk=; b=IhZEbPtr9Cx1vD+EUUKqLWYDEIl3k0gKy9LfZ1juLVvkOawo9/Q/S7xGRBTx42Vo0E EbJzgHjkLTnYFBE5nPo9eqBCajeaKnkYHx9tPEXNM3+zNKqF4neqLJ7tgWrvV2kaJ7F0 RBqmF9nC8gQ9KxhZz0PvfUBuyaHxjXBndyx5fUTFAlL8ZusmYnSpvOqMkGAmRoCi4mAu Oz2695dwzHjdLdYV75e2SgUS4H6N1ekbABRD0Y4ZRJBtRZWXxcvSoCXIG8Um6qKcp0VX wzD8ddrdFq/YgxnRvIHLTOy6xkUYyAZQaTvU/FqVdWxaIh4+w+C/v23cSKL9iGZ+c0eD 0pMg== X-Forwarded-Encrypted: i=1; AJvYcCU6SzClJyZTRbvhAAeRLgf2rVIO0vBa1N+c0x57bUrckTL0IB3rcTTzUDpi26uGjaDyexJwmPgbC1M1fic=@vger.kernel.org X-Gm-Message-State: AOJu0YyJJ3iT9oR7fKm6lDd8jOvR03UHPEXgaYHzUNfePQL0qC2TM/6r uCNBdntKQ4TOsjeFeyWPVEwAbiR14RHo5G1ywpuhBpvhmFhaQROu7yl/eI3Br8vqoZiCURUJuQU 5cfUH X-Gm-Gg: ASbGnctM/aFSN2HoF9CE1rPoxtwHbgglB23UfYHeHt57na4L2o+8A5nWzkzWkS67vT9 8UTNveFODnGlC3i+k4h+dKKKsPf2bpcTM7hcKk+TC+mx0pAoPyDVWOCqIMoPshCIVzGejvaJm1F 7EJlziCUn34BZhG+dKxx4lAQ61vheND6QKhbgI0xe4HR2sYsOFemMufxDFbnIMQvbCtEyeoIbZC KoxGVTqjV2MD8xPJTuQlV1TpaC61mVHAgm2Vq/JhPVbCHrxO0b/K53QOctsjOBG1i9mywoMhYRM lnx9KE+hWN7NE5m/yBDZAepMV/uBOHeiS9RK2rwJqK3noa3Szr6JOghYYNP5/UAPQOovkBhmEvk QM/ayFw== X-Google-Smtp-Source: AGHT+IGcmqizIC0RoKHIp6SBn8x9mgarafCXx814XBWhIc2c1OVtjGEWpNh7ym9DuOgvgXLvh/0Xug== X-Received: by 2002:a5d:5988:0:b0:3a3:6a77:3388 with SMTP id ffacd0b85a97d-3a36a7737c4mr1496447f8f.10.1747648490556; Mon, 19 May 2025 02:54:50 -0700 (PDT) Received: from [192.168.1.29] ([178.197.223.125]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a35ca4d0fasm12282616f8f.8.2025.05.19.02.54.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 02:54:50 -0700 (PDT) From: Krzysztof Kozlowski Date: Mon, 19 May 2025 11:54:43 +0200 Subject: [PATCH v2 1/2] arm64: dts: qcom: sm8750: Add Soundwire nodes Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250519-sm8750-audio-part-2-v2-1-5ac5afdf4ee2@linaro.org> References: <20250519-sm8750-audio-part-2-v2-0-5ac5afdf4ee2@linaro.org> In-Reply-To: <20250519-sm8750-audio-part-2-v2-0-5ac5afdf4ee2@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=7128; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=5IzQO2W9y3AReFkI22LxozTjcVm+6tQWchN1ofB7LYU=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBoKv/m8MEHcTmdAvrWGeUyuEm5df6vR+xCbhdBs m1DIco4OYKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaCr/5gAKCRDBN2bmhouD 14cND/4vjfmKdTCRmqPwvghESR3N6nWv3AVn3Us/+MpHz7LkElmPcCXuNxese2h1wohQcre1bcf zXaaDDy1x38W+Qd3FWiSfYJ13sqF4uuTwzecIhDlLymK1md9TdXcrvasDyR1S1iNNqnVImiSt+z DhOWPjYzQP80o5HPt+1TNvx5vYSbSqwtkIpynu1w7hAgZ13goXwo68jF44btDo6t4xWg9lknlsP /U5IqCkbiOsIcd0w2kCDQRbIau47AGyTFd1UZMeIbUSMw+LE7TopzJYQs2t7iZ7mUm1SQ1ubU0G p8Er6jCTH6DSAUGcNcx+HWKxIt/hRLA+aH4DNjOB3s4SLwtTl3Yy1CjDoT6OegKS0DTEIiTHXhV c9stupxWesdVOA/dkoiWxkM4zXU0k1dwZU4OtFW6Sz+RZPfA8F6rBeD5tqCen+cti3MrYnpGjD8 QopunImGM+KMdbu82j+IKu74yz16Zv9EBAPWFFRWX6Iwzr3WHhniXXBk5GzbSf6UgJxMEYRka3l uPHwtvDCzOXuhknpfjCMOWia26r/1RA0bWJ59ZyJbNn/I/AZbqaM5HZUlFkub+PAYY6Xs8449GI fJcuYyXRGt1u/6Nui0B/orSDTXsg5T4pvcs6/du0JCFAfvIo8SLb1mhj+qZAPPi3YHrw21zHpza 4S9ZrClH+tWd2SA== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Add Soundwire controllers on SM8750, fully compatible with earlier SM8650 generation. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8750.dtsi | 122 +++++++++++++++++++++++++++++++= ++++ 1 file changed, 122 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8750.dtsi b/arch/arm64/boot/dts/qco= m/sm8750.dtsi index 149d2ed17641a085d510f3a8eab5a96304787f0c..68ea48854c61b3aed6e089afaeb= e9edba7a1475f 100644 --- a/arch/arm64/boot/dts/qcom/sm8750.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8750.dtsi @@ -2257,6 +2257,36 @@ lpass_wsa2macro: codec@6aa0000 { #sound-dai-cells =3D <1>; }; =20 + swr3: soundwire@6ab0000 { + compatible =3D "qcom,soundwire-v2.1.0", "qcom,soundwire-v2.0.0"; + reg =3D <0x0 0x06ab0000 0x0 0x10000>; + interrupts =3D ; + clocks =3D <&lpass_wsa2macro>; + clock-names =3D "iface"; + label =3D "WSA2"; + + pinctrl-0 =3D <&wsa2_swr_active>; + pinctrl-names =3D "default"; + + qcom,din-ports =3D <4>; + qcom,dout-ports =3D <9>; + + qcom,ports-sinterval =3D /bits/ 16 <0x07 0x1f 0x3f 0x07 0x1f 0x3f 0x18= f 0x18f 0x18f 0x0f 0x0f 0xff 0x31f>; + qcom,ports-offset1 =3D /bits/ 8 <0x01 0x03 0x05 0x02 0x04 0x15 0x00 0x= 00 0x00 0x06 0x0d 0xff 0x00>; + qcom,ports-offset2 =3D /bits/ 8 <0xff 0x07 0x1f 0xff 0x07 0x1f 0xff 0x= ff 0xff 0xff 0xff 0xff 0xff>; + qcom,ports-hstart =3D /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0x0= e 0x0e 0xff 0xff 0xff 0x0f>; + qcom,ports-hstop =3D /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0x0e= 0x0e 0xff 0xff 0xff 0x0f>; + qcom,ports-word-length =3D /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08= 0x0f 0x0f 0x00 0xff 0xff 0x18>; + qcom,ports-block-pack-mode =3D /bits/ 8 <0x00 0x01 0x01 0x00 0x01 0x01 = 0x00 0x01 0x01 0x01 0x01 0x00 0x00>; + qcom,ports-block-group-count =3D /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xf= f 0xff 0x00 0x00 0xff 0xff 0xff 0xff>; + qcom,ports-lane-control =3D /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0xf= f 0x00 0x00 0xff 0xff 0xff 0xff>; + + #address-cells =3D <2>; + #size-cells =3D <0>; + #sound-dai-cells =3D <1>; + status =3D "disabled"; + }; + lpass_rxmacro: codec@6ac0000 { compatible =3D "qcom,sm8750-lpass-rx-macro", "qcom,sm8550-lpass-rx-macr= o"; reg =3D <0x0 0x06ac0000 0x0 0x1000>; @@ -2274,6 +2304,36 @@ lpass_rxmacro: codec@6ac0000 { #sound-dai-cells =3D <1>; }; =20 + swr1: soundwire@6ad0000 { + compatible =3D "qcom,soundwire-v2.1.0", "qcom,soundwire-v2.0.0"; + reg =3D <0x0 0x06ad0000 0x0 0x10000>; + interrupts =3D ; + clocks =3D <&lpass_rxmacro>; + clock-names =3D "iface"; + label =3D "RX"; + + pinctrl-0 =3D <&rx_swr_active>; + pinctrl-names =3D "default"; + + qcom,din-ports =3D <1>; + qcom,dout-ports =3D <11>; + + qcom,ports-sinterval =3D /bits/ 16 <0x03 0x3f 0x1f 0x07 0x00 0x18f 0xf= f 0xff 0x31 0xff 0xff 0xff>; + qcom,ports-offset1 =3D /bits/ 8 <0x00 0x00 0x0b 0x01 0x00 0x00 0xff 0x= ff 0x00 0xff 0xff 0xff>; + qcom,ports-offset2 =3D /bits/ 8 <0x00 0x00 0x0b 0x00 0x00 0x00 0xff 0x= ff 0x00 0xff 0xff 0xff>; + qcom,ports-hstart =3D /bits/ 8 <0xff 0x03 0xff 0xff 0xff 0x08 0xff 0xf= f 0x00 0xff 0xff 0xff>; + qcom,ports-hstop =3D /bits/ 8 <0xff 0x06 0xff 0xff 0xff 0x08 0xff 0xff= 0x0f 0xff 0xff 0xff>; + qcom,ports-word-length =3D /bits/ 8 <0x01 0x07 0x04 0xff 0xff 0x0f 0xff= 0xff 0x18 0xff 0xff 0xff>; + qcom,ports-block-pack-mode =3D /bits/ 8 <0xff 0x00 0x01 0xff 0xff 0x00 = 0xff 0xff 0x01 0xff 0xff 0xff>; + qcom,ports-block-group-count =3D /bits/ 8 <0xff 0xff 0xff 0xff 0x00 0x0= 0 0xff 0xff 0x00 0xff 0xff 0xff>; + qcom,ports-lane-control =3D /bits/ 8 <0x01 0x00 0x00 0x00 0x00 0x00 0xf= f 0xff 0x01 0xff 0xff 0xff>; + + #address-cells =3D <2>; + #size-cells =3D <0>; + #sound-dai-cells =3D <1>; + status =3D "disabled"; + }; + lpass_txmacro: codec@6ae0000 { compatible =3D "qcom,sm8750-lpass-tx-macro", "qcom,sm8550-lpass-tx-macr= o"; reg =3D <0x0 0x06ae0000 0x0 0x1000>; @@ -2308,6 +2368,36 @@ lpass_wsamacro: codec@6b00000 { #sound-dai-cells =3D <1>; }; =20 + swr0: soundwire@6b10000 { + compatible =3D "qcom,soundwire-v2.1.0", "qcom,soundwire-v2.0.0"; + reg =3D <0x0 0x06b10000 0x0 0x10000>; + interrupts =3D ; + clocks =3D <&lpass_wsamacro>; + clock-names =3D "iface"; + label =3D "WSA"; + + pinctrl-0 =3D <&wsa_swr_active>; + pinctrl-names =3D "default"; + + qcom,din-ports =3D <4>; + qcom,dout-ports =3D <9>; + + qcom,ports-sinterval =3D /bits/ 16 <0x07 0x1f 0x3f 0x07 0x1f 0x3f 0x18= f 0x18f 0x18f 0x0f 0x0f 0xff 0x31f>; + qcom,ports-offset1 =3D /bits/ 8 <0x01 0x03 0x05 0x02 0x04 0x15 0x00 0x= 00 0x00 0x06 0x0d 0xff 0x00>; + qcom,ports-offset2 =3D /bits/ 8 <0xff 0x07 0x1f 0xff 0x07 0x1f 0xff 0x= ff 0xff 0xff 0xff 0xff 0xff>; + qcom,ports-hstart =3D /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0x0= e 0x0e 0xff 0xff 0xff 0x0f>; + qcom,ports-hstop =3D /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08 0x0e= 0x0e 0xff 0xff 0xff 0x0f>; + qcom,ports-word-length =3D /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0x08= 0x0f 0x0f 0x00 0xff 0xff 0x18>; + qcom,ports-block-pack-mode =3D /bits/ 8 <0x00 0x01 0x01 0x00 0x01 0x01 = 0x00 0x01 0x01 0x01 0x01 0x00 0x00>; + qcom,ports-block-group-count =3D /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xf= f 0xff 0x00 0x00 0xff 0xff 0xff 0xff>; + qcom,ports-lane-control =3D /bits/ 8 <0xff 0xff 0xff 0xff 0xff 0xff 0xf= f 0x00 0x00 0xff 0xff 0xff 0xff>; + + #address-cells =3D <2>; + #size-cells =3D <0>; + #sound-dai-cells =3D <1>; + status =3D "disabled"; + }; + lpass_ag_noc: interconnect@7e40000 { compatible =3D "qcom,sm8750-lpass-ag-noc"; reg =3D <0x0 0x07e40000 0x0 0xe080>; @@ -2329,6 +2419,38 @@ lpass_lpicx_noc: interconnect@7420000 { #interconnect-cells =3D <2>; }; =20 + swr2: soundwire@7630000 { + compatible =3D "qcom,soundwire-v2.1.0", "qcom,soundwire-v2.0.0"; + reg =3D <0x0 0x07630000 0x0 0x10000>; + interrupts =3D , + ; + interrupt-names =3D "core", "wakeup"; + clocks =3D <&lpass_txmacro>; + clock-names =3D "iface"; + label =3D "TX"; + + pinctrl-0 =3D <&tx_swr_active>; + pinctrl-names =3D "default"; + + qcom,din-ports =3D <4>; + qcom,dout-ports =3D <0>; + + qcom,ports-sinterval-low =3D /bits/ 8 <0x01 0x01 0x03 0x03>; + qcom,ports-offset1 =3D /bits/ 8 <0x00 0x00 0x01 0x01>; + qcom,ports-offset2 =3D /bits/ 8 <0x00 0x00 0x00 0x00>; + qcom,ports-hstart =3D /bits/ 8 <0xff 0xff 0xff 0xff>; + qcom,ports-hstop =3D /bits/ 8 <0xff 0xff 0xff 0xff>; + qcom,ports-word-length =3D /bits/ 8 <0xff 0xff 0xff 0xff>; + qcom,ports-block-pack-mode =3D /bits/ 8 <0xff 0xff 0xff 0xff>; + qcom,ports-block-group-count =3D /bits/ 8 <0xff 0xff 0xff 0xff>; + qcom,ports-lane-control =3D /bits/ 8 <0x01 0x02 0x00 0x00>; + + #address-cells =3D <2>; + #size-cells =3D <0>; + #sound-dai-cells =3D <1>; + status =3D "disabled"; + }; + lpass_vamacro: codec@7660000 { compatible =3D "qcom,sm8750-lpass-va-macro", "qcom,sm8550-lpass-va-macr= o"; reg =3D <0x0 0x07660000 0x0 0x2000>; --=20 2.45.2 From nobody Fri Dec 19 15:48:42 2025 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E704720126A for ; Mon, 19 May 2025 09:54:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747648496; cv=none; b=Yt6g7ZU3p9wzdGtABzl6qINyJI9su9QOYOzovQGhLE9h1N4/8juqjJQkiMFo8L9oj+SW9SExEL8Sdv60Cm8aSvDn3roYAuJ899k51Fc9smZKBpjc8OxjMQjhbQBXofqKaXyj2VLW84PEWY+6BkOc+1ubskBFS37OUNQw2ezDJSs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747648496; c=relaxed/simple; bh=V8Ru47Fo4tyHI/L6MUoUu/hhtuHkBv+MS4v17qwIbxk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TbNZ2CKsDvK21MGHpHyQwnmhK1XCKx9cxnIQb1ie/o4/cc+w61A0VDvpKQ7RIwXkx14mUp4cDx97R4aEcwNdwCebUmp+7HIwwxpDgXvfDLW9Frd4/bzswdZdmu6MMQ5eJgxD+XGsaZ0GeCbHRCZv5vmwJvekRAo+DqqzDz1xUFU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=sK5Ngv5d; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sK5Ngv5d" Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-3a364d442e0so350644f8f.2 for ; Mon, 19 May 2025 02:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747648492; x=1748253292; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=UqqCqfFZRXOEhpkUS7pSky/TNFachoRi43aCuktKstc=; b=sK5Ngv5dFoBXgWPVp+wQIMfjDacVC3eIpENpcyzNMvH/BqMWuJDPWdojNLnIiJU7Vy 0WhSe1rDdzfMwi1tzraf21GPFUDIHYVO03r8OhpeYCFQxwN3j1C1WglpBp84UMIhFAt2 pSCn2DN9GFVOsaYAG9Zl4GIKAFS9CA5CLMXaI73mZHmBCHAKHX8qfWGMrOTZYogsFIxI ygZZTTtrSSpULfMrp535z8qzPT1JvuVapd0l8mAajjpy3mL/kIEoRrTfTXh2fU2qPb6S BYcLFPnGPJvrBzy58v8wlG5C2CbfpGYaRCnEDkpTfJeNL/gjC1/GZboRzTCFh7uhA+eV KWkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747648492; x=1748253292; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UqqCqfFZRXOEhpkUS7pSky/TNFachoRi43aCuktKstc=; b=i5pM9zbzrN3C4DmZHTIcQdvFR7+v2W0z6dLAGercefnf6cd9yLeJzoKTcRyw0tqlEo sQMplRThWcw43c/7pJlXCfJuMlgm6AaI2xVP8gVEEFfg6TebbOqfQQ3Nz76E7abGJOjH NRPy+V9WCQoNX/YauyaUPYvELOaq+CyWupl89oU844uCGBEtNFXA803A6wpaNgS7UofM cPDyqFR6BPWnYzjuVr6zVb9kzxCAZCctce2UHFW7U2ftUeCJ5cb2rq+y77LRRbvr+DPa 2pTBl0Te5iQTK+bFU7bIw2oxoteN1/OUnxmU8gewO03gnA1CzcDkKrxHoUC1TK73tP/e 7XHQ== X-Forwarded-Encrypted: i=1; AJvYcCXO5gtm0hbgrbPiIyHN7KSzh00LPH+/6Uji3wdCruqNoLvi4AvUBiSZ5vDHpfPkkjbDYBwtz9/8cmkMNas=@vger.kernel.org X-Gm-Message-State: AOJu0YwJWTxWYpUuUKiz9IkJ/esIxhDQ964h6yMHhEE5/9iC1Hy48npU d/L2lKpMuhwzcRfQkecShyN0can/2407sAf2NE4qjVE1MKF+2NveH/Rl8QV2kdWqiIVveZAIb9j LQogI X-Gm-Gg: ASbGncuWzNprIpiSk6Ok9+Pjb2I3rrOWN0Fbtom3wFRbNSDfXNjFtWRHLEg+nYJqhDh jG5oRuDvq+BB2am3zybQHqCKQFMeu6QIkR4Wfe0lySBoBv3mM4YC16a/FrfjFmaH3RZSgwE9Q0H y4UKLUeZU7PArfrVRr0BV8UdTPmc045f7y72iVB16QGhxLd2V3f0nEcvoDKRpyDXXzNuYv81UDV Z58aO0jV+KTU9NX4XQeT5XURjkHvZdLvpQwaZ+GuiY3JT60tSSQVd82hdI42twV3z6xy27oxUav PaTnYys6Cs/tV80Vm8QEZ4KLxSBvKDKJz99x2O6F8c/jWYPLEVD7MxfWyo7bSNegVL5ccv0= X-Google-Smtp-Source: AGHT+IEn/hlJirgfwgYmAu3I7CImPjVfABma024DDXhy3tyFKMjkzkAKBAqXynPTpjIsJIkbrexjDw== X-Received: by 2002:a05:6000:438a:b0:3a3:75ea:f9d3 with SMTP id ffacd0b85a97d-3a375eafce5mr354609f8f.11.1747648491756; Mon, 19 May 2025 02:54:51 -0700 (PDT) Received: from [192.168.1.29] ([178.197.223.125]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a35ca4d0fasm12282616f8f.8.2025.05.19.02.54.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 02:54:51 -0700 (PDT) From: Krzysztof Kozlowski Date: Mon, 19 May 2025 11:54:44 +0200 Subject: [PATCH v2 2/2] arm64: dts: qcom: sm8750-mtp: Add sound (speakers, headset codec, dmics) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250519-sm8750-audio-part-2-v2-2-5ac5afdf4ee2@linaro.org> References: <20250519-sm8750-audio-part-2-v2-0-5ac5afdf4ee2@linaro.org> In-Reply-To: <20250519-sm8750-audio-part-2-v2-0-5ac5afdf4ee2@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=6636; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=V8Ru47Fo4tyHI/L6MUoUu/hhtuHkBv+MS4v17qwIbxk=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBoKv/nBOdHYgHix3bFwSOiZEOMBHbyc1/NkyPzq PFXliyDdUSJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCaCr/5wAKCRDBN2bmhouD 13sDEACAicYxV+J+bZzFxQ9W/wCNWuzug91257AlHH0jsRrl7nkHCXWF/9pm/pIdS9W8fydcWLP VKBsBsO3yfA4TziBMWrLGpwwFAZpjL/1ZdNQEBZcz2I4CSv0cOQsRGsdIT0PzNav5MjFh7hBAxC /LVrg/5+XOZeGS+74cjkFRqqN6oOwegTfLDKKctayVnDdz+01nci4hnEYk+eZMD21nXuzL12K+m bt0CVVOUWZj/ZjvqsaF7oZC1slD23VV8mNDbnGPFe/5S+pfA1ZdTyTZo247gZySV/rvinuawaQY B5w9RBqjimm/f73/vAbLx7YrpXQZnUifq4ZNcbFk8w/Uyan9v/zx25wD74tBi0g5B9MOXL/hirt 6y65RCC1obS1d9a5YMIsds0cR5/eAh0i3KkYE3ogHNmE7Zt7fS/HbzGHDJCJIt7y+LTf0d1KyHM RrAzXPtxYUbmoAlt9MdU+JXtSYWvfgZYxWrPVI7myWVoZ/2dgbLurn0AtCU/QcOB8zYhCvh8BD+ o5h6oZrMQ/LYCmacCn8/diYGnnAMlldWnbINqyH7ZZJ1DkpRULgbikGCM2+cEmRbSE+/OlMIKRo eJIKpugIV4sbfN4i/GutNzZe8WOoGLK5omwaSH9G7L8TcLDi2bJHIwc3BAEE3avEr6KORwjlfXn MulTpAOuC8KvsvQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Add device nodes for most of the sound support - WSA883x smart speakers, WCD9395 audio codec (headset) and sound card - which allows sound playback via speakers and recording via DMIC microphones. Changes bring necessary foundation for headset playback/recording via USB, but that part is not yet ready. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8750-mtp.dts | 214 ++++++++++++++++++++++++++++= ++++ 1 file changed, 214 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8750-mtp.dts b/arch/arm64/boot/dts/= qcom/sm8750-mtp.dts index 72f081a890dfe49bfbee5e91b9e51da53b9d8baf..a5a791f039b240ee9922371f43f= 3aa98b32b00f0 100644 --- a/arch/arm64/boot/dts/qcom/sm8750-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8750-mtp.dts @@ -29,6 +29,32 @@ aliases { serial0 =3D &uart7; }; =20 + wcd939x: audio-codec { + compatible =3D "qcom,wcd9395-codec", "qcom,wcd9390-codec"; + + pinctrl-0 =3D <&wcd_default>; + pinctrl-names =3D "default"; + + qcom,micbias1-microvolt =3D <1800000>; + qcom,micbias2-microvolt =3D <1800000>; + qcom,micbias3-microvolt =3D <1800000>; + qcom,micbias4-microvolt =3D <1800000>; + qcom,mbhc-buttons-vthreshold-microvolt =3D <75000 150000 237000 500000 5= 00000 500000 500000 500000>; + qcom,mbhc-headset-vthreshold-microvolt =3D <1700000>; + qcom,mbhc-headphone-vthreshold-microvolt =3D <50000>; + qcom,rx-device =3D <&wcd_rx>; + qcom,tx-device =3D <&wcd_tx>; + + reset-gpios =3D <&tlmm 101 GPIO_ACTIVE_LOW>; + + vdd-buck-supply =3D <&vreg_l15b_1p8>; + vdd-rxtx-supply =3D <&vreg_l15b_1p8>; + vdd-io-supply =3D <&vreg_l15b_1p8>; + vdd-mic-bias-supply =3D <&vreg_bob1>; + + #sound-dai-cells =3D <1>; + }; + chosen { stdout-path =3D "serial0:115200n8"; }; @@ -81,6 +107,89 @@ key-volume-up { }; }; =20 + sound { + compatible =3D "qcom,sm8750-sndcard", "qcom,sm8450-sndcard"; + model =3D "SM8750-MTP"; + audio-routing =3D "SpkrLeft IN", "WSA_SPK1 OUT", + "SpkrRight IN", "WSA_SPK2 OUT", + "IN1_HPHL", "HPHL_OUT", + "IN2_HPHR", "HPHR_OUT", + "AMIC2", "MIC BIAS2", + "VA DMIC0", "MIC BIAS3", /* MIC4 on schematics */ + "VA DMIC1", "MIC BIAS3", /* MIC1 on schematics */ + "VA DMIC2", "MIC BIAS1", + "VA DMIC3", "MIC BIAS1", + "VA DMIC0", "VA MIC BIAS3", + "VA DMIC1", "VA MIC BIAS3", + "VA DMIC2", "VA MIC BIAS1", + "VA DMIC3", "VA MIC BIAS1", + "TX SWR_INPUT1", "ADC2_OUTPUT"; + + wcd-playback-dai-link { + link-name =3D "WCD Playback"; + + codec { + sound-dai =3D <&wcd939x 0>, <&swr1 0>, <&lpass_rxmacro 0>; + }; + + cpu { + sound-dai =3D <&q6apmbedai RX_CODEC_DMA_RX_0>; + }; + + platform { + sound-dai =3D <&q6apm>; + }; + }; + + wcd-capture-dai-link { + link-name =3D "WCD Capture"; + + codec { + sound-dai =3D <&wcd939x 1>, <&swr2 0>, <&lpass_txmacro 0>; + }; + + cpu { + sound-dai =3D <&q6apmbedai TX_CODEC_DMA_TX_3>; + }; + + platform { + sound-dai =3D <&q6apm>; + }; + }; + + wsa-dai-link { + link-name =3D "WSA Playback"; + + codec { + sound-dai =3D <&left_spkr>, <&right_spkr>, <&swr0 0>, <&lpass_wsamacro= 0>; + }; + + cpu { + sound-dai =3D <&q6apmbedai WSA_CODEC_DMA_RX_0>; + }; + + platform { + sound-dai =3D <&q6apm>; + }; + }; + + va-dai-link { + link-name =3D "VA Capture"; + + codec { + sound-dai =3D <&lpass_vamacro 0>; + }; + + cpu { + sound-dai =3D <&q6apmbedai VA_CODEC_DMA_TX_0>; + }; + + platform { + sound-dai =3D <&q6apm>; + }; + }; + }; + vph_pwr: vph-pwr-regulator { compatible =3D "regulator-fixed"; =20 @@ -702,6 +811,14 @@ vreg_l7n_3p3: ldo7 { }; }; =20 +&lpass_vamacro { + pinctrl-0 =3D <&dmic01_default>, <&dmic23_default>; + pinctrl-names =3D "default"; + + vdd-micb-supply =3D <&vreg_l1b_1p8>; + qcom,dmic-sample-rate =3D <4800000>; +}; + &pm8550_flash { status =3D "okay"; =20 @@ -806,6 +923,74 @@ &remoteproc_mpss { status =3D "fail"; }; =20 +&swr0 { + status =3D "okay"; + + /* WSA883x, left/front speaker */ + left_spkr: speaker@0,1 { + compatible =3D "sdw10217020200"; + reg =3D <0 1>; + pinctrl-0 =3D <&spkr_0_sd_n_active>; + pinctrl-names =3D "default"; + powerdown-gpios =3D <&lpass_tlmm 17 GPIO_ACTIVE_LOW>; + #sound-dai-cells =3D <0>; + sound-name-prefix =3D "SpkrLeft"; + #thermal-sensor-cells =3D <0>; + vdd-supply =3D <&vreg_l15b_1p8>; + }; + + /* WSA883x, right/back speaker */ + right_spkr: speaker@0,2 { + compatible =3D "sdw10217020200"; + reg =3D <0 2>; + pinctrl-0 =3D <&spkr_1_sd_n_active>; + pinctrl-names =3D "default"; + powerdown-gpios =3D <&lpass_tlmm 18 GPIO_ACTIVE_LOW>; + #sound-dai-cells =3D <0>; + sound-name-prefix =3D "SpkrRight"; + #thermal-sensor-cells =3D <0>; + vdd-supply =3D <&vreg_l15b_1p8>; + }; +}; + +&swr1 { + status =3D "okay"; + + /* WCD9395 RX */ + wcd_rx: codec@0,4 { + compatible =3D "sdw20217010e00"; + reg =3D <0 4>; + + /* + * WCD9395 RX Port 1 (HPH_L/R) <=3D> SWR1 Port 1 (HPH_L/R) + * WCD9395 RX Port 2 (CLSH) <=3D> SWR1 Port 2 (CLSH) + * WCD9395 RX Port 3 (COMP_L/R) <=3D> SWR1 Port 3 (COMP_L/R) + * WCD9395 RX Port 4 (LO) <=3D> SWR1 Port 4 (LO) + * WCD9395 RX Port 5 (DSD_L/R) <=3D> SWR1 Port 5 (DSD_L/R) + * WCD9395 RX Port 6 (HIFI_PCM_L/R) <=3D> SWR1 Port 9 (HIFI_PCM_L/R) + */ + qcom,rx-port-mapping =3D <1 2 3 4 5 9>; + }; +}; + +&swr2 { + status =3D "okay"; + + /* WCD9395 TX */ + wcd_tx: codec@0,3 { + compatible =3D "sdw20217010e00"; + reg =3D <0 3>; + + /* + * WCD9395 TX Port 1 (ADC1,2,3,4) <=3D> SWR2 Port 2 (TX SWR_INPU= T 0,1,2,3) + * WCD9395 TX Port 2 (ADC3,4 & DMIC0,1) <=3D> SWR2 Port 2 (TX SWR_INPU= T 0,1,2,3) + * WCD9395 TX Port 3 (DMIC0,1,2,3 & MBHC) <=3D> SWR2 Port 3 (TX SWR_INPU= T 4,5,6,7) + * WCD9395 TX Port 4 (DMIC4,5,6,7) <=3D> SWR2 Port 4 (TX SWR_INPU= T 8,9,10,11) + */ + qcom,tx-port-mapping =3D <2 2 3 4>; + }; +}; + &tlmm { /* reserved for secure world */ gpio-reserved-ranges =3D <36 4>, <74 1>; @@ -814,3 +999,32 @@ &tlmm { &uart7 { status =3D "okay"; }; + +/* Pinctrl */ +&lpass_tlmm { + spkr_0_sd_n_active: spkr-0-sd-n-active-state { + pins =3D "gpio17"; + function =3D "gpio"; + drive-strength =3D <16>; + bias-disable; + output-low; + }; + + spkr_1_sd_n_active: spkr-1-sd-n-active-state { + pins =3D "gpio18"; + function =3D "gpio"; + drive-strength =3D <16>; + bias-disable; + output-low; + }; +}; + +&tlmm { + wcd_default: wcd-reset-n-active-state { + pins =3D "gpio101"; + function =3D "gpio"; + drive-strength =3D <16>; + bias-disable; + output-low; + }; +}; --=20 2.45.2