[LEDE-DEV] new ath79 target
Lucian Cristian
luci at createc.ro
Mon May 7 17:01:28 PDT 2018
On 07.05.2018 09:13, John Crispin wrote:
> Hi,
>
> I have just pushed the new ath79 target to trunk. This will replace
> ar71xx mid term, switching the target over to pure OF. a few boards
> are already supported, would be great if people could start moving
> boards over that they use. I am available to help via ML, mail, irc,
> ... AHB wifi is still missing but we'll get that working the next few
> days.
>
> John
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev
so I tried adding TP-LINK WR1043ND-V3 the same hardware as WR1043ND-V2
I attached the dts files (of course they need more work), the diff to
the tree and the boot log
some advice is needed
Regards
-------------- next part --------------
diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile
index 5f1edcbdb2..a425320d8e 100644
--- a/target/linux/ath79/image/Makefile
+++ b/target/linux/ath79/image/Makefile
@@ -5,6 +5,13 @@ KERNEL_LOADADDR = 0x80060000
DEVICE_VARS += CMDLINE CONSOLE IMAGE_SIZE BOARDNAME LOADER_FLASH_OFFS LOADER_TYPE ATH_SOC
+ifeq ($(SUBTARGET),generic)
+include ./generic.mk
+include ./tp-link.mk
+include ./generic-ubnt.mk
+endif
+include ./legacy.mk
+
define Build/loader-common
rm -rf $@.src
$(MAKE) -C lzma-loader \
diff --git a/target/linux/ath79/image/tp-link.mk b/target/linux/ath79/image/tp-link.mk
index bbe4054143..25e79ae769 100644
--- a/target/linux/ath79/image/tp-link.mk
+++ b/target/linux/ath79/image/tp-link.mk
@@ -30,7 +30,7 @@ define Build/mktplinkfw-combined
-m $(TPLINK_HEADER_VERSION) \
-k $@ \
-o $@.new \
- -s -S \
+ -s \
-c
@mv $@.new $@
endef
@@ -58,12 +58,13 @@ define Device/tplink
TPLINK_HWREV := 0x1
TPLINK_HEADER_VERSION := 1
LOADER_TYPE := gz
+# FILESYSTEM := squashfs
KERNEL := kernel-bin | patch-cmdline | lzma
KERNEL_INITRAMFS := kernel-bin | patch-cmdline | lzma | mktplinkfw-combined
# IMAGES := sysupgrade.bin
IMAGES := sysupgrade.bin factory.bin
IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade
-# IMAGE/factory.bin := append-rootfs | mktplinkfw factory | a
+ IMAGE/factory.bin := append-rootfs | mktplinkfw factory
endef
define Device/tplink-nolzma
@@ -115,5 +116,22 @@ define Device/tl_wr1043nd_v1
DEVICE_PROFILE := TLWR1043
TPLINK_HWID := 0x10430001
endef
+TARGET_DEVICES += tl_wr1043nd_v1
-#TARGET_DEVICES += tl_wr1043nd_v1
+define Device/tl-wr1043nd-v2
+ $(Device/tplink-8mlzma)
+ ATH_SOC := qca9558
+ DEVICE_TITLE := TP-LINK TL-WR1043N/ND v2
+ DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
+ BOARDNAME := TL-WR1043ND-v2
+ DEVICE_PROFILE := TLWR1043
+ TPLINK_HWID := 0x10430002
+endef
+TARGET_DEVICES += tl-wr1043nd-v2
+
+define Device/tl-wr1043nd-v3
+ $(Device/tl-wr1043nd-v2)
+ DEVICE_TITLE := TP-LINK TL-WR1043N/ND v3
+ TPLINK_HWID := 0x10430003
+endef
+TARGET_DEVICES += tl-wr1043nd-v3
-------------- next part --------------
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "qca9557.dtsi"
/ {
compatible = "tplink,tl-wr1043nd-v2", "qca,qca9557";
model = "TP-Link TL-WR1043ND Version 2";
memory at 0 {
device_type = "memory";
reg = <0x0 0x8000000>;
};
extosc: ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-output-names = "ref";
clock-frequency = <40000000>;
};
leds {
compatible = "gpio-leds";
system {
label = "tp-link:green:system";
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
linux,default-trigger = "heartbeat";
};
usb {
label = "tp-link:green:usb";
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
default-state = "off";
};
wifi_green {
label = "tp-link:green:wlan";
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
default-state = "off";
};
wifi_wps {
label = "tp-link:green:wps";
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
default-state = "off";
};
};
keys {
compatible = "gpio-keys-polled";
#address-cells = <1>;
#size-cells = <0>;
poll-interval = <100>;
button at 0 {
label = "Reset button";
linux,code = <KEY_RESTART>;
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
button at 1 {
label = "RFKILL button";
linux,code = <KEY_RFKILL>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
};
//&pcie0 {
// status = "okay";
//};
&uart {
status = "okay";
};
&pll {
clocks = <&extosc>;
};
&spi {
status = "okay";
num-cs = <1>;
flash at 0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "s25sl064a";
reg = <0>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition at 0 {
label = "u-boot";
reg = <0x000000 0x040000>;
read-only;
};
// partition at 1 {
// label = "u-boot-env";
// reg = <0x040000 0x010000>;
// };
// partition at 2 {
// label = "firmware";
// reg = <0x850000 0x7a0000>;
// };
// partition at 3 {
// label = "ART";
// reg = <0xff0000 0x010000>;
// read-only;
// };
};
};
};
&mdio0 {
status = "okay";
phy4: ethernet-phy at 4 {
reg = <4>;
phy-mode = "rgmii-id";
};
};
&mdio1 {
status = "okay";
phy1: ethernet-phy at 1 {
reg = <1>;
phy-mode = "sgmii";
};
};
ð0 {
status = "okay";
phy-handle = <&phy4>;
phy-mode = "rgmii";
};
ð1 {
status = "okay";
phy-handle = <&phy1>;
phy-mode = "sgmii";
};
-------------- next part --------------
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "qca9558_tl-wr1043nd-v2.dts"
/ {
compatible = "tplink,tl-wr1043nd-v3", "qca,qca9557";
model = "TP-Link TL-WR1043ND Version 3";
memory at 0 {
device_type = "memory";
reg = <0x0 0x8000000>;
};
extosc: ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-output-names = "ref";
clock-frequency = <40000000>;
};
};
-------------- next part --------------
[ 0.000000] Linux version 4.14.37 (build at build) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r6854-4aacd6388a)) #0 Mon May 7 16:54:23 2018
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[ 0.000000] SoC: Qualcomm Atheros QCA9558 ver 1 rev 0
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 04000000 @ 00000000 (usable)
[ 0.000000] User-defined physical RAM map:
[ 0.000000] memory: 04000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] OF: fdt: No valid device tree found, continuing without
[ 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-0x0000000003ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),64k(mib0),64k(ART) mem=64M rootfstype=squashfs,jffs2
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 58424K/65536K available (3639K kernel code, 145K rwdata, 868K rodata, 1228K init, 212K bss, 7112K 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] Failed to get CPU node
[ 0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
More information about the Lede-dev
mailing list