ramips: jcg q20: add pb-boot variants
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit cc9a7cea38)
This commit is contained in:
@@ -62,6 +62,7 @@ h3c,tx1800-plus|\
|
||||
h3c,tx1801-plus|\
|
||||
h3c,tx1806|\
|
||||
jcg,q20|\
|
||||
jcg,q20-pb-boot|\
|
||||
linksys,e7350|\
|
||||
netgear,wax202|\
|
||||
zyxel,wsm20)
|
||||
|
||||
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,71 +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 {
|
||||
nvmem-cells = <&macaddr_factory_3fff4>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
phy-handle = <ðphy0>;
|
||||
|
||||
nvmem-cells = <&macaddr_factory_3fffa>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&mdio {
|
||||
ethphy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@1 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "jtag", "wdt";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&factory {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_factory_3fff4: macaddr@3fff4 {
|
||||
reg = <0x3fff4 0x6>;
|
||||
};
|
||||
|
||||
macaddr_factory_3fffa: macaddr@3fffa {
|
||||
reg = <0x3fffa 0x6>;
|
||||
};
|
||||
};
|
||||
|
||||
122
target/linux/ramips/dts/mt7621_jcg_q20.dtsi
Normal file
122
target/linux/ramips/dts/mt7621_jcg_q20.dtsi
Normal file
@@ -0,0 +1,122 @@
|
||||
// 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 {
|
||||
nvmem-cells = <&macaddr_factory_3fff4>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
phy-handle = <ðphy0>;
|
||||
|
||||
nvmem-cells = <&macaddr_factory_3fffa>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&mdio {
|
||||
ethphy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@1 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "jtag", "wdt";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&factory {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_factory_3fff4: macaddr@3fff4 {
|
||||
reg = <0x3fff4 0x6>;
|
||||
};
|
||||
|
||||
macaddr_factory_3fffa: macaddr@3fffa {
|
||||
reg = <0x3fffa 0x6>;
|
||||
};
|
||||
};
|
||||
@@ -1320,6 +1320,12 @@ define Device/jcg_q20
|
||||
endef
|
||||
TARGET_DEVICES += jcg_q20
|
||||
|
||||
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)
|
||||
|
||||
@@ -67,6 +67,7 @@ ramips_setup_interfaces()
|
||||
glinet,gl-mt1300|\
|
||||
iptime,a3002mesh|\
|
||||
jcg,q20|\
|
||||
jcg,q20-pb-boot|\
|
||||
jdcloud,re-sp-01b|\
|
||||
lenovo,newifi-d1|\
|
||||
mikrotik,routerboard-m33g|\
|
||||
|
||||
@@ -77,6 +77,7 @@ platform_do_upgrade() {
|
||||
iptime,ax2004m|\
|
||||
iptime,t5004|\
|
||||
jcg,q20|\
|
||||
jcg,q20-pb-boot|\
|
||||
linksys,e5600|\
|
||||
linksys,e7350|\
|
||||
linksys,ea6350-v4|\
|
||||
|
||||
Reference in New Issue
Block a user