All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/4] dts: mediatek: add Cudy WR3000 V1 wireless router
@ 2024-02-23 10:17 ` Rafał Miłecki
  0 siblings, 0 replies; 16+ messages in thread
From: Rafał Miłecki @ 2024-02-23 10:17 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

Cudy WR3000 V1 is a MediaTek Filogic 820 based 802.11ax wireless router.

https://www.cudy.com/productinfo/1637722.html

Rafał Miłecki (4):
  dt-bindings: vendor-prefixes: add Cudy
  dt-bindings: arm64: dts: mediatek: Add Cudy WR3000 V1 router
  arm64: dts: mediatek: mt7981: add pinctrl
  arm64: dts: mediatek: Add Cudy WR3000 V1

 .../devicetree/bindings/arm/mediatek.yaml     |  1 +
 .../devicetree/bindings/vendor-prefixes.yaml  |  2 +
 arch/arm64/boot/dts/mediatek/Makefile         |  1 +
 .../dts/mediatek/mt7981b-cudy-wr3000-v1.dts   | 74 +++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7981b.dtsi     | 22 ++++++
 5 files changed, 100 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts

-- 
2.35.3


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

* [PATCH V2 0/4] dts: mediatek: add Cudy WR3000 V1 wireless router
@ 2024-02-23 10:17 ` Rafał Miłecki
  0 siblings, 0 replies; 16+ messages in thread
From: Rafał Miłecki @ 2024-02-23 10:17 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

Cudy WR3000 V1 is a MediaTek Filogic 820 based 802.11ax wireless router.

https://www.cudy.com/productinfo/1637722.html

Rafał Miłecki (4):
  dt-bindings: vendor-prefixes: add Cudy
  dt-bindings: arm64: dts: mediatek: Add Cudy WR3000 V1 router
  arm64: dts: mediatek: mt7981: add pinctrl
  arm64: dts: mediatek: Add Cudy WR3000 V1

 .../devicetree/bindings/arm/mediatek.yaml     |  1 +
 .../devicetree/bindings/vendor-prefixes.yaml  |  2 +
 arch/arm64/boot/dts/mediatek/Makefile         |  1 +
 .../dts/mediatek/mt7981b-cudy-wr3000-v1.dts   | 74 +++++++++++++++++++
 arch/arm64/boot/dts/mediatek/mt7981b.dtsi     | 22 ++++++
 5 files changed, 100 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts

-- 
2.35.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V2 1/4] dt-bindings: vendor-prefixes: add Cudy
  2024-02-23 10:17 ` Rafał Miłecki
@ 2024-02-23 10:17   ` Rafał Miłecki
  -1 siblings, 0 replies; 16+ messages in thread
From: Rafał Miłecki @ 2024-02-23 10:17 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki, Krzysztof Kozlowski

From: Rafał Miłecki <rafal@milecki.pl>

Cudy is a Chinese company providing networking products.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 20ed04148092..57f91c83152e 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -334,6 +334,8 @@ patternProperties:
     description: Czech Technical University in Prague
   "^cubietech,.*":
     description: Cubietech, Ltd.
+  "^cudy,.*":
+    description: Shenzhen Cudy Technology Co., Ltd.
   "^cui,.*":
     description: CUI Devices
   "^cypress,.*":
-- 
2.35.3


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

* [PATCH V2 1/4] dt-bindings: vendor-prefixes: add Cudy
@ 2024-02-23 10:17   ` Rafał Miłecki
  0 siblings, 0 replies; 16+ messages in thread
From: Rafał Miłecki @ 2024-02-23 10:17 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki, Krzysztof Kozlowski

From: Rafał Miłecki <rafal@milecki.pl>

Cudy is a Chinese company providing networking products.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 20ed04148092..57f91c83152e 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -334,6 +334,8 @@ patternProperties:
     description: Czech Technical University in Prague
   "^cubietech,.*":
     description: Cubietech, Ltd.
+  "^cudy,.*":
+    description: Shenzhen Cudy Technology Co., Ltd.
   "^cui,.*":
     description: CUI Devices
   "^cypress,.*":
-- 
2.35.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V2 2/4] dt-bindings: arm64: dts: mediatek: Add Cudy WR3000 V1 router
  2024-02-23 10:17 ` Rafał Miłecki
@ 2024-02-23 10:17   ` Rafał Miłecki
  -1 siblings, 0 replies; 16+ messages in thread
From: Rafał Miłecki @ 2024-02-23 10:17 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki, Krzysztof Kozlowski

From: Rafał Miłecki <rafal@milecki.pl>

Cudy WR3000 V1 is an MT7981B (AKA Filogic 820) based wireless router.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 Documentation/devicetree/bindings/arm/mediatek.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
index 09f9ffd3ff7b..1cf47db94c57 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
@@ -85,6 +85,7 @@ properties:
           - const: mediatek,mt7629
       - items:
           - enum:
+              - cudy,wr3000-v1
               - xiaomi,ax3000t
           - const: mediatek,mt7981b
       - items:
-- 
2.35.3


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

* [PATCH V2 2/4] dt-bindings: arm64: dts: mediatek: Add Cudy WR3000 V1 router
@ 2024-02-23 10:17   ` Rafał Miłecki
  0 siblings, 0 replies; 16+ messages in thread
From: Rafał Miłecki @ 2024-02-23 10:17 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki, Krzysztof Kozlowski

From: Rafał Miłecki <rafal@milecki.pl>

Cudy WR3000 V1 is an MT7981B (AKA Filogic 820) based wireless router.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 Documentation/devicetree/bindings/arm/mediatek.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
index 09f9ffd3ff7b..1cf47db94c57 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
@@ -85,6 +85,7 @@ properties:
           - const: mediatek,mt7629
       - items:
           - enum:
+              - cudy,wr3000-v1
               - xiaomi,ax3000t
           - const: mediatek,mt7981b
       - items:
-- 
2.35.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V2 3/4] arm64: dts: mediatek: mt7981: add pinctrl
  2024-02-23 10:17 ` Rafał Miłecki
@ 2024-02-23 10:17   ` Rafał Miłecki
  -1 siblings, 0 replies; 16+ messages in thread
From: Rafał Miłecki @ 2024-02-23 10:17 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

MT7981 contains on-SoC PIN controller that is also a GPIO provider.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
V2: Drop board specific code

 arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
index a187a34d12ee..5674ac81d1f8 100644
--- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
@@ -94,6 +94,28 @@ pwm@10048000 {
 			#pwm-cells = <2>;
 		};
 
+		pio: pinctrl@11d00000 {
+			compatible = "mediatek,mt7981-pinctrl";
+			reg = <0 0x11d00000 0 0x1000>,
+			      <0 0x11c00000 0 0x1000>,
+			      <0 0x11c10000 0 0x1000>,
+			      <0 0x11d20000 0 0x1000>,
+			      <0 0x11e00000 0 0x1000>,
+			      <0 0x11e20000 0 0x1000>,
+			      <0 0x11f00000 0 0x1000>,
+			      <0 0x11f10000 0 0x1000>,
+			      <0 0x1000b000 0 0x1000>;
+			reg-names = "gpio", "iocfg_rt", "iocfg_rm", "iocfg_rb", "iocfg_lb",
+				    "iocfg_bl", "iocfg_tm", "iocfg_tl", "eint";
+			interrupt-controller;
+			interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-parent = <&gic>;
+			gpio-ranges = <&pio 0 0 56>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			#interrupt-cells = <2>;
+		};
+
 		clock-controller@15000000 {
 			compatible = "mediatek,mt7981-ethsys", "syscon";
 			reg = <0 0x15000000 0 0x1000>;
-- 
2.35.3


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

* [PATCH V2 3/4] arm64: dts: mediatek: mt7981: add pinctrl
@ 2024-02-23 10:17   ` Rafał Miłecki
  0 siblings, 0 replies; 16+ messages in thread
From: Rafał Miłecki @ 2024-02-23 10:17 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

MT7981 contains on-SoC PIN controller that is also a GPIO provider.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
V2: Drop board specific code

 arch/arm64/boot/dts/mediatek/mt7981b.dtsi | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
index a187a34d12ee..5674ac81d1f8 100644
--- a/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7981b.dtsi
@@ -94,6 +94,28 @@ pwm@10048000 {
 			#pwm-cells = <2>;
 		};
 
+		pio: pinctrl@11d00000 {
+			compatible = "mediatek,mt7981-pinctrl";
+			reg = <0 0x11d00000 0 0x1000>,
+			      <0 0x11c00000 0 0x1000>,
+			      <0 0x11c10000 0 0x1000>,
+			      <0 0x11d20000 0 0x1000>,
+			      <0 0x11e00000 0 0x1000>,
+			      <0 0x11e20000 0 0x1000>,
+			      <0 0x11f00000 0 0x1000>,
+			      <0 0x11f10000 0 0x1000>,
+			      <0 0x1000b000 0 0x1000>;
+			reg-names = "gpio", "iocfg_rt", "iocfg_rm", "iocfg_rb", "iocfg_lb",
+				    "iocfg_bl", "iocfg_tm", "iocfg_tl", "eint";
+			interrupt-controller;
+			interrupts = <GIC_SPI 225 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-parent = <&gic>;
+			gpio-ranges = <&pio 0 0 56>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			#interrupt-cells = <2>;
+		};
+
 		clock-controller@15000000 {
 			compatible = "mediatek,mt7981-ethsys", "syscon";
 			reg = <0 0x15000000 0 0x1000>;
-- 
2.35.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH V2 4/4] arm64: dts: mediatek: Add Cudy WR3000 V1
  2024-02-23 10:17 ` Rafał Miłecki
@ 2024-02-23 10:17   ` Rafał Miłecki
  -1 siblings, 0 replies; 16+ messages in thread
From: Rafał Miłecki @ 2024-02-23 10:17 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

Cudy WR3000 V1 is an MT7981B (AKA Filogic 820) based wireless router. It
has 256 MiB of RAM, some LEDs & buttons and (not described yet) 4
Ethernet ports.

There is one slightly uncommon LED with a label of globe icon described
in the Quick Installation Guide as having 2 meanings:
1. "Not connected to the Internet"
2. "Connected to the Internet"

Vendor designed it to light up when some Internet-accessible IP can be
reached. This change will be follow by an attempt to define some
predefined FUNCTION for it.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
V2: Reorder properties
    Describe online LED

 arch/arm64/boot/dts/mediatek/Makefile         |  1 +
 .../dts/mediatek/mt7981b-cudy-wr3000-v1.dts   | 74 +++++++++++++++++++
 2 files changed, 75 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts

diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index 37b4ca3a87c9..96da4ad640aa 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-bananapi-bpi-r64.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt7981b-cudy-wr3000-v1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7981b-xiaomi-ax3000t.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-acelink-ew-7886cax.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts b/arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts
new file mode 100644
index 000000000000..2a988218039c
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts
@@ -0,0 +1,74 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+
+/dts-v1/;
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+#include "mt7981b.dtsi"
+
+/ {
+	compatible = "cudy,wr3000-v1", "mediatek,mt7981b";
+	model = "Cudy WR3000 V1";
+
+	memory@40000000 {
+		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		key-wps {
+			label = "WPS";
+			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+
+		key-reset {
+			label = "RESET";
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led-0 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_WAN;
+			gpios = <&pio 5 GPIO_ACTIVE_LOW>;
+		};
+
+		led-1 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_WLAN_2GHZ;
+			gpios = <&pio 6 GPIO_ACTIVE_LOW>;
+		};
+
+		led-2 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_WLAN_5GHZ;
+			gpios = <&pio 7 GPIO_ACTIVE_LOW>;
+		};
+
+		led-3 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_LAN;
+			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
+		};
+
+		led-4 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+		};
+
+		led-5 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = "wan-online";
+			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
-- 
2.35.3


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

* [PATCH V2 4/4] arm64: dts: mediatek: Add Cudy WR3000 V1
@ 2024-02-23 10:17   ` Rafał Miłecki
  0 siblings, 0 replies; 16+ messages in thread
From: Rafał Miłecki @ 2024-02-23 10:17 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki

From: Rafał Miłecki <rafal@milecki.pl>

Cudy WR3000 V1 is an MT7981B (AKA Filogic 820) based wireless router. It
has 256 MiB of RAM, some LEDs & buttons and (not described yet) 4
Ethernet ports.

There is one slightly uncommon LED with a label of globe icon described
in the Quick Installation Guide as having 2 meanings:
1. "Not connected to the Internet"
2. "Connected to the Internet"

Vendor designed it to light up when some Internet-accessible IP can be
reached. This change will be follow by an attempt to define some
predefined FUNCTION for it.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
V2: Reorder properties
    Describe online LED

 arch/arm64/boot/dts/mediatek/Makefile         |  1 +
 .../dts/mediatek/mt7981b-cudy-wr3000-v1.dts   | 74 +++++++++++++++++++
 2 files changed, 75 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts

diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index 37b4ca3a87c9..96da4ad640aa 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-evb.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-bananapi-bpi-r64.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt7981b-cudy-wr3000-v1.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7981b-xiaomi-ax3000t.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-acelink-ew-7886cax.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3.dtb
diff --git a/arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts b/arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts
new file mode 100644
index 000000000000..2a988218039c
--- /dev/null
+++ b/arch/arm64/boot/dts/mediatek/mt7981b-cudy-wr3000-v1.dts
@@ -0,0 +1,74 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+
+/dts-v1/;
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+#include "mt7981b.dtsi"
+
+/ {
+	compatible = "cudy,wr3000-v1", "mediatek,mt7981b";
+	model = "Cudy WR3000 V1";
+
+	memory@40000000 {
+		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		key-wps {
+			label = "WPS";
+			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+
+		key-reset {
+			label = "RESET";
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led-0 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_WAN;
+			gpios = <&pio 5 GPIO_ACTIVE_LOW>;
+		};
+
+		led-1 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_WLAN_2GHZ;
+			gpios = <&pio 6 GPIO_ACTIVE_LOW>;
+		};
+
+		led-2 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_WLAN_5GHZ;
+			gpios = <&pio 7 GPIO_ACTIVE_LOW>;
+		};
+
+		led-3 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_LAN;
+			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
+		};
+
+		led-4 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+		};
+
+		led-5 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = "wan-online";
+			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
-- 
2.35.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V2 1/4] dt-bindings: vendor-prefixes: add Cudy
  2024-02-23 10:17   ` Rafał Miłecki
@ 2024-02-26  8:56     ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-02-26  8:56 UTC (permalink / raw)
  To: Rafał Miłecki, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki, Krzysztof Kozlowski

Il 23/02/24 11:17, Rafał Miłecki ha scritto:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Cudy is a Chinese company providing networking products.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



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

* Re: [PATCH V2 1/4] dt-bindings: vendor-prefixes: add Cudy
@ 2024-02-26  8:56     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-02-26  8:56 UTC (permalink / raw)
  To: Rafał Miłecki, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki, Krzysztof Kozlowski

Il 23/02/24 11:17, Rafał Miłecki ha scritto:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Cudy is a Chinese company providing networking products.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V2 3/4] arm64: dts: mediatek: mt7981: add pinctrl
  2024-02-23 10:17   ` Rafał Miłecki
@ 2024-02-26  8:56     ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-02-26  8:56 UTC (permalink / raw)
  To: Rafał Miłecki, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki

Il 23/02/24 11:17, Rafał Miłecki ha scritto:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> MT7981 contains on-SoC PIN controller that is also a GPIO provider.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



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

* Re: [PATCH V2 3/4] arm64: dts: mediatek: mt7981: add pinctrl
@ 2024-02-26  8:56     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-02-26  8:56 UTC (permalink / raw)
  To: Rafał Miłecki, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki

Il 23/02/24 11:17, Rafał Miłecki ha scritto:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> MT7981 contains on-SoC PIN controller that is also a GPIO provider.
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH V2 4/4] arm64: dts: mediatek: Add Cudy WR3000 V1
  2024-02-23 10:17   ` Rafał Miłecki
@ 2024-02-26  8:58     ` AngeloGioacchino Del Regno
  -1 siblings, 0 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-02-26  8:58 UTC (permalink / raw)
  To: Rafał Miłecki, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki

Il 23/02/24 11:17, Rafał Miłecki ha scritto:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Cudy WR3000 V1 is an MT7981B (AKA Filogic 820) based wireless router. It
> has 256 MiB of RAM, some LEDs & buttons and (not described yet) 4
> Ethernet ports.
> 
> There is one slightly uncommon LED with a label of globe icon described
> in the Quick Installation Guide as having 2 meanings:
> 1. "Not connected to the Internet"
> 2. "Connected to the Internet"
> 
> Vendor designed it to light up when some Internet-accessible IP can be
> reached. This change will be follow by an attempt to define some
> predefined FUNCTION for it.

Can we please try to add that predefined function before adding this devicetree
which would anyway be modified again to use that new definition?

That just makes more sense...

...if you can't get the new definition picked, I will take this one as is, but
please try that first.

Cheers,
Angelo


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

* Re: [PATCH V2 4/4] arm64: dts: mediatek: Add Cudy WR3000 V1
@ 2024-02-26  8:58     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-02-26  8:58 UTC (permalink / raw)
  To: Rafał Miłecki, Matthias Brugger, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Chen-Yu Tsai, Hsin-Yi Wang, Nícolas F . R . A . Prado,
	Heiko Stuebner, Jernej Skrabec, Chris Morgan, Linus Walleij,
	Sean Wang, devicetree, linux-arm-kernel, linux-mediatek,
	linux-kernel, Rafał Miłecki

Il 23/02/24 11:17, Rafał Miłecki ha scritto:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Cudy WR3000 V1 is an MT7981B (AKA Filogic 820) based wireless router. It
> has 256 MiB of RAM, some LEDs & buttons and (not described yet) 4
> Ethernet ports.
> 
> There is one slightly uncommon LED with a label of globe icon described
> in the Quick Installation Guide as having 2 meanings:
> 1. "Not connected to the Internet"
> 2. "Connected to the Internet"
> 
> Vendor designed it to light up when some Internet-accessible IP can be
> reached. This change will be follow by an attempt to define some
> predefined FUNCTION for it.

Can we please try to add that predefined function before adding this devicetree
which would anyway be modified again to use that new definition?

That just makes more sense...

...if you can't get the new definition picked, I will take this one as is, but
please try that first.

Cheers,
Angelo


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2024-02-26  8:59 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-23 10:17 [PATCH V2 0/4] dts: mediatek: add Cudy WR3000 V1 wireless router Rafał Miłecki
2024-02-23 10:17 ` Rafał Miłecki
2024-02-23 10:17 ` [PATCH V2 1/4] dt-bindings: vendor-prefixes: add Cudy Rafał Miłecki
2024-02-23 10:17   ` Rafał Miłecki
2024-02-26  8:56   ` AngeloGioacchino Del Regno
2024-02-26  8:56     ` AngeloGioacchino Del Regno
2024-02-23 10:17 ` [PATCH V2 2/4] dt-bindings: arm64: dts: mediatek: Add Cudy WR3000 V1 router Rafał Miłecki
2024-02-23 10:17   ` Rafał Miłecki
2024-02-23 10:17 ` [PATCH V2 3/4] arm64: dts: mediatek: mt7981: add pinctrl Rafał Miłecki
2024-02-23 10:17   ` Rafał Miłecki
2024-02-26  8:56   ` AngeloGioacchino Del Regno
2024-02-26  8:56     ` AngeloGioacchino Del Regno
2024-02-23 10:17 ` [PATCH V2 4/4] arm64: dts: mediatek: Add Cudy WR3000 V1 Rafał Miłecki
2024-02-23 10:17   ` Rafał Miłecki
2024-02-26  8:58   ` AngeloGioacchino Del Regno
2024-02-26  8:58     ` AngeloGioacchino Del Regno

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.