From patchwork Wed Mar 4 16:40:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sperl X-Patchwork-Id: 5938711 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0DD4FBF440 for ; Wed, 4 Mar 2015 17:40:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2543320272 for ; Wed, 4 Mar 2015 17:40:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DB17B202DD for ; Wed, 4 Mar 2015 17:40:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932589AbbCDRkj (ORCPT ); Wed, 4 Mar 2015 12:40:39 -0500 Received: from 212-186-180-163.dynamic.surfer.at ([212.186.180.163]:54971 "EHLO cgate.sperl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932828AbbCDRkj (ORCPT ); Wed, 4 Mar 2015 12:40:39 -0500 Received: from raspb.intern.sperl.org (account martin@sperl.org [10.10.10.32] verified) by sperl.org (CommuniGate Pro SMTP 6.0.10) with ESMTPSA id 6280844; Wed, 04 Mar 2015 16:36:48 +0000 From: kernel@martin.sperl.org To: linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@vger.kernel.org, swarren@wwwdotorg.org Cc: Martin Sperl Subject: [PATCH 2/2] dt/bindings: control CS via standard GPIO operations instead of SPI-HW Date: Wed, 4 Mar 2015 16:40:04 +0000 Message-Id: <1425487205-5477-2-git-send-email-kernel@martin.sperl.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1425487205-5477-1-git-send-email-kernel@martin.sperl.org> References: <1425487205-5477-1-git-send-email-kernel@martin.sperl.org> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Martin Sperl Change the device tree to use cs-gpios for the spi bus master and standard gpio operation instead of relying on the HW with just 2 chip_selects using ALT0. This reassigns the existing CS pins 7(=CS1) and 8(=CS0) as output instead of ALT0 (=SPI HW block controlled) and adds them in the list of cs-gpios for the spi-bus. Signed-off-by: Martin Sperl --- arch/arm/boot/dts/bcm2835-rpi.dtsi | 4 ++-- arch/arm/boot/dts/bcm2835.dtsi | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi index c706448..f0e36ab 100644 --- a/arch/arm/boot/dts/bcm2835-rpi.dtsi +++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi @@ -20,12 +20,12 @@ pinctrl-names = "default"; gpioout: gpioout { - brcm,pins = <6>; + brcm,pins = <6 7 8>; brcm,function = <1>; /* GPIO out */ }; alt0: alt0 { - brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 14 15 40 45>; + brcm,pins = <0 1 2 3 4 5 9 10 11 14 15 40 45>; brcm,function = <4>; /* alt0 */ }; diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi index 3342cb1..74d08e1 100644 --- a/arch/arm/boot/dts/bcm2835.dtsi +++ b/arch/arm/boot/dts/bcm2835.dtsi @@ -110,6 +110,7 @@ #address-cells = <1>; #size-cells = <0>; status = "disabled"; + cs-gpios = <&gpio 8 0>, <&gpio 7 0>; }; i2c0: i2c@20205000 {