mirror of
https://github.com/openwrt/openwrt.git
synced 2024-11-29 21:06:33 +08:00
ipq806x: provide WiFI mac-addresses from dts
Use nvmem framework for supported mac-address stored in nvmem cells and drop mac patch function for hotplug script for supported devices. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> [rebase, move to correct node for d7800, include xr500] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
parent
c12ef2f760
commit
f44e933458
@ -22,7 +22,6 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
buffalo,wxr-2533dhp)
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary ART 0x1e)
|
||||
;;
|
||||
edgecore,ecw5410)
|
||||
if [ -b "$(find_mtd_part 0:art)" ]; then
|
||||
@ -40,26 +39,21 @@ case "$FIRMWARE" in
|
||||
nec,wg2600hp |\
|
||||
nec,wg2600hp3)
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary PRODUCTDATA 0x12)
|
||||
;;
|
||||
netgear,d7800 |\
|
||||
netgear,r7500v2 |\
|
||||
netgear,r7800)
|
||||
caldata_extract "art" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) 1)
|
||||
;;
|
||||
netgear,xr500)
|
||||
caldata_extract "art" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary art 0xc)
|
||||
;;
|
||||
tplink,ad7200 |\
|
||||
tplink,c2600)
|
||||
caldata_extract "radio" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 0x8) -1)
|
||||
;;
|
||||
tplink,vr2600v)
|
||||
caldata_extract "ART" 0x1000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 0x0) -1)
|
||||
;;
|
||||
zyxel,nbg6817)
|
||||
if [ -b "$(find_mtd_part 0:art)" ]; then
|
||||
@ -88,7 +82,6 @@ case "$FIRMWARE" in
|
||||
;;
|
||||
buffalo,wxr-2533dhp)
|
||||
caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary ART 0x18)
|
||||
;;
|
||||
linksys,ea7500-v1 |\
|
||||
linksys,ea8500)
|
||||
@ -98,26 +91,21 @@ case "$FIRMWARE" in
|
||||
nec,wg2600hp |\
|
||||
nec,wg2600hp3)
|
||||
caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary PRODUCTDATA 0xc)
|
||||
;;
|
||||
netgear,d7800 |\
|
||||
netgear,r7500v2 |\
|
||||
netgear,r7800)
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) 2)
|
||||
;;
|
||||
netgear,xr500)
|
||||
caldata_extract "art" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary art 0x0)
|
||||
;;
|
||||
tplink,ad7200 |\
|
||||
tplink,c2600)
|
||||
caldata_extract "radio" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary default-mac 0x8)
|
||||
;;
|
||||
tplink,vr2600v)
|
||||
caldata_extract "ART" 0x5000 0x2f20
|
||||
ath10k_patch_mac $(mtd_get_mac_binary default-mac 0x0)
|
||||
;;
|
||||
zyxel,nbg6817)
|
||||
if [ -b "$(find_mtd_part 0:art)" ]; then
|
||||
|
@ -359,6 +359,9 @@
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";
|
||||
|
||||
nvmem-cells = <&macaddr_PRODUCTDATA_12>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -379,6 +382,9 @@
|
||||
|
||||
ieee80211-freq-limit = <2400000 2483000>;
|
||||
qcom,ath10k-calibration-variant = "NEC-Platforms-WG2600HP3";
|
||||
|
||||
nvmem-cells = <&macaddr_PRODUCTDATA_c>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -451,4 +457,12 @@
|
||||
macaddr_factory_6: macaddr@6 {
|
||||
reg = <0x6 0x6>;
|
||||
};
|
||||
|
||||
macaddr_PRODUCTDATA_c: macaddr@c {
|
||||
reg = <0xc 0x6>;
|
||||
};
|
||||
|
||||
macaddr_PRODUCTDATA_12: macaddr@12 {
|
||||
reg = <0x12 0x6>;
|
||||
};
|
||||
};
|
||||
|
@ -255,11 +255,42 @@
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_defaultmac_8>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(-1)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
max-link-speed = <1>;
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_defaultmac_8>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
|
@ -175,6 +175,22 @@
|
||||
reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-0 = <&pcie0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_art_6>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(1)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
@ -183,6 +199,22 @@
|
||||
pinctrl-0 = <&pcie1_pins>;
|
||||
pinctrl-names = "default";
|
||||
max-link-speed = <1>;
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_art_6>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(2)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nand_controller {
|
||||
|
@ -186,6 +186,22 @@
|
||||
reset-gpio = <&qcom_pinmux 3 GPIO_ACTIVE_LOW>;
|
||||
pinctrl-0 = <&pcie0_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_art_6>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(1)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
@ -194,6 +210,22 @@
|
||||
pinctrl-0 = <&pcie1_pins>;
|
||||
pinctrl-names = "default";
|
||||
max-link-speed = <1>;
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_art_6>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(2)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nand_controller {
|
||||
|
@ -284,11 +284,42 @@
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_defaultmac_0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mtd-mac-address-increment = <(-1)>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
max-link-speed = <1>;
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_defaultmac_0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
|
@ -320,11 +320,41 @@
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_PRODUCTDATA_12>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
max-link-speed = <1>;
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_PRODUCTDATA_c>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
@ -395,4 +425,12 @@
|
||||
macaddr_PRODUCTDATA_6: macaddr@6 {
|
||||
reg = <0x6 0x6>;
|
||||
};
|
||||
|
||||
macaddr_PRODUCTDATA_c: macaddr@c {
|
||||
reg = <0xc 0x6>;
|
||||
};
|
||||
|
||||
macaddr_PRODUCTDATA_12: macaddr@12 {
|
||||
reg = <0x12 0x6>;
|
||||
};
|
||||
};
|
||||
|
@ -395,11 +395,41 @@
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_ART_1e>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
status = "okay";
|
||||
max-link-speed = <1>;
|
||||
|
||||
bridge@0,0 {
|
||||
reg = <0x00000000 0 0 0 0>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
wifi@1,0 {
|
||||
compatible = "pci168c,0040";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
nvmem-cells = <&macaddr_ART_18>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&qcom_pinmux {
|
||||
@ -479,4 +509,12 @@
|
||||
macaddr_ART_6: macaddr@6 {
|
||||
reg = <0x6 0x6>;
|
||||
};
|
||||
|
||||
macaddr_ART_18: macaddr@18 {
|
||||
reg = <0x18 0x6>;
|
||||
};
|
||||
|
||||
macaddr_ART_1e: macaddr@1e {
|
||||
reg = <0x1e 0x6>;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user