Message ID | 3c6f7510d175ba5a3c81730b010f6c421b2fbf2d.1682682753.git.quic_varada@quicinc.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Enable IPQ9574 TSENS support | expand |
On 28/04/2023 16:52, Varadarajan Narayanan wrote: > From: Praveenkumar I <quic_ipkumar@quicinc.com> > > Qualcomm IPQ9574 has tsens v2.3.1 block, which is similar to IPQ8074 tsens. > > Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com> > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> > --- > Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > index d1ec963..8e2208c 100644 > --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > @@ -66,6 +66,7 @@ properties: > - description: v2 of TSENS with combined interrupt > enum: > - qcom,ipq8074-tsens > + - qcom,ipq9574-tsens Your drive change indicates they are compatible, so make them compatible. 9574 followed by 8074. Best regards, Krzysztof
On Mon, May 01, 2023 at 09:08:49AM +0200, Krzysztof Kozlowski wrote: > On 28/04/2023 16:52, Varadarajan Narayanan wrote: > > From: Praveenkumar I <quic_ipkumar@quicinc.com> > > > > Qualcomm IPQ9574 has tsens v2.3.1 block, which is similar to IPQ8074 tsens. > > > > Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com> > > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> > > --- > > Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > > index d1ec963..8e2208c 100644 > > --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > > +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > > @@ -66,6 +66,7 @@ properties: > > - description: v2 of TSENS with combined interrupt > > enum: > > - qcom,ipq8074-tsens > > + - qcom,ipq9574-tsens > > Your drive change indicates they are compatible, so make them > compatible. 9574 followed by 8074. Not able to understand. You want IPQ9574 to use "qcom,ipq8074-tsens" instead of adding a "qcom,ipq9574-tsens" and no need to add an extra entry to the driver like }, { .compatible = "qcom,ipq9574-tsens", .data = &data_ipq8074, }, { Thanks Varada > Best regards, > Krzysztof >
On 03/05/2023 09:10, Varadarajan Narayanan wrote: > On Mon, May 01, 2023 at 09:08:49AM +0200, Krzysztof Kozlowski wrote: >> On 28/04/2023 16:52, Varadarajan Narayanan wrote: >>> From: Praveenkumar I <quic_ipkumar@quicinc.com> >>> >>> Qualcomm IPQ9574 has tsens v2.3.1 block, which is similar to IPQ8074 tsens. >>> >>> Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com> >>> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> >>> --- >>> Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml >>> index d1ec963..8e2208c 100644 >>> --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml >>> +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml >>> @@ -66,6 +66,7 @@ properties: >>> - description: v2 of TSENS with combined interrupt >>> enum: >>> - qcom,ipq8074-tsens >>> + - qcom,ipq9574-tsens >> >> Your drive change indicates they are compatible, so make them >> compatible. 9574 followed by 8074. > > Not able to understand. You want IPQ9574 to use "qcom,ipq8074-tsens" > instead of adding a "qcom,ipq9574-tsens" and no need to add an extra > entry to the driver like Assuming the devices are really compatible, which your driver change suggests, I want to use two compatibles. 9574 followed by 8074 fallback, just like we do for all Qualcomm IP blocks. Then as you said - no need for driver change. Best regards, Krzysztof
On Wed, May 03, 2023 at 09:42:28AM +0200, Krzysztof Kozlowski wrote: > On 03/05/2023 09:10, Varadarajan Narayanan wrote: > > On Mon, May 01, 2023 at 09:08:49AM +0200, Krzysztof Kozlowski wrote: > >> On 28/04/2023 16:52, Varadarajan Narayanan wrote: > >>> From: Praveenkumar I <quic_ipkumar@quicinc.com> > >>> > >>> Qualcomm IPQ9574 has tsens v2.3.1 block, which is similar to IPQ8074 tsens. > >>> > >>> Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com> > >>> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> > >>> --- > >>> Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 3 +++ > >>> 1 file changed, 3 insertions(+) > >>> > >>> diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > >>> index d1ec963..8e2208c 100644 > >>> --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > >>> +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > >>> @@ -66,6 +66,7 @@ properties: > >>> - description: v2 of TSENS with combined interrupt > >>> enum: > >>> - qcom,ipq8074-tsens > >>> + - qcom,ipq9574-tsens > >> > >> Your drive change indicates they are compatible, so make them > >> compatible. 9574 followed by 8074. > > > > Not able to understand. You want IPQ9574 to use "qcom,ipq8074-tsens" > > instead of adding a "qcom,ipq9574-tsens" and no need to add an extra > > entry to the driver like > > Assuming the devices are really compatible, which your driver change > suggests, I want to use two compatibles. 9574 followed by 8074 fallback, > just like we do for all Qualcomm IP blocks. Then as you said - no need > for driver change. With schema like this items: - enum: - qcom,ipq8074-tsens - qcom,ipq9574-tsens and DTS as compatible = "qcom,ipq9574-tsens", "qcom,ipq8074-tsens"; 'make dtbs_check' gives the following error arch/arm64/boot/dts/qcom/ipq9574-rdp433.dtb: thermal-sensor@4a9000: compatible: 'oneOf' conditional failed, one must be fixed: ['qcom,ipq9574-tsens', 'qcom,ipq8074-tsens'] is too long To fix the above error, I have to change the schema as items: - enum: - qcom,ipq8074-tsens - qcom,ipq9574-tsens - const: qcom,tsens-v2-combined-int and change ipq8074 & ipq9754 DTS as compatible = "qcom,ipq8074-tsens", "qcom,tsens-v2-combined-int"; compatible = "qcom,ipq9574-tsens", "qcom,tsens-v2-combined-int"; For this to work, have to introduce qcom,tsens-v2-combined-int in the driver with }, { .compatible = "qcom,tsens-v2-combined-int", .data = &data_ipq8074, }, This i guess will defeat the purpose. So shall we leave it as it is now, or shall I change driver, schema and ipq8074 + ip9574 DTS with qcom,tsens-v2-combined-int? Let me know. Thanks Varada > Best regards, > Krzysztof
On 04/05/2023 06:57, Varadarajan Narayanan wrote: > On Wed, May 03, 2023 at 09:42:28AM +0200, Krzysztof Kozlowski wrote: >> On 03/05/2023 09:10, Varadarajan Narayanan wrote: >>> On Mon, May 01, 2023 at 09:08:49AM +0200, Krzysztof Kozlowski wrote: >>>> On 28/04/2023 16:52, Varadarajan Narayanan wrote: >>>>> From: Praveenkumar I <quic_ipkumar@quicinc.com> >>>>> >>>>> Qualcomm IPQ9574 has tsens v2.3.1 block, which is similar to IPQ8074 tsens. >>>>> >>>>> Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com> >>>>> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> >>>>> --- >>>>> Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 3 +++ >>>>> 1 file changed, 3 insertions(+) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml >>>>> index d1ec963..8e2208c 100644 >>>>> --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml >>>>> +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml >>>>> @@ -66,6 +66,7 @@ properties: >>>>> - description: v2 of TSENS with combined interrupt >>>>> enum: >>>>> - qcom,ipq8074-tsens >>>>> + - qcom,ipq9574-tsens >>>> >>>> Your drive change indicates they are compatible, so make them >>>> compatible. 9574 followed by 8074. >>> >>> Not able to understand. You want IPQ9574 to use "qcom,ipq8074-tsens" >>> instead of adding a "qcom,ipq9574-tsens" and no need to add an extra >>> entry to the driver like >> >> Assuming the devices are really compatible, which your driver change >> suggests, I want to use two compatibles. 9574 followed by 8074 fallback, >> just like we do for all Qualcomm IP blocks. Then as you said - no need >> for driver change. > > With schema like this > items: > - enum: > - qcom,ipq8074-tsens > - qcom,ipq9574-tsens > and DTS as > compatible = "qcom,ipq9574-tsens", "qcom,ipq8074-tsens"; This file (and many others) shows you how to encode it in the DT schema https://elixir.bootlin.com/linux/v6.3-rc6/source/Documentation/devicetree/bindings/sound/nvidia,tegra210-ope.yaml#L31 > > 'make dtbs_check' gives the following error > > arch/arm64/boot/dts/qcom/ipq9574-rdp433.dtb: thermal-sensor@4a9000: compatible: 'oneOf' conditional failed, one must be fixed: > ['qcom,ipq9574-tsens', 'qcom,ipq8074-tsens'] is too long > > To fix the above error, I have to change the schema as > > items: > - enum: > - qcom,ipq8074-tsens > - qcom,ipq9574-tsens > - const: qcom,tsens-v2-combined-int This is not what we talked about. Best regards, Krzysztof
On Thu, May 04, 2023 at 08:22:44AM +0200, Krzysztof Kozlowski wrote: > On 04/05/2023 06:57, Varadarajan Narayanan wrote: > > On Wed, May 03, 2023 at 09:42:28AM +0200, Krzysztof Kozlowski wrote: > >> On 03/05/2023 09:10, Varadarajan Narayanan wrote: > >>> On Mon, May 01, 2023 at 09:08:49AM +0200, Krzysztof Kozlowski wrote: > >>>> On 28/04/2023 16:52, Varadarajan Narayanan wrote: > >>>>> From: Praveenkumar I <quic_ipkumar@quicinc.com> > >>>>> > >>>>> Qualcomm IPQ9574 has tsens v2.3.1 block, which is similar to IPQ8074 tsens. > >>>>> > >>>>> Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com> > >>>>> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> > >>>>> --- > >>>>> Documentation/devicetree/bindings/thermal/qcom-tsens.yaml | 3 +++ > >>>>> 1 file changed, 3 insertions(+) > >>>>> > >>>>> diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > >>>>> index d1ec963..8e2208c 100644 > >>>>> --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > >>>>> +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml > >>>>> @@ -66,6 +66,7 @@ properties: > >>>>> - description: v2 of TSENS with combined interrupt > >>>>> enum: > >>>>> - qcom,ipq8074-tsens > >>>>> + - qcom,ipq9574-tsens > >>>> > >>>> Your drive change indicates they are compatible, so make them > >>>> compatible. 9574 followed by 8074. > >>> > >>> Not able to understand. You want IPQ9574 to use "qcom,ipq8074-tsens" > >>> instead of adding a "qcom,ipq9574-tsens" and no need to add an extra > >>> entry to the driver like > >> > >> Assuming the devices are really compatible, which your driver change > >> suggests, I want to use two compatibles. 9574 followed by 8074 fallback, > >> just like we do for all Qualcomm IP blocks. Then as you said - no need > >> for driver change. > > > > With schema like this > > items: > > - enum: > > - qcom,ipq8074-tsens > > - qcom,ipq9574-tsens > > and DTS as > > compatible = "qcom,ipq9574-tsens", "qcom,ipq8074-tsens"; > > This file (and many others) shows you how to encode it in the DT schema > > https://elixir.bootlin.com/linux/v6.3-rc6/source/Documentation/devicetree/bindings/sound/nvidia,tegra210-ope.yaml#L31 Thanks for the pointer. Will rework and post. -Varada > > 'make dtbs_check' gives the following error > > > > arch/arm64/boot/dts/qcom/ipq9574-rdp433.dtb: thermal-sensor@4a9000: compatible: 'oneOf' conditional failed, one must be fixed: > > ['qcom,ipq9574-tsens', 'qcom,ipq8074-tsens'] is too long > > > > To fix the above error, I have to change the schema as > > > > items: > > - enum: > > - qcom,ipq8074-tsens > > - qcom,ipq9574-tsens > > - const: qcom,tsens-v2-combined-int > > This is not what we talked about. > > Best regards, > Krzysztof >
diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml index d1ec963..8e2208c 100644 --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml @@ -66,6 +66,7 @@ properties: - description: v2 of TSENS with combined interrupt enum: - qcom,ipq8074-tsens + - qcom,ipq9574-tsens reg: items: @@ -277,6 +278,7 @@ allOf: contains: enum: - qcom,ipq8074-tsens + - qcom,ipq9574-tsens then: properties: interrupts: @@ -292,6 +294,7 @@ allOf: contains: enum: - qcom,ipq8074-tsens + - qcom,ipq9574-tsens - qcom,tsens-v0_1 - qcom,tsens-v1 - qcom,tsens-v2