mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] soc: qcom: socinfo: Drop DT bindings with IDs
@ 2026-11-23 22:12 Krzysztof Kozlowski
  2026-11-23 22:12 ` [PATCH v2 1/2] soc: qcom: socinfo: Copy new SoC IDs from bindings Krzysztof Kozlowski
  2026-11-23 22:12 ` [PATCH v2 2/2] dt-bindings: qcom: qcom,ids: Remove unneeded ID constants Krzysztof Kozlowski
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-23 22:12 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Ilia Lin, Rafael J. Wysocki, Viresh Kumar
  Cc: linux-kernel, linux-arm-msm, devicetree, linux-clk, linux-pm,
	Krzysztof Kozlowski

Changes in v2:
- Fix order of QCOM_ID_IPQ5404 and QCOM_ID_QCS9100
- Keep QCOM_ID_QRB5165 and QCOM_ID_SM7225, as these are the last ones
  allowed to use that DT ABI
- Commit msg fixups
- Link to v1: https://patch.msgid.link/20261122-qcom-socinfo-id-dt-bindings-v1-0-eeee0ffa25da@oss.qualcomm.com

It turns out that people add SoC IDs as Devicetree bindings, thus ABI,
and then want to change them, for example because renaming/marketing happened.
Well, that is discouraged - either this is ABI and cannot be changed, or
is not an ABI and can be changed.

https://lore.kernel.org/all/9eda2209-d64a-4a1c-915d-4415ac47df45@kernel.org/

Best regards,
Krzysztof

---
Krzysztof Kozlowski (2):
      soc: qcom: socinfo: Copy new SoC IDs from bindings
      dt-bindings: qcom: qcom,ids: Remove unneeded ID constants

 drivers/clk/qcom/apss-ipq6018.c      |  2 +-
 drivers/cpufreq/qcom-cpufreq-nvmem.c |  1 +
 include/dt-bindings/arm/qcom,ids.h   | 91 +----------------------------------
 include/linux/soc/qcom/socinfo.h     | 92 ++++++++++++++++++++++++++++++++++++
 4 files changed, 95 insertions(+), 91 deletions(-)
---
base-commit: 711b991738702a5c144b7cd1d182ec03b08e8853
change-id: 20261122-qcom-socinfo-id-dt-bindings-e6fe815b4480

Best regards,
--  
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 1/2] soc: qcom: socinfo: Copy new SoC IDs from bindings
  2026-11-23 22:12 [PATCH v2 0/2] soc: qcom: socinfo: Drop DT bindings with IDs Krzysztof Kozlowski
@ 2026-11-23 22:12 ` Krzysztof Kozlowski
  2026-11-23 22:12 ` [PATCH v2 2/2] dt-bindings: qcom: qcom,ids: Remove unneeded ID constants Krzysztof Kozlowski
  1 sibling, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-23 22:12 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Ilia Lin, Rafael J. Wysocki, Viresh Kumar
  Cc: linux-kernel, linux-arm-msm, devicetree, linux-clk, linux-pm,
	Krzysztof Kozlowski

The IDs of newer Qualcomm SoCs, as reported by hardware or firmware, are
currently used only in the socinfo.c driver.  There should not be and
there is no in-tree DTS user of these, so none of these constants are
really proper Devicetree ABI.  IDs of older SoCs were being used in DTS,
thus that part matches the concept behind DT bindings.

Copy arbitrarily chosen newer SoC IDs from the DT bindings to the
regular header of socinfo driver and use it when needed, so later they
could be removed from the bindings.  Note, that DT bindings do not allow
qcom,msm-id ABI for anything newer than SM8250 or SM7225.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 drivers/clk/qcom/apss-ipq6018.c      |  2 +-
 drivers/cpufreq/qcom-cpufreq-nvmem.c |  1 +
 include/linux/soc/qcom/socinfo.h     | 92 ++++++++++++++++++++++++++++++++++++
 3 files changed, 94 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/qcom/apss-ipq6018.c b/drivers/clk/qcom/apss-ipq6018.c
index 32347e6d8775..b4babeece2e0 100644
--- a/drivers/clk/qcom/apss-ipq6018.c
+++ b/drivers/clk/qcom/apss-ipq6018.c
@@ -11,9 +11,9 @@
 #include <linux/module.h>
 #include <linux/clk.h>
 #include <linux/soc/qcom/smem.h>
+#include <linux/soc/qcom/socinfo.h>
 
 #include <dt-bindings/clock/qcom,apss-ipq.h>
-#include <dt-bindings/arm/qcom,ids.h>
 
 #include "common.h"
 #include "clk-regmap.h"
diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq/qcom-cpufreq-nvmem.c
index 2b458ed1f6cf..3f933a434526 100644
--- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
+++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
@@ -29,6 +29,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/slab.h>
 #include <linux/soc/qcom/smem.h>
+#include <linux/soc/qcom/socinfo.h>
 
 #include <dt-bindings/arm/qcom,ids.h>
 
diff --git a/include/linux/soc/qcom/socinfo.h b/include/linux/soc/qcom/socinfo.h
index ba823a0013c5..317dcc26c504 100644
--- a/include/linux/soc/qcom/socinfo.h
+++ b/include/linux/soc/qcom/socinfo.h
@@ -112,4 +112,96 @@ enum qcom_socinfo_feature_code {
 #define SOCINFO_PCn(n)			((n) + 1)
 #define SOCINFO_PC_RESERVE		(BIT(31) - 1)
 
+/* SoC IDs */
+#define QCOM_ID_SM8450			457
+#define QCOM_ID_SA8295P			460
+#define QCOM_ID_SA8540P			461
+#define QCOM_ID_QCM4290			469
+#define QCOM_ID_QCS4290			470
+#define QCOM_ID_SM7325			475
+#define QCOM_ID_SM8450_2		480
+#define QCOM_ID_SM8450_3		482
+#define QCOM_ID_SC7280			487
+#define QCOM_ID_SC7180P			495
+#define QCOM_ID_QCM6490			497
+#define QCOM_ID_QCS6490			498
+#define QCOM_ID_SM7325P			499
+#define QCOM_ID_IPQ5000			503
+#define QCOM_ID_IPQ0509			504
+#define QCOM_ID_IPQ0518			505
+#define QCOM_ID_SM7450			506
+#define QCOM_ID_SM6375			507
+#define QCOM_ID_IPQ9514			510
+#define QCOM_ID_IPQ9550			511
+#define QCOM_ID_IPQ9554			512
+#define QCOM_ID_IPQ9570			513
+#define QCOM_ID_IPQ9574			514
+#define QCOM_ID_SM8550			519
+#define QCOM_ID_IPQ5016			520
+#define QCOM_ID_IPQ9510			521
+#define QCOM_ID_QRB4210			523
+#define QCOM_ID_QRB2210			524
+#define QCOM_ID_SAR2130P		525
+#define QCOM_ID_SM8475			530
+#define QCOM_ID_SM8475P			531
+#define QCOM_ID_SA8255P			532
+#define QCOM_ID_SA8650P			533
+#define QCOM_ID_SA8775P			534
+#define QCOM_ID_QRU1000			539
+#define QCOM_ID_SM8475_2		540
+#define QCOM_ID_QDU1000			545
+#define QCOM_ID_SM7450P			547
+#define QCOM_ID_X1E80100		555
+#define QCOM_ID_SM8650			557
+#define QCOM_ID_SM4450			568
+#define QCOM_ID_SAR1130P		579
+#define QCOM_ID_QDU1010			587
+#define QCOM_ID_QRU1032			588
+#define QCOM_ID_QRU1052			589
+#define QCOM_ID_QRU1062			590
+#define QCOM_ID_IPQ5332			592
+#define QCOM_ID_IPQ5322			593
+#define QCOM_ID_IPQ5312			594
+#define QCOM_ID_IPQ5302			595
+#define QCOM_ID_QCS8550			603
+#define QCOM_ID_QCM8550			604
+#define QCOM_ID_SM8750			618
+#define QCOM_ID_IPQ5300			624
+#define QCOM_ID_SM7635			636
+#define QCOM_ID_SM6650			640
+#define QCOM_ID_SM6650P			641
+#define QCOM_ID_IPQ5321			650
+#define QCOM_ID_IPQ5424			651
+#define QCOM_ID_QCM6690			657
+#define QCOM_ID_QCS6690			658
+#define QCOM_ID_SM7750			659
+#define QCOM_ID_SM8850			660
+#define QCOM_ID_QCS9100			667
+#define QCOM_ID_IPQ5404			671
+#define QCOM_ID_QCS8300			674
+#define QCOM_ID_QCS8275			675
+#define QCOM_ID_QCS9075			676
+#define QCOM_ID_QCS615			680
+#define QCOM_ID_SA8797P			690
+#define QCOM_ID_SM8975			707
+#define QCOM_ID_CQ7790M			731
+#define QCOM_ID_CQ7790S			732
+#define QCOM_ID_SM8950			735
+#define QCOM_ID_CQ2390M			756
+#define QCOM_ID_CQ2390S			758
+#define QCOM_ID_IQ2390S			759
+#define QCOM_ID_IPQ5200			765
+#define QCOM_ID_IPQ5210			766
+#define QCOM_ID_QCF2200			767
+#define QCOM_ID_QCF3200			768
+#define QCOM_ID_QCF3210			769
+#define QCOM_ID_IPQ9620			770
+#define QCOM_ID_IPQ9650			771
+#define QCOM_ID_IPQ9610			778
+#define QCOM_ID_IPQ9630			779
+#define QCOM_ID_IPQ9640			780
+#define QCOM_ID_IPQ9670			781
+#define QCOM_ID_QCF3211			801
+#define QCOM_ID_IPQ5211			802
+
 #endif

-- 
2.53.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 2/2] dt-bindings: qcom: qcom,ids: Remove unneeded ID constants
  2026-11-23 22:12 [PATCH v2 0/2] soc: qcom: socinfo: Drop DT bindings with IDs Krzysztof Kozlowski
  2026-11-23 22:12 ` [PATCH v2 1/2] soc: qcom: socinfo: Copy new SoC IDs from bindings Krzysztof Kozlowski
@ 2026-11-23 22:12 ` Krzysztof Kozlowski
  2026-12-01  2:59   ` Rob Herring (Arm)
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-23 22:12 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Stephen Boyd, Brian Masney,
	Jerome Brunet, Ilia Lin, Rafael J. Wysocki, Viresh Kumar
  Cc: linux-kernel, linux-arm-msm, devicetree, linux-clk, linux-pm,
	Krzysztof Kozlowski

The IDs of newer Qualcomm SoCs, as reported by hardware or firmware, are
currently used only in the socinfo.c driver.  There should not nbe and
there is no in-tree DTS user of these, so none of these constants are
really proper Devicetree ABI.  IDs of older SoCs were being used in DTS,
thus that part matches the concept behind DT bindings.

Drivers have local copies of these defines, thus these can be dropped.
This has no impact on in-tree ABI, but any outside users would be
affected.

Note, that DT bindings do not allow qcom,msm-id ABI for anything newer
than SM8250 or SM7225.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
 include/dt-bindings/arm/qcom,ids.h | 91 +-------------------------------------
 1 file changed, 1 insertion(+), 90 deletions(-)

diff --git a/include/dt-bindings/arm/qcom,ids.h b/include/dt-bindings/arm/qcom,ids.h
index d89d3b5dd00c..ecf99553ddb0 100644
--- a/include/dt-bindings/arm/qcom,ids.h
+++ b/include/dt-bindings/arm/qcom,ids.h
@@ -230,97 +230,8 @@
 #define QCOM_ID_SC8280XP		449
 #define QCOM_ID_IPQ6005			453
 #define QCOM_ID_QRB5165			455
-#define QCOM_ID_SM8450			457
 #define QCOM_ID_SM7225			459
-#define QCOM_ID_SA8295P			460
-#define QCOM_ID_SA8540P			461
-#define QCOM_ID_QCM4290			469
-#define QCOM_ID_QCS4290			470
-#define QCOM_ID_SM7325			475
-#define QCOM_ID_SM8450_2		480
-#define QCOM_ID_SM8450_3		482
-#define QCOM_ID_SC7280			487
-#define QCOM_ID_SC7180P			495
-#define QCOM_ID_QCM6490			497
-#define QCOM_ID_QCS6490			498
-#define QCOM_ID_SM7325P			499
-#define QCOM_ID_IPQ5000			503
-#define QCOM_ID_IPQ0509			504
-#define QCOM_ID_IPQ0518			505
-#define QCOM_ID_SM7450			506
-#define QCOM_ID_SM6375			507
-#define QCOM_ID_IPQ9514			510
-#define QCOM_ID_IPQ9550			511
-#define QCOM_ID_IPQ9554			512
-#define QCOM_ID_IPQ9570			513
-#define QCOM_ID_IPQ9574			514
-#define QCOM_ID_SM8550			519
-#define QCOM_ID_IPQ5016			520
-#define QCOM_ID_IPQ9510			521
-#define QCOM_ID_QRB4210			523
-#define QCOM_ID_QRB2210			524
-#define QCOM_ID_SAR2130P		525
-#define QCOM_ID_SM8475			530
-#define QCOM_ID_SM8475P			531
-#define QCOM_ID_SA8255P			532
-#define QCOM_ID_SA8650P			533
-#define QCOM_ID_SA8775P			534
-#define QCOM_ID_QRU1000			539
-#define QCOM_ID_SM8475_2		540
-#define QCOM_ID_QDU1000			545
-#define QCOM_ID_SM7450P			547
-#define QCOM_ID_X1E80100		555
-#define QCOM_ID_SM8650			557
-#define QCOM_ID_SM4450			568
-#define QCOM_ID_SAR1130P		579
-#define QCOM_ID_QDU1010			587
-#define QCOM_ID_QRU1032			588
-#define QCOM_ID_QRU1052			589
-#define QCOM_ID_QRU1062			590
-#define QCOM_ID_IPQ5332			592
-#define QCOM_ID_IPQ5322			593
-#define QCOM_ID_IPQ5312			594
-#define QCOM_ID_IPQ5302			595
-#define QCOM_ID_QCS8550			603
-#define QCOM_ID_QCM8550			604
-#define QCOM_ID_SM8750			618
-#define QCOM_ID_IPQ5300			624
-#define QCOM_ID_SM7635			636
-#define QCOM_ID_SM6650			640
-#define QCOM_ID_SM6650P			641
-#define QCOM_ID_IPQ5321			650
-#define QCOM_ID_IPQ5424			651
-#define QCOM_ID_QCM6690			657
-#define QCOM_ID_QCS6690			658
-#define QCOM_ID_SM7750			659
-#define QCOM_ID_SM8850			660
-#define QCOM_ID_IPQ5404			671
-#define QCOM_ID_QCS9100			667
-#define QCOM_ID_QCS8300			674
-#define QCOM_ID_QCS8275			675
-#define QCOM_ID_QCS9075			676
-#define QCOM_ID_QCS615			680
-#define QCOM_ID_SA8797P			690
-#define QCOM_ID_SM8975			707
-#define QCOM_ID_CQ7790M			731
-#define QCOM_ID_CQ7790S			732
-#define QCOM_ID_SM8950			735
-#define QCOM_ID_CQ2390M			756
-#define QCOM_ID_CQ2390S			758
-#define QCOM_ID_IQ2390S			759
-#define QCOM_ID_IPQ5200			765
-#define QCOM_ID_IPQ5210			766
-#define QCOM_ID_QCF2200			767
-#define QCOM_ID_QCF3200			768
-#define QCOM_ID_QCF3210			769
-#define QCOM_ID_IPQ9620			770
-#define QCOM_ID_IPQ9650			771
-#define QCOM_ID_IPQ9610			778
-#define QCOM_ID_IPQ9630			779
-#define QCOM_ID_IPQ9640			780
-#define QCOM_ID_IPQ9670			781
-#define QCOM_ID_QCF3211			801
-#define QCOM_ID_IPQ5211			802
+/* Do not grow the list with entries which are not used as Devicetree ABI */
 
 /*
  * The board type and revision information, used by Qualcomm bootloaders and

-- 
2.53.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 2/2] dt-bindings: qcom: qcom,ids: Remove unneeded ID constants
  2026-11-23 22:12 ` [PATCH v2 2/2] dt-bindings: qcom: qcom,ids: Remove unneeded ID constants Krzysztof Kozlowski
@ 2026-12-01  2:59   ` Rob Herring (Arm)
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring (Arm) @ 2026-12-01  2:59 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Krzysztof Kozlowski, Konrad Dybcio, linux-kernel, linux-arm-msm,
	linux-pm, devicetree, Viresh Kumar, Abel Vesa, Ilia Lin,
	linux-clk, Bjorn Andersson, Stephen Boyd, Rafael J. Wysocki,
	Brian Masney, Conor Dooley, Jerome Brunet


On Mon, 23 Nov 2026 23:12:11 +0100, Krzysztof Kozlowski wrote:
> The IDs of newer Qualcomm SoCs, as reported by hardware or firmware, are
> currently used only in the socinfo.c driver.  There should not nbe and
> there is no in-tree DTS user of these, so none of these constants are
> really proper Devicetree ABI.  IDs of older SoCs were being used in DTS,
> thus that part matches the concept behind DT bindings.
> 
> Drivers have local copies of these defines, thus these can be dropped.
> This has no impact on in-tree ABI, but any outside users would be
> affected.
> 
> Note, that DT bindings do not allow qcom,msm-id ABI for anything newer
> than SM8250 or SM7225.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
>  include/dt-bindings/arm/qcom,ids.h | 91 +-------------------------------------
>  1 file changed, 1 insertion(+), 90 deletions(-)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-12-01  2:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 22:12 [PATCH v2 0/2] soc: qcom: socinfo: Drop DT bindings with IDs Krzysztof Kozlowski
2026-11-23 22:12 ` [PATCH v2 1/2] soc: qcom: socinfo: Copy new SoC IDs from bindings Krzysztof Kozlowski
2026-11-23 22:12 ` [PATCH v2 2/2] dt-bindings: qcom: qcom,ids: Remove unneeded ID constants Krzysztof Kozlowski
2026-12-01  2:59   ` Rob Herring (Arm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®