Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753413AbbF2NEz (ORCPT ); Mon, 29 Jun 2015 09:04:55 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:55248 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753249AbbF2NEs (ORCPT ); Mon, 29 Jun 2015 09:04:48 -0400 X-Listener-Flag: 11101 From: Leilk Liu To: Mark Brown CC: Mark Rutland , Matthias Brugger , Sascha Hauer , , , , , Subject: [PATCH v2 0/4] Add Mediatek SPI bus driver Date: Mon, 29 Jun 2015 21:04:26 +0800 Message-ID: <1435583070-9600-1-git-send-email-leilk.liu@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1556 Lines: 37 Mediatek SPI BUS controller has 3 hardware restrictions: 1. Hw has the restriction that in one transfer, length must be a multiple of 1024, when it's greater than 1024bytes. 2. Hw tx/rx have 4bytes aligned restriction. 3. For MT8173 IC: RX must enable TX, then TX transfer dummy data; TX don't need to enable RX. Some workarounds are done in SPI driver code base on v4.1-rc1. Change in v2: 1. Remove spi bitbang framwork, use can_dma() and transfer_one(). 2. Add PM functions. 3. Fix Mark Brown review comment. Leilk Liu (4): spi: support spi without dma channel to use can_dma() dt-bindings: ARM: Mediatek: Document devicetree bindings for spi bus spi: mediatek: Add spi bus for Mediatek MT8173 arm64: dts: Add spi bus dts .../devicetree/bindings/spi/spi-mt65xx.txt | 32 + arch/arm64/boot/dts/mediatek/mt8173.dtsi | 9 + drivers/spi/Kconfig | 9 + drivers/spi/Makefile | 1 + drivers/spi/spi-mt65xx.c | 656 +++++++++++++++++++++ drivers/spi/spi.c | 22 +- 6 files changed, 725 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/spi/spi-mt65xx.txt create mode 100644 drivers/spi/spi-mt65xx.c -- 1.8.1.1.dirty -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/