ramips: jcg q20: add lzma-loader and pb-boot variants
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -47,7 +47,9 @@ zte,mf283plus)
|
||||
h3c,tx1800-plus|\
|
||||
h3c,tx1801-plus|\
|
||||
h3c,tx1806|\
|
||||
jcg,q20)
|
||||
jcg,q20|\
|
||||
jcg,q20-lzma-loader|\
|
||||
jcg,q20-pb-boot)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
||||
;;
|
||||
hootoo,ht-tm05|\
|
||||
|
||||
8
target/linux/ramips/dts/mt7621_jcg_q20-lzma-loader.dts
Normal file
8
target/linux/ramips/dts/mt7621_jcg_q20-lzma-loader.dts
Normal file
@@ -0,0 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621_jcg_q20.dts"
|
||||
|
||||
/ {
|
||||
compatible = "jcg,q20-lzma-loader", "mediatek,mt7621-soc";
|
||||
model = "JCG Q20 (lzma-loader)";
|
||||
};
|
||||
61
target/linux/ramips/dts/mt7621_jcg_q20-pb-boot.dts
Normal file
61
target/linux/ramips/dts/mt7621_jcg_q20-pb-boot.dts
Normal file
@@ -0,0 +1,61 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621_jcg_q20.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "jcg,q20-pb-boot", "mediatek,mt7621-soc";
|
||||
model = "JCG Q20 (pb-boot)";
|
||||
};
|
||||
|
||||
&nand {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "Bootloader";
|
||||
reg = <0x0 0x80000>;
|
||||
};
|
||||
|
||||
partition@80000 {
|
||||
label = "Nvram";
|
||||
reg = <0x80000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@c0000 {
|
||||
label = "Bdata";
|
||||
reg = <0xc0000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@100000 {
|
||||
label = "Factory";
|
||||
reg = <0x100000 0x80000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@180000 {
|
||||
label = "crash";
|
||||
reg = <0x180000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1c0000 {
|
||||
label = "crash_log";
|
||||
reg = <0x1c0000 0x40000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@200000 {
|
||||
label = "kernel";
|
||||
reg = <0x200000 0x400000>;
|
||||
};
|
||||
|
||||
partition@600000 {
|
||||
label = "ubi";
|
||||
reg = <0x600000 0x7980000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1,56 +1,11 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include "mt7621_jcg_q20.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "jcg,q20", "mediatek,mt7621-soc";
|
||||
model = "JCG Q20";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_status_red;
|
||||
led-failsafe = &led_status_red;
|
||||
led-running = &led_status_blue;
|
||||
led-upgrade = &led_status_blue;
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_status_red: status_red {
|
||||
label = "red:status";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status_blue: status_blue {
|
||||
label = "blue:status";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
};
|
||||
|
||||
ubi-concat {
|
||||
compatible = "mtd-concat";
|
||||
devices = <&ubiconcat0 &ubiconcat1>;
|
||||
@@ -69,8 +24,6 @@
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
@@ -130,47 +83,3 @@
|
||||
*/
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
mediatek,disable-radar-background;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
mtd-mac-address = <&factory 0x3fff4>;
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@0 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
mtd-mac-address = <&factory 0x3fffa>;
|
||||
};
|
||||
|
||||
port@1 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "jtag", "wdt";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
98
target/linux/ramips/dts/mt7621_jcg_q20.dtsi
Normal file
98
target/linux/ramips/dts/mt7621_jcg_q20.dtsi
Normal file
@@ -0,0 +1,98 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
led-boot = &led_status_red;
|
||||
led-failsafe = &led_status_red;
|
||||
led-running = &led_status_blue;
|
||||
led-upgrade = &led_status_blue;
|
||||
label-mac-device = &gmac0;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_status_red: status_red {
|
||||
label = "red:status";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status_blue: status_blue {
|
||||
label = "blue:status";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
mediatek,disable-radar-background;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
mtd-mac-address = <&factory 0x3fff4>;
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@0 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
mtd-mac-address = <&factory 0x3fffa>;
|
||||
};
|
||||
|
||||
port@1 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "jtag", "wdt";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
@@ -811,6 +811,19 @@ define Device/jcg_q20
|
||||
endef
|
||||
TARGET_DEVICES += jcg_q20
|
||||
|
||||
define Device/jcg_q20-lzma-loader
|
||||
$(Device/uimage-lzma-loader)
|
||||
$(Device/jcg_q20)
|
||||
DEVICE_MODEL += (lzma-loader)
|
||||
endef
|
||||
TARGET_DEVICES += jcg_q20-lzma-loader
|
||||
|
||||
define Device/jcg_q20-pb-boot
|
||||
$(Device/jcg_q20)
|
||||
DEVICE_MODEL += (pb-boot)
|
||||
endef
|
||||
TARGET_DEVICES += jcg_q20-pb-boot
|
||||
|
||||
define Device/jcg_y2
|
||||
$(Device/dsa-migration)
|
||||
$(Device/uimage-lzma-loader)
|
||||
|
||||
@@ -43,6 +43,8 @@ ramips_setup_interfaces()
|
||||
asiarf,ap7621-nv1|\
|
||||
glinet,gl-mt1300|\
|
||||
jcg,q20|\
|
||||
jcg,q20-lzma-loader|\
|
||||
jcg,q20-pb-boot|\
|
||||
jdcloud,re-sp-01b|\
|
||||
lenovo,newifi-d1|\
|
||||
mikrotik,routerboard-m33g|\
|
||||
|
||||
@@ -61,6 +61,8 @@ platform_do_upgrade() {
|
||||
h3c,tx1806|\
|
||||
hiwifi,hc5962|\
|
||||
jcg,q20|\
|
||||
jcg,q20-lzma-loader|\
|
||||
jcg,q20-pb-boot|\
|
||||
linksys,e5600|\
|
||||
linksys,ea7300-v1|\
|
||||
linksys,ea7300-v2|\
|
||||
|
||||
Reference in New Issue
Block a user