Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7112908imu; Tue, 22 Jan 2019 00:12:55 -0800 (PST) X-Google-Smtp-Source: ALg8bN5rVAHaL5wZFOHgRRpRd5ZrVtw2Ns+5r3IZdia73OaSt+GAu2gjWjgdt4fTBp8KdZS7m6XD X-Received: by 2002:a63:ff62:: with SMTP id s34mr31261319pgk.325.1548144775284; Tue, 22 Jan 2019 00:12:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548144775; cv=none; d=google.com; s=arc-20160816; b=Mbwk8iXzyWOhz391b8tb+yRWXxOWhrtqcu9WW+8ZHoKErrdjxtQQBNTXemPdx+Q6Uj KSKhLvbqnuERoDS5an0S7xfNriOEL3WkJ3rH6VQMWT2bbL9Yv14+BUdSPo+iBfPrePbs NNTXTGShPZM87Zq0ZZpd+HnHSQsK0ecAcCbGOnpe5CpzCJumAXffZpnaXwGig3D5/6am OZsK2sAqBcSOx1a0rd20NbzIB0GkQCuTDBzBKFm+B3kBxkmi/XnYTrge59dD99gYagxp 04+Idb7Wula04VLhG2TCEKCDaMKW7ejYfsuTf+1lSjkyXtGuXA7kFsca+gk/8JdukyDa yBdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=teir3mBsFUdt388sIJOWTM62fFUlm4syvnMXcwRKWtc=; b=W2bEgS7USNpT7ilHD3h//M81Tl96702E4bZSpNTrUNsxa46zHFpnZ3A3O8QSvPwdvV 4eIyrS8fwmwtfvb/vUv/zoJWgmg3ZGdp5577RowXlvJY6uLLWAbpGmgwhxdC69QJYrYo EUeFtOvd4eL3ZC5r+rsrQR8f1pGG1bJ0tmphFzU8v2657+NsSdbZLjjqhWFs7WKnD/VX p2yr+ToxuRFbPG8wHZYY3A4YbvXabchr/c66t1MV1WS8dg+U/ri/GgMKsCryVsrBH5YU tK5/cMiFEd4aIiGLOz/FnlRfvCo5I00mKthxQxUcT3ufZbfQAakuPOhSOLJgWcCr4Hhh NrJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si14618193pfa.99.2019.01.22.00.12.39; Tue, 22 Jan 2019 00:12:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727530AbfAVILg (ORCPT + 99 others); Tue, 22 Jan 2019 03:11:36 -0500 Received: from mail-vk1-f195.google.com ([209.85.221.195]:34826 "EHLO mail-vk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727474AbfAVILg (ORCPT ); Tue, 22 Jan 2019 03:11:36 -0500 Received: by mail-vk1-f195.google.com with SMTP id b18so5175735vke.2; Tue, 22 Jan 2019 00:11:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=teir3mBsFUdt388sIJOWTM62fFUlm4syvnMXcwRKWtc=; b=DIG5wZjFi5q+FszCti2KdSx774QTykrkqFnBMWYb3HvszE5Z7+Wd6XzTC+fKc2IEKB O7+NZe8tBCPiAWe0o0U2Rxw5n0FRX7LxfgYYTAFSgXvHz8ZJb638TV6prnYSWViGiIwk q6zx/yFSzEFDXPWxldeqGdAngwLJHAYp0McrG4kuCih8VgKcsjcCv8J55g9mc+lBkNys 3CG4coJWvTP/8rZcwXWJNwZDNc5b/QEClOj1BynXw6Cp+rOV7t9CWsawJJEotmKz8dJ1 GWrMtafBmAJYnkJHRabd/Y4NoNC7co1L0fkroQUWkqtImJqLhhZ3FMcsn0FpSSoSBc5d OeEw== X-Gm-Message-State: AJcUukeRMYZlaTw2EUkjmZDDduXCDcssQ23JRGT+DAL0ZIrDkqUVK+NR 9tDZF4BoEHVuvhq1J06z8skkzUngH1fEXTROC2A= X-Received: by 2002:a1f:2145:: with SMTP id h66mr13385195vkh.65.1548144694168; Tue, 22 Jan 2019 00:11:34 -0800 (PST) MIME-Version: 1.0 References: <7538d5806003b8f67e7e0d35638315974b7c2b50.1547559542.git.baolin.wang@linaro.org> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 22 Jan 2019 09:11:22 +0100 Message-ID: Subject: Re: [PATCH 3/4] dt-bindings: spi: Add the DMA properties for the SPI dma mode To: Baolin Wang Cc: Rob Herring , Mark Brown , Mark Rutland , Orson Zhai , Lyra Zhang , lanqing.liu@unisoc.com, linux-spi , DTML , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Baolin, On Tue, Jan 22, 2019 at 3:23 AM Baolin Wang wrote: > On Mon, 21 Jan 2019 at 21:53, Rob Herring wrote: > > On Tue, Jan 15, 2019 at 7:47 AM Baolin Wang wrote: > > > From: Lanqing Liu > > > > The email address should be updated with unisoc.com. > > Sure. > > > > > > Add the DMA properties for the SPI dma mode. > > > > > > Signed-off-by: Lanqing Liu > > > Signed-off-by: Baolin Wang > > > --- > > > Documentation/devicetree/bindings/spi/spi-sprd.txt | 9 +++++++++ > > > 1 file changed, 9 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/spi/spi-sprd.txt b/Documentation/devicetree/bindings/spi/spi-sprd.txt > > > index bad211a..01ef53f 100644 > > > --- a/Documentation/devicetree/bindings/spi/spi-sprd.txt > > > +++ b/Documentation/devicetree/bindings/spi/spi-sprd.txt > > > @@ -14,6 +14,12 @@ Required properties: > > > address on the SPI bus. Should be set to 1. > > > - #size-cells: Should be set to 0. > > > > > > +Optional properties: > > > +dma-names: Should contain names of the SPI used DMA channel. > > > +dmas: Should contain DMA channels which the SPI used sorted in the > > > + same order as the dma-names property. > > > +sprd,dma-slave-ids: Should contain the DMA number that the SPI hardware required. > > > + > > > Example: > > > spi0: spi@70a00000{ > > > compatible = "sprd,sc9860-spi"; > > > @@ -21,6 +27,9 @@ spi0: spi@70a00000{ > > > interrupts = ; > > > clock-names = "spi", "source","enable"; > > > clocks = <&clk_spi0>, <&ext_26m>, <&clk_ap_apb_gates 5>; > > > + dma-names = "rx_chn", "tx_chn"; > > > + dmas = <&apdma 11>, <&apdma 12>; > > > + sprd,dma-slave-ids = <11 12>; > > > > When would this be different values from what's in 'dmas'? > > Slave id is not always same with the DMA channel number in 'dmas', and > it is just coincident for SPI driver. Moreover for different SoC , the > slave ids for DMA engine consumers are not same. So we need one > property to specify the slave id for the consumers to trigger DMA > transfer. Perhaps the DMA controller should use #dma-cells = <2>, so you can specify the second value in the dmas property? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds