linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4 v4] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node
@ 2019-08-12 10:36 Stefan Roese
  2019-08-12 10:36 ` [PATCH 2/4 v4] dt-bindings: mips: Add missing mt7688a-soc compatible Stefan Roese
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Stefan Roese @ 2019-08-12 10:36 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton, Harvey Hunt, John Crispin

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

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>
---
v4:
- No change

v3:
- No change (I2C controller driver is now available in mainline)

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(+)

diff --git a/arch/mips/boot/dts/ralink/mt7628a.dtsi b/arch/mips/boot/dts/ralink/mt7628a.dtsi
index 61f8621e88b3..742bcc1dc2e0 100644
--- a/arch/mips/boot/dts/ralink/mt7628a.dtsi
+++ b/arch/mips/boot/dts/ralink/mt7628a.dtsi
@@ -199,6 +199,22 @@
 			status = "disabled";
 		};
 
+		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>;
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4 v4] dt-bindings: mips: Add missing mt7688a-soc compatible
  2019-08-12 10:36 [PATCH 1/4 v4] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node Stefan Roese
@ 2019-08-12 10:36 ` Stefan Roese
  2019-08-27 15:32   ` Rob Herring
  2019-08-12 10:36 ` [PATCH 3/4 v4] dt-bindings: mips: Add gardena vendor prefix and board description Stefan Roese
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Stefan Roese @ 2019-08-12 10:36 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton, Rob Herring, devicetree

This patch adds the "ralink,mt7688a-soc" compatible to the ralink DT
bindings documentation. This compatible is already used by some MIPS
boards (e.g. omega2p.dts) but not yet documented. It will also be used
by the upcoming "GARDENA smart Gateway" support.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
---
v4:
- New patch

 Documentation/devicetree/bindings/mips/ralink.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/mips/ralink.txt b/Documentation/devicetree/bindings/mips/ralink.txt
index a16e8d7fe56c..3341945b51d9 100644
--- a/Documentation/devicetree/bindings/mips/ralink.txt
+++ b/Documentation/devicetree/bindings/mips/ralink.txt
@@ -16,3 +16,4 @@ value must be one of the following values:
   ralink,mt7620a-soc
   ralink,mt7620n-soc
   ralink,mt7628a-soc
+  ralink,mt7688a-soc
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4 v4] dt-bindings: mips: Add gardena vendor prefix and board description
  2019-08-12 10:36 [PATCH 1/4 v4] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node Stefan Roese
  2019-08-12 10:36 ` [PATCH 2/4 v4] dt-bindings: mips: Add missing mt7688a-soc compatible Stefan Roese
@ 2019-08-12 10:36 ` Stefan Roese
  2019-08-27 15:32   ` Rob Herring
  2019-08-12 10:36 ` [PATCH 4/4 v4] MIPS: ralink: Add GARDENA smart Gateway MT7688 board Stefan Roese
  2019-10-07 17:51 ` [PATCH 1/4 v4] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node Paul Burton
  3 siblings, 1 reply; 7+ messages in thread
From: Stefan Roese @ 2019-08-12 10:36 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton, Rob Herring, devicetree

This patch adds the vendor prefix for gardena and a short description
including the compatible string for the "GARDENA smart Gateway" based
on the MT7688 SoC.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Paul Burton <paul.burton@mips.com>
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
---
v4:
- Move board description into ralink.txt instead of creating a gardena
  board file (Rob)
- Slightly changed board compatible

v3:
- New patch

 Documentation/devicetree/bindings/mips/ralink.txt   | 13 +++++++++++++
 .../devicetree/bindings/vendor-prefixes.yaml        |  2 ++
 2 files changed, 15 insertions(+)

diff --git a/Documentation/devicetree/bindings/mips/ralink.txt b/Documentation/devicetree/bindings/mips/ralink.txt
index 3341945b51d9..8cc0ab41578c 100644
--- a/Documentation/devicetree/bindings/mips/ralink.txt
+++ b/Documentation/devicetree/bindings/mips/ralink.txt
@@ -17,3 +17,16 @@ value must be one of the following values:
   ralink,mt7620n-soc
   ralink,mt7628a-soc
   ralink,mt7688a-soc
+
+2. Boards
+
+GARDENA smart Gateway (MT7688)
+
+This board is based on the MediaTek MT7688 and equipped with 128 MiB
+of DDR and 8 MiB of flash (SPI NOR) and additional 128MiB SPI NAND
+storage.
+
+------------------------------
+Required root node properties:
+- compatible = "gardena,smart-gateway-mt7688", "ralink,mt7688a-soc",
+		"ralink,mt7628a-soc";
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 6992bbbbffab..73166adfd4ad 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -337,6 +337,8 @@ patternProperties:
     description: Freescale Semiconductor
   "^fujitsu,.*":
     description: Fujitsu Ltd.
+  "^gardena,.*":
+    description: GARDENA GmbH
   "^gateworks,.*":
     description: Gateworks Corporation
   "^gcw,.*":
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4 v4] MIPS: ralink: Add GARDENA smart Gateway MT7688 board
  2019-08-12 10:36 [PATCH 1/4 v4] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node Stefan Roese
  2019-08-12 10:36 ` [PATCH 2/4 v4] dt-bindings: mips: Add missing mt7688a-soc compatible Stefan Roese
  2019-08-12 10:36 ` [PATCH 3/4 v4] dt-bindings: mips: Add gardena vendor prefix and board description Stefan Roese
@ 2019-08-12 10:36 ` Stefan Roese
  2019-10-07 17:51 ` [PATCH 1/4 v4] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node Paul Burton
  3 siblings, 0 replies; 7+ messages in thread
From: Stefan Roese @ 2019-08-12 10:36 UTC (permalink / raw)
  To: linux-mips; +Cc: Paul Burton, Harvey Hunt, John Crispin

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.

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>
---
v4:
- Added "ralink,mt7688a-soc" to compatible for the used SoC

v3:
- No change (bindings documentation added in separate patch)

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

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

diff --git a/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts b/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts
new file mode 100644
index 000000000000..aa5caaa31104
--- /dev/null
+++ b/arch/mips/boot/dts/ralink/gardena_smart_gateway_mt7688.dts
@@ -0,0 +1,197 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2019 Stefan Roese <sr@denx.de>
+ */
+
+/dts-v1/;
+
+/include/ "mt7628a.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "gardena,smart-gateway-mt7688", "ralink,mt7688a-soc",
+		     "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";
+};
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/4 v4] dt-bindings: mips: Add missing mt7688a-soc compatible
  2019-08-12 10:36 ` [PATCH 2/4 v4] dt-bindings: mips: Add missing mt7688a-soc compatible Stefan Roese
@ 2019-08-27 15:32   ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2019-08-27 15:32 UTC (permalink / raw)
  To: Stefan Roese; +Cc: linux-mips, Paul Burton, devicetree

On Mon, 12 Aug 2019 12:36:53 +0200, Stefan Roese wrote:
> This patch adds the "ralink,mt7688a-soc" compatible to the ralink DT
> bindings documentation. This compatible is already used by some MIPS
> boards (e.g. omega2p.dts) but not yet documented. It will also be used
> by the upcoming "GARDENA smart Gateway" support.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Paul Burton <paul.burton@mips.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: devicetree@vger.kernel.org
> ---
> v4:
> - New patch
> 
>  Documentation/devicetree/bindings/mips/ralink.txt | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/4 v4] dt-bindings: mips: Add gardena vendor prefix and board description
  2019-08-12 10:36 ` [PATCH 3/4 v4] dt-bindings: mips: Add gardena vendor prefix and board description Stefan Roese
@ 2019-08-27 15:32   ` Rob Herring
  0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2019-08-27 15:32 UTC (permalink / raw)
  To: Stefan Roese; +Cc: linux-mips, Paul Burton, devicetree

On Mon, 12 Aug 2019 12:36:54 +0200, Stefan Roese wrote:
> This patch adds the vendor prefix for gardena and a short description
> including the compatible string for the "GARDENA smart Gateway" based
> on the MT7688 SoC.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Paul Burton <paul.burton@mips.com>
> Cc: Rob Herring <robh@kernel.org>
> Cc: devicetree@vger.kernel.org
> ---
> v4:
> - Move board description into ralink.txt instead of creating a gardena
>   board file (Rob)
> - Slightly changed board compatible
> 
> v3:
> - New patch
> 
>  Documentation/devicetree/bindings/mips/ralink.txt   | 13 +++++++++++++
>  .../devicetree/bindings/vendor-prefixes.yaml        |  2 ++
>  2 files changed, 15 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/4 v4] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node
  2019-08-12 10:36 [PATCH 1/4 v4] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node Stefan Roese
                   ` (2 preceding siblings ...)
  2019-08-12 10:36 ` [PATCH 4/4 v4] MIPS: ralink: Add GARDENA smart Gateway MT7688 board Stefan Roese
@ 2019-10-07 17:51 ` Paul Burton
  3 siblings, 0 replies; 7+ messages in thread
From: Paul Burton @ 2019-10-07 17:51 UTC (permalink / raw)
  To: Stefan Roese
  Cc: linux-mips, Paul Burton, Harvey Hunt, John Crispin, linux-mips

Hello,

Stefan Roese wrote:
> This patch adds the I2C controller description to the MT7628A dtsi file.

Series applied to mips-next.

> MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node
>   commit cd5f9e4fd879
>   https://git.kernel.org/mips/c/cd5f9e4fd879
>   
>   Signed-off-by: Stefan Roese <sr@denx.de>
>   Signed-off-by: Paul Burton <paul.burton@mips.com>
> 
> dt-bindings: mips: Add missing mt7688a-soc compatible
>   commit cf892abfab77
>   https://git.kernel.org/mips/c/cf892abfab77
>   
>   Signed-off-by: Stefan Roese <sr@denx.de>
>   Reviewed-by: Rob Herring <robh@kernel.org>
>   Signed-off-by: Paul Burton <paul.burton@mips.com>
> 
> dt-bindings: mips: Add gardena vendor prefix and board description
>   commit 4ce8a03c4176
>   https://git.kernel.org/mips/c/4ce8a03c4176
>   
>   Signed-off-by: Stefan Roese <sr@denx.de>
>   Reviewed-by: Rob Herring <robh@kernel.org>
>   Signed-off-by: Paul Burton <paul.burton@mips.com>
> 
> MIPS: ralink: Add GARDENA smart Gateway MT7688 board
>   commit 376357aca715
>   https://git.kernel.org/mips/c/376357aca715
>   
>   Signed-off-by: Stefan Roese <sr@denx.de>
>   Signed-off-by: Paul Burton <paul.burton@mips.com>

Thanks,
    Paul

[ This message was auto-generated; if you believe anything is incorrect
  then please email paul.burton@mips.com to report it. ]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-10-07 17:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-12 10:36 [PATCH 1/4 v4] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node Stefan Roese
2019-08-12 10:36 ` [PATCH 2/4 v4] dt-bindings: mips: Add missing mt7688a-soc compatible Stefan Roese
2019-08-27 15:32   ` Rob Herring
2019-08-12 10:36 ` [PATCH 3/4 v4] dt-bindings: mips: Add gardena vendor prefix and board description Stefan Roese
2019-08-27 15:32   ` Rob Herring
2019-08-12 10:36 ` [PATCH 4/4 v4] MIPS: ralink: Add GARDENA smart Gateway MT7688 board Stefan Roese
2019-10-07 17:51 ` [PATCH 1/4 v4] MIPS: ralink: mt7628a.dtsi: Add I2C controller DT node Paul Burton

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).