0x1000000 0x0 0x0
0x0 0x100000>;
- wifi@0,0 {
+ ath9k: wifi@0,0 {
compatible = "pci168c,0033";
reg = <0x0000 0 0 0 0>;
+ #gpio-cells = <2>;
+ gpio-controller;
+ qca,led-pin = /bits/ 8 <0>;
nvmem-cells = <&cal_caldata_1000>, <&macaddr_uboot_4fc00 0>;
nvmem-cell-names = "calibration", "mac-address";
};
wifi@0,0 {
compatible = "pci168c,0030";
reg = <0x0000 0 0 0 0>;
+ /*
+ * The PCI header of the AR9381 chip is not programmed
+ * correctly by the bootloader and the device uses wrong
+ * data due to that. Replace the broken values with the
+ * correct ones.
+ */
+ device-id = <0x0030>;
+ class-code = <0x028000>;
+ qca,led-pin = /bits/ 8 <0>;
nvmem-cells = <&cal_caldata_5000>, <&macaddr_uboot_4fc00 (-1)>;
nvmem-cell-names = "calibration", "mac-address";
};
leds {
compatible = "gpio-leds";
+ wps {
+ gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
+ label = "tp-link:green:wps";
+ };
+
system_green: system {
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
label = "tp-link:blue:system";
mpic_init(mpic);
}
-#ifdef CONFIG_PCI
-static struct gpio_led tl_wdr4900_v1_wmac_leds_gpio[] = {
- {
- .name = "tp-link:blue:wps",
- .gpio = 1,
- .active_low = 1,
- },
-};
-
-static struct ath9k_platform_data tl_wdr4900_v1_wmac0_data = {
- .led_pin = 0,
- .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,
-};
-
-static void tl_wdr4900_v1_pci_wmac_fixup(struct pci_dev *dev)
-{
- if (!machine_is(tl_wdr4900_v1))
- return;
-
- if (dev->bus->number == 1 &&
- PCI_SLOT(dev->devfn) == 0) {
- dev->dev.platform_data = &tl_wdr4900_v1_wmac0_data;
- return;
- }
-
- if (dev->bus->number == 3 &&
- PCI_SLOT(dev->devfn) == 0 &&
- dev->device == 0xabcd) {
- dev->dev.platform_data = &tl_wdr4900_v1_wmac1_data;
-
- /*
- * The PCI header of the AR9381 chip is not programmed
- * correctly by the bootloader and the device uses wrong
- * data due to that. Replace the broken values with the
- * correct ones.
- */
- dev->device = 0x30;
- dev->class = 0x028000;
-
- pr_info("pci %s: AR9381 fixup applied\n", pci_name(dev));
- }
-}
-
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATHEROS, PCI_ANY_ID,
- tl_wdr4900_v1_pci_wmac_fixup);
-#endif /* CONFIG_PCI */
-
/*
* Setup the architecture
*/