linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: tsbogend@alpha.franken.de
Cc: linux-mips@vger.kernel.org, devicetree@vger.kernel.org,
	robh+dt@kernel.org, james.hartley@sondrel.com,
	rahulbedarkar89@gmail.com, wigyori@uid0.hu,
	Hauke Mehrtens <hauke@hauke-m.de>
Subject: [PATCH 3/3] MIPS: DTS: img: marduk: Add NXP SC16IS752IPW
Date: Sat, 15 Aug 2020 18:35:14 +0200	[thread overview]
Message-ID: <20200815163514.11631-3-hauke@hauke-m.de> (raw)
In-Reply-To: <20200815163514.11631-1-hauke@hauke-m.de>

Add NXP SC16IS752IPW SPI-UART controller to device tree.

This controller drives 2 UARTs and 7 LEDs on the board.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 arch/mips/boot/dts/img/pistachio_marduk.dts | 51 +++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/arch/mips/boot/dts/img/pistachio_marduk.dts b/arch/mips/boot/dts/img/pistachio_marduk.dts
index 633a41954cc0..f4965a484b72 100644
--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
@@ -46,6 +46,46 @@
 		regulator-max-microvolt = <1800000>;
 	};
 
+	/* EXT clock from ca8210 is fed to sc16is752 */
+	ca8210_ext_clk: ca8210-ext-clk {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <16000000>;
+		clock-output-names = "ca8210_ext_clock";
+	};
+
+	gpioleds {
+		compatible = "gpio-leds";
+		user1 {
+			label = "marduk:red:user1";
+			gpios = <&sc16is752 0 GPIO_ACTIVE_LOW>;
+		};
+		user2 {
+			label = "marduk:red:user2";
+			gpios = <&sc16is752 1 GPIO_ACTIVE_LOW>;
+		};
+		user3 {
+			label = "marduk:red:user3";
+			gpios = <&sc16is752 2 GPIO_ACTIVE_LOW>;
+		};
+		user4 {
+			label = "marduk:red:user4";
+			gpios = <&sc16is752 3 GPIO_ACTIVE_LOW>;
+		};
+		user5 {
+			label = "marduk:red:user5";
+			gpios = <&sc16is752 4 GPIO_ACTIVE_LOW>;
+		};
+		user6 {
+			label = "marduk:red:user6";
+			gpios = <&sc16is752 5 GPIO_ACTIVE_LOW>;
+		};
+		user7 {
+			label = "marduk:red:user7";
+			gpios = <&sc16is752 6 GPIO_ACTIVE_LOW>;
+		};
+	};
+
 	leds {
 		compatible = "pwm-leds";
 		heartbeat {
@@ -95,6 +135,17 @@
 		extclock-freq = <16000000>;
 		extclock-gpio = <2>;
 	};
+
+	sc16is752: sc16is752@1 {
+		compatible = "nxp,sc16is752";
+		reg = <1>;
+		clocks = <&ca8210_ext_clk>;
+		spi-max-frequency = <4000000>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
+		gpio-controller;
+		#gpio-cells = <2>;
+	};
 };
 
 &spfi1 {
-- 
2.20.1


  parent reply	other threads:[~2020-08-15 22:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-15 16:35 [PATCH 1/3] MIPS: DTS: img: marduk: Add SPI NAND flash Hauke Mehrtens
2020-08-15 16:35 ` [PATCH 2/3] MIPS: DTS: img: marduk: Add Cascoda CA8210 6LoWPAN Hauke Mehrtens
2020-08-16  9:14   ` Sergei Shtylyov
2020-08-16 10:59     ` Hauke Mehrtens
2020-08-16 17:06       ` Sergei Shtylyov
2020-08-15 16:35 ` Hauke Mehrtens [this message]
2020-09-12  6:46   ` [PATCH 3/3] MIPS: DTS: img: marduk: Add NXP SC16IS752IPW Zhou Yanjie
2020-09-03 20:40 ` [PATCH 1/3] MIPS: DTS: img: marduk: Add SPI NAND flash Rahul Bedarkar

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=20200815163514.11631-3-hauke@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=devicetree@vger.kernel.org \
    --cc=james.hartley@sondrel.com \
    --cc=linux-mips@vger.kernel.org \
    --cc=rahulbedarkar89@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=wigyori@uid0.hu \
    /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;
as well as URLs for NNTP newsgroup(s).