From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 870A7C46CD2 for ; Tue, 23 Jan 2024 00:41:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CcijCkjTtpi8NcCjJ25jILpJzoZ5XfWR9jS9gQH0Pl0=; b=R4dRg9cBzP/Oyf WhR8nJXBl3Hmszzst4+O8F3SITXSDfJcDU37uV20j/lGmiHOw8GBMet4rwilyvIRqzRS3d1puF/UN EO1bg+nlSoE0bTuQNIA4sK+p2C+PKCWEvAV9GgGC0kkw1aT+9pKEjhDEhCYP4wz1R0eBhDfUSJzPB Ib3OzvR+4kBwr0HoXvcWKokEohL1pQc2E1XDPjDWzoY4pWJ/MRDzFpqm2aZqrakjkViYj869BbCwy QX3L31m6j1Fws9AUPA7Jx3sFpxVyzxlVdD1QDkEyx/eqCQs3cgCAhpaxv5CmXoUsxI0Tvoku/N6Fh vOkouSeY+j0B6pEmnu4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rS4qg-00EdU7-30; Tue, 23 Jan 2024 00:41:06 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rS4qd-00EdSK-1R for linux-arm-kernel@lists.infradead.org; Tue, 23 Jan 2024 00:41:05 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A490D1FB; Mon, 22 Jan 2024 16:41:47 -0800 (PST) Received: from minigeek.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A41813F73F; Mon, 22 Jan 2024 16:40:59 -0800 (PST) Date: Tue, 23 Jan 2024 00:40:10 +0000 From: Andre Przywara To: Chen-Yu Tsai Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jernej Skrabec , Samuel Holland , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vinod Koul , Chen-Yu Tsai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-sound@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/7] dt-bindings: dma: allwinner,sun50i-a64-dma: Add compatible for H616 Message-ID: <20240123004010.59cac5ad@minigeek.lan> In-Reply-To: <20240122170518.3090814-5-wens@kernel.org> References: <20240122170518.3090814-1-wens@kernel.org> <20240122170518.3090814-5-wens@kernel.org> Organization: Arm Ltd. X-Mailer: Claws Mail 4.2.0 (GTK 3.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240122_164103_577516_2A60F41A X-CRM114-Status: GOOD ( 20.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 23 Jan 2024 01:05:15 +0800 Chen-Yu Tsai wrote: Hi, > From: Chen-Yu Tsai > > The DMA controllers found on the H616 and H618 are the same as the one > found on the H6. The only difference is the DMA endpoint (DRQ) layout. That does not seem to be entirely true: The H616 encodes the two lowest bits in DMA_DESC_ADDR_REG differently: on the H6 they must be 0 (word aligned), on the H616 these contain bits [33:32] of the address of the DMA descriptor. The manual doesn't describe the descriptor format in much detail, but ec31c5c59492 suggests that those two bits are put in the "para" word of the descriptor. The good thing it that this encoding is backwards compatible, so I think the fallback string still holds: Any driver just implementing the H6 encoding would be able to drive the H616. I think the A100 was mis-described, as mentioned here: https://lore.kernel.org/linux-arm-kernel/29e575b6-14cb-73f1-512d-9f0f934490ea@arm.com/ I think we should: - make the A100 use: "allwinner,sun50i-a100-dma", "sun50i-h6-dma" - make the H616 use: "allwinner,sun50i-h616-dma", "allwinner,sun50i-a100-dma", "sun50i-h6-dma" Does that make sense? Cheers, Andre > Since the number of channels and endpoints are described with additional > generic properties, just add a new H616-specific compatible string and > fallback to the H6 one. > > Signed-off-by: Chen-Yu Tsai > --- > .../bindings/dma/allwinner,sun50i-a64-dma.yaml | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml > index ec2d7a789ffe..e5693be378bd 100644 > --- a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml > +++ b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml > @@ -28,6 +28,9 @@ properties: > - items: > - const: allwinner,sun8i-r40-dma > - const: allwinner,sun50i-a64-dma > + - items: > + - const: allwinner,sun50i-h616-dma > + - const: allwinner,sun50i-h6-dma > > reg: > maxItems: 1 > @@ -59,10 +62,14 @@ required: > if: > properties: > compatible: > - enum: > - - allwinner,sun20i-d1-dma > - - allwinner,sun50i-a100-dma > - - allwinner,sun50i-h6-dma > + oneOf: > + - enum: > + - allwinner,sun20i-d1-dma > + - allwinner,sun50i-a100-dma > + - allwinner,sun50i-h6-dma > + - items: > + - const: allwinner,sun50i-h616-dma > + - const: allwinner,sun50i-h6-dma > > then: > properties: _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel