Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp31096pxb; Tue, 12 Apr 2022 15:58:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1ItKsEGdE9dxFQQLYXTCCxkEWbWjBk03rtV7gNXh4QPKBJ5Vkuu4mfD4s1rO/F3goZZfY X-Received: by 2002:a17:90a:fac:b0:1ca:5eb8:f3b2 with SMTP id 41-20020a17090a0fac00b001ca5eb8f3b2mr7594832pjz.37.1649804321537; Tue, 12 Apr 2022 15:58:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649804321; cv=none; d=google.com; s=arc-20160816; b=0KG6sKkF7VsxsignfcLJpVRL9mgRdWR98KDfAUmJtUSY0uY3UvIKKJY/vGQ0D9OSX3 W0dsXrREl54KzjEicewHWgAlOdr74AfecdXFReMEPI7vU3ruBuds/AfIQ4lNwHXmDcDB ODupPRT+01BmGNpJN8eQYg6UJ2sGtIniIQgdGZNppTuC9WvjHB3WEUzQbNN8Yq2a5whH x+CBui+0o98vFntLVIXkj167BNxFpOB/qcQBmG11V5LO+aFjScba/hpKzlNPwJLGGzle RQduXqYLb79sXqEebIN3d49JzcRWeQlQR9yVeYWBbNUocr1l7JL36R1zoiunxGbhaWNK +OOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:dkim-signature :from; bh=EJZTC/ClSFKyr/qub0lf6Q+PSSWH+Yce7kdkcf2d4vY=; b=c5qlCE7YmvfLcUCtDBhY+r9Nw9VmbKDxs/45BfbsmipVmfvcvXMf8h8vNASddnKSms 4c1V/j4iik2avf0wPd3kOieppvI1dx8GY4z+5hR4cfeH/0jV2gingJ91j6lJhcZ2w1ni FccFGG5WkgluqQU2qLZGBAb1yFjoDBrPT233Y9M6qos6s1O4mvwdplajq9gTMn4dTrMf 803hyTXlswHEJoRuPbjUkdQ564i4OiNWLdP3Y8tYi7CVYy6CYw6YXwj+7B/Jb4XvweQJ jRwwGslDRw9YdDm6kZ9DJP6+eX7edowLkvdx0/ogYm2AFH5natvd3wF21hlvf5dK0ba5 UNVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=DCTjTMUL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cutebit.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l17-20020a170903121100b00153b2d165a0si14228436plh.424.2022.04.12.15.58.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 15:58:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=DCTjTMUL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cutebit.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AADA31D8324; Tue, 12 Apr 2022 14:39:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350377AbiDKWYm (ORCPT + 99 others); Mon, 11 Apr 2022 18:24:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350446AbiDKWYa (ORCPT ); Mon, 11 Apr 2022 18:24:30 -0400 Received: from hutie.ust.cz (hutie.ust.cz [185.8.165.127]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38E3513EA3; Mon, 11 Apr 2022 15:22:12 -0700 (PDT) From: =?UTF-8?q?Martin=20Povi=C5=A1er?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cutebit.org; s=mail; t=1649715729; bh=EJZTC/ClSFKyr/qub0lf6Q+PSSWH+Yce7kdkcf2d4vY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=DCTjTMULcjbFUSOvZ8DpPqsy4YspOWq5V0XcpueglHW4vK03njzDfMUHLbVb902HB VDcU5HQub2U9RQbFqUzjPzHwEn61ljMeRbGMDnsW9u0yRxW2cS0OUom50mYhdgAa9C AlK8biOu4kczo/F+wldczavCD0cFaNn7i3tv1tx0= To: Hector Martin , Sven Peter , Vinod Koul , Rob Herring , Krzysztof Kozlowski Cc: Alyssa Rosenzweig , linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Kettenis , =?UTF-8?q?Martin=20Povi=C5=A1er?= Subject: [PATCH v2 1/2] dt-bindings: dma: Add Apple ADMAC Date: Tue, 12 Apr 2022 00:22:03 +0200 Message-Id: <20220411222204.96860-2-povik+lin@cutebit.org> In-Reply-To: <20220411222204.96860-1-povik+lin@cutebit.org> References: <20220411222204.96860-1-povik+lin@cutebit.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Apple's Audio DMA Controller (ADMAC) is used to fetch and store audio samples on SoCs from the "Apple Silicon" family. Signed-off-by: Martin Povišer --- After the v1 discussion, I dropped the apple,internal-irq-destination property and instead the index of the usable interrupt is now signified by prepending -1 entries to the interrupts= list. This works when I do it like this: interrupt-parent = <&aic>; interrupts = , ; I would find it neat to do it like this: interrupts-extended = <0xffffffff>, <&aic AIC_IRQ 626 IRQ_TYPE_LEVEL_HIGH>; but unfortunately the kernel doesn't pick up on it: [ 0.767964] apple-admac 238200000.dma-controller: error -6: IRQ index 0 not found [ 0.773943] apple-admac 238200000.dma-controller: error -6: IRQ index 1 not found [ 0.780154] apple-admac 238200000.dma-controller: error -6: IRQ index 2 not found [ 0.786367] apple-admac 238200000.dma-controller: error -6: IRQ index 3 not found [ 0.788592] apple-admac 238200000.dma-controller: error -6: no usable interrupt .../devicetree/bindings/dma/apple,admac.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/apple,admac.yaml diff --git a/Documentation/devicetree/bindings/dma/apple,admac.yaml b/Documentation/devicetree/bindings/dma/apple,admac.yaml new file mode 100644 index 000000000000..bbd5eaf5f709 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/apple,admac.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/dma/apple,admac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple Audio DMA Controller (ADMAC) + +description: | + Apple's Audio DMA Controller (ADMAC) is used to fetch and store audio samples + on SoCs from the "Apple Silicon" family. + + The controller has been seen with up to 24 channels. Even-numbered channels + are TX-only, odd-numbered are RX-only. Individual channels are coupled to + fixed device endpoints. + +maintainers: + - Martin Povišer + +allOf: + - $ref: "dma-controller.yaml#" + +properties: + compatible: + items: + - enum: + - apple,t6000-admac + - apple,t8103-admac + - const: apple,admac + + reg: + maxItems: 1 + + '#dma-cells': + const: 1 + description: + Clients specify single cell with channel number. + + dma-channels: + maximum: 24 + + interrupts: + minItems: 1 + maxItems: 4 + +required: + - compatible + - reg + - '#dma-cells' + - dma-channels + - interrupts + +additionalProperties: false + +examples: + - | + #include + #include + + admac: dma-controller@238200000 { + compatible = "apple,t8103-admac", "apple,admac"; + reg = <0x38200000 0x34000>; + dma-channels = <24>; + interrupt-parent = <&aic>; + interrupts = , + ; + #dma-cells = <1>; + }; -- 2.33.0