[source] ramips: use the ralink,mtd-eeprom device tree property
LEDE Commits
lede-commits at lists.infradead.org
Wed Nov 9 12:27:38 PST 2016
mkresin pushed a commit to source.git, branch master:
https://git.lede-project.org/d8dd207ea6f299cfcaef4899f1cade375e694dd5
commit d8dd207ea6f299cfcaef4899f1cade375e694dd5
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Mon Nov 7 22:02:20 2016 +0100
ramips: use the ralink,mtd-eeprom device tree property
Use the ralink,mtd-eeprom instead of invoking the userspace firmware
loader.
Set the label and compatible string according to the the PCI binding
documentation.
Use the wifi at 0,0 label and the pci0,0 compatible string in case the
PCI vendor and device id is unknown. It should work anyway since the
compatible string isn't evaluated (yet).
This commit might fixes the PCIe wireless for the Buffalo WHR-600D.
This board was mentioned in the board 10-rt2x00-eeprom firmware hotplug
script but never had the correct eeprom name set to trigger the
firmware from flash extraction.
Use the usual eeprom for the soc wmac of the Dovado Tiny AC.
Signed-off-by: Mathias Kresin <dev at kresin.me>
---
.../base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom | 17 +++--------------
target/linux/ramips/dts/BR-6475ND.dts | 8 ++++----
target/linux/ramips/dts/CY-SWR1100.dts | 8 ++++----
target/linux/ramips/dts/RT-N56U.dts | 8 ++++----
target/linux/ramips/dts/TINY-AC.dts | 4 ----
target/linux/ramips/dts/WHR-1166D.dts | 6 +++---
target/linux/ramips/dts/WHR-600D.dts | 8 ++++++++
7 files changed, 26 insertions(+), 33 deletions(-)
diff --git a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
index 4c8beac..b44bae9 100644
--- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
+++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom
@@ -43,25 +43,14 @@ board=$(ramips_board_name)
case "$FIRMWARE" in
"soc_wmac.eeprom")
case $board in
- *)
- rt2x00_eeprom_die "Please define mtd-eeprom in $board DTS file!"
- ;;
- esac
- ;;
-
-"rt2x00pci_1_0.eeprom")
- case $board in
- cy-swr1100)
- rt2x00_eeprom_extract "factory" 8192 512
- ;;
- br-6475nd | rt-n56u | whr-600d | whr-1166d)
- rt2x00_eeprom_extract "factory" 32768 512
- ;;
tiny-ac)
wifi_mac=$(mtd_get_mac_ascii u-boot-env INIC_MAC_ADDR)
rt2x00_eeprom_extract "factory" 0 512
rt2x00_eeprom_set_macaddr $wifi_mac
;;
+ *)
+ rt2x00_eeprom_die "Please define mtd-eeprom in $board DTS file!"
+ ;;
esac
;;
esac
diff --git a/target/linux/ramips/dts/BR-6475ND.dts b/target/linux/ramips/dts/BR-6475ND.dts
index 87b048a..2ab2cba 100644
--- a/target/linux/ramips/dts/BR-6475ND.dts
+++ b/target/linux/ramips/dts/BR-6475ND.dts
@@ -157,11 +157,11 @@
pci-bridge at 1 {
status = "okay";
- wmac at 0,0 {
+ wifi at 0,0 {
+ compatible = "pci0,0";
+ reg = <0x10000 0 0 0 0>;
ralink,5ghz = <0>;
- compatible = "ralink,rt2880-pci", "pciclass060400", "pciclass0604";
- reg = < 0x10000 0 0 0 0 >;
- ralink,eeprom = "rt2x00pci_1_0.eeprom";
+ ralink,mtd-eeprom = <&factory 0x8000>;
};
};
};
diff --git a/target/linux/ramips/dts/CY-SWR1100.dts b/target/linux/ramips/dts/CY-SWR1100.dts
index 031d8f0..95827d5 100644
--- a/target/linux/ramips/dts/CY-SWR1100.dts
+++ b/target/linux/ramips/dts/CY-SWR1100.dts
@@ -125,11 +125,11 @@
pci-bridge at 1 {
status = "okay";
- wmac at 0,0 {
+ wifi at 0,0 {
+ compatible = "pci0,0";
+ reg = <0x10000 0 0 0 0>;
ralink,5ghz = <0>;
- compatible = "ralink,rt2880-pci", "pciclass060400", "pciclass0604";
- reg = < 0x10000 0 0 0 0 >;
- ralink,eeprom = "rt2x00pci_1_0.eeprom";
+ ralink,mtd-eeprom = <&factory 0x2000>;
};
};
};
diff --git a/target/linux/ramips/dts/RT-N56U.dts b/target/linux/ramips/dts/RT-N56U.dts
index d3a1f1b..fea73e2 100644
--- a/target/linux/ramips/dts/RT-N56U.dts
+++ b/target/linux/ramips/dts/RT-N56U.dts
@@ -125,10 +125,10 @@
pci-bridge at 1 {
status = "okay";
- wmac at 0,0 {
- compatible = "ralink,rt2880-pci", "pciclass060400", "pciclass0604";
- reg = < 0x10000 0 0 0 0 >;
- ralink,eeprom = "rt2x00pci_1_0.eeprom";
+ wifi at 1814,3091 {
+ compatible = "pci1814,3091";
+ reg = <0x10000 0 0 0 0>;
+ ralink,mtd-eeprom = <&factory 0x8000>;
};
};
};
diff --git a/target/linux/ramips/dts/TINY-AC.dts b/target/linux/ramips/dts/TINY-AC.dts
index 6a21247..81f1ade 100644
--- a/target/linux/ramips/dts/TINY-AC.dts
+++ b/target/linux/ramips/dts/TINY-AC.dts
@@ -145,10 +145,6 @@
mediatek,mt7530 = <1>;
};
-&wmac {
- ralink,eeprom = "rt2x00pci_1_0.eeprom";
-};
-
&pcie {
status = "okay";
};
diff --git a/target/linux/ramips/dts/WHR-1166D.dts b/target/linux/ramips/dts/WHR-1166D.dts
index 0c0f627..fd2e451 100644
--- a/target/linux/ramips/dts/WHR-1166D.dts
+++ b/target/linux/ramips/dts/WHR-1166D.dts
@@ -160,10 +160,10 @@
status = "okay";
pcie-bridge {
- mt76 at 0,0 {
+ wifi at 0,0 {
+ compatible = "pci0,0";
reg = <0x0000 0 0 0 0>;
- device_type = "pci";
- mediatek,mtd-eeprom = <&factory 32768>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
mediatek,2ghz = <0>;
};
};
diff --git a/target/linux/ramips/dts/WHR-600D.dts b/target/linux/ramips/dts/WHR-600D.dts
index 7d26f32..c063355 100644
--- a/target/linux/ramips/dts/WHR-600D.dts
+++ b/target/linux/ramips/dts/WHR-600D.dts
@@ -145,4 +145,12 @@
&pcie {
status = "okay";
+
+ pcie-bridge {
+ wifi at 1814,3091 {
+ compatible = "pci1814,3091";
+ reg = <0x0000 0 0 0 0>;
+ mediatek,mtd-eeprom = <&factory 0x8000>;
+ };
+ };
};
More information about the lede-commits
mailing list