From patchwork Fri Oct 28 06:54:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milo Kim X-Patchwork-Id: 9401291 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 130536022E for ; Fri, 28 Oct 2016 06:55:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 009292A5B7 for ; Fri, 28 Oct 2016 06:55:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E98C82A5B9; Fri, 28 Oct 2016 06:55:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 842042A5B7 for ; Fri, 28 Oct 2016 06:55:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756721AbcJ1GzC (ORCPT ); Fri, 28 Oct 2016 02:55:02 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36603 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756831AbcJ1GzB (ORCPT ); Fri, 28 Oct 2016 02:55:01 -0400 Received: by mail-pf0-f194.google.com with SMTP id n85so386363pfi.3; Thu, 27 Oct 2016 23:55:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uUxxd7TiuM3fWeJ9tawbRy/G0uSfK0V3qtAhSScDQaw=; b=Bxex7JdllIju1/UGBuf+zBx2R1GKOLoHP5envizAu8HTX3EqBlBYEejI+tHtU/NaDK eCBqTISSIj4OoIETLz5P6TPETpnu/A064Xd39VHG24+Ex3iYAUzR0MHiYb/ogH7mq7id h69WhlZRJ3uMc7LILzdAnF+gz+/CVJnV9qLBAI/wl7AOhz/U2di20y5adz95J+Wl374m 29ei6e3G9m3+VH2Df5/V/b+AaIa77m+fJhvZ+9SVOA8lOfUsem6PpbMX2aYPYfRt+buV xUKUb0ZM9zh9ydxQV2TGJQpzOmOhZeNeitZKEOiNaL/m7R66/+hX//EEpzwxFth7WAUO QMHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uUxxd7TiuM3fWeJ9tawbRy/G0uSfK0V3qtAhSScDQaw=; b=B/Zcm67jNybGB6ZPuuZW7gbcNAUKZaBzE8/4eec+E9uiqnXdD9X7e0mBiNFT4LVewK hO6lQ4AIDYnCW9O365wnbHUA64Ps08obSgkDT30IaFihhWF019BTbdol/pjWFZNI1vyb bmSaGC/wcBPJV6B6wktD8BsHTDW+Ee7KYLpj4eA3giHOCZZgADM6ZBEpbL8r0pyGWiZ8 R72tpo75ZbbYK95bsWODfTe28HNi6SaA/O9ECGM3W2B3wNA4ijKz1g2C+U/HjFOdLOYC e5vCYr3MrFyaxt16WO2L7G/5c3Aw7dD8jpDlhsGfjrd4RcH7zwhx9mObJB1kuZGcmk0H zHqQ== X-Gm-Message-State: ABUngvcU4bRFPQGQ3BcIaZ3jU/nSuAbN7qE77fcpMB9U8hcb2fUEDWkDZ/z2I/hf5e4DEA== X-Received: by 10.99.129.200 with SMTP id t191mr18320422pgd.180.1477637700252; Thu, 27 Oct 2016 23:55:00 -0700 (PDT) Received: from localhost.localdomain ([175.223.26.221]) by smtp.gmail.com with ESMTPSA id fg2sm16210184pad.23.2016.10.27.23.54.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Oct 2016 23:54:59 -0700 (PDT) From: Milo Kim To: Maxime Ripard , Chen-Yu Tsai , Mark Brown Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Milo Kim , Rob Herring Subject: [PATCH v2 3/4] spi: sun6i: Add binding for Allwinner H3 SPI controller Date: Fri, 28 Oct 2016 15:54:11 +0900 Message-Id: <20161028065412.23008-4-woogyom.kim@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161028065412.23008-1-woogyom.kim@gmail.com> References: <20161028065412.23008-1-woogyom.kim@gmail.com> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP H3 SPI has same architecture as A31 except FIFO capacity. To configure the buffer size separately, compatible property should be different. Optional DMA specifiers and example are added. Acked-by: Maxime Ripard Cc: Mark Brown Cc: Rob Herring Cc: Chen-Yu Tsai Signed-off-by: Milo Kim Acked-by: Rob Herring --- .../devicetree/bindings/spi/spi-sun6i.txt | 25 ++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/spi/spi-sun6i.txt b/Documentation/devicetree/bindings/spi/spi-sun6i.txt index 21de73d..2ec99b8 100644 --- a/Documentation/devicetree/bindings/spi/spi-sun6i.txt +++ b/Documentation/devicetree/bindings/spi/spi-sun6i.txt @@ -1,7 +1,7 @@ -Allwinner A31 SPI controller +Allwinner A31/H3 SPI controller Required properties: -- compatible: Should be "allwinner,sun6i-a31-spi". +- compatible: Should be "allwinner,sun6i-a31-spi" or "allwinner,sun8i-h3-spi". - reg: Should contain register location and length. - interrupts: Should contain interrupt. - clocks: phandle to the clocks feeding the SPI controller. Two are @@ -12,6 +12,11 @@ Required properties: - resets: phandle to the reset controller asserting this device in reset +Optional properties: +- dmas: DMA specifiers for rx and tx dma. See the DMA client binding, + Documentation/devicetree/bindings/dma/dma.txt +- dma-names: DMA request names should include "rx" and "tx" if present. + Example: spi1: spi@01c69000 { @@ -22,3 +27,19 @@ spi1: spi@01c69000 { clock-names = "ahb", "mod"; resets = <&ahb1_rst 21>; }; + +spi0: spi@01c68000 { + compatible = "allwinner,sun8i-h3-spi"; + reg = <0x01c68000 0x1000>; + interrupts = ; + clocks = <&ccu CLK_BUS_SPI0>, <&ccu CLK_SPI0>; + clock-names = "ahb", "mod"; + dmas = <&dma 23>, <&dma 23>; + dma-names = "rx", "tx"; + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins>; + resets = <&ccu RST_BUS_SPI0>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; +};