public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: lars@metafoo.de, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, matthias.bgg@gmail.com, lee@kernel.org,
	andy@kernel.org, nuno.sa@analog.com, bigunclemax@gmail.com,
	dlechner@baylibre.com, marius.cristea@microchip.com,
	marcelo.schmitt@analog.com, fr0st61te@gmail.com,
	mitrutzceclan@gmail.com, mike.looijmans@topic.nl,
	marcus.folkesson@gmail.com, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, kernel@collabora.com
Subject: Re: [PATCH v1 1/4] dt-bindings: iio: adc: Add MediaTek MT6359 PMIC AUXADC
Date: Tue, 4 Jun 2024 11:04:25 +0200	[thread overview]
Message-ID: <3d364430-96c7-4f9f-98e7-e68b1e57f69e@collabora.com> (raw)
In-Reply-To: <20240602104048.14c75d7b@jic23-huawei>

Il 02/06/24 11:40, Jonathan Cameron ha scritto:
> On Thu, 30 May 2024 11:34:07 +0200
> AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> wrote:
> 
>> Add a new binding for the MT6350 Series (MT6357/8/9) PMIC AUXADC,
>> providing various ADC channels for both internal temperatures and
>> voltages, audio accessory detection (hp/mic/hp+mic and buttons,
>> usually on a 3.5mm jack) other than some basic battery statistics
>> on boards where the battery is managed by this PMIC.
>>
>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Hi,
> 
> What are all the headers for given the binding doc doesn't use anything from
> them?
> 

The binding document doesn't use them, yes, but those are part of the devicetree
binding itself, as those can be used by devicetrees to reference an ADC channel
like <&pmic_adc MT6359_AUXADC_ACCDET>.

I think growing the binding example to add an "external" node using one of those
channels is irrelevant, as that is "outside" of the description of the AUXADC HW.

Cheers,
Angelo

> Jonathan
> 
>> ---
>>   .../iio/adc/mediatek,mt6359-auxadc.yaml       | 43 +++++++++++++++++++
>>   .../iio/adc/mediatek,mt6357-auxadc.h          | 21 +++++++++
>>   .../iio/adc/mediatek,mt6358-auxadc.h          | 22 ++++++++++
>>   .../iio/adc/mediatek,mt6359-auxadc.h          | 22 ++++++++++
>>   4 files changed, 108 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml
>>   create mode 100644 include/dt-bindings/iio/adc/mediatek,mt6357-auxadc.h
>>   create mode 100644 include/dt-bindings/iio/adc/mediatek,mt6358-auxadc.h
>>   create mode 100644 include/dt-bindings/iio/adc/mediatek,mt6359-auxadc.h
>>
>> diff --git a/Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml b/Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml
>> new file mode 100644
>> index 000000000000..dd6c331905cf
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/iio/adc/mediatek,mt6359-auxadc.yaml
>> @@ -0,0 +1,43 @@
>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/iio/adc/mediatek,mt6359-auxadc.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: MediaTek MT6350 series PMIC AUXADC
>> +
>> +maintainers:
>> +  - AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>> +
>> +description:
>> +  The Auxiliary Analog/Digital Converter (AUXADC) is an ADC found
>> +  in some MediaTek PMICs, performing various PMIC related measurements
>> +  such as battery and PMIC internal voltage regulators temperatures,
>> +  accessory detection resistance (usually, for a 3.5mm audio jack)
>> +  other than voltages for various PMIC internal components.
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - mediatek,mt6357-auxadc
>> +      - mediatek,mt6358-auxadc
>> +      - mediatek,mt6359-auxadc
>> +
>> +  "#io-channel-cells":
>> +    const: 1
>> +
>> +additionalProperties: false
>> +
>> +required:
>> +  - compatible
>> +  - "#io-channel-cells"
>> +
>> +examples:
>> +  - |
>> +    pmic {
>> +        pmic_adc: adc {
>> +            compatible = "mediatek,mt6359-auxadc";
>> +            #io-channel-cells = <1>;
>> +        };
>> +    };
>> +...
>> diff --git a/include/dt-bindings/iio/adc/mediatek,mt6357-auxadc.h b/include/dt-bindings/iio/adc/mediatek,mt6357-auxadc.h
>> new file mode 100644
>> index 000000000000..03ebb1d23953
>> --- /dev/null
>> +++ b/include/dt-bindings/iio/adc/mediatek,mt6357-auxadc.h
>> @@ -0,0 +1,21 @@
>> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
>> +
>> +#ifndef _DT_BINDINGS_MEDIATEK_MT6357_AUXADC_H
>> +#define _DT_BINDINGS_MEDIATEK_MT6357_AUXADC_H
>> +
>> +/* ADC Channel Index */
>> +#define MT6357_AUXADC_BATADC		0
>> +#define MT6357_AUXADC_ISENSE		1
>> +#define MT6357_AUXADC_VCDT		2
>> +#define MT6357_AUXADC_BAT_TEMP		3
>> +#define MT6357_AUXADC_CHIP_TEMP		4
>> +#define MT6357_AUXADC_ACCDET		5
>> +#define MT6357_AUXADC_VDCXO		6
>> +#define MT6357_AUXADC_TSX_TEMP		7
>> +#define MT6357_AUXADC_HPOFS_CAL		8
>> +#define MT6357_AUXADC_DCXO_TEMP		9
>> +#define MT6357_AUXADC_VCORE_TEMP	10
>> +#define MT6357_AUXADC_VPROC_TEMP	11
>> +#define MT6357_AUXADC_VBAT		12
>> +
>> +#endif
>> diff --git a/include/dt-bindings/iio/adc/mediatek,mt6358-auxadc.h b/include/dt-bindings/iio/adc/mediatek,mt6358-auxadc.h
>> new file mode 100644
>> index 000000000000..efa08398fafd
>> --- /dev/null
>> +++ b/include/dt-bindings/iio/adc/mediatek,mt6358-auxadc.h
>> @@ -0,0 +1,22 @@
>> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
>> +
>> +#ifndef _DT_BINDINGS_MEDIATEK_MT6358_AUXADC_H
>> +#define _DT_BINDINGS_MEDIATEK_MT6358_AUXADC_H
>> +
>> +/* ADC Channel Index */
>> +#define MT6358_AUXADC_BATADC		0
>> +#define MT6358_AUXADC_VCDT		1
>> +#define MT6358_AUXADC_BAT_TEMP		2
>> +#define MT6358_AUXADC_CHIP_TEMP		3
>> +#define MT6358_AUXADC_ACCDET		4
>> +#define MT6358_AUXADC_VDCXO		5
>> +#define MT6358_AUXADC_TSX_TEMP		6
>> +#define MT6358_AUXADC_HPOFS_CAL		7
>> +#define MT6358_AUXADC_DCXO_TEMP		8
>> +#define MT6358_AUXADC_VBIF		9
>> +#define MT6358_AUXADC_VCORE_TEMP	10
>> +#define MT6358_AUXADC_VPROC_TEMP	11
>> +#define MT6358_AUXADC_VGPU_TEMP		12
>> +#define MT6358_AUXADC_VBAT		13
>> +
>> +#endif
>> diff --git a/include/dt-bindings/iio/adc/mediatek,mt6359-auxadc.h b/include/dt-bindings/iio/adc/mediatek,mt6359-auxadc.h
>> new file mode 100644
>> index 000000000000..59826393ee7e
>> --- /dev/null
>> +++ b/include/dt-bindings/iio/adc/mediatek,mt6359-auxadc.h
>> @@ -0,0 +1,22 @@
>> +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */
>> +
>> +#ifndef _DT_BINDINGS_MEDIATEK_MT6359_AUXADC_H
>> +#define _DT_BINDINGS_MEDIATEK_MT6359_AUXADC_H
>> +
>> +/* ADC Channel Index */
>> +#define MT6359_AUXADC_BATADC		0
>> +#define MT6359_AUXADC_BAT_TEMP		1
>> +#define MT6359_AUXADC_CHIP_TEMP		2
>> +#define MT6359_AUXADC_ACCDET		3
>> +#define MT6359_AUXADC_VDCXO		4
>> +#define MT6359_AUXADC_TSX_TEMP		5
>> +#define MT6359_AUXADC_HPOFS_CAL		6
>> +#define MT6359_AUXADC_DCXO_TEMP		7
>> +#define MT6359_AUXADC_VBIF		8
>> +#define MT6359_AUXADC_VCORE_TEMP	9
>> +#define MT6359_AUXADC_VPROC_TEMP	10
>> +#define MT6359_AUXADC_VGPU_TEMP		11
>> +#define MT6359_AUXADC_VBAT		12
>> +#define MT6359_AUXADC_IBAT		13
>> +
>> +#endif
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-06-04  9:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30  9:34 [PATCH v1 0/4] MediaTek MT6357/8/9 PMIC Auxiliary ADC support AngeloGioacchino Del Regno
2024-05-30  9:34 ` [PATCH v1 1/4] dt-bindings: iio: adc: Add MediaTek MT6359 PMIC AUXADC AngeloGioacchino Del Regno
2024-06-01 15:32   ` Krzysztof Kozlowski
2024-06-04  8:55     ` AngeloGioacchino Del Regno
2024-06-04  9:38       ` Krzysztof Kozlowski
2024-06-04 12:24         ` AngeloGioacchino Del Regno
2024-06-02  9:40   ` Jonathan Cameron
2024-06-04  9:04     ` AngeloGioacchino Del Regno [this message]
2024-06-06 19:40       ` Jonathan Cameron
2024-05-30  9:34 ` [PATCH v1 2/4] iio: adc: Add support for MediaTek MT6357/8/9 Auxiliary ADC AngeloGioacchino Del Regno
2024-05-30 13:34   ` Andy Shevchenko
2024-06-04 10:38     ` AngeloGioacchino Del Regno
2024-06-04 11:05       ` Andy Shevchenko
2024-06-04 11:56         ` AngeloGioacchino Del Regno
2024-06-02 10:11   ` Jonathan Cameron
2024-06-04  9:42     ` AngeloGioacchino Del Regno
2024-06-04 10:55       ` Andy Shevchenko
2024-06-04 11:20         ` Andy Shevchenko
2024-06-04 11:57         ` AngeloGioacchino Del Regno
2024-06-06 19:51       ` Jonathan Cameron
2024-05-30  9:34 ` [PATCH v1 3/4] mfd: mt6397-core: Add support for AUXADCs on MT6357/58/59 PMICs AngeloGioacchino Del Regno
2024-05-31 17:05   ` (subset) " Lee Jones
2024-05-30  9:34 ` [PATCH v1 4/4] arm64: dts: mediatek: Add ADC node on MT6357, MT6358, MT6359 PMICs AngeloGioacchino Del Regno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3d364430-96c7-4f9f-98e7-e68b1e57f69e@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=andy@kernel.org \
    --cc=bigunclemax@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=fr0st61te@gmail.com \
    --cc=jic23@kernel.org \
    --cc=kernel@collabora.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lee@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=marcelo.schmitt@analog.com \
    --cc=marcus.folkesson@gmail.com \
    --cc=marius.cristea@microchip.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mike.looijmans@topic.nl \
    --cc=mitrutzceclan@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox