From: Camel Guo <camel.guo@axis.com>
To: <lgirdwood@gmail.com>, <broonie@kernel.org>, <tiwai@suse.com>,
<dmurphy@ti.com>
Cc: alsa-devel@alsa-project.org, kernel@axis.com,
linux-kernel@vger.kernel.org, Camel Guo <camelg@axis.com>
Subject: [PATCH v2 1/3] dt-bindings: tlv320adcx140: Add GPIO config and drive config
Date: Fri, 11 Sep 2020 10:07:51 +0200 [thread overview]
Message-ID: <20200911080753.30342-1-camel.guo@axis.com> (raw)
From: Camel Guo <camelg@axis.com>
Add properties for configuring the General Purpose Input Outputs (GPIO).
There are 2 settings for GPIO, configuration and the output drive type.
Signed-off-by: Camel Guo <camelg@axis.com>
---
.../bindings/sound/tlv320adcx140.yaml | 44 +++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml b/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
index f578f17f3e04..7b0b4554da59 100644
--- a/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
+++ b/Documentation/devicetree/bindings/sound/tlv320adcx140.yaml
@@ -134,6 +134,49 @@ patternProperties:
4d - Drive weak low and active high
5d - Drive Hi-Z and active high
+ ti,gpio-config:
+ description: |
+ Defines the configuration and output driver for the general purpose
+ input and output pin (GPIO1). Its value is a pair, the first value is for
+ the configuration type and the second value is for the output drive
+ type. The array is defined as <GPIO1_CFG GPIO1_DRV>
+
+ configuration for the GPIO pin can be one of the following:
+ 0 - disabled
+ 1 - GPIO1 is configured as a general-purpose output (GPO)
+ 2 - (default) GPIO1 is configured as a device interrupt output (IRQ)
+ 3 - GPIO1 is configured as a secondary ASI output (SDOUT2)
+ 4 - GPIO1 is configured as a PDM clock output (PDMCLK)
+ 8 - GPIO1 is configured as an input to control when MICBIAS turns on or
+ off (MICBIAS_EN)
+ 9 - GPIO1 is configured as a general-purpose input (GPI)
+ 10 - GPIO1 is configured as a master clock input (MCLK)
+ 11 - GPIO1 is configured as an ASI input for daisy-chain (SDIN)
+ 12 - GPIO1 is configured as a PDM data input for channel 1 and channel 2
+ (PDMDIN1)
+ 13 - GPIO1 is configured as a PDM data input for channel 3 and channel 4
+ (PDMDIN2)
+ 14 - GPIO1 is configured as a PDM data input for channel 5 and channel 6
+ (PDMDIN3)
+ 15 - GPIO1 is configured as a PDM data input for channel 7 and channel 8
+ (PDMDIN4)
+
+ output drive type for the GPIO pin can be one of the following:
+ 0 - Hi-Z output
+ 1 - Drive active low and active high
+ 2 - (default) Drive active low and weak high
+ 3 - Drive active low and Hi-Z
+ 4 - Drive weak low and active high
+ 5 - Drive Hi-Z and active high
+
+ allOf:
+ - $ref: /schemas/types.yaml#/definitions/uint32-array
+ - minItems: 2
+ maxItems: 2
+ items:
+ maximum: 15
+ default: [2, 2]
+
required:
- compatible
- reg
@@ -150,6 +193,7 @@ examples:
ti,mic-bias-source = <6>;
ti,pdm-edge-select = <0 1 0 1>;
ti,gpi-config = <4 5 6 7>;
+ ti,gpio-config = <10 2>;
ti,gpo-config-1 = <0 0>;
ti,gpo-config-2 = <0 0>;
reset-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
--
2.20.1
next reply other threads:[~2020-09-11 8:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-11 8:07 Camel Guo [this message]
2020-09-11 8:07 ` [PATCH v2 2/3] ASoC: tlv320adcx140: Add support for configuring GPIO pin Camel Guo
2020-09-15 18:41 ` Dan Murphy
2020-09-15 19:05 ` Dan Murphy
2020-09-11 8:07 ` [PATCH v2 3/3] ASoC: tlv320adcx140: Add proper support for master mode Camel Guo
2020-09-15 18:50 ` Dan Murphy
[not found] ` <507f2f53-e236-f894-cb17-4fc84cf00326@axis.com>
2020-09-16 11:46 ` Dan Murphy
2020-09-15 18:35 ` [PATCH v2 1/3] dt-bindings: tlv320adcx140: Add GPIO config and drive config Dan Murphy
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=20200911080753.30342-1-camel.guo@axis.com \
--to=camel.guo@axis.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=camelg@axis.com \
--cc=dmurphy@ti.com \
--cc=kernel@axis.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.com \
/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