mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-11 07:22:54 +00:00
lantiq: Update TP-Link TD-W89x0 flash layout and convert to nvmem
Flash space is scarce on 8MB devices, this commit adds 124KB of usable space by reusing OEM user configuration and unused space. This commit also switches from userspace script to using nvmem for ath9k calibration data. Signed-off-by: Mustafa Can Elmacı <mustafacan@elmaci.net>
This commit is contained in:
parent
a5f9fad1ac
commit
3d52754eed
@ -6,13 +6,13 @@
|
||||
};
|
||||
|
||||
&boardconfig {
|
||||
cal_boardconfig_21000: calibration@21000 {
|
||||
reg = <0x21000 0x440>;
|
||||
boardconfig_cal: calibration@12000 {
|
||||
reg = <0x12000 0x440>;
|
||||
};
|
||||
};
|
||||
|
||||
&ath9k {
|
||||
compatible = "pci168c,0030";
|
||||
nvmem-cells = <&macaddr_ath9k_cal_f100 2>, <&cal_boardconfig_21000>;
|
||||
nvmem-cells = <&boardconfig_macaddr 2>, <&boardconfig_cal>;
|
||||
nvmem-cell-names = "mac-address", "calibration";
|
||||
};
|
||||
|
@ -29,13 +29,13 @@
|
||||
};
|
||||
|
||||
&boardconfig {
|
||||
cal_boardconfig_21000: calibration@21000 {
|
||||
reg = <0x21000 0x3d8>;
|
||||
boardconfig_cal: calibration@12000 {
|
||||
reg = <0x12000 0x3d8>;
|
||||
};
|
||||
};
|
||||
|
||||
&ath9k {
|
||||
compatible = "pci168c,002e";
|
||||
nvmem-cells = <&macaddr_ath9k_cal_f100 2>, <&cal_boardconfig_21000>;
|
||||
nvmem-cells = <&boardconfig_macaddr 2>, <&boardconfig_cal>;
|
||||
nvmem-cell-names = "mac-address", "calibration";
|
||||
};
|
||||
|
@ -113,7 +113,7 @@
|
||||
};
|
||||
|
||||
ð0 {
|
||||
nvmem-cells = <&macaddr_ath9k_cal_f100 0>;
|
||||
nvmem-cells = <&boardconfig_macaddr 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
@ -230,18 +230,12 @@
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
reg = <0x20000 0x7a0000>;
|
||||
reg = <0x20000 0x7bf000>;
|
||||
label = "firmware";
|
||||
};
|
||||
|
||||
partition@7c0000 {
|
||||
reg = <0x7c0000 0x10000>;
|
||||
label = "config";
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@7d0000 {
|
||||
reg = <0x7d0000 0x30000>;
|
||||
partition@7df000 {
|
||||
reg = <0x7df000 0x21000>;
|
||||
label = "boardconfig";
|
||||
read-only;
|
||||
|
||||
@ -250,11 +244,14 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_ath9k_cal_f100: macaddr@f100 {
|
||||
/* MAC Adress */
|
||||
boardconfig_macaddr: macaddr@100 {
|
||||
compatible = "mac-base";
|
||||
reg = <0xf100 0x6>;
|
||||
reg = <0x100 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
/* <0x7df200 0x8> contains WPS PIN used on OEM firmware, unused in OpenWRT */
|
||||
/* <0x7e0000 0x18> used by U-Boot to store memory settings */
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -25,7 +25,7 @@ define Device/tplink_tdw8970
|
||||
TPLINK_FLASHLAYOUT := 8Mltq
|
||||
TPLINK_HWID := 0x89700001
|
||||
TPLINK_HWREV := 1
|
||||
IMAGE_SIZE := 7680k
|
||||
IMAGE_SIZE := 7804k
|
||||
DEVICE_PACKAGES:= kmod-ath9k wpad-basic-mbedtls kmod-usb-dwc2 kmod-usb-ledtrig-usbport
|
||||
SUPPORTED_DEVICES += TDW8970
|
||||
endef
|
||||
@ -39,7 +39,7 @@ define Device/tplink_tdw8980
|
||||
TPLINK_FLASHLAYOUT := 8Mltq
|
||||
TPLINK_HWID := 0x89800001
|
||||
TPLINK_HWREV := 14
|
||||
IMAGE_SIZE := 7680k
|
||||
IMAGE_SIZE := 7804k
|
||||
DEVICE_PACKAGES:= kmod-ath9k kmod-owl-loader wpad-basic-mbedtls kmod-usb-dwc2 kmod-usb-ledtrig-usbport
|
||||
SUPPORTED_DEVICES += TDW8980
|
||||
endef
|
||||
|
@ -57,7 +57,7 @@ lantiq_setup_macs()
|
||||
;;
|
||||
tplink,tdw8970|\
|
||||
tplink,tdw8980)
|
||||
wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0xf100)" 1)
|
||||
wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0x100)" 1)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user