-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lantiq: [WIP] Add support for Archer D2 v1 #4059
base: main
Are you sure you want to change the base?
Changes from 2 commits
3da043a
d6bf52a
e44d8ec
00a67cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,260 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT | ||
|
||
#include "ar10.dtsi" | ||
|
||
#include <dt-bindings/input/input.h> | ||
#include <dt-bindings/mips/lantiq_rcu_gphy.h> | ||
|
||
/ { | ||
compatible = "tplink,archer-d2", "lantiq,xway", "lantiq,ar10"; | ||
model = "TP-Link Archer D2 v1"; | ||
|
||
memory@0 { | ||
device_type = "memory"; | ||
reg = <0x0 0x4000000>; | ||
}; | ||
|
||
aliases { | ||
led-boot = &led_power; | ||
led-failsafe = &led_power; | ||
led-running = &led_power; | ||
led-upgrade = &led_power; | ||
|
||
led-dsl = &led_dsl; | ||
led-internet = &led_internet; | ||
led-wifi = &led_wlan; | ||
}; | ||
|
||
keys { | ||
compatible = "gpio-keys-polled"; | ||
poll-interval = <100>; | ||
|
||
reset { | ||
label = "reset"; | ||
gpios = <&gpio 34 GPIO_ACTIVE_LOW>; | ||
linux,code = <KEY_RESTART>; | ||
}; | ||
|
||
wifi { | ||
label = "wifi"; | ||
gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; | ||
linux,code = <KEY_RFKILL>; | ||
linux,input-type = <EV_SW>; | ||
}; | ||
|
||
wps { | ||
label = "wps"; | ||
gpios = <&gpio 0 GPIO_ACTIVE_LOW>; | ||
linux,code = <KEY_WPS_BUTTON>; | ||
}; | ||
}; | ||
|
||
leds: leds { | ||
compatible = "gpio-leds"; | ||
|
||
led_power: power { | ||
label = "white:power"; | ||
gpios = <&gpio 6 GPIO_ACTIVE_LOW>; | ||
default-state = "keep"; | ||
}; | ||
|
||
led_dsl: dsl { | ||
label = "white:dsl"; | ||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
led_internet: internet { | ||
label = "white:internet"; | ||
gpios = <&gpio 5 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
usb { | ||
label = "white:usb"; | ||
gpios = <&gpio 26 GPIO_ACTIVE_LOW>; | ||
trigger-sources = <&ehci_port1>; | ||
linux,default-trigger = "usbport"; | ||
}; | ||
|
||
lan { | ||
label = "white:lan"; | ||
gpios = <&gpio 8 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
led_wlan: wlan { | ||
label = "white:wlan"; | ||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>; | ||
}; | ||
|
||
wps { | ||
label = "white:wps"; | ||
gpios = <&gpio 27 GPIO_ACTIVE_LOW>; | ||
}; | ||
}; | ||
|
||
usb_vbus: regulator-usb-vbus { | ||
compatible = "regulator-fixed"; | ||
|
||
regulator-name = "USB_VBUS"; | ||
|
||
regulator-min-microvolt = <5000000>; | ||
regulator-max-microvolt = <5000000>; | ||
|
||
gpio = <&gpio 25 GPIO_ACTIVE_HIGH>; | ||
enable-active-high; | ||
}; | ||
}; | ||
|
||
&spi { | ||
status = "okay"; | ||
|
||
flash@0 { | ||
compatible = "jedec,spi-nor"; | ||
reg = <1>; | ||
spi-max-frequency = <25000000>; | ||
m25p,fast-read; | ||
|
||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
partition@0 { | ||
reg = <0x0 0x20000>; | ||
label = "u-boot"; | ||
read-only; | ||
}; | ||
|
||
partition@20000 { | ||
reg = <0x20000 0xf90000>; | ||
label = "firmware"; | ||
}; | ||
|
||
partition@fb0000 { | ||
reg = <0xfb0000 0x10000>; | ||
label = "radioDECT"; | ||
read-only; | ||
}; | ||
|
||
partition@fc0000 { | ||
reg = <0xfc0000 0x10000>; | ||
label = "config"; | ||
read-only; | ||
}; | ||
|
||
romfile: partition@fd0000 { | ||
reg = <0xfd0000 0x10000>; | ||
label = "romfile"; | ||
read-only; | ||
}; | ||
|
||
partition@fe0000 { | ||
reg = <0xfe0000 0x10000>; | ||
label = "rom"; | ||
read-only; | ||
}; | ||
|
||
radio: partition@ff0000 { | ||
reg = <0xff0000 0x10000>; | ||
label = "radio"; | ||
read-only; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
ð0 { | ||
pinctrl-names = "default"; | ||
mtd-mac-address = <&romfile 0xf100>; | ||
}; | ||
|
||
&gswip { | ||
pinctrl-0 = <&mdio_pins>; | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
&gphy0 { | ||
lantiq,gphy-mode = <GPHY_MODE_GE>; | ||
}; | ||
&gphy1 { | ||
lantiq,gphy-mode = <GPHY_MODE_GE>; | ||
}; | ||
&gphy2 { | ||
lantiq,gphy-mode = <GPHY_MODE_GE>; | ||
}; | ||
|
||
&gswip_mdio { | ||
phy1: ethernet-phy@1 { | ||
reg = <0x1>; | ||
}; | ||
phy2: ethernet-phy@2 { | ||
reg = <0x2>; | ||
}; | ||
phy4: ethernet-phy@4 { | ||
reg = <0x4>; | ||
}; | ||
phy5: ethernet-phy@5 { | ||
reg = <0x5>; | ||
}; | ||
}; | ||
|
||
&gswip_ports { | ||
port@1 { | ||
reg = <1>; | ||
phy-mode = "internal"; | ||
phy-handle = <&phy1>; | ||
label = "lan1"; | ||
}; | ||
port@2 { | ||
reg = <2>; | ||
phy-mode = "internal"; | ||
phy-handle = <&phy2>; | ||
label = "lan3"; | ||
}; | ||
port@4 { | ||
reg = <4>; | ||
phy-mode = "internal"; | ||
phy-handle = <&phy4>; | ||
label = "lan2"; | ||
}; | ||
port@5 { | ||
reg = <5>; | ||
phy-mode = "rgmii"; | ||
phy-handle = <&phy5>; | ||
label = "lan4"; | ||
}; | ||
}; | ||
|
||
&stp { | ||
status = "okay"; | ||
lantiq,phy1 = <0x2>; | ||
lantiq,phy2 = <0x2>; | ||
lantiq,phy3 = <0x2>; | ||
}; | ||
|
||
&usb0 { | ||
status = "okay"; | ||
vbus-supply = <&usb_vbus>; | ||
}; | ||
|
||
&usb_phy0 { | ||
status = "okay"; | ||
}; | ||
|
||
&pcie0 { | ||
pcie@0 { | ||
reg = <0 0 0 0 0>; | ||
#interrupt-cells = <1>; | ||
#size-cells = <2>; | ||
#address-cells = <3>; | ||
device_type = "pci"; | ||
|
||
wifi@0,0 { | ||
reg = <0 0 0 0 0>; | ||
mediatek,mtd-eeprom = <&radio 0x0000>; | ||
big-endian; | ||
ieee80211-freq-limit = <5000000 6000000>; | ||
mtd-mac-address = <&romfile 0xf100>; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mtd-mac* is gone. nvmem is the replacement. |
||
mtd-mac-address-increment = <2>; | ||
}; | ||
}; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,17 @@ define Device/lantiqTpLink | |
check-size | append-metadata | ||
endef | ||
|
||
define Device/tplink_archer-d2 | ||
$(Device/lantiqTpLink) | ||
DEVICE_MODEL := Archer D2 | ||
DEVICE_VARIANT := v1 | ||
SOC := ar10 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we start to have separate SOC values for xrx200, the SOC variable should be set individually for all devices far clarity. |
||
TPLINK_FLASHLAYOUT := 16Mltq | ||
IMAGE_SIZE := 15808k | ||
DEVICE_PACKAGES:= kmod-mt76x0e wpad-basic-wolfssl kmod-usb-dwc2 kmod-usb-ledtrig-usbport | ||
endef | ||
TARGET_DEVICES += tplink_archer-d2 | ||
|
||
define Device/tplink_tdw8970 | ||
$(Device/dsa-migration) | ||
$(Device/lantiqTpLink) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mtd-eeprom is deprecated in favor of nvmem