Skip to content

Commit eb00fb8

Browse files
parakaadschm
authored andcommitted
ramips: add support for HiLink HLK-7621A evaluation board
Specifications: - SoC: MediaTek MT7621AT - RAM: 256 MB (DDR3) - Flash: 32 MB SPI NOR 44MHz - Switch: 1 WAN, 4 LAN (Gigabit) - LEDs: 1 WAN, 4 LAN (controlled by PHY) - USB Ports: 1 x USB2, 1 x USB3 - WLAN: 1 x 2.4, 5 GHz 866Mbps (MT7612E) - Button: 1 button (reset) - UART Serial: UART1 as console : 57600 baud - Power: 12VDC, 1A Installation: Update openWRT firmware using internal GNUBEE uboot: https://github.com/gnubee-git/GnuBee-MT7621-uboot By HTTP: Initial uboot address is http://10.10.10.123, your address needs to be 10.10.10.x, and mask 255.255.255.0. By TFTP: Uboot is in client mode, the address of the firmware must be tftp://10.10.10.3/uboot.bin Recovery: Manufacturer provides MTK OpenWrt 14.07 source code, compile then flash it by uboot. HLK-7621A is a stamp hole package module for embedded development, users have to design IO boards to use it. MAC addresses: - u-boot-env contains a placeholder address: > mtd_get_mac_ascii u-boot-env ethaddr 03:17:73:ab:cd:ef - phy0 gets a valid-looking address: > cat /sys/class/ieee80211/phy0/macaddress f8:62:aa:**:**:a8 - Calibration data for &pcie2 contains a valid address, however the zeros in the right half look like it's not real: 8c:88:2b:00:00:1b - Since it's an evaluation board and there is no solid information about the MAC address assignment, the ethernet MAC address is left random. Signed-off-by: Chen Yijun <cyjason@bupt.edu.cn> [add keys and pcie nodes to properly support evaluation board] Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> [remove ethernet address, wrap lines properly] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
1 parent 3c97fb4 commit eb00fb8

File tree

2 files changed

+119
-0
lines changed

2 files changed

+119
-0
lines changed
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
// SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
#include "mt7621.dtsi"
4+
5+
#include <dt-bindings/gpio/gpio.h>
6+
#include <dt-bindings/input/input.h>
7+
8+
/ {
9+
compatible = "hilink,hlk-7621a-evb", "mediatek,mt7621-soc";
10+
model = "HiLink HLK-7621A evaluation board";
11+
12+
keys {
13+
compatible = "gpio-keys";
14+
15+
reset {
16+
label = "reset";
17+
gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
18+
linux,code = <KEY_RESTART>;
19+
};
20+
};
21+
};
22+
23+
&spi0 {
24+
status = "okay";
25+
26+
flash@0 {
27+
compatible = "jedec,spi-nor";
28+
reg = <0>;
29+
spi-max-frequency = <44000000>;
30+
31+
partitions {
32+
compatible = "fixed-partitions";
33+
#address-cells = <1>;
34+
#size-cells = <1>;
35+
36+
partition@0 {
37+
label = "u-boot";
38+
reg = <0x0 0x30000>;
39+
read-only;
40+
};
41+
42+
partition@30000 {
43+
label = "u-boot-env";
44+
reg = <0x30000 0x10000>;
45+
read-only;
46+
};
47+
48+
factory: partition@40000 {
49+
label = "factory";
50+
reg = <0x40000 0x10000>;
51+
read-only;
52+
};
53+
54+
partition@50000 {
55+
compatible = "denx,uimage";
56+
label = "firmware";
57+
reg = <0x50000 0x1fb0000>;
58+
};
59+
};
60+
};
61+
};
62+
63+
&switch0 {
64+
ports {
65+
port@0 {
66+
status = "okay";
67+
label = "lan1";
68+
};
69+
70+
port@1 {
71+
status = "okay";
72+
label = "lan2";
73+
};
74+
75+
port@2 {
76+
status = "okay";
77+
label = "lan3";
78+
};
79+
80+
port@3 {
81+
status = "okay";
82+
label = "lan4";
83+
};
84+
85+
port@4 {
86+
status = "okay";
87+
label = "wan";
88+
};
89+
};
90+
};
91+
92+
&pcie {
93+
status = "okay";
94+
};
95+
96+
&pcie2 {
97+
wifi@0,0 {
98+
compatible = "mediatek,mt76";
99+
reg = <0x0000 0 0 0 0>;
100+
mediatek,mtd-eeprom = <&factory 0x8000>;
101+
};
102+
};
103+
104+
&state_default {
105+
gpio {
106+
groups = "wdt";
107+
function = "gpio";
108+
};
109+
};

target/linux/ramips/image/mt7621.mk

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,16 @@ define Device/gnubee_gb-pc2
610610
endef
611611
TARGET_DEVICES += gnubee_gb-pc2
612612

613+
define Device/hilink_hlk-7621a-evb
614+
$(Device/dsa-migration)
615+
$(Device/uimage-lzma-loader)
616+
DEVICE_VENDOR := HiLink
617+
DEVICE_MODEL := HLK-7621A evaluation board
618+
DEVICE_PACKAGES += kmod-mt76x2 kmod-usb3
619+
IMAGE_SIZE := 32448k
620+
endef
621+
TARGET_DEVICES += hilink_hlk-7621a-evb
622+
613623
define Device/hiwifi_hc5962
614624
$(Device/dsa-migration)
615625
BLOCKSIZE := 128k

0 commit comments

Comments
 (0)