From 78d5e84a022c55f540fb37008d5dd0d68742b46f Mon Sep 17 00:00:00 2001 From: Naina Mehta Date: Mon, 5 Oct 2020 16:21:14 +0530 Subject: [PATCH 1/3] dt-bindings: Add qfprom-sys documentation qfprom-sys can be used to export nvmem cell values as sysfs entries to user space. Change-Id: I2bcbf1bbfc0ac187e6f2b7c177b0f2bc14ca654e --- bindings/arm/msm/qcom,qfprom-sys.yaml | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 bindings/arm/msm/qcom,qfprom-sys.yaml diff --git a/bindings/arm/msm/qcom,qfprom-sys.yaml b/bindings/arm/msm/qcom,qfprom-sys.yaml new file mode 100644 index 000000000000..e0da6ada6ff7 --- /dev/null +++ b/bindings/arm/msm/qcom,qfprom-sys.yaml @@ -0,0 +1,36 @@ +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bindings/arm/msm/qcom,qfprom-sys.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. QFPROM_SYS driver binding + +maintainers: + +description: |+ + QFPROM_SYS provides access to the nvmem cells to the user space. + The driver exports the cell values as sysfs entries. + +properties: + compatible: + const: qcom,qfprom-sys + + nvmem-cell-name: + description: array of strings for cell names + + nvmem-cells: + description: phandle to particular cell from provider + +required: + - compatible + - nvmem-cell-name + - nvmem-cells + +example: + - | + qfprom@0 { + compatible = "qcom,qfprom-sys"; + nvmem-cells = <&tsens_calibration1>, <&tsens_calibration2>; + nvmem-cell-names = "calibration1", "calibration2"; + }; +... From f023fb6a0f1979fe1793f5c3f07805177f3a2279 Mon Sep 17 00:00:00 2001 From: Naina Mehta Date: Mon, 5 Oct 2020 15:49:43 +0530 Subject: [PATCH 2/3] ARM: dts: msm: Export qfprom cell to userspace Add support to export qfprom cell values as sysfs entries to userspace. Change-Id: Id4ab00e095c23d195fe017c023099dd100a6eb76 --- qcom/holi.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/qcom/holi.dtsi b/qcom/holi.dtsi index 1d8a294b6fd4..2798bc18d4f9 100644 --- a/qcom/holi.dtsi +++ b/qcom/holi.dtsi @@ -2719,6 +2719,21 @@ reg = <0x6028 0x4>; }; }; + + qfprom_sys: qfprom@0 { + compatible = "qcom,qfprom-sys"; + + nvmem-cells = <&gpu_speed_bin>, + <&adsp_variant>, + <&feat_conf8>, + <&gpu_gaming_bin>, + <&feat_conf9>; + nvmem-cell-names = "gpu_speed_bin", + "adsp_variant", + "feat_conf8", + "gpu_gaming_bin", + "feat_conf9"; + }; }; #include "holi-gpu.dtsi" From 1a296131e5b7d300d1d78efe45ffd97d35248499 Mon Sep 17 00:00:00 2001 From: Neeraj Upadhyay Date: Wed, 14 Oct 2020 15:58:12 +0530 Subject: [PATCH 3/3] ARM: dts: msm: Export qfprom cell to userspace for Shima Add support to export qfprom cell values as sysfs entries to userspace. Change-Id: Iedc3fbdffeb1992323e514628961567479c0ed35 --- qcom/shima.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/qcom/shima.dtsi b/qcom/shima.dtsi index fd0b467f4806..3ef5da0e77b3 100644 --- a/qcom/shima.dtsi +++ b/qcom/shima.dtsi @@ -3451,6 +3451,21 @@ }; }; + qfprom_sys: qfprom@0 { + compatible = "qcom,qfprom-sys"; + + nvmem-cells = <&gpu_speed_bin>, + <&gpu_gaming_bin>, + <&adsp_variant>, + <&feat_conf_m7>, + <&feat_conf_qc_spare_20_lsb>; + nvmem-cell-names = "gpu_speed_bin", + "gpu_gaming_bin", + "adsp_variant", + "feat_conf_m7", + "feat_conf_qc_spare_20_lsb"; + }; + wlan: qcom,cnss-qca6490@b0000000 { compatible = "qcom,cnss-qca6490"; reg = <0xb0000000 0x10000>;