linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: linux-mips@vger.kernel.org
Cc: Paul Burton <paul.burton@mips.com>,
	Harvey Hunt <harveyhuntnexus@gmail.com>,
	John Crispin <john@phrozen.org>
Subject: [PATCH 2/8 v2] MIPS: ralink: mt7628a.dtsi: Add pinmux DT node
Date: Mon, 27 May 2019 11:13:17 +0200	[thread overview]
Message-ID: <20190527091323.4582-2-sr@denx.de> (raw)
In-Reply-To: <20190527091323.4582-1-sr@denx.de>

This patch adds the pinmux DT node using the generic "pinctrl-single"
pinmux driver. For this the system-controller register area needs to be
changed to not overlap with the pinmux registers.

This patch is based on work done by John Crispin.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Harvey Hunt <harveyhuntnexus@gmail.com>
Cc: John Crispin <john@phrozen.org>
---
v2:
- Use Harvey's new email address (not at imgtec)
- Use correct linux-mips list address

 arch/mips/boot/dts/ralink/mt7628a.dtsi | 95 +++++++++++++++++++++++++-
 1 file changed, 94 insertions(+), 1 deletion(-)

diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi
index 3e88c8d496e4..d87f53bd6d72 100644
--- a/arch/mips/boot/dts/ralink/mt7628a.dtsi
+++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi
@@ -38,7 +38,100 @@
 
 		sysc: system-controller@0 {
 			compatible = "ralink,mt7620a-sysc", "syscon";
-			reg = <0x0 0x100>;
+			reg = <0x0 0x60>;
+		};
+
+		pinmux: pinmux@60 {
+			compatible = "pinctrl-single";
+			reg = <0x60 0x8>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			#pinctrl-cells = <2>;
+			pinctrl-single,bit-per-mux;
+			pinctrl-single,register-width = <32>;
+			pinctrl-single,function-mask = <0x1>;
+
+			pinmux_gpio_gpio: pinmux_gpio_gpio {
+				pinctrl-single,bits = <0x0 0x0 0x3>;
+			};
+
+			pinmux_spi_cs1_cs: pinmux_spi_cs1_cs {
+				pinctrl-single,bits = <0x0 0x0 0x30>;
+			};
+
+			pinmux_i2s_gpio: pinmux_i2s_gpio {
+				pinctrl-single,bits = <0x0 0x40 0xc0>;
+			};
+
+			pinmux_uart0_uart: pinmux_uart0_uart0 {
+				pinctrl-single,bits = <0x0 0x0 0x300>;
+			};
+
+			pinmux_sdmode_sdxc: pinmux_sdmode_sdxc {
+				pinctrl-single,bits = <0x0 0x0 0xc00>;
+			};
+
+			pinmux_sdmode_gpio: pinmux_sdmode_gpio {
+				pinctrl-single,bits = <0x0 0x400 0xc00>;
+			};
+
+			pinmux_spi_spi: pinmux_spi_spi {
+				pinctrl-single,bits = <0x0 0x0 0x1000>;
+			};
+
+			pinmux_refclk_gpio: pinmux_refclk_gpio {
+				pinctrl-single,bits = <0x0 0x40000 0x40000>;
+			};
+
+			pinmux_i2c_i2c: pinmux_i2c_i2c {
+				pinctrl-single,bits = <0x0 0x0 0x300000>;
+			};
+
+			pinmux_uart1_uart: pinmux_uart1_uart1 {
+				pinctrl-single,bits = <0x0 0x0 0x3000000>;
+			};
+
+			pinmux_uart2_uart: pinmux_uart2_uart {
+				pinctrl-single,bits = <0x0 0x0 0xc000000>;
+			};
+
+			pinmux_pwm0_pwm: pinmux_pwm0_pwm {
+				pinctrl-single,bits = <0x0 0x0 0x30000000>;
+			};
+
+			pinmux_pwm0_gpio: pinmux_pwm0_gpio {
+				pinctrl-single,bits = <0x0 0x10000000
+						       0x30000000>;
+			};
+
+			pinmux_pwm1_pwm: pinmux_pwm1_pwm {
+				pinctrl-single,bits = <0x0 0x0 0xc0000000>;
+			};
+
+			pinmux_pwm1_gpio: pinmux_pwm1_gpio {
+				pinctrl-single,bits = <0x0 0x40000000
+						       0xc0000000>;
+			};
+
+			pinmux_p0led_an_gpio: pinmux_p0led_an_gpio {
+				pinctrl-single,bits = <0x4 0x4 0xc>;
+			};
+
+			pinmux_p1led_an_gpio: pinmux_p1led_an_gpio {
+				pinctrl-single,bits = <0x4 0x10 0x30>;
+			};
+
+			pinmux_p2led_an_gpio: pinmux_p2led_an_gpio {
+				pinctrl-single,bits = <0x4 0x40 0xc0>;
+			};
+
+			pinmux_p3led_an_gpio: pinmux_p3led_an_gpio {
+				pinctrl-single,bits = <0x4 0x100 0x300>;
+			};
+
+			pinmux_p4led_an_gpio: pinmux_p4led_an_gpio {
+				pinctrl-single,bits = <0x4 0x400 0xc00>;
+			};
 		};
 
 		intc: interrupt-controller@200 {
-- 
2.21.0


  reply	other threads:[~2019-05-27  9:13 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27  9:13 [PATCH 1/8 v2] MIPS: ralink: mt7628a.dtsi: Add SPDX GPL-2.0 license identifier Stefan Roese
2019-05-27  9:13 ` Stefan Roese [this message]
2019-06-24 21:16   ` [PATCH 2/8 v2] MIPS: ralink: mt7628a.dtsi: Add pinmux DT node Paul Burton
2019-05-27  9:13 ` [PATCH 3/8 v2] MIPS: ralink: mt7628a.dtsi: Add pinctrl DT properties to the UART nodes Stefan Roese
2019-06-24 21:16   ` Paul Burton
2019-05-27  9:13 ` [PATCH 4/8 v2] MIPS: ralink: mt7628a.dtsi: Add GPIO controller DT node Stefan Roese
2019-06-24 21:16   ` Paul Burton
2019-05-27  9:13 ` [PATCH 5/8 v2] MIPS: ralink: mt7628a.dtsi: Add I2C " Stefan Roese
2019-05-28 20:41   ` Paul Burton
2019-05-29  5:19     ` Stefan Roese
2019-06-24 21:24       ` Paul Burton
2019-06-24 22:07         ` Wolfram Sang
2019-06-29  9:07           ` Stefan Roese
2019-05-27  9:13 ` [PATCH 6/8 v2] MIPS: ralink: mt7628a.dtsi: Add SPI " Stefan Roese
2019-05-28 20:43   ` Paul Burton
2019-05-29  5:22     ` Stefan Roese
2019-06-24 21:16   ` Paul Burton
2019-05-27  9:13 ` [PATCH 7/8 v2] MIPS: ralink: mt7628a.dtsi: Add watchdog " Stefan Roese
2019-06-24 21:16   ` Paul Burton
2019-05-27  9:13 ` [PATCH 8/8 v2] MIPS: ralink: Add GARDENA smart Gateway MT7688 board Stefan Roese
2019-06-24 21:30   ` Paul Burton
2019-06-25  5:31     ` Stefan Roese
2019-06-24 21:16 ` [PATCH 1/8 v2] MIPS: ralink: mt7628a.dtsi: Add SPDX GPL-2.0 license identifier Paul Burton

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=20190527091323.4582-2-sr@denx.de \
    --to=sr@denx.de \
    --cc=harveyhuntnexus@gmail.com \
    --cc=john@phrozen.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=paul.burton@mips.com \
    /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).