Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: firmware: qcom: scm: Separate VMIDs from header to bindings

The SCM VMIDs represent predefined mappings that come from the
irreplaceable and non-omittable firmware that comes with every
Qualcomm SoC (unless you steal engineering samples from the factory)
and help clarify otherwise totally magic numbers which we are
required to pass to the secure world for some parts of the SoC to
work at all (with modem being the prime example).

On top of that, with changes to the rmtfs binding, secure VMIDs will
become useful to have in device trees for readability. Separate them
out and add to include/dt-bindings.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230109130523.298971-3-konrad.dybcio@linaro.org

authored by

Konrad Dybcio and committed by
Bjorn Andersson
45ca30eb e656cd0b

+18 -5
+16
include/dt-bindings/firmware/qcom,scm.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ 2 + /* 3 + * Copyright (c) 2010-2015, 2018-2019 The Linux Foundation. All rights reserved. 4 + * Copyright (C) 2015 Linaro Ltd. 5 + */ 6 + 7 + #ifndef _DT_BINDINGS_FIRMWARE_QCOM_SCM_H 8 + #define _DT_BINDINGS_FIRMWARE_QCOM_SCM_H 9 + 10 + #define QCOM_SCM_VMID_HLOS 0x3 11 + #define QCOM_SCM_VMID_MSS_MSA 0xF 12 + #define QCOM_SCM_VMID_WLAN 0x18 13 + #define QCOM_SCM_VMID_WLAN_CE 0x19 14 + #define QCOM_SCM_VMID_NAV 0x2B 15 + 16 + #endif
+2 -5
include/linux/qcom_scm.h
··· 9 9 #include <linux/types.h> 10 10 #include <linux/cpumask.h> 11 11 12 + #include <dt-bindings/firmware/qcom,scm.h> 13 + 12 14 #define QCOM_SCM_VERSION(major, minor) (((major) << 16) | ((minor) & 0xFF)) 13 15 #define QCOM_SCM_CPU_PWR_DOWN_L2_ON 0x0 14 16 #define QCOM_SCM_CPU_PWR_DOWN_L2_OFF 0x1 ··· 53 51 QCOM_SCM_ICE_CIPHER_AES_256_CBC = 4, 54 52 }; 55 53 56 - #define QCOM_SCM_VMID_HLOS 0x3 57 - #define QCOM_SCM_VMID_MSS_MSA 0xF 58 - #define QCOM_SCM_VMID_WLAN 0x18 59 - #define QCOM_SCM_VMID_WLAN_CE 0x19 60 - #define QCOM_SCM_VMID_NAV 0x2B 61 54 #define QCOM_SCM_PERM_READ 0x4 62 55 #define QCOM_SCM_PERM_WRITE 0x2 63 56 #define QCOM_SCM_PERM_EXEC 0x1