ath79 porting of NEtgear R6100

Enrico Mioso mrkiko.rs at gmail.com
Mon Aug 16 08:24:07 PDT 2021


Hello all!!

It's me, again trying to port a device to ath79. And guess where I am stuck ... in the Ethernet part and switch configuration. :)

The device runs ar71xx, I have the io package installed.

I can get replies from the device, but ping doesn't see them (only tcpdump), which means something in the timing or data is wrong.

The system is otherwise able to boot.
Can you help, maybe poiting me where I can look?
At the moment I have no UART access to the system, so I was trying to debug things in ar71xx and take inspiration looking at the DTS files around.

Any help would be greatly apreciated.

Dmesg attached, followed by patch

[    0.000000] Linux version 4.14.241 (builder at buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r11364-ef56c85848)) #0 Thu Jul 29 19:50:28 2021
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 8053cbd0, node_mem_map 81000020
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] random: get_random_bytes called from 0x8053e740 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=R6100 console=ttyS0,115200 mtdparts=ar934x-nfc:128k(u-boot)ro,256k(caldata)ro,256k(caldata-backup),512k(config),512k(pot),2048k(kernel),122240k(ubi),25600k at 0x1a0000(firmware),2048k(language),3072k(traffic_meter) rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 124100K/131072K available (4270K kernel code, 174K rwdata, 528K rodata, 200K init, 213K bss, 6972K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] Clocks: CPU:560.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:40.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6825930166 ns
[    0.000010] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[    0.008326] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.084944] pid_max: default: 32768 minimum: 301
[    0.090076] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.097138] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.106943] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.117459] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.125177] NET: Registered protocol family 16
[    0.131332] MIPS: machine is NETGEAR R6100
[    0.135896] ar71xx: using random MAC address for eth0
[    0.370234] ar71xx: using random MAC address for eth1
[    0.614747] registering PCI controller with io_map_base unset
[    0.634242] PCI host bridge to bus 0000:00
[    0.638622] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.645988] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.651918] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.659155] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.667614] pci 0000:00:00.0: [168c:003c] type 00 class 0x028000
[    0.667630] pci 0000:00:00.0: invalid calibration data
[    0.673153] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    0.673210] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.673293] pci 0000:00:00.0: supports D1 D2
[    0.673513] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.673543] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x101fffff 64bit]
[    0.681345] pci 0000:00:00.0: BAR 6: assigned [mem 0x10200000-0x1020ffff pref]
[    0.692465] clocksource: Switched to clocksource MIPS
[    0.698934] NET: Registered protocol family 2
[    0.703839] IP idents hash table entries: 2048 (order: 2, 16384 bytes)
[    0.711503] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.718984] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.725771] TCP: Hash tables configured (established 1024 bind 1024)
[    0.732685] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.738918] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.745892] NET: Registered protocol family 1
[    0.750571] PCI: CLS 0 bytes, default 32
[    0.753737] Crashlog allocated RAM at address 0x3f00000
[    0.760670] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.772903] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.779113] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.801062] io scheduler noop registered
[    0.805286] io scheduler deadline registered (default)
[    0.811204] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.820156] console [ttyS0] disabled
[    0.844069] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 2500000) is a 16550A
[    0.853265] console [ttyS0] enabled
[    0.860680] bootconsole [early0] disabled
[    0.876330] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xf1
[    0.882831] nand: Micron NAND 128MiB 3,3V 8-bit
[    0.887427] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.895150] Scanning device for bad blocks
[    0.902654] random: fast init done
[    0.986399] 10 cmdlinepart partitions found on MTD device ar934x-nfc
[    0.992872] Creating 10 MTD partitions on "ar934x-nfc":
[    0.998184] 0x000000000000-0x000000020000 : "u-boot"
[    1.004625] 0x000000020000-0x000000060000 : "caldata"
[    1.011846] 0x000000060000-0x0000000a0000 : "caldata-backup"
[    1.019022] 0x0000000a0000-0x000000120000 : "config"
[    1.026179] 0x000000120000-0x0000001a0000 : "pot"
[    1.032321] 0x0000001a0000-0x0000003a0000 : "kernel"
[    1.039489] 0x0000003a0000-0x000007b00000 : "ubi"
[    1.046302] 0x0000001a0000-0x000001aa0000 : "firmware"
[    1.410559] 0x000001aa0000-0x000001ca0000 : "language"
[    1.417543] 0x000001ca0000-0x000001fa0000 : "traffic_meter"
[    1.425388] libphy: Fixed MDIO Bus: probed
[    1.441996] libphy: ag71xx_mdio: probed
[    2.074443] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:00 [uid=004dd042, driver=Generic PHY]
[    2.084327] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: mii
[    2.714352] ag71xx-mdio.1: Found an AR934X built-in switch
[    2.766537] eth1: Atheros AG71xx at 0xba000000, irq 5, mode: gmii
[    2.775023] NET: Registered protocol family 10
[    2.785004] Segment Routing with IPv6
[    2.788830] NET: Registered protocol family 17
[    2.793454] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.807164] 8021q: 802.1Q VLAN Support v1.8
[    2.815275] UBI: auto-attach mtd6
[    2.818670] ubi0: attaching mtd6
[    3.852533] random: crng init done
[    4.332592] ubi0: scanning is finished
[    4.353934] ubi0: attached mtd6 (name "ubi", size 119 MiB)
[    4.359514] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    4.366545] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    4.373447] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    4.380507] ubi0: good PEBs: 955, bad PEBs: 0, corrupted PEBs: 0
[    4.386609] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    4.393951] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1957500130
[    4.403223] ubi0: available PEBs: 0, total reserved PEBs: 955, PEBs reserved for bad PEB handling: 20
[    4.412637] ubi0: background thread "ubi_bgt0d" started, PID 345
[    4.420302] block ubiblock0_0: created from ubi0:0(rootfs)
[    4.425935] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    4.433019] hctosys: unable to open rtc device (rtc0)
[    4.446270] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    4.454563] Freeing unused kernel memory: 200K
[    4.459069] This architecture does not have kernel memory protection.
[    5.047213] init: Console is alive
[    5.050912] init: - watchdog -
[    6.222069] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.282829] usbcore: registered new interface driver usbfs
[    6.288470] usbcore: registered new interface driver hub
[    6.293991] usbcore: registered new device driver usb
[    6.304901] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.313365] ehci-platform: EHCI generic platform driver
[    6.318765] ehci-platform ehci-platform: EHCI Host Controller
[    6.324698] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    6.334843] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    6.362502] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    6.369664] hub 1-0:1.0: USB hub found
[    6.373956] hub 1-0:1.0: 1 port detected
[    6.379195] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.397047] init: - preinit -
[    7.590654] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   10.932802] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 432
[   11.064720] UBIFS (ubi0:1): recovery needed
[   11.279445] UBIFS (ubi0:1): recovery completed
[   11.284118] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   11.292067] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   11.302151] UBIFS (ubi0:1): FS size: 113897472 bytes (108 MiB, 897 LEBs), journal size 5713920 bytes (5 MiB, 45 LEBs)
[   11.312924] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
[   11.319639] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID DDC09BAA-9FAE-4A56-9D71-7F66F4FA7F58, small LPT model
[   11.339496] mount_root: switching to ubifs overlay
[   11.384430] urandom-seed: Seeding with /etc/urandom.seed
[   11.530948] procd: - early -
[   11.534783] procd: - watchdog -
[   12.197399] procd: - watchdog -
[   12.200925] procd: - ubus -
[   12.327826] procd: - init -
[   13.321998] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.408829] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   13.440283] Loading modules backported from Linux version v4.19.193-0-g1722257b8ece
[   13.448115] Backport generated by backports.git v4.19.193-1-0-gaa2cc8ea
[   13.474980] ip_tables: (C) 2000-2006 Netfilter Core Team
[   13.501310] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   13.630066] xt_time: kernel timezone is -0000
[   13.901388] urngd: v1.0.2 started.
[   13.910573] PPP generic driver version 2.4.2
[   13.917734] NET: Registered protocol family 24
[   13.995624] pci 0000:00:00.0: using irq 40 for pin 1
[   14.000682] ath10k 4.19 driver, optimized for CT firmware, probing pci device: 0x3c.
[   14.023401] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[   14.029319] ath10k_pci 0000:00:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
[   14.344037] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/fwcfg-pci-0000:00:00.0.txt failed with error -2
[   14.354764] ath10k_pci 0000:00:00.0: Falling back to user helper
[   14.813367] firmware ath10k!fwcfg-pci-0000:00:00.0.txt: firmware_loading_store: map pages failed
[   14.822650] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:00:00.0.bin failed with error -2
[   14.833538] ath10k_pci 0000:00:00.0: Falling back to user helper
[   15.213403] firmware ath10k!pre-cal-pci-0000:00:00.0.bin: firmware_loading_store: map pages failed
[   15.224984] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/ct-firmware-5.bin failed with error -2
[   15.236164] ath10k_pci 0000:00:00.0: Falling back to user helper
[   15.609131] firmware ath10k!QCA988X!hw2.0!ct-firmware-5.bin: firmware_loading_store: map pages failed
[   15.618878] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/ct-firmware-2.bin failed with error -2
[   15.630040] ath10k_pci 0000:00:00.0: Falling back to user helper
[   15.930604] firmware ath10k!QCA988X!hw2.0!ct-firmware-2.bin: firmware_loading_store: map pages failed
[   15.940316] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-6.bin failed with error -2
[   15.951213] ath10k_pci 0000:00:00.0: Falling back to user helper
[   16.139320] firmware ath10k!QCA988X!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed
[   16.148772] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-5.bin failed with error -2
[   16.159666] ath10k_pci 0000:00:00.0: Falling back to user helper
[   16.346693] firmware ath10k!QCA988X!hw2.0!firmware-5.bin: firmware_loading_store: map pages failed
[   16.356142] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-4.bin failed with error -2
[   16.367037] ath10k_pci 0000:00:00.0: Falling back to user helper
[   16.554737] firmware ath10k!QCA988X!hw2.0!firmware-4.bin: firmware_loading_store: map pages failed
[   16.564185] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-3.bin failed with error -2
[   16.575078] ath10k_pci 0000:00:00.0: Falling back to user helper
[   16.762993] firmware ath10k!QCA988X!hw2.0!firmware-3.bin: firmware_loading_store: map pages failed
[   16.777453] ath10k_pci 0000:00:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043222ff sub 0000:0000
[   16.786853] ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   16.800513] ath10k_pci 0000:00:00.0: firmware ver 10.1-ct-8x-__fW-022-538f0906 api 2 features wmi-10.x,has-wmi-mgmt-tx,mfp,txstatus-noack,wmi-10.x-CT,ratemask-CT,txrate-CT,get-temp-CT,tx-rc-CT,cust-stats-CT,retry-gt2-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT crc32 e1c91a74
[   16.914523] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/board-2.bin failed with error -2
[   16.925158] ath10k_pci 0000:00:00.0: Falling back to user helper
[   17.044142] firmware ath10k!QCA988X!hw2.0!board-2.bin: firmware_loading_store: map pages failed
[   17.081401] ath10k_pci 0000:00:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
[   18.041115] ath10k_pci 0000:00:00.0: 10.1 wmi init: vdevs: 16  peers: 127  tid: 256
[   18.059090] ath10k_pci 0000:00:00.0: wmi print 'P 128 V 8 T 410'
[   18.065515] ath10k_pci 0000:00:00.0: wmi print 'msdu-desc: 1424  sw-crypt: 0 ct-sta: 0'
[   18.073681] ath10k_pci 0000:00:00.0: wmi print 'alloc rem: 20984 iram: 25656'
[   18.130701] ath10k_pci 0000:00:00.0: htt-ver 2.1 wmi-op 2 htt-op 2 cal file max-sta 128 raw 0 hwcrypto 1
[   18.145965] ath10k_pci 0000:00:00.0: NOTE:  Firmware DBGLOG output disabled in debug_mask: 0x10000000
[   18.286278] ath: EEPROM regdomain: 0x0
[   18.286287] ath: EEPROM indicates default country code should be used
[   18.286291] ath: doing EEPROM country->regdmn map search
[   18.286308] ath: country maps to regdmn code: 0x3a
[   18.286314] ath: Country alpha2 being used: US
[   18.286319] ath: Regpair used: 0x3a
[   18.422158] ath: EEPROM regdomain: 0x0
[   18.422167] ath: EEPROM indicates default country code should be used
[   18.422171] ath: doing EEPROM country->regdmn map search
[   18.422189] ath: country maps to regdmn code: 0x3a
[   18.422195] ath: Country alpha2 being used: US
[   18.422200] ath: Regpair used: 0x3a
[   18.436357] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   18.438420] ieee80211 phy1: Atheros AR9340 Rev:2 mem=0xb8100000, irq=47
[   18.450139] kmodloader: done loading kernel modules from /etc/modules.d/*
[   29.680324] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   29.706881] br-lan: port 1(eth1.1) entered blocking state
[   29.712377] br-lan: port 1(eth1.1) entered disabled state
[   29.718234] device eth1.1 entered promiscuous mode
[   29.723143] device eth1 entered promiscuous mode
[   29.759104] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   31.313743] eth1: link up (1000Mbps/Full duplex)
[   31.318465] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   31.326387] br-lan: port 1(eth1.1) entered blocking state
[   31.331886] br-lan: port 1(eth1.1) entered forwarding state
[   31.339313] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready


Patch
-------


commit c2f13646181865bfafafd72892340b884191a709
Author: Enrico Mioso <mrkiko.rs at gmail.com>
Date:   Sat Aug 14 13:19:15 2021 +0200

     WIP R6100

diff --git a/target/linux/ath79/dts/ar9344_netgear_r6100.dts b/target/linux/ath79/dts/ar9344_netgear_r6100.dts
new file mode 100644
index 0000000000..15164d991a
--- /dev/null
+++ b/target/linux/ath79/dts/ar9344_netgear_r6100.dts
@@ -0,0 +1,80 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+// Open questions:
+// I see clock-frequency = <40000000>; in the &ref node.
+// Where does the code use it? Function ar934x_clocks_init in arch/mips/ath79/clock.c seems to be able to read this information via ath79_reset_rr(AR934X_RESET_REG_BOOTSTRAP)
+
+#include "ar9344.dtsi"
+
+&eth0 {
+	status = "okay";
+
+	phy-handle = <&swphy0>;
+	phy-mode = "rgmii";
+	pll-data = <0x06000000 0x00000101 0x00001616>;
+
+	//mac addr??//mac addr incr/decr?
+};
+
+&eth1 {
+	//mac addr?
+
+	gmac-config {
+		device = <&gmac>;
+		switch-phy-swap = <1>;
+	};
+};
+
+&nand {
+	status = "okay";
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition at 0 {
+			label = "u-boot";
+			reg = <0x0 0x20000>;
+			read-only;
+		};
+
+		partition at 20000 {
+			label = "caldata";
+			reg = <0x20000 0x40000>;
+			read-only;
+		};
+
+		partition at 60000 {
+			label = "caldata-backup";
+			reg = <0x60000 0x40000>;
+			read-only;
+		};
+
+		partition at a0000 {
+			label = "config";
+			reg = <0xa0000 0x80000>;
+			read-only;
+		};
+
+		partition at 120000 {
+			label = "pot";
+			reg = <0x120000 0x80000>;
+			read-only;
+		};
+
+		partition at 1a0000 {
+			label = "kernel";
+			reg = <0x1a0000 0x200000>;
+		};
+
+		partition at 3a0000 {
+			label = "ubi";
+			reg = <0x3a0000 0x7760000>;
+		};
+
+		firmware at 1a0000 {
+			label = "firmware";
+			reg = <0x1a0000 0x1900000>;
+		};
+	};
+};
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index 20cb2f60fa..a3a738b2b1 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -170,6 +170,16 @@ define Device/netgear_ath79_nand
    UBINIZE_OPTS := -E 5
  endef

+define Device/netgear_r6100
+  SOC := ar9344
+  DEVICE_MODEL := R6100
+  UIMAGE_MAGIC := 0x36303030
+  NETGEAR_BOARD_ID := R6100
+  NETGEAR_HW_ID := 29764434+0+128+128+2x2+2x2
+  $(Device/netgear_ath79_nand)
+endef
+TARGET_DEVICES += netgear_r6100
+
  define Device/netgear_wndr3700-v4
    SOC := ar9344
    DEVICE_MODEL := WNDR3700
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network
index 7402fc067a..d3fa6132e6 100644
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -32,6 +32,11 @@ ath79_setup_interfaces()
  		ucidef_add_switch "switch0" \
  			"0 at eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
  		;;
+	netgear,r6100)
+		ucidef_set_interface_wan "eth1"
+		ucidef_add_switch "switch0" \
+			"0 at eth0" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
+		;;
  	zyxel,nbg6716)
  		ucidef_add_switch "switch0" \
  			"0 at eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6 at eth1"
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index cac955905a..f7809c045d 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -28,6 +28,7 @@ case "$FIRMWARE" in
  "ath9k-eeprom-pci-0000:00:00.0.bin")
  	case $board in
  	netgear,wndr3700-v4|\
+	netgear,r6100|\
  	netgear,wndr4300|\
  	netgear,wndr4300sw|\
  	netgear,wndr4300tn|\
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index f8cc8f1a2b..d448686bc0 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -18,6 +18,10 @@ case "$FIRMWARE" in
  		caldata_extract "art" 0x5000 0x844
  		ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x0) 1)
  		;;
+	netgear,r6100)
+		ath10kcal_extract "caldata" 0x5000 0x844
+		ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) +2)
+		;;
  	zyxel,nbg6716)
  		caldata_extract "art" 0x5000 0x844
  		ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1)



More information about the openwrt-devel mailing list