From 7dafa5af80b81fdb86e626940f1678cf4d194917 Mon Sep 17 00:00:00 2001 From: suyuan168 <175338101@qq.com> Date: Mon, 4 Jul 2022 23:32:33 +0800 Subject: [PATCH] fix --- .../etc/hotplug.d/firmware/11-ath10k-caldata | 17 ++- .../arm/boot/dts/qcom-ipq4019-nhx4019.dts | 128 ++++++++++-------- 2 files changed, 78 insertions(+), 67 deletions(-) diff --git a/root/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/root/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index fd2bc2ce..e0e37fa4 100755 --- a/root/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/root/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -110,10 +110,6 @@ case "$FIRMWARE" in unielec,u4019-32m) caldata_extract "0:ART" 0x1000 0x2f20 ;; - nhx,nhx4019) - caldata_extract "0:ART" 0x1000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_binary "0:ART" 0x12) - ;; devolo,magic-2-wifi-next) caldata_extract "ART" 0x1000 0x2f20 ath10k_patch_mac $(mtd_get_mac_ascii APPSBLENV WiFiMacAddress0) @@ -122,6 +118,10 @@ case "$FIRMWARE" in caldata_extract "ART" 0x1000 0x2f20 ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac) ;; + nhx,nhx4019) + caldata_extract "0:ART" 0x1000 0x2f20 + ath10k_patch_mac $(mtd_get_mac_binary "0:ART" 0xc) + ;; engenius,emd1) caldata_extract "0:ART" 0x1000 0x2f20 ath10k_patch_mac $(mtd_get_mac_ascii 0:APPSBLENV wlanaddr) @@ -228,14 +228,9 @@ case "$FIRMWARE" in plasmacloud,pa2200 |\ qxwlan,e2600ac-c1 |\ qxwlan,e2600ac-c2 |\ - nhx,nhx4019 |\ unielec,u4019-32m) caldata_extract "0:ART" 0x5000 0x2f20 ;; - nhx,nhx4019) - caldata_extract "0:ART" 0x5000 0x2f20 - ath10k_patch_mac $(mtd_get_mac_binary "0:ART" 0x18) - ;; devolo,magic-2-wifi-next) caldata_extract "ART" 0x5000 0x2f20 ath10k_patch_mac $(mtd_get_mac_ascii APPSBLENV WiFiMacAddress1) @@ -244,6 +239,10 @@ case "$FIRMWARE" in caldata_extract "ART" 0x5000 0x2f20 ath10k_patch_mac $(mtd_get_mac_ascii bdcfg wlanmac_a) ;; + nhx,nhx4019) + caldata_extract "0:ART" 0x5000 0x2f20 + ath10k_patch_mac $(mtd_get_mac_binary "0:ART" 0x12) + ;; engenius,emd1) caldata_extract "0:ART" 0x5000 0x2f20 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV wlanaddr) +1) diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-nhx4019.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-nhx4019.dts index 02365289..4264673d 100755 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-nhx4019.dts +++ b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-nhx4019.dts @@ -98,7 +98,7 @@ leds { compatible = "gpio-leds"; - led_sys: status { + led_sys: status { label = "nhx:system"; gpio = <&tlmm 4 GPIO_ACTIVE_HIGH>; }; @@ -137,26 +137,6 @@ label = "nhx:xnet"; gpio = <&tlmm 0 GPIO_ACTIVE_HIGH>; }; - - m2power { - label = "nhx:m2power"; - gpio = <&tlmm 48 GPIO_ACTIVE_LOW>; - }; - - m2dcpower { - label = "nhx:m2dcpower"; - gpio = <&tlmm 51 GPIO_ACTIVE_HIGH>; - }; - - pcie1dcpower { - label = "nhx:pcie1dcpower"; - gpio = <&tlmm 50 GPIO_ACTIVE_HIGH>; - }; - - pcie2dcpower { - label = "nhx:pcie2dcpower"; - gpio = <&tlmm 46 GPIO_ACTIVE_HIGH>; - }; }; keys { @@ -168,35 +148,6 @@ linux,code = ; }; }; - - gpio_export { - compatible = "gpio-export"; - #size-cells = <0>; - - m2power { - gpio-export,name = "m2-power"; - gpio-export,output = <1>; - gpio = <&tlmm 48 GPIO_ACTIVE_LOW>; - }; - - m2dcpower { - gpio-export,name = "m2dc-power"; - gpio-export,output = <1>; - gpio = <&tlmm 51 GPIO_ACTIVE_HIGH>; - }; - - pcie1dcpower { - gpio-export,name = "pcie1dc-power"; - gpio-export,output = <1>; - gpio = <&tlmm 50 GPIO_ACTIVE_HIGH>; - }; - - pcie2dcpower { - gpio-export,name = "pcie2dc-power"; - gpio-export,output = <1>; - gpio = <&tlmm 46 GPIO_ACTIVE_HIGH>; - }; - }; }; &blsp_dma { @@ -306,14 +257,6 @@ status = "okay"; perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>; wake-gpio = <&tlmm 40 GPIO_ACTIVE_LOW>; - - /* Free slot for use */ - bridge@0,0 { - reg = <0x00000000 0 0 0 0>; - #address-cells = <3>; - #size-cells = <2>; - ranges; - }; }; &qpic_bam { @@ -321,6 +264,9 @@ }; &tlmm { + pinctrl-0 = <&power_pins>; + pinctrl-names = "default"; + mdio_pins: mdio_pinmux { mux_1 { pins = "gpio6"; @@ -391,6 +337,72 @@ bias-disable; }; }; + + power_pins: power_pinmux { + 3v_pwr_en { + pins = "gpio19"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + output-high; + }; + + m2_pwr_en { + pins = "gpio48"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + output-low; + }; + + m2_reset { + pins = "gpio49"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + output-low; + }; + + m2_dc_en { + pins = "gpio51"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + output-high; + }; + + pcie1_dc_en { + pins = "gpio50"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + output-high; + }; + + pcie1_reset { + pins = "gpio42"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + output-low; + }; + + pcie2_dc_en { + pins = "gpio46"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + output-high; + }; + + pcie2_reset { + pins = "gpio43"; + function = "gpio"; + drive-strength = <2>; + bias-pull-down; + output-low; + }; + }; }; &gmac0 {