+++ /dev/null
-#!/bin/sh
-
-[ -e /lib/firmware/$FIRMWARE ] && exit 0
-
-. /lib/functions/caldata.sh
-
-board=$(board_name)
-
-case "$FIRMWARE" in
-"pci_wmac0.eeprom")
- case $board in
- tplink,tl-wdr4900-v1)
- caldata_extract "caldata" 0x1000 0x800
- ath9k_patch_mac $(mtd_get_mac_binary u-boot 0x4fc00)
- ;;
- *)
- caldata_die "board $board is not supported yet"
- ;;
- esac
- ;;
-
-"pci_wmac1.eeprom")
- case $board in
- tplink,tl-wdr4900-v1)
- caldata_extract "caldata" 0x5000 0x800
- ath9k_patch_mac $(macaddr_add $(mtd_get_mac_binary u-boot 0x4fc00) -1)
- ;;
- *)
- caldata_die "board $board is not supported yet"
- ;;
- esac
- ;;
-esac
reg = <0x00ff0000 0x00010000>;
label = "caldata";
read-only;
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ cal_caldata_1000: calibration@1000 {
+ reg = <0x1000 0x440>;
+ };
+
+ cal_caldata_5000: calibration@5000 {
+ reg = <0x5000 0x440>;
+ };
+ };
};
};
};
nvmem-cells = <&macaddr_uboot_4fc00 1>;
nvmem-cell-names = "mac-address";
-
};
port@2 {
0x1000000 0x0 0x0
0x1000000 0x0 0x0
0x0 0x100000>;
+
+ wifi@0,0 {
+ compatible = "pci168c,0033";
+ reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&cal_caldata_1000>, <&macaddr_uboot_4fc00 0>;
+ nvmem-cell-names = "calibration", "mac-address";
+ };
};
};
0x1000000 0x0 0x0
0x1000000 0x0 0x0
0x0 0x100000>;
+
+ wifi@0,0 {
+ compatible = "pci168c,0030";
+ reg = <0x0000 0 0 0 0>;
+ nvmem-cells = <&cal_caldata_5000>, <&macaddr_uboot_4fc00 (-1)>;
+ nvmem-cell-names = "calibration", "mac-address";
+ };
};
};
static struct ath9k_platform_data tl_wdr4900_v1_wmac0_data = {
.led_pin = 0,
- .eeprom_name = "pci_wmac0.eeprom",
.leds = tl_wdr4900_v1_wmac_leds_gpio,
.num_leds = ARRAY_SIZE(tl_wdr4900_v1_wmac_leds_gpio),
};
static struct ath9k_platform_data tl_wdr4900_v1_wmac1_data = {
.led_pin = 0,
- .eeprom_name = "pci_wmac1.eeprom",
};
static void tl_wdr4900_v1_pci_wmac_fixup(struct pci_dev *dev)