All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org
To: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org
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	[thread overview]
Message-ID: <1425487205-5477-2-git-send-email-kernel@martin.sperl.org> (raw)
In-Reply-To: <1425487205-5477-1-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>

From: Martin Sperl <kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>

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 <kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>

---
 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 {
-- 
1.7.10.4

  parent reply	other threads:[~2015-03-04 16:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04 16:40 [PATCH 1/2] SPI: control CS via standard GPIO operations instead of SPI-HW kernel-TqfNSX0MhmxHKSADF0wUEw
     [not found] ` <1425487205-5477-1-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2015-03-04 16:40   ` kernel-TqfNSX0MhmxHKSADF0wUEw [this message]
     [not found]     ` <1425487205-5477-2-git-send-email-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2015-03-07  5:47       ` [PATCH 2/2] dt/bindings: " Stephen Warren
     [not found]         ` <54FA9109.6080102-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-03-11 15:21           ` Martin Sperl
     [not found]             ` <A8477522-2A97-4D1B-89EC-A70B5A28489F-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2015-03-17  3:18               ` Stephen Warren
     [not found]                 ` <55079CF1.4000102-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-03-17  7:12                   ` Martin Sperl
2015-03-17  8:03       ` Stefan Wahren
2015-03-04 17:01   ` [PATCH 1/2] SPI: " Marc Kleine-Budde
     [not found]     ` <54F73A60.9080403-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-03-04 17:38       ` Martin Sperl
2015-03-07  5:38   ` Stephen Warren
     [not found]     ` <54FA8EB8.9090102-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2015-03-07 10:50       ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425487205-5477-2-git-send-email-kernel@martin.sperl.org \
    --to=kernel-tqfnsx0mhmxhksadf0wuew@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arm-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.