[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250305-mt6359-accdet-dts-v4-1-e5ffa5ee9991@collabora.com>
Date: Wed, 05 Mar 2025 15:58:16 -0300
From: Nícolas F. R. A. Prado <nfraprado@...labora.com>
To: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Sen Chu <sen.chu@...iatek.com>, Sean Wang <sean.wang@...iatek.com>,
Macpaul Lin <macpaul.lin@...iatek.com>, Lee Jones <lee@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>
Cc: kernel@...labora.com, linux-sound@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org,
linux-pm@...r.kernel.org,
Nícolas F. R. A. Prado <nfraprado@...labora.com>
Subject: [PATCH v4 01/19] dt-bindings: mfd: mediatek: mt6397: Add accdet
subnode
Describe the accessory detection (accdet) module as a possible subnode
of the MT6359 PMIC.
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
---
.../devicetree/bindings/mfd/mediatek,mt6397.yaml | 51 ++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
index 6a89b479d10fad3c8b61cab5a3af1453baca4d1a..51012b8bbfaef3df7bdb619a4f8d828d6f9cc15a 100644
--- a/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
+++ b/Documentation/devicetree/bindings/mfd/mediatek,mt6397.yaml
@@ -24,6 +24,7 @@ description: |
- LED
- Keys
- Power controller
+ - Accessory Detection
It is interfaced to host controller using SPI interface by a proprietary hardware
called PMIC wrapper or pwrap. MT6397/MT6323 PMIC is a child device of pwrap.
@@ -224,6 +225,30 @@ properties:
description:
Pin controller
+ accdet:
+ type: object
+ additionalProperties: false
+ description:
+ The Accessory Detection module found on the PMIC allows detecting audio
+ jack insertion and removal, as well as identifying the type of events
+ connected to the jack.
+
+ properties:
+ compatible:
+ const: mediatek,mt6359-accdet
+
+ mediatek,hp-eint-high:
+ type: boolean
+ description:
+ By default, MT6359's HP_EINT pin is assumed to be pulled high and
+ connected to a normally open 3.5mm jack. Plug insertion is detected
+ when the pin is brought low in that case. Add this property if the
+ behavior should be inverted, for example if a normally closed 3.5mm
+ jack is used, or if the line is pulled low on open.
+
+ required:
+ - compatible
+
required:
- compatible
- regulators
@@ -598,3 +623,29 @@ examples:
compatible = "mediatek,mt6397-rtc";
};
};
+ - |
+ #include <dt-bindings/input/input.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ pmic {
+ compatible = "mediatek,mt6359";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ accdet {
+ compatible = "mediatek,mt6359-accdet";
+ mediatek,hp-eint-high;
+ };
+
+ regulators {
+ compatible = "mediatek,mt6359-regulator";
+
+ buck_vs1 {
+ regulator-name = "vs1";
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <2200000>;
+ regulator-enable-ramp-delay = <0>;
+ regulator-always-on;
+ };
+ };
+ };
--
2.48.1
Powered by blists - more mailing lists