add hiker_x9 support
This commit is contained in:
12
target/linux/ramips/dts/rt5350_hiker_x9-full-wifi.dts
Normal file
12
target/linux/ramips/dts/rt5350_hiker_x9-full-wifi.dts
Normal file
@@ -0,0 +1,12 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "rt5350_hiker_x9.dtsi"
|
||||
|
||||
/*
|
||||
* 全功能 Wi-Fi 版本,只调整型号与兼容性,复用基础硬件定义。
|
||||
*/
|
||||
/ {
|
||||
compatible = "hiker,x9-full", "hiker,x9", "ralink,rt5350-soc";
|
||||
model = "Hiker X9 Full";
|
||||
};
|
||||
|
||||
12
target/linux/ramips/dts/rt5350_hiker_x9-minimal.dts
Normal file
12
target/linux/ramips/dts/rt5350_hiker_x9-minimal.dts
Normal file
@@ -0,0 +1,12 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "rt5350_hiker_x9.dtsi"
|
||||
|
||||
/*
|
||||
* 仅覆写型号与兼容性字符串,其余硬件定义继承自基础 hiker_x9.dtsi。
|
||||
*/
|
||||
/ {
|
||||
compatible = "hiker,x9-minimal", "hiker,x9", "ralink,rt5350-soc";
|
||||
model = "Hiker X9 Minimal";
|
||||
};
|
||||
|
||||
12
target/linux/ramips/dts/rt5350_hiker_x9-p910nd.dts
Normal file
12
target/linux/ramips/dts/rt5350_hiker_x9-p910nd.dts
Normal file
@@ -0,0 +1,12 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "rt5350_hiker_x9.dtsi"
|
||||
|
||||
/*
|
||||
* P910ND 打印服务器版本,仅定义自身兼容 ID,硬件细节复用基础 hiker_x9.dtsi。
|
||||
*/
|
||||
/ {
|
||||
compatible = "hiker,x9-print", "hiker,x9", "ralink,rt5350-soc";
|
||||
model = "Hiker X9 Print";
|
||||
};
|
||||
|
||||
176
target/linux/ramips/dts/rt5350_hiker_x9.dtsi
Normal file
176
target/linux/ramips/dts/rt5350_hiker_x9.dtsi
Normal file
@@ -0,0 +1,176 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "rt5350.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
aliases {
|
||||
led-boot = &led_r;
|
||||
led-failsafe = &led_r;
|
||||
led-running = &led_b;
|
||||
led-upgrade = &led_r;
|
||||
label-mac-device = ðernet;
|
||||
};
|
||||
|
||||
/*
|
||||
* 内存自动检测
|
||||
* U-Boot 会检测实际内存大小并传递给内核
|
||||
* 省略 memory 节点,让 bootloader 自动配置
|
||||
*/
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio-export {
|
||||
compatible = "gpio-export";
|
||||
#size-cells = <0>;
|
||||
|
||||
/* 三档切换开关 - 位置编码 */
|
||||
mode_switch_usb {
|
||||
gpio-export,name = "mode_usb";
|
||||
gpio-export,input = <0>;
|
||||
gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
mode_switch_wan {
|
||||
gpio-export,name = "mode_wan";
|
||||
gpio-export,input = <0>;
|
||||
gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
mode_switch_3g {
|
||||
gpio-export,name = "mode_3g";
|
||||
gpio-export,input = <0>;
|
||||
gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
root_hub {
|
||||
gpio-export,name = "root_hub";
|
||||
gpio-export,output = <1>;
|
||||
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
/*
|
||||
* 前面板可控 LED:
|
||||
* - 红灯:系统状态指示
|
||||
* - 蓝灯:电源 / 运行指示
|
||||
* 另有一个硬件自管理的 Wi-Fi 指示灯,无需在 DTS 中定义。
|
||||
*/
|
||||
|
||||
led_r: led_r {
|
||||
label = "red:led_r";
|
||||
function = LED_FUNCTION_STATUS;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_b: led_b {
|
||||
label = "blue:led_b";
|
||||
function = LED_FUNCTION_POWER;
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <10000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "factory";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
eeprom_factory_0: eeprom@0 {
|
||||
reg = <0x0 0x200>;
|
||||
};
|
||||
|
||||
macaddr_factory_4: macaddr@4 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x4 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x50000 0x7b0000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "i2c", "jtag", "uartf";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
ðernet {
|
||||
nvmem-cells = <&macaddr_factory_4 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&esw {
|
||||
mediatek,portmap = <0x2f>;
|
||||
};
|
||||
|
||||
&wmac {
|
||||
nvmem-cells = <&eeprom_factory_0>;
|
||||
nvmem-cell-names = "eeprom";
|
||||
};
|
||||
|
||||
&ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
46
target/linux/ramips/image/hiker.mk
Normal file
46
target/linux/ramips/image/hiker.mk
Normal file
@@ -0,0 +1,46 @@
|
||||
# Hiker RT5350 Device Profiles
|
||||
# Include this file in target/linux/ramips/image/rt305x.mk
|
||||
|
||||
# Common configuration for all Hiker profiles
|
||||
define Device/hiker_hiker-common
|
||||
SOC := rt5350
|
||||
IMAGE_SIZE := 7872k
|
||||
DEVICE_VENDOR := Hiker
|
||||
endef
|
||||
|
||||
# Profile 1: Minimal (基础版)
|
||||
define Device/hiker_x9-minimal
|
||||
$(call Device/hiker_hiker-common)
|
||||
DEVICE_MODEL := Hiker X9 Minimal
|
||||
SUPPORTED_DEVICES := hiker,x9-minimal hiker,x9 HIKER
|
||||
DEVICE_PACKAGES := luci-light luci-theme-bootstrap \
|
||||
luci-i18n-base-zh-cn
|
||||
endef
|
||||
TARGET_DEVICES += hiker_x9-minimal
|
||||
|
||||
# Profile 2: P910ND (打印服务器) ⭐ 推荐
|
||||
define Device/hiker_x9-p910nd
|
||||
$(call Device/hiker_hiker-common)
|
||||
DEVICE_MODEL := Hiker X9 Print
|
||||
SUPPORTED_DEVICES := hiker,x9-print hiker,x9 HIKER
|
||||
DEVICE_PACKAGES := luci-light luci-theme-bootstrap \
|
||||
luci-i18n-base-zh-cn \
|
||||
p910nd luci-app-p910nd luci-i18n-p910nd-zh-cn \
|
||||
kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-printer
|
||||
endef
|
||||
TARGET_DEVICES += hiker_x9-p910nd
|
||||
|
||||
# Profile 3: Full WiFi (打印+完整WiFi)
|
||||
define Device/hiker_x9-full
|
||||
$(call Device/hiker_hiker-common)
|
||||
DEVICE_MODEL := Hiker X9 Full
|
||||
SUPPORTED_DEVICES := hiker,x9-full hiker,x9 HIKER
|
||||
DEVICE_PACKAGES := luci-light luci-theme-bootstrap \
|
||||
luci-i18n-base-zh-cn \
|
||||
p910nd luci-app-p910nd luci-i18n-p910nd-zh-cn \
|
||||
kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-printer \
|
||||
kmod-mac80211 kmod-rt2800-lib kmod-rt2800-mmio kmod-rt2800-soc \
|
||||
kmod-rt2x00-lib kmod-rt2x00-mmio \
|
||||
wpad-mbedtls iw iwinfo
|
||||
endef
|
||||
TARGET_DEVICES += hiker_x9-full
|
||||
Reference in New Issue
Block a user