kirkwood: sync with OpenWrt snapshot
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
This commit is contained in:
parent
57b65ed985
commit
37b3bb4596
@ -11,7 +11,6 @@ BOARD:=kirkwood
|
||||
BOARDNAME:=Marvell Kirkwood
|
||||
FEATURES:=usb nand squashfs ramdisk
|
||||
CPU_TYPE:=xscale
|
||||
MAINTAINER:=Luka Perkov <luka@openwrt.org>
|
||||
|
||||
KERNEL_PATCHVER:=5.4
|
||||
|
||||
@ -19,6 +18,6 @@ include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
KERNELNAME:=zImage dtbs
|
||||
|
||||
DEFAULT_PACKAGES += uboot-envtools
|
||||
DEFAULT_PACKAGES += uboot-envtools kmod-usb2
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
|
||||
@ -10,44 +10,12 @@ board_config_update
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
"cloudengines,pogoe02")
|
||||
ucidef_set_led_default "health" "health" "green:health" "1"
|
||||
ucidef_set_led_default "fault" "fault" "orange:fault" "1"
|
||||
iom,ix2-200)
|
||||
ucidef_set_led_timer "health" "health" "status:white:rebuild_led" "200" "800"
|
||||
;;
|
||||
"iom,ix2-200")
|
||||
ucidef_set_led_timer "health" "health" "white:rebuild_led" "200" "800"
|
||||
;;
|
||||
"linksys,audi")
|
||||
ucidef_set_led_default "power" "power" "green:power" "1"
|
||||
;;
|
||||
"linksys,viper")
|
||||
ucidef_set_led_default "health" "health" "white:health" "1"
|
||||
ucidef_set_led_default "pulse" "pulse" "white:pulse" "1"
|
||||
;;
|
||||
"raidsonic,ib-nas62x0")
|
||||
ucidef_set_led_default "health" "health" "green:os" "1"
|
||||
ucidef_set_led_default "fault" "fault" "red:os" "1"
|
||||
;;
|
||||
"seagate,dockstar")
|
||||
ucidef_set_led_default "health" "health" "green:health" "1"
|
||||
ucidef_set_led_default "fault" "fault" "orange:fault" "1"
|
||||
;;
|
||||
"seagate,goflexhome"|\
|
||||
"seagate,goflexnet")
|
||||
ucidef_set_led_default "health" "health" "green:health" "1"
|
||||
ucidef_set_led_default "fault" "fault" "orange:fault" "0"
|
||||
;;
|
||||
"zyxel,nsa310b")
|
||||
ucidef_set_led_default "health" "health" "green:sys" "1"
|
||||
ucidef_set_led_usbhost "usb" "USB" "green:usb"
|
||||
ucidef_set_led_ataport "hdd" "HDD" "green:hdd" "1"
|
||||
ucidef_set_led_ataport "esata" "eSata" "green:esata" "2"
|
||||
;;
|
||||
"zyxel,nsa325")
|
||||
ucidef_set_led_default "health" "health" "green:sys" "1"
|
||||
ucidef_set_led_usbhost "usb" "USB" "green:usb"
|
||||
ucidef_set_led_ataport "hdd1" "HDD1" "green:sata1" "1"
|
||||
ucidef_set_led_ataport "hdd2" "HDD2" "green:sata2" "2"
|
||||
linksys,e4200-v2|\
|
||||
linksys,ea4500)
|
||||
ucidef_set_led_default "pulse" "pulse" "viper:white:pulse" "1"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
@ -11,6 +11,9 @@ board_config_update
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
"checkpoint,l-50")
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 dmz" "eth0"
|
||||
;;
|
||||
"cisco,on100")
|
||||
ucidef_set_interface_lan "eth0 eth1"
|
||||
;;
|
||||
@ -19,13 +22,16 @@ case "$board" in
|
||||
"iom,iconnect-1.1"|\
|
||||
"iom,ix2-200"|\
|
||||
"raidsonic,ib-nas62x0"|\
|
||||
"seagate,blackarmor-nas220"|\
|
||||
"seagate,dockstar"|\
|
||||
"seagate,goflexhome"|\
|
||||
"seagate,goflexnet")
|
||||
"seagate,goflexnet"|\
|
||||
"zyxel,nsa310s")
|
||||
ucidef_set_interface_lan "eth0" "dhcp"
|
||||
;;
|
||||
"linksys,audi"|\
|
||||
"linksys,viper")
|
||||
"linksys,e4200-v2"|\
|
||||
"linksys,ea3500"|\
|
||||
"linksys,ea4500")
|
||||
ucidef_set_interfaces_lan_wan "ethernet1 ethernet2 ethernet3 ethernet4" "internet"
|
||||
ucidef_set_interface_macaddr "wan" $( mtd_get_mac_ascii u_env eth1addr )
|
||||
;;
|
||||
|
||||
18
target/linux/kirkwood/base-files/etc/board.d/03_gpio_switches
Executable file
18
target/linux/kirkwood/base-files/etc/board.d/03_gpio_switches
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
checkpoint,l-50)
|
||||
ucidef_add_gpio_switch "mpcie-rst" "mPCIE Card reset" "502" "1"
|
||||
ucidef_add_gpio_switch "exp-card-rst" "Express Card reset" "497" "1"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
@ -1,55 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2014 OpenWrt.org
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/leds.sh
|
||||
|
||||
get_status_led() {
|
||||
case $(board_name) in
|
||||
cisco,on100)
|
||||
status_led="on100:green:health"
|
||||
;;
|
||||
cloudengines,pogoe02)
|
||||
status_led="pogo_e02:orange:fault"
|
||||
;;
|
||||
cloudengines,pogoplugv4)
|
||||
status_led="pogoplugv4:green:health"
|
||||
;;
|
||||
iom,ix2-200)
|
||||
status_led="status:white:power_led"
|
||||
;;
|
||||
linksys,audi)
|
||||
status_led="audi:green:power"
|
||||
;;
|
||||
linksys,viper)
|
||||
status_led="viper:white:health"
|
||||
;;
|
||||
seagate,dockstar|\
|
||||
seagate,goflexhome|\
|
||||
seagate,goflexnet)
|
||||
status_led="status:orange:fault"
|
||||
;;
|
||||
zyxel,nsa310b)
|
||||
status_led="nsa310:green:sys"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
set_state() {
|
||||
get_status_led
|
||||
|
||||
case "$1" in
|
||||
preinit)
|
||||
status_led_blink_preinit
|
||||
;;
|
||||
failsafe)
|
||||
status_led_blink_failsafe
|
||||
;;
|
||||
preinit_regular)
|
||||
status_led_blink_preinit_regular
|
||||
;;
|
||||
done)
|
||||
status_led_on
|
||||
;;
|
||||
esac
|
||||
}
|
||||
13
target/linux/kirkwood/base-files/etc/init.d/bootcount
Executable file
13
target/linux/kirkwood/base-files/etc/init.d/bootcount
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
|
||||
boot() {
|
||||
case $(board_name) in
|
||||
linksys,e4200-v2|\
|
||||
linksys,ea3500|\
|
||||
linksys,ea4500)
|
||||
mtd resetbc s_env || true
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@ -11,6 +11,20 @@ boot() {
|
||||
path_to_hwmon='/sys/class/hwmon/hwmon0'
|
||||
echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
|
||||
;;
|
||||
seagate,blackarmor-nas220)
|
||||
path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0'
|
||||
# adt7476 fan control chip. 3 temp sensors. Set to 1/4 speed at 35C and max speed at 48C.
|
||||
echo 7 > "$path_to_hwmon/pwm1_auto_channels_temp"
|
||||
echo 64 > "$path_to_hwmon/pwm1_auto_point1_pwm"
|
||||
echo 255 > "$path_to_hwmon/pwm1_auto_point2_pwm"
|
||||
echo 35000 > "$path_to_hwmon/temp1_auto_point1_temp"
|
||||
echo 48000 > "$path_to_hwmon/temp1_auto_point2_temp"
|
||||
echo 35000 > "$path_to_hwmon/temp2_auto_point1_temp"
|
||||
echo 48000 > "$path_to_hwmon/temp2_auto_point2_temp"
|
||||
echo 35000 > "$path_to_hwmon/temp3_auto_point1_temp"
|
||||
echo 48000 > "$path_to_hwmon/temp3_auto_point2_temp"
|
||||
echo 2 > "$path_to_hwmon/pwm1_enable"
|
||||
;;
|
||||
zyxel,nsa310b)
|
||||
path_to_hwmon='/sys/devices/platform/ocp@f1000000/f1011000.i2c/i2c-0/0-002e/hwmon/hwmon0'
|
||||
echo 2 > "$path_to_hwmon/pwm1_enable" # fan is on pwm1
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
|
||||
START=97
|
||||
boot() {
|
||||
. /lib/functions.sh
|
||||
|
||||
case $(board_name) in
|
||||
linksys,audi|linksys,viper)
|
||||
# make sure auto_recovery in uboot is always on
|
||||
AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`"
|
||||
if [ "$AUTO_RECOVERY_ENA" != "yes" ] ; then
|
||||
fw_setenv auto_recovery yes
|
||||
fi
|
||||
# reset the boot counter
|
||||
mtd resetbc s_env
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
preinit_set_mac_address() {
|
||||
local mac
|
||||
|
||||
case $(board_name) in
|
||||
checkpoint,l-50)
|
||||
mac=$(mtd_get_mac_ascii bootldr-env lan1_mac_addr)
|
||||
|
||||
ip link set dev lan1 address $mac 2>/dev/null
|
||||
ip link set dev lan2 address $(macaddr_add $mac 1) 2>/dev/null
|
||||
ip link set dev lan3 address $(macaddr_add $mac 2) 2>/dev/null
|
||||
ip link set dev lan4 address $(macaddr_add $mac 3) 2>/dev/null
|
||||
ip link set dev lan5 address $(macaddr_add $mac 4) 2>/dev/null
|
||||
ip link set dev lan6 address $(macaddr_add $mac 5) 2>/dev/null
|
||||
ip link set dev lan7 address $(macaddr_add $mac 6) 2>/dev/null
|
||||
ip link set dev lan8 address $(macaddr_add $mac 7) 2>/dev/null
|
||||
ip link set dev dmz address $(macaddr_add $mac 8) 2>/dev/null
|
||||
ip link set dev dsl address $(macaddr_add $mac 9) 2>/dev/null
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
boot_hook_add preinit_main preinit_set_mac_address
|
||||
@ -3,23 +3,45 @@
|
||||
#
|
||||
|
||||
linksys_get_target_firmware() {
|
||||
cur_boot_part=`/usr/sbin/fw_printenv -n boot_part`
|
||||
target_firmware=""
|
||||
if [ "$cur_boot_part" = "1" ]
|
||||
then
|
||||
# current primary boot - update alt boot
|
||||
target_firmware="kernel2"
|
||||
fw_setenv boot_part 2
|
||||
fw_setenv bootcmd "run altnandboot"
|
||||
elif [ "$cur_boot_part" = "2" ]
|
||||
then
|
||||
# current alt boot - update primary boot
|
||||
target_firmware="kernel1"
|
||||
fw_setenv boot_part 1
|
||||
fw_setenv bootcmd "run nandboot"
|
||||
|
||||
local cur_boot_part mtd_ubi0
|
||||
|
||||
cur_boot_part=$(/usr/sbin/fw_printenv -n boot_part)
|
||||
if [ -z "${cur_boot_part}" ] ; then
|
||||
mtd_ubi0=$(cat /sys/devices/virtual/ubi/ubi0/mtd_num)
|
||||
case $(egrep ^mtd${mtd_ubi0}: /proc/mtd | cut -d '"' -f 2) in
|
||||
kernel|rootfs)
|
||||
cur_boot_part=1
|
||||
;;
|
||||
alt_kernel|alt_rootfs)
|
||||
cur_boot_part=2
|
||||
;;
|
||||
esac
|
||||
>&2 printf "Current boot_part='%s' selected from ubi0/mtd_num='%s'" \
|
||||
"${cur_boot_part}" "${mtd_ubi0}"
|
||||
fi
|
||||
|
||||
echo "$target_firmware"
|
||||
case $cur_boot_part in
|
||||
1)
|
||||
fw_setenv -s - <<-EOF
|
||||
boot_part 2
|
||||
bootcmd "run altnandboot"
|
||||
EOF
|
||||
printf "kernel2"
|
||||
return
|
||||
;;
|
||||
2)
|
||||
fw_setenv -s - <<-EOF
|
||||
boot_part 1
|
||||
bootcmd "run nandboot"
|
||||
EOF
|
||||
printf "kernel1"
|
||||
return
|
||||
;;
|
||||
*)
|
||||
return
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
linksys_get_root_magic() {
|
||||
|
||||
@ -11,8 +11,9 @@ platform_do_upgrade() {
|
||||
local board="$(board_name)"
|
||||
|
||||
case "$board" in
|
||||
"linksys,audi"|\
|
||||
"linksys,viper")
|
||||
linksys,e4200-v2|\
|
||||
linksys,ea3500|\
|
||||
linksys,ea4500)
|
||||
platform_do_upgrade_linksys "$ARGV"
|
||||
;;
|
||||
*)
|
||||
|
||||
@ -0,0 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "kirkwood-linksys-viper.dts"
|
||||
|
||||
/ {
|
||||
model = "Linksys E4200 v2 (Viper)";
|
||||
compatible = "linksys,e4200-v2", "linksys,viper", "marvell,kirkwood-88f6282", "marvell,kirkwood";
|
||||
};
|
||||
@ -15,8 +15,8 @@
|
||||
#include "kirkwood-6282.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Linksys Audi (EA3500)";
|
||||
compatible = "linksys,audi", "marvell,kirkwood-88f6282", "marvell,kirkwood";
|
||||
model = "Linksys EA3500 (Audi)";
|
||||
compatible = "linksys,ea3500", "linksys,audi", "marvell,kirkwood-88f6282", "marvell,kirkwood";
|
||||
|
||||
memory@0 {
|
||||
device_type = "memory";
|
||||
@ -61,7 +61,7 @@
|
||||
pinctrl-names = "default";
|
||||
|
||||
led_power: power {
|
||||
label = "green:power";
|
||||
label = "audi:green:power";
|
||||
gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
@ -0,0 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "kirkwood-linksys-viper.dts"
|
||||
|
||||
/ {
|
||||
model = "Linksys EA4500 (Viper)";
|
||||
compatible = "linksys,ea4500", "linksys,viper", "marvell,kirkwood-88f6282", "marvell,kirkwood";
|
||||
};
|
||||
@ -61,18 +61,18 @@
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_health: health {
|
||||
label = "green:health";
|
||||
label = "status:green:health";
|
||||
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led_fault: fault {
|
||||
label = "orange:fault";
|
||||
label = "status:orange:fault";
|
||||
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
misc {
|
||||
label = "white:misc";
|
||||
label = "status:white:misc";
|
||||
gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "disk-activity";
|
||||
};
|
||||
|
||||
@ -88,53 +88,56 @@
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_green_sys: green-sys {
|
||||
label = "green:sys";
|
||||
label = "nsa310:green:sys";
|
||||
gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led_red_sys: red-sys {
|
||||
label = "red:sys";
|
||||
label = "nsa310:red:sys";
|
||||
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
green-hdd {
|
||||
label = "green:hdd";
|
||||
label = "nsa310:green:hdd";
|
||||
gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "ata1";
|
||||
};
|
||||
|
||||
red-hdd {
|
||||
label = "red:hdd";
|
||||
label = "nsa310:red:hdd";
|
||||
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
green-esata {
|
||||
label = "green:esata";
|
||||
label = "nsa310:green:esata";
|
||||
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "ata2";
|
||||
};
|
||||
|
||||
red-esata {
|
||||
label = "red:esata";
|
||||
label = "nsa310:red:esata";
|
||||
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
green-usb {
|
||||
label = "green:usb";
|
||||
label = "nsa310:green:usb";
|
||||
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "usb-host";
|
||||
};
|
||||
|
||||
red-usb {
|
||||
label = "red:usb";
|
||||
label = "nsa310:red:usb";
|
||||
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
green-copy {
|
||||
label = "green:copy";
|
||||
label = "nsa310:green:copy";
|
||||
gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
red-copy {
|
||||
label = "red:copy";
|
||||
label = "nsa310:red:copy";
|
||||
gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -0,0 +1,271 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/dts-v1/;
|
||||
|
||||
#include "kirkwood.dtsi"
|
||||
#include "kirkwood-6281.dtsi"
|
||||
|
||||
/ {
|
||||
model = "ZyXEL NSA310S";
|
||||
compatible = "zyxel,nsa310s", "marvell,kirkwood-88f6702", "marvell,kirkwood";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_green_sys;
|
||||
led-failsafe = &led_red_sys;
|
||||
led-running = &led_green_sys;
|
||||
led-upgrade = &led_red_sys;
|
||||
};
|
||||
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x00000000 0x10000000>;
|
||||
};
|
||||
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n8 earlyprintk";
|
||||
stdout-path = &uart0;
|
||||
};
|
||||
|
||||
ocp@f1000000 {
|
||||
pinctrl: pin-controller@10000 {
|
||||
pinctrl-names = "default";
|
||||
|
||||
pmx_usb_power: pmx-usb-power {
|
||||
marvell,pins = "mpp21";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
pmx_pwr_off: pmx-pwr-off {
|
||||
marvell,pins = "mpp27";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
pmx_btn_reset: pmx-btn-reset {
|
||||
marvell,pins = "mpp24";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
pmx_btn_copy: pmx-btn-copy {
|
||||
marvell,pins = "mpp25";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
pmx_btn_power: pmx-btn-power {
|
||||
marvell,pins = "mpp26";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
pmx_led_usb_green: pmx-led-usb-green {
|
||||
marvell,pins = "mpp15";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
pmx_led_copy_green: pmx-led-copy-green {
|
||||
marvell,pins = "mpp22";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
pmx_led_copy_red: pmx-led-copy-red {
|
||||
marvell,pins = "mpp23";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
pmx_led_sys_green: pmx-led-sys-green {
|
||||
marvell,pins = "mpp28";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
pmx_led_sys_red: pmx-led-sys-red {
|
||||
marvell,pins = "mpp29";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
pmx_led_hdd1_green: pmx-led-hdd1-green {
|
||||
marvell,pins = "mpp16";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
pmx_led_hdd1_red: pmx-led-hdd1-red {
|
||||
marvell,pins = "mpp13";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
pmx_pwr_sata1: pmx-pwr-sata1 {
|
||||
marvell,pins = "mpp33";
|
||||
marvell,function = "gpio";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
i2c@11000 {
|
||||
status = "okay";
|
||||
|
||||
rtc@68 {
|
||||
compatible = "htk,ht1382";
|
||||
reg = <0x68>;
|
||||
};
|
||||
};
|
||||
|
||||
serial@12000 {
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
regulators {
|
||||
compatible = "simple-bus";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-0 = <&pmx_usb_power &pmx_pwr_sata1>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
usb0_power: regulator@1 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <1>;
|
||||
regulator-name = "USB Power";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
sata1_power: regulator@2 {
|
||||
compatible = "regulator-fixed";
|
||||
reg = <2>;
|
||||
regulator-name = "SATA1 Power";
|
||||
regulator-min-microvolt = <5000000>;
|
||||
regulator-max-microvolt = <5000000>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-0 = <&pmx_btn_reset &pmx_btn_copy &pmx_btn_power>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
power {
|
||||
label = "Power Button";
|
||||
linux,code = <KEY_POWER>;
|
||||
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
copy {
|
||||
label = "Copy Button";
|
||||
linux,code = <KEY_COPY>;
|
||||
gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
reset {
|
||||
label = "Reset Button";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_green_sys: green-sys {
|
||||
label = "nsa310s:green:sys";
|
||||
gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "default-on";
|
||||
};
|
||||
|
||||
led_red_sys: red-sys {
|
||||
label = "nsa310s:red:sys";
|
||||
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
green-hdd1 {
|
||||
label = "nsa310s:green:hdd1";
|
||||
gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "ata1";
|
||||
};
|
||||
|
||||
red-hdd1 {
|
||||
label = "nsa310s:red:hdd1";
|
||||
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
green-usb {
|
||||
label = "nsa310s:green:usb";
|
||||
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "usb-host";
|
||||
};
|
||||
|
||||
green-copy {
|
||||
label = "nsa310s:green:copy";
|
||||
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
red-copy {
|
||||
label = "nsa310s:red:copy";
|
||||
gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio_poweroff {
|
||||
compatible = "gpio-poweroff";
|
||||
pinctrl-0 = <&pmx_pwr_off>;
|
||||
pinctrl-names = "default";
|
||||
gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
ethernet0-port@0 {
|
||||
phy-handle = <ðphy0>;
|
||||
};
|
||||
};
|
||||
|
||||
&mdio {
|
||||
status = "okay";
|
||||
|
||||
ethphy0: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
phy-mode = "rgmii-id";
|
||||
marvell,reg-init = <0x1 0x16 0x0 0x3>,
|
||||
<0x1 0x10 0x0 0x1017>,
|
||||
<0x1 0x11 0x0 0x4408>,
|
||||
<0x1 0x16 0x0 0x0>;
|
||||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
chip-delay = <35>;
|
||||
|
||||
partition@0 {
|
||||
label = "uboot";
|
||||
reg = <0x0000000 0x00c0000>;
|
||||
read-only;
|
||||
};
|
||||
partition@c0000 {
|
||||
label = "uboot_env";
|
||||
reg = <0x00c0000 0x0080000>;
|
||||
};
|
||||
partition@140000 {
|
||||
label = "ubi";
|
||||
reg = <0x0140000 0x7ec0000>;
|
||||
};
|
||||
};
|
||||
|
||||
&pciec {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sata {
|
||||
status = "okay";
|
||||
nr-ports = <1>;
|
||||
};
|
||||
@ -45,23 +45,23 @@
|
||||
pinctrl-names = "default";
|
||||
|
||||
led_health_green: health-green {
|
||||
label = "green:health";
|
||||
label = "on100:green:health";
|
||||
gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led_health_red: health-red {
|
||||
label = "red:health";
|
||||
label = "on100:red:health";
|
||||
gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
health2-green {
|
||||
label = "green:health2";
|
||||
label = "on100:green:health2";
|
||||
gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
health2-red {
|
||||
label = "red:health2";
|
||||
label = "on100:red:health2";
|
||||
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -12,7 +12,7 @@ KERNEL_LOADADDR:=0x8000
|
||||
|
||||
define Device/Default
|
||||
PROFILES := Default
|
||||
DEVICE_DTS = $$(if $$(BOARD_NAME),kirkwood-$$(BOARD_NAME),)
|
||||
DEVICE_DTS = kirkwood-$(lastword $(subst _, ,$(1)))
|
||||
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
|
||||
KERNEL := kernel-bin | append-dtb | uImage none
|
||||
KERNEL_NAME := zImage
|
||||
@ -25,9 +25,17 @@ define Device/Default
|
||||
IMAGES := sysupgrade.bin factory.bin
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
IMAGE/factory.bin := append-ubi
|
||||
SUPPORTED_DEVICES = $(subst _,$(comma),$(1)) $$(BOARD_NAME)
|
||||
endef
|
||||
|
||||
define Device/checkpoint_l-50
|
||||
DEVICE_VENDOR := Check Point
|
||||
DEVICE_MODEL := L-50
|
||||
DEVICE_PACKAGES := kmod-ath9k kmod-gpio-button-hotplug kmod-mvsdio \
|
||||
kmod-rtc-s35390a kmod-usb-ledtrig-usbport wpad-basic-wolfssl
|
||||
IMAGES := sysupgrade.bin
|
||||
endef
|
||||
TARGET_DEVICES += checkpoint_l-50
|
||||
|
||||
define Device/cisco_on100
|
||||
DEVICE_VENDOR := Cisco Systems
|
||||
DEVICE_MODEL := ON100
|
||||
@ -35,14 +43,16 @@ define Device/cisco_on100
|
||||
KERNEL_IN_UBI :=
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
|
||||
BOARD_NAME := on100
|
||||
DEVICE_PACKAGES := kmod-mvsdio
|
||||
SUPPORTED_DEVICES += on100
|
||||
endef
|
||||
TARGET_DEVICES += cisco_on100
|
||||
|
||||
define Device/cloudengines_pogoe02
|
||||
DEVICE_VENDOR := Cloud Engines
|
||||
DEVICE_MODEL := Pogoplug E02
|
||||
BOARD_NAME := pogo_e02
|
||||
DEVICE_DTS := kirkwood-pogo_e02
|
||||
SUPPORTED_DEVICES += pogo_e02
|
||||
endef
|
||||
TARGET_DEVICES += cloudengines_pogoe02
|
||||
|
||||
@ -50,14 +60,16 @@ define Device/cloudengines_pogoplugv4
|
||||
DEVICE_VENDOR := Cloud Engines
|
||||
DEVICE_MODEL := Pogoplug V4
|
||||
DEVICE_DTS := kirkwood-pogoplug-series-4
|
||||
DEVICE_PACKAGES := kmod-usb3
|
||||
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-mvsdio kmod-usb3 \
|
||||
kmod-gpio-button-hotplug
|
||||
endef
|
||||
TARGET_DEVICES += cloudengines_pogoplugv4
|
||||
|
||||
define Device/iom_iconnect-1.1
|
||||
DEVICE_VENDOR := Iomega
|
||||
DEVICE_MODEL := Iconnect
|
||||
BOARD_NAME := iconnect
|
||||
DEVICE_DTS := kirkwood-iconnect
|
||||
SUPPORTED_DEVICES += iconnect
|
||||
endef
|
||||
TARGET_DEVICES += iom_iconnect-1.1
|
||||
|
||||
@ -65,8 +77,8 @@ define Device/iom_ix2-200
|
||||
DEVICE_VENDOR := Iomega
|
||||
DEVICE_MODEL := StorCenter ix2-200
|
||||
DEVICE_DTS := kirkwood-iomega_ix2_200
|
||||
DEVICE_PACKAGES := kmod-gpio-button-hotplug kmod-hwmon-lm63
|
||||
DEVICE_TYPE:=nas
|
||||
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \
|
||||
kmod-gpio-button-hotplug kmod-hwmon-lm63
|
||||
PAGESIZE := 512
|
||||
SUBPAGESIZE := 256
|
||||
BLOCKSIZE := 16k
|
||||
@ -79,75 +91,109 @@ define Device/iom_ix2-200
|
||||
endef
|
||||
TARGET_DEVICES += iom_ix2-200
|
||||
|
||||
define Device/linksys_audi
|
||||
define Device/linksys
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA3500 (Audi)
|
||||
DEVICE_PACKAGES := kmod-mwl8k wpad-basic kmod-gpio-button-hotplug
|
||||
DEVICE_PACKAGES := kmod-mwl8k wpad-basic-wolfssl kmod-gpio-button-hotplug
|
||||
KERNEL_IN_UBI :=
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
|
||||
endef
|
||||
|
||||
define Device/linksys_e4200-v2
|
||||
$(Device/linksys)
|
||||
DEVICE_MODEL := E4200
|
||||
DEVICE_VARIANT := v2
|
||||
KERNEL_SIZE := 2688k
|
||||
SUPPORTED_DEVICES += linksys,viper linksys-viper
|
||||
endef
|
||||
TARGET_DEVICES += linksys_e4200-v2
|
||||
|
||||
define Device/linksys_ea3500
|
||||
$(Device/linksys)
|
||||
DEVICE_MODEL := EA3500
|
||||
PAGESIZE := 512
|
||||
SUBPAGESIZE := 256
|
||||
BLOCKSIZE := 16k
|
||||
KERNEL_SIZE := 2624k
|
||||
KERNEL_IN_UBI :=
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
|
||||
BOARD_NAME := linksys-audi
|
||||
SUPPORTED_DEVICES += linksys,audi linksys-audi
|
||||
endef
|
||||
TARGET_DEVICES += linksys_audi
|
||||
TARGET_DEVICES += linksys_ea3500
|
||||
|
||||
define Device/linksys_viper
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := E4200v2 / EA4500 (Viper)
|
||||
DEVICE_PACKAGES := kmod-mwl8k wpad-basic kmod-gpio-button-hotplug
|
||||
define Device/linksys_ea4500
|
||||
$(Device/linksys)
|
||||
DEVICE_MODEL := EA4500
|
||||
KERNEL_SIZE := 2688k
|
||||
KERNEL_IN_UBI :=
|
||||
UBINIZE_OPTS := -E 5
|
||||
IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
|
||||
BOARD_NAME := linksys-viper
|
||||
SUPPORTED_DEVICES += linksys,viper linksys-viper
|
||||
endef
|
||||
TARGET_DEVICES += linksys_viper
|
||||
TARGET_DEVICES += linksys_ea4500
|
||||
|
||||
define Device/raidsonic_ib-nas62x0
|
||||
DEVICE_VENDOR := RaidSonic
|
||||
DEVICE_MODEL := ICY BOX IB-NAS62x0
|
||||
BOARD_NAME := ib62x0
|
||||
DEVICE_DTS := kirkwood-ib62x0
|
||||
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4
|
||||
SUPPORTED_DEVICES += ib62x0
|
||||
endef
|
||||
TARGET_DEVICES += raidsonic_ib-nas62x0
|
||||
|
||||
define Device/seagate_blackarmor-nas220
|
||||
DEVICE_VENDOR := Seagate
|
||||
DEVICE_MODEL := Blackarmor NAS220
|
||||
DEVICE_PACKAGES := kmod-hwmon-adt7475 kmod-fs-ext4 kmod-ata-marvell-sata \
|
||||
mdadm kmod-gpio-button-hotplug
|
||||
PAGESIZE := 512
|
||||
SUBPAGESIZE := 256
|
||||
BLOCKSIZE := 16k
|
||||
UBINIZE_OPTS := -e 1
|
||||
endef
|
||||
TARGET_DEVICES += seagate_blackarmor-nas220
|
||||
|
||||
define Device/seagate_dockstar
|
||||
DEVICE_VENDOR := Seagate
|
||||
DEVICE_MODEL := FreeAgent Dockstar
|
||||
BOARD_NAME := dockstar
|
||||
SUPPORTED_DEVICES += dockstar
|
||||
endef
|
||||
TARGET_DEVICES += seagate_dockstar
|
||||
|
||||
define Device/seagate_goflexnet
|
||||
DEVICE_VENDOR := Seagate
|
||||
DEVICE_MODEL := GoFlexNet
|
||||
BOARD_NAME := goflexnet
|
||||
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4
|
||||
SUPPORTED_DEVICES += goflexnet
|
||||
endef
|
||||
TARGET_DEVICES += seagate_goflexnet
|
||||
|
||||
define Device/seagate_goflexhome
|
||||
DEVICE_VENDOR := Seagate
|
||||
DEVICE_MODEL := GoFlexHome
|
||||
BOARD_NAME := goflexhome
|
||||
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4
|
||||
SUPPORTED_DEVICES += goflexhome
|
||||
endef
|
||||
TARGET_DEVICES += seagate_goflexhome
|
||||
|
||||
define Device/zyxel_nsa310b
|
||||
DEVICE_VENDOR := ZyXEL
|
||||
DEVICE_MODEL := NSA310b
|
||||
DEVICE_PACKAGES := kmod-r8169 kmod-gpio-button-hotplug kmod-hwmon-lm85
|
||||
BOARD_NAME := nsa310b
|
||||
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-r8169 kmod-fs-ext4 \
|
||||
kmod-gpio-button-hotplug kmod-hwmon-lm85
|
||||
SUPPORTED_DEVICES += nsa310b
|
||||
endef
|
||||
TARGET_DEVICES += zyxel_nsa310b
|
||||
|
||||
define Device/zyxel_nsa310s
|
||||
DEVICE_VENDOR := ZyXEL
|
||||
DEVICE_MODEL := NSA310S
|
||||
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-gpio-button-hotplug
|
||||
endef
|
||||
TARGET_DEVICES += zyxel_nsa310s
|
||||
|
||||
define Device/zyxel_nsa325
|
||||
DEVICE_VENDOR := ZyXEL
|
||||
DEVICE_MODEL := NSA325
|
||||
DEVICE_VARIANT := v1/v2
|
||||
DEVICE_PACKAGES := kmod-gpio-button-hotplug kmod-rtc-pcf8563 kmod-usb3
|
||||
BOARD_NAME := nsa325
|
||||
DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 \
|
||||
kmod-gpio-button-hotplug kmod-rtc-pcf8563 kmod-usb3
|
||||
SUPPORTED_DEVICES += nsa325
|
||||
endef
|
||||
TARGET_DEVICES += zyxel_nsa325
|
||||
|
||||
|
||||
@ -0,0 +1,485 @@
|
||||
From efa968c18abab78c5e0c40a853caf286c3629a59 Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
Date: Tue, 17 Mar 2020 21:28:01 +0100
|
||||
Subject: [PATCH v3] ARM: dts: kirkwood: Add Check Point L-50 board
|
||||
|
||||
This patch adds dts for the Check Point L-50 from 600/1100 series
|
||||
routers.
|
||||
|
||||
Specification:
|
||||
-CPU: Marvell Kirkwood 88F6821 1200MHz
|
||||
-RAM: 512MB
|
||||
-Flash: NAND 512MB
|
||||
-WiFi: mPCIe card based on Atheros AR9287 b/g/n
|
||||
-WAN: 1 Gigabit Port (Marvell 88E1116R PHY)
|
||||
-LAN: 9 Gigabit Ports (2x Marvell 88E6171(5+3))
|
||||
-USB: 2x USB2.0
|
||||
-Express card slot
|
||||
-SD card slot
|
||||
-Serial console: RJ-45 115200 8n1
|
||||
-Unsupported DSL
|
||||
|
||||
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
||||
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
|
||||
---
|
||||
Changes in v3:
|
||||
- fix typo and code style issues pointed by OpenWrt guys
|
||||
Changes in v2:
|
||||
- none
|
||||
|
||||
arch/arm/boot/dts/Makefile | 1 +
|
||||
arch/arm/boot/dts/kirkwood-l-50.dts | 438 ++++++++++++++++++++++++++++
|
||||
2 files changed, 439 insertions(+)
|
||||
create mode 100644 arch/arm/boot/dts/kirkwood-l-50.dts
|
||||
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -270,6 +270,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
|
||||
kirkwood-iomega_ix2_200.dtb \
|
||||
kirkwood-is2.dtb \
|
||||
kirkwood-km_kirkwood.dtb \
|
||||
+ kirkwood-l-50.dtb \
|
||||
kirkwood-laplug.dtb \
|
||||
kirkwood-linkstation-lsqvl.dtb \
|
||||
kirkwood-linkstation-lsvl.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/kirkwood-l-50.dts
|
||||
@@ -0,0 +1,438 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Check Point L-50 Board Description
|
||||
+ * Copyright 2020 Pawel Dembicki <paweldembicki@gmail.com>
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "kirkwood.dtsi"
|
||||
+#include "kirkwood-6281.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Check Point L-50";
|
||||
+ compatible = "checkpoint,l-50", "marvell,kirkwood-88f6281", "marvell,kirkwood";
|
||||
+
|
||||
+ memory {
|
||||
+ device_type = "memory";
|
||||
+ reg = <0x00000000 0x20000000>;
|
||||
+ };
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200n8";
|
||||
+ stdout-path = &uart0;
|
||||
+ };
|
||||
+
|
||||
+ ocp@f1000000 {
|
||||
+ pinctrl: pin-controller@10000 {
|
||||
+ pinctrl-0 = <&pmx_led38 &pmx_sysrst &pmx_button29>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ pmx_sysrst: pmx-sysrst {
|
||||
+ marvell,pins = "mpp6";
|
||||
+ marvell,function = "sysrst";
|
||||
+ };
|
||||
+
|
||||
+ pmx_button29: pmx_button29 {
|
||||
+ marvell,pins = "mpp29";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_led38: pmx_led38 {
|
||||
+ marvell,pins = "mpp38";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+
|
||||
+ pmx_sdio_cd: pmx-sdio-cd {
|
||||
+ marvell,pins = "mpp46";
|
||||
+ marvell,function = "gpio";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ serial@12000 {
|
||||
+ status = "okay";
|
||||
+ };
|
||||
+
|
||||
+ mvsdio@90000 {
|
||||
+ status = "okay";
|
||||
+ cd-gpios = <&gpio1 14 9>;
|
||||
+ };
|
||||
+
|
||||
+ i2c@11000 {
|
||||
+ status = "okay";
|
||||
+ clock-frequency = <400000>;
|
||||
+
|
||||
+ gpio2: gpio-expander@20{
|
||||
+ #gpio-cells = <2>;
|
||||
+ #interrupt-cells = <2>;
|
||||
+ compatible = "semtech,sx1505q";
|
||||
+ reg = <0x20>;
|
||||
+
|
||||
+ gpio-controller;
|
||||
+ };
|
||||
+
|
||||
+ /* Three GPIOs from 0x21 exp. are undescribed in dts:
|
||||
+ * 1: DSL module reset (active low)
|
||||
+ * 5: mPCIE reset (active low)
|
||||
+ * 6: Express card reset (active low)
|
||||
+ */
|
||||
+ gpio3: gpio-expander@21{
|
||||
+ #gpio-cells = <2>;
|
||||
+ #interrupt-cells = <2>;
|
||||
+ compatible = "semtech,sx1505q";
|
||||
+ reg = <0x21>;
|
||||
+
|
||||
+ gpio-controller;
|
||||
+ };
|
||||
+
|
||||
+ rtc@30 {
|
||||
+ compatible = "s35390a";
|
||||
+ reg = <0x30>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+
|
||||
+ status_green {
|
||||
+ label = "l-50:green:status";
|
||||
+ gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ status_red {
|
||||
+ label = "l-50:red:status";
|
||||
+ gpios = <&gpio3 2 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ wifi {
|
||||
+ label = "l-50:green:wifi";
|
||||
+ gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "phy0tpt";
|
||||
+ };
|
||||
+
|
||||
+ internet_green {
|
||||
+ label = "l-50:green:internet";
|
||||
+ gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ internet_red {
|
||||
+ label = "l-50:red:internet";
|
||||
+ gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ usb1_green {
|
||||
+ label = "l-50:green:usb1";
|
||||
+ gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
+ trigger-sources = <&hub_port3>;
|
||||
+ };
|
||||
+
|
||||
+ usb1_red {
|
||||
+ label = "l-50:red:usb1";
|
||||
+ gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+
|
||||
+ usb2_green {
|
||||
+ label = "l-50:green:usb2";
|
||||
+ gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "usbport";
|
||||
+ trigger-sources = <&hub_port1>;
|
||||
+ };
|
||||
+
|
||||
+ usb2_red {
|
||||
+ label = "l-50:red:usb2";
|
||||
+ gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ usb2_pwr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "usb2_pwr";
|
||||
+
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ gpio = <&gpio3 3 GPIO_ACTIVE_LOW>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ usb1_pwr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "usb1_pwr";
|
||||
+
|
||||
+ regulator-min-microvolt = <5000000>;
|
||||
+ regulator-max-microvolt = <5000000>;
|
||||
+ gpio = <&gpio3 4 GPIO_ACTIVE_LOW>;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ mpcie_pwr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "mpcie_pwr";
|
||||
+
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ gpio = <&gpio3 5 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ express_card_pwr {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "express_card_pwr";
|
||||
+
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ gpio = <&gpio3 7 GPIO_ACTIVE_HIGH>;
|
||||
+ enable-active-high;
|
||||
+ regulator-always-on;
|
||||
+ };
|
||||
+
|
||||
+ keys {
|
||||
+ compatible = "gpio-keys";
|
||||
+
|
||||
+ factory_defaults {
|
||||
+ label = "factory_defaults";
|
||||
+ gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&mdio {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ethphy8: ethernet-phy@8 {
|
||||
+ reg = <0x08>;
|
||||
+ };
|
||||
+
|
||||
+ switch0: switch@10 {
|
||||
+ compatible = "marvell,mv88e6085";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <0x10>;
|
||||
+ dsa,member = <0 0>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "lan5";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "lan6";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ reg = <4>;
|
||||
+ label = "lan7";
|
||||
+ };
|
||||
+
|
||||
+ switch0port5: port@5 {
|
||||
+ reg = <5>;
|
||||
+ phy-mode = "rgmii-txid";
|
||||
+ link = <&switch1port5>;
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@6 {
|
||||
+ reg = <6>;
|
||||
+ label = "cpu";
|
||||
+ phy-mode = "rgmii-id";
|
||||
+ ethernet = <ð1port>;
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ switch@11 {
|
||||
+ compatible = "marvell,mv88e6085";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <0x11>;
|
||||
+ dsa,member = <0 1>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+ label = "lan8";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ reg = <3>;
|
||||
+ label = "dmz";
|
||||
+ };
|
||||
+
|
||||
+ switch1port5: port@5 {
|
||||
+ reg = <5>;
|
||||
+ phy-mode = "rgmii-txid";
|
||||
+ link = <&switch0port5>;
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@6 {
|
||||
+ reg = <6>;
|
||||
+ label = "dsl";
|
||||
+ fixed-link {
|
||||
+ speed = <100>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð0 {
|
||||
+ status = "okay";
|
||||
+ ethernet0-port@0 {
|
||||
+ phy-handle = <ðphy8>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+ð1 {
|
||||
+ status = "okay";
|
||||
+ ethernet1-port@0 {
|
||||
+ speed = <1000>;
|
||||
+ duplex = <1>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&nand {
|
||||
+ status = "okay";
|
||||
+ pinctrl-0 = <&pmx_nand>;
|
||||
+ pinctrl-names = "default";
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "u-boot";
|
||||
+ reg = <0x00000000 0x000c0000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@a0000 {
|
||||
+ label = "bootldr-env";
|
||||
+ reg = <0x000c0000 0x00040000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@100000 {
|
||||
+ label = "kernel-1";
|
||||
+ reg = <0x00100000 0x00800000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@900000 {
|
||||
+ label = "rootfs-1";
|
||||
+ reg = <0x00900000 0x07100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@7a00000 {
|
||||
+ label = "kernel-2";
|
||||
+ reg = <0x07a00000 0x00800000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@8200000 {
|
||||
+ label = "rootfs-2";
|
||||
+ reg = <0x08200000 0x07100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@f300000 {
|
||||
+ label = "default_sw";
|
||||
+ reg = <0x0f300000 0x07900000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@16c00000 {
|
||||
+ label = "logs";
|
||||
+ reg = <0x16c00000 0x01800000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@18400000 {
|
||||
+ label = "preset_cfg";
|
||||
+ reg = <0x18400000 0x00100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@18500000 {
|
||||
+ label = "adsl";
|
||||
+ reg = <0x18500000 0x00100000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@18600000 {
|
||||
+ label = "storage";
|
||||
+ reg = <0x18600000 0x07a00000>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&rtc {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&pciec {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&sata_phy0 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&sata_phy1 {
|
||||
+ status = "disabled";
|
||||
+};
|
||||
+
|
||||
+&usb0 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ port@1 {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <1>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+
|
||||
+ hub_port1: port@1 {
|
||||
+ reg = <1>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+ };
|
||||
+
|
||||
+ hub_port3: port@3 {
|
||||
+ reg = <3>;
|
||||
+ #trigger-source-cells = <0>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
@ -14,7 +14,7 @@
|
||||
memory {
|
||||
device_type = "memory";
|
||||
reg = <0x00000000 0x20000000>;
|
||||
@@ -162,11 +169,12 @@
|
||||
@@ -162,17 +169,19 @@
|
||||
&pmx_led_hdd1_green &pmx_led_hdd1_red>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
@ -29,3 +29,26 @@
|
||||
label = "nsa325:orange:sys";
|
||||
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
green-hdd1 {
|
||||
label = "nsa325:green:hdd1";
|
||||
gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "ata1";
|
||||
};
|
||||
red-hdd1 {
|
||||
label = "nsa325:red:hdd1";
|
||||
@@ -181,6 +190,7 @@
|
||||
green-hdd2 {
|
||||
label = "nsa325:green:hdd2";
|
||||
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "ata2";
|
||||
};
|
||||
red-hdd2 {
|
||||
label = "nsa325:red:hdd2";
|
||||
@@ -189,6 +199,7 @@
|
||||
green-usb {
|
||||
label = "nsa325:green:usb";
|
||||
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "usb-host";
|
||||
};
|
||||
green-copy {
|
||||
label = "nsa325:green:copy";
|
||||
|
||||
47
target/linux/kirkwood/patches-5.4/111-l-50.patch
Normal file
47
target/linux/kirkwood/patches-5.4/111-l-50.patch
Normal file
@ -0,0 +1,47 @@
|
||||
--- a/arch/arm/boot/dts/kirkwood-l-50.dts
|
||||
+++ b/arch/arm/boot/dts/kirkwood-l-50.dts
|
||||
@@ -18,6 +18,13 @@
|
||||
reg = <0x00000000 0x20000000>;
|
||||
};
|
||||
|
||||
+ aliases {
|
||||
+ led-boot = &led_status_green;
|
||||
+ led-failsafe = &led_status_red;
|
||||
+ led-running = &led_status_green;
|
||||
+ led-upgrade = &led_status_red;
|
||||
+ };
|
||||
+
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n8";
|
||||
stdout-path = &uart0;
|
||||
@@ -95,12 +102,12 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
- status_green {
|
||||
+ led_status_green: status_green {
|
||||
label = "l-50:green:status";
|
||||
gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
- status_red {
|
||||
+ led_status_red: status_red {
|
||||
label = "l-50:red:status";
|
||||
gpios = <&gpio3 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
@@ -349,13 +356,8 @@
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
- label = "kernel-1";
|
||||
- reg = <0x00100000 0x00800000>;
|
||||
- };
|
||||
-
|
||||
- partition@900000 {
|
||||
- label = "rootfs-1";
|
||||
- reg = <0x00900000 0x07100000>;
|
||||
+ label = "ubi";
|
||||
+ reg = <0x00100000 0x07900000>;
|
||||
};
|
||||
|
||||
partition@7a00000 {
|
||||
@ -0,0 +1,99 @@
|
||||
--- a/arch/arm/boot/dts/kirkwood-blackarmor-nas220.dts
|
||||
+++ b/arch/arm/boot/dts/kirkwood-blackarmor-nas220.dts
|
||||
@@ -17,6 +17,13 @@
|
||||
compatible = "seagate,blackarmor-nas220","marvell,kirkwood-88f6192",
|
||||
"marvell,kirkwood";
|
||||
|
||||
+ aliases {
|
||||
+ led-boot = &led_status_amber;
|
||||
+ led-failsafe = &led_status_amber;
|
||||
+ led-running = &led_status_blue;
|
||||
+ led-upgrade = &led_status_amber;
|
||||
+ };
|
||||
+
|
||||
memory { /* 128 MB */
|
||||
device_type = "memory";
|
||||
reg = <0x00000000 0x8000000>;
|
||||
@@ -36,14 +43,14 @@
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
- label = "Reset";
|
||||
- linux,code = <KEY_POWER>;
|
||||
+ label = "Reset Button";
|
||||
+ linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
- button {
|
||||
- label = "Power";
|
||||
- linux,code = <KEY_SLEEP>;
|
||||
+ power {
|
||||
+ label = "Power Button";
|
||||
+ linux,code = <KEY_POWER>;
|
||||
gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
@@ -51,11 +58,27 @@
|
||||
gpio-leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
- blue-power {
|
||||
+ led_power_blue: power_blue {
|
||||
label = "nas220:blue:power";
|
||||
gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "default-on";
|
||||
};
|
||||
+
|
||||
+ disk_blue {
|
||||
+ label = "nas220:blue:disk";
|
||||
+ gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
|
||||
+ linux,default-trigger = "disk-activity";
|
||||
+ };
|
||||
+
|
||||
+ led_status_blue: status_blue {
|
||||
+ label = "nas220:blue:status";
|
||||
+ gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ led_status_amber: status_amber {
|
||||
+ label = "nas220:amber:status";
|
||||
+ gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
};
|
||||
|
||||
regulators {
|
||||
@@ -153,6 +176,33 @@
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
+
|
||||
+ partitions {
|
||||
+ compatible = "fixed-partitions";
|
||||
+
|
||||
+ partition@0 {
|
||||
+ label = "uboot";
|
||||
+ reg = <0x0 0xa0000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ partition@a0000 {
|
||||
+ label = "uboot-env";
|
||||
+ reg = <0xa0000 0x10000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ partition@b0000 {
|
||||
+ label = "reserved";
|
||||
+ reg = <0xb0000 0x10000>;
|
||||
+ read-only;
|
||||
+ };
|
||||
+
|
||||
+ partition@c0000 {
|
||||
+ label = "ubi";
|
||||
+ reg = <0xc0000 0x1e80000>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&mdio {
|
||||
Loading…
Reference in New Issue
Block a user