From: Sugar Zhang <sugar.zhang@rock-chips.com>
To: broonie@kernel.org, heiko@sntech.de
Cc: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
alsa-devel@alsa-project.org,
Sugar Zhang <sugar.zhang@rock-chips.com>
Subject: [PATCH v1 7/7] ASoC: dt-bindings: rockchip: Convert pdm bindings to yaml
Date: Tue, 24 Aug 2021 15:54:16 +0800 [thread overview]
Message-ID: <1629791656-13698-2-git-send-email-sugar.zhang@rock-chips.com> (raw)
In-Reply-To: <1629791446-13528-1-git-send-email-sugar.zhang@rock-chips.com>
This patch converts pdm bindings to yaml.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
---
.../devicetree/bindings/sound/rockchip,pdm.txt | 64 ------------
.../devicetree/bindings/sound/rockchip,pdm.yaml | 114 +++++++++++++++++++++
2 files changed, 114 insertions(+), 64 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/rockchip,pdm.txt
create mode 100644 Documentation/devicetree/bindings/sound/rockchip,pdm.yaml
diff --git a/Documentation/devicetree/bindings/sound/rockchip,pdm.txt b/Documentation/devicetree/bindings/sound/rockchip,pdm.txt
deleted file mode 100644
index b2d7e47..0000000
--- a/Documentation/devicetree/bindings/sound/rockchip,pdm.txt
+++ /dev/null
@@ -1,64 +0,0 @@
-* Rockchip PDM controller
-
-Required properties:
-
-- compatible: "rockchip,pdm"
- - "rockchip,px30-pdm"
- - "rockchip,rk1808-pdm"
- - "rockchip,rk3308-pdm"
- - "rockchip,rk3568-pdm"
- - "rockchip,rv1126-pdm"
-- reg: physical base address of the controller and length of memory mapped
- region.
-- dmas: DMA specifiers for rx dma. See the DMA client binding,
- Documentation/devicetree/bindings/dma/dma.txt
-- dma-names: should include "rx".
-- clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names.
-- clock-names: should contain following:
- - "pdm_hclk": clock for PDM BUS
- - "pdm_clk" : clock for PDM controller
-- resets: a list of phandle + reset-specifer paris, one for each entry in reset-names.
-- reset-names: reset names, should include "pdm-m".
-- pinctrl-names: Must contain a "default" entry.
-- pinctrl-N: One property must exist for each entry in
- pinctrl-names. See ../pinctrl/pinctrl-bindings.txt
- for details of the property values.
-
-Optional properties:
-- rockchip,path-map: This is a variable length array, that shows the mapping
- of SDIx to PATHx. By default, they are one-to-one mapping as follows:
-
- path0 <-- sdi0
- path1 <-- sdi1
- path2 <-- sdi2
- path3 <-- sdi3
-
- e.g. "rockchip,path-map = <3 2 1 0>" means the mapping as follows:
-
- path0 <-- sdi3
- path1 <-- sdi2
- path2 <-- sdi1
- path3 <-- sdi0
-
-Example for rk3328 PDM controller:
-
-pdm: pdm@ff040000 {
- compatible = "rockchip,pdm";
- reg = <0x0 0xff040000 0x0 0x1000>;
- clocks = <&clk_pdm>, <&clk_gates28 0>;
- clock-names = "pdm_clk", "pdm_hclk";
- dmas = <&pdma 16>;
- #dma-cells = <1>;
- dma-names = "rx";
- pinctrl-names = "default", "sleep";
- pinctrl-0 = <&pdmm0_clk
- &pdmm0_sdi0
- &pdmm0_sdi1
- &pdmm0_sdi2
- &pdmm0_sdi3>;
- pinctrl-1 = <&pdmm0_clk_sleep
- &pdmm0_sdi0_sleep
- &pdmm0_sdi1_sleep
- &pdmm0_sdi2_sleep
- &pdmm0_sdi3_sleep>;
-};
diff --git a/Documentation/devicetree/bindings/sound/rockchip,pdm.yaml b/Documentation/devicetree/bindings/sound/rockchip,pdm.yaml
new file mode 100644
index 0000000..6615717
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rockchip,pdm.yaml
@@ -0,0 +1,114 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/rockchip,pdm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip PDM controller
+
+description:
+ The Pulse Density Modulation Interface Controller (PDMC) is
+ a PDM interface controller and decoder that support PDM format.
+ It integrates a clock generator driving the PDM microphone
+ and embeds filters which decimate the incoming bit stream to
+ obtain most common audio rates.
+
+maintainers:
+ - Heiko Stuebner <heiko@sntech.de>
+
+properties:
+ compatible:
+ enum:
+ - rockchip,pdm
+ - rockchip,px30-pdm
+ - rockchip,rk1808-pdm
+ - rockchip,rk3308-pdm
+ - rockchip,rk3568-pdm
+ - rockchip,rv1126-pdm
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: clock for PDM controller
+ - description: clock for PDM BUS
+
+ clock-names:
+ items:
+ - const: pdm_clk
+ - const: pdm_hclk
+
+ dmas:
+ maxItems: 1
+
+ dma-names:
+ items:
+ - const: rx
+
+ power-domains:
+ maxItems: 1
+
+ resets:
+ items:
+ - description: reset for PDM controller
+
+ reset-names:
+ items:
+ - const: pdm-m
+
+ rockchip,path-map:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description:
+ Defines the mapping of PDM SDIx to PDM PATHx.
+ By default, they are mapped one-to-one.
+ items:
+ - description: which sdi to connect to path 0
+ - description: which sdi to connect to path 1
+ - description: which sdi to connect to path 2
+ - description: which sdi to connect to path 3
+
+ "#sound-dai-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - dmas
+ - dma-names
+ - "#sound-dai-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/rk3328-cru.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/pinctrl/rockchip.h>
+ pdm: pdm@ff040000 {
+ compatible = "rockchip,pdm";
+ reg = <0x0 0xff040000 0x0 0x1000>;
+ clocks = <&cru SCLK_PDM>, <&cru HCLK_PDM>;
+ clock-names = "pdm_clk", "pdm_hclk";
+ dmas = <&dmac 16>;
+ dma-names = "rx";
+ #sound-dai-cells = <0>;
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&pdmm0_clk
+ &pdmm0_sdi0
+ &pdmm0_sdi1
+ &pdmm0_sdi2
+ &pdmm0_sdi3>;
+ pinctrl-1 = <&pdmm0_clk_sleep
+ &pdmm0_sdi0_sleep
+ &pdmm0_sdi1_sleep
+ &pdmm0_sdi2_sleep
+ &pdmm0_sdi3_sleep>;
+ };
--
2.7.4
next prev parent reply other threads:[~2021-08-24 7:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-24 7:50 [PATCH v1 0/7] Patches to update for rockchip pdm Sugar Zhang
2021-08-24 7:52 ` [PATCH v1 1/7] ASoC: rockchip: Add support for rv1126 pdm Sugar Zhang
2021-08-24 7:52 ` [PATCH v1 2/7] ASoC: dt-bindings: rockchip: Add binding " Sugar Zhang
2021-08-24 7:52 ` [PATCH v1 4/7] ASoC: dt-bindings: rockchip: Add binding for rk3568 pdm Sugar Zhang
2021-08-24 7:52 ` [PATCH v1 5/7] ASoC: rockchip: pdm: Add support for path map Sugar Zhang
2021-08-24 7:54 ` [PATCH v1 6/7] ASoC: dt-bindings: rockchip: pdm: Document property 'rockchip,path-map' Sugar Zhang
2021-08-24 16:58 ` Rob Herring
2021-08-27 1:30 ` [PATCH v1 6/7] ASoC: dt-bindings: rockchip: pdm: Document property 'rockchip,path-map'【请注意,邮件由robherring2@gmail.com代发】 sugar zhang
2021-08-24 7:54 ` Sugar Zhang [this message]
2021-08-24 12:29 ` [PATCH v1 7/7] ASoC: dt-bindings: rockchip: Convert pdm bindings to yaml Rob Herring
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=1629791656-13698-2-git-send-email-sugar.zhang@rock-chips.com \
--to=sugar.zhang@rock-chips.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=linux-rockchip@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).