From patchwork Tue May 21 09:45:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13669102 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 E57225FBB3 for ; Tue, 21 May 2024 09:45:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284729; cv=none; b=CN7n1uVGH/kwCPkcm7kB09f0ZyCu79ebVy7Zw3pmnbI1k7HC9sKRs9LiXgdwVrIuA9yPuRPUl3rlJ/Rs5DTMzt4/qPLAEvhltPkfHHScaR0OBs6pYShyfxePDuV5ycOvWnfQNBFpEVJvLkIKUmhlvjABdrMeOHUBjMhAqCUsAZY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284729; c=relaxed/simple; bh=8bSYJFZxOttwC6WGzJnbnsvxZHPinVGAHkl3/krhwFU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Eq7lY263sDDnf6fnybCyZ8J247pcyorP28jeGlsnCLXKfiR/P7z99+pLmMPIoDF6LVnpVGaxJ5Ci311QYxPuOQaJE4kGXui11AeP416+NOVP/pXeVkfC/Z8pJD9IcgXFJ5Xx9PpQAV/cUz41W2KKLCsYt03oPbmAR0O69MSePjY= 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=m5xFXcKb; arc=none smtp.client-ip=209.85.208.181 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="m5xFXcKb" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2e3fa13f018so46775041fa.3 for ; Tue, 21 May 2024 02:45:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716284726; x=1716889526; 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=s+iPb833VFVcxccVnaoN5omlaE6HTbUUtzkP4wXORTQ=; b=m5xFXcKbP3jJPDk8reuRHY+7n77jSX2QAZndqoPqK0TZjSOIA7QvcRwwZ3IveIEia1 CVdAOf6Hm3L1wNoW+gbkswW/3qeNeYcNTUpoucE3JMRplzmaMdHWYe5st14AZEUHnVc4 CsRIL5YnX+28fcZFkwH+YDAlM4cukzwXEAypWiezGTL+CT4eHHFzKQkLgsHLkGjhMqMo L5P9RWNKVMdXQAL71sExaDFK3cdtStiEpqF5hvfaENbrzHSnEDgA2/SJkHGOqgBpwFzS jQZg6oGFZPYQ+RwHp9mtQh7Ccuz5r7Npg1uBXZ1qiteTlbGZywL2SSLTYMH0hgLKoZ/n Amsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716284726; x=1716889526; 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=s+iPb833VFVcxccVnaoN5omlaE6HTbUUtzkP4wXORTQ=; b=YkjulMzIUM0UrucFwU+wohP3vYOWJJWaImQSbIiFYxL7v7yVg4NboxX1r6y3muzC53 J25Ayo9Y/XAxm4u3aBwwHyI08IqTBzLsbxbYMHucNyP+EZDsbANI5MjTJkTxgJDIEzIU KrEUhVwp9WqX3dslW0nzCS75rLN/sGHO75tm518cdIN+lptSvf441zIBmoZLMQ5cFxOz i1cJqiNWk6vJZ5LLYorrQhp8gVR+tFoPZ8xPJJV/xFmgxTtsOJv6jLTPIhl2Zcyvvr3b vY/KI3WVZmTFy9tRtwgF/OKmscO/qJOezZgVmK8KUwKjYUF01/bd3HuGb77/plvE9Yq+ 98SA== X-Forwarded-Encrypted: i=1; AJvYcCVpEggXTQ7IaTIjXXsTHu/K17XsjLD3LqGSl4cAql+5BGWACbk1VZm43fdkzjnxzAno/3RtMg8OIGjs8T7VzYgp+mbJ1QHj4K0/Ndzz4vPc+w== X-Gm-Message-State: AOJu0YzFhYNwFk4fgfl18YtPG4Rb/WvSzzCl9HCsl8ObBcC50TUxVIj+ 1Dj0grTx5RYsB2cY+axfXKEaaer5GeHK7HiGZ2hAkpyde/8F04V68E/YECKb6s0= X-Google-Smtp-Source: AGHT+IGK2Mm/vNlP83fxNawhKETP5S72Iv/Fv7BCr1CruU63ZvCJ9JIg8mo2tnDHyPHB1+g5HBRVvQ== X-Received: by 2002:a2e:74f:0:b0:2e6:bc64:dd50 with SMTP id 38308e7fff4ca-2e6bc64de97mr164048351fa.39.1716284726075; Tue, 21 May 2024 02:45:26 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e706ee0a65sm13906261fa.112.2024.05.21.02.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:45:25 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 21 May 2024 12:45:21 +0300 Subject: [PATCH 01/12] soc: qcom: add firmware name helper Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240521-qcom-firmware-name-v1-1-99a6d32b1e5e@linaro.org> References: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> In-Reply-To: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Loic Poulain , Kalle Valo , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, Arnd Bergmann , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4930; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=8bSYJFZxOttwC6WGzJnbnsvxZHPinVGAHkl3/krhwFU=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmTG0y1XUQH+EkXc9kNuEjWYoYT5cJRxUMUftgv dfOM+jgTIKJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZkxtMgAKCRCLPIo+Aiko 1YlIB/9nvjT0T/s9Ip16YLNw25bZIyKJO+WvibNJUKE13nQDVALipPKFR8jyH1tkeaAqeI8rg21 qoAK5hzh0LytrRgX8iRNtEpm7liRiM/Oxn8APVe+PPOjzAKo84EqvW67uCJHBQV5VaFR6CrCtb7 EIe46Mjt/ZRc4FUlmGf9of6WIwut+LJf+KzqgSb7/X+hQCatGhtpxcLH8hhqcYQMViUTjqyMxj8 xuL3FFPKz0K0VPUUI6DRbUeFg7z1uY1HeeVqOlRomg1q/HAHGMQ/ewg+bpMT/y/HoP047eCXXV9 jrkGfY3YItyS3bp25iqY/JUUI6gf0vzQYiT+NEkuseYQsV+m X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Qualcomm platforms have different sets of the firmware files, which differ from platform to platform (and from board to board, due to the embedded signatures). Rather than listing all the firmware files, including full paths, in the DT, provide a way to determine firmware path based on the root DT node compatible. Suggested-by: Arnd Bergmann Signed-off-by: Dmitry Baryshkov --- drivers/soc/qcom/Kconfig | 5 +++ drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/qcom_fw_helper.c | 86 ++++++++++++++++++++++++++++++++++++++ include/linux/soc/qcom/fw_helper.h | 10 +++++ 4 files changed, 102 insertions(+) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index 5af33b0e3470..b663774d65f8 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -62,6 +62,11 @@ config QCOM_MDT_LOADER tristate select QCOM_SCM +config QCOM_FW_HELPER + tristate "NONE FW HELPER" + help + Helpers to return platform-specific location for the firmware files. + config QCOM_OCMEM tristate "Qualcomm On Chip Memory (OCMEM) driver" depends on ARCH_QCOM diff --git a/drivers/soc/qcom/Makefile b/drivers/soc/qcom/Makefile index ca0bece0dfff..e612bee5b955 100644 --- a/drivers/soc/qcom/Makefile +++ b/drivers/soc/qcom/Makefile @@ -6,6 +6,7 @@ obj-$(CONFIG_QCOM_GENI_SE) += qcom-geni-se.o obj-$(CONFIG_QCOM_COMMAND_DB) += cmd-db.o obj-$(CONFIG_QCOM_GSBI) += qcom_gsbi.o obj-$(CONFIG_QCOM_MDT_LOADER) += mdt_loader.o +obj-$(CONFIG_QCOM_FW_HELPER) += qcom_fw_helper.o obj-$(CONFIG_QCOM_OCMEM) += ocmem.o obj-$(CONFIG_QCOM_PDR_HELPERS) += pdr_interface.o obj-$(CONFIG_QCOM_PMIC_GLINK) += pmic_glink.o diff --git a/drivers/soc/qcom/qcom_fw_helper.c b/drivers/soc/qcom/qcom_fw_helper.c new file mode 100644 index 000000000000..13123c2514b8 --- /dev/null +++ b/drivers/soc/qcom/qcom_fw_helper.c @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Qualcomm Firmware loading data + * + * Copyright (C) 2024 Linaro Ltd + */ + +#include +#include +#include +#include +#include + +static DEFINE_MUTEX(qcom_fw_mutex); +static const char *fw_path; + +static const struct of_device_id qcom_fw_paths[] = { + /* device-specific entries */ + { .compatible = "thundercomm,db845c", .data = "qcom/sdm845/Thundercomm/db845c", }, + { .compatible = "qcom,qrb5165-rb5", .data = "qcom/sm8250/Thundercomm/RB5", }, + /* SoC default entries */ + { .compatible = "qcom,apq8016", .data = "qcom/apq8016", }, + { .compatible = "qcom,apq8096", .data = "qcom/apq8096", }, + { .compatible = "qcom,sdm845", .data = "qcom/sdm845", }, + { .compatible = "qcom,sm8250", .data = "qcom/sm8250", }, + { .compatible = "qcom,sm8350", .data = "qcom/sm8350", }, + { .compatible = "qcom,sm8450", .data = "qcom/sm8450", }, + { .compatible = "qcom,sm8550", .data = "qcom/sm8550", }, + { .compatible = "qcom,sm8650", .data = "qcom/sm8650", }, + {}, +}; + +static int qcom_fw_ensure_init(void) +{ + const struct of_device_id *match; + struct device_node *root; + + if (fw_path) + return 0; + + root = of_find_node_by_path("/"); + if (!root) + return -ENODEV; + + match = of_match_node(qcom_fw_paths, root); + of_node_put(root); + if (!match || !match->data) { + pr_notice("Platform not supported by qcom_fw_helper\n"); + return -ENODEV; + } + + fw_path = match->data; + + return 0; +} + +const char *qcom_get_board_fw(const char *firmware) +{ + if (strchr(firmware, '/')) + return kstrdup(firmware, GFP_KERNEL); + + scoped_guard(mutex, &qcom_fw_mutex) { + if (!qcom_fw_ensure_init()) + return kasprintf(GFP_KERNEL, "%s/%s", fw_path, firmware); + } + + return kstrdup(firmware, GFP_KERNEL); +} +EXPORT_SYMBOL_GPL(qcom_get_board_fw); + +const char *devm_qcom_get_board_fw(struct device *dev, const char *firmware) +{ + if (strchr(firmware, '/')) + return devm_kstrdup(dev, firmware, GFP_KERNEL); + + scoped_guard(mutex, &qcom_fw_mutex) { + if (!qcom_fw_ensure_init()) + return devm_kasprintf(dev, GFP_KERNEL, "%s/%s", fw_path, firmware); + } + + return devm_kstrdup(dev, firmware, GFP_KERNEL); +} +EXPORT_SYMBOL_GPL(devm_qcom_get_board_fw); + +MODULE_DESCRIPTION("Firmware helpers for Qualcomm devices"); +MODULE_LICENSE("GPL"); diff --git a/include/linux/soc/qcom/fw_helper.h b/include/linux/soc/qcom/fw_helper.h new file mode 100644 index 000000000000..755645386bba --- /dev/null +++ b/include/linux/soc/qcom/fw_helper.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __QCOM_FW_HELPER_H__ +#define __QCOM_FW_HELPER_H__ + +struct device; + +const char *qcom_get_board_fw(const char *firmware); +const char *devm_qcom_get_board_fw(struct device *dev, const char *firmware); + +#endif From patchwork Tue May 21 09:45:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13669103 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 789F66A8D2 for ; Tue, 21 May 2024 09:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284730; cv=none; b=lWMBCA1C2phz/rsFCday9i0AC6WPxfwWj9HaOmOxTBOBvCKSC75gJqqwwGg8PXooPBLVqqO+RwFqY6xVojBsCqMkSqKLXd7aW8AHjxaF/VlvDNk2CKRwT4gGxM7q2FRrB3vc40xw/sgrhoCvP1gIIfYix1ORhl7ME31zcUSGKVA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284730; c=relaxed/simple; bh=93C6VdWrKA3F4L2pbTvmlVsMwuAb+l57jMfHeI9flc8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NW85ARshEZLoqzQ9xVDDBzOKLlKWHMBBCCHADyUA8cUBQVvlHG5f7090+JTtqFpBBiyJnaSz7MmHxzzDlwf7PzmWlLgaYzFK/UgCAkjArM3/NOEbu67tsessTqxRuE/Kl9o0B62fn4t0BBDscvyA2CF4DENK4G1K0z2MS4J0tA0= 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=Xvx6a4lH; arc=none smtp.client-ip=209.85.208.171 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="Xvx6a4lH" Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2e52181c228so49328951fa.0 for ; Tue, 21 May 2024 02:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716284726; x=1716889526; 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=A25lOkPAYIem0QXdhyIts7q0LCcqMUXPkolw5JT6tE8=; b=Xvx6a4lH314okQqJ9pylwxi4TIrQKSzwBTkck4zwg4T41DQWbw9IDxwzmA75eoVE2E 5RmiAF4uhOnxx2/OpQcDNenWfx8cwBNxwZTLMTRunMlvnK16MlQzaJsq/g2jSgiIbKul ylRbCznYVyTwou2m6XCce7y+o/MauvIUr6vlRb6XleH5rJvhf7vAbc8AYRu5BV2jqp64 SsSw2rBm5XqukLia+jqMG3NLaV3inaKhxslpFInB/mhsKSFs9S5iabrJ2/SxGlfQ4ENW DfEzyzpftRYCynI96Ce/O/2JygDHA7aRl/P631s/h7X49NMLra0OAW5makMYpUu+NJsN XjEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716284726; x=1716889526; 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=A25lOkPAYIem0QXdhyIts7q0LCcqMUXPkolw5JT6tE8=; b=HmgZ30cuj9BkVJh/2iMMEWOPIhmu8GvPmrHOyFMMogndwbw9vcqvMFR4rh729nQckg T1OVOg8R4JU21D/dxu+95NXJnQ/nJ5l3axVd/5s85u1xLFQs4O2zAZZ2YIb8QPp4cUNX s7rczDjNtFazof6U7X9V/GlDU5zcXwmfuhKJCffg91Y5Dle++uHa1H/jKfDmo2ZGe+dB 3EKxmmOBhBNYEkhDFySXYPioOl+DG+hRHXn+wYt3BdXI/rQTuvpFDyrci8481CJkrzhH DFwh1GqGrMVHuIl/f06ONLJT1S+Ck8lxIRT5aneFfLBWklYhqipkp8pCNKEGsRz2Y3JL 5Dzg== X-Forwarded-Encrypted: i=1; AJvYcCV4jZcjhTpywh6vIvkrV6FIyH8QyWA2Zt9kC8Bsb0fS5QztG7dQhAIgEiGGNK/zC3Ate/rAR4QM7KepW0gvjVmDrvQa/h3YG5661cy7TPsLTQ== X-Gm-Message-State: AOJu0YwrZH8YM8obV2VJrqCMBZ2EQY4E2Rr/fOgT01SOh4hNMOcfiVN5 R/7mhNHnjV/S8MFugkADVP5RqgVa7iceryfOcO7Cwe1HIBL9WBS0EaarHqqayk8= X-Google-Smtp-Source: AGHT+IEAWe28pTg85AhhLUeeo7JJ7lfVb04BZMvFFnep7DU1veqKcLN+AogT8YrMcOrIFXgcishk6Q== X-Received: by 2002:a2e:9053:0:b0:2e7:bc7:b6ea with SMTP id 38308e7fff4ca-2e70bc7b72fmr75487961fa.14.1716284726753; Tue, 21 May 2024 02:45:26 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e706ee0a65sm13906261fa.112.2024.05.21.02.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:45:26 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 21 May 2024 12:45:22 +0300 Subject: [PATCH 02/12] wifi: wcn36xx: make use of QCOM_FW_HELPER Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240521-qcom-firmware-name-v1-2-99a6d32b1e5e@linaro.org> References: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> In-Reply-To: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Loic Poulain , Kalle Valo , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, Arnd Bergmann , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1730; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=93C6VdWrKA3F4L2pbTvmlVsMwuAb+l57jMfHeI9flc8=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ5pPrhGrlNQyruXtrrrFAV5mO7lzjzx0qWr/6p8ZZcok6 9XmGN3JaMzCwMjFICumyOJT0DI1ZlNy2IcdU+thBrEygUxh4OIUgIkkX2b/w3lVbFHDvhj1dTx5 zJ9idwhd+1Gr82OL/L5D4j5l77dIbV+ktCJm2Xx91oh63TtRWqrV1pV3kitkelPOGvdudGI1fP5 mR6/o3Aie5c9Kt3XPl8j6b7NDzlbveJsmb+5kX+X/vo7XLIR1d12X+e9Q3L9tsoTMlAuqnya+N2 1uiK8+Hsaq0prWs4E/drVY9hTRnamP9gV/npM+W2bHBYVFl3O6E6Yd6zqx0Smq+9a+D9+Fjfc// rhqzrzm559yZu/esGfzwj3iOsusG2WtDRSFGR6r68v8jfhW5HPWNquGhVlQycyZwWv//Uu+Rha3 TPJEthr4K2r21UfUvO7tMjqmdKX7h/V2vSOWq9V5mp0B X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Make the driver use qcom_fw_helper to autodetect the path to the calibration data file. Signed-off-by: Dmitry Baryshkov --- drivers/net/wireless/ath/wcn36xx/Kconfig | 1 + drivers/net/wireless/ath/wcn36xx/main.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/drivers/net/wireless/ath/wcn36xx/Kconfig b/drivers/net/wireless/ath/wcn36xx/Kconfig index 5832c7ef9352..90239c89676a 100644 --- a/drivers/net/wireless/ath/wcn36xx/Kconfig +++ b/drivers/net/wireless/ath/wcn36xx/Kconfig @@ -4,6 +4,7 @@ config WCN36XX depends on MAC80211 && HAS_DMA depends on QCOM_WCNSS_CTRL || QCOM_WCNSS_CTRL=n depends on RPMSG || RPMSG=n + select QCOM_FW_HELPER help This module adds support for wireless adapters based on Qualcomm Atheros WCN3660 and WCN3680 mobile chipsets. diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index e760d8002e09..8d25db81c1d0 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -1609,6 +1610,10 @@ static int wcn36xx_probe(struct platform_device *pdev) goto out_wq; } + wcn->nv_file = devm_qcom_get_board_fw(wcn->dev, wcn->nv_file); + if (!wcn->nv_file) + return -ENOMEM; + wcn->smd_channel = qcom_wcnss_open_channel(wcnss, "WLAN_CTRL", wcn36xx_smd_rsp_process, hw); if (IS_ERR(wcn->smd_channel)) { wcn36xx_err("failed to open WLAN_CTRL channel\n"); From patchwork Tue May 21 09:45:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13669104 Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (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 373296BB5E for ; Tue, 21 May 2024 09:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284731; cv=none; b=kvmtDSv9vE3Qg3S2TAxo5sELkfoAfTBv57LroK/3xjd8Sh3S2Z8n1WUZkXT12wl+ZgXk0cBMnsYN42ktjtsacPzOCH4i6l6frmcBetUP4Vyc3WqNXoD1YM94y6Q4aNL8wgBMToYe/kfhKPMRHqujkIC5ydJ3Ww7AS/GWqT0yu/0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284731; c=relaxed/simple; bh=mNFfoGKwazQZaJjxyTEqcayzLDaum8DceVCVSofmCS0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=S/pQaDzC6z93AZBKDJYaX7p588h5pauZwvlqQBi5szyh/QAiz4H6uGxDA5yYExUw+nL8swRqato/eXEowvtSTE4wVO2UeD8Ilo7xZf6NzrNxZ60AawdWt8JLhquVo6zh1IFvo/vsUtOlR74r5hqMFIMz7lWSvTbLRUmwNCLX+pM= 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=P6KVckUl; arc=none smtp.client-ip=209.85.208.180 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="P6KVckUl" Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2e78fe9fc2bso6179931fa.3 for ; Tue, 21 May 2024 02:45:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716284727; x=1716889527; 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=jecFdq9XX1dTw2yUnC7PhQdscC925IcSiTTnqz+9Dko=; b=P6KVckUlQH26Z3m/xAvLTPVDJTWPfSQvu86u+pCTvjZ9mtqK2rfk5OinwouDpSSg1L 4vS1M2aPpDeFCf+Zb2Q+bLGtKJiOGaWuicXN4HQ+06tmFGI+geRdosiqx15WbsuHrzAW BYEY3G/IUUoUi8SME8BUNOLjHMyDCest9HllgxWqQ7erUy48WmkUat3PsEWLOddLorLs yduR91Kw9QgRdRi2ILdMStbdv2iRPMVfXXWSUEytP5PajG8EqID09rKTQ+RZLyebXSLO N8eb5QFzELtj/CgFT1HUGJV9Szcirvb2KKxT9wEGsvPwVEvZ5u1ubGB3VAKxGDGUmr05 GSwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716284727; x=1716889527; 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=jecFdq9XX1dTw2yUnC7PhQdscC925IcSiTTnqz+9Dko=; b=ClHs9laajKQ1FxV1RNxlcvKRivtFhTutY/csb14r1lIwJyPAKqR1mMD0P+ZM+5R3jS ny+TDoZZzCJg/D8xLAxNFmySE9//SCqAR8q8es4VLvoufyF4v6JMtLgTWfnv4QpRLy/m 9etLDcEMehlj3FtkkSfGyAISa/EFRyHqc0ccd/YOs6pIUlkHF9hodRl2cmNMrT9em90d LUzLRMjGjWLqTWmf+LXVY0erdmh7D01p6Z4ipPZP08W2Czy+Ug/V6UWoVWlsStXPOocU rx3KcNfbt0SLAW0EWF/BF4/VriPYgFvaNsBPrc2oJNjOnhDRiVa0hxGMx28E0cymy2wq B8rw== X-Forwarded-Encrypted: i=1; AJvYcCV3K1EifnyJWH9GTbpUF95/c++T1V/+Gwul+ggT1on4qh0/O1Oq4xK2q8yfUPZC6k6zf8Pa3FLp8KyRZJc4Fgm4yCQWIJfjkChw6g1Qa6NUsg== X-Gm-Message-State: AOJu0YxTeQ36a4REUPg2banvG+6V3brfg94vAKkiyzrpWed8FQ4YH7Lu t1/yQERsjDM2ER8EUOo93cBVNcZkzRWCDhZ5ceR55mIoMFFg3x603tspHLTlgAc= X-Google-Smtp-Source: AGHT+IFTxQkrJDCzeLWrCudD84gAV/X79zi7LkAL7T4OG8XUDBbu4uZYig0wCSFlBu9Er2kpiaOZAg== X-Received: by 2002:a2e:4c0a:0:b0:2e6:cbe9:daf8 with SMTP id 38308e7fff4ca-2e6cbe9dc49mr129754251fa.6.1716284727368; Tue, 21 May 2024 02:45:27 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e706ee0a65sm13906261fa.112.2024.05.21.02.45.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:45:27 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 21 May 2024 12:45:23 +0300 Subject: [PATCH 03/12] soc: qcom: wcnss_ctrl: make use of QCOM_FW_HELPER Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240521-qcom-firmware-name-v1-3-99a6d32b1e5e@linaro.org> References: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> In-Reply-To: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Loic Poulain , Kalle Valo , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, Arnd Bergmann , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1682; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=mNFfoGKwazQZaJjxyTEqcayzLDaum8DceVCVSofmCS0=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmTG0ytxCXD9qErfoBB4dLiYJqZd9eQQ5WqLLah hC2GzIGtE+JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZkxtMgAKCRCLPIo+Aiko 1W0UB/0WIxQQuziOGJq6OrXgP3+CaPpTzT4eYVYq2Aqpda96s2TL+2HgwxZB/uhUg3keuJioam2 9FdpHEdSyzfmBX/Jtr9CO7KY6GIZWhdJl6J6hb0HwcBQn1Pc+048CtWwfaPTL9AHgEcL0Abd5Jz Q4YyqYvjEAhJachwYRntg0uKNHMtPR3FIUb+FMljvlT3tn6R+KYmD1vOiITNw5VB1wUcebPboDv EHCYLGaXllm97WQ3ntZTnb1F93Wse9ykyrTgR5tE22wbeGPehMr3Ze1RX8C8+ha6YnX/ImB072Z 9wkcz4k5PtVBXYjoAGylAC5zsPWVbvexxxHPusupRZJRWnvI X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Make the driver use qcom_fw_helper to autodetect the path to the calibration data file. Signed-off-by: Dmitry Baryshkov --- drivers/soc/qcom/Kconfig | 1 + drivers/soc/qcom/wcnss_ctrl.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index b663774d65f8..3af3f15175e4 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -238,6 +238,7 @@ config QCOM_WCNSS_CTRL tristate "Qualcomm WCNSS control driver" depends on ARCH_QCOM || COMPILE_TEST depends on RPMSG + select QCOM_FW_HELPER help Client driver for the WCNSS_CTRL SMD channel, used to download nv firmware to a newly booted WCNSS chip. diff --git a/drivers/soc/qcom/wcnss_ctrl.c b/drivers/soc/qcom/wcnss_ctrl.c index 148bcbac332d..7d1a4536226a 100644 --- a/drivers/soc/qcom/wcnss_ctrl.c +++ b/drivers/soc/qcom/wcnss_ctrl.c @@ -12,6 +12,7 @@ #include #include #include +#include #define WCNSS_REQUEST_TIMEOUT (5 * HZ) #define WCNSS_CBC_TIMEOUT (10 * HZ) @@ -214,11 +215,19 @@ static int wcnss_download_nv(struct wcnss_ctrl *wcnss, bool *expect_cbc) if (ret < 0 && ret != -EINVAL) goto free_req; + nvbin = qcom_get_board_fw(nvbin); + if (!nvbin) { + ret = -ENOMEM; + goto free_req; + } + ret = request_firmware(&fw, nvbin, dev); if (ret < 0) { dev_err(dev, "Failed to load nv file %s: %d\n", nvbin, ret); + kfree(nvbin); goto free_req; } + kfree(nvbin); data = fw->data; left = fw->size; From patchwork Tue May 21 09:45:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13669105 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 C4ADA6BFD5 for ; Tue, 21 May 2024 09:45:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284732; cv=none; b=AjyoTzNOB1X5HtFfbjlbI7o/1B4qHCULjNsXARffvDZquNoeYs7FRcjUDO329Xk/xUQEoHC8WgjvUyczpctkLEGDiM5WSrUtR4X8RBujzc0fdq0cWpP+8/cET1bQrHtq0vWPcEA2LWgLaga4XNgBLaKp/eD3noVwtjJlNzG/Jz0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284732; c=relaxed/simple; bh=cXnQhU7DTsaHUnDJalMnIg7XjAg9iNbwZVjIZgmeSpk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=e2h6ls+T4uw+KlJn+BoWaZMjP+rRzEW5MDQWvoI9tCwY9nDD/xULw2YpPypZCCwfrql2HBrT/0SzZ/bAOWOJN6O+LCxheTk5VU489tZO+0J3l1zEU++Gqrgkd7PSw4GBHXyY35C9w8eWOGdS6wbT4JaMAdtz7QtUDYzYi9Yhnqc= 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=c6L9dSyJ; arc=none smtp.client-ip=209.85.208.171 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="c6L9dSyJ" Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2e3fa13f018so46775291fa.3 for ; Tue, 21 May 2024 02:45:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716284728; x=1716889528; 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=sgcASYNTvkFLrMGDS2Eu8AcYhISRnJlaNxwD2bJ6AP0=; b=c6L9dSyJ0UDxhzPY2s7LGjyxjVKc6BcWwK6HFJjAcN1G5cKYLLPjdDFjqYUOWPO1T0 aXyTYCCSGy1YQw/PSsBtir8M/sPenBPFD/bAGPZJDxLgWHvsf837Bqi3RKDVDmMBflTz f1mPgAi5c1jwoibA/oKPeThGvtXc4lWVR5VpFb0UMXir9EyteAelKsNYvFVxT7H3QWmY oD8gEHqpAlRxpDlxfYdW15cDaHmws6V1lFrlY2iyH6TLPse/AwBx2ekW8aut7nIWYYib ic4LH+VRzf6YZtH143hmUzPcYWDb6005vQN8ibnN/PoG0g+JarV9B7vFBOfc3qV5CON+ a5+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716284728; x=1716889528; 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=sgcASYNTvkFLrMGDS2Eu8AcYhISRnJlaNxwD2bJ6AP0=; b=eu2drT7XZTpiCQz76+viCQtp2fbnUtYAxhnf97aNRkM7HlGpGn5ozg1pWbuTZCeP5z 1E2Hjsjia+Yx5155grrrQwzANn7EJO17nfBG9gZlvC+Crf5uZT5bjgHMFzA4oNwp+dE7 5xAtLPa2IgDr/45upoXBvrrMW45RyE3AzRX5hcjGCIf45gXhfrgdQXyQ6/fH/xtsWX18 /gLPnR7Lujg1TRB+Nu5z8aQji+rfROHgdIv7yhA8XZ5chxZAZzBzcIwg38alHDtHvUn4 GBjoaIf1Utu96we1ktSpbquzGp0Tr4GH6gJZ0SGokHTmkcDO8SFIHGz05L54yBVMKbRN YIxQ== X-Forwarded-Encrypted: i=1; AJvYcCUt+9m952BFZLPdAnpdW2HJYQrPT7Xvecb8AjNQr8xiurhwhsSEy94ssb2Io8mOlRGxpc3KQ/Gf1WxptBBohYo7HwviYJTaI/FwQvPAV5TFWA== X-Gm-Message-State: AOJu0YxNFzIoY3hSNf6YEcIQRp8qxPElzWRjp1pKKOul5VUbur1iiMDy hWKaa+LjpVBhfFtbOuZoYN1BMjzLzytTqtPFWNoT908S3ikUfachH+x4RyjISbA= X-Google-Smtp-Source: AGHT+IH+yWZDlb8bLS8nPxgS1saOotk0gFOAEFagqvE8965Yk3oeS5tWeCYbJp5/QyV9ROS9rcHYXg== X-Received: by 2002:a2e:7a19:0:b0:2e7:2a95:a735 with SMTP id 38308e7fff4ca-2e72a95b39emr30334991fa.0.1716284728093; Tue, 21 May 2024 02:45:28 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e706ee0a65sm13906261fa.112.2024.05.21.02.45.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:45:27 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 21 May 2024 12:45:24 +0300 Subject: [PATCH 04/12] remoteproc: qcom_q6v5_mss: switch to mbn files by default Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240521-qcom-firmware-name-v1-4-99a6d32b1e5e@linaro.org> References: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> In-Reply-To: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Loic Poulain , Kalle Valo , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, Arnd Bergmann , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=968; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=cXnQhU7DTsaHUnDJalMnIg7XjAg9iNbwZVjIZgmeSpk=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmTG0z325iTl+oMn1NQPrPRQ4Q6ZS6i5lCSsDT8 POtLZsdzk6JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZkxtMwAKCRCLPIo+Aiko 1Qx4B/9aFjIwgs7dL0sZ1cXYFdsxgqusHx8lV3ee+k6wrcZ50Tk67GjspFGGFf+/SurH08Rlaor P1exT5p9sVRAW5FCra4CzBSV/8p4CoSitkEeo4b7DxhOWrXhN73ATE0JLeoqzTwvlsrIORsRyS5 msC4jvfGmotWUr0mO/PbNY/cd4liaPOroxtECb2WF2eD7Dl91sYIonLL5f+I0NPJ0HL1/VXrShX cVLekJ/MtRuH8QjUxdC11CEpTNb8CWasj9+ltZbCjrNuQ5GOB3igW0r+MScMpyoIJQ8jNi+3onS DzH9oZmFQ4Fmx1ogoh9B0Ix2gxcm642ftyqgoPEQoOwegcvo X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A We have been pushing userspace to use mbn files by default for ages. As a preparation for making the firmware-name optional, make the driver use .mbn instead of .mdt files by default. Signed-off-by: Dmitry Baryshkov --- drivers/remoteproc/qcom_q6v5_mss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index 1779fc890e10..eeaae2505352 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -2003,7 +2003,7 @@ static int q6v5_probe(struct platform_device *pdev) qproc = rproc->priv; qproc->dev = &pdev->dev; qproc->rproc = rproc; - qproc->hexagon_mdt_image = "modem.mdt"; + qproc->hexagon_mdt_image = "modem.mbn"; ret = of_property_read_string_index(pdev->dev.of_node, "firmware-name", 1, &qproc->hexagon_mdt_image); if (ret < 0 && ret != -EINVAL) { From patchwork Tue May 21 09:45:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13669106 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 78B156CDD5 for ; Tue, 21 May 2024 09:45:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284732; cv=none; b=qW4YX+k7f3j1Vkqg6icr3knprNCysZuRybNReL16e3pFTL3HT9tG810I0ijDGY0Q2bUlrla7QuJ+rxKBSbypJyWlHZJyKhbujhCueBZhzKKAJeT9Pg29aJmseQsVg6JEay/6cSbRbXB+NBs0TSd+PTZLn6KuXtKyfmIQLHjtm6Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284732; c=relaxed/simple; bh=AFSw8YT67751JMyLAp98IxGcZ029778ZqkawJ08x+oE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CMtdRflXrvVPpdL6YJeDDW+Lo8kgHM7KxG51lRGouo3D3DTa6QFF/gofl50jrW/6DeH9p4iyZMVHY7WD6c8QrYdxlzTFiH1So03E9Oi7cq98xq+snEeK62LvVV46CgTigoth2YhJO0fpK8aEyJT5wVI/Dy1gFdDrUcul0p6aEpM= 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=UHQYHGVT; arc=none smtp.client-ip=209.85.208.171 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="UHQYHGVT" Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2e428242a38so71602631fa.2 for ; Tue, 21 May 2024 02:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716284729; x=1716889529; 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=mLwvRgxzyiUA9P6PtePLoWn9ddMKovViLDQnxnmP0yc=; b=UHQYHGVTxD+a0xllDLHfv+mjDIiMtUYRcRuWaNcN0FpQISogQsj1xnK9exUl53AJja 2b/U8N2HAK0B0T9FJYr+f0K9XHrnJ/MI2UZ/miRKsw+4bMuIK2YxItG2r+V5R4L4J3P3 EiQ74O2/mV5NPQb9gHLdvJyX8K1XKF+7MuODedLLixRKx3USX2ojcOCfGsZ6eqTX0oc3 cHXNnggXMDaWl8BEYvH2IUxjNKD58sV9lv8eMIdi1wT50mJIm8MFm0w4JIoeGxT6tnfx JqZpnKN/Bri54ISOcBQvR628vyoXCVTqndYI2gw62nGjUOeDN5qf/SmlYPl+rdWEXy1N pvcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716284729; x=1716889529; 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=mLwvRgxzyiUA9P6PtePLoWn9ddMKovViLDQnxnmP0yc=; b=VvejPTAnn1oX7WIyQMrgBh0b9DoT3RJA++TuJv1oFKPj/CivnKfwLXqppAWGIGTB+y EpMljHFiZfuDAFAJsDP68c8ecu2dIgFCXMEaoa3ne9ruNNAVy+pbYh6FH/lNv9XTVgTj 2rpWtNXX7TBoOkEy/EO6Yok2Se4oNLcbJkz7Wuu96gZ9z4rJeqixYHKx7Fsr60+15nPT v9IfZ5GWjAO7IAvNL//VrV8XIYU9AnpNgerI19AZIo6scEp9y9fZHRJW/vZPNnyAu9KJ U80+lPCj3UYIVY0iT0nT25kCnSmm+dljdiBOtpnZC5Vr85gPuBbZVCkGdBdrasmvHOqc ccdg== X-Forwarded-Encrypted: i=1; AJvYcCUEgLyIIp1CoiiTqrVjj9PYJ1FGFRbd976eQv04u5KPKibuvpYFmUx28yGOeKVrcADXn5MrQ2fziKsxavvFyI0o4fUPZxrOZtzxxB21XDn15g== X-Gm-Message-State: AOJu0YzrILfl2+uqyoZC+GaDU0LXkhVFScCSahBID5sfaX+N5F6neL0a 0po3sCqIGHVtlOZTBZ5KuBMCyp1EzILaLqfSUPWMjRsUBKtQSwr4hRNO6lkjtqo= X-Google-Smtp-Source: AGHT+IExtDU6eIGB/UhDwLpmGYGgqx7TmTkOXGGasOHtt5sJNIu6PQ+k6KYptjQOq6OpY/8WUsN8QQ== X-Received: by 2002:a2e:9695:0:b0:2e0:5d7:a3a6 with SMTP id 38308e7fff4ca-2e51fc3442emr243223051fa.9.1716284728901; Tue, 21 May 2024 02:45:28 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e706ee0a65sm13906261fa.112.2024.05.21.02.45.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:45:28 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 21 May 2024 12:45:25 +0300 Subject: [PATCH 05/12] remoteproc: qcom_q6v5_mss: make use of QCOM_FW_HELPER Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240521-qcom-firmware-name-v1-5-99a6d32b1e5e@linaro.org> References: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> In-Reply-To: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Loic Poulain , Kalle Valo , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, Arnd Bergmann , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1922; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=AFSw8YT67751JMyLAp98IxGcZ029778ZqkawJ08x+oE=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmTG0zGZpQHNbMeZOkJjcXVkAZVQriNGdtlZlml aDk9k8/t46JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZkxtMwAKCRCLPIo+Aiko 1Y7MB/sF+zRUmPQMKrXtX/YPgZdL4G5zOYWUCFIaS8soYxJVFrHzuqv0vhRVzxEImWBeTTRvwqt oyFljUHjrrmdVPkyPdR4rZHkPlu5DJoo4Opb+RkTwQFsyDgRbNXCzy1/ylM3ZsYRemWxxw8biMF UyES8aYOjeEVQWjNU+4PaSDxKJAu+tAGlT5v2qfDUqW8Yq4v+5kgCM4xRmNwWJsVwOm+gApLFGe 96dhfzWg6RBWsMrZ4lwGQLu5J8SYBJw0skYCMJvVsOZ/7WoYSdJ0UBcs/3butIUAyA5rLGsEx/w KlzDyJbnHl9KGtCug8ov3LoHbBXw8RoDT5NRiiImki+2AKQw X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Make the driver use qcom_fw_helper to autodetect the path to the calibration data file. Signed-off-by: Dmitry Baryshkov --- drivers/remoteproc/Kconfig | 1 + drivers/remoteproc/qcom_q6v5_mss.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index 48845dc8fa85..884e1e69bbb6 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -202,6 +202,7 @@ config QCOM_Q6V5_MSS depends on RPMSG_QCOM_GLINK || RPMSG_QCOM_GLINK=n depends on QCOM_AOSS_QMP || QCOM_AOSS_QMP=n select MFD_SYSCON + select QCOM_FW_HELPER select QCOM_MDT_LOADER select QCOM_PIL_INFO select QCOM_Q6V5_COMMON diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c index eeaae2505352..1ccd5bb92952 100644 --- a/drivers/remoteproc/qcom_q6v5_mss.c +++ b/drivers/remoteproc/qcom_q6v5_mss.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -1990,8 +1991,13 @@ static int q6v5_probe(struct platform_device *pdev) return ret; } + mba_image = qcom_get_board_fw(mba_image); + if (!mba_image) + return -ENOMEM; + rproc = devm_rproc_alloc(&pdev->dev, pdev->name, &q6v5_ops, mba_image, sizeof(*qproc)); + kfree(mba_image); if (!rproc) { dev_err(&pdev->dev, "failed to allocate rproc\n"); return -ENOMEM; @@ -2011,6 +2017,10 @@ static int q6v5_probe(struct platform_device *pdev) return ret; } + qproc->hexagon_mdt_image = devm_qcom_get_board_fw(&pdev->dev, qproc->hexagon_mdt_image); + if (!qproc->hexagon_mdt_image) + return -ENOMEM; + platform_set_drvdata(pdev, qproc); qproc->has_qaccept_regs = desc->has_qaccept_regs; From patchwork Tue May 21 09:45:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13669107 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (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 6DE9A71B3B for ; Tue, 21 May 2024 09:45:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284734; cv=none; b=DlAZUwBQFRls2Gx7v3+fFQVNPEQGMRgAX/JgZUj1BM40tH4o2vAIHIRNfChBwCQGRXphMHvigrv5P/ooMRPjyrFFmk5bbevIRK/Qok3NVl0DTejocBuT20X69+S9d+qEEJW1wts3/iTdPvE5Mkc5EBQMXyoieY/WLHayTWKXaLI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284734; c=relaxed/simple; bh=3GMSFXyN5ilu4SqpHge+aFL3zkwzk7yL0BcyJB6jSAk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JMtmaZJ14c+jtfjvo3CBdpKpTygdVuY4oZBZGF0nXd62J6QIC4bwTEFos2rCKAH5E1jXuN2BYZdhWVXeu7dSutWVMJtV9zR+aQPMdq459Ir5WfqSxqNJdt7h4OtjYFXIaK/ErNj01ClKvgWKAKVxXG4Yw3wNebDm4DEVnYwQqA0= 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=S+EHt4L3; arc=none smtp.client-ip=209.85.208.177 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="S+EHt4L3" Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2e724bc466fso25599921fa.3 for ; Tue, 21 May 2024 02:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716284729; x=1716889529; 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=cIq/k/IeC60qZbvt7sKK/1GOc3t+5RIB9rwIXTiRrZ8=; b=S+EHt4L34umNNqJHGRPfejgWBFW6X733iAtImHkC+W82Zhev78I7Ha1LJ8QTjh83l+ 5uCvb2RbHbTuMd40P/72RlqgzO55nwnE4auxW2c7K/9vlmbkBK/b5h0otEOcCMQil1QC haTU8mmxlQOYMYTduv1hzyHSigucoXdC+gs9duKyeLnk3CVpOcei5v9IF5FLeL8yU2LX taMcHFUFi1AXdfre5ujEKg1ZayPWyuQ8L9qgdNcdOuEeTY8u7Hp0sbl9DiVdlKLJRfgr dlUPfpRM1dhsI0NczwRRaD0BlPX+J+/vdMURcjDiO6/JAGHXUG9hx52Xu+RwzwNNFg7z FzTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716284729; x=1716889529; 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=cIq/k/IeC60qZbvt7sKK/1GOc3t+5RIB9rwIXTiRrZ8=; b=pYqvswDm5Du6vhsK/JlS+q44ul9EGTxAP89ztZCYneVSIKGKonhE/DM3DvnM98WTfG 3cqBupYR/BHzFma6iV0TLr2qm12wqZiU7fUXEWq8dLWs1/u6vRppzXmdgIwW0mM2sPv6 XGqZXGuiC+kSqhU5pP1h6DMyZ57lrVMVCEL9HQsoHpVez0vDFPlW+N9A3qbImkWgWLCe EODJWrKFYMOLSCTCExP3i0Uhsi8McYFOKki8VG8X80uqlcQmEAWa735sswocmBvWuXVt QcH9ngEs8tTHy7qslhjgM5x8y31YJprrmnvTsqlSOQWa0YZBYrhy2roUzhP6jLsvCQGv 9b8A== X-Forwarded-Encrypted: i=1; AJvYcCXdOjLmr/aqa6rN+MDFNTcbFVSOs9O/tCh718wa+4Fh/OYy2x0Zpk9zk2jf+9zsCIY19CbV2gviyS2dd2pku5XG/X2jsyxggRLQbIpfhYZBoQ== X-Gm-Message-State: AOJu0YwzMa2rQVvzKI3MnVIiU+b1n65yht7fQJ/2lCRMQsrEjLbnGdNY c50jPeA0f0/UkbGgCbEmaFFi3Hxh/wSenWWuxm9vRTzwLzyYjGazD4lZKFlB40Y= X-Google-Smtp-Source: AGHT+IEKa17r23iQKv2XCAX0BvXMw/CFrDizcCAluTCl+f1X45ThXZiwZbDwMMNPQaw/SpE9aBJK5A== X-Received: by 2002:a2e:a98d:0:b0:2dd:cb34:ddbc with SMTP id 38308e7fff4ca-2e5205c8fc4mr346995051fa.48.1716284729715; Tue, 21 May 2024 02:45:29 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e706ee0a65sm13906261fa.112.2024.05.21.02.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:45:29 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 21 May 2024 12:45:26 +0300 Subject: [PATCH 06/12] remoteproc: qcom_q6v5_pas: switch to mbn files by default Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240521-qcom-firmware-name-v1-6-99a6d32b1e5e@linaro.org> References: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> In-Reply-To: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Loic Poulain , Kalle Valo , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, Arnd Bergmann , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=10421; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=3GMSFXyN5ilu4SqpHge+aFL3zkwzk7yL0BcyJB6jSAk=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmTG0zpMk5r9LDAbiXaAl3+dyLkGHHAYS+fYqa4 8Y/ZWNFgpGJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZkxtMwAKCRCLPIo+Aiko 1crYCACvwdcoc2mokea78aIQPXX1+SXGckOyXSENXcp1uX+WshgqbPy5srU10vhEu2s3Sc2E81T j+3C5Bib57Z1xdUNrEumkpy9BpTieY4WaECHo7fF5R3eF96TuaahK7VQM8gEWaFh5RFdiQeO4w9 gV6ZpGSfdzW5Acs+oJGmPBCgb7vu/GltAV/bVo84tl+bP9ZwIj+D8f7Ts1p21Vwsx+v9EIRzSJM w2Q38ct0DR2QpCRD+z0j1Pebx6lnPFwrsMDhT+BKLaxoWFJ92/TxgFq6RrbEp6ajqIExf0loCzI v7fqVN2B+G3ijH4tC2DrDNfXm3OkEGgOtmH13dlNKw479pFw X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A We have been pushing userspace to use mbn files by default for ages. As a preparation for making the firmware-name optional, make the driver use .mbn instead of .mdt files by default. Signed-off-by: Dmitry Baryshkov --- drivers/remoteproc/qcom_q6v5_pas.c | 76 +++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 54d8005d40a3..4694ec4f038d 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -812,7 +812,7 @@ static void adsp_remove(struct platform_device *pdev) static const struct adsp_data adsp_resource_init = { .crash_reason_smem = 423, - .firmware_name = "adsp.mdt", + .firmware_name = "adsp.mbn", .pas_id = 1, .auto_boot = true, .ssr_name = "lpass", @@ -822,7 +822,7 @@ static const struct adsp_data adsp_resource_init = { static const struct adsp_data sdm845_adsp_resource_init = { .crash_reason_smem = 423, - .firmware_name = "adsp.mdt", + .firmware_name = "adsp.mbn", .pas_id = 1, .auto_boot = true, .load_state = "adsp", @@ -833,7 +833,7 @@ static const struct adsp_data sdm845_adsp_resource_init = { static const struct adsp_data sm6350_adsp_resource = { .crash_reason_smem = 423, - .firmware_name = "adsp.mdt", + .firmware_name = "adsp.mbn", .pas_id = 1, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -849,7 +849,7 @@ static const struct adsp_data sm6350_adsp_resource = { static const struct adsp_data sm6375_mpss_resource = { .crash_reason_smem = 421, - .firmware_name = "modem.mdt", + .firmware_name = "modem.mbn", .pas_id = 4, .minidump_id = 3, .auto_boot = false, @@ -864,7 +864,7 @@ static const struct adsp_data sm6375_mpss_resource = { static const struct adsp_data sm8150_adsp_resource = { .crash_reason_smem = 423, - .firmware_name = "adsp.mdt", + .firmware_name = "adsp.mbn", .pas_id = 1, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -879,7 +879,7 @@ static const struct adsp_data sm8150_adsp_resource = { static const struct adsp_data sm8250_adsp_resource = { .crash_reason_smem = 423, - .firmware_name = "adsp.mdt", + .firmware_name = "adsp.mbn", .pas_id = 1, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -895,7 +895,7 @@ static const struct adsp_data sm8250_adsp_resource = { static const struct adsp_data sm8350_adsp_resource = { .crash_reason_smem = 423, - .firmware_name = "adsp.mdt", + .firmware_name = "adsp.mbn", .pas_id = 1, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -911,7 +911,7 @@ static const struct adsp_data sm8350_adsp_resource = { static const struct adsp_data msm8996_adsp_resource = { .crash_reason_smem = 423, - .firmware_name = "adsp.mdt", + .firmware_name = "adsp.mbn", .pas_id = 1, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -925,7 +925,7 @@ static const struct adsp_data msm8996_adsp_resource = { static const struct adsp_data cdsp_resource_init = { .crash_reason_smem = 601, - .firmware_name = "cdsp.mdt", + .firmware_name = "cdsp.mbn", .pas_id = 18, .auto_boot = true, .ssr_name = "cdsp", @@ -935,7 +935,7 @@ static const struct adsp_data cdsp_resource_init = { static const struct adsp_data sdm845_cdsp_resource_init = { .crash_reason_smem = 601, - .firmware_name = "cdsp.mdt", + .firmware_name = "cdsp.mbn", .pas_id = 18, .auto_boot = true, .load_state = "cdsp", @@ -946,7 +946,7 @@ static const struct adsp_data sdm845_cdsp_resource_init = { static const struct adsp_data sm6350_cdsp_resource = { .crash_reason_smem = 601, - .firmware_name = "cdsp.mdt", + .firmware_name = "cdsp.mbn", .pas_id = 18, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -962,7 +962,7 @@ static const struct adsp_data sm6350_cdsp_resource = { static const struct adsp_data sm8150_cdsp_resource = { .crash_reason_smem = 601, - .firmware_name = "cdsp.mdt", + .firmware_name = "cdsp.mbn", .pas_id = 18, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -977,7 +977,7 @@ static const struct adsp_data sm8150_cdsp_resource = { static const struct adsp_data sm8250_cdsp_resource = { .crash_reason_smem = 601, - .firmware_name = "cdsp.mdt", + .firmware_name = "cdsp.mbn", .pas_id = 18, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -992,7 +992,7 @@ static const struct adsp_data sm8250_cdsp_resource = { static const struct adsp_data sc8280xp_nsp0_resource = { .crash_reason_smem = 601, - .firmware_name = "cdsp.mdt", + .firmware_name = "cdsp.mbn", .pas_id = 18, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -1006,7 +1006,7 @@ static const struct adsp_data sc8280xp_nsp0_resource = { static const struct adsp_data sc8280xp_nsp1_resource = { .crash_reason_smem = 633, - .firmware_name = "cdsp.mdt", + .firmware_name = "cdsp.mbn", .pas_id = 30, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -1020,8 +1020,8 @@ static const struct adsp_data sc8280xp_nsp1_resource = { static const struct adsp_data x1e80100_adsp_resource = { .crash_reason_smem = 423, - .firmware_name = "adsp.mdt", - .dtb_firmware_name = "adsp_dtb.mdt", + .firmware_name = "adsp.mbn", + .dtb_firmware_name = "adsp_dtb.mbn", .pas_id = 1, .dtb_pas_id = 0x24, .lite_pas_id = 0x1f, @@ -1040,8 +1040,8 @@ static const struct adsp_data x1e80100_adsp_resource = { static const struct adsp_data x1e80100_cdsp_resource = { .crash_reason_smem = 601, - .firmware_name = "cdsp.mdt", - .dtb_firmware_name = "cdsp_dtb.mdt", + .firmware_name = "cdsp.mbn", + .dtb_firmware_name = "cdsp_dtb.mbn", .pas_id = 18, .dtb_pas_id = 0x25, .minidump_id = 7, @@ -1060,7 +1060,7 @@ static const struct adsp_data x1e80100_cdsp_resource = { static const struct adsp_data sm8350_cdsp_resource = { .crash_reason_smem = 601, - .firmware_name = "cdsp.mdt", + .firmware_name = "cdsp.mbn", .pas_id = 18, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -1076,7 +1076,7 @@ static const struct adsp_data sm8350_cdsp_resource = { static const struct adsp_data mpss_resource_init = { .crash_reason_smem = 421, - .firmware_name = "modem.mdt", + .firmware_name = "modem.mbn", .pas_id = 4, .minidump_id = 3, .auto_boot = false, @@ -1093,7 +1093,7 @@ static const struct adsp_data mpss_resource_init = { static const struct adsp_data sc8180x_mpss_resource = { .crash_reason_smem = 421, - .firmware_name = "modem.mdt", + .firmware_name = "modem.mbn", .pas_id = 4, .auto_boot = false, .proxy_pd_names = (char*[]){ @@ -1108,7 +1108,7 @@ static const struct adsp_data sc8180x_mpss_resource = { static const struct adsp_data msm8996_slpi_resource_init = { .crash_reason_smem = 424, - .firmware_name = "slpi.mdt", + .firmware_name = "slpi.mbn", .pas_id = 12, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -1122,7 +1122,7 @@ static const struct adsp_data msm8996_slpi_resource_init = { static const struct adsp_data sdm845_slpi_resource_init = { .crash_reason_smem = 424, - .firmware_name = "slpi.mdt", + .firmware_name = "slpi.mbn", .pas_id = 12, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -1138,7 +1138,7 @@ static const struct adsp_data sdm845_slpi_resource_init = { static const struct adsp_data wcss_resource_init = { .crash_reason_smem = 421, - .firmware_name = "wcnss.mdt", + .firmware_name = "wcnss.mbn", .pas_id = 6, .auto_boot = true, .ssr_name = "mpss", @@ -1148,7 +1148,7 @@ static const struct adsp_data wcss_resource_init = { static const struct adsp_data sdx55_mpss_resource = { .crash_reason_smem = 421, - .firmware_name = "modem.mdt", + .firmware_name = "modem.mbn", .pas_id = 4, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -1163,7 +1163,7 @@ static const struct adsp_data sdx55_mpss_resource = { static const struct adsp_data sm8450_mpss_resource = { .crash_reason_smem = 421, - .firmware_name = "modem.mdt", + .firmware_name = "modem.mbn", .pas_id = 4, .minidump_id = 3, .auto_boot = false, @@ -1181,8 +1181,8 @@ static const struct adsp_data sm8450_mpss_resource = { static const struct adsp_data sm8550_adsp_resource = { .crash_reason_smem = 423, - .firmware_name = "adsp.mdt", - .dtb_firmware_name = "adsp_dtb.mdt", + .firmware_name = "adsp.mbn", + .dtb_firmware_name = "adsp_dtb.mbn", .pas_id = 1, .dtb_pas_id = 0x24, .minidump_id = 5, @@ -1200,8 +1200,8 @@ static const struct adsp_data sm8550_adsp_resource = { static const struct adsp_data sm8550_cdsp_resource = { .crash_reason_smem = 601, - .firmware_name = "cdsp.mdt", - .dtb_firmware_name = "cdsp_dtb.mdt", + .firmware_name = "cdsp.mbn", + .dtb_firmware_name = "cdsp_dtb.mbn", .pas_id = 18, .dtb_pas_id = 0x25, .minidump_id = 7, @@ -1220,8 +1220,8 @@ static const struct adsp_data sm8550_cdsp_resource = { static const struct adsp_data sm8550_mpss_resource = { .crash_reason_smem = 421, - .firmware_name = "modem.mdt", - .dtb_firmware_name = "modem_dtb.mdt", + .firmware_name = "modem.mbn", + .dtb_firmware_name = "modem_dtb.mbn", .pas_id = 4, .dtb_pas_id = 0x26, .minidump_id = 3, @@ -1243,7 +1243,7 @@ static const struct adsp_data sm8550_mpss_resource = { static const struct adsp_data sc7280_wpss_resource = { .crash_reason_smem = 626, - .firmware_name = "wpss.mdt", + .firmware_name = "wpss.mbn", .pas_id = 6, .auto_boot = true, .proxy_pd_names = (char*[]){ @@ -1259,8 +1259,8 @@ static const struct adsp_data sc7280_wpss_resource = { static const struct adsp_data sm8650_cdsp_resource = { .crash_reason_smem = 601, - .firmware_name = "cdsp.mdt", - .dtb_firmware_name = "cdsp_dtb.mdt", + .firmware_name = "cdsp.mbn", + .dtb_firmware_name = "cdsp_dtb.mbn", .pas_id = 18, .dtb_pas_id = 0x25, .minidump_id = 7, @@ -1283,8 +1283,8 @@ static const struct adsp_data sm8650_cdsp_resource = { static const struct adsp_data sm8650_mpss_resource = { .crash_reason_smem = 421, - .firmware_name = "modem.mdt", - .dtb_firmware_name = "modem_dtb.mdt", + .firmware_name = "modem.mbn", + .dtb_firmware_name = "modem_dtb.mbn", .pas_id = 4, .dtb_pas_id = 0x26, .minidump_id = 3, From patchwork Tue May 21 09:45:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13669108 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 0C6B87319A for ; Tue, 21 May 2024 09:45:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284734; cv=none; b=r4hjBO5OXLPUatQlr/1QD3xFTe39iUG+wYnX2IDk9AQGVr9ZNA8daniz46dzkwFiSl4MsbS4DfCkHNCOQ4M/CcNxbwdg5PfNdyhEzGZD7b9WTKQFwL9n25+otlSgHIAYb5AoU+zENPR0GZTgUKJa7Hm5VnCpnSp20kMbksFubvQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284734; c=relaxed/simple; bh=LXkde7roNdCA5RiqXlZv5DapdIAdFkD6mr6zmTWtmTw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ccxVH0ThmV5B767ZLrL+8/zmjdUI1naUXdz3H8DpsKrptNl2fpIQh1VvqYUsaCqRd9QTaKdB03mdC5GVgq3hv6clo6Co3WT8ZS6Xm9NOvyAhlg6Q9YGStH1vNiJMWx2c7VK63jeGvh9k2QirN4SEOV+G0/nIynp12CU5i20vCPE= 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=Yndy3JFS; arc=none smtp.client-ip=209.85.208.171 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="Yndy3JFS" Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2e3e18c240fso46564611fa.0 for ; Tue, 21 May 2024 02:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716284730; x=1716889530; 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=h832anITW8A4X0+wlt4pMVjTXDOHgXNK3h0zens11dU=; b=Yndy3JFSQOK8ny5Pjqj5nRkt2vny6dpLUXXXajJmx8M7GHuFDBkLbbJk7le/dF23ZN 8rEAEV5I6S12E7DYa370A5wOK7NgqkwSq5Q6FLg64J5cu3HcCNy5CtsT9KHl7YPwe4SR XlW2nidcTnpmvBu5glUx+l0Ul5V3QXPZre0iSHFW6yDy7l0suy3B1Xf5uOR/C688KgaZ 1Puguzb4C/gI/nfoW488rytuMAr/su9BSgU2wsN0Gd2XW5MeiqXGgoT/l3UC6mbGY09f mw/JUg4bdl3QxSpgakGE1MpyNXnAMCz0Q55/yU/pirrzynkJMzJyk4u4L9BaWl93G0eS ja6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716284730; x=1716889530; 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=h832anITW8A4X0+wlt4pMVjTXDOHgXNK3h0zens11dU=; b=h5g8uYt7Ilq4fHUZi4ntUj6LLtFzymfwfgadn0byOj933IjvrZPy9Hz9ITlsdo3Fpp Lu5DX+9PHyYw9DLJOkouGN182Vs2kNP13jRTluCAPfr/X/gOSit/9lazbdOw85vttjPc Zd+ww0WsQW0O77ggLPOXwiX5ZHlIijHa+mFWdzHGfZYjltHChNC8FAeddQGV2A+PpfsF Xs48c4JXQUn24B+o5p3IPQyopenCgF1Nk7WIGtp0zMKy77fFTLl5ZgLxF4+ys3SUpWp6 21LuysOAhEx0vT8fjozoOGJkUd5yG34nNi9j+xloxa+GOQGiL9gxvzxDAyVhoBDLjcIx uu3g== X-Forwarded-Encrypted: i=1; AJvYcCV0w2dZScWjlKdQEMuZPNOLnnyF5c+vinQ/kinpgRwuIVfZhZq8rFrfHaHqgjhO2783BMadf73jmEyDqTkj7RDPDLrcs0ybcVaU+AqyYEkPXw== X-Gm-Message-State: AOJu0Yxtf8EeQgnxkZN2OoZxc8kzJ+wND5/n4+5A1LdpGHAqJOs44+KJ G7Hp5v+YKaMNXg9V0KUfBufbjfADlGKb8xL7Pl+HvzdQY+KAghd0PRABYBjPKV8= X-Google-Smtp-Source: AGHT+IEcIY8h4MViTxQwWwqeUoj25uDkIjguJWgmCmNuJWowFj8tcwGKQRvY8Y2jNkYsGpgXWPLuiQ== X-Received: by 2002:a2e:9f4f:0:b0:2e6:f51e:ec1b with SMTP id 38308e7fff4ca-2e6f51eedd3mr168497591fa.3.1716284730390; Tue, 21 May 2024 02:45:30 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e706ee0a65sm13906261fa.112.2024.05.21.02.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:45:30 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 21 May 2024 12:45:27 +0300 Subject: [PATCH 07/12] remoteproc: qcom_q6v5_pas: make use of QCOM_FW_HELPER Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240521-qcom-firmware-name-v1-7-99a6d32b1e5e@linaro.org> References: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> In-Reply-To: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Loic Poulain , Kalle Valo , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, Arnd Bergmann , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1771; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=LXkde7roNdCA5RiqXlZv5DapdIAdFkD6mr6zmTWtmTw=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmTG0ztEDbiBUwdFTHantDBNI67jC6CkE6jTStI DUBBlDj+sKJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZkxtMwAKCRCLPIo+Aiko 1ateCACA8fdJTGUFyqavoy+BefLiojGkW0ckGZOdHnmEcupX4OyFqKuRYWb7RFv2x1GQO/175W9 /j+8Q82CAXNCl5roYzW2GnFjcWa5NnHHjk97bGbJcVvgAvLfUNSbT6yCC8gfIgj3LMdrSk5Tsdq PnFP4zQ0ugU2Et2RUt6lwTkZRPRUevmxbwH4t+qYJgxebP/+Upic1FWXBJpuyWuEmJxgaQYb/e2 nH7vXuWfB7jwmOkCCk3zP+bdH99GLKAq02xWCp+f53Jvlck2j+V5ssX2BfWQX3v+i/E40qfgLgB XCJQt8z1tUODh2nOnLoqSa/KLd1yQ3pwCZQMmVw7vK/qGVzw X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Make the driver use qcom_fw_helper to autodetect the path to the calibration data file. Signed-off-by: Dmitry Baryshkov --- drivers/remoteproc/Kconfig | 1 + drivers/remoteproc/qcom_q6v5_pas.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index 884e1e69bbb6..7bb22fdb64e4 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -223,6 +223,7 @@ config QCOM_Q6V5_PAS depends on RPMSG_QCOM_GLINK || RPMSG_QCOM_GLINK=n depends on QCOM_AOSS_QMP || QCOM_AOSS_QMP=n select MFD_SYSCON + select QCOM_FW_HELPER select QCOM_PIL_INFO select QCOM_MDT_LOADER select QCOM_Q6V5_COMMON diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c index 4694ec4f038d..893fda54b598 100644 --- a/drivers/remoteproc/qcom_q6v5_pas.c +++ b/drivers/remoteproc/qcom_q6v5_pas.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -705,11 +706,19 @@ static int adsp_probe(struct platform_device *pdev) &dtb_fw_name); if (ret < 0 && ret != -EINVAL) return ret; + + dtb_fw_name = devm_qcom_get_board_fw(&pdev->dev, dtb_fw_name); + if (!dtb_fw_name) + return -ENOMEM; } if (desc->minidump_id) ops = &adsp_minidump_ops; + fw_name = qcom_get_board_fw(fw_name); + if (!fw_name) + return -ENOMEM; + rproc = devm_rproc_alloc(&pdev->dev, pdev->name, ops, fw_name, sizeof(*adsp)); if (!rproc) { From patchwork Tue May 21 09:45:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13669109 Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (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 C081B74297 for ; Tue, 21 May 2024 09:45:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284735; cv=none; b=C5UG0ywgi0mX27LirZAgEJkM0MB95DHy22nS5CDeFw7kmF42GkDcYRgJsR79nC3OvoOdwckCtpbVcS1X7ijFK70LeJZ/dZYK1SfQ2NMchjfaKCNjw3ExdoXkueodbuEZG+OfrZ0smDNdEY66pNf+Sssu6mH1nKGszPi/II0WecM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284735; c=relaxed/simple; bh=KYeL6fzQJLtDEFcKxFdxIcSfLdT+Pm9+X1ULYtcduSA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fhvknkgDB52CRSbqu/DDYZOmtV/jezjeNz/Bazs84H7rH+AISdI8RJSUrQ+zM48AsaRZiUhGW5GKu55udzqhKR7+upC0xKIwIUj9VY7itcICOCwfjfGDlx30qmDqEWvmdWW9b+BVAvc/rAHM2w7ecK0AyC4SpJndVmFPo5N5lEc= 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=GQ2FynWn; arc=none smtp.client-ip=209.85.208.170 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="GQ2FynWn" Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2e724bc46bfso23905561fa.3 for ; Tue, 21 May 2024 02:45:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716284731; x=1716889531; 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=iBE4lAUl0jnuiv7iz7pI4tDd8+Db2+0Bfaal2oLW0IQ=; b=GQ2FynWnuYxgtINUU7mAj7fYGbp8WvtXUN5NtcDCAWNXUQfeuWJhswDnL+NcNYtAMK VMJ0d8oUPDATc/R2Tp/VH1p8kPBteKipP7b0X6GIdp9weqBsOMxDSIWoHfdBlKGEHALj R/F2u6Vnh0gr3VCS1LJy68fXiwc57NAaBRJwD9Ps97WofmHLqsIestCuN57GcBW4mDTR AEEopCQLB8380+vU1gmztshEwTi4Py0fz1spyrpnskk4zU5SPPOXBNYXIqYurU9ZFRnR 5VXRQMaaycLqXwCwY6QplJ/cu6JV0dswprfvx3/o8jxgnQbEp6tWEMtKqWlb/vDLLQjC lUoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716284731; x=1716889531; 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=iBE4lAUl0jnuiv7iz7pI4tDd8+Db2+0Bfaal2oLW0IQ=; b=POR81WcHkhlHFDF7hx2ATVewMyIFvPUAf1gObtYWCEwdt6crVvXH+Cl3wk0D9ycDiS 5DXxCjKMowoamt0TQ9fNd2IaPvSp09a1FDlHywcHwzGBitafU6iOQ5KuuDmVLYuPkVOl g+BO3nsDb2yDb12vBztSM9jtrCz+lelBeCviu3ZN+M77MNVEWEs3jqjOXvbQ3hlQybTc ta+wX/wvPW64FaDA/1X/Ss3Ggznq9qWPEZaDI/riiIUfZhP1WL4Y2A66s9gWfXMeBl+q pUDfplzLlAsBpeA1Ynqz/YnUV19a4kyla/L45NAqtDS8t3m6NW/o56bfNVHFf6rxCtn2 PiRQ== X-Forwarded-Encrypted: i=1; AJvYcCXpzdeT1rEm44rRbDJLKM7ejemVM6Hv6VJs8Vi4X2DP8QYgK5sY7nlEtEhmkGJPuUHa9mntSEXWmdZ4Qhobmi5Ol1llVIu3YVYP3yAyMeV/dg== X-Gm-Message-State: AOJu0YydFonXbnWOzU4tgqb7hJlJvSv44kgh96MXk3rYNiKOoDRGPufT y+pCvwFodOJOx7mrbRwMd8FCR2GpaFy+1vVlMIKR6fbDV81we2zIUwKB/feORaA= X-Google-Smtp-Source: AGHT+IHzcUNZO8UU45sIJhia3FHxalrz4nI32qKpSaF4TZAeoccmSFsXSvuTN3qrodcUwVMYK1VTsA== X-Received: by 2002:a05:651c:550:b0:2df:b0e3:b548 with SMTP id 38308e7fff4ca-2e5203a4a63mr211085821fa.42.1716284731080; Tue, 21 May 2024 02:45:31 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e706ee0a65sm13906261fa.112.2024.05.21.02.45.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:45:30 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 21 May 2024 12:45:28 +0300 Subject: [PATCH 08/12] remoteproc: qcom_wcnss: switch to mbn files by default Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240521-qcom-firmware-name-v1-8-99a6d32b1e5e@linaro.org> References: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> In-Reply-To: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Loic Poulain , Kalle Valo , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, Arnd Bergmann , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=797; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=KYeL6fzQJLtDEFcKxFdxIcSfLdT+Pm9+X1ULYtcduSA=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmTG0zylaYYAi4WtQBwoY6076Qo7Qdy96aZKFjd wLNy+fpnO6JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZkxtMwAKCRCLPIo+Aiko 1fvHB/9//VeTwe64X5V5/y6fzXatmuogy3IboJj/4PO6s8ICnmnwC4o9lTR4kuoxpEvetn13NlU fdi9Gp8BdjJczasVS0hE1zVA4sM5HZxgX/Mcpua/nM0k1VzBuMYzKSl8NywcFU+3/0Oi8l4Tw/4 Fn0prJzv/Ad8J1j+ak5RNff/Z3k3GUQ1K+RUeM/JbctyguEwww1OeX3gp7oAEr1qYBXgV4ajRke oXfC28+zssG07aan4pCz6gfU9dqK/GoM1/QH2XFD5FDqI6xRZbDj5QnE/Ob8/MJr0SidI8wq4UR WzLeHP0OyulHgkF/EyCu3e67qwnzrdT0sVcXcsgqhW6mASqO X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A We have been pushing userspace to use mbn files by default for ages. As a preparation for making the firmware-name optional, make the driver use .mbn instead of .mdt files by default. Signed-off-by: Dmitry Baryshkov --- drivers/remoteproc/qcom_wcnss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index a7bb9da27029..421a3943a90d 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -32,7 +32,7 @@ #include "qcom_wcnss.h" #define WCNSS_CRASH_REASON_SMEM 422 -#define WCNSS_FIRMWARE_NAME "wcnss.mdt" +#define WCNSS_FIRMWARE_NAME "wcnss.mbn" #define WCNSS_PAS_ID 6 #define WCNSS_SSCTL_ID 0x13 From patchwork Tue May 21 09:45:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13669110 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (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 8DD1F74C09 for ; Tue, 21 May 2024 09:45:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284736; cv=none; b=QddVHYgUhKNej9oQrBDFDEFC+xZo4zcWCz++OmW9R5gyjuAF0JRLndYV1Fyf330CO/xL05EyHdEb7SuntvNOagAwgMranrx1gJuWvV2kQ9g58DWUcLduB36NR8BplzXzUIYAuO4Rc4ENgD4J617vX3fh+mMlkK9SXlibfvDyEaA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284736; c=relaxed/simple; bh=DTUqzTL8iOBwkoam3qEvEmtJacPSZ5s4Txv1FotXGIM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Ropl1RetAhS+LQicdfmYzNvlTWcchRGTSD4+Obnlfnkba2TnqVhamC/Br+dFhNdmmfSTU0boVMAhzmWlUkX8lENi37rkPcj4la77BopyfSbJNJUdMr6xLZ8XtxGYTIVAbvaiVrCNiVod06baozSt50d1xfFvUasXlVxKnOlqNB4= 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=q7ec7037; arc=none smtp.client-ip=209.85.167.45 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="q7ec7037" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-51fdc9af005so7090244e87.3 for ; Tue, 21 May 2024 02:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716284732; x=1716889532; 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=kkVl5ZJEjyZ0695fbPf3rcpNNgNSAt43cde13TvFE68=; b=q7ec7037ALryu7KAdVQjf8KYQzA8dyYT+DvsuxA0Tk/E3aiJR7Aqw6Qgoit2fs0rV0 peOjy0ztep9zXzpnZlXv4rM+uYsuBMZMz0earE4ALvjoAtZK8BRusy1ljBmqVR0b9QFS oYRXGUB9gQbDwAT/nchTtFJqQpDpMm8RNf0j724wwA/7Tfsr7om3rug5U0lwnWYW9s4h sM1BFAWYpQ3eucnbZFdXezFX1EqodVDGyJYelp176BgaIePIP6qaKBWqH0F33/ucUYrE GpQlaL6VnOeodLGWYfeKNX3Xerrh/826pEtjygvqhswQSMWZV9zTzjlbMW1dDSdPyYN0 s28A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716284732; x=1716889532; 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=kkVl5ZJEjyZ0695fbPf3rcpNNgNSAt43cde13TvFE68=; b=uh8GWa0mQcERUmTzenfOdf1T0VjRDsmFYBwxCfiAlsF1ro9sa/ax9rUDFkbCRVujky ORBlvgxAxpnd1PjDJ3dBU1Cx4niC4vVPNFRdKwGlc6ZYX54ERnX3/nryCw4pYTvUeqOC Qxu4ntnmmfZYjhWPedvFtEkUt2rkWoq2T1uK7pLIO4J55q570n9pGedC/11HxlKLNhyB PjyMEpdKfTr2OLt5OpnjxNxnG358W4UPVrB9dwCv2BXYhnBtcj9B3Vbv2QEIWdwH/n32 oONmKeAJ8Y2Dbi0qgYVrVxE49JFwSnMvVgoSNXY76LoqIvuorqZO+0HvgCv6zvT5Fkvw bkiw== X-Forwarded-Encrypted: i=1; AJvYcCXqjZNBxAniO3UUTRNT7da+88bAVRGtbUF1n+HGkRt07DHoX9UX5djfpQBpPIuyZmLsTC8Q4L06EJ49J+UkdST39ylbBR550jPNSsJhC7A9xQ== X-Gm-Message-State: AOJu0Yxfkp1N4+TALgIip4V/6li/S2L9R624/5Olikg6VikUf1qWFQWA yzkSJAvIjDSUASmMZ+lnMjL+tjk6GnSMoawrWQl5iGuot+/EwofzFDz5FlKENjkOn2gxVOIIYPk k X-Google-Smtp-Source: AGHT+IGXHj/q48fwjhKVjn6sQaXvNT14JJ/1socCkYTz1ppWvArZgaQu0LAF3z1CSYykJeMGq2xw4Q== X-Received: by 2002:a05:651c:149:b0:2e2:9842:a9d3 with SMTP id 38308e7fff4ca-2e52039dc3emr254963931fa.46.1716284731863; Tue, 21 May 2024 02:45:31 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e706ee0a65sm13906261fa.112.2024.05.21.02.45.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:45:31 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 21 May 2024 12:45:29 +0300 Subject: [PATCH 09/12] remoteproc: qcom_wcnss: make use of QCOM_FW_HELPER Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240521-qcom-firmware-name-v1-9-99a6d32b1e5e@linaro.org> References: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> In-Reply-To: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Loic Poulain , Kalle Valo , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, Arnd Bergmann , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1128; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=DTUqzTL8iOBwkoam3qEvEmtJacPSZ5s4Txv1FotXGIM=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmTG0zPLiR7dwV7D48NkYRmQHnnNAmGPP/K51cP jAUViaiRiOJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZkxtMwAKCRCLPIo+Aiko 1TdoB/9DyT05xqeXzcbdzf5YPPdhcoo3145silkVCetoVq5t60jcbl44H4qmSe0k+GImIovA6KW xtgCjAng3vquS6ZKIU9Wx8jyfldrEI4khHxmIWrOwBKru967hGq0sskYp9msqoueB5DgeTpqhU/ Rywy6/IwOtZjl1CiKXIKT75Ny+zwM+cSnDSodIdICbWiuwoHl6ui8Yt3wFm6nB4RDuDPEQMxplj CRESXlPxtgZmYwDiWz/xz5hjPszcWG7GDtZ3S48Zii8OF9lFGqU0jF9EjSfIEfS2CTAbd0Soeuk 0QzgzP/MMTIvejFdnd091aBJ0NuyIEMx3DOtdJX3OPTokgOY X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Make the driver use qcom_fw_helper to autodetect the path to the calibration data file. Signed-off-by: Dmitry Baryshkov --- drivers/remoteproc/qcom_wcnss.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c index 421a3943a90d..45fc578ae30b 100644 --- a/drivers/remoteproc/qcom_wcnss.c +++ b/drivers/remoteproc/qcom_wcnss.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -555,8 +556,13 @@ static int wcnss_probe(struct platform_device *pdev) if (ret < 0 && ret != -EINVAL) return ret; + fw_name = qcom_get_board_fw(fw_name); + if (!fw_name) + return -ENOMEM; + rproc = devm_rproc_alloc(&pdev->dev, pdev->name, &wcnss_ops, fw_name, sizeof(*wcnss)); + kfree(fw_name); if (!rproc) { dev_err(&pdev->dev, "unable to allocate remoteproc\n"); return -ENOMEM; From patchwork Tue May 21 09:45:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13669111 Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 7125F757F3 for ; Tue, 21 May 2024 09:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284736; cv=none; b=rTxGrIGNMRf7g2AobxBMrv+NHSn3UvTxtAZwkYWzzvNP6Fl91q7V6f4Spa4pYBNqnHKWXvMLXHXfqbFNR+qdggk29a5O4RhTYxQLrg0CRZD1mnLJBL3oJxVAZz2o3m+0L42qW9RcU6e5eViHxQy323L2+l9HRyKx2do7rHU6LbE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284736; c=relaxed/simple; bh=0EdhJdiexa04app1htF5yZNIe9fWs0XMN5UptBqZX9k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=StBIdmHmaaJGj1SkBcgUVizsdmjDUP+B/aebqa9evZCmwiT4rzj9eaB4ReYT+YXQ47O+46ZbbX3IXYlDuJ4cp3GVFwo4t8fywV1HPs6ZJdQH0Rr0clorPDY9Sq1ybtrpNUX4mJTmpDQAQyawSR7OK8mr0tckdZ50TayHhNFb2lQ= 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=L4ZSldht; arc=none smtp.client-ip=209.85.208.176 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="L4ZSldht" Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2e73359b900so13277711fa.2 for ; Tue, 21 May 2024 02:45:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716284732; x=1716889532; 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=PjYD/nu8XaSwyIjsATzxMNejeBhx1zP8xP+ReawIdtI=; b=L4ZSldhtq84mu7ODLTq60hCMVbNseK04xEv30tGGe+QdLsD2oqk32arfUJKdKwmYYo zUQYPDCArK8q2xI1lzb1EVk7f1C3yv950tRlNVFA88Tri1xPG50V7ALpicovOb553Q5z DfWddAPQvFJzQNBYavebx3F97TSsN9lYC3ht53ul0VPb1ETbpd2cgnLW3nWGuJGSJTgY Pbrju9j91dbJU60+H0nQtjNHVcTVS9S1QhjgFaR72+BmIoyOLmWgwQ6pBiPimMsnFU5U ph2Q2uBOO3Lzk4Q+Y83QYf5A4rmZ+0eb6gXhitNwzvevbxp++APQj442s+RghjSVmYjZ uLWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716284732; x=1716889532; 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=PjYD/nu8XaSwyIjsATzxMNejeBhx1zP8xP+ReawIdtI=; b=cerbrqcDfgorDTkpyIzP+JbKj5z+pcvrx65mY7f2V+wTrCnQtUXMUAXXpXcdyMHLgv UeHiRuzCsRmsZrUNpVeWhJapAB1kHfy8rdetIPLw0nR0MAb53dDWcjQWpvMdUOOsGLQD I6AJivXlCgUcLsQ9qTkBINvtFI9jU++b/eLHrywBRtlUcoVqnq14X2NlQwbt3X9xvEqZ FZWWif2MYVh1wAUC6QOY0j62hYalVPvB43LPvLURf2OvaXXIywFR74g+Tm9gTWfTaNBc aIc2EGZ6NMhU83HdyJ1fzkxkl7GgdtUhsDQyhAwXPKCjf69Fmc2IF3RQfcCK2iNwKwuq HjXw== X-Forwarded-Encrypted: i=1; AJvYcCXLX8Gb5jLykLtiJCpdgM4fk1kR6f2/ZKjSvPHX08GJj1UbI6tcGjf4O8Ij/KJvLFhNUuuxhl/rItBTU7mD1yGZ9bMiGbmzZWDbDXc3JCaTQA== X-Gm-Message-State: AOJu0YwAN1U+hVKw2Eq77nw1o+r6I7lfRePc8p6O+P6WCOrT0Wz/fpgG uLp6wFyZJOo5Haqco9eH3pcKOP7UEb6kHJPdsU4oxpuMLUcuI+1N5RkIxKL+qXE= X-Google-Smtp-Source: AGHT+IH8qzC3fWXUUcidqVlxrEGo8Kdak9/c49iTORJ9N4V8gMmWJwg35UouqTVH8QmBlj4MSRInLA== X-Received: by 2002:a2e:9355:0:b0:2df:e0c4:8429 with SMTP id 38308e7fff4ca-2e51fd4afb7mr200777811fa.18.1716284732591; Tue, 21 May 2024 02:45:32 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e706ee0a65sm13906261fa.112.2024.05.21.02.45.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:45:32 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 21 May 2024 12:45:30 +0300 Subject: [PATCH 10/12] remoteproc: qcom_wcnss: make use of QCOM_FW_HELPER Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240521-qcom-firmware-name-v1-10-99a6d32b1e5e@linaro.org> References: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> In-Reply-To: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Loic Poulain , Kalle Valo , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, Arnd Bergmann , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=690; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=0EdhJdiexa04app1htF5yZNIe9fWs0XMN5UptBqZX9k=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmTG00kykDINSyj07g80LnRrExtHt62TUsGroa3 Z6F6OYOqsWJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZkxtNAAKCRCLPIo+Aiko 1UBiCACZbvFD9mCBymBfZ6+3KEKZZ2J/FnpHuE6TjGdkMeNG5SRodLBYZyXVC4e5JS1pf+C3XbC gErxRfKXsyVINQ8MA87BhZ7QpUXd03DBZKEn8bwdlhNlOdIPcgmxm8lx0q8ufbmVNC1ftr3Q8LZ lG1UWkkCucAQ65LQ/u3VTGTr1qY8CW2RjguM3Y0drfu+nSCqRyab9vm1Jw5YZEHotkId6tSDVZj SuvwzzNCSQs0ND+Y1od4v+WRjSr34Fg9jctLq2aqO5f+DBG3JzcE1yi+1RDmvEroZu0vVmJ+GYy R7Z+jwB9aKX3zUKXW9f2Bwx9IACoxZd9JKsfd3QTmxv3sWr5 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Make the driver use qcom_fw_helper to autodetect the path to the calibration data file. Signed-off-by: Dmitry Baryshkov --- drivers/remoteproc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index 7bb22fdb64e4..e0ffcaeca03d 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -279,6 +279,7 @@ config QCOM_WCNSS_PIL depends on QCOM_SMEM depends on QCOM_SYSMON || QCOM_SYSMON=n depends on RPMSG_QCOM_GLINK || RPMSG_QCOM_GLINK=n + select QCOM_FW_HELPER select QCOM_MDT_LOADER select QCOM_PIL_INFO select QCOM_RPROC_COMMON From patchwork Tue May 21 09:45:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13669112 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 3C24C7605E for ; Tue, 21 May 2024 09:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284737; cv=none; b=D4vK0yPt4CLB183LFvUQ3Zb+bPCvPggIXGqwiFRfsW7hOZdiuVI66zhhOEaT6U9rp2H0zRQQQ88BqTs3M9UtZattREpjFC6WDCxJbPVWbzs5+A2P7bxxt9X8c67kmhVBT/kqKgAClJbZNw7BLgn836CxkO+Nfv50AAjJipYJqhM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284737; c=relaxed/simple; bh=lOURPTyf/MozPD5HW7XYKU/orijtd9gkaS/jV+RA0uo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UmylVVkXa/g79Hx850mOZYl8EpS/MpVYK+Z9eLJOdHpcpO3zc3pwgYybVGZM9sZBDgXlJ30T6EpJwbhc407kbZB7h4YRtxqzdL6EhL2VNQ6GvSx46qJKgGRkfLhqSaFIksivGWj7PzK7JQn1TvtC8KkD70woHq1Apflcc+BGMmQ= 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=lu3JTEfa; arc=none smtp.client-ip=209.85.208.181 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="lu3JTEfa" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2e538a264f7so48628951fa.0 for ; Tue, 21 May 2024 02:45:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716284733; x=1716889533; 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=zw7OrzfdTgB4KC/AhplUeUEfJhFyKT0ay66VXG+9Ap4=; b=lu3JTEfaoZMk2UrZXbGstpdm8WjFBesZ8GOXMH0gGSli0Vbxkn9Ygxn0iMaJrmmPPc azZX+QbWxrLJMUuX1u5isOgjrb28feVZxq00tkNwHyGNL1lmWhLx+kNU4W5zTbcuIBOq kYdtdcxLXBo8LVFugpXCa/tszxsbAYDfZAKhPk8igcHL43oMskAV8bFUb7WGHYCs9P37 V/HIO3ZEomUy13DvWNgAvQPvKwbrG9FfJq73e1bvy5WD8BDw2D9ecucoHnh/llDm+GiG 3ZgIDz1SCBuYLLZSZiwwZA3hEErBAiP1mqLsi9LvRhUNATYw49YM3G3wUSbcm5nTQGpa rzYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716284733; x=1716889533; 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=zw7OrzfdTgB4KC/AhplUeUEfJhFyKT0ay66VXG+9Ap4=; b=Y+nRlQ2KEgzRXZpg7lwwk+fWJZ7V6RK4eHsReVFQTE1QWgLsXtx7rT3yzls7gmN4r6 1wj/4NWhwRnp4x6Plk81alPabJBqBq48jp/LxHOm60S6MszayxgUp6pcLYtK0OcA8NuF YULrH2AMBGV6R1RIw+mqJp+m/Ab7PwFOywaG+wVrm7xBghjm3L6e9uoj3xBvSvp6g0V8 a+z0MVzZ5qzlwkduKOxJbQT5yBHRb7xfHgERpjOFnxGyL4blfsdPpTRtMZvtgxZ+Neuw 1fhfPJ02kSyGj+pEmEaF+nZDUfOj36OTXsVl6PGR1D6aETHbeuk3pyyhN7Kj2dHBbuia vPfQ== X-Forwarded-Encrypted: i=1; AJvYcCUuN4taH4LFgcz4iyIxvtlsliNL837wHq+JtoP5JUGhQDDk8/9mWmvL6p6GXbW1MD2+Nyhbv6wmB3H5yNdxw6I/yRXkYCCrwuOwdLKJEqBgCQ== X-Gm-Message-State: AOJu0YxB4y9hfvxolq1wBhjNj5XkQl0JdQzVXgKed+sq40HHKsz938vL Aj0zFKZPXDAKepo/3Wqd0nSsPoHyYR+SdcUjxLNUbiW6mGidtFotSz7dYSpIHJA= X-Google-Smtp-Source: AGHT+IGX1Q176IzT5QXdTwJ4xeLLRxar3B9GcFke5IAQRDPGkKTD4QJYxG6uph4uMX4AvCo7vIqoIw== X-Received: by 2002:a05:651c:14f:b0:2e4:e02c:a0bc with SMTP id 38308e7fff4ca-2e51ff65d1amr221714241fa.31.1716284733338; Tue, 21 May 2024 02:45:33 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e706ee0a65sm13906261fa.112.2024.05.21.02.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:45:32 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 21 May 2024 12:45:31 +0300 Subject: [PATCH 11/12] arm64: dts: qcom: apq8016-sbc: drop firmware-name properties Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240521-qcom-firmware-name-v1-11-99a6d32b1e5e@linaro.org> References: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> In-Reply-To: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Loic Poulain , Kalle Valo , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, Arnd Bergmann , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1078; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=lOURPTyf/MozPD5HW7XYKU/orijtd9gkaS/jV+RA0uo=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmTG004RzknfFr2xUTYDfig7qbAJdCOKGDfe99k 9euDeWDqcCJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZkxtNAAKCRCLPIo+Aiko 1feYB/9kr5Vq0IGkYGlqoyLUubukycE69t/Ty8gnlJ3JC5immim+H5tkJHAjolUChQrwcLzpChb QyH01xEy28Z34X99QnGbZn9THweOucUS83xmb3RFt0qpYUXmqIc7bxQdiglfTjJm918Z4WKH/J3 6UrEaVSu99ghVgwEOwXSka2rAIkiJxlQu74fIymcuD0qYyHsHbeWWnqjr47ngNnQ2wDrFDRPwF/ JgRxhptkMB3tCOteUbsbhF8s9DCzU6/5MMv1/C4CVsqJWY1SvtEzvwtU0BWxTvp8C8v1AA4txXW WXRDEWkyvxigO3lJ8uadhOc25kg0ZP2tqEuUdt/TbRwKFONB X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A As the drivers default to loading the firmware from the board-specific location, drop the firmware-name properties. In case of the WCNSS calibration data drop the path to the file, retaining just the file name. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/apq8016-sbc.dts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts index aba08424aa38..24779238cc18 100644 --- a/arch/arm64/boot/dts/qcom/apq8016-sbc.dts +++ b/arch/arm64/boot/dts/qcom/apq8016-sbc.dts @@ -260,8 +260,6 @@ &mdss_dsi0_out { &mpss { status = "okay"; - - firmware-name = "qcom/apq8016/mba.mbn", "qcom/apq8016/modem.mbn"; }; &mpss_mem { @@ -388,11 +386,10 @@ &venus_mem { &wcnss { status = "okay"; - firmware-name = "qcom/apq8016/wcnss.mbn"; }; &wcnss_ctrl { - firmware-name = "qcom/apq8016/WCNSS_qcom_wlan_nv_sbc.bin"; + firmware-name = "WCNSS_qcom_wlan_nv_sbc.bin"; }; &wcnss_iris { From patchwork Tue May 21 09:45:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13669113 Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 1F5E871B3D for ; Tue, 21 May 2024 09:45:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284738; cv=none; b=I3ePiG9D+5taJLeIwf3N8ibncd8yusOR89bEyoP4PD2tt5FA4t36tyjTjbXInSQYEY/Yr4mw0xEJYR4zls1BGmjf79UkHlD0IYOFbQJwPr3PeD/btSdcEE+ZRe91hg64bu8ESq4VVBEegLp/xhCDZvvW89B7UKc1l36ijQ3PDY0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284738; c=relaxed/simple; bh=hNIcpe1sOvV0/2oq2E+Wm6ZeAwz5DUtQCi+I+XlGNEg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pX/C7xrNx3oUMUzRxFbDqaJQTjIz/dyrqQe+9Db5dO4OOqgbx4WiFM8+G52Cq0221+9seR8PNV+JbpbnCk6d18nICB9kSmTPUzcyYTGjIk1WotA66+Cmgn0b9aLVuZx6bVF+KrxX66cBgO0azx4/DFq6K0b8De4vNb3mdzupa1Q= 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=vedFmH6u; arc=none smtp.client-ip=209.85.208.181 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="vedFmH6u" Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2e3e18c240fso46565221fa.0 for ; Tue, 21 May 2024 02:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716284734; x=1716889534; 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=76RXMDJdIf87Lj/v6tqI1Ofql4asvJ4Gr33M+iMz2pU=; b=vedFmH6uMnaY+QyRY8kx0Vo9hwWJdGbzVK4qhTHM9qRMGF2cuZFGYXdd4P21TUhQeB 9WuPOjhZ5lHNk/TzXG6JDVd0F6NbevPJ+TcdFxH7yoOs0byedvPaZuC8D5eaUSPIlWdq Ton8I38Llz3dn90vZcIKUdj0GYu4zPwTfaNYS4CJgjVlR1b/QmVzg94ssdCTJFh/udNW RfHpfLvCqtJTifmWicsQAk6SwCCrTNAmEIvTxhxkEbELiTEQZn9IcacKd/UdZucaBX+V LA78k51Rzr/vDNK9nKm/taAYokPXKJ9QkgXttDsuLZvaVab8mhgpcP2V/5Y2jmM36ihm uHPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716284734; x=1716889534; 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=76RXMDJdIf87Lj/v6tqI1Ofql4asvJ4Gr33M+iMz2pU=; b=fB57ZKv2VPheJJSqFC24KeggqUuSs/0iQh+kcpNAhp9A43cRQMMtyJxxfgT84T69Id pvqC3AQFR2sIqDnJiuHZGWeS0rDOUOCIrOkmRVst/44S7jqnJaBdy5jkp0Tf84oJcVOh lBjk28ENPp6Wmd8T/duDsgTXDPSjmiVoD8SxWFGjPkr5086MosBbAYiedWAVTsZpSV0W Nz79YfXjcoRTXpwmqmw0AP7BV6OaOrVfdPF/0AyBVqSztR5vSWGUQz0YM9XEZTWky2qL +UdjTn8K3ltMb6/LOyunq4/pVBNPggBPl1ZVCDSlPEszX95ZPc4LbQhnXsqZL9smIfrm PK4g== X-Forwarded-Encrypted: i=1; AJvYcCX5cBt6qRxoAeaaO2RAx1IShHtdAE9TUyvlWovl0x47oJuy4An1ZeuqxHLtW+x4weLXa1Z9AXpsbggjeIYzkmXg1e9oE1BAZswJvTxifj2nbg== X-Gm-Message-State: AOJu0YxiFP6eMH2AETyuDnzKO2gaB/vXBRUK247VUijzLrZmXwQMjn/X u/Jm/0bbLPD4V5mrPLYYMX5r/u9VMTwcWTbunxipimZPDn4hpxo8v24YT1Xnc4g= X-Google-Smtp-Source: AGHT+IEqAy4DTdCoeAv2Vdxu6aMYdVExJ0VTzJA4oaoyPSmsMWau+PJh35LHB+sTJu87BfIxRz3YVQ== X-Received: by 2002:a2e:98cf:0:b0:2dc:e3da:8025 with SMTP id 38308e7fff4ca-2e5203b41dfmr336605301fa.36.1716284733986; Tue, 21 May 2024 02:45:33 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e706ee0a65sm13906261fa.112.2024.05.21.02.45.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:45:33 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 21 May 2024 12:45:32 +0300 Subject: [PATCH 12/12] arm64: dts: qcom: apq8096-db820c: drop firmware-name properties Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240521-qcom-firmware-name-v1-12-99a6d32b1e5e@linaro.org> References: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> In-Reply-To: <20240521-qcom-firmware-name-v1-0-99a6d32b1e5e@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Loic Poulain , Kalle Valo , Mathieu Poirier , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, Arnd Bergmann , Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=867; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=hNIcpe1sOvV0/2oq2E+Wm6ZeAwz5DUtQCi+I+XlGNEg=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmTG00XZHHmjrQ3qkPBy9bf5pX47eUXttvZKwjl K3ZuOLJ9+uJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZkxtNAAKCRCLPIo+Aiko 1SULCACrryMAqbZ1Va3cYrmE/JyS2h5P2T1NgaXOI8XFucKAREQa56inkv1aVjV+lM4Q/los5rx Hse4D3WZur17W5buWRif/FSoXkFlBFHq11Bum/3KV8490wuSElXP6Z+w0LfGe+920BdLspNtHzb nD1kWhyBQI0WRxmgp252Fxj4/bkX5UhX7R1cXsSA/r9pViUggXL5LhL2XUwfvqxG9ZGj0kggVUF O4qhJCSZIfLe8VNu9T4ZxR3YBBBP252aQidYgJ72qXoFsM8ccXKuodksJHJaVh+P6B/TcyO7l6R efJMaqM8Cg/9a3N0h1leWK3V/ArWR5g2a/tzOhxLJQ5i3WaB X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A As the drivers default to loading the firmware from the board-specific location, drop the firmware-name properties. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/apq8096-db820c.dts | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts index e8148b3d6c50..2c8a77401aa3 100644 --- a/arch/arm64/boot/dts/qcom/apq8096-db820c.dts +++ b/arch/arm64/boot/dts/qcom/apq8096-db820c.dts @@ -161,7 +161,6 @@ bluetooth { &adsp_pil { status = "okay"; - firmware-name = "qcom/apq8096/adsp.mbn"; }; &blsp2_i2c1 { @@ -253,7 +252,6 @@ &mmcc { &mss_pil { status = "okay"; pll-supply = <&vreg_l12a_1p8>; - firmware-name = "qcom/apq8096/mba.mbn", "qcom/apq8096/modem.mbn"; }; &pm8994_resin {