Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp201825rdb; Mon, 22 Jan 2024 17:37:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiclr4/S0II6Hh5d0UMXCG7Qm0vYyrfxKe9roIxLETCRggU02njeXhhz7O8j7pxXQwU1Qj X-Received: by 2002:a17:906:9c86:b0:a30:70bf:cc33 with SMTP id fj6-20020a1709069c8600b00a3070bfcc33mr1214845ejc.85.1705973820621; Mon, 22 Jan 2024 17:37:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705973820; cv=pass; d=google.com; s=arc-20160816; b=uN2f0naVqII5BH7SL4M/2/MeVXdu7un09jaEEg2uCDjAFYwJ1a39vUizPXKeBPx7pg VdnXmyHWaijL4jWn1E/KWXG4Un7qj661ri5l7uFsgKyj3xp35YRZKnZJrUqKnDYSumZP cR37uLm9gG02H0Oo+0srCMaVlFA2QBR9cqhP7e2pSwh3ghg2MyphM8MB+V//f5BIvdT5 T2NliNt1zSDggroW1CBMGffejATlHuVcHn3bz5BDB4wqZn47qo1gqDjC0FMDIohuVcFZ XGgAUN6CuLb1d5bCDsYXWaQbLxJatPfSmyhzcTr0zjJt3Y7ZEph8aN/1C7M+i7mjDaxu Dtng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date; bh=n5Xm5fTpjenBhnlqIfUGkUNf8Qw8jxehoX/dGYCCwkQ=; fh=UWiig1s3fmMOlTSMGWrEATJpXuAxUBcuTQXgzYQfeCg=; b=DtssHMPkXtKbK9h7eDFGEqfxms5ad7rPZPun5NJCPDimt1CR/jioPiGXLx+hEo/xBD nhgcwMQvnkcrpSepm4cKYSVBNW3N9c4GUDLtkKiqx9grwp+4SRDy+7mLIFv8f9sKJYVL ZoSQCn69nl9jfNXrohM7jpIM4Tom47nuk/gYPMHbuPMfpMjhm5ZHjMR7jeAKtmGNqJKH xAYwTO53kYr8A+IzsbUzAVf5m8TUcEBMJ+GKk88iPGwTeyhbofOVm7WNtF54F0bkInfm +DIz8AqQ5dG3z3mcgrvQhacE/yGnLoE0m5We//zXF5zjKLuaBCTNB4lrt+WV7n/OQneK XDnw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-34532-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34532-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g15-20020a1709067c4f00b00a2809ceb7e6si10561251ejp.309.2024.01.22.17.37.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 17:37:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34532-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-34532-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34532-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4EFD71F227AF for ; Tue, 23 Jan 2024 01:36:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C97F35A0E8; Tue, 23 Jan 2024 00:41:04 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82FC64F207; Tue, 23 Jan 2024 00:41:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705970464; cv=none; b=bzp83AKDvfWWfOa1KCVawlSWVrFeKkufqIPddAO7KPRy+ZndonxcBqVgKHWclCWtoGMu9uTeODLn+zhUK3Kv1WzP8nNUn48iQwKatIfZBfQoLS3iVXRPPoyTSq4pXxsPQT/P3wDA62XpHgXZT9FCUQOWDhi8koyAw/ruN8aA0ao= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705970464; c=relaxed/simple; bh=UbGceyRiBi7uZH0lDWNsttwvZ5/EMF3MFYFsi+KKQ4U=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=T+Vt4RiX0hMkVbbm0gv7EqfRs+rFFurF66d+mj8LE6RgAydLMx787UTVgzwlGqY2aCUTKKR9A3kWD42y/81CVOa91n6AxN9RUXOs0Fq31bJAJDAEuW6hpoHrL2+bV0A02yd7f1exXHjz9YHxZC0FY7zp4jZybz2dDfkPZroYOZY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: