Skip to contentSkip to conversation

firmware: qcom: scm: Add sdm660 soc compatible

PATCH In review Craig Tatlor 4 participants 4 messages Aug 11, 2018 – Sep 24, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firmware: qcom: scm: Add sdm660 soc compatible

Add the compatible for SDM660.
This does not need clocks to do scm calls

---
 Documentation/devicetree/bindings/firmware/qcom,scm.txt | 1 +
 drivers/firmware/qcom_scm.c                             | 3 +++
 2 files changed, 4 insertions(+)
Documentation/devicetree/bindings/firmware/qcom,scm.txt +1 -0
index fcf6979c0b6d..499608fcc864 100644
@@ -11,6 +11,7 @@ Required properties:
  * "qcom,scm-msm8660" for MSM8660 platforms
  * "qcom,scm-msm8690" for MSM8690 platforms
  * "qcom,scm-msm8996" for MSM8996 platforms
+ * "qcom,scm-sdm660" for SDM660 platforms
  * "qcom,scm-ipq4019" for IPQ4019 platforms
  * "qcom,scm" for later processors (MSM8916, APQ8084, MSM8974, etc)
 - clocks: One to three clocks may be required based on compatible.
drivers/firmware/qcom_scm.c +3 -0
index e778af766fae..ee113ceb5d41 100644
@@ -603,6 +603,9 @@ static const struct of_device_id qcom_scm_dt_match[] = {
 	{ .compatible = "qcom,scm-msm8996",
 	  .data = NULL, /* no clocks */
 	},
+	{ .compatible = "qcom,scm-sdm660",
+	  .data = NULL, /* no clocks */
+	},
 	{ .compatible = "qcom,scm-ipq4019",
 	  .data = NULL, /* no clocks */
 	},
Signature · 1 line
2.18.0
#2 lore raw
In reply to Craig Tatlor

Quoting Craig Tatlor (2018-08-11 09:24:50)

Quoted 26 lines

Add the compatible for SDM660.
This does not need clocks to do scm calls

---
 Documentation/devicetree/bindings/firmware/qcom,scm.txt | 1 +
 drivers/firmware/qcom_scm.c                             | 3 +++
 2 files changed, 4 insertions(+)
Documentation/devicetree/bindings/firmware/qcom,scm.txt +1 -0
index fcf6979c0b6d..499608fcc864 100644
@@ -11,6 +11,7 @@ Required properties:
  * "qcom,scm-msm8660" for MSM8660 platforms
  * "qcom,scm-msm8690" for MSM8690 platforms
  * "qcom,scm-msm8996" for MSM8996 platforms
+ * "qcom,scm-sdm660" for SDM660 platforms
  * "qcom,scm-ipq4019" for IPQ4019 platforms
  * "qcom,scm" for later processors (MSM8916, APQ8084, MSM8974, etc)
 - clocks: One to three clocks may be required based on compatible.
drivers/firmware/qcom_scm.c +0 -0
index e778af766fae..ee113ceb5d41 100644

drivers/firmware/qcom_scm.c static const struct of_device_id qcom_scm_dt_match[] = { · line 608

Quoted 6 lines
drivers/firmware/qcom_scm.c +3 -0
@@ -603,6 +603,9 @@ static const struct of_device_id qcom_scm_dt_match[] = {
        { .compatible = "qcom,scm-msm8996",
          .data = NULL, /* no clocks */
        },
+       { .compatible = "qcom,scm-sdm660",
+         .data = NULL, /* no clocks */
+       },

Do you need to update the driver? It looks like the scm driver should be changed to just try and get all the clks it can and treat them as optional clks, i.e. don't fail if they aren't actually listed in DT. Then we can just have one qcom,scm compatible string in this driver but we're free to add different compatibles to the binding for all the different SoCs out there.

#3 lore raw
In reply to Craig Tatlor
Quoted 4 lines · Craig Tatlor

Add the compatible for SDM660.
This does not need clocks to do scm calls

Andy picked my clock-rework patch for the scm driver, so we can now do:

	compatible = "qcom,scm-sdm660", "qcom,scm";

and get the desired result.

Please respin your patch without the code update.

Regards,
Bjorn

Quoted 34 lines
---
 Documentation/devicetree/bindings/firmware/qcom,scm.txt | 1 +
 drivers/firmware/qcom_scm.c                             | 3 +++
 2 files changed, 4 insertions(+)
Documentation/devicetree/bindings/firmware/qcom,scm.txt +1 -0
index fcf6979c0b6d..499608fcc864 100644
@@ -11,6 +11,7 @@ Required properties:
  * "qcom,scm-msm8660" for MSM8660 platforms
  * "qcom,scm-msm8690" for MSM8690 platforms
  * "qcom,scm-msm8996" for MSM8996 platforms
+ * "qcom,scm-sdm660" for SDM660 platforms
  * "qcom,scm-ipq4019" for IPQ4019 platforms
  * "qcom,scm" for later processors (MSM8916, APQ8084, MSM8974, etc)
 - clocks: One to three clocks may be required based on compatible.
drivers/firmware/qcom_scm.c +3 -0
index e778af766fae..ee113ceb5d41 100644
@@ -603,6 +603,9 @@ static const struct of_device_id qcom_scm_dt_match[] = {
 	{ .compatible = "qcom,scm-msm8996",
 	  .data = NULL, /* no clocks */
 	},
+	{ .compatible = "qcom,scm-sdm660",
+	  .data = NULL, /* no clocks */
+	},
 	{ .compatible = "qcom,scm-ipq4019",
 	  .data = NULL, /* no clocks */
 	},
Signature · 1 line
2.18.0