mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-16 09:10:02 +00:00
141 lines
4.1 KiB
Diff
141 lines
4.1 KiB
Diff
From e8e31d8d902067efad4e3b00ffc320d6c18deeb4 Mon Sep 17 00:00:00 2001
|
|
From: niyin <yin.ni@gl-inet.com>
|
|
Date: Fri, 27 Jan 2023 23:33:52 -0800
|
|
Subject: [PATCH] support ar750s target
|
|
|
|
---
|
|
.../dts/qca9563_glinet_gl-ar750s-nor-nand.dts | 7 ++-
|
|
.../ath79/dts/qca9563_glinet_gl-ar750s.dtsi | 47 ++++++++++++++-----
|
|
.../499-mtd-spinand-add-support.patch | 19 ++++++++
|
|
3 files changed, 60 insertions(+), 13 deletions(-)
|
|
create mode 100644 target/linux/ath79/patches-5.10/499-mtd-spinand-add-support.patch
|
|
|
|
diff --git a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s-nor-nand.dts b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s-nor-nand.dts
|
|
index 433ed9d6ab..75fa4e4bbb 100644
|
|
--- a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s-nor-nand.dts
|
|
+++ b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s-nor-nand.dts
|
|
@@ -20,7 +20,12 @@
|
|
|
|
partition@460000 {
|
|
label = "nor_reserved";
|
|
- reg = <0x460000 0xba0000>;
|
|
+ reg = <0x460000 0xb80000>;
|
|
+ };
|
|
+
|
|
+ partition@fe0000 {
|
|
+ label = "log";
|
|
+ reg = <0xfe0000 0x020000>;
|
|
};
|
|
};
|
|
|
|
diff --git a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi
|
|
index 878a740cfd..41c6cf5c63 100644
|
|
--- a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi
|
|
+++ b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi
|
|
@@ -10,11 +10,34 @@
|
|
model = "GL.iNet GL-AR750S";
|
|
|
|
aliases {
|
|
- led-boot = &led_power;
|
|
- led-failsafe = &led_power;
|
|
- led-running = &led_power;
|
|
- led-upgrade = &led_power;
|
|
- label-mac-device = ð0;
|
|
+ //led-boot = &led_power;
|
|
+ //led-failsafe = &led_power;
|
|
+ //led-running = &led_power;
|
|
+ //led-upgrade = &led_power;
|
|
+ //label-mac-device = ð0;
|
|
+ };
|
|
+
|
|
+ gl_hw {
|
|
+ compatible = "gl-hw-info";
|
|
+
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <1>;
|
|
+ model = "ar750s";
|
|
+ wan = "eth0.2";
|
|
+ lan = "eth0.1";
|
|
+ flash_size = <128>;
|
|
+ switch-button = "gpio-8";
|
|
+ reset-button = "gpio-2";
|
|
+ usb-port = "1-1";
|
|
+ radio = "radio0 radio1";
|
|
+ nand;
|
|
+ factory_data {
|
|
+ device_mac = "art";
|
|
+ device_ddns = "art", "0x10";
|
|
+ device_sn_bak = "art", "0x20";
|
|
+ device_sn = "art", "0x30";
|
|
+ country_code = "art", "0x88";
|
|
+ };
|
|
};
|
|
|
|
keys {
|
|
@@ -29,10 +52,9 @@
|
|
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
|
};
|
|
|
|
- mode {
|
|
- label = "mode";
|
|
- linux,code = <BTN_0>;
|
|
- linux,input-type = <EV_SW>;
|
|
+ switch {
|
|
+ label = "switch-button";
|
|
+ linux,code = <KEY_SETUP>;
|
|
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
|
|
};
|
|
};
|
|
@@ -41,19 +63,20 @@
|
|
compatible = "gpio-leds";
|
|
|
|
led_power: power {
|
|
- label = "green:power";
|
|
+ label = "gl-ar750s:green:power";
|
|
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
|
+ //default-state = "on";
|
|
default-state = "keep";
|
|
};
|
|
|
|
led_wlan2g: wlan2g {
|
|
- label = "green:wlan2g";
|
|
+ label = "gl-ar750s:green:wlan2g";
|
|
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
|
|
linux,default-trigger = "phy1tpt";
|
|
};
|
|
|
|
led_wlan5g: wlan5g {
|
|
- label = "green:wlan5g";
|
|
+ label = "gl-ar750s:green:wlan5g";
|
|
gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
|
|
linux,default-trigger = "phy0tpt";
|
|
};
|
|
diff --git a/target/linux/ath79/patches-5.10/499-mtd-spinand-add-support.patch b/target/linux/ath79/patches-5.10/499-mtd-spinand-add-support.patch
|
|
new file mode 100644
|
|
index 0000000000..1d161e812e
|
|
--- /dev/null
|
|
+++ b/target/linux/ath79/patches-5.10/499-mtd-spinand-add-support.patch
|
|
@@ -0,0 +1,19 @@
|
|
+--- a/drivers/mtd/nand/spi/gigadevice.c
|
|
++++ b/drivers/mtd/nand/spi/gigadevice.c
|
|
+@@ -284,6 +284,16 @@ static const struct spinand_info gigadev
|
|
+ SPINAND_HAS_QE_BIT,
|
|
+ SPINAND_ECCINFO(&gd5fxgq4_variant2_ooblayout,
|
|
+ gd5fxgq4uexxg_ecc_get_status)),
|
|
++ SPINAND_INFO("GD5F1GQ5UExxG",
|
|
++ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_ADDR, 0x51),
|
|
++ NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1),
|
|
++ NAND_ECCREQ(8, 512),
|
|
++ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
|
|
++ &write_cache_variants,
|
|
++ &update_cache_variants),
|
|
++ SPINAND_HAS_QE_BIT,
|
|
++ SPINAND_ECCINFO(&gd5fxgq4_variant2_ooblayout,
|
|
++ gd5fxgq4uexxg_ecc_get_status)),
|
|
+ SPINAND_INFO("GD5F1GQ4UFxxG",
|
|
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE, 0xb1, 0x48),
|
|
+ NAND_MEMORG(1, 2048, 128, 64, 1024, 20, 1, 1, 1),
|
|
--
|
|
2.17.1
|
|
|