Skip to contentSkip to conversation

MIPS: ralink: mt7628a.dtsi: Add SPDX GPL-2.0 license identifier

PATCH Applied Stefan Roese 3 participants 23 messages May 27, 2019 – Jun 29, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/8 MIPS: ralink: mt7628a.dtsi: Add SPDX GPL-2.0 license identifier

As done in commit b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license"), this patch adds the SPDX license identifier to mt7628a.dtsi, which is currently still missing this identifier.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

---
v2:
- Use Harvey's new email address (not at imgtec)
- Use correct linux-mips list address

 arch/mips/boot/dts/ralink/mt7628a.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/mips/boot/dts/ralink/mt7628a.dtsi +2 -0
index 9ff7e8faaecc..3e88c8d496e4 100644
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: GPL-2.0
+
 / {
 	#address-cells = <1>;
 	#size-cells = <1>;
Signature · 1 line
2.21.0
#1 lore raw

PATCH v2 2/8 MIPS: ralink: mt7628a.dtsi: Add pinmux DT node

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.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

---
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(-)
arch/mips/boot/dts/ralink/mt7628a.dtsi +94 -1
index 3e88c8d496e4..d87f53bd6d72 100644
@@ -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 {
Signature · 1 line
2.21.0
Applied
#2 lore raw

Re: [PATCH 2/8 v2] MIPS: ralink: mt7628a.dtsi: Add pinmux DT node

Hello,

Quoted 10 lines · Stefan Roese

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.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

Applied to mips-next.

Thanks,
Paul

[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]

#3 lore raw

PATCH v2 3/8 MIPS: ralink: mt7628a.dtsi: Add pinctrl DT properties to the UART nodes

In reply to Stefan Roese

Now that pinmux is available, let's use it for the UART DT nodes.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

---
v2:
- Use Harvey's new email address (not at imgtec)
- Use correct linux-mips list address

 arch/mips/boot/dts/ralink/mt7628a.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/mips/boot/dts/ralink/mt7628a.dtsi +9 -0
index d87f53bd6d72..a239a2405670 100644
@@ -161,6 +161,9 @@
 			compatible = "ns16550a";
 			reg = <0xc00 0x100>;
 
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinmux_uart0_uart>;
+
 			resets = <&resetc 12>;
 			reset-names = "uart0";
 
@@ -174,6 +177,9 @@
 			compatible = "ns16550a";
 			reg = <0xd00 0x100>;
 
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinmux_uart1_uart>;
+
 			resets = <&resetc 19>;
 			reset-names = "uart1";
 
@@ -187,6 +193,9 @@
 			compatible = "ns16550a";
 			reg = <0xe00 0x100>;
 
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinmux_uart2_uart>;
+
 			resets = <&resetc 20>;
 			reset-names = "uart2";
 
Signature · 1 line
2.21.0
Applied
#4 lore raw

Re: [PATCH 3/8 v2] MIPS: ralink: mt7628a.dtsi: Add pinctrl DT properties to the UART nodes

Hello,

Quoted 6 lines · Stefan Roese

Now that pinmux is available, let's use it for the UART DT nodes.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

Applied to mips-next.

Thanks,
Paul

[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]

#5 lore raw

PATCH v2 4/8 MIPS: ralink: mt7628a.dtsi: Add GPIO controller DT node

In reply to Stefan Roese

This patch adds the GPIO controller description to the MT7628A dtsi file.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

---
v2:
- Use Harvey's new email address (not at imgtec)
- Use correct linux-mips list address

 arch/mips/boot/dts/ralink/mt7628a.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/mips/boot/dts/ralink/mt7628a.dtsi +13 -0
index a239a2405670..0c2983c9c47c 100644
@@ -157,6 +157,19 @@
 			reg = <0x300 0x100>;
 		};
 
+		gpio: gpio@600 {
+			compatible = "mediatek,mt7621-gpio";
+			reg = <0x600 0x100>;
+
+			gpio-controller;
+			interrupt-controller;
+			#gpio-cells = <2>;
+			#interrupt-cells = <2>;
+
+			interrupt-parent = <&intc>;
+			interrupts = <6>;
+		};
+
 		uart0: uartlite@c00 {
 			compatible = "ns16550a";
 			reg = <0xc00 0x100>;
Signature · 1 line
2.21.0
Applied
#6 lore raw

Re: [PATCH 4/8 v2] MIPS: ralink: mt7628a.dtsi: Add GPIO controller DT node

Hello,

Quoted 6 lines · Stefan Roese

This patch adds the GPIO controller description to the MT7628A dtsi file.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

Applied to mips-next.

Thanks,
Paul

[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]

#7 lore raw

PATCH v2 5/8 MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node

In reply to Stefan Roese

This patch adds the I2C controller description to the MT7628A dtsi file.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

---
v2:
- Use Harvey's new email address (not at imgtec)
- Use correct linux-mips list address

 arch/mips/boot/dts/ralink/mt7628a.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/mips/boot/dts/ralink/mt7628a.dtsi +16 -0
index 0c2983c9c47c..64a425c7d639 100644
@@ -170,6 +170,22 @@
 			interrupts = <6>;
 		};
 
+		i2c: i2c@900 {
+			compatible = "mediatek,mt7621-i2c";
+			reg = <0x900 0x100>;
+
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinmux_i2c_i2c>;
+
+			resets = <&resetc 16>;
+			reset-names = "i2c";
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			status = "disabled";
+		};
+
 		uart0: uartlite@c00 {
 			compatible = "ns16550a";
 			reg = <0xc00 0x100>;
Signature · 1 line
2.21.0
#8 lore raw

Re: [PATCH 5/8 v2] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node

Hi Stefan,

arch/mips/boot/dts/ralink/mt7628a.dtsi line 175

Quoted 11 lines · Stefan Roese
arch/mips/boot/dts/ralink/mt7628a.dtsi +3 -0
index 0c2983c9c47c..64a425c7d639 100644
@@ -170,6 +170,22 @@
 			interrupts = <6>;
 		};
 
+		i2c: i2c@900 {
+			compatible = "mediatek,mt7621-i2c";
+			reg = <0x900 0x100>;

I don't see this compatible string listed under Documentation/devicetree/bindings, nor in drivers/i2c/busses/i2c-mt65xx.c which I presume is the driver that would handle it.

I guess this needs driver changes to be applied before it'll actually do anything?

I'd prefer that at least the DT binding documentation goes in before we add the nodes to the DT.

If those changes are already queued up somewhere else could you point me at them?

Thanks,
Paul

#9 lore raw

Re: [PATCH 5/8 v2] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node

Hi Paul,

Quoted 11 lines · Paul Burton

Hi Stefan,

Quoted 8 lines · Stefan Roese
arch/mips/boot/dts/ralink/mt7628a.dtsi +0 -0
index 0c2983c9c47c..64a425c7d639 100644
@@ -170,6 +170,22 @@
  			interrupts = <6>;
  		};
 
Quoted 8 lines

arch/mips/boot/dts/ralink/mt7628a.dtsi line 175

Quoted 3 lines
arch/mips/boot/dts/ralink/mt7628a.dtsi +3 -0
+		i2c: i2c@900 {
+			compatible = "mediatek,mt7621-i2c";
+			reg = <0x900 0x100>;

I don't see this compatible string listed under Documentation/devicetree/bindings, nor in drivers/i2c/busses/i2c-mt65xx.c which I presume is the driver that would handle it.

No, these is a different driver queued for this (old) SoC. I've submitted it on the I2C list and am pretty hopeful, that it will hit next shortly:

https://patchwork.ozlabs.org/patch/1095794/

The bindings are included in this patch.

Quoted 2 lines

I guess this needs driver changes to be applied before it'll actually do anything?

Correct.

Quoted 2 lines

I'd prefer that at least the DT binding documentation goes in before we add the nodes to the DT.

I understand. I've added Wolfram to Cc to perhaps comment on this.

Quoted 2 lines

If those changes are already queued up somewhere else could you point me at them?

Please see above.

Thanks,
Stefan

#10 lore raw

Re: [PATCH 5/8 v2] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node

Hi Stefan,

Quoted 28 lines · Stefan Roese
Quoted 16 lines · Paul Burton

arch/mips/boot/dts/ralink/mt7628a.dtsi line 174

Quoted 10 lines · Stefan Roese
arch/mips/boot/dts/ralink/mt7628a.dtsi +3 -0
index 0c2983c9c47c..64a425c7d639 100644
@@ -170,6 +170,22 @@
  			interrupts = <6>;
  		};
+		i2c: i2c@900 {
+			compatible = "mediatek,mt7621-i2c";
+			reg = <0x900 0x100>;

I don't see this compatible string listed under Documentation/devicetree/bindings, nor in drivers/i2c/busses/i2c-mt65xx.c which I presume is the driver that would handle it.

No, these is a different driver queued for this (old) SoC. I've submitted it on the I2C list and am pretty hopeful, that it will hit next shortly:

https://patchwork.ozlabs.org/patch/1095794/

The bindings are included in this patch.

Quoted 2 lines

I guess this needs driver changes to be applied before it'll actually do anything?

Correct.

Quoted 8 lines
Quoted 2 lines

I'd prefer that at least the DT binding documentation goes in before we add the nodes to the DT.

I understand. I've added Wolfram to Cc to perhaps comment on this.

Quoted 2 lines

If those changes are already queued up somewhere else could you point me at them?

Please see above.

OK, I don't see the driver queued up yet so in the meantime I've applied patches 1-4 & 6-7. If you could ping me or resend this one once the I2C binding is in-tree, that would be wonderful.

Thanks,
Paul

#11 lore raw

Re: [PATCH 5/8 v2] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node

Quoted 4 lines

OK, I don't see the driver queued up yet so in the meantime I've applied patches 1-4 & 6-7. If you could ping me or resend this one once the I2C binding is in-tree, that would be wonderful.

I was waiting for Rob's ack for the driver, but with the merge window coming, I will apply it tomorrow. The bindings are simple enough.

#12 lore raw

Re: [PATCH 5/8 v2] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node

Hi Paul,

Quoted 7 lines · Wolfram Sang
Quoted 4 lines

OK, I don't see the driver queued up yet so in the meantime I've applied patches 1-4 & 6-7. If you could ping me or resend this one once the I2C binding is in-tree, that would be wonderful.

I was waiting for Rob's ack for the driver, but with the merge window coming, I will apply it tomorrow. The bindings are simple enough.

The I2C driver is now available in linux-next. Could you please push this patch too?

Thanks,
Stefan

#13 lore raw

PATCH v2 6/8 MIPS: ralink: mt7628a.dtsi: Add SPI controller DT node

In reply to Stefan Roese

This patch adds the SPI controller description to the MT7628A dtsi file.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

---
v2:
- Use Harvey's new email address (not at imgtec)
- Use correct linux-mips list address

 arch/mips/boot/dts/ralink/mt7628a.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/mips/boot/dts/ralink/mt7628a.dtsi +16 -0
index 64a425c7d639..0895ae62782a 100644
@@ -186,6 +186,22 @@
 			status = "disabled";
 		};
 
+		spi: spi@b00 {
+			compatible = "ralink,mt7621-spi";
+			reg = <0xb00 0x100>;
+
+			pinctrl-names = "default";
+			pinctrl-0 = <&pinmux_spi_spi>;
+
+			resets = <&resetc 18>;
+			reset-names = "spi";
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			status = "disabled";
+		};
+
 		uart0: uartlite@c00 {
 			compatible = "ns16550a";
 			reg = <0xc00 0x100>;
Signature · 1 line
2.21.0
#14 lore raw

Re: [PATCH 6/8 v2] MIPS: ralink: mt7628a.dtsi: Add SPI controller DT node

Hi Stefan,

arch/mips/boot/dts/ralink/mt7628a.dtsi line 191

Quoted 11 lines · Stefan Roese
arch/mips/boot/dts/ralink/mt7628a.dtsi +3 -0
index 64a425c7d639..0895ae62782a 100644
@@ -186,6 +186,22 @@
 			status = "disabled";
 		};
 
+		spi: spi@b00 {
+			compatible = "ralink,mt7621-spi";
+			reg = <0xb00 0x100>;

Same here as for the I2C controller - I don't see this compatible string documented.

Thanks,
Paul

#15 lore raw

Re: [PATCH 6/8 v2] MIPS: ralink: mt7628a.dtsi: Add SPI controller DT node

Hi Paul,

Quoted 11 lines · Paul Burton

Hi Stefan,

Quoted 8 lines · Stefan Roese
arch/mips/boot/dts/ralink/mt7628a.dtsi +0 -0
index 64a425c7d639..0895ae62782a 100644
@@ -186,6 +186,22 @@
  			status = "disabled";
  		};
 
Quoted 6 lines

arch/mips/boot/dts/ralink/mt7628a.dtsi line 191

Quoted 3 lines
arch/mips/boot/dts/ralink/mt7628a.dtsi +3 -0
+		spi: spi@b00 {
+			compatible = "ralink,mt7621-spi";
+			reg = <0xb00 0x100>;

Same here as for the I2C controller - I don't see this compatible string documented.

This one is already in mainline (version > v5.2-rc1):

Documentation/devicetree/bindings/spi/spi-mt7621.txt

I've pushed this driver from staging into drivers/spi after doing some cleanup and fixes.

Thanks,
Stefan

Applied
#16 lore raw

Re: [PATCH 6/8 v2] MIPS: ralink: mt7628a.dtsi: Add SPI controller DT node

In reply to Stefan Roese

Hello,

Quoted 6 lines · Stefan Roese

This patch adds the SPI controller description to the MT7628A dtsi file.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

Applied to mips-next.

Thanks,
Paul

[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]

#17 lore raw

PATCH v2 7/8 MIPS: ralink: mt7628a.dtsi: Add watchdog controller DT node

In reply to Stefan Roese

This patch adds the watchdog controller description to the MT7628A dtsi file.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

---
v2:
- Use Harvey's new email address (not at imgtec)
- Use correct linux-mips list address

 arch/mips/boot/dts/ralink/mt7628a.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/mips/boot/dts/ralink/mt7628a.dtsi +13 -0
index 0895ae62782a..2f601b9e6e52 100644
@@ -134,6 +134,19 @@
 			};
 		};
 
+		watchdog: watchdog@100 {
+			compatible = "mediatek,mt7621-wdt";
+			reg = <0x100 0x30>;
+
+			resets = <&resetc 8>;
+			reset-names = "wdt";
+
+			interrupt-parent = <&intc>;
+			interrupts = <24>;
+
+			status = "disabled";
+		};
+
 		intc: interrupt-controller@200 {
 			compatible = "ralink,rt2880-intc";
 			reg = <0x200 0x100>;
Signature · 1 line
2.21.0
Applied
#18 lore raw

Re: [PATCH 7/8 v2] MIPS: ralink: mt7628a.dtsi: Add watchdog controller DT node

Hello,

Quoted 7 lines · Stefan Roese

This patch adds the watchdog controller description to the MT7628A dtsi file.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

Applied to mips-next.

Thanks,
Paul

[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]

#19 lore raw

PATCH v2 8/8 MIPS: ralink: Add GARDENA smart Gateway MT7688 board

In reply to Stefan Roese

This patch adds support for the GARDENA smart Gateway, which is based on the MediaTek MT7688 SoC. It is equipped with 128 MiB of DDR and 8 MiB of flash (SPI NOR) and additional 128MiB SPI NAND storage.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

---
v2:
- Use Harvey's new email address (not at imgtec)
- Use correct linux-mips list address

 .../ralink/gardena_smart_gateway_mt7688.dts   | 196 ++++++++++++++++++
 1 file changed, 196 insertions(+)
 create mode 100644 arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts
arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts new file +196 -0
new file mode 100644
index 000000000000..f13d1e45ebbb
@@ -0,0 +1,196 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 Stefan Roese <[email protected]>
+ */
+
+/dts-v1/;
+
+/include/ "mt7628a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "Gardena,smartGatewayMT7688", "ralink,mt7628a-soc";
+	model = "GARDENA smart Gateway (MT7688)";
+
+	memory@0 {
+		device_type = "memory";
+		reg = <0x0 0x8000000>;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinmux_gpio_gpio>;	/* GPIO11 */
+
+		user_btn1 {
+			label = "USER_BTN1";
+			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+			linux,code =<KEY_PROG1> ;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinmux_pwm0_gpio>,	/* GPIO18 */
+			    <&pinmux_pwm1_gpio>,	/* GPIO19 */
+			    <&pinmux_sdmode_gpio>,	/* GPIO22..29 */
+			    <&pinmux_p0led_an_gpio>;	/* GPIO43 */
+		/*
+		 * <&pinmux_i2s_gpio> (covers GPIO0..3) is needed here as
+		 * well for GPIO3. But this is already claimed for uart1
+		 * (see below). So we can't include it in this LED node.
+		 */
+
+		power_blue {
+			label = "smartgw:power:blue";
+			gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		power_green {
+			label = "smartgw:power:green";
+			gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		power_red {
+			label = "smartgw:power:red";
+			gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		radio_blue {
+			label = "smartgw:radio:blue";
+			gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		radio_green {
+			label = "smartgw:radio:green";
+			gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		radio_red {
+			label = "smartgw:radio:red";
+			gpios = <&gpio 25 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		internet_blue {
+			label = "smartgw:internet:blue";
+			gpios = <&gpio 26 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		internet_green {
+			label = "smartgw:internet:green";
+			gpios = <&gpio 27 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		internet_red {
+			label = "smartgw:internet:red";
+			gpios = <&gpio 28 GPIO_ACTIVE_HIGH>;
+			default-state = "off";
+		};
+
+		ethernet_link {
+			label = "smartgw:eth:link";
+			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "netdev";
+		};
+
+		ethernet_activity {
+			label = "smartgw:eth:act";
+			gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "netdev";
+		};
+	};
+
+	aliases {
+		serial0 = &uart0;
+	};
+};
+
+&i2c {
+	status = "okay";
+};
+
+&spi {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinmux_spi_spi>, <&pinmux_spi_cs1_cs>;
+
+	m25p80@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <40000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition@0 {
+				label = "uboot";
+				reg = <0x0 0xa0000>;
+				read-only;
+			};
+
+			partition@a0000 {
+				label = "uboot_env0";
+				reg = <0xa0000 0x10000>;
+			};
+
+			partition@b0000 {
+				label = "uboot_env1";
+				reg = <0xb0000 0x10000>;
+			};
+
+			factory: partition@c0000 {
+				label = "factory";
+				reg = <0xc0000 0x10000>;
+				read-only;
+			};
+		};
+	};
+
+	nand_flash@1 {
+		compatible = "spi-nand";
+		linux,mtd-name = "gd5f";
+		reg = <1>;
+		spi-max-frequency = <40000000>;
+	};
+};
+
+&uart1 {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinmux_i2s_gpio>;		/* GPIO0..3 */
+
+	rts-gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+	cts-gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+};
+
+&uart2 {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinmux_p2led_an_gpio>,	/* GPIO41 */
+		    <&pinmux_p3led_an_gpio>;	/* GPIO40 */
+
+	rts-gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+	cts-gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+};
+
+&watchdog {
+	status = "okay";
+};
Signature · 1 line
2.21.0
#20 lore raw

Re: [PATCH 8/8 v2] MIPS: ralink: Add GARDENA smart Gateway MT7688 board

Hi Stefan,

Quoted 8 lines · Stefan Roese

This patch adds support for the GARDENA smart Gateway, which is based on the MediaTek MT7688 SoC. It is equipped with 128 MiB of DDR and 8 MiB of flash (SPI NOR) and additional 128MiB SPI NAND storage.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>
Quoted 8 lines

---
v2:
- Use Harvey's new email address (not at imgtec)
- Use correct linux-mips list address

 .../ralink/gardena_smart_gateway_mt7688.dts   | 196 ++++++++++++++++++
 1 file changed, 196 insertions(+)
 create mode 100644 arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts

Thanks for the patch - this one sees checkpatch complain about the Gardena DT vendor prefix being undocumented, as well as the board compatible string:

WARNING: DT compatible string "Gardena,smartGatewayMT7688" appears un-documented -- check ./Documentation/devicetree/bindings/ #40: FILE: arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts:14:
+ compatible = "Gardena,smartGatewayMT7688", "ralink,mt7628a-soc";

WARNING: DT compatible string vendor "Gardena" appears un-documented -- check ./Documentation/devicetree/bindings/vendor-prefixes.yaml #40: FILE: arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts:14:
+ compatible = "Gardena,smartGatewayMT7688", "ralink,mt7628a-soc";

Could you add the entry to Documentation/devicetree/bindings/vendor-prefixes.yaml & a short description of the board somewhere like Documentation/devicetree/bindings/mips/ralink/gardena.txt?

Thanks,
Paul

#21 lore raw

Re: [PATCH 8/8 v2] MIPS: ralink: Add GARDENA smart Gateway MT7688 board

Hi Paul,

Quoted 26 lines · Paul Burton
Quoted 8 lines · Stefan Roese

This patch adds support for the GARDENA smart Gateway, which is based on the MediaTek MT7688 SoC. It is equipped with 128 MiB of DDR and 8 MiB of flash (SPI NOR) and additional 128MiB SPI NAND storage.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>
Quoted 8 lines

---
v2:
- Use Harvey's new email address (not at imgtec)
- Use correct linux-mips list address

  .../ralink/gardena_smart_gateway_mt7688.dts   | 196 ++++++++++++++++++
  1 file changed, 196 insertions(+)

create mode 100644 arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts

Thanks for the patch - this one sees checkpatch complain about the Gardena DT vendor prefix being undocumented, as well as the board compatible string:

WARNING: DT compatible string "Gardena,smartGatewayMT7688" appears un-documented -- check ./Documentation/devicetree/bindings/ #40: FILE: arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts:14:
+ compatible = "Gardena,smartGatewayMT7688", "ralink,mt7628a-soc";

Quoted 8 lines

WARNING: DT compatible string vendor "Gardena" appears un-documented -- check ./Documentation/devicetree/bindings/vendor-prefixes.yaml #40: FILE: arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts:14:
+ compatible = "Gardena,smartGatewayMT7688", "ralink,mt7628a-soc";

Could you add the entry to Documentation/devicetree/bindings/vendor-prefixes.yaml & a short description of the board somewhere like Documentation/devicetree/bindings/mips/ralink/gardena.txt?

Sure, I'll send a new version of this patch with these additions.

Thanks,
Stefan

Applied
#22 lore raw
In reply to Stefan Roese

Hello,

Quoted 9 lines · Stefan Roese

As done in commit b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifier to files with no license"), this patch adds the SPDX license identifier to mt7628a.dtsi, which is currently still missing this identifier.

Cc Paul Burton <[email protected]>
Cc Harvey Hunt <[email protected]>
Cc John Crispin <[email protected]>

Applied to mips-next.

Thanks,
Paul

[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]