|
@@ -0,0 +1,198 @@
|
|
|
+diff --git a/target/linux/ramips/dts/mt7621_jdcloud_luban.dts b/target/linux/ramips/dts/mt7621_jdcloud_luban.dts
|
|
|
+new file mode 100644
|
|
|
+index 0000000..ed1ebed
|
|
|
+--- /dev/null
|
|
|
++++ b/target/linux/ramips/dts/mt7621_jdcloud_luban.dts
|
|
|
+@@ -0,0 +1,171 @@
|
|
|
++#include "mt7621.dtsi"
|
|
|
++
|
|
|
++#include <dt-bindings/gpio/gpio.h>
|
|
|
++#include <dt-bindings/input/input.h>
|
|
|
++
|
|
|
++/ {
|
|
|
++ compatible = "jdcloud,luban", "mediatek,mt7621-soc";
|
|
|
++ model = "JDCloud luban";
|
|
|
++
|
|
|
++ aliases {
|
|
|
++ led-boot = &led_r1;
|
|
|
++ led-failsafe = &led_r1;
|
|
|
++ led-running = &led_g1;
|
|
|
++ led-upgrade = &led_b1;
|
|
|
++ label-mac-device = &gmac0;
|
|
|
++ };
|
|
|
++
|
|
|
++ chosen {
|
|
|
++ bootargs = "console=ttyS0,115200n8";
|
|
|
++ };
|
|
|
++
|
|
|
++ leds {
|
|
|
++ compatible = "gpio-leds";
|
|
|
++
|
|
|
++ led_r1: led_r1 {
|
|
|
++ label = "led_r1";
|
|
|
++ gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
|
|
|
++ default-state = "on";
|
|
|
++ };
|
|
|
++
|
|
|
++ led_b1: led_b1 {
|
|
|
++ label = "led_b1";
|
|
|
++ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
|
|
|
++ };
|
|
|
++
|
|
|
++ led_g1: led_g1 {
|
|
|
++ label = "led_g1";
|
|
|
++ gpios = <&gpio 8 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 15 GPIO_ACTIVE_LOW>;
|
|
|
++ linux,code = <KEY_WPS_BUTTON>;
|
|
|
++ };
|
|
|
++ };
|
|
|
++};
|
|
|
++
|
|
|
++&spi0 {
|
|
|
++ status = "okay";
|
|
|
++
|
|
|
++ flash@0 {
|
|
|
++ compatible = "jedec,spi-nor";
|
|
|
++ reg = <0>;
|
|
|
++ spi-max-frequency = <10000000>;
|
|
|
++ broken-flash-reset;
|
|
|
++
|
|
|
++ partitions {
|
|
|
++ compatible = "fixed-partitions";
|
|
|
++ #address-cells = <1>;
|
|
|
++ #size-cells = <1>;
|
|
|
++
|
|
|
++ partition@0 {
|
|
|
++ label = "u-boot";
|
|
|
++ reg = <0x0 0x40000>;
|
|
|
++ read-only;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@40000 {
|
|
|
++ label = "u-boot-env";
|
|
|
++ reg = <0x40000 0x10000>;
|
|
|
++ read-only;
|
|
|
++ };
|
|
|
++
|
|
|
++ factory: partition@50000 {
|
|
|
++ label = "factory";
|
|
|
++ reg = <0x50000 0x40000>;
|
|
|
++ read-only;
|
|
|
++ };
|
|
|
++
|
|
|
++ partition@90000 {
|
|
|
++ compatible = "denx,uimage";
|
|
|
++ label = "firmware";
|
|
|
++ reg = <0x90000 0xf70000>;
|
|
|
++ };
|
|
|
++ };
|
|
|
++ };
|
|
|
++};
|
|
|
++
|
|
|
++&state_default {
|
|
|
++ gpio {
|
|
|
++ groups = "i2c", "uart2", "uart3";
|
|
|
++ function = "gpio";
|
|
|
++ };
|
|
|
++};
|
|
|
++
|
|
|
++&sdhci {
|
|
|
++ status = "okay";
|
|
|
++};
|
|
|
++
|
|
|
++&gmac0 {
|
|
|
++ nvmem-cells = <&macaddr_factory_3fff4>;
|
|
|
++ nvmem-cell-names = "mac-address";
|
|
|
++};
|
|
|
++
|
|
|
++&switch0 {
|
|
|
++ ports {
|
|
|
++ port@0 {
|
|
|
++ status = "okay";
|
|
|
++ label = "lan4";
|
|
|
++ };
|
|
|
++
|
|
|
++ port@1 {
|
|
|
++ status = "okay";
|
|
|
++ label = "lan3";
|
|
|
++ };
|
|
|
++
|
|
|
++ port@2 {
|
|
|
++ status = "okay";
|
|
|
++ label = "lan2";
|
|
|
++ };
|
|
|
++
|
|
|
++ port@3 {
|
|
|
++ status = "okay";
|
|
|
++ label = "lan1";
|
|
|
++ };
|
|
|
++
|
|
|
++ port@4 {
|
|
|
++ status = "okay";
|
|
|
++ label = "wan";
|
|
|
++ nvmem-cells = <&macaddr_factory_3fffa>;
|
|
|
++ nvmem-cell-names = "mac-address";
|
|
|
++ };
|
|
|
++ };
|
|
|
++};
|
|
|
++
|
|
|
++&pcie {
|
|
|
++ status = "okay";
|
|
|
++};
|
|
|
++
|
|
|
++&pcie1 {
|
|
|
++ wifi@0,0 {
|
|
|
++ compatible = "mediatek,mt76";
|
|
|
++ reg = <0x0000 0 0 0 0>;
|
|
|
++ mediatek,mtd-eeprom = <&factory 0x0>;
|
|
|
++ };
|
|
|
++};
|
|
|
++
|
|
|
++&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>;
|
|
|
++ };
|
|
|
++};
|
|
|
+diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
|
|
|
+index 795f567..02c4da8 100644
|
|
|
+--- a/target/linux/ramips/image/mt7621.mk
|
|
|
++++ b/target/linux/ramips/image/mt7621.mk
|
|
|
+@@ -1816,6 +1816,16 @@ define Device/xiaoyu_xy-c5
|
|
|
+ endef
|
|
|
+ TARGET_DEVICES += xiaoyu_xy-c5
|
|
|
+
|
|
|
++define Device/jdcloud_luban
|
|
|
++ $(Device/dsa-migration)
|
|
|
++ $(Device/uimage-lzma-loader)
|
|
|
++ IMAGE_SIZE := 15808k
|
|
|
++ DEVICE_VENDOR := JDCloud
|
|
|
++ DEVICE_MODEL := Luban 鲁班
|
|
|
++ DEVICE_PACKAGES += kmod-mt7915e uboot-envtools wpad-mini -wpad-basic-wolfssl -coremark -htop -bash -openssh-sftp-server
|
|
|
++endef
|
|
|
++TARGET_DEVICES += jdcloud_luban
|
|
|
++
|
|
|
+ define Device/xzwifi_creativebox-v1
|
|
|
+ $(Device/dsa-migration)
|
|
|
+ IMAGE_SIZE := 32448k
|