From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.47 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795805662; b=rs+QmngnVYySzghcx+2wE+a2qwu2tYAfHunpbGeZmr1r0dlPlWkFoPPPbfBGyh9lCYbm //gzmJwpAdA3qsvh1I85veVqAfxZC1U/dhQhw71to+N/G/qBOPzyH3NK/bIsc/OIswtEB lNwL5wFaD/jVHaDqZJVUOjowi6q8BXxza1To+idJCkAl/VrnCBq/0MAQg2N1PAdFqKPRh aZ47g9pjnqTxr6u6I+LdSDoT3rZRWsy30Nx4vgkpjEsZiUUdaZII7bpfAWtgozCTsRiS3 CQRFlMi6BsjM2X2/2PPde6b0j3Zm217HL8tivxkTddlkNq2Tz1DpY3AU7Gq9ZBFQbqw== 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=Blb5kbgetIXM+/u/hLk+ydo1AoOjI+vM3aCxaNJ47WBJvQoSjMO0cz6iy3gMsvpiZxbR sRfIKiLNB7yrd/Vdb8rolIi+3s2TajV4aBXOtMOMwGbU2zvALhP7JUpzglwbrZO+G2SdU TOWOF6/pFEGeBa7x5XXUgK1ytztDXY/TQQZ8QPGsnRfeNEbV0jWHfMCIqR0oj0a1hTq1n zmI0IGP3oALVeh9T+40ZSSZC1cF2CA6xeddzjHqswGgoIUF597Cd5jMRcA+5qH02l/qUx o4o3b5BucpOhWB4+yVOknVEIufWQPe8PuFWZU3q+wnzD0vBclGFlLTHAwm8vsoJkmsQ== 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.221.47 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (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 86DC4606A31E for ; Fri, 27 Nov 2026 18:54:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 86DC4606A31E 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-wr1-f47.google.com with SMTP id ffacd0b85a97d-4a68190a2a7so7143406f8f.1 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=bZlJ33qHAAnG9p8l6IUHRtg6Cy323KdFQt4kmrwGPA/XvwmXeOvugmpzYfxU/H3urU 2uDmTKkEuUb35Xl58IWPB7jc9mV7iN/nuzzbNHDO67cTUqOe38OFRJb8TgAVW1dQnWOD pU0VtrnpcCXs/I1MxsXgzirYRmblLojulOYPK/n8GeA9G5zZHuASNRMLk+rBekxjoy06 VMfXmaMr7a0SdLd3tuDaYOCPgYGBnycMeYhjsdQ4AEBARBvBfoaQe+XJGGwX6lR6VjqE ZBpBp1EQoLOIv9WugVKWYYKX7Olu5sdREotLRfUPwlVvb3RqXPSluysisfk2NfISrpC7 7ymw== X-Forwarded-Encrypted: i=1; AL+hErHBle9xFdFpqsVPlUrjHH4+4HDC6pgJHKy1ZrIodeO4JAnUhtHJ9MKo39jCxYnxoXr4BUiFaPWldvLd@vger.kernel.org X-Gm-Message-State: APuU4Z/G6zHexan/npSIpbqo/+QGv1Th9hYs0M/o8ghhvTqkvT+UFx4w JIrBWhZbccq9PKmB2+pG528gX7nZubz/3Y3CvFTX3WrbiyX15X1qQbuRoRVxY3njJD4= X-Gm-Gg: AZFdTZeEM9GxpByukBHoPO2wRYim23knYDTe9gu566mP+BIPTcZb3LumNbLKaJpjBEL 7FiLftBx4W1B6n5OnFlb/4m3NapbuudZ+mBGn0uSGbiPgEtNMqtmV4Xp8iNTTAG2CnVoLMPBdTc d44r//JhIe/n3VvE/MXNkHziHnTgNo/GyC54scPEt7n17k9AD6Z0IfWPz/rt4+lmKMz1gTA/67Y LTl6JRbR+bD5v6+NlpjilPcalbn2TrA1+iBO+LCZep80CQ8B4vXW3ztARYOMETlAZGEdvgSbECt Jfb0LO+pH9ECxc/3YG0HSAf2NsaUxvS3HZ5OoXKv5vERbdNwstGyGCfmVfdMUpHyQJ29z/OvzAK 24hsic4vofwDNGf8I1MyPE181jWOLaQTNOTwxJkwjvbtgetVnWj3GTuvIrWqH5TgOb5WYG6ULhp aHwlDTcSARsIxafqoUefwMpjDLyjtsKTxIlv18H96XQ8w6Iva+T+kLv4N7Tojw98ETL+SgXmHVq zoVoq6U8qzalP+J8QSwbWArl1mVUSfzACz+zpld4e5pVA15gpp31ln7m89gAInsTBZrMSPa4mNL cCkTMmnC1VmRR45R54F7Dwb839Pc 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: devicetree@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>; > > > > }; > > > > ... >