Message ID | 20250108012846.3275443-7-swboyd@chromium.org (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | qcom: Add an SoC PM driver for sc7180 using PM domains | expand |
On Tue, Jan 07, 2025 at 05:28:43PM -0800, Stephen Boyd wrote: > Allow an SoC driver to probe for these devices. Add the SoC specific > compatible to the soc node. Leave the original simple-bus compatible in > place so that everything keeps working. > > Cc: Rob Herring <robh@kernel.org> > Cc: Bjorn Andersson <andersson@kernel.org> > Cc: Konrad Dybcio <konradybcio@kernel.org> > Cc: <linux-arm-msm@vger.kernel.org> > Signed-off-by: Stephen Boyd <swboyd@chromium.org> > --- > arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi > index 76fe314d2ad5..257890a193e6 100644 > --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi > +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi > @@ -782,7 +782,7 @@ soc: soc@0 { > #size-cells = <2>; > ranges = <0 0 0 0 0x10 0>; > dma-ranges = <0 0 0 0 0x10 0>; > - compatible = "simple-bus"; > + compatible = "qcom,soc-sc7180", "simple-bus"; If the new driver requires this compatible, it will break compatibility with older DT files (and it should be avoided). > > gcc: clock-controller@100000 { > compatible = "qcom,gcc-sc7180"; > -- > https://chromeos.dev >
On 8.01.2025 2:02 PM, Dmitry Baryshkov wrote: > On Tue, Jan 07, 2025 at 05:28:43PM -0800, Stephen Boyd wrote: >> Allow an SoC driver to probe for these devices. Add the SoC specific >> compatible to the soc node. Leave the original simple-bus compatible in >> place so that everything keeps working. >> >> Cc: Rob Herring <robh@kernel.org> >> Cc: Bjorn Andersson <andersson@kernel.org> >> Cc: Konrad Dybcio <konradybcio@kernel.org> >> Cc: <linux-arm-msm@vger.kernel.org> >> Signed-off-by: Stephen Boyd <swboyd@chromium.org> >> --- >> arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi >> index 76fe314d2ad5..257890a193e6 100644 >> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi >> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi >> @@ -782,7 +782,7 @@ soc: soc@0 { >> #size-cells = <2>; >> ranges = <0 0 0 0 0x10 0>; >> dma-ranges = <0 0 0 0 0x10 0>; >> - compatible = "simple-bus"; >> + compatible = "qcom,soc-sc7180", "simple-bus"; > > If the new driver requires this compatible, it will break compatibility > with older DT files (and it should be avoided). IIUC the intent here is to provide backwards compatibility through checking for sth like IS_SOCPM_MANAGED(), sorta like HAS_ACPI_COMPANION(). In that case, power sequencing would be done by the socpm driver, whereas if it doesn't hold, the resources would be toggled by the device driver Konrad
On Thu, Jan 09, 2025 at 03:10:33PM +0100, Konrad Dybcio wrote: > On 8.01.2025 2:02 PM, Dmitry Baryshkov wrote: > > On Tue, Jan 07, 2025 at 05:28:43PM -0800, Stephen Boyd wrote: > >> Allow an SoC driver to probe for these devices. Add the SoC specific > >> compatible to the soc node. Leave the original simple-bus compatible in > >> place so that everything keeps working. > >> > >> Cc: Rob Herring <robh@kernel.org> > >> Cc: Bjorn Andersson <andersson@kernel.org> > >> Cc: Konrad Dybcio <konradybcio@kernel.org> > >> Cc: <linux-arm-msm@vger.kernel.org> > >> Signed-off-by: Stephen Boyd <swboyd@chromium.org> > >> --- > >> arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi > >> index 76fe314d2ad5..257890a193e6 100644 > >> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi > >> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi > >> @@ -782,7 +782,7 @@ soc: soc@0 { > >> #size-cells = <2>; > >> ranges = <0 0 0 0 0x10 0>; > >> dma-ranges = <0 0 0 0 0x10 0>; > >> - compatible = "simple-bus"; > >> + compatible = "qcom,soc-sc7180", "simple-bus"; > > > > If the new driver requires this compatible, it will break compatibility > > with older DT files (and it should be avoided). > > IIUC the intent here is to provide backwards compatibility through checking > for sth like IS_SOCPM_MANAGED(), sorta like HAS_ACPI_COMPANION(). In that > case, power sequencing would be done by the socpm driver, whereas if it > doesn't hold, the resources would be toggled by the device driver I think that this way we end up having PM code both in the device driver and in the socpm. Ideally in my opinion we should be able to migrate all pm code to socpm, keeping compat with old DT files. In the end, if this is the only change to the SoC.dtsi, then we should be able to live without this compat change.
On 10.01.2025 12:45 AM, Dmitry Baryshkov wrote: > On Thu, Jan 09, 2025 at 03:10:33PM +0100, Konrad Dybcio wrote: >> On 8.01.2025 2:02 PM, Dmitry Baryshkov wrote: >>> On Tue, Jan 07, 2025 at 05:28:43PM -0800, Stephen Boyd wrote: >>>> Allow an SoC driver to probe for these devices. Add the SoC specific >>>> compatible to the soc node. Leave the original simple-bus compatible in >>>> place so that everything keeps working. >>>> >>>> Cc: Rob Herring <robh@kernel.org> >>>> Cc: Bjorn Andersson <andersson@kernel.org> >>>> Cc: Konrad Dybcio <konradybcio@kernel.org> >>>> Cc: <linux-arm-msm@vger.kernel.org> >>>> Signed-off-by: Stephen Boyd <swboyd@chromium.org> >>>> --- >>>> arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi >>>> index 76fe314d2ad5..257890a193e6 100644 >>>> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi >>>> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi >>>> @@ -782,7 +782,7 @@ soc: soc@0 { >>>> #size-cells = <2>; >>>> ranges = <0 0 0 0 0x10 0>; >>>> dma-ranges = <0 0 0 0 0x10 0>; >>>> - compatible = "simple-bus"; >>>> + compatible = "qcom,soc-sc7180", "simple-bus"; >>> >>> If the new driver requires this compatible, it will break compatibility >>> with older DT files (and it should be avoided). >> >> IIUC the intent here is to provide backwards compatibility through checking >> for sth like IS_SOCPM_MANAGED(), sorta like HAS_ACPI_COMPANION(). In that >> case, power sequencing would be done by the socpm driver, whereas if it >> doesn't hold, the resources would be toggled by the device driver > > I think that this way we end up having PM code both in the device driver > and in the socpm. Ideally in my opinion we should be able to migrate all > pm code to socpm, keeping compat with old DT files. In the end, if this > is the only change to the SoC.dtsi, then we should be able to live > without this compat change. We should be able to do that with a dynamic overlay, I suppose.. which we could drop after some time (probably a rather large amount of time) Konrad
diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi index 76fe314d2ad5..257890a193e6 100644 --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi @@ -782,7 +782,7 @@ soc: soc@0 { #size-cells = <2>; ranges = <0 0 0 0 0x10 0>; dma-ranges = <0 0 0 0 0x10 0>; - compatible = "simple-bus"; + compatible = "qcom,soc-sc7180", "simple-bus"; gcc: clock-controller@100000 { compatible = "qcom,gcc-sc7180";
Allow an SoC driver to probe for these devices. Add the SoC specific compatible to the soc node. Leave the original simple-bus compatible in place so that everything keeps working. Cc: Rob Herring <robh@kernel.org> Cc: Bjorn Andersson <andersson@kernel.org> Cc: Konrad Dybcio <konradybcio@kernel.org> Cc: <linux-arm-msm@vger.kernel.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)