From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.54 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795805662; b=bNyB1LZgzfK8KxlVvISXjPTRUsql+ZRCwTuloy6naFBoljhNAHFOhDZdodM0aY5MiSE2 VRzSw1gc0dvKC1hJwyPQ/ECzRdeLSRLQHm5yiSsbXM3KqkPKPsCK84e3DlONQcYW9VM4X U1lIZ13lGGztbbAZQxswjqikS2lp8gHY4/jaIvJqh8aDcN4jUorILyZo29GPedD4avcoS yH05CV5d6bojmdkXEJWLxSFgG8+JOPrkVnJvjBMkWYW8pr2gDuJC884Rx2VViEo9ddNUD ou9k+tDd2VwmN/0lzoaugtMlvhKL4uTMigGSQ46Kbj61LtXE1xWa1jN3WQ8b1wdbpNw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795805662; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:X-Google-Original-From:Date:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=51kGECU7mnaWff1zdYP1hH1erxWAFEkfyrjZFzcM8y8=; b=c6tt3bBFySNXtbP4VeNscsd9jYafR49S5yhHu6Ev309OXGHtnctSMGE0E+UrtsdaEL4w VaI5A1LS9b02mnNthA5Xeaj5WRu8Ka7IOfRYS8gyBiH+R4R24IOaFxakuF2Ly73N1xaof +5zh0/xniPYjWUlSn/tzYUP9boD4j8A9t//gUer617JYytGe1nYY47G636+r75FvBIsvS b+HZuzyjKznfIbnsrK7/FEuw+fewGN93cEOeG/BJhhDuEKy1vTJMOsTgkhjxwVeXCOhQ1 P0ZRdfv14uceqJDpgmHVQCot3OjUZjC5n1fBpt6AEtcH7b3lUgoP5Vx4Y4e1MI69biw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=ScU7ieTa; arc=none smtp.remote-ip=209.85.128.54 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 822FA606A31C for ; Fri, 27 Nov 2026 18:54:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 822FA606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=ScU7ieTa Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-4a2d6d01ecbso45003175e9.0 for ; Fri, 27 Nov 2026 10:54:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1795805660; x=1796410460; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:date:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=51kGECU7mnaWff1zdYP1hH1erxWAFEkfyrjZFzcM8y8=; b=ScU7ieTaj4/9UFIPvuUfx9G5EKDJiKsPDiD+bWJVvXYg4+4shgY+3ihB99m0356vjy 0ATG6HJjRGZDGvInK7zSRAsmzUv1dzu0+gQsYIO9/KbflI4LZNvFtp20yl61lCuWvoKp eOG/WbgvNrXB6GOZDaZ2JN1bPgkY0a7jd1xYNTnqb7YkekWAQ2iaCBikx2bgynaaXEsy JD7U6RI4BYNDSJBW+0Oy+Kf3NXBxS/lShpuZN21QiTZ+lPUHXru4OCPu46lFboL/rcSY qHSi+1tcpvMP+c4oAwdNgVRyIkUoib/C5M/QZ01l2yE2TZpBdAAx2rzvm+Q5W0DMrNQP 5rjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795805660; x=1796410460; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=51kGECU7mnaWff1zdYP1hH1erxWAFEkfyrjZFzcM8y8=; b=a8xJcJhF64mWyXerWeIM4hz8BqIOzfH12idf4XONhy88OTxnADqMxebwjDKDiTbkdD eqCvFoRQALp8NF9MceOw3td1qwEkvzUtAmYWIXx72yd36PKz/vnWNi5Ys7mGWuugefXT B+pO8xcZCpZkGu7gUTaIHoablEE+6ZAarTO1RrsXuizhtC61xk1ZPG8SZWedY8Yz5nHA gQkhSQgwZ3DuVgcsT2fiLY2DdiL4w/q/MznGiHT+WyLIIiXf5/c1vvLiRSYP04a6G7/O Q6qTdm2wpt8J1q87FaWSenvW+QlZ9dlIdGm1flX0xAK3pM2aIQCrgV3YWgcb6S+NhxyH dUWQ== X-Forwarded-Encrypted: i=1; AL+hErHsEbJ8+n0RdGZjHJ0PBY6OWMpbG87pURmuIqwtDKC5b86QRzDq/C8UOjBCVmaUU6bsZ7gn6U1PsIJhmvE=@vger.kernel.org X-Gm-Message-State: APuU4Z9qjHmhPd0CRWoyQYy4FPjC+n3JBU8UEIZX4uIIcWzitpOnUJpK k1eAMK8ZL3TAcKq7aPhX5xc7mPLGAx+vD8eMI3ERuPap8MpZX+Hete97KFNh9ptGwTs= X-Gm-Gg: AZFdTZcfrciZsn7ZPczRwZIUBBWu89sF3kcu+eum/EKuS6+rgfze+UqsBxU3c43moJT NR9StVmmr/B41j2BwtBqLXkZMG6WXzExpaDCKIvT/EFJao+GCHLjCEJRZJzU2VGxGppHP7fO69r BbzB+ML9Swl9qlaC6X+PUXrhUHDKL0SCddNApzuD7FhjwHagJyKKImR6YfZbs33LH7I6D5m8EuE MPiM+mZDMGKuev4RYcwOt0tpRhYooL+tQGKkVQ05wGF7Q515CN0nWujzLkq5Q0/dqKSjdja0NEr dhITi8WZ97MwJji3p5fnbftPZHxNzHtIdzq6BNorRamiFm846hxoh29fqpzTsNqlRi6Y3sVDbLc oDefCpMXJIx+Sr6Pel+8e149yV/2FjhnxGN2oc/pHD1JQn2kZzB+Y1Rektt1GZrW2G5dfGiKtgF oCF2DOjWWZcrvqEUWI3BBYvs2EOiG6KS9y2QU12/l1lzlqQr0Tlwgn2rPKdZe/Y/a69RChuqlg7 MgOgJXXgvzY1StPZzD55OouLGT1GrZ1I3/SSc82WTmk2CNky6ZAfFv/++kXJdbcp8T1+a3LHLbm zCTqvSCWUidBzW6b0+JQkNqrCZ/+ X-Received: by 2002:a05:600c:3484:b0:4a2:133:45e1 with SMTP id 5b1f17b1804b1-4bb88812f16mr523283925e9.24.1795805659913; Fri, 27 Nov 2026 10:54:19 -0800 (PST) Received: from localhost ([195.94.148.180]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bbab390cf5sm234366765e9.7.2026.11.27.10.54.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2026 10:54:19 -0800 (PST) From: Andrea della Porta X-Google-Original-From: Andrea della Porta Date: Fri, 27 Nov 2026 19:58:19 +0100 To: Stefan Wahren Cc: Andrea della Porta , Vinod Koul , Frank Li , dmaengine@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Saenz Julienne , Dave Stevenson , Phil Elwell , Dom Cobley , Maxime Ripard , Robin Murphy , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 06/28] dt-bindings: dma: brcm,bcm2835-dma: Document dma-channel-mask and DREQ flags Message-ID: References: <20261123145728.29082-1-andrea.porta@suse.com> <20261123145728.29082-7-andrea.porta@suse.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Stefan, On 19:23 Fri 27 Nov , Stefan Wahren wrote: > Hi Andrea, > > Am 26.11.26 um 16:10 schrieb Andrea della Porta: > > Hi Stefan, > > > > On 18:49 Mon 23 Nov , Stefan Wahren wrote: > > > Hi Andrea, > > > > > > Am 23.11.26 um 15:56 schrieb Andrea della Porta: > > > > The available channels are currently described by the vendor specific > > > > brcm,dma-channel-mask property, while the generic dma-channel-mask > > > > property from dma-common.yaml carries exactly the same information. > > > > Allow the generic property and mark the vendor one as deprecated, > > > > requiring at least one of them, so that device trees can provide both > > > > for compatibility with older kernels. > > > > > > > > The single specifier cell is also not limited to the DREQ number: the > > > > driver interprets some of the upper bits as per-channel flags (AXI > > > > priorities, wide accesses, burst and write-response handling). Document > > > > the meaning of those bits. > > > > > > > > Signed-off-by: Andrea della Porta > > > this patch should before the bcm2835-dma patches which modify the dma-cell > > > behavior. > > Ack. > > > > > > --- > > > > .../bindings/dma/brcm,bcm2835-dma.yaml | 26 ++++++++++++++++--- > > > > 1 file changed, 23 insertions(+), 3 deletions(-) > > > > > > > > diff --git a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml > > > > index c9b9a5490826..f619e395cf0d 100644 > > > > --- a/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml > > > > +++ b/Documentation/devicetree/bindings/dma/brcm,bcm2835-dma.yaml > > > > @@ -37,15 +37,30 @@ properties: > > > > maxItems: 16 > > > > '#dma-cells': > > > > - description: The single cell represents the DREQ number. > > > > + description: | > > > > + The single cell contains the DREQ number in bits 0-4, optionally > > > > + combined with the following per-channel flags: > > > > + bits 16-19: AXI priority > > > > + bits 20-23: AXI panic priority > > > > + bit 24: use wide (128-bit) source reads > > > > + bit 25: use wide (128-bit) destination writes > > > > + bit 27: do not wait for AXI write responses > > > > + bit 28: wait for outstanding writes before signalling completion > > > > + bit 29: do not pause the channel when the debug signal is asserted > > > > + bit 30: use multi-beat bursts > > > No strong opinion, but mixing DREQ number with per-channel flags is ugly > > I agree it isn't pretty, but it is the encoding the downstream DTBs have been > > using for years. Switching to #dma-cells = <2> (or introducing new exotic properties) > > would mean supporting both formats in the driver: I'm trying to play nice here in > > order to not break compatibility with downstream DTBs, which I think should be wise. > > The header I'll add in v4 with the definitions for these flags at least makes the > > device trees readable. > as I said I don't have strong opinion about this. > > Imho adding these configuration bits to the DREQ number was a downstream > hack. Furthermore providing some kind of compatibility with downstream was > never intended and cannot be guaranteed. Fine then, let's move those flags to teh second dma cell. Thanks, Andrea > > Best regards > > > > > > const: 1 > > > > + dma-channel-mask: > > > > + maxItems: 1 > > > > + > > > I think, the dma-channel-mask stuff should be a separate change. > > Ack. > > > > Regards, > > Andrea > > > > > Best regards > > > > brcm,dma-channel-mask: > > > > $ref: /schemas/types.yaml#/definitions/uint32 > > > > + deprecated: true > > > > description: > > > > Bitmask of available DMA channels in ascending order that are > > > > not reserved by firmware and are available to the > > > > kernel. i.e. first channel corresponds to LSB. > > > > + Use the generic dma-channel-mask property instead. > > > > unevaluatedProperties: false > > > > @@ -54,7 +69,12 @@ required: > > > > - reg > > > > - interrupts > > > > - "#dma-cells" > > > > - - brcm,dma-channel-mask > > > > + > > > > +anyOf: > > > > + - required: > > > > + - dma-channel-mask > > > > + - required: > > > > + - brcm,dma-channel-mask > > > > examples: > > > > - | > > > > @@ -96,7 +116,7 @@ examples: > > > > "dma14", > > > > "dma-shared-all"; > > > > #dma-cells = <1>; > > > > - brcm,dma-channel-mask = <0x7f35>; > > > > + dma-channel-mask = <0x7f35>; > > > > }; > > > > ... >