From patchwork Wed Oct 19 14:02:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milo Kim X-Patchwork-Id: 9384089 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 268F1600CA for ; Wed, 19 Oct 2016 14:21:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 181D8294E7 for ; Wed, 19 Oct 2016 14:21:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C52329A29; Wed, 19 Oct 2016 14:21:47 +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=ham 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 E4282296E4 for ; Wed, 19 Oct 2016 14:21:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941773AbcJSOVh (ORCPT ); Wed, 19 Oct 2016 10:21:37 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36830 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941142AbcJSOVe (ORCPT ); Wed, 19 Oct 2016 10:21:34 -0400 Received: by mail-pf0-f194.google.com with SMTP id r16so2618127pfg.3; Wed, 19 Oct 2016 07:21:34 -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=qMsOQF5pZmAxOTzbv5Ltjt5X/sdIjJjkwuQs4qvHgUY=; b=1IdkehPgWaLNsjGhLtGuA+lO4dGL/Pm35AW1BuaqDdkUJcP9qXArvCqDRX74w1m+qN mThG2cOYXCv15Yt7AyMdmeAq9ZXAQA9T4oTpt5zlS7+GnVbTVHyepYZoXqOYoPxJfOn/ z+LSSpks/xeFID5OHwcfKB0XndczseyKXz9n34vAo0ZLXF7RRfsTwGhKDMNlAE8CeeNB bZna6iylxdRRtQq5qiKaZCdau9R2xaLs0rn0+JVEobOL59zsXgKjCMtxdN6bl360IlVj D4wlhmVZaaA0yGuw2o9PKZVfKoCmXNlzZFePHPkJ3xM3Y4DCG9BCxy0XFeSac8q9yoxR TnMA== 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=qMsOQF5pZmAxOTzbv5Ltjt5X/sdIjJjkwuQs4qvHgUY=; b=c7jKSEoedzBuKL3GbCj4kTYQRwg9SZ9LV5eMuzzdy6CKZ64cfuUMNYCFetXQq+670f TIlgV1uF8q6MWzMYLGSeOXxCx+qOBfI/byZCyDmSo12IRb2aSU79iezJukNy1a8ygC+H /PGOoSY8xpMt3RFdGk7mmTJ9WAStzrCK3L/UuGzPvWsJBPuw02UoCgd0eEkhFMQWiFjy q1tQtew9QUFd+vlvbdLX8IUtuJyh6t725gnuG9hnUtZt9T/igCKwobBervWfFXtOMMDX FCMCsuR58jlczKZMx7vsvZxnUZ+h/5u6u1Xa/bSrrzSzcV4jcr0PiuscqshMMIkEImvB 7zQA== X-Gm-Message-State: AA6/9RmpV2YoMXANMywqij5BKAMgGzT+XYXpGRtygg+pHru1P2wTiPT00Y9tEtsYMWbU2w== X-Received: by 10.98.57.84 with SMTP id g81mr11468457pfa.115.1476885807398; Wed, 19 Oct 2016 07:03:27 -0700 (PDT) Received: from milo-dev.kornet ([121.136.232.72]) by smtp.gmail.com with ESMTPSA id e74sm63462700pfk.13.2016.10.19.07.03.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Oct 2016 07:03:26 -0700 (PDT) From: Milo Kim To: Mark Brown , Maxime Ripard , Chen-Yu Tsai Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Milo Kim , Rob Herring Subject: [PATCH 1/3] spi: sun6i: Add binding for Allwinner H3 SPI controller Date: Wed, 19 Oct 2016 23:02:32 +0900 Message-Id: <20161019140234.13518-2-woogyom.kim@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161019140234.13518-1-woogyom.kim@gmail.com> References: <20161019140234.13518-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. Cc: Mark Brown Cc: Rob Herring Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Milo Kim Acked-by: Maxime Ripard --- .../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>; +};