Re: [PATCH 1/2] soc: qcom: socinfo: Copy new SoC IDs from bindings

From: Krzysztof Kozlowski

Date: Mon Nov 23 2026 - 16:56:05 EST


On 23/11/2026 14:30, Shawn Guo wrote:
> On Sun, Nov 22, 2026 at 06:46:20PM +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 no and there
>
> s/should no/should be no/
>
>> 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.
>
> Not quite true for the start of the range. The constants themselves

I did not perform global search and replace that time and not sure if I
want now, but I can keep the few values if this makes sense.

> are not referenced, but the values are used as raw numbers in
> qcom,msm-id:
>
> qrb5165-rb5.dts: qcom,msm-id = <455 0x20001>;
> sm7225-fairphone-fp4.dts: qcom,msm-id = <459 0x10000>;
> sm6350-sony-xperia-lena-pdx213.dts: qcom,msm-id = <434 0x10000>, <459 0x10000>;

Indeed, these three are actually still allowed to use that property.

>
> So QRB5165 and SM7225 are still consumed by bootloaders through DTS,
> which is the same category as the older IDs you keep.
>
>> Copy arbitrarily chosen newer SoC IDs from DT bindings to the regular
>> header of socinfo driver and use it when needed, so later they could be
>> removed from the bindings.
>
> I would suggest converting the boards above to QCOM_ID_QRB5165 and
> QCOM_ID_SM7225, and keeping those two IDs in the bindings. Then
> the in-tree DTS users become visible, and the cut is no longer arbitrary:

Not sure if I want to add that dependency...

> everything left in qcom,ids.h is an ID actually used by DTS.
>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>
>> ---
>> drivers/clk/qcom/apss-ipq6018.c | 2 +-
>> drivers/cpufreq/qcom-cpufreq-nvmem.c | 1 +
>> include/linux/soc/qcom/socinfo.h | 94 ++++++++++++++++++++++++++++++++++++
>> 3 files changed, 96 insertions(+), 1 deletion(-)
>
> [...]
>
>> diff --git a/include/linux/soc/qcom/socinfo.h b/include/linux/soc/qcom/socinfo.h
>> index ba823a0013c5..cd2e8eddf3b5 100644
>> --- a/include/linux/soc/qcom/socinfo.h
>> +++ b/include/linux/soc/qcom/socinfo.h
>> @@ -112,4 +112,98 @@ enum qcom_socinfo_feature_code {
>> #define SOCINFO_PCn(n) ((n) + 1)
>> #define SOCINFO_PC_RESERVE (BIT(31) - 1)
>>
>> +/* SoC IDs */
>> +#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_IPQ5404 671
>> +#define QCOM_ID_QCS9100 667
>
> Since the list is being moved anyway, this might be a good moment to
> fix the ordering.

Ack

>
> Also, drivers/clk/qcom/apss-ipq5424.c includes qcom,ids.h without using

Sure


Best regards,
Krzysztof