diff options
author | Martin Blumenstingl <martin.blumenstingl@googlemail.com> | 2016-11-26 01:01:15 +0100 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2016-11-29 21:40:16 +0100 |
commit | a20616863d32d91163043b6657a63c836bd9c5ba (patch) | |
tree | f61732ad0a3aa68cd56ccd237e08bbdbdcf6bf0f /target/linux/lantiq/dts | |
parent | 448b9b67e15b85994562a2e585028c0595148a98 (diff) | |
download | upstream-a20616863d32d91163043b6657a63c836bd9c5ba.tar.gz upstream-a20616863d32d91163043b6657a63c836bd9c5ba.tar.bz2 upstream-a20616863d32d91163043b6657a63c836bd9c5ba.zip |
lantiq: use ath9k device tree bindings binding/owl-loader
This moves the extraction of the eeprom/calibration data to a hotplug
firmware script. Additionally it modifies all .dts to configure ath9k
directly from within the .dts.
The owl-loader approach enables support on devices with exotic eeprom
data locations (such as unaligned positions on the flash or data
inside an UBI volume).
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
[add ath9k caldata mac address patcher]
[fixes DGN3500 wifi mac]
[fixes BTHOMEHUBV3A wifi mac]
[set invalid mac for BTHOMEHUB2B, FRITZ3370, FRITZ7320 & FRITZ7360SL to restore previous random mac behavior]
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/lantiq/dts')
-rw-r--r-- | target/linux/lantiq/dts/ARV7518PW.dts | 31 | ||||
-rw-r--r-- | target/linux/lantiq/dts/ARV8539PW22.dts | 26 | ||||
-rw-r--r-- | target/linux/lantiq/dts/BTHOMEHUBV2B.dts | 23 | ||||
-rw-r--r-- | target/linux/lantiq/dts/BTHOMEHUBV3A.dts | 22 | ||||
-rw-r--r-- | target/linux/lantiq/dts/BTHOMEHUBV5A.dts | 27 | ||||
-rw-r--r-- | target/linux/lantiq/dts/DGN3500.dtsi | 24 | ||||
-rw-r--r-- | target/linux/lantiq/dts/FRITZ3370.dts | 25 | ||||
-rw-r--r-- | target/linux/lantiq/dts/FRITZ7320.dts | 26 | ||||
-rw-r--r-- | target/linux/lantiq/dts/FRITZ7360SL.dts | 24 | ||||
-rw-r--r-- | target/linux/lantiq/dts/TDW8980.dts | 4 | ||||
-rw-r--r-- | target/linux/lantiq/dts/TDW89X0.dtsi | 41 |
11 files changed, 148 insertions, 125 deletions
diff --git a/target/linux/lantiq/dts/ARV7518PW.dts b/target/linux/lantiq/dts/ARV7518PW.dts index 8a6b620eb7..3b5d38d719 100644 --- a/target/linux/lantiq/dts/ARV7518PW.dts +++ b/target/linux/lantiq/dts/ARV7518PW.dts @@ -79,15 +79,6 @@ gpio-controller; lantiq,shadow = <0x0>; }; - - ath9k_eep { - compatible = "ath9k,eeprom"; - ath,eep-flash = <&boardconfig 0x400>; - ath,mac-offset = <0x16>; - ath,mac-increment = <1>; - ath,pci-slot = <14>; - ath,eep-endian; - }; }; gpio: pinmux@E100B10 { @@ -139,13 +130,6 @@ status = "okay"; gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; }; - - pci@E105400 { - status = "okay"; - lantiq,external-clock; - gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; - req-mask = <0xf>; - }; }; /* @@ -230,3 +214,18 @@ }; }; }; + +&pci0 { + status = "okay"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; + lantiq,external-clock; + req-mask = <0xf>; + + wifi@168c,0029 { + compatible = "pci168c,0029"; + reg = <0x7000 0 0 0 0>; + qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ + mtd-mac-address = <&boardconfig 0x16>; + mtd-mac-address-increment = <1>; + }; +}; diff --git a/target/linux/lantiq/dts/ARV8539PW22.dts b/target/linux/lantiq/dts/ARV8539PW22.dts index 7365cbe5cf..2b82a321e0 100644 --- a/target/linux/lantiq/dts/ARV8539PW22.dts +++ b/target/linux/lantiq/dts/ARV8539PW22.dts @@ -66,15 +66,6 @@ }; }; }; - - ath9k_eep { - compatible = "ath9k,eeprom"; - ath,eep-flash = <&art 0x400>; - ath,mac-offset = <0x16>; - ath,mac-increment = <1>; - ath,pci-slot = <14>; - ath,eep-endian; - }; }; gpio: pinmux@E100B10 { @@ -111,11 +102,6 @@ mtd-mac-address = <&art 0x16>; }; - pci@E105400 { - status = "okay"; - gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; - }; - ifxhcd@E101000 { status = "okay"; gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; @@ -175,3 +161,15 @@ }; }; +&pci0 { + status = "okay"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; + + wifi@168c,0029 { + compatible = "pci168c,0029"; + reg = <0x7000 0 0 0 0>; + qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ + mtd-mac-address = <&art 0x16>; + mtd-mac-address-increment = <1>; + }; +}; diff --git a/target/linux/lantiq/dts/BTHOMEHUBV2B.dts b/target/linux/lantiq/dts/BTHOMEHUBV2B.dts index 28bda1a78d..948267d121 100644 --- a/target/linux/lantiq/dts/BTHOMEHUBV2B.dts +++ b/target/linux/lantiq/dts/BTHOMEHUBV2B.dts @@ -104,14 +104,6 @@ }; }; }; - - ath9k_eep { - compatible = "ath9k,eeprom"; - ath,eep-flash = <&ath9k_cal 0x0000>; - ath,mac-increment = <1>; - ath,pci-slot = <14>; - ath,eep-endian; - }; }; gpio: pinmux@E100B10 { @@ -177,11 +169,6 @@ gpios: stp@E100BB0 { status = "okay"; }; - - pci@E105400 { - status = "okay"; - gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; - }; }; gpio-keys-polled { @@ -262,3 +249,13 @@ }; }; +&pci0 { + status = "okay"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; + + wifi@168c,0027 { + compatible = "pci168c,0027"; + reg = <0x7000 0 0 0 0>; + qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ + }; +}; diff --git a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts index 55b47ecc02..600334feb5 100644 --- a/target/linux/lantiq/dts/BTHOMEHUBV3A.dts +++ b/target/linux/lantiq/dts/BTHOMEHUBV3A.dts @@ -75,13 +75,6 @@ }; }; }; - - ath9k_eep { - compatible = "ath9k,eeprom"; - ath,eep-flash = <&ath9k_cal 0x0000>; - ath,pci-slot = <14>; - ath,eep-endian; - }; }; gpio: pinmux@E100B10 { @@ -134,11 +127,6 @@ status = "okay"; gpios = <&gpio 33 GPIO_ACTIVE_HIGH>; }; - - pci@E105400 { - status = "okay"; - gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; - }; }; gpio-keys-polled { @@ -207,3 +195,13 @@ }; }; }; + +&pci0 { + status = "okay"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; + + ath9k@7000 { + reg = <0x7000 0 0 0 0>; + qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ + }; +}; diff --git a/target/linux/lantiq/dts/BTHOMEHUBV5A.dts b/target/linux/lantiq/dts/BTHOMEHUBV5A.dts index f99d32e071..2dea927095 100644 --- a/target/linux/lantiq/dts/BTHOMEHUBV5A.dts +++ b/target/linux/lantiq/dts/BTHOMEHUBV5A.dts @@ -111,11 +111,6 @@ status = "okay"; gpios = <&gpio 33 GPIO_ACTIVE_HIGH>; }; - - pci@E105400 { - status = "okay"; - gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; - }; }; gphy-xrx200 { @@ -125,14 +120,6 @@ phys = [ 00 01 ]; }; - ath9k_eep { - compatible = "ath9k,eeprom"; - ath,eep-flash = <&caldata 0x1000>; - ath,mac-offset = <0x110c>; - ath,mac-increment = <2>; - ath,pci-slot = <0xe>; /* 14 */ - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -211,6 +198,20 @@ }; }; +&pci0 { + status = "okay"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; + + wifi@168c,002d { + compatible = "pci168c,002d"; + reg = <0x7000 0 0 0 0>; + qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ + qca,disable-5ghz; + mtd-mac-address = <&caldata 0x110c>; + mtd-mac-address-increment = <2>; + }; +}; + ð0 { lan: interface@0 { compatible = "lantiq,xrx200-pdi"; diff --git a/target/linux/lantiq/dts/DGN3500.dtsi b/target/linux/lantiq/dts/DGN3500.dtsi index 1d0d71cdae..5528d5994b 100644 --- a/target/linux/lantiq/dts/DGN3500.dtsi +++ b/target/linux/lantiq/dts/DGN3500.dtsi @@ -69,19 +69,6 @@ ifxhcd@E101000 { status = "okay"; }; - - pci@E105400 { - status = "okay"; - gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; - }; - }; - - ath9k_eep { - compatible = "ath9k,eeprom"; - ath,eep-flash = <&ath9k_cal 0xf000>; - ath,pci-slot = <14>; - ath,eep-endian; - ath,eep-swap; }; rtl8366rb { @@ -153,6 +140,17 @@ }; }; +&pci0 { + status = "okay"; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; + + wifi@168c,0029 { + compatible = "pci168c,0029"; + reg = <0x7000 0 0 0 0>; + qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ + }; +}; + &spi { pinctrl-names = "default"; pinctrl-0 = <&pins_spi_default>; diff --git a/target/linux/lantiq/dts/FRITZ3370.dts b/target/linux/lantiq/dts/FRITZ3370.dts index 2580674ba9..1e2e90ca1b 100644 --- a/target/linux/lantiq/dts/FRITZ3370.dts +++ b/target/linux/lantiq/dts/FRITZ3370.dts @@ -118,13 +118,6 @@ }; }; - ath9k_eep { - compatible = "ath9k,eeprom"; - ath,eep-flash = <&ath9k_cal 0x985>; - ath,eep-endian; - ath,eep-swap; - }; - gphy-xrx200 { compatible = "lantiq,phy-xrx200"; firmware = "lantiq/vr9_phy11g_a1x.bin"; @@ -196,7 +189,7 @@ reg = <4 0>; spi-max-frequency = <1000000>; - ath9k_cal: partition@0 { + partition@0 { reg = <0x0 0x20000>; label = "urlader"; read-only; @@ -275,3 +268,19 @@ }; }; }; + +&pcie0 { + pcie@0 { + reg = <0 0 0 0 0>; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + device_type = "pci"; + + wifi@0,0 { + compatible = "pci0,0"; + reg = <0 0 0 0 0>; + qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */ + }; + }; +}; diff --git a/target/linux/lantiq/dts/FRITZ7320.dts b/target/linux/lantiq/dts/FRITZ7320.dts index 4cc4915312..4eb5fc4fe3 100644 --- a/target/linux/lantiq/dts/FRITZ7320.dts +++ b/target/linux/lantiq/dts/FRITZ7320.dts @@ -65,14 +65,6 @@ }; }; - ath9k_eep { - compatible = "ath9k,eeprom"; - ath,eep-flash = <&ath9k_cal 0x985>; - ath,device-id = /bits/ 16 <0xff1d 0x2d>; - ath,eep-endian; - ath,eep-swap; - }; - gpio: pinmux@E100B10 { pinctrl-names = "default"; pinctrl-0 = <&state_default>; @@ -103,12 +95,6 @@ ifxhcd@E101000 { status = "okay"; }; - - pci@E105400 { - status = "okay"; - req-mask = <0xf>; - gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; - }; }; gpio-keys-polled { @@ -158,3 +144,15 @@ }; }; }; + +&pci0 { + status = "okay"; + req-mask = <0xf>; + gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>; + + wifi@0,0 { + compatible = "pci0,0"; + reg = <0x7000 0 0 0 0>; + qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */ + }; +}; diff --git a/target/linux/lantiq/dts/FRITZ7360SL.dts b/target/linux/lantiq/dts/FRITZ7360SL.dts index 2a90a7f8c2..e54b0e27ab 100644 --- a/target/linux/lantiq/dts/FRITZ7360SL.dts +++ b/target/linux/lantiq/dts/FRITZ7360SL.dts @@ -96,14 +96,6 @@ }; }; - ath9k_eep { - compatible = "ath9k,eeprom"; - ath,eep-flash = <&urlader 0x985>; - ath,eep-endian; - ath,eep-swap; - ath,pci-slot = <0>; - }; - gphy-xrx200 { compatible = "lantiq,phy-xrx200"; firmware = "lantiq/vr9_phy11g_a2x.bin"; @@ -217,3 +209,19 @@ }; }; }; + +&pcie0 { + pcie@0 { + reg = <0 0 0 0 0>; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + device_type = "pci"; + + wifi@168c,002e { + compatible = "pci168c,002e"; + reg = <0 0 0 0 0>; + qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */ + }; + }; +}; diff --git a/target/linux/lantiq/dts/TDW8980.dts b/target/linux/lantiq/dts/TDW8980.dts index 95eec58508..0796b2b234 100644 --- a/target/linux/lantiq/dts/TDW8980.dts +++ b/target/linux/lantiq/dts/TDW8980.dts @@ -25,10 +25,6 @@ }; }; - ath9k_eep { - ath,pci-slot = <0>; - }; - gpio-leds { wifi2 { label = "tdw8980:green:wlan5ghz"; diff --git a/target/linux/lantiq/dts/TDW89X0.dtsi b/target/linux/lantiq/dts/TDW89X0.dtsi index 6447451d18..153d96eff8 100644 --- a/target/linux/lantiq/dts/TDW89X0.dtsi +++ b/target/linux/lantiq/dts/TDW89X0.dtsi @@ -14,6 +14,7 @@ led-dsl = &dsl; led-internet = &internet; + led-wifi = &wifi; led-usb = &usb0; led-usb2 = &usb2; }; @@ -83,16 +84,6 @@ phys = [ 00 01 ]; }; - ath9k_eep { - compatible = "ath9k,eeprom"; - ath,eep-flash = <&ath9k_cal 0x21000>; - ath,mac-offset = <0xf100>; - ath,mac-increment = <2>; - ath,led-pin = <0>; - ath,disable-5ghz; - ath,led-active-high; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -144,6 +135,15 @@ gpios = <&gpio 37 GPIO_ACTIVE_HIGH>; }; }; + + wifi-leds { + compatible = "gpio-leds"; + + wifi: wifi { + label = "tdw89x0:green:wifi"; + gpios = <&ath9k 0 GPIO_ACTIVE_HIGH>; + }; + }; }; &spi { @@ -249,3 +249,24 @@ }; }; }; + +&pcie0 { + pcie@0 { + reg = <0 0 0 0 0>; + #interrupt-cells = <1>; + #size-cells = <2>; + #address-cells = <3>; + device_type = "pci"; + + ath9k: wifi@168c,002e { + compatible = "pci168c,002e"; + reg = <0 0 0 0 0>; + #gpio-cells = <2>; + gpio-controller; + qca,no-eeprom; + qca,disable-5ghz; + mtd-mac-address = <&ath9k_cal 0xf100>; + mtd-mac-address-increment = <2>; + }; + }; +}; |