From: Rabin Vincent <rabin@rab.in>
To: jesper.nilsson@axis.com
Cc: linux-kernel@vger.kernel.org, linux-cris-kernel@axis.com,
Rabin Vincent <rabin@rab.in>
Subject: [PATCH 3/6] CRIS v32: dev88: add GPIO, LEDs, RTC, temp sensor
Date: Mon, 3 Aug 2015 20:19:21 +0200 [thread overview]
Message-ID: <1438625964-22335-3-git-send-email-rabin@rab.in> (raw)
In-Reply-To: <1438625964-22335-1-git-send-email-rabin@rab.in>
Add the GPIO driver to the device tree and, using it, support for the
LEDs and the RTC chip (via I2C-GPIO), as well as the temperature sensor
(via SPI-GPIO).
Signed-off-by: Rabin Vincent <rabin@rab.in>
---
arch/cris/boot/dts/dev88.dts | 49 +++++++++++++++++++++++++++++++++++++++++
arch/cris/boot/dts/etraxfs.dtsi | 8 +++++++
2 files changed, 57 insertions(+)
diff --git a/arch/cris/boot/dts/dev88.dts b/arch/cris/boot/dts/dev88.dts
index 4fa5a3f..b9a230d 100644
--- a/arch/cris/boot/dts/dev88.dts
+++ b/arch/cris/boot/dts/dev88.dts
@@ -1,5 +1,7 @@
/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
+
/include/ "etraxfs.dtsi"
/ {
@@ -15,4 +17,51 @@
status = "okay";
};
};
+
+ spi {
+ compatible = "spi-gpio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ gpio-sck = <&gio 1 0 0xd>;
+ gpio-miso = <&gio 4 0 0xd>;
+ gpio-mosi = <&gio 0 0 0xd>;
+ cs-gpios = <&gio 3 0 0xd>;
+ num-chipselects = <1>;
+
+ temp-sensor@0 {
+ compatible = "ti,lm70";
+ reg = <0>;
+
+ spi-max-frequency = <100000>;
+ };
+ };
+
+ i2c {
+ compatible = "i2c-gpio";
+ gpios = <&gio 5 0 0xd>, <&gio 6 0 0xd>;
+ i2c-gpio,delay-us = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@51 {
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ network {
+ label = "network";
+ gpios = <&gio 2 GPIO_ACTIVE_LOW 0xa>;
+ };
+
+ status {
+ label = "status";
+ gpios = <&gio 3 GPIO_ACTIVE_LOW 0xa>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
};
diff --git a/arch/cris/boot/dts/etraxfs.dtsi b/arch/cris/boot/dts/etraxfs.dtsi
index 909bced..bf1b858 100644
--- a/arch/cris/boot/dts/etraxfs.dtsi
+++ b/arch/cris/boot/dts/etraxfs.dtsi
@@ -28,6 +28,14 @@
#interrupt-cells = <1>;
};
+ gio: gpio@b001a000 {
+ compatible = "axis,etraxfs-gio";
+ reg = <0xb001a000 0x1000>;
+ interrupts = <50>;
+ gpio-controller;
+ #gpio-cells = <3>;
+ };
+
serial@b00260000 {
compatible = "axis,etraxfs-uart";
reg = <0xb0026000 0x1000>;
--
2.1.4
next prev parent reply other threads:[~2015-08-03 18:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-03 18:19 [PATCH 1/6] CRIS v32: increase NR_IRQS Rabin Vincent
2015-08-03 18:19 ` [PATCH 2/6] CRIS: add dt-bindings symlink Rabin Vincent
2015-10-01 19:51 ` Jesper Nilsson
2015-08-03 18:19 ` Rabin Vincent [this message]
2015-10-01 19:52 ` [PATCH 3/6] CRIS v32: dev88: add GPIO, LEDs, RTC, temp sensor Jesper Nilsson
2015-08-03 18:19 ` [PATCH 4/6] CRIS v32: add ARTPEC-3 and P1343 device trees Rabin Vincent
2015-10-01 19:53 ` Jesper Nilsson
2015-08-03 18:19 ` [PATCH 5/6] CRIS v32: remove I2C bitbanging driver Rabin Vincent
2015-10-01 19:53 ` Jesper Nilsson
2015-08-03 18:19 ` [PATCH 6/6] CRIS v32: remove old GPIO and LEDs code Rabin Vincent
2015-10-01 19:53 ` Jesper Nilsson
2015-10-01 19:51 ` [PATCH 1/6] CRIS v32: increase NR_IRQS Jesper Nilsson
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=1438625964-22335-3-git-send-email-rabin@rab.in \
--to=rabin@rab.in \
--cc=jesper.nilsson@axis.com \
--cc=linux-cris-kernel@axis.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®