From patchwork Fri May 10 12:27:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 13661556 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (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 CFBC14DA04 for ; Fri, 10 May 2024 12:27:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715344043; cv=none; b=jvQkir8ZIo+amsPEAu8wV8Zxoc2xz+B9PSVtLfxxS+8MdHQbBjMCeD8Udwr0THQawon6FC3d/5PM5MLNT+KQzkoYvNrLEW6GVIYWK3sqhXvrXy3hF5L7Y20aRjhJAb10LG7l0oqvjNx05c0LGe82QqQdW1m9pWyRPTO7/ZTVu9g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715344043; c=relaxed/simple; bh=YI/X1yQpHazLlMPIDEcyq57BX5ZwTRyw+vNUlPVa8tI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Kr1GUeVFSK4EpBonjYmXU9dEFynrYo3OjgQ3so3F8o5SwwcOm3HEO7NyJcK6UkqXzLeWS6OiDb7jthIScPnwmwvc797sa5s0XwVwFGithu+LL4QKVewTkQOd3cb0dB5b2MEibBGoiRdp4e2vx1GK63YY+sKd3Rey6ZQGA50IpmM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fairphone.com; spf=pass smtp.mailfrom=fairphone.com; dkim=pass (2048-bit key) header.d=fairphone.com header.i=@fairphone.com header.b=5NHiFOW3; arc=none smtp.client-ip=209.85.208.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fairphone.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fairphone.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fairphone.com header.i=@fairphone.com header.b="5NHiFOW3" Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2e1fa1f1d9bso35552041fa.0 for ; Fri, 10 May 2024 05:27:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1715344039; x=1715948839; 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=KBRk2f+1EQ0QzQMLpZj+en4CMV9rwE2n8DSDONNWf8o=; b=5NHiFOW3ehqwJ6pxOuE5PgEiLXoTWoG9cFBLXYuJI0I3oCGVARBL5QfvHYTJ7iRzCn xNnRcSq+Kb7LTC4Ob7ZtcRKrS7Umxfwc0SoAur/zdSdjfaFmCgjuXnHO5q1PAkabSID9 zWtUXDBVPzcgGSlcFZiUOk9fAWZM1TGwoGEzYegb+SehRDMOj2fNt+153Nq/dxwp898S 6G25wXE1pi/4OlTmhUeu5HYA4Btnss9dwm+SZQILflfzCoUcPYISKWm2xWVex3xivrOO D/CiY1qplPR1O9ANiwITBdS0M1P8hlwg4vul+hbLTZ1oHrLtl8mK6m6P0IlOGkhapyVg l8CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715344039; x=1715948839; 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=KBRk2f+1EQ0QzQMLpZj+en4CMV9rwE2n8DSDONNWf8o=; b=CCD/xQtRd7RZIBsbDx+9IPjLpAaatUAbqSaW6XC8VNYfiyLz1gDKmx+Efjdefy1b2g sWl2dJb+4NLxheGRbL1gRbEmY4nTOpzJP64P8iWQAuBEiy6N+dS29Kd5xtVy6qUgz4/s D5CwSy3uxhg9fa8bn+rTjjFF0/cuptie6fULSE1NXptEA7JgFxFcwNa9ZehGB45+6d+J OFE77nQ2SYfmer694qqQlXlRgnl/VLaFUvhjUU9nQSu6JLZzmEi5+M/mX5T6BPRBPatq 4ty/XE3UHEqq163VH9ZKm0wCk54hTZb/8cia2f3+ApJTNDj8cYRTYYffmYkwJpp7ZdOq OYDg== X-Forwarded-Encrypted: i=1; AJvYcCVelsbuWkEgKKmwauEJPTfKTkpS8DuLuK5uYlSE2F/pH8nehDFLQ9+4eFT0lY/3yv2TcgnzDnXV1o4VwesFBbTj0kjoRV+uSUi60jhdbA== X-Gm-Message-State: AOJu0YzdXnFiJlHe8j4Kg8L0swpXwf8DNIli/GVM7FCw3X1bGw8Kw1zf YkkBuNgGUAj/7YoTWarkLPs1OMIRPzLxIcZks1X2NbaI9EIq8o/Hb4TUSnYwfk4= X-Google-Smtp-Source: AGHT+IGQ3LE2MmsyJ2Do33yJcWR7jZu7eJpGjImVL+LcRY5dCAMAdCFOWIUCBssr7yzD4iLgZbMKZw== X-Received: by 2002:a2e:9e97:0:b0:2de:75de:5b0b with SMTP id 38308e7fff4ca-2e51fd45535mr19216561fa.18.1715344038892; Fri, 10 May 2024 05:27:18 -0700 (PDT) Received: from otso.luca.vpn.lucaweiss.eu (2a02-a210-20ba-5a00-9ceb-707b-2d57-26f7.cable.dynamic.v6.ziggo.nl. [2a02:a210:20ba:5a00:9ceb:707b:2d57:26f7]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a17b017b1sm178043366b.181.2024.05.10.05.27.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:27:18 -0700 (PDT) From: Luca Weiss Date: Fri, 10 May 2024 14:27:08 +0200 Subject: [PATCH 1/2] arm64: dts: qcom: sc7280: Add APR nodes for sound Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240510-sc7280-apr-v1-1-e9eabda05f85@fairphone.com> References: <20240510-sc7280-apr-v1-0-e9eabda05f85@fairphone.com> In-Reply-To: <20240510-sc7280-apr-v1-0-e9eabda05f85@fairphone.com> To: cros-qcom-dts-watchers@chromium.org, Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Srinivasa Rao Mandadapu , Mohammad Rafi Shaik Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss X-Mailer: b4 0.13.0 Add the different services found on APR on some devices with SC7280 SoC. Additionally add an empty sound node in the root node as is seen on other SoC dtsi files so device dt's can easily use that. Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/sc7280.dtsi | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index fc9ec367e3a5..659212bb38c1 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -3762,6 +3763,75 @@ IPCC_MPROC_SIGNAL_GLINK_QMP label = "lpass"; qcom,remote-pid = <2>; + apr { + compatible = "qcom,apr-v2"; + qcom,glink-channels = "apr_audio_svc"; + qcom,domain = ; + #address-cells = <1>; + #size-cells = <0>; + + service@3 { + reg = ; + compatible = "qcom,q6core"; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + }; + + q6afe: service@4 { + compatible = "qcom,q6afe"; + reg = ; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + + q6afedai: dais { + compatible = "qcom,q6afe-dais"; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + }; + + q6afecc: clock-controller { + compatible = "qcom,q6afe-clocks"; + #clock-cells = <2>; + }; + }; + + q6asm: service@7 { + compatible = "qcom,q6asm"; + reg = ; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + + q6asmdai: dais { + compatible = "qcom,q6asm-dais"; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + iommus = <&apps_smmu 0x1801 0x0>; + + dai@0 { + reg = <0>; + }; + + dai@1 { + reg = <1>; + }; + + dai@2 { + reg = <2>; + }; + }; + }; + + q6adm: service@8 { + compatible = "qcom,q6adm"; + reg = ; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + + q6routing: routing { + compatible = "qcom,q6adm-routing"; + #sound-dai-cells = <0>; + }; + }; + }; + fastrpc { compatible = "qcom,fastrpc"; qcom,glink-channels = "fastrpcglink-apps-dsp"; @@ -5991,6 +6061,9 @@ cpufreq_hw: cpufreq@18591000 { }; }; + sound: sound { + }; + thermal_zones: thermal-zones { cpu0-thermal { polling-delay-passive = <250>; From patchwork Fri May 10 12:27:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 13661555 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 4AA0412A166 for ; Fri, 10 May 2024 12:27:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715344043; cv=none; b=k5Il2G9pn1mnkznqbJhPGO7YMHpqqjqjRKPVoMkYrZxDBIeYB3ElO4yZhT5qD7Rf/f1QsoNnaizK4mi2w/XS2Wr4rK6fjfqODr/1dsREh0l36BAO2UD6Nb1wZeJXH9twCvCh1+5uYOUQxq5M8prsKMCMu9pa2Jjfslqy1p++WIc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715344043; c=relaxed/simple; bh=fVRg0B+SoKGyQZjZGM35V3zycwmERzXO4crppui7oW0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dt/zJvFDrX7kSpo2G5J2FuIMAbyldm2CmK73wj9cROohPpnNOHRzR5ArATVS9HNfOu+IirbGLaAWFciwccE7R1iQXpMyVO7+QB4JqweMaZ3AX+4/HJ6A6GGOs0C7hEsj0SwbvHW2z491PZcjFeUYwVvS6l4T4qqrmInHZrPr+w8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fairphone.com; spf=pass smtp.mailfrom=fairphone.com; dkim=pass (2048-bit key) header.d=fairphone.com header.i=@fairphone.com header.b=qDiGUUcG; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fairphone.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fairphone.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fairphone.com header.i=@fairphone.com header.b="qDiGUUcG" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a59a387fbc9so517449966b.1 for ; Fri, 10 May 2024 05:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1715344040; x=1715948840; 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=+mcIqLuJJPw3GiMJfbLNtSKUQP2lsFTPw8ADS4mj8Dg=; b=qDiGUUcGQPj4ZkBovTn1ywv1ie8jJ/zs3nfLD9y9YMa1mbgHpXAs6QluP9ktsvPsFS MtARIyixoIgBs7OqyJPVf2sT6nY1d1GpPY26OCXfgE6OypaQBp8CN+Z7JhsqKiNY/+9d aS1vDujZTDQsSEiQZTcO0Z0WOb6lzNoxDMSJvy6MXnCmLuN9401DfRGxYo92BhWtSb21 PFvum/MrdSz9tWpoGGLUfX+HxWzNaNmurPZRZW3afngozUW7ZQ0SPZsoVjy0hDA7NhJa XIRDVdHlr/i/xalkBlloSfsumr07KiVGIO4WZGvEjpgV+3jlaIMm96QT+SbcQNdVeLGT UO1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715344040; x=1715948840; 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=+mcIqLuJJPw3GiMJfbLNtSKUQP2lsFTPw8ADS4mj8Dg=; b=IhxpaRsi/woBM1Zhs8fQXRCJzPoF4a4YmIy3fN3LjLDcVSaj8vZPZxPkkgYEPzd51O jl9cHCSEM/bFqbR6uMvw2YOD9vUK5Uqy13+rHnOD2u8NDihu8kzTAJRkzgZWjQUlq3q4 7ya52J+RmhSICUUjKqptNuus4PWzGgwzjBJiXI9D4w2QwY4rtj9qjcJwTRbM3JOC24J9 hqgmYfEFgMtN2feG0xYbnn1ydRxRyWKxSZGBDSkkKfbpG5MBHTBag1guvoZIdke7QZX7 Ko/C1BdOFpmxR+jeK3XugHWZMKLoLhu1lWmQiEXyDDY5nS5+9e4UjxLqzJDXaTZuDdra a8sw== X-Forwarded-Encrypted: i=1; AJvYcCV7lYwplC38XsrBDWy8B4JNBSl9CVwmlPTUalSofA6U1g5HqVwVnHA82wmcy12nnQvKTgU//TuSQtQED65jvqGZsBKqGPcZ9oWW9zfGUQ== X-Gm-Message-State: AOJu0Yz87PPJSpkZJ4DgREjFZlERM7aBiHkBSDyMfAH4VzQ8x5xdI1f5 8n5mz2rQzdclt0lB+c5lxaL+jKDm/hMA1HeXeq1qerCSOjlvxaJg2txRFYES+m4= X-Google-Smtp-Source: AGHT+IHRZ6F9QRbCi+Ce6mddApr315w18te4B3o9cg98Wf4XxL2oksDu0esFm+ifb+xhkWK/GDdzIA== X-Received: by 2002:a17:906:3c56:b0:a59:f380:1823 with SMTP id a640c23a62f3a-a5a2d66b493mr165210566b.49.1715344039844; Fri, 10 May 2024 05:27:19 -0700 (PDT) Received: from otso.luca.vpn.lucaweiss.eu (2a02-a210-20ba-5a00-9ceb-707b-2d57-26f7.cable.dynamic.v6.ziggo.nl. [2a02:a210:20ba:5a00:9ceb:707b:2d57:26f7]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a17b017b1sm178043366b.181.2024.05.10.05.27.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 05:27:19 -0700 (PDT) From: Luca Weiss Date: Fri, 10 May 2024 14:27:09 +0200 Subject: [PATCH DNM 2/2] arm64: dts: qcom: qcm6490-fairphone-fp5: Add DisplayPort sound support Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240510-sc7280-apr-v1-2-e9eabda05f85@fairphone.com> References: <20240510-sc7280-apr-v1-0-e9eabda05f85@fairphone.com> In-Reply-To: <20240510-sc7280-apr-v1-0-e9eabda05f85@fairphone.com> To: cros-qcom-dts-watchers@chromium.org, Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Srinivasa Rao Mandadapu , Mohammad Rafi Shaik Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Luca Weiss X-Mailer: b4 0.13.0 Add the required nodes for sound playback via a connected external display (DisplayPort over USB-C). Signed-off-by: Luca Weiss --- Depends on a bunch of patches upstream doing bringup of Display (DSI), DisplayPort, GPU, and then finally audio could land. But we're blocked on DPU 1:1:1 topology for all of that unfortunately. And also machine driver for sound just exists a bit hackily. --- arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts index 05bbf1da5cb8..2bbbcaeff95e 100644 --- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts +++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts @@ -14,6 +14,8 @@ #include #include #include +#include +#include #include "sc7280.dtsi" #include "pm7250b.dtsi" #include "pm7325.dtsi" @@ -774,6 +776,12 @@ &pon_resin { status = "okay"; }; +&q6afedai { + dai@104 { + reg = ; + }; +}; + &qup_spi13_cs { drive-strength = <6>; bias-disable; @@ -847,6 +855,34 @@ &sdhc_2 { status = "okay"; }; +&sound { + compatible = "fairphone,fp5-sndcard"; + model = "Fairphone 5"; + + mm1-dai-link { + link-name = "MultiMedia1"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; + }; + }; + + displayport-rx-dai-link { + link-name = "DisplayPort Playback"; + + cpu { + sound-dai = <&q6afedai DISPLAY_PORT_RX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&mdss_dp>; + }; + }; +}; + &spi13 { status = "okay";