mbox series

[v3,0/5] Add devicetree support for SDX75 Modem and IDP

Message ID 1686138469-1464-1-git-send-email-quic_rohiagar@quicinc.com
Headers show
Series Add devicetree support for SDX75 Modem and IDP | expand

Message

Rohit Agarwal June 7, 2023, 11:47 a.m. UTC
Hi,

Changes in v3:
 - Clubbed all the dt node into a single patch as suggested by Krzysztof.
 - Removed the applied patch.
 - Addressed some comments from Konrad and Dmitry.

Changes in v2:
 - Added the CPUFreq support patch.
 - Collected the Acked by tags.
 - Addressed some minor comments from Konrad.

This series adds devicetree support for Qualcomm SDX75 platform and IDP
board. This series functionally depends on GCC and RPMh Clock support
series [1], and pinctrl support for SDX75 [2] which are under review.

With this current devicetree support, the IDP can boot into initramfsshell.

[1] https://lore.kernel.org/lkml/20230419133013.2563-3-quic_tdas@quicinc.com/
[2] https://lore.kernel.org/all/1684409015-25196-1-git-send-email-quic_rohiagar@quicinc.com/

Thanks,
Rohit.


Rohit Agarwal (5):
  dt-bindings: arm: qcom: Document SDX75 platform and boards
  dt-bindings: firmware: scm: Add compatible for SDX75
  dt-bindings: interrupt-controller: Add SDX75 PDC compatible
  dt-bindings: cpufreq: cpufreq-qcom-hw: Add SDX75 compatible
  arm64: dts: qcom: Add SDX75 platform and IDP board support

 Documentation/devicetree/bindings/arm/qcom.yaml    |   7 +
 .../bindings/cpufreq/cpufreq-qcom-hw.yaml          |   1 +
 .../devicetree/bindings/firmware/qcom,scm.yaml     |   1 +
 .../bindings/interrupt-controller/qcom,pdc.yaml    |   1 +
 arch/arm64/boot/dts/qcom/Makefile                  |   1 +
 arch/arm64/boot/dts/qcom/sdx75-idp.dts             |  33 ++
 arch/arm64/boot/dts/qcom/sdx75.dtsi                | 660 +++++++++++++++++++++
 7 files changed, 704 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sdx75-idp.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sdx75.dtsi

Comments

Pavan Kondeti June 9, 2023, 5 a.m. UTC | #1
On Wed, Jun 07, 2023 at 05:17:48PM +0530, Rohit Agarwal wrote:
> Add compatible for EPSS CPUFREQ-HW on SDX75.
> 
> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml b/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
> index a6b3bb8..866ed2d 100644
> --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
> @@ -36,6 +36,7 @@ properties:
>                - qcom,sa8775p-cpufreq-epss
>                - qcom,sc7280-cpufreq-epss
>                - qcom,sc8280xp-cpufreq-epss
> +              - qcom,sdx75-cpufreq-epss
>                - qcom,sm6375-cpufreq-epss
>                - qcom,sm8250-cpufreq-epss
>                - qcom,sm8350-cpufreq-epss

This is a very basic question, not completely related to this patch.
Apologies in advance.

What is the rationale for adding a new soc string under compatible and
using it in the new soc device tree? Is it meant for documentation purpose?
i.e one know what all SoCs / boards supported by this device node.

I ask this because, we don't add these compatible strings in the driver
[1] which means there is not SoC specific handling and there is no
module load assist (module alias matching by user space based on device
presence).

Thanks,
Pavan
Konrad Dybcio June 9, 2023, 9:17 a.m. UTC | #2
On 9.06.2023 07:00, Pavan Kondeti wrote:
> On Wed, Jun 07, 2023 at 05:17:48PM +0530, Rohit Agarwal wrote:
>> Add compatible for EPSS CPUFREQ-HW on SDX75.
>>
>> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
>> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>> ---
>>  Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml b/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
>> index a6b3bb8..866ed2d 100644
>> --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
>> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
>> @@ -36,6 +36,7 @@ properties:
>>                - qcom,sa8775p-cpufreq-epss
>>                - qcom,sc7280-cpufreq-epss
>>                - qcom,sc8280xp-cpufreq-epss
>> +              - qcom,sdx75-cpufreq-epss
>>                - qcom,sm6375-cpufreq-epss
>>                - qcom,sm8250-cpufreq-epss
>>                - qcom,sm8350-cpufreq-epss
> 
> This is a very basic question, not completely related to this patch.
> Apologies in advance.
> 
> What is the rationale for adding a new soc string under compatible and
> using it in the new soc device tree? Is it meant for documentation purpose?
> i.e one know what all SoCs / boards supported by this device node.
It's two-fold:

1. The device tree describes the hardware, and for lack of better terms (e.g.
   an SoC-specific version number of the block that is identical to all other
   implementations of that revision on all SoCs that use it), we tend to
   associate it with the SoC it's been (first) found on.

2. In case we ever needed to introduce a SoC-specific quirk, we can just add
   an of_is_compatible-sorta check to the driver and not have to update the
   device trees. This is very important for keeping backwards compatibility,
   as it's assumed that not everybody may be running the latest one. This
   means we have to avoid ABI breaks (unless we have *very* good reasons, like
   "this would have never worked anyway" or "it was not described properly
   and worked on this occasion by pure luck")

Konrad
> 
> I ask this because, we don't add these compatible strings in the driver
> [1] which means there is not SoC specific handling and there is no
> module load assist (module alias matching by user space based on device
> presence).
> 
> Thanks,
> Pavan
Pavan Kondeti June 9, 2023, 9:29 a.m. UTC | #3
On Fri, Jun 09, 2023 at 11:17:08AM +0200, Konrad Dybcio wrote:
> 
> 
> On 9.06.2023 07:00, Pavan Kondeti wrote:
> > On Wed, Jun 07, 2023 at 05:17:48PM +0530, Rohit Agarwal wrote:
> >> Add compatible for EPSS CPUFREQ-HW on SDX75.
> >>
> >> Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
> >> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
> >> ---
> >>  Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml b/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
> >> index a6b3bb8..866ed2d 100644
> >> --- a/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
> >> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-qcom-hw.yaml
> >> @@ -36,6 +36,7 @@ properties:
> >>                - qcom,sa8775p-cpufreq-epss
> >>                - qcom,sc7280-cpufreq-epss
> >>                - qcom,sc8280xp-cpufreq-epss
> >> +              - qcom,sdx75-cpufreq-epss
> >>                - qcom,sm6375-cpufreq-epss
> >>                - qcom,sm8250-cpufreq-epss
> >>                - qcom,sm8350-cpufreq-epss
> > 
> > This is a very basic question, not completely related to this patch.
> > Apologies in advance.
> > 
> > What is the rationale for adding a new soc string under compatible and
> > using it in the new soc device tree? Is it meant for documentation purpose?
> > i.e one know what all SoCs / boards supported by this device node.
> It's two-fold:
> 
> 1. The device tree describes the hardware, and for lack of better terms (e.g.
>    an SoC-specific version number of the block that is identical to all other
>    implementations of that revision on all SoCs that use it), we tend to
>    associate it with the SoC it's been (first) found on.
> 
> 2. In case we ever needed to introduce a SoC-specific quirk, we can just add
>    an of_is_compatible-sorta check to the driver and not have to update the
>    device trees. This is very important for keeping backwards compatibility,
>    as it's assumed that not everybody may be running the latest one. This
>    means we have to avoid ABI breaks (unless we have *very* good reasons, like
>    "this would have never worked anyway" or "it was not described properly
>    and worked on this occasion by pure luck")
> 

Thanks Konrad for the explanation. The #2 is a clear winner here. It
makes complete sense. In devices like USB, we have PID/VID through which
quirks can be implemented later. So I guess the same analogy applies here.
Like you said in (1), the devices are identified with SoC compatible
string.

Thanks,
Pavan