Re: [PATCH] added support for comfast jw-ew74
On 5/4/21 5:28 PM, e...@daloft.com wrote: From: eric --- Hi Eric, thank you very much for your contribution! Please read the following guide, there are some formal issues with this patch: https://openwrt.org/submitting-patches Patches should always include the full and real name of the author and a commit message which describes the patch. Especially when adding new devices, the commit message should include steps to flash the device and a hardware overview. Please see the git log to find examples. Kind regards, Paul .../ramips/dts/mt7628an_comfast_jw-ew74.dts | 147 ++ target/linux/ramips/image/mt76x8.mk | 9 ++ .../mt76x8/base-files/etc/board.d/01_leds | 7 + .../mt76x8/base-files/etc/board.d/02_network | 4 + 4 files changed, 167 insertions(+) create mode 100644 target/linux/ramips/dts/mt7628an_comfast_jw-ew74.dts diff --git a/target/linux/ramips/dts/mt7628an_comfast_jw-ew74.dts b/target/linux/ramips/dts/mt7628an_comfast_jw-ew74.dts new file mode 100644 index 00..dc6aaeb4fe --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_comfast_jw-ew74.dts @@ -0,0 +1,147 @@ +/dts-v1/; + +#include "mt7628an.dtsi" + +#include +#include + +/ { + #address-cells = <0x01>; + #size-cells = <0x01>; + compatible = "comfast,jw-ew74\0mediatek,mt7628an-soc"; + model = "Comfast JW-EW74"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + + + gpio-keys-polled { + #address-cells = <0x01>; + #size-cells = <0x00>; + compatible = "gpio-keys-polled"; + poll-interval = <0x14>; + + reset { + gpios = < 0x06 0x01>; + label = "reset"; + linux,code = ; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wifi { + gpios = < 0x0c 0x01>; + label = "comfast:blue:wifi"; + }; + + wifi0 { + gpios = < 0x0b 0x01>; + label = "comfast:blue:wifi0"; + }; + + wifi1 { + gpios = < 0x05 0x01>; + label = "comfast:blue:wifi1"; + }; + + wifi2 { + gpios = < 0x0d 0x01>; + label = "comfast:blue:wifi2"; + }; + }; + +}; + + + + + + { +status = "okay"; + +flash@0 { +compatible = "jedec,spi-nor"; +reg = <0>; +spi-max-frequency = <1000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + + partition@0 { + label = "u-boot"; + read-only; + reg = <0x00 0x3>; + }; + + + partition@3 { + label = "u-boot-env"; + read-only; + reg = <0x3 0x1>; + }; + + factory: partition@4 { + label = "factory"; + read-only; + reg = <0x4 0x1>; + }; + + partition@5 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x5 0x77>; + }; + + partition@7c { + label = "configs"; + reg = <0x7c 0x4>; + }; + partition@100 { +label = "reserve"; +reg = <0x100 0x100>; +}; + + }; + }; +}; + + { + mtd-mac-address = < 0xe00 >; +}; + + + { + + status = "okay"; + mtd-mac-address = < 0xe00>; + mtd-mac-address-increment = <1>; + +}; + + + { + status = "okay"; +}; + + + { +wifi: mt76@0,0 { +reg = <0x 0 0 0 0>; + mediatek,5ghz = <0x00>; +mediatek,mtd-eeprom = < 0x8000>; + ieee80211-freq-limit = <500 600>; + mtd-mac-address = < 0xe00>; + mtd-mac-address-increment = <2>; + +}; +}; + { + status = "okay"; +}; diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index d5a9684dba..35402edc3b 100644 ---
[PATCH] added support for comfast jw-ew74
From: eric --- .../ramips/dts/mt7628an_comfast_jw-ew74.dts | 147 ++ target/linux/ramips/image/mt76x8.mk | 9 ++ .../mt76x8/base-files/etc/board.d/01_leds | 7 + .../mt76x8/base-files/etc/board.d/02_network | 4 + 4 files changed, 167 insertions(+) create mode 100644 target/linux/ramips/dts/mt7628an_comfast_jw-ew74.dts diff --git a/target/linux/ramips/dts/mt7628an_comfast_jw-ew74.dts b/target/linux/ramips/dts/mt7628an_comfast_jw-ew74.dts new file mode 100644 index 00..dc6aaeb4fe --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_comfast_jw-ew74.dts @@ -0,0 +1,147 @@ +/dts-v1/; + +#include "mt7628an.dtsi" + +#include +#include + +/ { + #address-cells = <0x01>; + #size-cells = <0x01>; + compatible = "comfast,jw-ew74\0mediatek,mt7628an-soc"; + model = "Comfast JW-EW74"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + + + gpio-keys-polled { + #address-cells = <0x01>; + #size-cells = <0x00>; + compatible = "gpio-keys-polled"; + poll-interval = <0x14>; + + reset { + gpios = < 0x06 0x01>; + label = "reset"; + linux,code = ; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wifi { + gpios = < 0x0c 0x01>; + label = "comfast:blue:wifi"; + }; + + wifi0 { + gpios = < 0x0b 0x01>; + label = "comfast:blue:wifi0"; + }; + + wifi1 { + gpios = < 0x05 0x01>; + label = "comfast:blue:wifi1"; + }; + + wifi2 { + gpios = < 0x0d 0x01>; + label = "comfast:blue:wifi2"; + }; + }; + +}; + + + + + + { +status = "okay"; + +flash@0 { +compatible = "jedec,spi-nor"; +reg = <0>; +spi-max-frequency = <1000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + + partition@0 { + label = "u-boot"; + read-only; + reg = <0x00 0x3>; + }; + + + partition@3 { + label = "u-boot-env"; + read-only; + reg = <0x3 0x1>; + }; + + factory: partition@4 { + label = "factory"; + read-only; + reg = <0x4 0x1>; + }; + + partition@5 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x5 0x77>; + }; + + partition@7c { + label = "configs"; + reg = <0x7c 0x4>; + }; + partition@100 { +label = "reserve"; +reg = <0x100 0x100>; +}; + + }; + }; +}; + + { + mtd-mac-address = < 0xe00 >; +}; + + + { + + status = "okay"; + mtd-mac-address = < 0xe00>; + mtd-mac-address-increment = <1>; + +}; + + + { + status = "okay"; +}; + + + { +wifi: mt76@0,0 { +reg = <0x 0 0 0 0>; + mediatek,5ghz = <0x00>; +mediatek,mtd-eeprom = < 0x8000>; + ieee80211-freq-limit = <500 600>; + mtd-mac-address = < 0xe00>; + mtd-mac-address-increment = <2>; + +}; +}; + { + status = "okay"; +}; diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index d5a9684dba..35402edc3b 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -78,6 +78,15 @@ define Device/buffalo_wcr-1166ds endef TARGET_DEVICES += buffalo_wcr-1166ds +define Device/comfast_jw-ew74 + IMAGE_SIZE := 7798784 + DEVICE_VENDOR := Comfast + DEVICE_MODEL := JW-EW74 + DEVICE_PACKAGES := kmod-mt76x2 + SUPPORTED_DEVICES += comfast_jw-ew74 +endef +TARGET_DEVICES += comfast_jw-ew74 + define Device/cudy_wr1000 IMAGE_SIZE := 7872k IMAGES += factory.bin diff --git