[OpenWrt-Devel] [PATCH v2 2/5] ath79: WNR612v2: improve device support
Michal Cieslakiewicz
michal.cieslakiewicz at wp.pl
Tue Aug 6 10:01:58 EDT 2019
This patch improves ath79 support for Netgear WNR612v2.
Router functionality becomes identical to ar71xx version.
Changes include:
* software control over LAN LEDs via sysfs
* correct MAC addresses for network interfaces
* correct image size in device definition
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz at wp.pl>
---
.../ath79/dts/ar7240_netgear_wnr612-v2.dtsi | 20 +++++++++++++------
target/linux/ath79/image/tiny-netgear.mk | 2 +-
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
index 8e934429a3..b987408fbb 100644
--- a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
+++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
@@ -28,6 +28,10 @@
leds {
compatible = "gpio-leds";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&jtag_disable_pins &switch_led_disable_pins &clks_disable_pins>;
+
power: power {
label = "netgear:green:power";
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
@@ -47,6 +51,10 @@
label = "netgear:green:wan";
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
+ };
+
+ ath9k-leds {
+ compatible = "gpio-leds";
wlan: wlan {
label = "netgear:green:wlan";
@@ -70,7 +78,7 @@
#address-cells = <1>;
#size-cells = <1>;
- uboot: partition at 0 {
+ partition at 0 {
reg = <0x0 0x40000>;
label = "u-boot";
read-only;
@@ -87,7 +95,7 @@
label = "firmware";
};
- partition at 3f0000 {
+ art: partition at 3f0000 {
reg = <0x3f0000 0x10000>;
label = "art";
read-only;
@@ -99,15 +107,13 @@
ð0 {
status = "okay";
- mtd-mac-address = <&uboot 0x1fc00>;
- mtd-mac-address-increment = <(-1)>;
+ mtd-mac-address = <&art 0x00>;
};
ð1 {
status = "okay";
- mtd-mac-address = <&uboot 0x1fc00>;
- mtd-mac-address-increment = <1>;
+ mtd-mac-address = <&art 0x06>;
};
&pcie {
@@ -116,6 +122,8 @@
ath9k: wifi at 0,0 {
compatible = "pci168c,002b";
reg = <0x0000 0 0 0 0>;
+ mtd-mac-address = <&art 0x00>;
+ mtd-mac-address-increment = <1>;
qca,no-eeprom;
#gpio-cells = <2>;
gpio-controller;
diff --git a/target/linux/ath79/image/tiny-netgear.mk b/target/linux/ath79/image/tiny-netgear.mk
index 67ef28c9cc..2f17d79757 100644
--- a/target/linux/ath79/image/tiny-netgear.mk
+++ b/target/linux/ath79/image/tiny-netgear.mk
@@ -4,7 +4,7 @@ define Device/netgear_ar7240
ATH_SOC := ar7240
NETGEAR_KERNEL_MAGIC := 0x32303631
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma
- IMAGE_SIZE := 3904k
+ IMAGE_SIZE := 3712k
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs
$(Device/netgear_ath79)
endef
--
2.22.0
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list