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: 13669089 Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00D176214E for ; Tue, 21 May 2024 09:45:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284729; cv=none; b=eGJfKHsxAdBnjJMNc7gjyWGtiQXkeqbmmy2bI6gyIMhLtpbaPccKhwmTw3bae+91pKA9QO1Xh4Bb3SGtH8INXIqzzCyC4xcnXv5C0IHn7W+3rS2CgyT13QVmRShEZw6VSzDNdRNfybCLwIOgtJcdRQd7UwemJD71z199E7IH+9Y= 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.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="m5xFXcKb" Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2e73441edf7so12253321fa.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=Fl6aE4/aM60lmxq3SbYUDugzwyOkzcjB7uHr6G/xYFFPcV+ALZ/r4aMNY9A2LCTgOt k/3QmbhiPtEFjZhGxpqg3cMlL5kFyIB5PgCKBBaWIWmoBfxh67pcHCnjDtCVN5Z+zaxb xCYeC3qfrbfFR8Dn5YLJrEJuJQz3okFO2sznKk9Wl2/EY5H8grPXCMnJQ+/u49G0tKPX vE9Um8e0Pu5CR6zZ9+7Cym4wo2yCjOqiYeao41uOtJqTvjLpc/4pqOLNcEvNMA8xMfF6 kB5SwTvTXpu1qtBcSQZ3bjajF2OsB684C98dZ/ZzJONP4AeEPgf1xntAEyHXPFp+meU0 Y3mA== X-Forwarded-Encrypted: i=1; AJvYcCVap0ikMXTlGIFIsxSwtWmMN8jH7ehh13cw5nlYgaGLibUPkQL/QgvvfRgwkGxQ6IiW1jrUJjkf3jnxhU6+N/7X5Vb/HC2zyesRD3FL0A== X-Gm-Message-State: AOJu0Yykyx0HJrCQKfW1pZxD4ljMuB+Q8FSG4Zbwjk0pgvIMXwqJ1zEY yTjJscmfs45VVcSnj4tTBy86dYrUhBF7LDRjDH0HYlN7idEIivmwc+viSstpu9s= 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-arm-msm@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: 13669090 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E6EA6A8AD for ; Tue, 21 May 2024 09:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284730; cv=none; b=FFWtLIBdYMzR2pXTl86HTDnvkvlytFTBV+4l6vop9c82q2/sE41crzJILoRkCUTmwZb385C4J9yqqe6rk2iPNSzK62rku7u2zAhrV8PHZSmoEN9uM9nSBJS8ean5F0sDq8KhNbwd2i6PVRtShHFpW4DxMb5Ztkig0r+FBb+BUjg= 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.172 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-f172.google.com with SMTP id 38308e7fff4ca-2e271acb015so66756451fa.1 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=IBlQlyFS15ot1PHtIy3f0/Hf/au+3On2N7s+ef9oiJmxUVJ1orQFIw32f3+ihmI4Gu wywZH7FR2vlsMQItQpldaaHiLqm1JqqA7gcuX6rh3yJZ+JcMaji+0dd4HelSQ8BEh1iz vNRhfOX8gu/4rT0UaOmyIguwnx0gOj5D70SE5pFh0DIxQMwic+JYtZRcvSsAwkVXtWMu ZoHx3dvwxlt4Jc72XKxfHuRxyoBbnZKWx94raPgFcSp7ySOVokogP1g5droSK//Ir07+ 6zxACoW2SVvVlK7y1+HPgY7Iji1Ny6smp4Bb/2HC06I1AdEWLhMQRYmJJx0NGeBNvYy9 IKVA== X-Forwarded-Encrypted: i=1; AJvYcCVc9z2EQy4MxG7iWZlfwOEb5ETUJKUexbnAZsMNxb7vayW5RnqhqbUgRI2F8J6VOi7LFFuC4NLmRc/18EPv+W+Ppu67T9R6ytysZKYRNQ== X-Gm-Message-State: AOJu0YxK+I7JpUuqZicjGgJgA15irE4jqMl8zsjdF2F6Vh88fdZpDpJk k10pSSAK93NrffJqC4xtv+w49RVuRdJS8/g1LZchCkm1P1cn2ZneANBH+CrxyfM= 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-arm-msm@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: 13669091 Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (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 0CC206BB56 for ; Tue, 21 May 2024 09:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284731; cv=none; b=N42SLS0CkNrQKu55Ej+I9jZ2pt8WKWl8g83O69zpVIZ4H/e6Ng1vLNEcMtqNL80veZdIsNj9Mw6lh3GoRKVx9oqNkmQKpw4QsayDWr4jIkSRS/kqO6yq0yU1HDmVWXmprQMYsJG81otP+ys3xVK9z3BJndqhKq2q0qE/ogcpUaU= 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.169 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-f169.google.com with SMTP id 38308e7fff4ca-2e271acb015so66756571fa.1 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=N314Ibysm3AjonO2hlxaztlZlaVmC8zu6nENqBUQfNcUmTpZgekKw6Kg48DUNrqeVK 7MJ0oVk19jsk2kXxODkomwXo7ow5yZlcop/smajiXrKJvDuFq1QZC/KRcSQY4f9BCH5t Nvg4il2SnDOKR2j2BxsnmSHW3tTSPFrwn7a9khOJchQdhSOLUbrOjyhQjlHmdfWutHxF jiNpLQ9w70+3KiL4wC5pS5sC8St94Kj8r5a0S+vsgeTN7k8RfFp2EozlEB/Q+4svMneR ieFYNCHj0ht2wskT212ToofCWplt+Op8MX0VKuF1A0DVLsl/I5xeZw/NCxQ2PNuyLux9 Pz/g== X-Forwarded-Encrypted: i=1; AJvYcCVkf+yfm09xW1NFSyZ2sSKX29UarqFoDt5LbtDMpBns5bQdYFcqyP8HYrCZPz61uTTHjmU5EBtqs50W9rJaFTTCYqpA228GhZnQObr7tg== X-Gm-Message-State: AOJu0Ywyeg7yWoZ+Jiz6ZUSFkT+P8M01BqPdc8N91m2BxMWmgXEKuBqm MyE+30okvEtK9zzjilucumNqa41E1W+5u9vw80YIas+OHMVDldMU4N70XdufWJg= 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-arm-msm@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: 13669092 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBC636CDA3 for ; Tue, 21 May 2024 09:45:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284732; cv=none; b=Wu9wAbqKP/RgPJv7X2JP0Wjb8aHjHKXMMiA3Yu/nQ9bX+R8WQ8EuZ1ykpG+uXMBSjQpLYxqA4jhwyMAbkDl1nNBrkE4YEs+tVpWaSVFtGL5pBhCekmb4Ma6mj7prjpgUeq8E9wWP1SzETBoA2qpRXhEkWCcnP/JZoWWJxdzMV7s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284732; c=relaxed/simple; bh=cXnQhU7DTsaHUnDJalMnIg7XjAg9iNbwZVjIZgmeSpk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=e2h6ls+T4uw+KlJn+BoWaZMjP+rRzEW5MDQWvoI9tCwY9nDD/xULw2YpPypZCCwfrql2HBrT/0SzZ/bAOWOJN6O+LCxheTk5VU489tZO+0J3l1zEU++Gqrgkd7PSw4GBHXyY35C9w8eWOGdS6wbT4JaMAdtz7QtUDYzYi9Yhnqc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=c6L9dSyJ; arc=none smtp.client-ip=209.85.208.172 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-f172.google.com with SMTP id 38308e7fff4ca-2e3fa13f018so46775311fa.3 for ; Tue, 21 May 2024 02:45:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716284728; x=1716889528; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=sgcASYNTvkFLrMGDS2Eu8AcYhISRnJlaNxwD2bJ6AP0=; b=c6L9dSyJ0UDxhzPY2s7LGjyxjVKc6BcWwK6HFJjAcN1G5cKYLLPjdDFjqYUOWPO1T0 aXyTYCCSGy1YQw/PSsBtir8M/sPenBPFD/bAGPZJDxLgWHvsf837Bqi3RKDVDmMBflTz f1mPgAi5c1jwoibA/oKPeThGvtXc4lWVR5VpFb0UMXir9EyteAelKsNYvFVxT7H3QWmY oD8gEHqpAlRxpDlxfYdW15cDaHmws6V1lFrlY2iyH6TLPse/AwBx2ekW8aut7nIWYYib ic4LH+VRzf6YZtH143hmUzPcYWDb6005vQN8ibnN/PoG0g+JarV9B7vFBOfc3qV5CON+ a5+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716284728; x=1716889528; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sgcASYNTvkFLrMGDS2Eu8AcYhISRnJlaNxwD2bJ6AP0=; b=OXe+e+IDIVsnu012sIf4nDRCmAWzVEhezt0I7LC95GziXvz+PqzRvfUjyS+1AaNR5G PJvC2DE4CJFChdz9IQew43Tqig9JOROze3JknKn0U74QNlRE9RLdPcO2GKGx7enPpBTp ToTXgDBKcKRldFCa8PE0O05BzUuffeEdmHBTM9BKTivT19MiulqtUFu+EUodLEpM87eJ Y3Vjk5kRrIiydkvnATzbd0vZYURe7nSmSliD+8fhbdko4LG21K/7pGEHHPoJxAtLjdBF LxOGvSWKlwfQBB9f5dtZX6wSIHxJrQX83yFEbDJb/Waexityrlb1ZE98LboQYa24juEP odcg== X-Forwarded-Encrypted: i=1; AJvYcCWvQ6Evs9VQpk42UBTH7G3ELxujazUKT3mtaombbjPEC5Ny4aerYiDUDeHxaalHjvjR7o8iqGhniZ/Ylcr5d6Sg2+cJkQPJj0xtJW4jFg== X-Gm-Message-State: AOJu0Yw5myMwsHGLmrbRuYPS6866mcH+hSEABICfOS+l+xEXfIEdxW09 n2Ufknb3Y0fcx6wIRLUEZa3Bf9R2hj/DFMSS6ZurL+5d+neHEil2vHslR4PFQqY= 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-arm-msm@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: 13669093 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 9373C61664 for ; Tue, 21 May 2024 09:45:30 +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=1716284732; cv=none; b=FafiUMDr9/xhKIkWy4Vg3dWYGKLMgA2QNQmUXdYZlA517BgNu3yV6jL7mEerdOjdcok3cUsZXJBUb/0NHlSM+KT+pN08zpLFY0aJsZqAY7/vwcqlVsI0aPMA8KzNlud57ZlhNCJgIb+ry02hd+Rq3SDeAgK1ldnhWOAQezr2Qis= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284732; c=relaxed/simple; bh=AFSw8YT67751JMyLAp98IxGcZ029778ZqkawJ08x+oE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CMtdRflXrvVPpdL6YJeDDW+Lo8kgHM7KxG51lRGouo3D3DTa6QFF/gofl50jrW/6DeH9p4iyZMVHY7WD6c8QrYdxlzTFiH1So03E9Oi7cq98xq+snEeK62LvVV46CgTigoth2YhJO0fpK8aEyJT5wVI/Dy1gFdDrUcul0p6aEpM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=UHQYHGVT; arc=none smtp.client-ip=209.85.208.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="UHQYHGVT" Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2e6f51f9de4so45814301fa.3 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=jg6c4rVoHR8AGYQngW6348G9nKI0HBCOGuMUZTFbNRSOT4tS/VgQnkkursg7h4QDM0 o9BSTtqy3CS+ITCsvaeA4tAz2xl6tAZ6ACdfL2Rkp858zNbosXgK910HM1O53cBFubET D2YjtYrad1gYshtOEOsLdWIWnYo98w46hk2waEnqeRoY2ApL2UrWV7Zw5P+WWz9g9+hj F86s6xGGDVkrlH95nro5B4tlnmt5zA7UVE1v17CFoTTAal/Us5BGktFMunh8X13uL1JW pJn7uSigwAlCwzyu54dNxOzOlc1MHsQHGv9mGLI+wEC9f/OBCLqCej4nPJFDq2Q5CiCi 8MUA== X-Forwarded-Encrypted: i=1; AJvYcCUyc3/BrsC3xa/CL1JcBOo33ze5/5wwGKI19uI1f4bk8Q+Y0aOAPH9Egg9rc6h1Om2eVUyXEGNehNPpfBrXFQzJMBvdxazANm8bBN+Gdw== X-Gm-Message-State: AOJu0YxBMKBkgysHuIlpJVIm4GYnVcWpLqXL/JC4a2btHZAkXxu7beeo M3FoSeLPq4INjTpsZi0r++jVnhTuOhDd2lV1CFAiy5sMIgfisCppRgVoiSyyIu8= 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-arm-msm@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: 13669094 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 696D871757 for ; Tue, 21 May 2024 09:45:31 +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=n2nR1Mk1qB5OFCOiFTX1+v4i6eS0PYiGgotHbZUxbspQKgZKGpUU8sYbc8DKV2loMzmk8r4vWMETMzt9ky206CfdzAZT6P1h6bU+HglTKeynqOdb5i3S5NjFTlMCdbUV7qnlB8VubXIY7TnmRdT53RvtSltQTQuuZBL8ZYX9vII= 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.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="S+EHt4L3" Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2e73359b8fbso15562631fa.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=Va1BkOJ//Q/7OFdYWblD1gnu7A4nGF51aPdPvWPLbhKwPUIdLLBFnqssb+oekQYEzJ KVo1xWbKCF0WUIFc25qM+PdfS0W3M65Ya65l1arPel6H/AjPTzBwNMcHUqGW1zMjNLF/ fT5o60aeyhVvn1hkqFnRXirUN3xbVm8g/wH7NImgwfH/nmFAPlITmDvtmbU7B3CZ5MaE YOAQ0YMXzgAoDbiwk8NearfvZX2gdykYZgnfySIIT2Ka1+vbjGPvRFuar1mci8k6Lavj UZQzOEdaX184j+HBRS2vyEcWudf9Xx5GCNYlpf8I+/oRYVXdkquHplC+/qcKY6IS2JQa IV6A== X-Forwarded-Encrypted: i=1; AJvYcCUviTz+8zAD9yeU88ZNbRv8RSkRbPU1MfaRHmanD+PovwTT9/NXKQAPeZ4EcIzZjTJUr6YjwmkkOqA9/cPSQQz38SewzSvrUiHnxWN2tw== X-Gm-Message-State: AOJu0YzubKpIKWLxDWkyIXrsRwOupfl3diHl+OAn+bJvRZeCfuC/Rr28 N339UL4WHHasLJONvto+NOCY1KcXiZW1db+K+/TCqAxkxOYpO30GrUcGK4f0Rnwvu9oMK1pMihg l 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-arm-msm@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: 13669095 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 254CE6CDC4 for ; Tue, 21 May 2024 09:45:32 +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=1716284735; cv=none; b=ARnMKwzNvZButUzfq7zZe0HHbfOBh/ymYOaFK30B9Ks+6rNYGw5xM295GGH9BayiwPuKoA0pjqjL5REA0ojMN9YlqVW8FXshahkRyiJS1K7nk3dChhMLl3Kd4efe9R+6CQtijfnJOT7eKIwcjgpXrvCsNeY5egRa1G5jTotq3qY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284735; c=relaxed/simple; bh=LXkde7roNdCA5RiqXlZv5DapdIAdFkD6mr6zmTWtmTw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RGt1HuNdOajSkHk5AdNsTvsoLnRbYP47fZ+gUIMP5akF3eRAdJr+TrnPftLBnJEQBi2DFA7a8Bl9ZKJw7aKzdGavj+jztMZaTJ3lK4vxmPDwtz6ucb8kxUivtL0ptXZ3pkp4fDSYCUXjpfO3SD0HN5/w3ijVdHexA1JSOYaYv2g= 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.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="Yndy3JFS" Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2e73359b8fbso15562851fa.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=P0J39GQyucCI4S5kP7yaq/egdVEEWIOdkCIIJXFlUFN8HTCGmgcBW8vfHoyEhb0gX2 gHDZID8rY5eo/QJ3XTb5foltc9UtCe38tWju+nrRje4TLU4aG+JLBF16gPfkejvz/gNv AJeMZbJ2rVvSf4GStcXpj3N+s0J/Wi85RvUW8/qxX+IqjUp2KwVEXdHWKsgRz3emtP64 bwNZdd0S5byPNE5obtKhqviPbpf8WL8XhSIc0zTjUmENNcA14OryMK9TROWuOeGlw7fM LovMaZ58lFdXosW5r/QrxPATWqkt5S9qLznnYpL6Lg3rOVDOCn8JZSiSYUCSoCMyJfa1 m+lA== X-Forwarded-Encrypted: i=1; AJvYcCWN3VoY/jeIzgEuOo9Cwnsa/0WL2BjKc/kM/CSh1nYap9HP4Rp+0RfYXEJf4KWf8/5rKV7slmgzPkOudk3cIXhJC4mJ7lqWyPlAbVpQIw== X-Gm-Message-State: AOJu0YwGICeN4sX5QcGuagyfd/wg8kVTzDJtDPeKTQdS/+CbYBL1hEuX 11ssYfALog6DBdGuTXCVgUix7Ai1FoIFmea/VU2EDv/LClzD9+ANvr5JuLu1u5o= 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-arm-msm@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: 13669097 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 E45367440B for ; Tue, 21 May 2024 09:45:32 +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=1716284736; cv=none; b=i5Ou+gSFXkNgcoPvWlzVhad0Hu07KieZ50tjAeTHAwmHuO5oH4ULH3FKJ8YcxhruaUFhO2Yfvyg5KjKyGEndTuzCXPRWjk1N03hoF8m4vHOVuLqDP6tQZrPCszWmalZCcbdvEUAwXkV2dDgf9mJ426W8zhBNSIYnuy6lHZMv3Us= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284736; c=relaxed/simple; bh=KYeL6fzQJLtDEFcKxFdxIcSfLdT+Pm9+X1ULYtcduSA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=fvgV1FFgHG4vlANprc/hSTc7o+mYsZMzcRliEsLCCZLuCOKyDGHhpmmOLvwd+358IXQhZFRC8LWNZ9kzftIap/Q+DqMZFyMXhn+sNYewGRizTYFBhKlVMiLpCcx59fhPy3KYwFwJ2OGspTuYO1sKK8sqHEbeazEVqSqRtaRHkpo= 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.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="GQ2FynWn" Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2e6f2534e41so36841921fa.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=kZWP70KUUVqN1L0hnkzoAnyROjXXqOJJbEgDIycXkoMFFSNAsS7a3Pi4h9/j+391Rb rHqzBqZyMyA/IQx64XkDiacoWc53/Z1G1FsBbyO20EiCDy+f3wAmKgoegYKI3rfuHxz8 /H01uvahOH7AOYrydjnNCrbMCiT2kcnj5YaryYu9uskqYxTEBKtvngtFo5iXEeG106lq LTOt1HqfaPAuX8cfyLm4i9I89aqoHdRBbfhcEAQTjuQaIJ40eQhvdBzivVSq4g9k6lUs LbqNnhwqMIU4VvB0QuoYPHhMQTpqBaxAP0MMfrLRkzPtkcz21vRyYHhe8T1LQPwiGFHH KGwA== X-Forwarded-Encrypted: i=1; AJvYcCWSqh36DdA418yM5e4iXNCHUbSBqlhYc/KP33bLKLQ/LBrst34TFBRHwktxvZKl9K2HmjAfpP3PzWIh3fY44+cII5bTXJ1FRkuCSaKn2g== X-Gm-Message-State: AOJu0YzCJkaAprhKHQgaPlTGmREtQB1ySqkSb5vHaQa2vS23DXz4kGyk 9MS6nb7ZNphWVQXAZz7ZISpI1AIj6yYH2oEJ5RzmLMB8CdaZt+QH3W/aL5eligi5L8xn7UXJlPZ S 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-arm-msm@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: 13669096 Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A462B74E3A for ; Tue, 21 May 2024 09:45:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284736; cv=none; b=QHUjq/8ozG+tXUAje96T2RXRTL+lxL7ckvewLJcouGx3yje6RGELCqQrdQ43fOln/9EEb/vu0rLKNq2HPUmpC8qGEL+on8btR66qk8wdmi+tLgVnnrkNm21VmlfzEajEwbu+SLO/vB8j/a2k7tgZfWUr2gdQbGv9LM9j2pO3UII= 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.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="q7ec7037" Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-51ffff16400so8438610e87.2 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=vFl7qGtrapGwgNQknJNlQK24o4ojvX6Bj8TGiM3T9Vd9BQDD3VsYG6H25430Ks1dlK M8fVf90OjzG+PErmXwQ9bjUgWk6YrIaGBzZdvn284DcSRgQUiT3uAeVhJCCFXSg5ZHtj 1PG6Yr6FuatMs6jCP1DgUjq4xU93LN0JaVGA08+2CQDtXjt4uBwuKEnXzzrIOUUEh9NJ /5MPD8ifOsUTzfjcdgFq0vvjk4tDG7E66/bp8F7d6qecDWA/Wq/RW42ZzUZUf2Uu+/DD GV4WLr/tRAEk0xvkv8hNbmZM1Ws0X14VYBRoSbTVl7fGcz34/87Dc+BWpNM3fzPbbRM4 e6wA== X-Forwarded-Encrypted: i=1; AJvYcCWEw/yH9ootWAfOnVsLCIaKRF1PtcAZEaST0TbiYU6mQLrDzzRLcYlWEHN/6dlHXehltW1qWdW1EU+a8TuBOmntAg19EYXMx7p57tTERQ== X-Gm-Message-State: AOJu0Yw3depR91ONLPTOh1dduTrx5ifEH5T8jl6h8E6UxGkeo55F5MjX E+JYAYU9NlLmv3dLz2zDoasekoWopfuDoQEeCRmP/dXzsdqf9pJjpQhyfJ/ub1M= 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-arm-msm@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: 13669098 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 584BC757F7 for ; Tue, 21 May 2024 09:45:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284737; cv=none; b=JnV/QzTxrgHJUXz77XyTT5YtUsz1TY1L661WYVgnEIwVpIEw9My9SgeRFuOaGnvkZoHDvzd7etgilABlE28A6v/OzPExDVxlD9jGLTnSKKzAQ1tPSXJ11ZJv+/6gJ8sWw/3sRoYzOZvGV8RM1XUBvgpiZ35Td4+NY0MxcqUTqpY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284737; c=relaxed/simple; bh=0EdhJdiexa04app1htF5yZNIe9fWs0XMN5UptBqZX9k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZPpSXhMgjD7CG6ELKHczWMnHlIe7aCq3B60+9kRc91JXt2upBgndOEdsui1Y1YkTZNl5TEZqQ+83522MfrCDaLIy5gaGGFZpuTVo4cgdTaky8/ifavIoEj+NXER+iLjiMvXk0OuXPmeJliKcopebgwCSAgyjkcrYVwhjst+iaRI= 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.172 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-f172.google.com with SMTP id 38308e7fff4ca-2e719bab882so28046591fa.3 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=aq0DZORvujxYAmMnOnKqyDJqnt+nzyqhzDLD8AQHfCdzxPNs+FOs0eCtpvPWXhudyI gHFYvhWI4plmPMNo4nc6R0Of4BhweB43AA7DFx+6Lshzi7bjGJ4XEmOaDurhtTbsg0R1 SDMqxjfZSahPxfOIDzjovHRxka21SC+B7GXgnvHt9gSio0AMD0/pbtdLGe/tqo8y2KYH sXbtilBKFanLHTNr8iXv0vwmeiCkrUVAGd0WwyOGhBx+fkn/GQs3KxAPSt32WQToiL7n 8Pr2viU2xonMUINgDCnhPesGe3Mnp6J9ynXceWzAOj9Gh0TUuQWMNwbSw+SohpseRcFu GxFg== X-Forwarded-Encrypted: i=1; AJvYcCWg8+dyEbJ03G2Hj9aHmsSp2tTjOHBipQghIJJiI/DNvD7G5y89ZcVGLtdo9PnnhbKZVD8aDCAg4XvlZM/p1DFpPBpQOfFdG4ukzJszYg== X-Gm-Message-State: AOJu0YzOsxmZwHcYvoR2jBYu5htXyp7GUQWH75kErC+TqQ7fxgrgQQ4E pPmOcVS/Ou2o73MTm20ATyPKEG7FDABnxaVpdqvYQyg04PDDKmWEyi+t7vStnC4= 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-arm-msm@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: 13669100 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 2AB5276045 for ; Tue, 21 May 2024 09:45:35 +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=1716284738; cv=none; b=pghbNacoAf+A+T0CMU06wldrWmUQb1MpVTtrFRYO7bodprqbvxo35ODfWVydw/UsM130zbDeUrjGXyoTY4/3/F9QFV/DlQduQ+EQZdqJvLzM8BPNDAxdAohelUPAgf36FXCNC0rAvhTfeMDQH4VHgf0a6zAAXsVW8ueOXrNdgyk= 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.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="lu3JTEfa" Received: by mail-lj1-f176.google.com with SMTP id 38308e7fff4ca-2e3e18c24c1so57267331fa.1 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=DUscUoKtFkgrsNnVzOcw0aalDRkrcAn5lYHRZj39kZMPeQ79YzmouctHRfeh/R7Ry0 O6htFi66lwHJSBQFDSmrbhvV2yuVjZP/CeobsT6O/bjtXUQZp8bHL/crSh2GzauDr2nY tD8W3L1520HZJ96JTb8bnKAYajL+kv7U70cLQd34A2PQL4ZkHMHD3Enr7lI66W1orP0b vlVApxAf4RBOi/R+vihoFoCP56fc95vlGpOplteQSxkQLc1wFsyBorxkJn0P9C/Z/GK0 ruz16sh4dOSEtj4qu5kyId8Sm50ZsLieDATmvbXAsLqXnv5Ml6UArz3LkIsnGApCq+y3 epkQ== X-Forwarded-Encrypted: i=1; AJvYcCU7xbo8HLqDPoBHU8d9T7oyGmLpC/upZ2bn2h+HBOC4bIyJucNivhSxL/X1TwJVdRRJ4JPOw+6kAvClw54XjGG2OvjUaRs0eVa5FFWMRg== X-Gm-Message-State: AOJu0YweGXL3x4LJm3gY4GHH2JDhZn4Yn0QVZDrCXp6iJsxx2O2c7Dt7 lhadw8ZlHdgQMGC+UxXtlub3ojH2Uh1GS6p5i+0R2n7mEE53HAnDDzdHdbquGXE= 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-arm-msm@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: 13669099 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 CFDC0770E3 for ; Tue, 21 May 2024 09:45:35 +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=1716284738; cv=none; b=BpzpckLg1VR6q/PWH56Nr16fZ7C9GDKzbr7S9vs3+k5uUhtzNQtvtwR9LEf2viawI874I/yzFvHUCCUF2ytHcu0KrfTiqo03FpNt1o82C2i1C8LM/aPzuvJ3TKwN0zk0hqZkFnMpBU3MaI7QHwVTsTeoZf9g0VIDyfAbY5HD/Hw= 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.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="vedFmH6u" Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-2e73359b8fbso15563631fa.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=nZaP+OD9r4AFhpL9dsVPrV/xOOD4j50citxk+zGfSL/Q97eFReDCgwRDzkw6OpD3hy T3LYHScHlmCyRHElYZ15UlZbvBjpWYLUYsGmWSmucpRwAqbyxUz/dZyNe+8114MDRJxm 4NmtCeAvuR/MnGZhc9kjzZ5D2OfiK+hbPJ4EAFSBQ9jR+nrHk4Jxx4JTDmlawB5Brdp9 38U60mXHsFpn7wmIa3jcoD8DH7pLUUrHFOtRYz/+GdnfidUv0XX6okujM3jTXmhyttb4 fBeWL6ZImGxlIL5UMWg3xqHCgfeWKLatg7VuqlngDLH94xttIgku6NEKoZ26D6ra2YjC CzlQ== X-Forwarded-Encrypted: i=1; AJvYcCUq0/4Y0DhXkpY4WOZ5ifM1rPnfw35Yimsy/aEUZHI/Nw8RnoXDvhUkZDwzhzaFgwvuIRl71hYjS+jg2EUA7eB/XEXFPbuyzQQdE5q5nw== X-Gm-Message-State: AOJu0YxatyGYqQsagJCxf2mUts7F9pRfjjB+OaXL4jfwvjY0gzDChA4T ecXfUNthqKR4L2cVqHza5Zyxa984CrvbZc/LLlTcaY4eA+cFpm8RlHaYaPbrlXY= 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-arm-msm@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 {