Last active
March 15, 2017 13:10
-
-
Save teslamint/dce90a9d6bee4c42234c to your computer and use it in GitHub Desktop.
DTS file for TP-LINK Archer C2 to build OpenWrt firmware (not working for now, work in progress)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/dts-v1/; | |
/include/ "mt7620a.dtsi" | |
/ { | |
compatible = "tplink,c2", "ralink,mt7620a-soc"; | |
model = "TP-Link Archer C2"; | |
chosen { | |
bootargs = "console=ttyS0,115200"; | |
}; | |
palmbus@10000000 { | |
gpio0: gpio@600 { | |
status = "okay"; | |
reg = <0x600 0x20>; | |
}; | |
gpio1: gpio@638 { | |
status = "okay"; | |
reg = <0x600 0x48>; | |
ralink,gpio-base = <24>; | |
}; | |
gpio2: gpio@660 { | |
status = "okay"; | |
reg = <0x600 0x70>; | |
ralink,gpio-base = <40>; | |
}; | |
spi@b00 { | |
status = "okay"; | |
m25p80@0 { | |
#address-cells = <1>; | |
#size-cells = <1>; | |
compatible = "s25fl064k"; | |
reg = <0 0>; | |
linux,modalias = "m25p80", "s25fl064k"; | |
spi-max-frequency = <10000000>; | |
partition@0 { | |
label = "u-boot"; | |
reg = <0x0 0x20000>; | |
read-only; | |
}; | |
partition@20000 { | |
label = "firmware"; | |
reg = <0x20000 0x7a0000>; | |
}; | |
partition@7c0000 { | |
label = "config"; | |
reg = <0x7c0000 0x10000>; | |
read-only; | |
}; | |
rom: partition@7d0000 { | |
label = "rom"; | |
reg = <0x7d0000 0x10000>; | |
read-only; | |
}; | |
partition@7e0000 { | |
label = "romfile"; | |
reg = <0x7e0000 0x10000>; | |
read-only; | |
}; | |
radio: partition@7f0000 { | |
label = "radio"; | |
reg = <0x7f0000 0x10000>; | |
read-only; | |
}; | |
}; | |
}; | |
}; | |
pinctrl { | |
state_default: pinctrl0 { | |
gpio { | |
ralink,group = "i2c", "uartf", "rgmii1", "rgmii2", "wled", "nd_sd", "mdio", "jtag"; | |
ralink,function = "gpio"; | |
}; | |
}; | |
}; | |
ethernet@10100000 { | |
mtd-mac-address = <&rom 0xf100>; | |
port@0 { | |
ralink,fixed-link = <1000 1 1 1>; | |
}; | |
}; | |
ehci@101c0000 { | |
status = "okay"; | |
}; | |
ohci@101c1000 { | |
status = "okay"; | |
}; | |
wmac@10180000 { | |
ralink,mtd-eeprom = <&radio 0>; | |
}; | |
pcie@10140000 { | |
status = "okay"; | |
pcie-bridge { | |
mt76@0,0 { | |
reg = <0x0000 0 0 0 0>; | |
device_type = "pci"; | |
mediatek,mtd-eeprom = <&radio 0x8000>; | |
mediatek,2ghz = <0>; | |
}; | |
mt76@1,0 { | |
reg = <0x0000 0 0 0 0>; | |
device_type = "pci"; | |
mediatek,mtd-eeprom = <&radio 0x0000>; | |
mediatek,5ghz = <0>; | |
}; | |
}; | |
}; | |
rtl8367b { | |
compatible = "realtek,rtl8367b"; | |
gpio-sda = <&gpio1 0 0>; | |
gpio-sck = <&gpio1 1 0>; | |
realtek,extif1 = <1 0 1 1 1 1 1 1 2>; | |
}; | |
gpio-leds { | |
compatible = "gpio-leds"; | |
lan { | |
label = "c2:green:lan"; | |
gpios = <&gpio0 1 1>; | |
}; | |
usb { | |
label = "c2:green:usb"; | |
gpios = <&gpio0 11 1>; | |
}; | |
wps { | |
label = "c2:blue:wps"; | |
gpios = <&gpio1 15 1>; | |
}; | |
wlan { | |
label = "c2:blue:wlan"; | |
gpios = <&gpio2 31 1>; | |
}; | |
}; | |
gpio-keys-polled { | |
compatible = "gpio-keys-polled"; | |
#address-cells = <1>; | |
#size-cells = <0>; | |
poll-interval = <20>; | |
reset { | |
label = "reset"; | |
gpios = <&gpio0 13 1>; | |
linux,code = <0x198>; | |
}; | |
rfkill { | |
label = "rfkill"; | |
gpios = <&gpio0 2 1>; | |
linux,code = <0xf7>; | |
}; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment