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: 798939 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 E5763605CD 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-2e73441edf7so12253331fa.1 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=DedxNZfk9yK53KpSg/Egv/J3BCYW6rAiSqTDrPK1BeNuACFSwgbpUOcPXunkrvabl9 A5aI3zwNn47p++zm/VO7JBH7LuEbemDmuf2pNGOAnj44c67Jx3nJupOWxqoJupSH3s72 kxQxr74gHQPZ8NyS8P/9ombI3MSl8CT4VR9rSXpR+UWBz2OGvjGtbxGu45bguXg9BLef NnyAZ3w0bp5tsABQkmGNHo2Wq984SSp+11cQCQFTNBorNm9aQYdZTLEgw31uDnLhlfcl WmJlGVN+zn+W7HGiGpLRTiRJMz0NBQZ8nVQb0+685mpfhXi6MPLWDOChYYrm1kX5LnIX JVxw== X-Forwarded-Encrypted: i=1; AJvYcCUkBw4wWklg80COYFAwQM1bimhEttKPPAZY5wTyFL58FC9tqGn4ugWVw6UCVICKozdEkzLawkjplRiMlI4jT39obYl3qvcG8JKbGxouGko= X-Gm-Message-State: AOJu0YwOrxFmwh6y8i2po3kv52r0ywY83eQ/Ob5xk/OwEyrgedkUi3z9 YcEavWgtJhYJdEGCgG7WJ6FwWSmfiAcuHrtoxRcb6gvrKYgTVx79JRR95xQJD48= 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-wireless@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: 798132 Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (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 6FEDB6A332 for ; Tue, 21 May 2024 09:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284730; cv=none; b=S7PXhIBEa4Bb/2hQPTpS0yQdIZsqEua4zXa8+2pa7RHr9OgnKC4nX1ORoqGxOvdYIaGbrF6DaxkS1aVswQuVpFg6AALP7lkOUPGgyz5Plp4tZjGBVG49Ueph0suWjRW3jnEIyDp4x97wmi71jGSNTLJs9B/MGR99AJut9QMOryA= 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.179 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-f179.google.com with SMTP id 38308e7fff4ca-2e724bc46c4so22802741fa.2 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=WsW0BQly7l3vHlJVOGpTBGtq1sSeFoY1FdtB/bU/gXV9Fs9Z/TftUF77j3HAE5cmu8 gA4f/2oP2bIH72/KP8P9Vny6BEtMe5pU+MAsX6t3V1gbpF5lBIFcjxAKj6aBvlQ/YQFd rTViZ3EY6MIJrn23+GYdNl/RLzrpazuoCS8CVx6AaHbHvecACnM9Nc7V0DKn7shSVNyG oLQeo2fTi4dqkrr/PGY/9tiDb8X2/mHVGQ4hBxAotREamEBLQzJGzjlKO7r2Tl3bK5sJ jqjz6REjzKcEIMEB6SvIShDssne8t7xCxjj8m7dMmlYFitV25rbiBcQ/eQ2KROXNFhIR Xy4A== X-Forwarded-Encrypted: i=1; AJvYcCWTiVlsFSBM2KY/T913Mp4epRUcBY/lvwMmtuoRA+z/sXH7+gihvF3OpFCKvNA74+Xb9amHvb7wsjhGGn436AMmFoxDBYZtDEdIO+Ui9iM= X-Gm-Message-State: AOJu0YwsG3HCKhCGFLxFWFA1meP6AvZ//RbsO2woJCCtliOWf/W82OV9 Bv1sxzim6HQxlfi8IlHWrVrFtmUtgqZzltlQ5/xm4GYJlbGqUFhrFCTX0Xm1SNk= 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-wireless@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: 798938 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (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 07C886BB50 for ; Tue, 21 May 2024 09:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284731; cv=none; b=gLy1F/BENvyQ5nobUO3C2XCAfyfR+xVThiHFS8MS3khocn1SNz04uRVb6athnR2N7njmgJZAH0fSwhkyypjtHwsNtl4GaDCUYMPUUIWukCRe2RTPYXu0WdXFFf1a5NPvSmtC1NwflWH9aqtWDKPOj8q2AC7zQPU2V147qkM+zOQ= 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.178 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-f178.google.com with SMTP id 38308e7fff4ca-2e52181c228so49329041fa.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=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=J9ivY/KofaMPJwnVQ9ZEN6z7oLgARtm5iKQENoreqAdN182iHS59Dh53rRWonicM3k U07fng6FzVW81YJghOpnH+p/7Th+sb+WrePkIeiDVCGmn1GJwVLpxe5rmvZYb+O36V58 axuwdF0urbgiNSxsF8MBYZtJm7aRKlOlvpHL+HLiXw758VlYlt8IIUx+obto+EfmMmIn fqh4czxsHuJGp8FwSQquCBUy6/SeBpDhpUW5pso80MJfzUUxo1gRtagpXdAAh+m9zPBj HS1n/1WMM9ZNHfecQEwmWFJW2IlePD4AtMLPlPz6kdTkweUdxhJxa9SuQKOyas+wXZ+r L48w== X-Forwarded-Encrypted: i=1; AJvYcCUGErzOTH6U/f0zaQZZcYtUEpZxZl+1Fv6WZxrX3KKTT82bUO1zwjUt86IYdR0Yvy/Kfnd04IzbF+7nKJ3488SMYvdBIgxkKGvQKma9zbU= X-Gm-Message-State: AOJu0YxPLErDQnFlHo7KYr4/AZeJxftOZ+g5CfnI3wfvnieII5iteHvS yo5G/4innwTSI0DvkECNoeNb9zf8jr0skWG8F067m6LZVPlhOvSpMPldJ1ep7LY= 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-wireless@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: 798131 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 B70166BFBC for ; Tue, 21 May 2024 09:45:29 +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=1716284731; cv=none; b=fW9luf2FlhOmSqEpcXOIeLZ6d3YtSqM7H/31vYzt3YN1CMdp6UjYekRv3QlCT0rfGEzdqx6Lk5l8HXS1E+3wgvWVYxAQFgxRhS42efdfgJR8PTUYu/5pOdqr92uRQ9WPLQBRR2ES+BPEEMjJJ5zHuWXmm/ekyKcq4l2xkU+bQic= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284731; c=relaxed/simple; bh=cXnQhU7DTsaHUnDJalMnIg7XjAg9iNbwZVjIZgmeSpk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pviXf+Gm46kc+Vn7sO5waVDCgmKs02ynBlaTbnczgJ5m71wxvb3kbSVlD9cUsCyxCG5HwgEsIsb46Cyb7tVJMZ/wRi5s/jEtMARa8a3gUKzmpKcrf3WsYcBrjt4ob6kBpZL8JZ7NwFzRGX/VTy86+O1hZMSvGceTuK7u7gFoMKQ= 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.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="c6L9dSyJ" Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2e73441edf7so12253651fa.1 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=rA5FYbsM5TmNEhe8zR/aXXxhpHSRKrYaxgVLxxML0QqEMwFuff3B14hW3sJtdn5rkH ZkPM4KXO6z28Qzn5WJ28gpxW/eC/CHyTM4z2ivIGuPbTSQkt5hJBDbAF88iZY+xoof/T PR58GRcIw8hH5A9Aua3oStsJoCki9KUaErBjz35o4GHv4MFtW+urdJD3xdMYtWCUPC05 sV2imMfLh5P9i+oBjvgh7VkR78GOmSekFpKavxJrdLyp7xhuM/QY4ORKyzImPVNA4rvI UkEUcoBCHwSE4ObXsJnwX3ufwK5wC92lIj1L/x+VU2TD9BAskvh3gk8E61khTWn6Ualc yTTw== X-Forwarded-Encrypted: i=1; AJvYcCU4bpKTWQeRiCwubT/7UUzGCMDY+Oro5HiE9ZS6RzV5UEBCJZuDmRVyheKRZm7JUMjZohWdmZN0kJHUvuyiugKLYZVK4JQZzzFPMs6rbyc= X-Gm-Message-State: AOJu0YzylhKVLpf7GPXASztMTzLuSriQ2aNlXWGt3NmwjuKH/kaJLfdG su4iR2dVyl90hk76q+OrK+M2fmBaXAJXm+cKcbAZVXd1ReDEqhUU4sRRt4zqWyA= 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-wireless@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: 798937 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 AD8E76D1D2 for ; Tue, 21 May 2024 09:45:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284734; cv=none; b=jom0tBn5CR+tIz6x70ECJp/xFQmpv6a1KY+QnIhXXRexfflrKBpuHBw1ew8LNFTCSRxVOfVMboXXvswgTR4Ds+Tw/XJ518SWFG3mfhsDuBThrGxeuTWL7BdFBzR087loDzz0pCjxpa6agz7cYd1dVz98Gn42CC5EsHOz32eE7w8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284734; c=relaxed/simple; bh=AFSw8YT67751JMyLAp98IxGcZ029778ZqkawJ08x+oE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IyAy7VT2hbKQO9RkFvIwK9qitL8yy6q2BxD2kkxXBi1/rsalYY4EFK+iOCNaq/+DQ3GYASzweQKwQJdojuGe63T8SVX4czD7D/jpKmyfAApWsQ0OwYFHs79WefoF04tLBxg7t2+BZoWvMUl5tvNmZM9piTnwtUvNNsGoxyNFH9A= 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.175 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-f175.google.com with SMTP id 38308e7fff4ca-2e576057c2bso75678991fa.1 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=MgKBcCCEttFvwIZY7Fs0/EUvdG4TlmuVZ9ogUnLOWbRrunrbZ5Wf08obbUfJZZ8L0D 1Q+KlVcTzO3opBUfYVVhBfr2+tJPzgw8zFUDvqK+RU2ARymW7AjgdruDCXap/nsb1CD+ 1P6wonT5Ls3cL8VG//+tQjycZaFV3CA55upvqj3OqZEHgls7liRa2jUqQKvoqeQ1WEOv 4CH+Wkgf2bAuuCsm0JKXp0GypJ+kCL+ppAE6Pcbuk/fHKOcLPsA/rdZYZ0wIc+cVOtqp P1v75r4hXHOlkKQc6TuuoUObWcacgkJlE5Qx2PkbHWCcqtRfNcCJAOi2rgkwA9h5KHA6 Z2iw== X-Forwarded-Encrypted: i=1; AJvYcCU9ux05BdBWTH0Kn2bK3fvYAqHc30NH0JtAv9a1IzCU6rhgmIWkmtMqn3lGkox9hZz0ucuayB9KjCpqE/3FJdDUKip41m75aMFuDrf7/FQ= X-Gm-Message-State: AOJu0Yw69dm5xRX1vyCVsc++0LgpKCqdVm4uEUdWgbJKuES+Yj/f1Vja j7nw7cOSEkhzAfBXXPQCmASn6Gqr2349/VkRb0qWuOSR1O6uVJSx3ZNL4L7A8Do= 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-wireless@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: 798130 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 6AFC171B32 for ; Tue, 21 May 2024 09:45:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284734; cv=none; b=H6+nbzeyziDgSI5Kd6HhSeOl4De6TVkxVZctz/liOA+etM8XI10xEQiNex+TxmNSougMuTquA9iXH9VdvSppxBOkJ7NLvxBbcPnT7pGLprqm9C+0jRj5mYnpWi1nkrslHmZvbLy1C5JCCK7Q8Wajl8VGrUdIB+srGIuJD077ldE= 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.173 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-f173.google.com with SMTP id 38308e7fff4ca-2e73359b8fbso15562601fa.2 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=hBHpNq/BDbxsCX2VnvBkx8KsEZq4CH30goO0Et1i5pcj4uTaGXhfkSnc9+Srnv9Ogq rugbQGBcQU1J2rXlQlEcDbjz3L8vPWN8RR69ybAr8DFKeOOPSpVHEuOoG1kfGl6+0Jfj DY0VdkCcnrM7B0J7jxjm6v2aHIwZqxl24lkZ/PutV/lCvRJpgAJp1XrRzebvjqmzfomB klm7kmHmoxVTAqdfytD3JfsZcHND1OfCKfbkXEQza1GdMOSK+tspHxVqcBBmpC1hLbhU oStcKjMD7vSW3ix35c/9UIQmQWo/YXYTGNo0LjNxuKN0rScv3wPajuus6XWRiLjiEoWC XzYQ== X-Forwarded-Encrypted: i=1; AJvYcCX8fKoojXe9kDRriEpcYovSQTi7SG8GjSzsHVqJPf9vog0E9/jOc6GiriMR9MFy9Mtiy7G6m8wupMoXaOR8Lh0sr5cVUVvyOc0La+PVNP8= X-Gm-Message-State: AOJu0YyiarcMWPC76QdOx4ia9v6SqMORjp97qWK0OWCyaxosUy57sbZQ ywIfN5n3M6yeuBNrLehY+4rDBjSSSKbjW3P3p9jxS0pgWhDHpFSstCkfxylzgDQ= 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-wireless@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: 798936 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 38E1C73528 for ; Tue, 21 May 2024 09:45:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284734; cv=none; b=beINwNvBNYgbfw/s2kO6/mMIT14OWnQw1psxgwzsok4ZfDQNSRM1hu8exilInmgaE9FeVvzRE/IEZZLW2zaJLs0ezElSwp4qd6wcjAklO3rHfKorUpsn9vUzqBrQdVi89JxhOx3xgdqdzBsYhzQ7sNCInRqogqTuxnReaVMme2U= 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.175 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-f175.google.com with SMTP id 38308e7fff4ca-2e73359b8fbso15562841fa.2 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=bwLJrj5hDy2L4RjdNVsGAuPAX7VGxOfz+55EH/AtMX4u5nCOvizeJpgVgB5BX2RI+/ sIXMgh8sfFkKifmhOQDIECuqMJEm7yLU5AXI+PHscbn3Ww78AYtj82ck9FPXVWOiOrh1 GQgYFc9FSbqcEgJ/0ymApLRXg8Wax/xCKoPVMWr5kSWNuHp9/i8Ga/mSAQ7Aj/EElVnY GzcSVUjqdn3hhOwuRsiP2DM1EsO3DEFk/JPdBVsGJH9JXPAk7uq4MiYNAlLMmFgthbzS eAwZTYJvE++1J665fqLx8qmw3IopiSwlici62WTDXpnvUu7mlPw7ViUlU238jWjUbX6/ Y8wg== X-Forwarded-Encrypted: i=1; AJvYcCXkgnKPJ636cEhE+N37vRE7biLCclZP9vmgzjvj6vN6+togZJR8PE7IR24xf6BdXwvz0ygE+fjZH6qlP1OPxNwV10YWk46omItXXWn5HuU= X-Gm-Message-State: AOJu0YxtQEhWQzgR2dvn3SSOlxHePaaQbP4j4cXZzbO0aV2e4cFokl8M g11c3ElDyeVOmNKtbmjoiDVocpz9lfzph63NopGcvFsCpJQW7s2JweOZZVarORg= 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-wireless@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: 798129 Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (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 C9F2571754 for ; Tue, 21 May 2024 09:45:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284735; cv=none; b=Z/raiiBY/Kw7Hro82mjk2Jj0BwOgbSqTrjYutjVkg3NFjfFcRXN+m+xxIKUidCxlFVvH08sPzQXe9kqann1AZTCm8V9a0I5uWmA8ftn7o6Z6WqALXkEVMlTqrS8MNVHdaMkQIlC/Z0Pwf6OxJ1mWO8mvb5p/GVFwb0K3nMgnf6Y= 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.174 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-f174.google.com with SMTP id 38308e7fff4ca-2e6f2534e41so36841941fa.0 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=bluP7Csw6DYifsOohc90f4QM1M5RJLcfyx/vccF2j2YrVzX6sKrXIkIDMco7chpOC0 HZp9mRY9WaF7N7wcF0bitllpwBgWqNS7a13hoNqlEwUUi3o+BsLJrkk3ct+LvUqXkBTO iMgyGpALcG+R211ffBzzDktLaiuP9xVdOaTKxsWGMKUF6AYOx0UfSFAA5PoOa0Po00sq Yc7auqbyEBgQMVUd5CVK2dOixEFuzT1DYCoiFDuK5YIRv/jbFF1PB33VOicaUllx/46A XmjsDBXPWdYL8XjIfGLyoYLaE/4kJlvEbtAgJwMg6cy1TtrH9S19afSuZImAUmYG+nGp HKLw== X-Forwarded-Encrypted: i=1; AJvYcCUKxERCK5AgmqKs8aGY+Vd84FxuJzvXppiE4pezEPi3aQdgHYP7FPNOXiyy38C/cInxniY1ZI7HTquEZQD2dnNr6WeyL50ltlFjYf3LrVs= X-Gm-Message-State: AOJu0YzdmEe6J+cKRuQZse//zJacaTH8VpBEuSV3rla15CoIiClFLBCK ybifRDmeYYURhRlZQeTj3t3YILK+Bv6gB8f1ZMibAXOhYXL2JVnHz+ZSeMXBOF8= 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-wireless@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: 798935 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (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 A29F874E26 for ; Tue, 21 May 2024 09:45:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284736; cv=none; b=SfJpXC+u85dSb9IuN0JymOT4qpEJTiXk5sMIWFApSzPvppwKLotdyezxdAL3X8Pf0fl7oTht17a/ItJz+XpCUdb/G6J2ZecUBlQPisbhcEYcWMkeqsfYTXur1Pa0LdO/3YemQ09KW7GE0Ki9MVgvqBicuZuziDck3a1lTvl9VgM= 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.42 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-f42.google.com with SMTP id 2adb3069b0e04-52388d9ca98so7059136e87.0 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=LzXcvQ3d70ofKlPuoTmufHpI/gt/Zvn9o6fmp+pK5eOnvVKmjbT/Rvv7SZqDHf2VnQ velW4WHRsaY9k/hrgVzX8KA95c6XzMGzFGZdGhAwSD7+HirrgRwL12AF0CFIOUpK0YVF FJfZ6/hWdyYU3B3wE2wx6aoNoLdCH6NjXzj1ehvQJlUOy1B81gf5lJ94GNlJYpBisxa1 vQRlVq4R3Rfe4tdJCF6t3xdU9xStw/FXxVUF7E/GBI34IeXPGBgQyGPp2RJ1L68smtxk IDq0ziS6ZZkY+CIkNylo1YZsoAjJ5d+NYv4xPVJm+NQbNHRXUP0FawYv7dVt+M+vKSrD 3vgg== X-Forwarded-Encrypted: i=1; AJvYcCVggm3wQxsHcoxdI7RkSXIKOPBGCXjQgLwSpuQ6z/Gn270U033WaK3P3lssDu4JTBzAck5v6OATq4hCvPXqnckGaePnewJyvdAVX/b+eQM= X-Gm-Message-State: AOJu0YxdK6N4OJ+SEmbprscjaXewhOEa2O1/ioCdM06rpd6d7n0vzCEG IiTuSW5yxlrW+hG/JZVaHbGWmrcjJXdsYUbd17MCMR2HBD9H+8U2P47tOUDtEfs= 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-wireless@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: 798128 Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (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 4EC556BFBC for ; Tue, 21 May 2024 09:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284736; cv=none; b=EFIASVRWiFnstGIDfutz5lj401+gcra6UbIwN+U07ibolBeqdO2yDrdn40YHA1nQ5lfJw1dgc92/HMvliNXzX82vOrNZKYJXfL3TyVpgDnahUdaDvRIr8CROU0wVRMKJncntN0M/S3SPClwvN3f0LTjSbtRrLQOCeaXX1N+WnJU= 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.174 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-f174.google.com with SMTP id 38308e7fff4ca-2e538a264f7so48628831fa.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=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=D14OS/swIhLIcVZtYvo6QXft6Ie8FA1xGCsbfKets9rVqDfX+qqDgecpGZJ2zI2baD NEeLXu1XeEvOUYUT6+LeGsEp4R85RhIB2eHiiwyX8JMnWxC2TypVBRHkiuT+3aaDj8ej tWXv11b7QYhhLuttd1OPbAByVakeSnXW5OscNNmoTOSTBbLdqwR1PjbC9R42eP/Q8O9s Ocg5HMdbu8Tcq8f3unnu2r20l2ET/3/75/UUUsWdmisWylMUxObOXxQdILceC7Nnt/iE +1iOUWpZidPV3mJJXHq++khUrGx0HBeL9lcMI4sjhRYkQXmNF4Aarlta9dYWnXOhuATB Cm3A== X-Forwarded-Encrypted: i=1; AJvYcCVDEQTvXgOdVBAEhdzuAtHT7Vsrc8C9OJHIxL873d1xLdg6noOI3VygIWRWupQmB/flOP9m2mePh3CY5iIrXEZb2pndVYdtjFd/R/OPmyA= X-Gm-Message-State: AOJu0YxzZ5JCnmQMHrYpJfTxYR10wQTv9uIPXTihndVPtUXtmoXi/rs8 BYr565Gfq0WP4u48ky4vgxohYseba5muOXAxdclleuwKF4CXXH2yzpJh2fxKfp4= 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-wireless@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: 798934 Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 27B2C7603F for ; Tue, 21 May 2024 09:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284738; cv=none; b=NNnnsmRabu1jed7iuiAX6GdUxTAa7njIs2a2cYloMto3oj0zOKaiaNT4nbY2Hq3XpgmzvESffp9FTHcPSQ6ZoG2D1saiXpJqIXfrGPAP6jBAr3r+oUiFajkpNGyfHaqaWX4NqCBmAmWBld03+KkQ0ctVFL3wTk8bNqzb9F9FzmM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284738; 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=fV2tSNBT4mreu3vymdyvC8ics8kEk87oNLmgPr4cFmi0EdJkp1JVFejZ7O31ZhhnCnrHlkV9Nyykuk2iDhdJS2fquZ3l1Wu06e/vqvPBXpAIR5JkaMXQ/ZHvMf24AnbKv/KzfF4aCmx1AsZ+5lR9UKgIVDlCSyoK9t2weoTwaxU= 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.173 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-f173.google.com with SMTP id 38308e7fff4ca-2e73359b900so13277861fa.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=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=YYulvMobAgKz/NMckhG2inZXMJ87qTeoe9PHqIQwR0uMBg7NcshdDL9ZPjd9DOsLxU na/OzKBDFwqtw6hfQ71Jixy/VWIdEIdjnGxsbaiVt7Nb5Nsk0qBb17S0wF//E4yX/Gva IJ/za3W0FhuUeE8OT1j9ZDW+WVkQ9dx2Vi6Ed3I5IbKNOSszubzqpZOdQ1j4GA0yet58 tZHJyLHlGQ8ZXzw84frSgP0n4mrdWgLchmnEovwivrVN3t3ejrbejWV+q8I19MQX4u/P eo+OiREByqEehikO7UdnqzvCp3+Jq05hUM+yupkDDAlocm1eRxVGvU/0lPzVccK+Foij kzoA== X-Forwarded-Encrypted: i=1; AJvYcCWh/BmLgRpN1Kr0phRLgj4kmRToxlV21bTs7K+XLcjLaBab+ufvaVf6Bz64Fzxv9M0UCxaryUjkQKX27YRxS0NXYR2GoINfqalz9Ucw8l8= X-Gm-Message-State: AOJu0Yx+d7xVQ1fYxMlBj1PKRImNtfnHvL6ydTKxjhuxZVZk5LMyvV0U KZgE1lpj2XuxVHAeqwpvnYZWZhioXhQTJa6g6MtxK/RrC/U7gf9017rhe9FtggM= 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-wireless@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: 798127 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 C5D5576F1B for ; Tue, 21 May 2024 09:45:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284738; cv=none; b=pMHPbPkBEfgcJL/Jf7yim42U2RzS1TuGwMtv0E0epqhBRALUG2ouo3ibcqJ23iRlirTByGX4/T1jrRggx7S7eF5mNJe3u/F0eIxcsASHt/gHxjsVl1K1+wxs/VA2dYvj7B/lAF1TcZZmSK7e4kh3U/iBJlMfJfEMal23gsVIEww= 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.182 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-f182.google.com with SMTP id 38308e7fff4ca-2e73359b8fbso15563671fa.2 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=a8jGYKSs76ALj5YIEiDL9UmZQeqrf/1gmB+VptQeN6jWv9H+JkPuXmOyZ/9h2y/5fI rYHY2QVRd9OfNmVRK+VLWndAmkLyl7cn3CtATUSWft+KscdH1Cb1vCfvyj6QdBBWgzy7 BH2Rhgp5iJn6MN1/O1Japr3npAL1DMQgeScRGeok4mepdiSrDuVhkGdufrR2pREFZS1L yRo8ZyczlFyKmpToMaWcoBHT9CaIZw3tziNnjE/CSpblSwOKZK14UHNh9ZiP9SlNyatJ mx6dsrY8ggZEyRJQhA8du7HweYj89HQ7fDedz0x7wNhjXfc4iyCspQ1byymKzoBTVfD6 Lbbw== X-Forwarded-Encrypted: i=1; AJvYcCUCcyAcIXIzfBOHYD9N6FkhhMpbdjS/1Zn2W91nqDxpRtyH4+pccWymm2sdxDAm5Dv9BZLeVeDd1BRXZNd9SeeQVvcEhgxeqUU3ufWoXtE= X-Gm-Message-State: AOJu0YyzORETkruVDfoRclTfRWnIIb7PlmYZ1pDg77RwbuQEnuzcwjyw Igmvv3LU/NT84/oqZR/qoo1i3g9904B5E6IPZi5z7C5gxpuUb/23G5ue7SAaWEI= 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-wireless@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 {