[OpenWrt-Devel] [PATCH V2] ramips: add support for JCG JHR-AC876M

Adrian Schmutzler mail at adrianschmutzler.de
Thu Dec 12 14:41:30 EST 2019


Hi again,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces at lists.openwrt.org] On
> Behalf Of DENG Qingfang
> Sent: Donnerstag, 12. Dezember 2019 15:09
> To: openwrt-devel at lists.openwrt.org
> Subject: [OpenWrt-Devel] [PATCH V2] ramips: add support for JCG JHR-AC876M
> 
> JCG JHR-AC876M is an AC2600M router
> 
> Hardware specs:
>   SoC: MT7621AT
>   2.4GHz: MT7615N 4x4 @ PCIe0
>   5GHz: MT7615N 4x4 @ PCIe1
>   Flash: Winbond W25Q128JVSQ 16MiB
>   RAM: Nanya NT5CB128M16 256MiB
>   USB 2.0 and 3.0 ports
>   6 LEDs, 3 of which are connected to SoC GPIO
>   Reset and WPS buttons
> 
> Flash instructions:
> Stock to OpenWrt:
>   Upload factory.bin in stock firmware's upgrade page,
>   do not preserve settings
> 
> OpenWrt to stock:
>   Push and hold the reset button for 5s while power cycling to
>   enter recovery mode;
>   Visit 192.168.1.1 and upload stock firmware

Please add information about the MAC addresses to the commit message, as suggested in the previous e-mail, something like

0x4        *:00  wlan2g/wan/label 
0x8004 *:01  wlan5g 
0xe000 *:02  lan 
0xe006 *:03  not used in stock FW

[...]

> +
> +&pinctrl {
> +	state_default: pinctrl0 {
> +		gpio {
> +			ralink,group = "i2c", "uart3", "jtag", "wdt";
> +			ralink,function = "gpio";
> +		};
> +	};
> +};

For mt7621, state_default is already defined in mt7621.dtsi. So, you may use it directly:

 +&state_default {
 +	gpio {
 +		ralink,group = "i2c", "uart3", "jtag", "wdt";
 +		ralink,function = "gpio";
 +	};
 +};

> diff --git a/target/linux/ramips/image/mt7621.mk
> b/target/linux/ramips/image/mt7621.mk
> index d663aa29da..cbbda06822 100644
> --- a/target/linux/ramips/image/mt7621.mk
> +++ b/target/linux/ramips/image/mt7621.mk
> @@ -361,6 +361,19 @@ define Device/iodata_wnpr2600g
>  endef
>  TARGET_DEVICES += iodata_wnpr2600g
> 
> +define Device/jcg_jhr-ac876m
> +  MTK_SOC := mt7621
> +  IMAGE_SIZE := 16064k
> +  IMAGES += factory.bin
> +  IMAGE/factory.bin := \
> +        $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 89.1
> +  JCG_MAXSIZE := 16449536

I've built a patch to allow kilobytes here:
https://git.openwrt.org/?p=openwrt/staging/adrian.git;a=shortlog;h=refs/heads/staging

I'm currently built-testing it, maybe you can test with
JCG_MAXSIZE := 16064k
too.

Best

Adrian 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20191212/710bf249/attachment.sig>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list