From patchwork Mon Jan 29 13:34:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 767698 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 45BFD65196 for ; Mon, 29 Jan 2024 13:34:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706535296; cv=none; b=TgVKGQuxmUNDFQue8uMukQLfY+m1tN94o9XyQd7ah28BfkDtL6BZxCBaTbRAD80MOXEEV8Pz3DL0hm97rXIYvlNFwhpHXL0lqu01JfSYY9XrKpgEG3mH+CzVMyiPOocm5ZnrSfcrgDBJOgSHQahJ3RDnaGYqXRDJ8ILp7sKwe9k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706535296; c=relaxed/simple; bh=flicCfqngKIW3zeJAOSjBz4FeMqtB9eKYKJzdn+m+m0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E87mocDmOI6N4apz4CQqdcocnZO7xQ8vTJOA37UOYodOxEAps8pu8RyIBgUL+q9HfqrIiokHY1YgLVMYydnap1joybVG8It/BDDCGsT9/Ye2hXlbTwvpV6MYkB0ngANv9EWHV1+TBWYeyIioH5Az0pZn6IyfjCwIFyOO3keOJIQ= 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=fwuUF+1p; arc=none smtp.client-ip=209.85.218.52 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="fwuUF+1p" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a26fa294e56so329138866b.0 for ; Mon, 29 Jan 2024 05:34:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706535292; x=1707140092; 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=FJ4qQ0eECaBxK5wIYNRpchzy4eFlwHhLiJlk9IpbxIw=; b=fwuUF+1pyMIG9H4Z3J/lcHY1Xq1DEpZ0yDsP8yhUTBtPk9fM0YofeZXquwpOn9PsTz pbA8y1jK2r2dsmnRHKhdWXgT0RDlhzxyIQBRUZrs+fNBS/jx0KunKkMEr1CLuhH1NPJP O4+vq9o75mNsuDTIlsFMMPVOmYdYb555q6BBZ/f0+8wWuyTevZ+LsJxzRdogmGqg+YlV 4UoOBAHFbWMLIiy2/5LH/8cJg9Nv6NzTHLKoDmnPOVRYWfqCxiyHHvyQDaAnsAtf9Hae iQEBpdCcFIFeDw/YF/rBAWMWHkD9Hf+HlTwzn6ND2rVGgDFpncdtnrH5Yhl05bzQpEfe f87A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706535292; x=1707140092; 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=FJ4qQ0eECaBxK5wIYNRpchzy4eFlwHhLiJlk9IpbxIw=; b=v9T3dKB/xXiNHt//P19+f0ZQ4q+LyPtjhhYLZeYbrDgMZVKRAPYEw6zQw9xAQ+sLET gsVGacBw+o5wEVSnIIU+SLrRIJlOiCQJwZKJdwBiBya/ZX9FkpjeT+GDNJOhALo0iES7 tJU1OpE50R+61YFkENEX85e7kvSBXB8IhYjGWyP7/IRo0QNZFJpc/QR5gCfd82PyOvKh xGD+I2gZaaTmYuIERzp0mihG9xoXX0kUefp+TEraPvvppkcH2FvD6qB8L/2BRfAnuc7u +PhoDI1pYgcMdMGe8y/k8XiECJIGXOKvHZKIjgiQBUIN2Mmp+w+K5itZ+wukA5r5Tjd2 xfLg== X-Gm-Message-State: AOJu0YxbR3TDmBAWAMwIxvBug+mt+Vusj7poPzNmyDQF947Rq6TXAIf8 ISK8v4Ftt7vMhTWGyGhLTZXRcxp8y7gBF/fVT+hyMs1L9/EI/IrYNiacl5NkxJ4= X-Google-Smtp-Source: AGHT+IHCog9ng7nG8mwlAJ0EvaLusfKdmX0v5Fypp66prrrEgSafknWTbNyzVpYHrU0T8fbS43hhDA== X-Received: by 2002:a17:906:fa97:b0:a35:9e3c:80dd with SMTP id lt23-20020a170906fa9700b00a359e3c80ddmr2719499ejb.5.1706535292479; Mon, 29 Jan 2024 05:34:52 -0800 (PST) Received: from [127.0.1.1] ([79.115.23.25]) by smtp.gmail.com with ESMTPSA id vi1-20020a170907d40100b00a2f48a43c3esm3911483ejc.7.2024.01.29.05.34.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 05:34:52 -0800 (PST) From: Abel Vesa Date: Mon, 29 Jan 2024 15:34:37 +0200 Subject: [PATCH 1/3] dt-bindings: remoteproc: qcom,sm8550-pas: document the X1E80100 aDSP & cDSP Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240129-x1e80100-remoteproc-v1-1-15d21ef58a4b@linaro.org> References: <20240129-x1e80100-remoteproc-v1-0-15d21ef58a4b@linaro.org> In-Reply-To: <20240129-x1e80100-remoteproc-v1-0-15d21ef58a4b@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Abel Vesa X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1480; i=abel.vesa@linaro.org; h=from:subject:message-id; bh=flicCfqngKIW3zeJAOSjBz4FeMqtB9eKYKJzdn+m+m0=; b=owEBbQKS/ZANAwAKARtfRMkAlRVWAcsmYgBlt6l2phfhnajXDLtV+vW3u5qyfRgKguQo9eLiV ojQee/9tEGJAjMEAAEKAB0WIQRO8+4RTnqPKsqn0bgbX0TJAJUVVgUCZbepdgAKCRAbX0TJAJUV Vjw/D/wNbhRk1lwXE1/jRT3HWG+Ko4TDujVe3Xak63OUDc+Y7k43YBNyJ8CSYQOFz4ONfpWG/Z3 Cjn02Yu8FsycMQKIglZxHwRgIbV6Di1iKBNjVclzUGM2+bgDXh/jtyOZBRQehJ39BaA6/e58EJW Ij/CG15mpzZ3VVt11ACMETQrWqSypaZoeAbMCHIXHWBkUVY95qMIbsKbwXy4SD9Y/icqVCuI20T iiVf+cpSxMLpbV2IhfYcrAasP5mofTzLCeOQndI9cfjiTTjvVeD7aV26/eeP+7Ev5uUMiBcb+m2 qKUf0/y5OIKll5GmIMhIx9rw+0fnVdvAuHppBOpk1EkNgQNjslKtWbncKzaa3nlOyXyJnmrGY1N AccbblLclG3HTFJ72KoOi5d2I8XPTZ8CHn03FigoULtZT6ZRC09Yxs0wNoqj2jPvUTUEQiu9Q4o 75Fbj2I/i1OwZn4D17LigtUwGUM94J9e4jjuWb9pro9wBgT1MgIN/NfLf0lP6hpavoOdGsYbN4O Z+VshdNdJkc3aP09XizSJ+xMSf54YGL+diF8xv6XU+bDzTSzIfR0TTkbxV2LJp3kw7moCjVcdDr Oc7Nv1eOC5VBAaJL8Z2jioWiube86JXhOe0HSvQzOJlFtyRiMH4qeGnRDURL7RVILrccgFHb0Lt K7kboPFr/m4zbGw== X-Developer-Key: i=abel.vesa@linaro.org; a=openpgp; fpr=6AFF162D57F4223A8770EF5AF7BF214136F41FAE Document the aDSP and cDSP Peripheral Authentication Service on the X1E80100 Platform. Signed-off-by: Abel Vesa --- Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml index 58120829fb06..95ae32ea8a0a 100644 --- a/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml +++ b/Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml @@ -19,6 +19,8 @@ properties: - qcom,sm8550-adsp-pas - qcom,sm8550-cdsp-pas - qcom,sm8550-mpss-pas + - qcom,x1e80100-adsp-pas + - qcom,x1e80100-cdsp-pas reg: maxItems: 1 @@ -63,6 +65,8 @@ allOf: enum: - qcom,sm8550-adsp-pas - qcom,sm8550-cdsp-pas + - qcom,x1e80100-adsp-pas + - qcom,x1e80100-cdsp-pas then: properties: interrupts: @@ -85,6 +89,7 @@ allOf: compatible: enum: - qcom,sm8550-adsp-pas + - qcom,x1e80100-adsp-pas then: properties: power-domains: @@ -116,6 +121,7 @@ allOf: compatible: enum: - qcom,sm8550-cdsp-pas + - qcom,x1e80100-cdsp-pas then: properties: power-domains: From patchwork Mon Jan 29 13:34:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 767697 Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 C1531657AF for ; Mon, 29 Jan 2024 13:34:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706535298; cv=none; b=QNSmp555lEWDY0nqz/5AN1Q8Bdi9pfmtu0Aanea/+xRgNENanv9qNeHCstwpHJZtEKJWeJaGhzrcqiWR4W71ZM1uJkWUgrhu5lTQ7SAf1cq3yVZ2bD+pd9cgj8XuqDyPLLBVXpdyxgO/F7jlsAnTZskF6O1w1jQjcikFdDi04+8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706535298; c=relaxed/simple; bh=7XEGX8tCobeF3TWbs26SkgzjQRQagB5DicUZQZndEAY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=q4YYzuQVI6pd//mh7uv6xFp4tpFTNbjbQTgk6KMLuLyTUah9Sf9bb/pB0MpHDVnbAs1pGt/4opP4v5dYzQup8bW7oxJuT0Tk4RjsSySj6l07ocC3n+N2zO9rz7o1CM+G0zjO+bbBVThGLiBIM99YLW2I6oo+yFkKMa61KJcHf8c= 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=mBZK8l5W; arc=none smtp.client-ip=209.85.218.54 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="mBZK8l5W" Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a3566c0309fso175310766b.1 for ; Mon, 29 Jan 2024 05:34:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706535295; x=1707140095; 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=xXZFqpcx+yqKfOAXpJEod2Uxg4c+ixzxqWhb+cY1h8Y=; b=mBZK8l5WHdwNGGDRKq6wvzQnB/T9vVNeTYM4DsT8nBOsobyRA5/Tn82Tb3Lgj/9r1/ qb7qDmv2l2aI0wzMLRxhWpgoc585O+zayMINaLh8un/PNg5FlRBxIRcsz8Oal5kMsIk/ s+dcjptQqQUG1G3lSyA2ce5P/DkCb1ffXl9pyqb/o1uf9c+VjX3f/sUl5i6AxDgtXbQt gM6MoUl2pEbuBtyjdAOatFBbynpP/VOBI+/NUMS8PX16GuTT0POA5tx/kGXAdKrWVpen LOSWZCpGXw8s8RLVQEzGShwy9H5ePlArYDjuxMG77HHCCDQyASfQX66xojIjuXHMbb6M uZSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706535295; x=1707140095; 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=xXZFqpcx+yqKfOAXpJEod2Uxg4c+ixzxqWhb+cY1h8Y=; b=D02Wqzb0X1cCHY3rFe58psJ+SiC/qjXLAvU1lhJryFICPBoeE9XZlmIbquVoFqXv3f vsOHdQuFAYw9O9gBe97xjRkMevjxRcrR5siWUNnEkWUaq8FQYdyCPC3uIXnapLl1SRkQ eICV0nVkmuDprjfl1MyBB64hBaJ0iV6hJ8GU8Vdldh0lCN5YSIc6g6iBppr4oh3Sbbe8 ZEA+at11bwZwa9mbwlIqbI9Dj61sOMMVqTb0ukhQauPh75StLWmz3TXCqgHQ9/CFYbmK ZIfj/Ohj+36Ee1gBvBKbwkozyNFO3YFEBHMRarRYHBxIHX77+kF7+HcYXNVcxokUtcn9 eX2Q== X-Gm-Message-State: AOJu0Yxj4bA4T66Pq19pfKd4BYqzD/zmSY6eSg2ZfCFn9MAHlDrm3CaV LlscYYxjtNGj4n7LSqv9YMsVBcZX+R7jR01toMi6bq9bce9xzWz+h3qzTO3hJ9Y= X-Google-Smtp-Source: AGHT+IHCFlT0NaicOgyWXFvdhxw1y4Dq6pYq28XJTkenjH+aNzp1/O+NJ3vGuzbpV29JtOx0Uln79g== X-Received: by 2002:a17:906:248d:b0:a2d:a6a7:b3bc with SMTP id e13-20020a170906248d00b00a2da6a7b3bcmr4409221ejb.4.1706535295144; Mon, 29 Jan 2024 05:34:55 -0800 (PST) Received: from [127.0.1.1] ([79.115.23.25]) by smtp.gmail.com with ESMTPSA id vi1-20020a170907d40100b00a2f48a43c3esm3911483ejc.7.2024.01.29.05.34.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 05:34:54 -0800 (PST) From: Abel Vesa Date: Mon, 29 Jan 2024 15:34:39 +0200 Subject: [PATCH 3/3] remoteproc: qcom_q6v5_pas: Unload lite firmware on ADSP Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240129-x1e80100-remoteproc-v1-3-15d21ef58a4b@linaro.org> References: <20240129-x1e80100-remoteproc-v1-0-15d21ef58a4b@linaro.org> In-Reply-To: <20240129-x1e80100-remoteproc-v1-0-15d21ef58a4b@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Manivannan Sadhasivam Cc: linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Abel Vesa , Sibi Sankar X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2175; i=abel.vesa@linaro.org; h=from:subject:message-id; bh=DYmaa/61P4GaXID7Xccu2X68XxOqzoecSVlwWNbm4oQ=; b=owEBbQKS/ZANAwAKARtfRMkAlRVWAcsmYgBlt6l5CPj0vbamh6iXLeZP8wUB2GwT1lbw005/L ExfUy5EK/GJAjMEAAEKAB0WIQRO8+4RTnqPKsqn0bgbX0TJAJUVVgUCZbepeQAKCRAbX0TJAJUV Vk4dD/4pyJzUu6T1+dFDIrMr5yX8AxeC5PxCSxSS82hGVyIGL0+orImNWHgf8Mso62DjkvCxf04 AKRN9an+loItW0pAklTRZmz6VynBGbQkvh0r9sbDggpkfFh77Oqnze5qnSBpibmew/wxA+ff0Z+ QEk224GPexwy8asTTfibFzYRbikTjHvkf/vr0Jrb460tKv3PHw05Po0kFHh85vcI5bNpHK7UFxb VlQ1uwTocE7bTjd1nG85YJH9DcSl5gjN3XYZsyxB4o53PSgpshHb5QbkIVX0ufjdhgv+ipUQJZA CfL4uXyeBq/DDYbuWF41/a8yMRdj2CUbks1hSHeAOQeniVUv2l6g8bsZRkMO/omt2yJTxHx0H8H 8jDx/rTgqBIdaIdpX9KhTJ1+tqlMZq2R4M0G6Bfa5Dytr42K/H4ZhcP/m6TTLhFcvNJt0O/kvOH uDlc9muh7K4XPHDN+UrPNIvozaCW8mAMKa1VM3QQndA7u/jtaOpYPZHk6e1SFAo7DzcWYACike3 yw3DG0puF5gooNXTqtaAcziqQ6rsSXWPsvfqiGCGoRic4LWtMlJUL49C3+PfM6TgbdDxWrEFxZE gjtOedzLuSCP1kwMfUvRoQ2xaLTXF41gtCORvoxgh8MAUrgY3oK4Qv/4rQLCiYksHbFUbxILOzo G1afL4wVwYrGHhg== X-Developer-Key: i=abel.vesa@linaro.org; a=openpgp; fpr=6AFF162D57F4223A8770EF5AF7BF214136F41FAE From: Sibi Sankar The UEFI loads a lite variant of the ADSP firmware to support charging use cases. The kernel needs to unload and reload it with the firmware that has full feature support for audio. This patch arbitarily shutsdown the lite firmware before loading the full firmware. Signed-off-by: Sibi Sankar Signed-off-by: Abel Vesa --- drivers/remoteproc/qcom_q6v5_pas.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 083d71f80e5c..4f6940368eb4 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -39,6 +39,7 @@ struct adsp_data { const char *dtb_firmware_name; int pas_id; int dtb_pas_id; + int lite_pas_id; unsigned int minidump_id; bool auto_boot; bool decrypt_shutdown; @@ -72,6 +73,7 @@ struct qcom_adsp { const char *dtb_firmware_name; int pas_id; int dtb_pas_id; + int lite_pas_id; unsigned int minidump_id; int crash_reason_smem; bool decrypt_shutdown; @@ -210,6 +212,10 @@ static int adsp_load(struct rproc *rproc, const struct firmware *fw) /* Store firmware handle to be used in adsp_start() */ adsp->firmware = fw; + /* WIP: Shutdown the ADSP if it's running a lite version of the firmware*/ + if (adsp->lite_pas_id) + ret = qcom_scm_pas_shutdown(adsp->lite_pas_id); + if (adsp->dtb_pas_id) { ret = request_firmware(&adsp->dtb_firmware, adsp->dtb_firmware_name, adsp->dev); if (ret) { @@ -693,6 +699,7 @@ static int adsp_probe(struct platform_device *pdev) adsp->rproc = rproc; adsp->minidump_id = desc->minidump_id; adsp->pas_id = desc->pas_id; + adsp->lite_pas_id = desc->lite_pas_id; adsp->info_name = desc->sysmon_name; adsp->decrypt_shutdown = desc->decrypt_shutdown; adsp->region_assign_idx = desc->region_assign_idx; @@ -990,6 +997,7 @@ static const struct adsp_data x1e80100_adsp_resource = { .dtb_firmware_name = "adsp_dtb.mdt", .pas_id = 1, .dtb_pas_id = 0x24, + .lite_pas_id = 0x1f, .minidump_id = 5, .auto_boot = true, .proxy_pd_names = (char*[]){