Message ID | 20241212-mbg-v2-support-v2-1-3249a4339b6e@quicinc.com |
---|---|
State | New |
Headers | show |
Series | Add support for MBG Thermal monitoring device | expand |
On Thu, Dec 12, 2024 at 09:41:20PM +0530, Satya Priya Kakitapalli wrote: > + > +required: > + - compatible > + - reg > + - interrupts > + - io-channels > + - io-channel-names Binding looks ok, but this wasn't tested due to unneeded dependency. Please decouple from dependency, so automation can properly test it. > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/irq.h> > + #include <dt-bindings/iio/adc/qcom,spmi-adc5-gen3-pm8775.h> > + > + pmic { > + #address-cells = <1>; > + #size-cells = <0>; > + > + pmm8654au_0_tz: temperature-sensor@d700 { Drop label. > + compatible = "qcom,spmi-pm8775-mbg-tm"; > + reg = <0xd700>; > + interrupts = <0x1 0xd7 0x0 IRQ_TYPE_EDGE_RISING>; > + io-channels = <&pm8775_1_adc PM8775_ADC5_GEN3_DIE_TEMP(1)>; > + io-channel-names = "thermal"; > + #thermal-sensor-cells = <0>; > + }; > + }; > + > + thermal-zones { > + pm8775-mbg0-thermal { Drop the nodes, not related. Best regards, Krzysztof
On 12.12.2024 5:11 PM, Satya Priya Kakitapalli wrote: > Add PM8775 ADC5 GEN3 Channel info and bindings for the MBG Temp > alarm peripheral found on PM8775 pmic. > > Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com> > --- > .../bindings/thermal/qcom-spmi-mbg-tm.yaml | 86 ++++++++++++++++++++++ > .../iio/adc/qcom,spmi-adc5-gen3-pm8775.h | 41 +++++++++++ > 2 files changed, 127 insertions(+) > > diff --git a/Documentation/devicetree/bindings/thermal/qcom-spmi-mbg-tm.yaml b/Documentation/devicetree/bindings/thermal/qcom-spmi-mbg-tm.yaml > new file mode 100644 > index 0000000000000000000000000000000000000000..909373eb758e4a8b7c2bbd0022c56ab2e823ca13 > --- /dev/null > +++ b/Documentation/devicetree/bindings/thermal/qcom-spmi-mbg-tm.yaml > @@ -0,0 +1,86 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/thermal/qcom-spmi-mbg-tm.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm Technologies, Inc. SPMI PMIC MBG Thermal Monitoring > + > +maintainers: > + - Satya Priya Kakitapalli <quic_skakitap@quicinc.com> > + > +description: > + Qualcomm's MBG(Master Bandgap) temperature alarm monitors the die > + temperature and generates an interrupt if the PMIC die temperature is > + over a set of programmable temperature thresholds. It allows monitoring > + for both hot and cold, LVL1 and LVL2 thresholds, which makes it different > + from the existing temp alarm peripheral. The interrupt comes over SPMI > + and the MBG's fault status register gives details to understand whether > + it is a hot/cold and LVL1/LVL2 violation. > + > +allOf: > + - $ref: thermal-sensor.yaml# > + > +properties: > + compatible: > + const: qcom,spmi-pm8775-mbg-tm The bus the chip is connected over shouldn't be part of the compatible Konrad
On 11/02/2025 12:15, Satya Priya Kakitapalli wrote: > > On 12/13/2024 2:08 PM, Krzysztof Kozlowski wrote: >> On Thu, Dec 12, 2024 at 09:41:20PM +0530, Satya Priya Kakitapalli wrote: >>> + >>> +required: >>> + - compatible >>> + - reg >>> + - interrupts >>> + - io-channels >>> + - io-channel-names >> Binding looks ok, but this wasn't tested due to unneeded dependency. >> Please decouple from dependency, so automation can properly test it. > > > The dependency is needed because this mbg peripheral is present on only > targets which have GEN3 ADC5, for which the bindings support is added in > the series [1] > > > [1] > https://lore.kernel.org/linux-arm-msm/c4ca0a4c-e421-4cf6-b073-8e9019400f4c@quicinc.com/ Sure. Then this cannot be merged due to resulting test failure. Please don't post new versions before this can be actually tested and applied. Best regards, Krzysztof
On 11/02/2025 12:46, Krzysztof Kozlowski wrote: > On 11/02/2025 12:15, Satya Priya Kakitapalli wrote: >> >> On 12/13/2024 2:08 PM, Krzysztof Kozlowski wrote: >>> On Thu, Dec 12, 2024 at 09:41:20PM +0530, Satya Priya Kakitapalli wrote: >>>> + >>>> +required: >>>> + - compatible >>>> + - reg >>>> + - interrupts >>>> + - io-channels >>>> + - io-channel-names >>> Binding looks ok, but this wasn't tested due to unneeded dependency. >>> Please decouple from dependency, so automation can properly test it. >> >> >> The dependency is needed because this mbg peripheral is present on only >> targets which have GEN3 ADC5, for which the bindings support is added in >> the series [1] >> >> >> [1] >> https://lore.kernel.org/linux-arm-msm/c4ca0a4c-e421-4cf6-b073-8e9019400f4c@quicinc.com/ > > Sure. Then this cannot be merged due to resulting test failure. > > Please don't post new versions before this can be actually tested and > applied. Heh, you responded *after two months*, to an old email so even previous discussion is gone from my inbox. Best regards, Krzysztof
On Tue, Feb 11, 2025 at 12:50:12PM +0100, Krzysztof Kozlowski wrote: > On 11/02/2025 12:46, Krzysztof Kozlowski wrote: > > On 11/02/2025 12:15, Satya Priya Kakitapalli wrote: > >> > >> On 12/13/2024 2:08 PM, Krzysztof Kozlowski wrote: > >>> On Thu, Dec 12, 2024 at 09:41:20PM +0530, Satya Priya Kakitapalli wrote: > >>>> + > >>>> +required: > >>>> + - compatible > >>>> + - reg > >>>> + - interrupts > >>>> + - io-channels > >>>> + - io-channel-names > >>> Binding looks ok, but this wasn't tested due to unneeded dependency. > >>> Please decouple from dependency, so automation can properly test it. > >> > >> > >> The dependency is needed because this mbg peripheral is present on only > >> targets which have GEN3 ADC5, for which the bindings support is added in > >> the series [1] > >> > >> > >> [1] > >> https://lore.kernel.org/linux-arm-msm/c4ca0a4c-e421-4cf6-b073-8e9019400f4c@quicinc.com/ > > > > Sure. Then this cannot be merged due to resulting test failure. > > > > Please don't post new versions before this can be actually tested and > > applied. > > Heh, you responded *after two months*, to an old email so even previous > discussion is gone from my inbox. Are you responding to your own email?
On 12/02/2025 00:57, Dmitry Baryshkov wrote: > On Tue, Feb 11, 2025 at 12:50:12PM +0100, Krzysztof Kozlowski wrote: >> On 11/02/2025 12:46, Krzysztof Kozlowski wrote: >>> On 11/02/2025 12:15, Satya Priya Kakitapalli wrote: >>>> >>>> On 12/13/2024 2:08 PM, Krzysztof Kozlowski wrote: >>>>> On Thu, Dec 12, 2024 at 09:41:20PM +0530, Satya Priya Kakitapalli wrote: >>>>>> + >>>>>> +required: >>>>>> + - compatible >>>>>> + - reg >>>>>> + - interrupts >>>>>> + - io-channels >>>>>> + - io-channel-names >>>>> Binding looks ok, but this wasn't tested due to unneeded dependency. >>>>> Please decouple from dependency, so automation can properly test it. >>>> >>>> >>>> The dependency is needed because this mbg peripheral is present on only >>>> targets which have GEN3 ADC5, for which the bindings support is added in >>>> the series [1] >>>> >>>> >>>> [1] >>>> https://lore.kernel.org/linux-arm-msm/c4ca0a4c-e421-4cf6-b073-8e9019400f4c@quicinc.com/ >>> >>> Sure. Then this cannot be merged due to resulting test failure. >>> >>> Please don't post new versions before this can be actually tested and >>> applied. >> >> Heh, you responded *after two months*, to an old email so even previous >> discussion is gone from my inbox. > > Are you responding to your own email? Look at the timeline of these emails. Satya responded after two months with some comment. I responded now. Then I noticed that it is talk about something two months old, so I responded again. Two responses from me, that's correct. I recently got way too many such 2-month old clarifications. That's indeed right of the contributor to respond in their own pace, I am also sometimes slow, but really there should be some limit. It's putting unnecessary burden on reviewers as now I should dig some old discussion. Best regards, Krzysztof
On 2/11/2025 5:20 PM, Krzysztof Kozlowski wrote: > On 11/02/2025 12:46, Krzysztof Kozlowski wrote: >> On 11/02/2025 12:15, Satya Priya Kakitapalli wrote: >>> On 12/13/2024 2:08 PM, Krzysztof Kozlowski wrote: >>>> On Thu, Dec 12, 2024 at 09:41:20PM +0530, Satya Priya Kakitapalli wrote: >>>>> + >>>>> +required: >>>>> + - compatible >>>>> + - reg >>>>> + - interrupts >>>>> + - io-channels >>>>> + - io-channel-names >>>> Binding looks ok, but this wasn't tested due to unneeded dependency. >>>> Please decouple from dependency, so automation can properly test it. >>> >>> The dependency is needed because this mbg peripheral is present on only >>> targets which have GEN3 ADC5, for which the bindings support is added in >>> the series [1] >>> >>> >>> [1] >>> https://lore.kernel.org/linux-arm-msm/c4ca0a4c-e421-4cf6-b073-8e9019400f4c@quicinc.com/ >> Sure. Then this cannot be merged due to resulting test failure. >> >> Please don't post new versions before this can be actually tested and >> applied. > Heh, you responded *after two months*, to an old email so even previous > discussion is gone from my inbox. Sorry about that, I initially misunderstood it was regarding the b4 deps I created. I wanted to confirm before posting new version yesterday, hence clarified about the dependency. > Best regards, > Krzysztof
On 12/02/2025 07:24, Satya Priya Kakitapalli wrote: > > On 2/11/2025 5:20 PM, Krzysztof Kozlowski wrote: >> On 11/02/2025 12:46, Krzysztof Kozlowski wrote: >>> On 11/02/2025 12:15, Satya Priya Kakitapalli wrote: >>>> On 12/13/2024 2:08 PM, Krzysztof Kozlowski wrote: >>>>> On Thu, Dec 12, 2024 at 09:41:20PM +0530, Satya Priya Kakitapalli wrote: >>>>>> + >>>>>> +required: >>>>>> + - compatible >>>>>> + - reg >>>>>> + - interrupts >>>>>> + - io-channels >>>>>> + - io-channel-names >>>>> Binding looks ok, but this wasn't tested due to unneeded dependency. >>>>> Please decouple from dependency, so automation can properly test it. >>>> >>>> The dependency is needed because this mbg peripheral is present on only >>>> targets which have GEN3 ADC5, for which the bindings support is added in >>>> the series [1] >>>> >>>> >>>> [1] >>>> https://lore.kernel.org/linux-arm-msm/c4ca0a4c-e421-4cf6-b073-8e9019400f4c@quicinc.com/ >>> Sure. Then this cannot be merged due to resulting test failure. >>> >>> Please don't post new versions before this can be actually tested and >>> applied. >> Heh, you responded *after two months*, to an old email so even previous >> discussion is gone from my inbox. > > > Sorry about that, I initially misunderstood it was regarding the b4 deps > I created. I wanted to confirm before posting new version yesterday, > hence clarified about the dependency. Please correct me if I understood: After two months you responded dependency is needed. Dependency means this cannot be merged. You want to confirm if you can post new version. In that case depends on the dependency. If it is still there, it won't be possible to merge it, right? Or maybe it is not there, but it is not us who should guess it but you should tell us. Best regards, Krzysztof
On Wed, Feb 12, 2025 at 07:06:56AM +0100, Krzysztof Kozlowski wrote: > On 12/02/2025 00:57, Dmitry Baryshkov wrote: > > On Tue, Feb 11, 2025 at 12:50:12PM +0100, Krzysztof Kozlowski wrote: > >> On 11/02/2025 12:46, Krzysztof Kozlowski wrote: > >>> On 11/02/2025 12:15, Satya Priya Kakitapalli wrote: > >>>> > >>>> On 12/13/2024 2:08 PM, Krzysztof Kozlowski wrote: > >>>>> On Thu, Dec 12, 2024 at 09:41:20PM +0530, Satya Priya Kakitapalli wrote: > >>>>>> + > >>>>>> +required: > >>>>>> + - compatible > >>>>>> + - reg > >>>>>> + - interrupts > >>>>>> + - io-channels > >>>>>> + - io-channel-names > >>>>> Binding looks ok, but this wasn't tested due to unneeded dependency. > >>>>> Please decouple from dependency, so automation can properly test it. > >>>> > >>>> > >>>> The dependency is needed because this mbg peripheral is present on only > >>>> targets which have GEN3 ADC5, for which the bindings support is added in > >>>> the series [1] > >>>> > >>>> > >>>> [1] > >>>> https://lore.kernel.org/linux-arm-msm/c4ca0a4c-e421-4cf6-b073-8e9019400f4c@quicinc.com/ > >>> > >>> Sure. Then this cannot be merged due to resulting test failure. > >>> > >>> Please don't post new versions before this can be actually tested and > >>> applied. > >> > >> Heh, you responded *after two months*, to an old email so even previous > >> discussion is gone from my inbox. > > > > Are you responding to your own email? > > Look at the timeline of these emails. Satya responded after two months > with some comment. I responded now. Then I noticed that it is talk about > something two months old, so I responded again. Two responses from me, > that's correct. I see, Satya's email didn't get to lore.kernel.org, so it wasn't fetched by lei. > I recently got way too many such 2-month old clarifications. > > That's indeed right of the contributor to respond in their own pace, I > am also sometimes slow, but really there should be some limit. It's > putting unnecessary burden on reviewers as now I should dig some old > discussion.
diff --git a/Documentation/devicetree/bindings/thermal/qcom-spmi-mbg-tm.yaml b/Documentation/devicetree/bindings/thermal/qcom-spmi-mbg-tm.yaml new file mode 100644 index 0000000000000000000000000000000000000000..909373eb758e4a8b7c2bbd0022c56ab2e823ca13 --- /dev/null +++ b/Documentation/devicetree/bindings/thermal/qcom-spmi-mbg-tm.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/qcom-spmi-mbg-tm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. SPMI PMIC MBG Thermal Monitoring + +maintainers: + - Satya Priya Kakitapalli <quic_skakitap@quicinc.com> + +description: + Qualcomm's MBG(Master Bandgap) temperature alarm monitors the die + temperature and generates an interrupt if the PMIC die temperature is + over a set of programmable temperature thresholds. It allows monitoring + for both hot and cold, LVL1 and LVL2 thresholds, which makes it different + from the existing temp alarm peripheral. The interrupt comes over SPMI + and the MBG's fault status register gives details to understand whether + it is a hot/cold and LVL1/LVL2 violation. + +allOf: + - $ref: thermal-sensor.yaml# + +properties: + compatible: + const: qcom,spmi-pm8775-mbg-tm + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + io-channels: + items: + - description: ADC channel, which reports chip die temperature. + + io-channel-names: + const: thermal + + "#thermal-sensor-cells": + const: 0 + +required: + - compatible + - reg + - interrupts + - io-channels + - io-channel-names + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/iio/adc/qcom,spmi-adc5-gen3-pm8775.h> + + pmic { + #address-cells = <1>; + #size-cells = <0>; + + pmm8654au_0_tz: temperature-sensor@d700 { + compatible = "qcom,spmi-pm8775-mbg-tm"; + reg = <0xd700>; + interrupts = <0x1 0xd7 0x0 IRQ_TYPE_EDGE_RISING>; + io-channels = <&pm8775_1_adc PM8775_ADC5_GEN3_DIE_TEMP(1)>; + io-channel-names = "thermal"; + #thermal-sensor-cells = <0>; + }; + }; + + thermal-zones { + pm8775-mbg0-thermal { + polling-delay-passive = <100>; + thermal-sensors = <&pmm8654au_0_tz>; + + trips { + trip0 { + temperature = <115000>; + hysteresis = <5000>; + type = "passive"; + }; + }; + }; + }; +... diff --git a/include/dt-bindings/iio/adc/qcom,spmi-adc5-gen3-pm8775.h b/include/dt-bindings/iio/adc/qcom,spmi-adc5-gen3-pm8775.h new file mode 100644 index 0000000000000000000000000000000000000000..33f5454367777b10fda248476a0abd17da86ecf6 --- /dev/null +++ b/include/dt-bindings/iio/adc/qcom,spmi-adc5-gen3-pm8775.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* + * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_PM8775_H +#define _DT_BINDINGS_QCOM_SPMI_VADC_PM8775_H + +#include <dt-bindings/iio/adc/qcom,spmi-vadc.h> + +#define PM8775_ADC5_GEN3_REF_GND(sid) ((sid) << 8 | ADC5_GEN3_REF_GND) +#define PM8775_ADC5_GEN3_1P25VREF(sid) ((sid) << 8 | ADC5_GEN3_1P25VREF) +#define PM8775_ADC5_GEN3_VREF_VADC(sid) ((sid) << 8 | ADC5_GEN3_VREF_VADC) +#define PM8775_ADC5_GEN3_DIE_TEMP(sid) ((sid) << 8 | ADC5_GEN3_DIE_TEMP) + +#define PM8775_ADC5_GEN3_AMUX1_THM(sid) ((sid) << 8 | ADC5_GEN3_AMUX1_THM) +#define PM8775_ADC5_GEN3_AMUX2_THM(sid) ((sid) << 8 | ADC5_GEN3_AMUX2_THM) +#define PM8775_ADC5_GEN3_AMUX3_THM(sid) ((sid) << 8 | ADC5_GEN3_AMUX3_THM) +#define PM8775_ADC5_GEN3_AMUX4_THM(sid) ((sid) << 8 | ADC5_GEN3_AMUX4_THM) +#define PM8775_ADC5_GEN3_AMUX5_THM(sid) ((sid) << 8 | ADC5_GEN3_AMUX5_THM) +#define PM8775_ADC5_GEN3_AMUX6_THM(sid) ((sid) << 8 | ADC5_GEN3_AMUX6_THM) +#define PM8775_ADC5_GEN3_AMUX1_GPIO9(sid) ((sid) << 8 | ADC5_GEN3_AMUX1_GPIO) +#define PM8775_ADC5_GEN3_AMUX2_GPIO10(sid) ((sid) << 8 | ADC5_GEN3_AMUX2_GPIO) +#define PM8775_ADC5_GEN3_AMUX3_GPIO11(sid) ((sid) << 8 | ADC5_GEN3_AMUX3_GPIO) +#define PM8775_ADC5_GEN3_AMUX4_GPIO12(sid) ((sid) << 8 | ADC5_GEN3_AMUX4_GPIO) + +/* 100k pull-up2 */ +#define PM8775_ADC5_GEN3_AMUX1_THM_100K_PU(sid) ((sid) << 8 | ADC5_GEN3_AMUX1_THM_100K_PU) +#define PM8775_ADC5_GEN3_AMUX2_THM_100K_PU(sid) ((sid) << 8 | ADC5_GEN3_AMUX2_THM_100K_PU) +#define PM8775_ADC5_GEN3_AMUX3_THM_100K_PU(sid) ((sid) << 8 | ADC5_GEN3_AMUX3_THM_100K_PU) +#define PM8775_ADC5_GEN3_AMUX4_THM_100K_PU(sid) ((sid) << 8 | ADC5_GEN3_AMUX4_THM_100K_PU) +#define PM8775_ADC5_GEN3_AMUX5_THM_100K_PU(sid) ((sid) << 8 | ADC5_GEN3_AMUX5_THM_100K_PU) +#define PM8775_ADC5_GEN3_AMUX6_THM_100K_PU(sid) ((sid) << 8 | ADC5_GEN3_AMUX6_THM_100K_PU) +#define PM8775_ADC5_GEN3_AMUX1_GPIO9_100K_PU(sid) ((sid) << 8 | ADC5_GEN3_AMUX1_GPIO_100K_PU) +#define PM8775_ADC5_GEN3_AMUX2_GPIO10_100K_PU(sid) ((sid) << 8 | ADC5_GEN3_AMUX2_GPIO_100K_PU) +#define PM8775_ADC5_GEN3_AMUX3_GPIO11_100K_PU(sid) ((sid) << 8 | ADC5_GEN3_AMUX3_GPIO_100K_PU) +#define PM8775_ADC5_GEN3_AMUX4_GPIO12_100K_PU(sid) ((sid) << 8 | ADC5_GEN3_AMUX4_GPIO_100K_PU) + +#define PM8775_ADC5_GEN3_VPH_PWR(sid) ((sid) << 8 | ADC5_GEN3_VPH_PWR) + +#endif /* _DT_BINDINGS_QCOM_SPMI_VADC_PM8775_H */
Add PM8775 ADC5 GEN3 Channel info and bindings for the MBG Temp alarm peripheral found on PM8775 pmic. Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@quicinc.com> --- .../bindings/thermal/qcom-spmi-mbg-tm.yaml | 86 ++++++++++++++++++++++ .../iio/adc/qcom,spmi-adc5-gen3-pm8775.h | 41 +++++++++++ 2 files changed, 127 insertions(+)