linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] mips: dts: ralink: Add support for TP-Link HC220 G5 v1 board
@ 2023-06-06 21:15 Liviu Dudau
  2023-06-06 21:15 ` [PATCH v4 1/2] dt-bindings: mips: Add bindings " Liviu Dudau
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Liviu Dudau @ 2023-06-06 21:15 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Thomas Bogendoerfer, Paul Burton, Rob Herring,
	Sergio Paracuellos, Conor Dooley, Krzysztof Kozlowski,
	linux-mips, linux-kernel, devicetree, Liviu Dudau

Add device tree and bindings for the TP-Link HC220 G5 v1 wireless AP,
a consumer product from TP-Link based on MT7621.

Changes since v3:
 - Turns out that adding sub-nodes to the pcie invites more warnings from
   dtbs_check so we're dropping those
 - Running dtbs_check made me realise that I need to re-order the patches
   so that the bindings are introduced first. Hence the major change in v4
   is the re-ordering of patches
 - Renamed the LEDs nodes to match the schema.

Changes since v2:
 - Remove WIP nodes for NAND flash that accidentally got included in v2
 - Fix commit message with the actual 5GHz WiFi chip name
 - Remove gmac and mdio nodes from device tree as defaults are sufficient
 - Added sub-nodes under pcie for each of the WiFi chip with appropriate
   compatible string.
 - Collect Acks received for the device tree bindings patch

Changes since v1:
 - Changed compatible for the board to "tplink,hc220-g5-v1"
 - Updated the DSA switch nodes to better reflect actual usage.
 - Disabled the fixed-link in gmac1
 - Added device tree bindings in Documentation/

v3: https://lore.kernel.org/linux-mips/20230605150114.601102-1-liviu@dudau.co.uk/
v2: https://lore.kernel.org/linux-mips/20230529150833.526084-1-liviu@dudau.co.uk/
v1: https://lore.kernel.org/linux-mips/20230509200125.309026-1-liviu@dudau.co.uk/

Liviu Dudau (2):
  dt-bindings: mips: Add bindings for TP-Link HC220 G5 v1 board
  mips: dts: ralink: Add support for TP-Link HC220 G5 v1 board

 .../devicetree/bindings/mips/ralink.yaml      |  1 +
 arch/mips/boot/dts/ralink/Makefile            |  3 +-
 .../dts/ralink/mt7621-tplink-hc220-g5-v1.dts  | 84 +++++++++++++++++++
 3 files changed, 87 insertions(+), 1 deletion(-)
 create mode 100644 arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dts

-- 
2.40.1


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

* [PATCH v4 1/2] dt-bindings: mips: Add bindings for TP-Link HC220 G5 v1 board
  2023-06-06 21:15 [PATCH v4 0/2] mips: dts: ralink: Add support for TP-Link HC220 G5 v1 board Liviu Dudau
@ 2023-06-06 21:15 ` Liviu Dudau
  2023-06-06 21:16 ` [PATCH v4 2/2] mips: dts: ralink: Add support " Liviu Dudau
  2023-06-09  8:24 ` [PATCH v4 0/2] " Thomas Bogendoerfer
  2 siblings, 0 replies; 6+ messages in thread
From: Liviu Dudau @ 2023-06-06 21:15 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Thomas Bogendoerfer, Paul Burton, Rob Herring,
	Sergio Paracuellos, Conor Dooley, Krzysztof Kozlowski,
	linux-mips, linux-kernel, devicetree, Liviu Dudau, Conor Dooley

Add bindings for the compatible string used for the TP-Link's
HC220 G5 V1 board, a wireless AP based on MT7621.

Signed-off-by: Liviu Dudau <liviu@dudau.co.uk>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
---
 Documentation/devicetree/bindings/mips/ralink.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/mips/ralink.yaml b/Documentation/devicetree/bindings/mips/ralink.yaml
index 704b5b5951271..53c1f66353770 100644
--- a/Documentation/devicetree/bindings/mips/ralink.yaml
+++ b/Documentation/devicetree/bindings/mips/ralink.yaml
@@ -80,6 +80,7 @@ properties:
           - enum:
               - gnubee,gb-pc1
               - gnubee,gb-pc2
+              - tplink,hc220-g5-v1
           - const: mediatek,mt7621-soc
 
 additionalProperties: true
-- 
2.40.1


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

* [PATCH v4 2/2] mips: dts: ralink: Add support for TP-Link HC220 G5 v1 board
  2023-06-06 21:15 [PATCH v4 0/2] mips: dts: ralink: Add support for TP-Link HC220 G5 v1 board Liviu Dudau
  2023-06-06 21:15 ` [PATCH v4 1/2] dt-bindings: mips: Add bindings " Liviu Dudau
@ 2023-06-06 21:16 ` Liviu Dudau
  2023-06-07  5:48   ` Arınç ÜNAL
  2023-06-07  6:34   ` Sergio Paracuellos
  2023-06-09  8:24 ` [PATCH v4 0/2] " Thomas Bogendoerfer
  2 siblings, 2 replies; 6+ messages in thread
From: Liviu Dudau @ 2023-06-06 21:16 UTC (permalink / raw)
  To: Arınç ÜNAL
  Cc: Thomas Bogendoerfer, Paul Burton, Rob Herring,
	Sergio Paracuellos, Conor Dooley, Krzysztof Kozlowski,
	linux-mips, linux-kernel, devicetree, Liviu Dudau

This WiFi AP is based on a MT7621 SoC with 128MiB RAM, 128MiB NAND,
a MT7603 2.4GHz WiFi and a MT7613 5GHz WiFi chips integrated on the board,
connected to the main SoC over PCIe.

The device uses NMBM over NAND, which is not currently supported in the
mainline, so NAND node is skipped in this revision.

Signed-off-by: Liviu Dudau <liviu@dudau.co.uk>
---
 arch/mips/boot/dts/ralink/Makefile            |  3 +-
 .../dts/ralink/mt7621-tplink-hc220-g5-v1.dts  | 84 +++++++++++++++++++
 2 files changed, 86 insertions(+), 1 deletion(-)
 create mode 100644 arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dts

diff --git a/arch/mips/boot/dts/ralink/Makefile b/arch/mips/boot/dts/ralink/Makefile
index 11732b8c8163a..d27d7e8c700fe 100644
--- a/arch/mips/boot/dts/ralink/Makefile
+++ b/arch/mips/boot/dts/ralink/Makefile
@@ -8,6 +8,7 @@ dtb-$(CONFIG_DTB_VOCORE2)	+= vocore2.dtb
 
 dtb-$(CONFIG_SOC_MT7621) += \
 	mt7621-gnubee-gb-pc1.dtb \
-	mt7621-gnubee-gb-pc2.dtb
+	mt7621-gnubee-gb-pc2.dtb \
+	mt7621-tplink-hc220-g5-v1.dtb
 
 obj-$(CONFIG_BUILTIN_DTB)	+= $(addsuffix .o, $(dtb-y))
diff --git a/arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dts b/arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dts
new file mode 100644
index 0000000000000..2d2eadc6b95f3
--- /dev/null
+++ b/arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dts
@@ -0,0 +1,84 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "tplink,hc220-g5-v1", "mediatek,mt7621-soc";
+	model = "TP-Link HC220 G5 v1";
+
+	memory@0 {
+		device_type = "memory";
+		reg = <0x00000000 0x08000000>;
+	};
+
+	chosen {
+		bootargs = "earlycon console=ttyS0,115200";
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		key-reset {
+			label = "reset";
+			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		key-wps {
+			label = "wps";
+			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led-fault {
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_FAULT;
+			gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
+		};
+
+		led-power {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_POWER;
+			gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "default-on";
+		};
+
+		led-wps {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_WPS;
+			gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&pcie {
+	status = "okay";
+};
+
+&switch0 {
+	ports {
+		port@0 {
+			status = "okay";
+			label = "lan2";
+		};
+
+		port@1 {
+			status = "okay";
+			label = "lan1";
+		};
+
+		port@2 {
+			status = "okay";
+			label = "wan";
+		};
+	};
+};
-- 
2.40.1


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

* Re: [PATCH v4 2/2] mips: dts: ralink: Add support for TP-Link HC220 G5 v1 board
  2023-06-06 21:16 ` [PATCH v4 2/2] mips: dts: ralink: Add support " Liviu Dudau
@ 2023-06-07  5:48   ` Arınç ÜNAL
  2023-06-07  6:34   ` Sergio Paracuellos
  1 sibling, 0 replies; 6+ messages in thread
From: Arınç ÜNAL @ 2023-06-07  5:48 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: Thomas Bogendoerfer, Paul Burton, Rob Herring,
	Sergio Paracuellos, Conor Dooley, Krzysztof Kozlowski,
	linux-mips, linux-kernel, devicetree

On 7.06.2023 00:16, Liviu Dudau wrote:
> This WiFi AP is based on a MT7621 SoC with 128MiB RAM, 128MiB NAND,
> a MT7603 2.4GHz WiFi and a MT7613 5GHz WiFi chips integrated on the board,
> connected to the main SoC over PCIe.
> 
> The device uses NMBM over NAND, which is not currently supported in the
> mainline, so NAND node is skipped in this revision.
> 
> Signed-off-by: Liviu Dudau <liviu@dudau.co.uk>

Reviewed-by: Arınç ÜNAL <arinc.unal@arinc9.com>

Arınç

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

* Re: [PATCH v4 2/2] mips: dts: ralink: Add support for TP-Link HC220 G5 v1 board
  2023-06-06 21:16 ` [PATCH v4 2/2] mips: dts: ralink: Add support " Liviu Dudau
  2023-06-07  5:48   ` Arınç ÜNAL
@ 2023-06-07  6:34   ` Sergio Paracuellos
  1 sibling, 0 replies; 6+ messages in thread
From: Sergio Paracuellos @ 2023-06-07  6:34 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: Arınç ÜNAL, Thomas Bogendoerfer, Paul Burton,
	Rob Herring, Conor Dooley, Krzysztof Kozlowski, linux-mips,
	linux-kernel, devicetree

On Tue, Jun 6, 2023 at 11:16 PM Liviu Dudau <liviu@dudau.co.uk> wrote:
>
> This WiFi AP is based on a MT7621 SoC with 128MiB RAM, 128MiB NAND,
> a MT7603 2.4GHz WiFi and a MT7613 5GHz WiFi chips integrated on the board,
> connected to the main SoC over PCIe.
>
> The device uses NMBM over NAND, which is not currently supported in the
> mainline, so NAND node is skipped in this revision.
>
> Signed-off-by: Liviu Dudau <liviu@dudau.co.uk>
> ---
>  arch/mips/boot/dts/ralink/Makefile            |  3 +-
>  .../dts/ralink/mt7621-tplink-hc220-g5-v1.dts  | 84 +++++++++++++++++++
>  2 files changed, 86 insertions(+), 1 deletion(-)

Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Thanks,
     Sergio Paracuellos

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

* Re: [PATCH v4 0/2] mips: dts: ralink: Add support for TP-Link HC220 G5 v1 board
  2023-06-06 21:15 [PATCH v4 0/2] mips: dts: ralink: Add support for TP-Link HC220 G5 v1 board Liviu Dudau
  2023-06-06 21:15 ` [PATCH v4 1/2] dt-bindings: mips: Add bindings " Liviu Dudau
  2023-06-06 21:16 ` [PATCH v4 2/2] mips: dts: ralink: Add support " Liviu Dudau
@ 2023-06-09  8:24 ` Thomas Bogendoerfer
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Bogendoerfer @ 2023-06-09  8:24 UTC (permalink / raw)
  To: Liviu Dudau
  Cc: Arınç ÜNAL, Paul Burton, Rob Herring,
	Sergio Paracuellos, Conor Dooley, Krzysztof Kozlowski,
	linux-mips, linux-kernel, devicetree

On Tue, Jun 06, 2023 at 10:15:58PM +0100, Liviu Dudau wrote:
> Add device tree and bindings for the TP-Link HC220 G5 v1 wireless AP,
> a consumer product from TP-Link based on MT7621.
> 
> Changes since v3:
>  - Turns out that adding sub-nodes to the pcie invites more warnings from
>    dtbs_check so we're dropping those
>  - Running dtbs_check made me realise that I need to re-order the patches
>    so that the bindings are introduced first. Hence the major change in v4
>    is the re-ordering of patches
>  - Renamed the LEDs nodes to match the schema.
> 
> Changes since v2:
>  - Remove WIP nodes for NAND flash that accidentally got included in v2
>  - Fix commit message with the actual 5GHz WiFi chip name
>  - Remove gmac and mdio nodes from device tree as defaults are sufficient
>  - Added sub-nodes under pcie for each of the WiFi chip with appropriate
>    compatible string.
>  - Collect Acks received for the device tree bindings patch
> 
> Changes since v1:
>  - Changed compatible for the board to "tplink,hc220-g5-v1"
>  - Updated the DSA switch nodes to better reflect actual usage.
>  - Disabled the fixed-link in gmac1
>  - Added device tree bindings in Documentation/
> 
> v3: https://lore.kernel.org/linux-mips/20230605150114.601102-1-liviu@dudau.co.uk/
> v2: https://lore.kernel.org/linux-mips/20230529150833.526084-1-liviu@dudau.co.uk/
> v1: https://lore.kernel.org/linux-mips/20230509200125.309026-1-liviu@dudau.co.uk/
> 
> Liviu Dudau (2):
>   dt-bindings: mips: Add bindings for TP-Link HC220 G5 v1 board
>   mips: dts: ralink: Add support for TP-Link HC220 G5 v1 board
> 
>  .../devicetree/bindings/mips/ralink.yaml      |  1 +
>  arch/mips/boot/dts/ralink/Makefile            |  3 +-
>  .../dts/ralink/mt7621-tplink-hc220-g5-v1.dts  | 84 +++++++++++++++++++
>  3 files changed, 87 insertions(+), 1 deletion(-)
>  create mode 100644 arch/mips/boot/dts/ralink/mt7621-tplink-hc220-g5-v1.dts
> 
> -- 
> 2.40.1

series applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

end of thread, other threads:[~2023-06-09  9:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-06 21:15 [PATCH v4 0/2] mips: dts: ralink: Add support for TP-Link HC220 G5 v1 board Liviu Dudau
2023-06-06 21:15 ` [PATCH v4 1/2] dt-bindings: mips: Add bindings " Liviu Dudau
2023-06-06 21:16 ` [PATCH v4 2/2] mips: dts: ralink: Add support " Liviu Dudau
2023-06-07  5:48   ` Arınç ÜNAL
2023-06-07  6:34   ` Sergio Paracuellos
2023-06-09  8:24 ` [PATCH v4 0/2] " Thomas Bogendoerfer

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