Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6878516imu; Mon, 21 Jan 2019 18:25:31 -0800 (PST) X-Google-Smtp-Source: ALg8bN69nzlW3Wngiea6c2dzeyBkNUVOAgF0/n1QdvDbJ3JNb1JAFrrDa9ih9HD5ZUNnRwuTQfiQ X-Received: by 2002:a62:7042:: with SMTP id l63mr32995000pfc.89.1548123931304; Mon, 21 Jan 2019 18:25:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548123931; cv=none; d=google.com; s=arc-20160816; b=sz4vURmF2o0EfaF9qC8aQLJ7/uB/tZn5B7h/Enx5k+bNDup8TfEp14CqDtmiJ9Jy49 O92w0Sb89zEv0LBMrM4D5/CLxQwJm7DPYyIU05k2ywgER5FviYEykP8jgKA3CLfLt6o3 fvWvJbwbzYqGSFuwducWAwfhYGtiLfNbREHcG7s6CxgumrdTzcwzCdKkLS71kt1GUdLQ mzlOakOqdP98/klQ202CppZDMV7i4ZOv8VDXSV3EEDgCsfBt5cKcJCKeP9Dkzv3XHH85 AXDC9RTf+ZjdmQis7o6sWFoIRI7y7r+XpN+VaXA1o72WMDWa1tADoOC7spo81WwIcIwt 0lAw== 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:dkim-signature; bh=W0NdysI5CM7+I+Thbbv3VAV/KANlyL+WAtkRtmfEjoM=; b=bHvYxHZWbIgHPFfAglkYpdvFTxj/vx15V3ltUt+Bdwm9LkCVYFk+erHBlu1f7hH1r+ UPtOgQTDhkSNawUzXe25OkWvlNXf/xBrnY4CfaJTAb/VpW+tGQ9WJzbadsp5vCM9gc0G /5IKD4XhLBjm1f8A3pwBRtLmYYEWGBxkh2eUoe6YjRgErsN9Px6D+u4NpmcAVB/XxqoS cvPy5dBqo/Z3LbMyikgKymigcj7GYXlmp/fhn/5Z7YTpG47ipmJT8JQdFY/HUc1iPiBH Hu3oNhnJavP00aiv12fTpMJ1Mkh8qSXVZ6jIwmfL//wN898zWrNFsjZe6vkoS/acjY5r e2FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C4xEUz9i; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x33si13876672plb.43.2019.01.21.18.25.15; Mon, 21 Jan 2019 18:25:31 -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; dkim=pass header.i=@linaro.org header.s=google header.b=C4xEUz9i; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726863AbfAVCXN (ORCPT + 99 others); Mon, 21 Jan 2019 21:23:13 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:46229 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726756AbfAVCXM (ORCPT ); Mon, 21 Jan 2019 21:23:12 -0500 Received: by mail-lj1-f193.google.com with SMTP id v15-v6so19143678ljh.13 for ; Mon, 21 Jan 2019 18:23:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=W0NdysI5CM7+I+Thbbv3VAV/KANlyL+WAtkRtmfEjoM=; b=C4xEUz9ip1ZeTzPv/J8he2mpt/81PA8ReTSy+PGyUHpYAla6PzsjvYQrkUPoa/V10D t9PWwuVdlZZR5Wht75GNWzHdPAFj3VBPKZi9wg8mcuTA6gEuaKeKvPhTmGMs0at02lip SIaaytviRxeg6PmBPeAwzSdKTQiw9gN6xpG9Y= 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=W0NdysI5CM7+I+Thbbv3VAV/KANlyL+WAtkRtmfEjoM=; b=mJ4Chy8l5J+/jJhpVaWFOw0J1Dgk1W6Y0+ui1btnzQHb7ik9Ad438MCL2xtQiSq3sa WqqSPMKgE7f8TJRJs6OjqP77P7fOwBuMxDbSfcGyowtEMhXnfi9UJseBf7K1IYJKoQon lkhHJB8CgLv+xk/fJCEqsGQz7nUCv4WRu7IX4CNwqUDkRKslSTXSeVBvj2ZdsemKeM2X mYY+5OPS8vrnDl8CBXIWsKjVT57zsDeWcUYL2uoAMk/OEa1LAzO3sBBSqS3Bbc4UYDU1 xNIGEjAPpUR+5tPWVLt0TAx5WO0gxFYWclHnHM4EYyk5y1mIt1EMfiPYjdtGnGobebau sMzQ== X-Gm-Message-State: AJcUukecyAy1K2ZUYIs/Oy6Qc2o3hPxuPh6LQD8O0VanjWT33s47ouvg 51CXiLTQEItROxCM+BpcxOAv4BkNZ6IkNC0nvAIwTA== X-Received: by 2002:a2e:449b:: with SMTP id b27-v6mr18556784ljf.47.1548123790116; Mon, 21 Jan 2019 18:23:10 -0800 (PST) MIME-Version: 1.0 References: <7538d5806003b8f67e7e0d35638315974b7c2b50.1547559542.git.baolin.wang@linaro.org> In-Reply-To: From: Baolin Wang Date: Tue, 22 Jan 2019 10:22:58 +0800 Message-ID: Subject: Re: [PATCH 3/4] dt-bindings: spi: Add the DMA properties for the SPI dma mode To: Rob Herring Cc: 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 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. -- Baolin Wang Best Regards