mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ew kim <ew.kim@samsung.com>
To: broonie@kernel.org, s.nawrocki@samsung.com, robh@kernel.org,
	krzk+dt@kernel.org
Cc: lgirdwood@gmail.com, tiwai@suse.com, perex@perex.cz,
	conor+dt@kernel.org, alim.akhtar@samsung.com,
	linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	ew kim <ew.kim@samsung.com>
Subject: [PATCH 9/9] ASoC: dt-bindings: sound: exynosauto: add PCM frontend nodes for ABOX generic
Date: Mon, 21 Jul 2025 11:30:52 +0900	[thread overview]
Message-ID: <20250721023052.3586000-10-ew.kim@samsung.com> (raw)
In-Reply-To: <20250721023052.3586000-1-ew.kim@samsung.com>

This patch extends the Exynos Automotive ABOX generic device tree bindings
to support PCM playback and capture frontend nodes.

Each PCM device node describes an audio stream interface handled by the
ABOX DSP. These nodes include properties for stream ID, IRQ, ADSP core
assignment, buffer limits, and stream category (deep_buffer or compress).

The bindings use patternProperties to match playback and capture nodes
as children of the abox_generic controller.

Signed-off-by: ew kim <ew.kim@samsung.com>
---
 .../bindings/sound/samsung,exynosauto.yaml    | 126 +++++++++++++++++-
 1 file changed, 123 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml b/Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml
index 3a7b5be627ee..e477550afc7c 100644
--- a/Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml
+++ b/Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml
@@ -28,6 +28,14 @@ properties:
   compatible:
     const: samsung,abox_generic
 
+  status:
+    enum: [ okay, disabled ]
+    description: DTS node enablement state
+
+  $nodename:
+    pattern: "^abox_generic$"
+    description: Node name must be 'abox_generic'
+
   samsung,num-pcm-playback:
     description: Maximum number of PCM playback instances (ALSA PCM devices).
     $ref: /schemas/types.yaml#/definitions/uint32
@@ -42,7 +50,7 @@ properties:
 
   '#address-cells':
     description: Required for child nodes that may declare address space.
-    const: 2
+    const: 1
 
   '#size-cells':
     description: Required for child nodes that may declare address space.
@@ -55,6 +63,10 @@ properties:
       compatible:
         const: samsung,abox_ipc_generic
 
+      status:
+        enum: [ okay, disabled ]
+        description: DTS node enablement state
+
       samsung,num-irq:
         $ref: /schemas/types.yaml#/definitions/uint32
         description: Number of IRQ channels supported for IPC routing.
@@ -65,13 +77,92 @@ properties:
 
     additionalProperties: false
 
+patternProperties:
+  "^abox_pcm_(playback|capture)@[0-9a-f]+$":
+    type: object
+    description: |
+      ABOX PCM playback or capture frontend device node. These nodes define
+      individual PCM streams used by the audio subsystem, and are children of
+      the abox_generic controller. Each node describes a PCM stream ID, IRQ line,
+      ADSP core allocation, and stream-specific parameters.
+
+    properties:
+      compatible:
+        enum:
+          - samsung,abox-pcm-playback
+          - samsung,abox-pcm-capture
+        description: Compatible string for PCM playback or capture device.
+
+      reg:
+        maxItems: 1
+        description: Offset for pointer register (pp_pointer_offset) used for communication with ADSP.
+
+      reg-names:
+        const: pp_pointer_offset
+
+      samsung,id:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: |
+          Unique ID per PCM Device, separated by stream type (playback or capture).
+          Must be less than samsung,num-of-pcm_playback or samsung,num-of-pcm_capture
+          defined in the abox_generic node.
+
+      samsung,irq_id:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: |
+          Software IRQ ID assigned in the control domain. Represents the software interrupt
+          line used by the ADSP to communicate with this PCM device.
+
+      samsung,allocate-adsp:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: |
+          Index of the ADSP core that this PCM device is allocated to. Indicates on which core
+          the stream is handled.
+
+      sound-name-prefix:
+        $ref: /schemas/types.yaml#/definitions/string
+        description: |
+          Prefix name for ALSA DAI interface. Helps to namespace controls and routing.
+
+      samsung,category:
+        enum: [deep_buffer, compress]
+        description: |
+          Type of the PCM stream. Can be either 'deep_buffer' for normal PCM playback/capture,
+          or 'compress' for compressed offload streams.
+
+      samsung,buffer_bytes_max:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        description: |
+          Maximum size (in bytes) of the DMA buffer allocated for this PCM device.
+
+      '#sound-dai-cells':
+        const: 0
+        description: Must be 0. Required by ALSA SoC bindings.
+
+      status:
+        enum: [ okay, disabled ]
+        description: Device node enablement status. Set to "okay" to activate the node.
+
+    required:
+      - compatible
+      - reg
+      - reg-names
+      - samsung,id
+      - samsung,irq_id
+      - samsung,allocate-adsp
+      - samsung,category
+      - samsung,buffer_bytes_max
+      - '#sound-dai-cells'
+
+    additionalProperties: true
+
 required:
   - compatible
   - samsung,num-pcm-playback
   - samsung,num-pcm-capture
   - samsung,num-i2s-dummy-backend
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
@@ -81,7 +172,7 @@ examples:
       samsung,num-pcm-capture = <32>;
       samsung,num-i2s-dummy-backend = <5>;
       status = "disabled";
-      #address-cells = <2>;
+      #address-cells = <1>;
       #size-cells = <1>;
 
       abox_ipc_generic {
@@ -89,4 +180,33 @@ examples:
         samsung,num-irq = <64>;
         status = "disabled";
       };
+
+      abox_pcm_playback@3fd0000 {
+        compatible = "samsung,abox-pcm-playback";
+        samsung,id = <0>;
+        samsung,irq_id = <0>;
+        samsung,allocate-adsp = <0>;
+        reg = <0x3fd0000 0x10>;
+        reg-names = "pp_pointer_offset";
+        #sound-dai-cells = <0>;
+        sound-name-prefix = "ABOX";
+        samsung,category = "deep_buffer";
+        samsung,buffer_bytes_max = <0x24000>;
+        status = "disabled";
+      };
+
+      abox_pcm_capture@3fd0400 {
+        compatible = "samsung,abox-pcm-capture";
+        samsung,id = <0>;
+        samsung,irq_id = <32>;
+        samsung,allocate-adsp = <0>;
+        reg = <0x3fd0400 0x10>;
+        reg-names = "pp_pointer_offset";
+        #sound-dai-cells = <0>;
+        sound-name-prefix = "ABOX";
+        samsung,category = "deep_buffer";
+        samsung,buffer_bytes_max = <0x24000>;
+        status = "disabled";
+      };
     };
+
-- 
2.25.1


  parent reply	other threads:[~2025-07-21  2:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20250721024611epcas2p43099e043aaa6f48c05eb0237065d31c7@epcas2p4.samsung.com>
2025-07-21  2:30 ` Add ExynosAuto ABOX generic platform and PCM support ew kim
     [not found]   ` <CGME20250721024611epcas2p45ddc52c1644f5779c7da822573f03246@epcas2p4.samsung.com>
2025-07-21  2:30     ` [PATCH 1/9] ASoC: samsung: Add generic ABOX management driver ew kim
2025-07-30 12:04       ` Mark Brown
     [not found]   ` <CGME20250721024611epcas2p37ecbc204ea695d97f6477c04712a9974@epcas2p3.samsung.com>
2025-07-21  2:30     ` [PATCH 2/9] arm64: dts: exynosautov920: add abox_generic dt node ew kim
2025-07-21  6:41       ` Krzysztof Kozlowski
     [not found]   ` <CGME20250721024611epcas2p47ebaf8cb494fc2bf71a83b00ba47f2b3@epcas2p4.samsung.com>
2025-07-21  2:30     ` [PATCH 3/9] ASoC: dt-bindings: sound: Add Samsung ExynosAuto ABOX binding ew kim
2025-07-21  6:44       ` Krzysztof Kozlowski
     [not found]   ` <CGME20250721024611epcas2p4baca500b3b1f185dcdc35552b2abe8d9@epcas2p4.samsung.com>
2025-07-21  2:30     ` [PATCH 4/9] ASoC: samsung: abox: Add IPC generic support for message forwarding ew kim
2025-07-30 12:06       ` Mark Brown
     [not found]   ` <CGME20250721024611epcas2p375cd5e4b53fcff3b69a39ef19c0825a4@epcas2p3.samsung.com>
2025-07-21  2:30     ` [PATCH 5/9] arm64: dts: exynosautov920: Add ABOX IPC Generic device node ew kim
2025-07-21  6:45       ` Krzysztof Kozlowski
     [not found]   ` <CGME20250721024611epcas2p382f3decd51152a5c89c673f222e22da1@epcas2p3.samsung.com>
2025-07-21  2:30     ` [PATCH 6/9] ASoC : dt-bindings: sound: Add binding for ABOX IPC Generic ew kim
2025-07-21  6:46       ` Krzysztof Kozlowski
     [not found]   ` <CGME20250721024611epcas2p423f2e6084264b08f43c6f86ce1ad0892@epcas2p4.samsung.com>
2025-07-21  2:30     ` [PATCH 7/9] ASoC: samsung: Add PCM driver with solution support ew kim
     [not found]   ` <CGME20250721024611epcas2p3da8e99d27a57cf7ad4ed46729e86602f@epcas2p3.samsung.com>
2025-07-21  2:30     ` [PATCH 8/9] arm64: dts: exynosautov920: add PCM playback/capture ew kim
     [not found]   ` <CGME20250721024612epcas2p122d627cfb90eac508b6ed3667acd9b9b@epcas2p1.samsung.com>
2025-07-21  2:30     ` ew kim [this message]
2025-07-21  6:47       ` [PATCH 9/9] ASoC: dt-bindings: sound: exynosauto: add PCM frontend nodes for ABOX generic Krzysztof Kozlowski
2025-07-30 12:46   ` Add ExynosAuto ABOX generic platform and PCM support Mark Brown

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=20250721023052.3586000-10-ew.kim@samsung.com \
    --to=ew.kim@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=s.nawrocki@samsung.com \
    --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

all inboxes | Powered by JetHome®