Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
29
target/linux/bcm53xx/Makefile
Normal file
29
target/linux/bcm53xx/Makefile
Normal file
@@ -0,0 +1,29 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2013 OpenWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
ARCH:=arm
|
||||
BOARD:=bcm53xx
|
||||
BOARDNAME:=Broadcom BCM47xx/53xx (ARM)
|
||||
FEATURES:=squashfs nand usb pci pcie gpio pwm
|
||||
CPU_TYPE:=cortex-a9
|
||||
SUBTARGETS:=generic
|
||||
|
||||
KERNEL_PATCHVER:=6.6
|
||||
|
||||
define Target/Description
|
||||
Build firmware images for Broadcom based BCM47xx/53xx routers with ARM CPU, *not* MIPS.
|
||||
endef
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
KERNELNAME:=zImage dtbs
|
||||
|
||||
DEFAULT_PACKAGES += nvram \
|
||||
osafeloader oseama otrx \
|
||||
kmod-gpio-button-hotplug \
|
||||
kmod-leds-gpio
|
||||
|
||||
$(eval $(call BuildTarget))
|
||||
27
target/linux/bcm53xx/base-files/etc/board.d/01_leds
Normal file
27
target/linux/bcm53xx/base-files/etc/board.d/01_leds
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
board_config_update
|
||||
|
||||
case "$(board_name)" in
|
||||
meraki,mx64|\
|
||||
meraki,mx64-a0)
|
||||
ucidef_set_led_netdev "wan" "WAN Port" "green:activity-9" "wan"
|
||||
ucidef_set_led_netdev "lan1" "LAN Port 1" "green:activity-1" "lan1"
|
||||
ucidef_set_led_netdev "lan2" "LAN Port 2" "green:activity-3" "lan2"
|
||||
ucidef_set_led_netdev "lan3" "LAN Port 3" "green:activity-5" "lan3"
|
||||
ucidef_set_led_netdev "lan4" "LAN Port 4" "green:activity-7" "lan4"
|
||||
;;
|
||||
meraki,mx65)
|
||||
ucidef_set_led_netdev "wan1" "WAN Port 1" "green:activity-1" "wan1"
|
||||
ucidef_set_led_netdev "wan2" "WAN Port 2" "green:activity-3" "wan2"
|
||||
;;
|
||||
netgear,r8000)
|
||||
ucidef_set_led_usbport "usb2" "USB 2.0" "bcm53xx:white:usb2" "usb1-port2" "usb2-port2"
|
||||
ucidef_set_led_usbport "usb3" "USB 3.0" "bcm53xx:white:usb3" "usb1-port1" "usb2-port1" "usb4-port1"
|
||||
;;
|
||||
esac
|
||||
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
103
target/linux/bcm53xx/base-files/etc/board.d/02_network
Normal file
103
target/linux/bcm53xx/base-files/etc/board.d/02_network
Normal file
@@ -0,0 +1,103 @@
|
||||
#
|
||||
# Copyright (C) 2011 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions/system.sh
|
||||
. /lib/functions/uci-defaults.sh
|
||||
|
||||
bcm53xx_setup_interfaces()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
case "$board" in
|
||||
asus,rt-ac87u)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
|
||||
;;
|
||||
asus,rt-ac88u)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 extsw" "wan"
|
||||
;;
|
||||
dlink,dwl-8610ap)
|
||||
ucidef_set_interface_lan "eth0 eth1" "dhcp"
|
||||
;;
|
||||
linksys,panamera)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 extsw" "wan"
|
||||
;;
|
||||
luxul,xap-1610-v1)
|
||||
ucidef_set_interface_lan "poe lan" "dhcp"
|
||||
;;
|
||||
meraki,mr26 | \
|
||||
meraki,mr32)
|
||||
ucidef_set_interface_lan "poe" "dhcp"
|
||||
;;
|
||||
meraki,mx64 | \
|
||||
meraki,mx64-a0)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
|
||||
;;
|
||||
meraki,mx65)
|
||||
ucidef_set_interfaces_lan_wan \
|
||||
"lan3 lan4 lan5 lan6 lan7 lan8 lan9 lan10 lan11 lan12" "wan1 wan2"
|
||||
;;
|
||||
phicomm,k3)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
|
||||
;;
|
||||
*)
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
bcm53xx_setup_macs()
|
||||
{
|
||||
local board="$1"
|
||||
|
||||
wan_macaddr="$(nvram get wan_hwaddr)"
|
||||
|
||||
case "$board" in
|
||||
asus,rt-ac87u)
|
||||
etXmacaddr=$(nvram get et1macaddr)
|
||||
offset=1
|
||||
;;
|
||||
dlink,dir-885l | \
|
||||
linksys,ea9200 | \
|
||||
linksys,panamera | \
|
||||
netgear,r7900 | \
|
||||
netgear,r8000 | \
|
||||
netgear,r8500)
|
||||
etXmacaddr=$(nvram get et2macaddr)
|
||||
offset=1
|
||||
;;
|
||||
luxul,xwr-3100-v1 | \
|
||||
luxul,xwr-3150-v1)
|
||||
etXmacaddr=$(nvram get et0macaddr)
|
||||
offset=5
|
||||
;;
|
||||
meraki,mr26)
|
||||
label_mac="$(mtd_get_mac_binary_ubi board-config 0x66)"
|
||||
ucidef_set_interface_macaddr "lan" "$label_mac"
|
||||
ucidef_set_label_macaddr "$label_mac"
|
||||
;;
|
||||
meraki,mx64 | \
|
||||
meraki,mx64-a0 | \
|
||||
meraki,mx65)
|
||||
etXmacaddr=$(get_mac_binary "/sys/bus/i2c/devices/0-0050/eeprom" 0x66)
|
||||
offset=1
|
||||
;;
|
||||
*)
|
||||
etXmacaddr=$(nvram get et0macaddr)
|
||||
offset=1
|
||||
;;
|
||||
esac
|
||||
|
||||
# If WAN MAC isn't explicitly set, calculate it using base MAC as reference.
|
||||
[ -z "$wan_macaddr" -a -n "$etXmacaddr" ] && wan_macaddr=$(macaddr_add "$etXmacaddr" $offset)
|
||||
|
||||
[ -n "$wan_macaddr" ] && ucidef_set_interface_macaddr "wan" "$wan_macaddr"
|
||||
}
|
||||
|
||||
board_config_update
|
||||
board=$(board_name)
|
||||
bcm53xx_setup_interfaces "$board"
|
||||
bcm53xx_setup_macs "$board"
|
||||
board_config_flush
|
||||
|
||||
exit 0
|
||||
42
target/linux/bcm53xx/base-files/etc/diag.sh
Normal file
42
target/linux/bcm53xx/base-files/etc/diag.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions/leds.sh
|
||||
|
||||
get_status_led() {
|
||||
local status_led_file
|
||||
|
||||
# There may be more than one color of power LED, try to avoid amber/red
|
||||
status_led_file=$(find /sys/class/leds/ -name "*:power" -a ! -name "*:amber:*" -a ! -name "*:red:*" | head -n1)
|
||||
if [ -d "$status_led_file" ]; then
|
||||
status_led=$(basename $status_led_file)
|
||||
return
|
||||
fi;
|
||||
|
||||
# Now just pick any power LED
|
||||
status_led_file=$(find /sys/class/leds/ -name "*:power" | head -n1)
|
||||
if [ -d "$status_led_file" ]; then
|
||||
status_led=$(basename $status_led_file)
|
||||
return
|
||||
fi;
|
||||
}
|
||||
|
||||
set_state() {
|
||||
get_status_led
|
||||
|
||||
[ -z "$status_led" ] && return
|
||||
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/ash
|
||||
|
||||
[ "$ACTION" = "add" ] || exit 0
|
||||
|
||||
PHYNBR=${DEVPATH##*/phy}
|
||||
|
||||
[ -n $PHYNBR ] || exit 0
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
meraki,mr26)
|
||||
macaddr_add "$(macaddr_setbit_la $(mtd_get_mac_binary_ubi 'board-config' 0x66))" $(($PHYNBR * 8 + 1)) > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,23 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
# Exit if network doesn't contain any swconfig section
|
||||
uci -q get network.@switch[0] > /dev/null || exit 0
|
||||
|
||||
lan_proto="$(uci -q get network.lan.proto)"
|
||||
lan_ipaddr="$(uci -q get network.lan.ipaddr)"
|
||||
lan_netmask="$(uci -q get network.lan.netmask)"
|
||||
wan_proto="$(uci -q get network.wan.proto)"
|
||||
wan_ipaddr="$(uci -q get network.wan.ipaddr)"
|
||||
wan_netmask="$(uci -q get network.wan.netmask)"
|
||||
|
||||
rm /etc/config/network
|
||||
config_generate
|
||||
|
||||
uci -q batch <<-EOF
|
||||
set network.lan.proto="$lan_proto"
|
||||
set network.lan.ipaddr="$lan_ipaddr"
|
||||
set network.lan.netmask="$lan_netmask"
|
||||
set network.wan.proto="$wan_proto"
|
||||
set network.wan.ipaddr="$wan_ipaddr"
|
||||
set network.wan.netmask="$wan_netmask"
|
||||
EOF
|
||||
@@ -0,0 +1,3 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
uci set network.@globals[0].packet_steering="1"
|
||||
23
target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc
Normal file
23
target/linux/bcm53xx/base-files/etc/uci-defaults/09_fix_crc
Normal file
@@ -0,0 +1,23 @@
|
||||
. /lib/functions.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"\(kernel\|linux\)".*/\1/p' /proc/mtd)
|
||||
|
||||
fixtrx() {
|
||||
mtd ${kernel_size:+-c 0x$kernel_size} fixtrx firmware && exit 0
|
||||
}
|
||||
|
||||
fixseama() {
|
||||
mtd ${kernel_size:+-c 0x$kernel_size} fixseama firmware && exit 0
|
||||
}
|
||||
|
||||
case "$board" in
|
||||
dlink,dir-885l | \
|
||||
dlink,dir-890l)
|
||||
fixseama
|
||||
;;
|
||||
*)
|
||||
fixtrx
|
||||
;;
|
||||
esac
|
||||
419
target/linux/bcm53xx/base-files/lib/upgrade/platform.sh
Normal file
419
target/linux/bcm53xx/base-files/lib/upgrade/platform.sh
Normal file
@@ -0,0 +1,419 @@
|
||||
RAMFS_COPY_BIN='osafeloader oseama otrx truncate'
|
||||
|
||||
PART_NAME=firmware
|
||||
REQUIRE_IMAGE_METADATA=0
|
||||
|
||||
BCM53XX_FW_FORMAT=
|
||||
BCM53XX_FW_BOARD_ID=
|
||||
BCM53XX_FW_INT_IMG_FORMAT=
|
||||
BCM53XX_FW_INT_IMG_TRX_OFFSET=
|
||||
BCM53XX_FW_INT_IMG_EXTRACT_CMD=
|
||||
|
||||
LXL_FLAGS_VENDOR_LUXUL=0x00000001
|
||||
|
||||
# $(1): file to read magic from
|
||||
# $(2): offset in bytes
|
||||
get_magic_long_at() {
|
||||
dd if="$1" skip=$2 bs=1 count=4 2>/dev/null | hexdump -v -e '1/1 "%02x"'
|
||||
}
|
||||
|
||||
# $(1): file to read LE long number from
|
||||
# $(2): offset in bytes
|
||||
get_le_long_at() {
|
||||
echo $((0x$(dd if="$1" skip=$2 bs=1 count=4 2>/dev/null | hexdump -v -e '1/4 "%02x"')))
|
||||
}
|
||||
|
||||
platform_flash_type() {
|
||||
# On NAND devices "rootfs" is UBI volume, so won't be find in /proc/mtd
|
||||
grep -q "\"rootfs\"" /proc/mtd && {
|
||||
echo "serial"
|
||||
return
|
||||
}
|
||||
|
||||
echo "nand"
|
||||
}
|
||||
|
||||
platform_expected_image() {
|
||||
local machine=$(board_name)
|
||||
|
||||
case "$machine" in
|
||||
"dlink,dir-885l") echo "seamaseal wrgac42_dlink.2015_dir885l"; return;;
|
||||
"dlink,dir-890l") echo "seamaseal wrgac36_dlink.2013gui_dir890"; return;;
|
||||
"luxul,abr-4500-v1") echo "lxl ABR-4500"; return;;
|
||||
"luxul,xap-810-v1") echo "lxl XAP-810"; return;;
|
||||
"luxul,xap-1410-v1") echo "lxl XAP-1410"; return;;
|
||||
"luxul,xap-1440-v1") echo "lxl XAP-1440"; return;;
|
||||
"luxul,xap-1510-v1") echo "lxl XAP-1510"; return;;
|
||||
"luxul,xap-1610-v1") echo "lxl XAP-1610"; return;;
|
||||
"luxul,xbr-4500-v1") echo "lxl XBR-4500"; return;;
|
||||
"luxul,xwc-1000") echo "lxl XWC-1000"; return;;
|
||||
"luxul,xwc-2000-v1") echo "lxl XWC-2000"; return;;
|
||||
"luxul,xwr-1200-v1") echo "lxl XWR-1200"; return;;
|
||||
"luxul,xwr-3100-v1") echo "lxl XWR-3100"; return;;
|
||||
"luxul,xwr-3150-v1") echo "lxl XWR-3150"; return;;
|
||||
"netgear,r6250-v1") echo "chk U12H245T00_NETGEAR"; return;;
|
||||
"netgear,r6300-v2") echo "chk U12H240T00_NETGEAR"; return;;
|
||||
"netgear,r7000") echo "chk U12H270T00_NETGEAR"; return;;
|
||||
"netgear,r7900") echo "chk U12H315T30_NETGEAR"; return;;
|
||||
"netgear,r8000") echo "chk U12H315T00_NETGEAR"; return;;
|
||||
"netgear,r8500") echo "chk U12H334T00_NETGEAR"; return;;
|
||||
"tplink,archer-c9-v1") echo "safeloader"; return;;
|
||||
esac
|
||||
}
|
||||
|
||||
platform_identify() {
|
||||
local magic
|
||||
|
||||
magic=$(get_magic_long "$1")
|
||||
case "$magic" in
|
||||
"48445230")
|
||||
BCM53XX_FW_FORMAT="trx"
|
||||
return
|
||||
;;
|
||||
"2a23245e")
|
||||
local header_len=$((0x$(get_magic_long_at "$1" 4)))
|
||||
local board_id_len=$(($header_len - 40))
|
||||
|
||||
BCM53XX_FW_FORMAT="chk"
|
||||
BCM53XX_FW_BOARD_ID=$(dd if="$1" skip=40 bs=1 count=$board_id_len 2>/dev/null | hexdump -v -e '1/1 "%c"')
|
||||
BCM53XX_FW_INT_IMG_FORMAT="trx"
|
||||
BCM53XX_FW_INT_IMG_TRX_OFFSET="$header_len"
|
||||
BCM53XX_FW_INT_IMG_EXTRACT_CMD="dd skip=$header_len iflag=skip_bytes"
|
||||
return
|
||||
;;
|
||||
"4c584c23")
|
||||
local hdr_len=$(get_le_long_at "$1" 8)
|
||||
local flags=$(get_le_long_at "$1" 12)
|
||||
|
||||
[ $((flags & LXL_FLAGS_VENDOR_LUXUL)) -gt 0 ] && notify_firmware_no_backup
|
||||
|
||||
BCM53XX_FW_FORMAT="lxl"
|
||||
BCM53XX_FW_BOARD_ID=$(dd if="$1" skip=16 bs=1 count=16 2>/dev/null | hexdump -v -e '1/1 "%c"')
|
||||
BCM53XX_FW_INT_IMG_FORMAT="trx"
|
||||
BCM53XX_FW_INT_IMG_TRX_OFFSET="$hdr_len"
|
||||
BCM53XX_FW_INT_IMG_EXTRACT_CMD="dd skip=$hdr_len iflag=skip_bytes"
|
||||
|
||||
return
|
||||
;;
|
||||
"5ea3a417")
|
||||
BCM53XX_FW_FORMAT="seamaseal"
|
||||
BCM53XX_FW_BOARD_ID=$(oseama info "$1" | grep "Meta entry:.*signature=" | sed "s/.*=//")
|
||||
BCM53XX_FW_INT_IMG_EXTRACT_CMD="oseama extract - -e 0"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
magic=$(get_magic_long_at "$1" 14)
|
||||
[ "$magic" = "55324e44" ] && {
|
||||
BCM53XX_FW_FORMAT="cybertan"
|
||||
BCM53XX_FW_BOARD_ID=$(dd if="$1" bs=1 count=4 2>/dev/null | hexdump -v -e '1/1 "%c"')
|
||||
BCM53XX_FW_INT_IMG_FORMAT="trx"
|
||||
BCM53XX_FW_INT_IMG_TRX_OFFSET="32"
|
||||
BCM53XX_FW_INT_IMG_EXTRACT_CMD="dd skip=32 iflag=skip_bytes"
|
||||
return
|
||||
}
|
||||
|
||||
magic=$(get_magic_long_at "$1" 60)
|
||||
[ "$magic" = "4c584c23" ] && {
|
||||
notify_firmware_no_backup
|
||||
|
||||
BCM53XX_FW_FORMAT="lxlold"
|
||||
BCM53XX_FW_BOARD_ID=$(dd if="$1" skip=48 bs=1 count=12 2>/dev/null | hexdump -v -e '1/1 "%c"')
|
||||
BCM53XX_FW_INT_IMG_FORMAT="trx"
|
||||
BCM53XX_FW_INT_IMG_TRX_OFFSET="64"
|
||||
BCM53XX_FW_INT_IMG_EXTRACT_CMD="dd skip=64 iflag=skip_bytes"
|
||||
return
|
||||
}
|
||||
|
||||
if osafeloader info "$1" > /dev/null 2>&1; then
|
||||
BCM53XX_FW_FORMAT="safeloader"
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
platform_other_check_image() {
|
||||
[ "$#" -gt 1 ] && return 1
|
||||
|
||||
local error=0
|
||||
|
||||
platform_identify "$1"
|
||||
[ -z "$BCM53XX_FW_FORMAT" ] && {
|
||||
echo "Invalid image type. Please use firmware specific for this device."
|
||||
notify_firmware_broken
|
||||
return 1
|
||||
}
|
||||
echo "Found $BCM53XX_FW_FORMAT firmware for device $BCM53XX_FW_BOARD_ID"
|
||||
|
||||
local expected_image="$(platform_expected_image)"
|
||||
local tmp_format=$BCM53XX_FW_FORMAT
|
||||
[ "$tmp_format" = "lxlold" ] && tmp_format="lxl"
|
||||
[ -n "$expected_image" -a -n "$BCM53XX_FW_BOARD_ID" -a "$expected_image" != "$tmp_format $BCM53XX_FW_BOARD_ID" ] && {
|
||||
echo "Firmware doesn't match device ($expected_image)"
|
||||
error=1
|
||||
}
|
||||
|
||||
case "$BCM53XX_FW_FORMAT" in
|
||||
"seamaseal")
|
||||
$(oseama info "$1" -e 0 | grep -q "Meta entry:.*type=firmware") || {
|
||||
echo "Seama seal doesn't contain firmware entity"
|
||||
error=1
|
||||
}
|
||||
;;
|
||||
"trx")
|
||||
if ! otrx check "$1"; then
|
||||
echo "Failed to find a valid TRX in firmware"
|
||||
notify_firmware_test_result "trx_valid" 0
|
||||
error=1
|
||||
else
|
||||
notify_firmware_test_result "trx_valid" 1
|
||||
fi
|
||||
|
||||
[ "$expected_image" == "safeloader" ] && {
|
||||
echo "This device expects SafeLoader format and may not work with TRX"
|
||||
error=1
|
||||
}
|
||||
;;
|
||||
*)
|
||||
case "$BCM53XX_FW_INT_IMG_FORMAT" in
|
||||
"trx")
|
||||
# Make sure that both ways of extracting TRX work.
|
||||
# platform_do_upgrade() may use any of them.
|
||||
if ! otrx check "$1" -o "$BCM53XX_FW_INT_IMG_TRX_OFFSET" || \
|
||||
! $BCM53XX_FW_INT_IMG_EXTRACT_CMD < $1 | otrx check -; then
|
||||
echo "Invalid (corrupted?) TRX firmware"
|
||||
notify_firmware_test_result "trx_valid" 0
|
||||
error=1
|
||||
else
|
||||
notify_firmware_test_result "trx_valid" 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return $error
|
||||
}
|
||||
|
||||
platform_check_image() {
|
||||
local board
|
||||
|
||||
board="$(board_name)"
|
||||
case "$board" in
|
||||
meraki,mr26 | \
|
||||
meraki,mr32 | \
|
||||
meraki,mx64 | \
|
||||
meraki,mx64-a0 | \
|
||||
meraki,mx65)
|
||||
# NAND sysupgrade
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
platform_other_check_image "$1"
|
||||
return $?
|
||||
;;
|
||||
esac
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
|
||||
# $(1): TRX image or firmware containing TRX
|
||||
# $(2): offset of TRX in firmware (optional)
|
||||
platform_do_upgrade_nand_trx() {
|
||||
local dir="/tmp/sysupgrade-bcm53xx"
|
||||
local trx="$1"
|
||||
local offset="$2"
|
||||
|
||||
# Extract partitions from trx
|
||||
rm -fR $dir
|
||||
mkdir -p $dir
|
||||
otrx extract "$trx" \
|
||||
${offset:+-o $offset} \
|
||||
-1 $dir/kernel \
|
||||
-2 $dir/root
|
||||
[ $? -ne 0 ] && {
|
||||
echo "Failed to extract TRX partitions."
|
||||
return
|
||||
}
|
||||
|
||||
# Firmwares without UBI image should be flashed "normally"
|
||||
local root_type=$(identify $dir/root)
|
||||
[ "$root_type" != "ubi" ] && {
|
||||
echo "Provided firmware doesn't use UBI for rootfs."
|
||||
return
|
||||
}
|
||||
|
||||
# Prepare TRX file with just a kernel that will replace current one
|
||||
local linux_length=$(grep "\"linux\"" /proc/mtd | sed "s/mtd[0-9]*:[ \t]*\([^ \t]*\).*/\1/")
|
||||
[ -z "$linux_length" ] && {
|
||||
echo "Unable to find \"linux\" partition size"
|
||||
exit 1
|
||||
}
|
||||
linux_length=$((0x$linux_length))
|
||||
local kernel_length=$(wc -c $dir/kernel | cut -d ' ' -f 1)
|
||||
[ $kernel_length -gt $linux_length ] && {
|
||||
echo "New kernel doesn't fit \"linux\" partition."
|
||||
return
|
||||
}
|
||||
rm -f /tmp/null.bin
|
||||
rm -f /tmp/kernel.trx
|
||||
touch /tmp/null.bin
|
||||
otrx create /tmp/kernel.trx \
|
||||
-f $dir/kernel -b $(($linux_length + 28)) \
|
||||
-f /tmp/null.bin
|
||||
[ $? -ne 0 ] && {
|
||||
echo "Failed to create simple TRX with new kernel."
|
||||
return
|
||||
}
|
||||
|
||||
# Prepare UBI image (drop unwanted extra blocks)
|
||||
local ubi_length=0
|
||||
while [ "$(dd if=$dir/root skip=$ubi_length bs=1 count=4 2>/dev/null)" = "UBI#" ]; do
|
||||
ubi_length=$(($ubi_length + 131072))
|
||||
done
|
||||
truncate -s $ubi_length $dir/root
|
||||
[ $? -ne 0 ] && {
|
||||
echo "Failed to prepare new UBI image."
|
||||
return
|
||||
}
|
||||
|
||||
# Flash
|
||||
mtd write /tmp/kernel.trx firmware || exit 1
|
||||
nand_do_upgrade $dir/root
|
||||
}
|
||||
|
||||
platform_do_upgrade_nand_seamaseal() {
|
||||
local dir="/tmp/sysupgrade-bcm53xx"
|
||||
local seamaseal="$1"
|
||||
local tmp
|
||||
|
||||
# Extract Seama entity from Seama seal
|
||||
rm -fR $dir
|
||||
mkdir -p $dir
|
||||
oseama extract "$seamaseal" \
|
||||
-e 0 \
|
||||
-o $dir/seama.entity
|
||||
[ $? -ne 0 ] && {
|
||||
echo "Failed to extract Seama entity."
|
||||
return
|
||||
}
|
||||
local entity_size=$(wc -c $dir/seama.entity | cut -d ' ' -f 1)
|
||||
|
||||
local ubi_offset=0
|
||||
tmp=0
|
||||
while [ 1 ]; do
|
||||
[ $tmp -ge $entity_size ] && break
|
||||
[ "$(dd if=$dir/seama.entity skip=$tmp bs=1 count=4 2>/dev/null)" = "UBI#" ] && {
|
||||
ubi_offset=$tmp
|
||||
break
|
||||
}
|
||||
tmp=$(($tmp + 131072))
|
||||
done
|
||||
[ $ubi_offset -eq 0 ] && {
|
||||
echo "Failed to find UBI in Seama entity."
|
||||
return
|
||||
}
|
||||
|
||||
local ubi_length=0
|
||||
while [ "$(dd if=$dir/seama.entity skip=$(($ubi_offset + $ubi_length)) bs=1 count=4 2>/dev/null)" = "UBI#" ]; do
|
||||
ubi_length=$(($ubi_length + 131072))
|
||||
done
|
||||
|
||||
dd if=$dir/seama.entity of=$dir/kernel.seama bs=131072 count=$(($ubi_offset / 131072)) 2>/dev/null
|
||||
dd if=$dir/seama.entity of=$dir/root.ubi bs=131072 skip=$(($ubi_offset / 131072)) count=$(($ubi_length / 131072)) 2>/dev/null
|
||||
|
||||
# Flash
|
||||
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"\(kernel\|linux\)".*/\1/p' /proc/mtd)
|
||||
mtd write $dir/kernel.seama firmware || exit 1
|
||||
mtd ${kernel_size:+-c 0x$kernel_size} fixseama firmware
|
||||
nand_do_upgrade $dir/root.ubi
|
||||
}
|
||||
|
||||
platform_img_from_safeloader() {
|
||||
local dir="/tmp/sysupgrade-bcm53xx"
|
||||
|
||||
# Extract partitions from SafeLoader
|
||||
rm -fR $dir
|
||||
mkdir -p $dir
|
||||
osafeloader extract "$1" \
|
||||
-p "os-image" \
|
||||
-o $dir/os-image
|
||||
osafeloader extract "$1" \
|
||||
-p "file-system" \
|
||||
-o $dir/file-system
|
||||
|
||||
mtd write $dir/file-system rootfs
|
||||
|
||||
echo -n $dir/os-image
|
||||
}
|
||||
|
||||
platform_other_do_upgrade() {
|
||||
platform_identify "$1"
|
||||
|
||||
[ "$(platform_flash_type)" == "nand" ] && {
|
||||
# Try NAND-aware upgrade
|
||||
case "$BCM53XX_FW_FORMAT" in
|
||||
"seamaseal")
|
||||
platform_do_upgrade_nand_seamaseal "$1"
|
||||
;;
|
||||
"trx")
|
||||
platform_do_upgrade_nand_trx "$1"
|
||||
;;
|
||||
*)
|
||||
case "$BCM53XX_FW_INT_IMG_FORMAT" in
|
||||
"trx")
|
||||
platform_do_upgrade_nand_trx "$1" "$BCM53XX_FW_INT_IMG_TRX_OFFSET"
|
||||
;;
|
||||
*)
|
||||
echo "NAND aware sysupgrade is unsupported for $BCM53XX_FW_FORMAT format"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
# Above calls exit on success.
|
||||
# If we got here something went wrong.
|
||||
echo "Writing whole image to NAND flash. All erase counters will be lost."
|
||||
}
|
||||
|
||||
case "$BCM53XX_FW_FORMAT" in
|
||||
"safeloader")
|
||||
PART_NAME=os-image
|
||||
img=$(platform_img_from_safeloader "$1")
|
||||
default_do_upgrade "$img"
|
||||
;;
|
||||
"seamaseal")
|
||||
default_do_upgrade "$1" "$BCM53XX_FW_INT_IMG_EXTRACT_CMD"
|
||||
;;
|
||||
"trx")
|
||||
default_do_upgrade "$1"
|
||||
;;
|
||||
*)
|
||||
case "$BCM53XX_FW_INT_IMG_FORMAT" in
|
||||
"trx")
|
||||
default_do_upgrade "$1" "$BCM53XX_FW_INT_IMG_EXTRACT_CMD"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
platform_do_upgrade() {
|
||||
case "$(board_name)" in
|
||||
meraki,mr26 | \
|
||||
meraki,mr32)
|
||||
REQUIRE_IMAGE_METADATA=1
|
||||
CI_KERNPART="part.safe"
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
meraki,mx64 | \
|
||||
meraki,mx64-a0 | \
|
||||
meraki,mx65)
|
||||
REQUIRE_IMAGE_METADATA=1
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
*)
|
||||
platform_other_do_upgrade "$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
25
target/linux/bcm53xx/base-files/usr/libexec/platform/packet-steering.sh
Executable file
25
target/linux/bcm53xx/base-files/usr/libexec/platform/packet-steering.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
|
||||
packet_steering="$(uci -q get network.@globals[0].packet_steering)"
|
||||
flow_offloading="$(uci -q get firewall.@defaults[0].flow_offloading)"
|
||||
flow_offloading_hw="$(uci -q get firewall.@defaults[0].flow_offloading_hw)"
|
||||
|
||||
[ "$packet_steering" != 1 ] && {
|
||||
echo 0 > /sys/class/net/br-lan/queues/rx-0/rps_cpus
|
||||
echo 0 > /sys/class/net/eth0/queues/rx-0/rps_cpus
|
||||
exit 0
|
||||
}
|
||||
|
||||
if [ ${flow_offloading_hw:-0} -gt 0 ]; then
|
||||
# HW offloading
|
||||
echo 0 > /sys/class/net/br-lan/queues/rx-0/rps_cpus
|
||||
echo 0 > /sys/class/net/eth0/queues/rx-0/rps_cpus
|
||||
elif [ ${flow_offloading:-0} -gt 0 ]; then
|
||||
# SW offloading
|
||||
# br-lan setup doesn't seem to matter for offloading case
|
||||
echo 2 > /sys/class/net/eth0/queues/rx-0/rps_cpus
|
||||
else
|
||||
# Default
|
||||
echo 2 > /sys/class/net/br-lan/queues/rx-0/rps_cpus
|
||||
echo 0 > /sys/class/net/eth0/queues/rx-0/rps_cpus
|
||||
fi
|
||||
358
target/linux/bcm53xx/config-6.6
Normal file
358
target/linux/bcm53xx/config-6.6
Normal file
@@ -0,0 +1,358 @@
|
||||
CONFIG_ALIGNMENT_TRAP=y
|
||||
CONFIG_ARCH_32BIT_OFF_T=y
|
||||
CONFIG_ARCH_BCM=y
|
||||
CONFIG_ARCH_BCM_5301X=y
|
||||
CONFIG_ARCH_BCM_53573=y
|
||||
CONFIG_ARCH_BCM_IPROC=y
|
||||
CONFIG_ARCH_BCM_NSP=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_KEEP_MEMBLOCK=y
|
||||
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
|
||||
CONFIG_ARCH_MULTIPLATFORM=y
|
||||
CONFIG_ARCH_MULTI_V6_V7=y
|
||||
CONFIG_ARCH_MULTI_V7=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
|
||||
CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
CONFIG_ARCH_STACKWALK=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARM_AMBA=y
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
CONFIG_ARM_ARCH_TIMER=y
|
||||
CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
|
||||
# CONFIG_ARM_ATAG_DTB_COMPAT is not set
|
||||
CONFIG_ARM_ERRATA_754322=y
|
||||
CONFIG_ARM_ERRATA_764369=y
|
||||
CONFIG_ARM_ERRATA_775420=y
|
||||
CONFIG_ARM_GIC=y
|
||||
CONFIG_ARM_GLOBAL_TIMER=y
|
||||
CONFIG_ARM_GT_INITIAL_PRESCALER_VAL=1
|
||||
CONFIG_ARM_HAS_GROUP_RELOCS=y
|
||||
CONFIG_ARM_HEAVY_MB=y
|
||||
CONFIG_ARM_L1_CACHE_SHIFT=6
|
||||
CONFIG_ARM_L1_CACHE_SHIFT_6=y
|
||||
CONFIG_ARM_PATCH_IDIV=y
|
||||
CONFIG_ARM_PATCH_PHYS_VIRT=y
|
||||
CONFIG_ARM_SP805_WATCHDOG=y
|
||||
CONFIG_ARM_THUMB=y
|
||||
CONFIG_ARM_TIMER_SP804=y
|
||||
CONFIG_ARM_UNWIND=y
|
||||
CONFIG_ARM_VIRT_EXT=y
|
||||
CONFIG_ATAGS=y
|
||||
CONFIG_AUTO_ZRELADDR=y
|
||||
CONFIG_B53=y
|
||||
CONFIG_B53_MDIO_DRIVER=y
|
||||
CONFIG_B53_SERDES=y
|
||||
CONFIG_B53_SRAB_DRIVER=y
|
||||
CONFIG_BCM47XX_NVRAM=y
|
||||
CONFIG_BCM47XX_SPROM=y
|
||||
CONFIG_BCM47XX_WDT=y
|
||||
CONFIG_BCMA=y
|
||||
CONFIG_BCMA_BLOCKIO=y
|
||||
CONFIG_BCMA_DEBUG=y
|
||||
CONFIG_BCMA_DRIVER_GMAC_CMN=y
|
||||
CONFIG_BCMA_DRIVER_GPIO=y
|
||||
CONFIG_BCMA_DRIVER_PCI=y
|
||||
CONFIG_BCMA_FALLBACK_SPROM=y
|
||||
CONFIG_BCMA_HOST_PCI=y
|
||||
CONFIG_BCMA_HOST_PCI_POSSIBLE=y
|
||||
CONFIG_BCMA_HOST_SOC=y
|
||||
CONFIG_BCMA_SFLASH=y
|
||||
# CONFIG_BCM_CYGNUS_PHY is not set
|
||||
CONFIG_BCM_NET_PHYLIB=y
|
||||
CONFIG_BCM_NS_THERMAL=y
|
||||
CONFIG_BCM_SR_THERMAL=y
|
||||
CONFIG_BGMAC=y
|
||||
CONFIG_BGMAC_BCMA=y
|
||||
CONFIG_BGMAC_PLATFORM=y
|
||||
CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
|
||||
CONFIG_BLK_MQ_PCI=y
|
||||
CONFIG_BOUNCE=y
|
||||
CONFIG_BROADCOM_PHY=y
|
||||
CONFIG_CACHE_L2X0=y
|
||||
CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
|
||||
CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y
|
||||
CONFIG_CLKSRC_MMIO=y
|
||||
# CONFIG_CLK_BCM_NS2 is not set
|
||||
CONFIG_CLK_BCM_NSP=y
|
||||
# CONFIG_CLK_BCM_SR is not set
|
||||
CONFIG_CLONE_BACKWARDS=y
|
||||
CONFIG_COMMON_CLK=y
|
||||
CONFIG_COMMON_CLK_IPROC=y
|
||||
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
|
||||
CONFIG_COMPAT_32BIT_TIME=y
|
||||
CONFIG_CONTEXT_TRACKING=y
|
||||
CONFIG_CONTEXT_TRACKING_IDLE=y
|
||||
CONFIG_CPU_32v6K=y
|
||||
CONFIG_CPU_32v7=y
|
||||
CONFIG_CPU_ABRT_EV7=y
|
||||
CONFIG_CPU_CACHE_V7=y
|
||||
CONFIG_CPU_CACHE_VIPT=y
|
||||
CONFIG_CPU_COPY_V6=y
|
||||
CONFIG_CPU_CP15=y
|
||||
CONFIG_CPU_CP15_MMU=y
|
||||
CONFIG_CPU_HAS_ASID=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_PABRT_V7=y
|
||||
CONFIG_CPU_RMAP=y
|
||||
CONFIG_CPU_SPECTRE=y
|
||||
CONFIG_CPU_THUMB_CAPABLE=y
|
||||
CONFIG_CPU_TLB_V7=y
|
||||
CONFIG_CPU_V7=y
|
||||
CONFIG_CRC16=y
|
||||
CONFIG_CRYPTO_DEFLATE=y
|
||||
CONFIG_CRYPTO_HASH_INFO=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LIB_GF128MUL=y
|
||||
CONFIG_CRYPTO_LIB_SHA1=y
|
||||
CONFIG_CRYPTO_LIB_UTILS=y
|
||||
CONFIG_CRYPTO_LZO=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
|
||||
CONFIG_DCACHE_WORD_ACCESS=y
|
||||
CONFIG_DEBUG_BCM_5301X=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_LL=y
|
||||
CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
|
||||
CONFIG_DEBUG_MISC=y
|
||||
CONFIG_DEBUG_UART_8250=y
|
||||
CONFIG_DEBUG_UART_8250_SHIFT=0
|
||||
CONFIG_DEBUG_UART_PHYS=0x18000300
|
||||
CONFIG_DEBUG_UART_VIRT=0xf1000300
|
||||
CONFIG_DEBUG_USER=y
|
||||
CONFIG_DMA_OPS=y
|
||||
CONFIG_DTC=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_EDAC_ATOMIC_SCRUB=y
|
||||
CONFIG_EDAC_SUPPORT=y
|
||||
CONFIG_EEPROM_AT24=y
|
||||
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
|
||||
CONFIG_EXTCON=y
|
||||
CONFIG_FIXED_PHY=y
|
||||
CONFIG_FIX_EARLYCON_MEM=y
|
||||
CONFIG_FS_IOMAP=y
|
||||
CONFIG_FUNCTION_ALIGNMENT=0
|
||||
CONFIG_FWNODE_MDIO=y
|
||||
CONFIG_FW_LOADER_PAGED_BUF=y
|
||||
CONFIG_FW_LOADER_SYSFS=y
|
||||
# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
|
||||
CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
|
||||
CONFIG_GENERIC_ALLOCATOR=y
|
||||
CONFIG_GENERIC_ARCH_TOPOLOGY=y
|
||||
CONFIG_GENERIC_BUG=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
|
||||
CONFIG_GENERIC_CPU_AUTOPROBE=y
|
||||
CONFIG_GENERIC_CPU_VULNERABILITIES=y
|
||||
CONFIG_GENERIC_EARLY_IOREMAP=y
|
||||
CONFIG_GENERIC_GETTIMEOFDAY=y
|
||||
CONFIG_GENERIC_IDLE_POLL_SETUP=y
|
||||
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
|
||||
CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
|
||||
CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
|
||||
CONFIG_GENERIC_PCI_IOMAP=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_GENERIC_PINCONF=y
|
||||
CONFIG_GENERIC_PINCTRL_GROUPS=y
|
||||
CONFIG_GENERIC_PINMUX_FUNCTIONS=y
|
||||
CONFIG_GENERIC_SCHED_CLOCK=y
|
||||
CONFIG_GENERIC_SMP_IDLE_THREAD=y
|
||||
CONFIG_GENERIC_STRNCPY_FROM_USER=y
|
||||
CONFIG_GENERIC_STRNLEN_USER=y
|
||||
CONFIG_GENERIC_TIME_VSYSCALL=y
|
||||
CONFIG_GENERIC_VDSO_32=y
|
||||
CONFIG_GPIOLIB_IRQCHIP=y
|
||||
CONFIG_GPIO_74X164=y
|
||||
CONFIG_GPIO_BCM_XGS_IPROC=y
|
||||
CONFIG_GPIO_CDEV=y
|
||||
CONFIG_GPIO_GENERIC=y
|
||||
CONFIG_GRO_CELLS=y
|
||||
CONFIG_HARDEN_BRANCH_PREDICTOR=y
|
||||
CONFIG_HARDIRQS_SW_RESEND=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAS_IOPORT_MAP=y
|
||||
CONFIG_HAVE_SMP=y
|
||||
CONFIG_HIGHMEM=y
|
||||
CONFIG_HIGHPTE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_BCM2835=y
|
||||
CONFIG_HZ_FIXED=0
|
||||
CONFIG_HZ_PERIODIC=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_BCM_IPROC=y
|
||||
# CONFIG_I2C_SLAVE_TESTUNIT is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQCHIP=y
|
||||
CONFIG_IRQSTACKS=y
|
||||
CONFIG_IRQ_DOMAIN=y
|
||||
CONFIG_IRQ_DOMAIN_HIERARCHY=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
CONFIG_IRQ_WORK=y
|
||||
CONFIG_KMAP_LOCAL=y
|
||||
CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
|
||||
# CONFIG_LEDS_BCM63138 is not set
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LOCK_SPIN_ON_OWNER=y
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BCM_IPROC=y
|
||||
CONFIG_MDIO_BUS=y
|
||||
CONFIG_MDIO_BUS_MUX=y
|
||||
# CONFIG_MDIO_BUS_MUX_BCM_IPROC is not set
|
||||
CONFIG_MDIO_BUS_MUX_MMIOREG=y
|
||||
CONFIG_MDIO_DEVICE=y
|
||||
CONFIG_MDIO_DEVRES=y
|
||||
CONFIG_MFD_SYSCON=y
|
||||
CONFIG_MIGHT_HAVE_CACHE_L2X0=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
|
||||
CONFIG_MODULES_USE_ELF_REL=y
|
||||
CONFIG_MTD_BCM47XXSFLASH=y
|
||||
CONFIG_MTD_BCM47XX_PARTS=y
|
||||
CONFIG_MTD_NAND_BRCMNAND=y
|
||||
CONFIG_MTD_NAND_BRCMNAND_IPROC=y
|
||||
CONFIG_MTD_NAND_CORE=y
|
||||
CONFIG_MTD_NAND_ECC=y
|
||||
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
|
||||
CONFIG_MTD_OF_PARTS_LINKSYS_NS=y
|
||||
CONFIG_MTD_PARSER_TPLINK_SAFELOADER=y
|
||||
CONFIG_MTD_PARSER_TRX=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_SPLIT_SEAMA_FW=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_MTD_UBI_BEB_LIMIT=20
|
||||
CONFIG_MTD_UBI_BLOCK=y
|
||||
CONFIG_MTD_UBI_WL_THRESHOLD=4096
|
||||
CONFIG_MUTEX_SPIN_ON_OWNER=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_SRCU_NMI_SAFE=y
|
||||
CONFIG_NET_DEVLINK=y
|
||||
CONFIG_NET_DSA=y
|
||||
CONFIG_NET_DSA_QCA8K=y
|
||||
CONFIG_NET_DSA_QCA8K_LEDS_SUPPORT=y
|
||||
CONFIG_NET_DSA_TAG_BRCM=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_COMMON=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_LEGACY=y
|
||||
CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
|
||||
CONFIG_NET_DSA_TAG_NONE=y
|
||||
CONFIG_NET_DSA_TAG_QCA=y
|
||||
CONFIG_NET_EGRESS=y
|
||||
CONFIG_NET_FLOW_LIMIT=y
|
||||
CONFIG_NET_INGRESS=y
|
||||
CONFIG_NET_SELFTESTS=y
|
||||
CONFIG_NET_SWITCHDEV=y
|
||||
CONFIG_NET_XGRESS=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_BRCM_NVRAM=y
|
||||
CONFIG_NVMEM_LAYOUTS=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_OF=y
|
||||
CONFIG_OF_ADDRESS=y
|
||||
CONFIG_OF_EARLY_FLATTREE=y
|
||||
CONFIG_OF_FLATTREE=y
|
||||
CONFIG_OF_GPIO=y
|
||||
CONFIG_OF_IRQ=y
|
||||
CONFIG_OF_KOBJ=y
|
||||
CONFIG_OF_MDIO=y
|
||||
CONFIG_OLD_SIGACTION=y
|
||||
CONFIG_OLD_SIGSUSPEND3=y
|
||||
CONFIG_OUTER_CACHE=y
|
||||
CONFIG_OUTER_CACHE_SYNC=y
|
||||
CONFIG_PADATA=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
CONFIG_PAGE_POOL=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
|
||||
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCIE_IPROC=y
|
||||
CONFIG_PCIE_IPROC_BCMA=y
|
||||
# CONFIG_PCIE_IPROC_PLATFORM is not set
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
CONFIG_PCI_DOMAINS_GENERIC=y
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PGTABLE_LEVELS=2
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_PHYLIB_LEDS=y
|
||||
CONFIG_PHYLINK=y
|
||||
# CONFIG_PHY_BCM_NS_USB2 is not set
|
||||
# CONFIG_PHY_BCM_NS_USB3 is not set
|
||||
# CONFIG_PHY_BCM_SR_PCIE is not set
|
||||
CONFIG_PHY_BCM_SR_USB=y
|
||||
# CONFIG_PHY_BRCM_SATA is not set
|
||||
# CONFIG_PHY_NS2_USB_DRD is not set
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_IPROC_GPIO=y
|
||||
CONFIG_PINCTRL_NS=y
|
||||
# CONFIG_PINCTRL_NS2_MUX is not set
|
||||
CONFIG_PINCTRL_NSP_GPIO=y
|
||||
CONFIG_PINCTRL_NSP_MUX=y
|
||||
CONFIG_PREEMPT_NONE_BUILD=y
|
||||
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_BCM_IPROC=y
|
||||
CONFIG_PWM_SYSFS=y
|
||||
CONFIG_RANDSTRUCT_NONE=y
|
||||
CONFIG_RATIONAL=y
|
||||
CONFIG_REGMAP=y
|
||||
CONFIG_REGMAP_I2C=y
|
||||
CONFIG_REGMAP_MMIO=y
|
||||
CONFIG_RFS_ACCEL=y
|
||||
CONFIG_RPS=y
|
||||
CONFIG_RWSEM_SPIN_ON_OWNER=y
|
||||
CONFIG_SERIAL_8250_FSL=y
|
||||
CONFIG_SERIAL_MCTRL_GPIO=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_SMP_ON_UP=y
|
||||
CONFIG_SOCK_RX_QUEUE_MAPPING=y
|
||||
CONFIG_SOFTIRQ_ON_OWN_STACK=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_BCM_QSPI=y
|
||||
CONFIG_SPI_BITBANG=y
|
||||
CONFIG_SPI_GPIO=y
|
||||
CONFIG_SPI_MASTER=y
|
||||
CONFIG_SPI_MEM=y
|
||||
CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
|
||||
CONFIG_SWPHY=y
|
||||
CONFIG_SWP_EMULATE=y
|
||||
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
|
||||
CONFIG_THERMAL_GOV_STEP_WISE=y
|
||||
CONFIG_THERMAL_OF=y
|
||||
CONFIG_THREAD_INFO_IN_TASK=y
|
||||
CONFIG_TICK_CPU_ACCOUNTING=y
|
||||
CONFIG_TIMER_OF=y
|
||||
CONFIG_TIMER_PROBE=y
|
||||
CONFIG_TREE_RCU=y
|
||||
CONFIG_TREE_SRCU=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
|
||||
CONFIG_UNWINDER_ARM=y
|
||||
CONFIG_USB_SUPPORT=y
|
||||
CONFIG_USE_OF=y
|
||||
# CONFIG_VFP is not set
|
||||
CONFIG_WATCHDOG_CORE=y
|
||||
CONFIG_XPS=y
|
||||
CONFIG_XXHASH=y
|
||||
CONFIG_XZ_DEC_ARM=y
|
||||
CONFIG_XZ_DEC_BCJ=y
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZLIB_DEFLATE=y
|
||||
CONFIG_ZLIB_INFLATE=y
|
||||
CONFIG_ZSTD_COMMON=y
|
||||
CONFIG_ZSTD_COMPRESS=y
|
||||
CONFIG_ZSTD_DECOMPRESS=y
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* This is a part of mm/cache-v7.S with extracted entry flushing D-cache. We
|
||||
* need it for Broadcom devices with broken bootloader leaving cache enabled.
|
||||
*
|
||||
* Copyright (C) 2001 Deep Blue Solutions Ltd.
|
||||
* Copyright (C) 2005 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
__INIT
|
||||
|
||||
/*
|
||||
* v7_flush_dcache_all()
|
||||
*
|
||||
* Flush the whole D-cache.
|
||||
*
|
||||
* Corrupted registers: r0-r7, r9-r11 (r6 only in Thumb mode)
|
||||
*
|
||||
* - mm - mm_struct describing address space
|
||||
*/
|
||||
ENTRY(v7_flush_dcache_all)
|
||||
dmb @ ensure ordering with previous memory accesses
|
||||
mrc p15, 1, r0, c0, c0, 1 @ read clidr
|
||||
mov r3, r0, lsr #23 @ move LoC into position
|
||||
ands r3, r3, #7 << 1 @ extract LoC*2 from clidr
|
||||
beq finished @ if loc is 0, then no need to clean
|
||||
start_flush_levels:
|
||||
mov r10, #0 @ start clean at cache level 0
|
||||
flush_levels:
|
||||
add r2, r10, r10, lsr #1 @ work out 3x current cache level
|
||||
mov r1, r0, lsr r2 @ extract cache type bits from clidr
|
||||
and r1, r1, #7 @ mask of the bits for current cache only
|
||||
cmp r1, #2 @ see what cache we have at this level
|
||||
blt skip @ skip if no cache, or just i-cache
|
||||
#ifdef CONFIG_PREEMPT
|
||||
save_and_disable_irqs_notrace r9 @ make cssr&csidr read atomic
|
||||
#endif
|
||||
mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr
|
||||
isb @ isb to sych the new cssr&csidr
|
||||
mrc p15, 1, r1, c0, c0, 0 @ read the new csidr
|
||||
#ifdef CONFIG_PREEMPT
|
||||
restore_irqs_notrace r9
|
||||
#endif
|
||||
and r2, r1, #7 @ extract the length of the cache lines
|
||||
add r2, r2, #4 @ add 4 (line length offset)
|
||||
movw r4, #0x3ff
|
||||
ands r4, r4, r1, lsr #3 @ find maximum number on the way size
|
||||
clz r5, r4 @ find bit position of way size increment
|
||||
movw r7, #0x7fff
|
||||
ands r7, r7, r1, lsr #13 @ extract max number of the index size
|
||||
loop1:
|
||||
mov r9, r7 @ create working copy of max index
|
||||
loop2:
|
||||
ARM( orr r11, r10, r4, lsl r5 ) @ factor way and cache number into r11
|
||||
THUMB( lsl r6, r4, r5 )
|
||||
THUMB( orr r11, r10, r6 ) @ factor way and cache number into r11
|
||||
ARM( orr r11, r11, r9, lsl r2 ) @ factor index number into r11
|
||||
THUMB( lsl r6, r9, r2 )
|
||||
THUMB( orr r11, r11, r6 ) @ factor index number into r11
|
||||
mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way
|
||||
subs r9, r9, #1 @ decrement the index
|
||||
bge loop2
|
||||
subs r4, r4, #1 @ decrement the way
|
||||
bge loop1
|
||||
skip:
|
||||
add r10, r10, #2 @ increment cache number
|
||||
cmp r3, r10
|
||||
bgt flush_levels
|
||||
finished:
|
||||
mov r10, #0 @ swith back to cache level 0
|
||||
mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr
|
||||
dsb st
|
||||
isb
|
||||
ret lr
|
||||
ENDPROC(v7_flush_dcache_all)
|
||||
1
target/linux/bcm53xx/generic/target.mk
Normal file
1
target/linux/bcm53xx/generic/target.mk
Normal file
@@ -0,0 +1 @@
|
||||
BOARDNAME:=Generic
|
||||
573
target/linux/bcm53xx/image/Makefile
Normal file
573
target/linux/bcm53xx/image/Makefile
Normal file
@@ -0,0 +1,573 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2013 OpenWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/image.mk
|
||||
|
||||
define Image/Prepare
|
||||
rm -f $(KDIR)/fs_mark
|
||||
echo -ne '\xde\xad\xc0\xde' > $(KDIR)/fs_mark
|
||||
$(call prepare_generic_squashfs,$(KDIR)/fs_mark)
|
||||
|
||||
# For UBI we want only one extra block
|
||||
rm -f $(KDIR)/ubi_mark
|
||||
echo -ne '\xde\xad\xc0\xde' > $(KDIR)/ubi_mark
|
||||
endef
|
||||
|
||||
define Build/lzma-d16
|
||||
$(STAGING_DIR_HOST)/bin/lzma e $@ -d16 $(1) $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
# Similar to Build/tplink-safeloader but uses TRX instead of clean kernel
|
||||
define Build/bcm53xx-tplink-safeloader
|
||||
$(STAGING_DIR_HOST)/bin/trx \
|
||||
-o $@.trx \
|
||||
-m 33554432 \
|
||||
-f $(IMAGE_KERNEL) -a 1024
|
||||
$(STAGING_DIR_HOST)/bin/tplink-safeloader \
|
||||
-B $(TPLINK_BOARD) \
|
||||
-k $@.trx \
|
||||
-r $@ \
|
||||
-j \
|
||||
-o $@.new
|
||||
mv $@.new $@
|
||||
rm $@.trx
|
||||
endef
|
||||
|
||||
define Build/buffalo-wzr-header
|
||||
$(eval product=$(word 1,$(1)))
|
||||
$(eval region=$(word 2,$(1)))
|
||||
( \
|
||||
echo $(product)_$(BUFFALO_TAG_VERSION)_$(BUFFALO_TAG_MINOR)_$(region)_$(BUFFALO_TAG_PLATFORM); \
|
||||
echo filelen=$$(stat -c%s $@); \
|
||||
cat $@ \
|
||||
) > $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
# TRX with only one (kernel) partition
|
||||
define Build/trx
|
||||
$(STAGING_DIR_HOST)/bin/trx \
|
||||
-o $@.new \
|
||||
-m 33554432 \
|
||||
-f $@
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/trx-serial
|
||||
$(STAGING_DIR_HOST)/bin/otrx create $@.new \
|
||||
-f $(IMAGE_KERNEL) -a 1024 \
|
||||
-f $@ -a 0x10000 -A $(KDIR)/fs_mark
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/trx-nand
|
||||
# kernel: always use 4 MiB (-28 B or TRX header) to allow upgrades even
|
||||
# if it grows up between releases
|
||||
# root: UBI with one extra block containing UBI mark to trigger erasing
|
||||
# rest of partition
|
||||
$(STAGING_DIR_HOST)/bin/otrx create $@.new \
|
||||
-f $(IMAGE_KERNEL) -a 0x20000 -b 0x400000 \
|
||||
-f $@ \
|
||||
-A $(KDIR)/ubi_mark -a 0x20000
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/asus-trx
|
||||
$(STAGING_DIR_HOST)/bin/asustrx \
|
||||
-p $(ASUS_PRODUCTID) -i $@ -o $@.new
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
define Build/luxul-lxl
|
||||
$(STAGING_DIR_HOST)/bin/lxlfw create $@.new \
|
||||
-i $@ \
|
||||
-b $(LUXUL_BOARD)
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
# Outputs a lzma compressed U-Boot that start at 0x00008000
|
||||
# just like the D-Link boot loaders expect
|
||||
define Build/dlink-uboot-bin
|
||||
$(STAGING_DIR_HOST)/bin/lzma e $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-u-boot.bin -d16 $@
|
||||
endef
|
||||
|
||||
define Build/seama-nand
|
||||
# Seama entity
|
||||
$(STAGING_DIR_HOST)/bin/oseama \
|
||||
entity $@.entity \
|
||||
-m "dev=/dev/mtdblock/7" \
|
||||
-m "type=firmware" \
|
||||
-f $(IMAGE_KERNEL) \
|
||||
-b 0x400000 \
|
||||
-f $@ \
|
||||
-f $(KDIR)/ubi_mark
|
||||
# Seama container
|
||||
$(STAGING_DIR_HOST)/bin/seama \
|
||||
-s $@ \
|
||||
-m "signature=$(SIGNATURE)" \
|
||||
-i $@.entity
|
||||
endef
|
||||
|
||||
define Build/dwl8610ap-image
|
||||
mkdir -p $@.tmptar
|
||||
# The DWL8610AP pretends to be a Broadcom reference design
|
||||
echo "bcm953012er" > $@.tmptar/board
|
||||
echo "LVL7" > $@.tmptar/model
|
||||
# Something high beyond what D-Link has put out
|
||||
echo "5.0.0.0" > $@.tmptar/version
|
||||
# Create rootfs.bin, this is just a NAND image including everything
|
||||
cp $@ $@.tmptar/rootfs.bin
|
||||
# Hash the rootfs.bin
|
||||
cat $@.tmptar/rootfs.bin | md5sum > $@.tmptar/rootfs.md5
|
||||
cd $@.tmptar && tar -c -f $@.new *
|
||||
rm -rf $@.tmptar
|
||||
mv $@.new $@
|
||||
endef
|
||||
|
||||
DTS_DIR := $(DTS_DIR)/broadcom
|
||||
|
||||
DEVICE_VARS += ASUS_PRODUCTID
|
||||
DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR
|
||||
DEVICE_VARS += SIGNATURE
|
||||
DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_REGION TPLINK_BOARD
|
||||
DEVICE_VARS += LUXUL_BOARD
|
||||
|
||||
IEEE8021X := wpad-basic-mbedtls
|
||||
B43 := $(IEEE8021X) kmod-b43
|
||||
BRCMFMAC_43602A1 := $(IEEE8021X) kmod-brcmfmac brcmfmac-firmware-43602a1-pcie
|
||||
BRCMFMAC_4366B1 := $(IEEE8021X) kmod-brcmfmac brcmfmac-firmware-4366b1-pcie
|
||||
BRCMFMAC_4366C0 := $(IEEE8021X) kmod-brcmfmac brcmfmac-firmware-4366c0-pcie
|
||||
USB2_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-phy-bcm-ns-usb2
|
||||
USB2_PACKAGES += kmod-usb-ledtrig-usbport
|
||||
USB3_PACKAGES := $(USB2_PACKAGES) kmod-usb3 kmod-phy-bcm-ns-usb3
|
||||
|
||||
define Device/Default
|
||||
PROFILES = Generic $$(DEVICE_NAME)
|
||||
# .dtb files are prefixed by SoC type, e.g. bcm4708- which is not included in device/image names
|
||||
# extract the full dtb name based on the device info
|
||||
DEVICE_DTS := $(patsubst %.dtb,%,$(notdir $(wildcard $(if $(IB),$(KDIR),$(DTS_DIR))/*-$(subst _,-,$(1)).dtb)))
|
||||
KERNEL := kernel-bin | append-dtb | lzma-d16
|
||||
KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
|
||||
KERNEL_INITRAMFS_SUFFIX := .trx
|
||||
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma-d16 | trx
|
||||
FILESYSTEMS := squashfs
|
||||
KERNEL_NAME := zImage
|
||||
DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1).$$(2)
|
||||
IMAGES := trx
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
IMAGE/trx := append-ubi | trx-nand
|
||||
endef
|
||||
|
||||
define Device/asus
|
||||
DEVICE_VENDOR := ASUS
|
||||
IMAGES := trx
|
||||
IMAGE/trx := append-ubi | trx-nand | asus-trx
|
||||
endef
|
||||
|
||||
define Device/asus_rt-ac3100
|
||||
$(call Device/asus)
|
||||
DEVICE_MODEL := RT-AC3100
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(BRCMFMAC_4366C0) $(USB3_PACKAGES)
|
||||
ASUS_PRODUCTID := RT-AC3100
|
||||
endef
|
||||
TARGET_DEVICES += asus_rt-ac3100
|
||||
|
||||
define Device/asus_rt-ac56u
|
||||
$(call Device/asus)
|
||||
DEVICE_MODEL := RT-AC56U
|
||||
DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES)
|
||||
ASUS_PRODUCTID := RT-AC56U
|
||||
endef
|
||||
TARGET_DEVICES += asus_rt-ac56u
|
||||
|
||||
define Device/asus_rt-ac68u
|
||||
$(call Device/asus)
|
||||
DEVICE_MODEL := RT-AC68U
|
||||
DEVICE_PACKAGES := $(USB3_PACKAGES)
|
||||
ASUS_PRODUCTID := RT-AC68U
|
||||
endef
|
||||
TARGET_DEVICES += asus_rt-ac68u
|
||||
|
||||
define Device/asus_rt-ac87u
|
||||
$(call Device/asus)
|
||||
DEVICE_MODEL := RT-AC87U
|
||||
DEVICE_PACKAGES := $(USB3_PACKAGES)
|
||||
ASUS_PRODUCTID := RT-AC87U
|
||||
endef
|
||||
TARGET_DEVICES += asus_rt-ac87u
|
||||
|
||||
define Device/asus_rt-ac88u
|
||||
$(call Device/asus)
|
||||
DEVICE_MODEL := RT-AC88U
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(BRCMFMAC_4366C0) $(USB3_PACKAGES)
|
||||
ASUS_PRODUCTID := RT-AC88U
|
||||
endef
|
||||
TARGET_DEVICES += asus_rt-ac88u
|
||||
|
||||
define Device/asus_rt-n18u
|
||||
$(call Device/asus)
|
||||
DEVICE_MODEL := RT-N18U
|
||||
DEVICE_PACKAGES := $(USB3_PACKAGES)
|
||||
ASUS_PRODUCTID := RT-N18U
|
||||
endef
|
||||
TARGET_DEVICES += asus_rt-n18u
|
||||
|
||||
# Buffalo devices have TFTP recovery mode which can work nicely with initramfs
|
||||
# kernels.
|
||||
# We should have two initramfs images for Buffalo: plain initramfs kernel and
|
||||
# TRX with initramfs kernel. It's not possible right now so let's just build
|
||||
# plain initramfs kernel as it may be more useful.
|
||||
define Device/buffalo/Default
|
||||
DEVICE_VENDOR := Buffalo
|
||||
KERNEL_INITRAMFS_SUFFIX = $$(KERNEL_SUFFIX)
|
||||
KERNEL_INITRAMFS = $$(KERNEL)
|
||||
endef
|
||||
|
||||
define Device/buffalo_wxr-1900dhp
|
||||
$(call Device/buffalo/Default)
|
||||
DEVICE_MODEL := WXR-1900DHP
|
||||
DEVICE_PACKAGES := $(USB3_PACKAGES)
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wxr-1900dhp
|
||||
|
||||
define Device/buffalo_wzr-600dhp2
|
||||
$(call Device/buffalo/Default)
|
||||
DEVICE_MODEL := WZR-600DHP2
|
||||
DEVICE_PACKAGES := $(B43) $(USB2_PACKAGES)
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wzr-600dhp2
|
||||
|
||||
define Device/buffalo_wzr-900dhp
|
||||
$(call Device/buffalo/Default)
|
||||
DEVICE_MODEL := WZR-900DHP
|
||||
DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES)
|
||||
BUFFALO_TAG_PLATFORM := bcm
|
||||
BUFFALO_TAG_VERSION := 9.99
|
||||
BUFFALO_TAG_MINOR := 9.99
|
||||
IMAGES += factory-DHP-EU.bin factory-DHP2-JP.bin
|
||||
IMAGE/factory-DHP-EU.bin := \
|
||||
append-ubi | trx-nand | buffalo-wzr-header WZR-900DHP EU | \
|
||||
buffalo-enc WZR-900DHP $$(BUFFALO_TAG_VERSION) | \
|
||||
buffalo-tag-dhp WZR-900DHP EU mlang20 | buffalo-enc-tag | \
|
||||
buffalo-dhp-image
|
||||
IMAGE/factory-DHP2-JP.bin := \
|
||||
append-ubi | trx-nand | buffalo-wzr-header WZR-900DHP2 JP | \
|
||||
buffalo-enc WZR-900DHP2 $$(BUFFALO_TAG_VERSION) | \
|
||||
buffalo-tag-dhp WZR-900DHP2 JP jp | buffalo-enc-tag | \
|
||||
buffalo-dhp-image
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wzr-900dhp
|
||||
|
||||
define Device/buffalo_wzr-1750dhp
|
||||
$(call Device/buffalo/Default)
|
||||
DEVICE_MODEL := WZR-1750DHP
|
||||
DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES)
|
||||
endef
|
||||
TARGET_DEVICES += buffalo_wzr-1750dhp
|
||||
|
||||
define Device/dlink
|
||||
DEVICE_VENDOR := D-Link
|
||||
IMAGES := bin
|
||||
IMAGE/bin := append-ubi | seama-nand
|
||||
endef
|
||||
|
||||
define Device/dlink_dir-885l
|
||||
DEVICE_MODEL := DIR-885L
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(USB3_PACKAGES)
|
||||
$(Device/dlink)
|
||||
SIGNATURE := wrgac42_dlink.2015_dir885l
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dir-885l
|
||||
|
||||
define Device/dlink_dir-890l
|
||||
DEVICE_VENDOR := D-Link
|
||||
DEVICE_MODEL := DIR-890L
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB2_PACKAGES) $(USB3_PACKAGES)
|
||||
# Layout: U-boot (128kb max) followed by kernel and appended DTB.
|
||||
# This is done because the boot loader will only read the first 2 MB
|
||||
# from the flash and decompress the LZMA it finds there after the
|
||||
# SEAMA header. Since the compressed kernel will not fit in 2 MB,
|
||||
# we put U-Boot there and let U-Boot read and execute the kernel.
|
||||
KERNEL := dlink-uboot-bin | pad-to 128k | append-kernel | append-dtb
|
||||
$(Device/dlink)
|
||||
SIGNATURE := wrgac36_dlink.2013gui_dir890
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dir-890l
|
||||
|
||||
define Device/dlink_dwl-8610ap
|
||||
DEVICE_VENDOR := D-Link
|
||||
DEVICE_MODEL := DWL-8610AP
|
||||
DEVICE_PACKAGES := $(B43)
|
||||
IMAGES := factory.tar
|
||||
IMAGE/factory.tar := append-ubi | trx-nand | dwl8610ap-image
|
||||
endef
|
||||
TARGET_DEVICES += dlink_dwl-8610ap
|
||||
|
||||
define Device/linksys_ea6300-v1
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA6300
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES)
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea6300-v1
|
||||
|
||||
define Device/linksys_ea6500-v2
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA6500
|
||||
DEVICE_VARIANT := v2
|
||||
DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES)
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea6500-v2
|
||||
|
||||
define Device/linksys_ea9200
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA9200
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES)
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea9200
|
||||
|
||||
define Device/linksys_ea9500
|
||||
DEVICE_VENDOR := Linksys
|
||||
DEVICE_MODEL := EA9500
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES)
|
||||
DEVICE_DTS := bcm47094-linksys-panamera
|
||||
endef
|
||||
TARGET_DEVICES += linksys_ea9500
|
||||
|
||||
define Device/luxul
|
||||
DEVICE_VENDOR := Luxul
|
||||
IMAGES := lxl
|
||||
IMAGE/lxl := append-ubi | trx-nand | luxul-lxl
|
||||
endef
|
||||
|
||||
define Device/luxul_abr-4500
|
||||
$(Device/luxul)
|
||||
DEVICE_MODEL := ABR-4500
|
||||
DEVICE_PACKAGES := $(USB3_PACKAGES)
|
||||
LUXUL_BOARD := ABR-4500
|
||||
endef
|
||||
TARGET_DEVICES += luxul_abr-4500
|
||||
|
||||
define Device/luxul_xap-1610
|
||||
$(Device/luxul)
|
||||
DEVICE_MODEL := XAP-1610
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_4366C0)
|
||||
IMAGE/lxl := append-rootfs | trx-serial | luxul-lxl
|
||||
LUXUL_BOARD := XAP-1610
|
||||
endef
|
||||
TARGET_DEVICES += luxul_xap-1610
|
||||
|
||||
define Device/luxul_xbr-4500
|
||||
$(Device/luxul)
|
||||
DEVICE_MODEL := XBR-4500
|
||||
DEVICE_PACKAGES := $(USB3_PACKAGES)
|
||||
LUXUL_BOARD := XBR-4500
|
||||
endef
|
||||
TARGET_DEVICES += luxul_xbr-4500
|
||||
|
||||
define Device/luxul_xwr-3150
|
||||
$(Device/luxul)
|
||||
DEVICE_MODEL := XWR-3150
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES)
|
||||
DEVICE_DTS := bcm47094-luxul-xwr-3150-v1
|
||||
LUXUL_BOARD := XWR-3150
|
||||
endef
|
||||
TARGET_DEVICES += luxul_xwr-3150
|
||||
|
||||
define Device/meraki_mr26
|
||||
DEVICE_VENDOR := Meraki
|
||||
DEVICE_MODEL := MR26
|
||||
DEVICE_PACKAGES := $(B43) kmod-hwmon-ina2xx kmod-leds-uleds nu801
|
||||
DEVICE_DTS := bcm53015-meraki-mr26
|
||||
# resize the initramfs to fit the size of the existing part.safe.
|
||||
KERNEL_LOADADDR := 0x00008000
|
||||
KERNEL_INITRAMFS_SUFFIX := .bin
|
||||
KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | uImage gzip | pad-to 9310208
|
||||
# LZMA is not supported by the uboot
|
||||
KERNEL := kernel-bin | append-dtb | gzip | uImage gzip
|
||||
IMAGES += sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
TARGET_DEVICES += meraki_mr26
|
||||
|
||||
define Device/meraki_mr32
|
||||
DEVICE_VENDOR := Meraki
|
||||
DEVICE_MODEL := MR32
|
||||
DEVICE_PACKAGES := $(B43) kmod-leds-pwm kmod-hwmon-ina2xx kmod-bluetooth
|
||||
DEVICE_DTS := bcm53016-meraki-mr32
|
||||
# Meraki FW r23 tries to resize the part.safe partition before it will
|
||||
# flash the image. This is a bit of a problem, since resizing will fail
|
||||
# if the partition is smaller than the old one.
|
||||
KERNEL_LOADADDR := 0x00008000
|
||||
KERNEL_INITRAMFS_SUFFIX := .bin
|
||||
DEVICE_DTS_DELIMITER := @
|
||||
DEVICE_DTS_CONFIG := config@1
|
||||
KERNEL_INITRAMFS := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb | \
|
||||
pad-to 10362880
|
||||
KERNEL := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
||||
IMAGES += sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
|
||||
# The loader is specifically looking for fdt@2:
|
||||
# [ 3.190000] find_itb_subimage: error finding fdt@2: FDT_ERR_NOTFOUND
|
||||
# The image won't boot, if it isn't found. :(
|
||||
DEVICE_FDT_NUM := 2
|
||||
endef
|
||||
TARGET_DEVICES += meraki_mr32
|
||||
|
||||
define Device/meraki_mx6x
|
||||
KERNEL_IN_UBI := 1
|
||||
KERNEL_LOADADDR := 0x60008000
|
||||
DEVICE_PACKAGES := -oseama kmod-leds-pwm kmod-usb-ehci \
|
||||
kmod-usb-ohci kmod-usb2
|
||||
DEVICE_VENDOR := Cisco Meraki
|
||||
KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
||||
KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
||||
KERNEL_INITRAMFS_SUFFIX := .bin
|
||||
IMAGES := sysupgrade.bin
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
endef
|
||||
|
||||
define Device/meraki_mx64
|
||||
$(call Device/meraki_mx6x)
|
||||
DEVICE_MODEL := MX64
|
||||
DEVICE_DTS_CONFIG := config@4
|
||||
DEVICE_DTS := bcm958625-meraki-mx64
|
||||
endef
|
||||
TARGET_DEVICES += meraki_mx64
|
||||
|
||||
define Device/meraki_mx64_a0
|
||||
$(call Device/meraki_mx64)
|
||||
DEVICE_VARIANT := A0
|
||||
DEVICE_DTS_CONFIG := config@2
|
||||
DEVICE_DTS := bcm958625-meraki-mx64-a0
|
||||
endef
|
||||
TARGET_DEVICES += meraki_mx64_a0
|
||||
|
||||
define Device/meraki_mx65
|
||||
$(call Device/meraki_mx6x)
|
||||
DEVICE_MODEL := MX65
|
||||
DEVICE_DTS_CONFIG := config@3
|
||||
DEVICE_DTS := bcm958625-meraki-mx65
|
||||
endef
|
||||
TARGET_DEVICES += meraki_mx65
|
||||
|
||||
define Device/netgear
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
IMAGES := chk
|
||||
IMAGE/chk := append-ubi | trx-nand | netgear-chk
|
||||
NETGEAR_REGION := 1
|
||||
endef
|
||||
|
||||
define Device/netgear_r6250
|
||||
DEVICE_MODEL := R6250
|
||||
DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES)
|
||||
$(Device/netgear)
|
||||
NETGEAR_BOARD_ID := U12H245T00_NETGEAR
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r6250
|
||||
|
||||
define Device/netgear_r6300-v2
|
||||
DEVICE_MODEL := R6300
|
||||
DEVICE_VARIANT := v2
|
||||
DEVICE_PACKAGES := $(B43) $(USB3_PACKAGES)
|
||||
$(Device/netgear)
|
||||
NETGEAR_BOARD_ID := U12H240T00_NETGEAR
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r6300-v2
|
||||
|
||||
define Device/netgear_r7000
|
||||
DEVICE_MODEL := R7000
|
||||
DEVICE_PACKAGES := $(USB3_PACKAGES)
|
||||
$(Device/netgear)
|
||||
NETGEAR_BOARD_ID := U12H270T00_NETGEAR
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r7000
|
||||
|
||||
define Device/netgear_r7900
|
||||
DEVICE_MODEL := R7900
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES)
|
||||
$(Device/netgear)
|
||||
NETGEAR_BOARD_ID := U12H315T30_NETGEAR
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r7900
|
||||
|
||||
define Device/netgear_r8000
|
||||
DEVICE_MODEL := R8000
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES)
|
||||
$(Device/netgear)
|
||||
NETGEAR_BOARD_ID := U12H315T00_NETGEAR
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r8000
|
||||
|
||||
define Device/netgear_r8500
|
||||
DEVICE_MODEL := R8500
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_4366B1) $(USB3_PACKAGES)
|
||||
$(Device/netgear)
|
||||
NETGEAR_BOARD_ID := U12H334T00_NETGEAR
|
||||
DEFAULT := n
|
||||
endef
|
||||
TARGET_DEVICES += netgear_r8500
|
||||
|
||||
define Device/smartrg_sr400ac
|
||||
DEVICE_VENDOR := SmartRG
|
||||
DEVICE_MODEL := SR400ac
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_43602A1) $(USB3_PACKAGES)
|
||||
IMAGES := trx
|
||||
IMAGE/trx := append-rootfs | trx-serial
|
||||
KERNEL_INITRAMFS_SUFFIX := .bin
|
||||
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma-d16
|
||||
endef
|
||||
TARGET_DEVICES += smartrg_sr400ac
|
||||
|
||||
define Device/phicomm_k3
|
||||
DEVICE_VENDOR := PHICOMM
|
||||
DEVICE_MODEL := K3
|
||||
DEVICE_ALT0_VENDOR := Wavlink
|
||||
DEVICE_ALT0_MODEL := QUANTUM DAX
|
||||
DEVICE_ALT1_VENDOR := Wavlink
|
||||
DEVICE_ALT1_MODEL := WL-WN538A8
|
||||
DEVICE_PACKAGES := $(BRCMFMAC_4366C0) $(USB3_PACKAGES)
|
||||
IMAGES := trx
|
||||
endef
|
||||
TARGET_DEVICES += phicomm_k3
|
||||
|
||||
define Device/tenda_ac9
|
||||
DEVICE_VENDOR := Tenda
|
||||
DEVICE_MODEL := AC9
|
||||
DEVICE_PACKAGES := $(B43) $(USB2_PACKAGES)
|
||||
IMAGES := trx
|
||||
IMAGE/trx := append-rootfs | trx-serial
|
||||
endef
|
||||
TARGET_DEVICES += tenda_ac9
|
||||
|
||||
define Device/tplink_archer-c5-v2
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_MODEL := Archer C5
|
||||
DEVICE_VARIANT := v2
|
||||
DEVICE_PACKAGES := $(B43) $(USB2_PACKAGES)
|
||||
IMAGES := bin
|
||||
IMAGE/bin := append-rootfs | bcm53xx-tplink-safeloader
|
||||
TPLINK_BOARD := ARCHER-C5-V2
|
||||
BROKEN := y
|
||||
endef
|
||||
#TARGET_DEVICES += tplink_archer-c5-v2
|
||||
|
||||
define Device/tplink_archer-c9-v1
|
||||
DEVICE_VENDOR := TP-Link
|
||||
DEVICE_MODEL := Archer C9
|
||||
DEVICE_VARIANT := v1
|
||||
DEVICE_PACKAGES := $(USB3_PACKAGES)
|
||||
IMAGES := bin
|
||||
IMAGE/bin := append-rootfs | bcm53xx-tplink-safeloader
|
||||
TPLINK_BOARD := ARCHERC9
|
||||
BROKEN := y
|
||||
endef
|
||||
#TARGET_DEVICES += tplink_archer-c9-v1
|
||||
|
||||
$(eval $(call BuildImage))
|
||||
52
target/linux/bcm53xx/modules.mk
Normal file
52
target/linux/bcm53xx/modules.mk
Normal file
@@ -0,0 +1,52 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2016 Rafał Miłecki <rafal@milecki.pl>
|
||||
|
||||
define KernelPackage/phy-bcm-ns-usb2
|
||||
TITLE:=Broadcom Northstar USB 2.0 PHY Driver
|
||||
KCONFIG:=CONFIG_PHY_BCM_NS_USB2
|
||||
DEPENDS:=@TARGET_bcm53xx
|
||||
SUBMENU:=$(USB_MENU)
|
||||
FILES:=$(LINUX_DIR)/drivers/phy/broadcom/phy-bcm-ns-usb2.ko
|
||||
AUTOLOAD:=$(call AutoLoad,45,phy-bcm-ns-usb2,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/phy-bcm-ns-usb2/description
|
||||
Support for Broadcom USB 2.0 PHY connected to the USB controller on Northstar
|
||||
family.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,phy-bcm-ns-usb2))
|
||||
|
||||
define KernelPackage/phy-bcm-ns-usb3
|
||||
TITLE:=Broadcom Northstar USB 3.0 PHY Driver
|
||||
KCONFIG:=CONFIG_PHY_BCM_NS_USB3
|
||||
DEPENDS:=@TARGET_bcm53xx
|
||||
SUBMENU:=$(USB_MENU)
|
||||
FILES:=$(LINUX_DIR)/drivers/phy/broadcom/phy-bcm-ns-usb3.ko
|
||||
AUTOLOAD:=$(call AutoLoad,45,phy-bcm-ns-usb3,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/phy-bcm-ns-usb3/description
|
||||
Support for Broadcom USB 3.0 PHY connected to the USB controller on Northstar
|
||||
family.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,phy-bcm-ns-usb3))
|
||||
|
||||
define KernelPackage/i2c-bcm-iproc
|
||||
TITLE:=Broadcom iProc I2C controller
|
||||
KCONFIG:= \
|
||||
CONFIG_I2C_BCM_IPROC \
|
||||
CONFIG_I2C_SLAVE_TESTUNIT=n
|
||||
DEPENDS:=@TARGET_bcm53xx +kmod-i2c-core
|
||||
SUBMENU:=$(I2C_MENU)
|
||||
FILES:=$(LINUX_DIR)/drivers/i2c/busses/i2c-bcm-iproc.ko
|
||||
AUTOLOAD:=$(call AutoLoad,59,i2c-bcm-iproc,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/i2c-bcm-iproc/description
|
||||
Kernel module for the Broadcom iProc I2C controller.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,i2c-bcm-iproc))
|
||||
@@ -0,0 +1,56 @@
|
||||
From 5cbee5828219c4f7b33e96b5d8ce5e467b2857c8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 1 Sep 2023 12:55:49 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Set MACs for D-Link DIR-885L
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Specify NVRAM access and use its "et2macaddr" NVMEM cell.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Link: https://lore.kernel.org/r/20230901105549.7076-1-zajec5@gmail.com
|
||||
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
---
|
||||
.../dts/broadcom/bcm47094-dlink-dir-885l.dts | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-885l.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-885l.dts
|
||||
@@ -25,6 +25,15 @@
|
||||
<0x88000000 0x08000000>;
|
||||
};
|
||||
|
||||
+ nvram@1e3f0000 {
|
||||
+ compatible = "brcm,nvram";
|
||||
+ reg = <0x1e3f0000 0x10000>;
|
||||
+
|
||||
+ et2macaddr: et2macaddr {
|
||||
+ #nvmem-cell-cells = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
nand_controller: nand-controller@18028000 {
|
||||
nand@0 {
|
||||
partitions {
|
||||
@@ -112,6 +121,11 @@
|
||||
vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
+&gmac0 {
|
||||
+ nvmem-cells = <&et2macaddr 0>;
|
||||
+ nvmem-cell-names = "mac-address";
|
||||
+};
|
||||
+
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -142,6 +156,8 @@
|
||||
|
||||
port@4 {
|
||||
label = "wan";
|
||||
+ nvmem-cells = <&et2macaddr 3>;
|
||||
+ nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
port@5 {
|
||||
@@ -0,0 +1,44 @@
|
||||
From a9e79863b62aaaefcdf469fc331bf482ae00db0d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 1 Sep 2023 14:43:11 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Set MAC address for Asus RT-AC87U
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Specify NVRAM access and use its "et1macaddr" NVMEM cell.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Link: https://lore.kernel.org/r/20230901124311.31156-1-zajec5@gmail.com
|
||||
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
---
|
||||
arch/arm/boot/dts/broadcom/bcm4709-asus-rt-ac87u.dts | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4709-asus-rt-ac87u.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4709-asus-rt-ac87u.dts
|
||||
@@ -25,6 +25,12 @@
|
||||
<0x88000000 0x08000000>;
|
||||
};
|
||||
|
||||
+ nvram@1c080000 {
|
||||
+ et1macaddr: et1macaddr {
|
||||
+ #nvmem-cell-cells = <1>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
@@ -62,6 +68,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&gmac0 {
|
||||
+ nvmem-cells = <&et1macaddr 0>;
|
||||
+ nvmem-cell-names = "mac-address";
|
||||
+};
|
||||
+
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
@@ -0,0 +1,57 @@
|
||||
From 81ea360a16978a4df61df9db56b171909bd659c0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sat, 16 Sep 2023 10:30:57 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Relicense Felix's code to the GPL 2.0+ /
|
||||
MIT
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Move code added by Felix to the bcm-ns.dtsi which uses dual licensing.
|
||||
That syncs more Northstar code to be based on the same licensing schema.
|
||||
|
||||
This code was added in the commit 1ff80363524c ("ARM: BCM5301X: Add
|
||||
profiling support").
|
||||
|
||||
Cc: Felix Fietkau <nbd@nbd.name>
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Acked-by: Felix Fietkau <nbd@nbd.name>
|
||||
Link: https://lore.kernel.org/r/20230916083057.10458-1-zajec5@gmail.com
|
||||
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
---
|
||||
arch/arm/boot/dts/broadcom/bcm-ns.dtsi | 7 +++++++
|
||||
arch/arm/boot/dts/broadcom/bcm5301x.dtsi | 7 -------
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
|
||||
@@ -14,6 +14,13 @@
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
+ pmu {
|
||||
+ compatible = "arm,cortex-a9-pmu";
|
||||
+ interrupts =
|
||||
+ <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
|
||||
+ <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
|
||||
+ };
|
||||
+
|
||||
chipcommon-a-bus@18000000 {
|
||||
compatible = "simple-bus";
|
||||
ranges = <0x00000000 0x18000000 0x00001000>;
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm5301x.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm5301x.dtsi
|
||||
@@ -26,13 +26,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
- pmu {
|
||||
- compatible = "arm,cortex-a9-pmu";
|
||||
- interrupts =
|
||||
- <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
|
||||
- <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
|
||||
- };
|
||||
-
|
||||
clocks {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
@@ -0,0 +1,104 @@
|
||||
From b8d4f7c1be04d66c37c119c501c87bccc4197694 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sat, 16 Sep 2023 10:58:55 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Relicense Vivek's code to the GPL 2.0+ /
|
||||
MIT
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Move code added by Vivek to the bcm-ns.dtsi which uses dual licensing.
|
||||
That syncs more Northstar code to be based on the same licensing schema.
|
||||
|
||||
This code was added in the commit 37f6130ec39f ("ARM: dts: BCM5301X:
|
||||
Make USB 3.0 PHY use MDIO PHY driver").
|
||||
|
||||
Cc: Vivek Unune <npcomplete13@gmail.com>
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Acked-by: Vivek Unune <npcomplete13@gmail.com>
|
||||
Link: https://lore.kernel.org/r/20230916085855.28375-1-zajec5@gmail.com
|
||||
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
---
|
||||
arch/arm/boot/dts/broadcom/bcm-ns.dtsi | 27 ++++++++++++++++++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm5301x.dtsi | 27 ------------------------
|
||||
2 files changed, 27 insertions(+), 27 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm-ns.dtsi
|
||||
@@ -327,6 +327,29 @@
|
||||
#address-cells = <1>;
|
||||
};
|
||||
|
||||
+ mdio-mux@18003000 {
|
||||
+ compatible = "mdio-mux-mmioreg", "mdio-mux";
|
||||
+ mdio-parent-bus = <&mdio>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+ reg = <0x18003000 0x4>;
|
||||
+ mux-mask = <0x200>;
|
||||
+
|
||||
+ mdio@0 {
|
||||
+ reg = <0x0>;
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ usb3_phy: usb3-phy@10 {
|
||||
+ compatible = "brcm,ns-ax-usb3-phy";
|
||||
+ reg = <0x10>;
|
||||
+ usb3-dmp-syscon = <&usb3_dmp>;
|
||||
+ #phy-cells = <0>;
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
rng: rng@18004000 {
|
||||
compatible = "brcm,bcm5301x-rng";
|
||||
reg = <0x18004000 0x14>;
|
||||
@@ -467,6 +490,10 @@
|
||||
brcm,nand-has-wp;
|
||||
};
|
||||
|
||||
+ usb3_dmp: syscon@18105000 {
|
||||
+ reg = <0x18105000 0x1000>;
|
||||
+ };
|
||||
+
|
||||
thermal-zones {
|
||||
cpu_thermal: cpu-thermal {
|
||||
polling-delay-passive = <0>;
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm5301x.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm5301x.dtsi
|
||||
@@ -62,33 +62,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
- mdio-mux@18003000 {
|
||||
- compatible = "mdio-mux-mmioreg", "mdio-mux";
|
||||
- mdio-parent-bus = <&mdio>;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
- reg = <0x18003000 0x4>;
|
||||
- mux-mask = <0x200>;
|
||||
-
|
||||
- mdio@0 {
|
||||
- reg = <0x0>;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <0>;
|
||||
-
|
||||
- usb3_phy: usb3-phy@10 {
|
||||
- compatible = "brcm,ns-ax-usb3-phy";
|
||||
- reg = <0x10>;
|
||||
- usb3-dmp-syscon = <&usb3_dmp>;
|
||||
- #phy-cells = <0>;
|
||||
- status = "disabled";
|
||||
- };
|
||||
- };
|
||||
- };
|
||||
-
|
||||
- usb3_dmp: syscon@18105000 {
|
||||
- reg = <0x18105000 0x1000>;
|
||||
- };
|
||||
-
|
||||
i2c0: i2c@18009000 {
|
||||
compatible = "brcm,iproc-i2c";
|
||||
reg = <0x18009000 0x50>;
|
||||
@@ -0,0 +1,377 @@
|
||||
From 473baeab929444295b0530f8766e4becb6a08973 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 13 Oct 2023 12:33:13 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Explicitly disable unused switch CPU
|
||||
ports
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When redescribing ports I assumed that missing "label" (like "cpu")
|
||||
means switch port isn't used. That was incorrect and I realized my
|
||||
change made Linux always use the first (5) CPU port (there are 3 of
|
||||
them).
|
||||
|
||||
While above should technically be possible it often isn't correct:
|
||||
1. Non-default switch ports are often connected to Ethernet interfaces
|
||||
not fully covered by vendor setup (they may miss MACs)
|
||||
2. On some devices non-default ports require specifying fixed link
|
||||
|
||||
This fixes network connectivity for some devices. It was reported &
|
||||
tested for Netgear R8000. It also affects Linksys EA9200 with its
|
||||
downstream DTS.
|
||||
|
||||
Fixes: ba4aebce23b2 ("ARM: dts: BCM5301X: Describe switch ports in the main DTS")
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Link: https://lore.kernel.org/r/20231013103314.10306-1-zajec5@gmail.com
|
||||
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
---
|
||||
.../dts/broadcom/bcm4708-buffalo-wzr-1166dhp-common.dtsi | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm4708-luxul-xap-1510.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm4708-luxul-xwc-1000.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm4708-netgear-r6250.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm4708-smartrg-sr400ac.dts | 8 ++++++++
|
||||
.../boot/dts/broadcom/bcm47081-buffalo-wzr-600dhp2.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm47081-luxul-xap-1410.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm47081-luxul-xwr-1200.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm4709-netgear-r8000.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-885l.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-890l.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm47094-luxul-abr-4500.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm47094-luxul-xap-1610.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm47094-luxul-xbr-4500.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm47094-luxul-xwc-2000.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm47094-luxul-xwr-3100.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm47094-luxul-xwr-3150-v1.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm53015-meraki-mr26.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm53016-meraki-mr32.dts | 8 ++++++++
|
||||
arch/arm/boot/dts/broadcom/bcm953012er.dts | 8 ++++++++
|
||||
20 files changed, 160 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wzr-1166dhp-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wzr-1166dhp-common.dtsi
|
||||
@@ -189,5 +189,13 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4708-luxul-xap-1510.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4708-luxul-xap-1510.dts
|
||||
@@ -93,5 +93,13 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4708-luxul-xwc-1000.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4708-luxul-xwc-1000.dts
|
||||
@@ -96,5 +96,13 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4708-netgear-r6250.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4708-netgear-r6250.dts
|
||||
@@ -130,5 +130,13 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4708-smartrg-sr400ac.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4708-smartrg-sr400ac.dts
|
||||
@@ -153,6 +153,14 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47081-buffalo-wzr-600dhp2.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47081-buffalo-wzr-600dhp2.dts
|
||||
@@ -153,5 +153,13 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47081-luxul-xap-1410.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47081-luxul-xap-1410.dts
|
||||
@@ -89,5 +89,13 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47081-luxul-xwr-1200.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47081-luxul-xwr-1200.dts
|
||||
@@ -156,5 +156,13 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4709-netgear-r8000.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4709-netgear-r8000.dts
|
||||
@@ -235,6 +235,14 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ port@5 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
port@8 {
|
||||
label = "cpu";
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-885l.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-885l.dts
|
||||
@@ -168,6 +168,14 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ port@5 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
port@8 {
|
||||
label = "cpu";
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-890l.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-890l.dts
|
||||
@@ -200,6 +200,14 @@
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
+ port@5 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
port@8 {
|
||||
label = "cpu";
|
||||
phy-mode = "rgmii";
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47094-luxul-abr-4500.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47094-luxul-abr-4500.dts
|
||||
@@ -115,5 +115,13 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47094-luxul-xap-1610.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47094-luxul-xap-1610.dts
|
||||
@@ -128,5 +128,13 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47094-luxul-xbr-4500.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47094-luxul-xbr-4500.dts
|
||||
@@ -115,5 +115,13 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47094-luxul-xwc-2000.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47094-luxul-xwc-2000.dts
|
||||
@@ -83,5 +83,13 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47094-luxul-xwr-3100.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47094-luxul-xwr-3100.dts
|
||||
@@ -155,5 +155,13 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47094-luxul-xwr-3150-v1.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47094-luxul-xwr-3150-v1.dts
|
||||
@@ -166,5 +166,13 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm53015-meraki-mr26.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm53015-meraki-mr26.dts
|
||||
@@ -132,6 +132,14 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm53016-meraki-mr32.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm53016-meraki-mr32.dts
|
||||
@@ -193,6 +193,14 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm953012er.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm953012er.dts
|
||||
@@ -92,6 +92,14 @@
|
||||
port@8 {
|
||||
status = "disabled";
|
||||
};
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From d313b0e9070a7100ca55e64fe3b081d176d8806d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 13 Oct 2023 12:33:14 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Set fixed-link for extra Netgear R8000
|
||||
CPU ports
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Ports 5 and 7 are disabled by default because the standard use case is
|
||||
for port 8 to manage all CPU directed traffic. For experimentation
|
||||
purposes however it is desirable to provide adequate properties such
|
||||
that people can experiment with using different ports without having to
|
||||
figure out their configuration. Some of the use cases include but are
|
||||
not limited to doubling or tripling the bandwidth by leveraging the
|
||||
additional ports/Ethernet MAC combinations.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Link: https://lore.kernel.org/r/20231013103314.10306-2-zajec5@gmail.com
|
||||
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
---
|
||||
arch/arm/boot/dts/broadcom/bcm4709-netgear-r8000.dts | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4709-netgear-r8000.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4709-netgear-r8000.dts
|
||||
@@ -237,10 +237,20 @@
|
||||
|
||||
port@5 {
|
||||
status = "disabled";
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
};
|
||||
|
||||
port@7 {
|
||||
status = "disabled";
|
||||
+
|
||||
+ fixed-link {
|
||||
+ speed = <1000>;
|
||||
+ full-duplex;
|
||||
+ };
|
||||
};
|
||||
|
||||
port@8 {
|
||||
@@ -0,0 +1,63 @@
|
||||
From 253358f373492608348136e569366d73cb969f6a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 24 Oct 2023 09:26:05 +0200
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Set switch ports for Linksys EA9200
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This patch was developed as OpenWrt downstream change and was recently
|
||||
confirmed to work as expected.
|
||||
|
||||
Tested-by: Rani Hod <rani.hod@gmail.com>
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Link: https://lore.kernel.org/r/20231024072605.32517-1-zajec5@gmail.com
|
||||
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
---
|
||||
.../dts/broadcom/bcm4709-linksys-ea9200.dts | 38 +++++++++++++++++++
|
||||
1 file changed, 38 insertions(+)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4709-linksys-ea9200.dts
|
||||
@@ -47,3 +47,41 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
@@ -0,0 +1,64 @@
|
||||
From ed0d78c75ca93c9f1d7f0d08ac5abe0de71fe312 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Thu, 16 May 2024 10:47:37 +0200
|
||||
Subject: [PATCH] ARM: dts: broadcom: convert NVMEM content to layout syntax
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Use cleaner (and non-deprecated) bindings syntax. See commit
|
||||
bd912c991d2e ("dt-bindings: nvmem: layouts: add fixed-layout") for
|
||||
details.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
Link: https://lore.kernel.org/r/20240516084737.2789-1-zajec5@gmail.com
|
||||
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
||||
---
|
||||
arch/arm/boot/dts/broadcom/bcm53016-meraki-mr32.dts | 12 ++++++++----
|
||||
.../dts/broadcom/bcm958625-meraki-mx6x-common.dtsi | 12 ++++++++----
|
||||
2 files changed, 16 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm53016-meraki-mr32.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm53016-meraki-mr32.dts
|
||||
@@ -223,11 +223,15 @@
|
||||
reg = <0x50>;
|
||||
pagesize = <32>;
|
||||
read-only;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <1>;
|
||||
|
||||
- mac_address: mac-address@66 {
|
||||
- reg = <0x66 0x6>;
|
||||
+ nvmem-layout {
|
||||
+ compatible = "fixed-layout";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ mac_address: mac-address@66 {
|
||||
+ reg = <0x66 0x6>;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm958625-meraki-mx6x-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm958625-meraki-mx6x-common.dtsi
|
||||
@@ -55,11 +55,15 @@
|
||||
reg = <0x50>;
|
||||
pagesize = <32>;
|
||||
read-only;
|
||||
- #address-cells = <1>;
|
||||
- #size-cells = <1>;
|
||||
|
||||
- mac_address: mac-address@66 {
|
||||
- reg = <0x66 0x6>;
|
||||
+ nvmem-layout {
|
||||
+ compatible = "fixed-layout";
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ mac_address: mac-address@66 {
|
||||
+ reg = <0x66 0x6>;
|
||||
+ };
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Tue, 13 Apr 2021 18:25:20 +0200
|
||||
Subject: [PATCH] mtd: parsers: trx: parse "firmware" MTD partitions only
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Parsing every partition with "compatible" set to "brcm,trx" results in
|
||||
parsing both: firmware partition and failsafe partition on devices that
|
||||
implement failsafe booting. This affects e.g. Linksys EA9500 which has:
|
||||
|
||||
partition@200000 {
|
||||
reg = <0x0200000 0x01d00000>;
|
||||
compatible = "linksys,ns-firmware", "brcm,trx";
|
||||
};
|
||||
|
||||
partition@1f00000 {
|
||||
reg = <0x01f00000 0x01d00000>;
|
||||
compatible = "linksys,ns-firmware", "brcm,trx";
|
||||
};
|
||||
|
||||
Check for MTD partition name "firmware" before parsing. Recently added
|
||||
ofpart_linksys_ns.c creates "firmware" and "failsafe" depending on
|
||||
bootloader setup.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
drivers/mtd/parsers/parser_trx.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/drivers/mtd/parsers/parser_trx.c
|
||||
+++ b/drivers/mtd/parsers/parser_trx.c
|
||||
@@ -92,6 +92,10 @@ static int parser_trx_parse(struct mtd_i
|
||||
if (err != 0 && err != -EINVAL)
|
||||
pr_err("failed to parse \"brcm,trx-magic\" DT attribute, using default: %d\n", err);
|
||||
|
||||
+ /* Don't parse any failsafe / backup partitions */
|
||||
+ if (strcmp(mtd->name, "firmware"))
|
||||
+ return -EINVAL;
|
||||
+
|
||||
parts = kcalloc(TRX_PARSER_MAX_PARTS, sizeof(struct mtd_partition),
|
||||
GFP_KERNEL);
|
||||
if (!parts)
|
||||
@@ -0,0 +1,113 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Sat, 1 Oct 2016 22:54:48 +0200
|
||||
Subject: [PATCH] usb: xhci: add support for performing fake doorbell
|
||||
|
||||
Broadcom's Northstar XHCI controllers seem to need a special start
|
||||
procedure to work correctly. There isn't any official documentation of
|
||||
this, the problem is that controller doesn't detect any connected
|
||||
devices with default setup. Moreover connecting USB device to controller
|
||||
that doesn't run properly can cause SoC's watchdog issues.
|
||||
|
||||
A workaround that was successfully tested on multiple devices is to
|
||||
perform a fake doorbell. This patch adds code for doing this and enables
|
||||
it on BCM4708 family.
|
||||
---
|
||||
drivers/usb/host/xhci-plat.c | 6 +++++
|
||||
drivers/usb/host/xhci.c | 63 +++++++++++++++++++++++++++++++++++++++++---
|
||||
drivers/usb/host/xhci.h | 1 +
|
||||
3 files changed, 67 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/drivers/usb/host/xhci-plat.c
|
||||
+++ b/drivers/usb/host/xhci-plat.c
|
||||
@@ -77,8 +77,13 @@ static int xhci_priv_resume_quirk(struct
|
||||
static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
{
|
||||
struct xhci_plat_priv *priv = xhci_to_priv(xhci);
|
||||
+ struct platform_device*pdev = to_platform_device(dev);
|
||||
+ struct device_node *node = pdev->dev.of_node;
|
||||
|
||||
xhci->quirks |= priv->quirks;
|
||||
+
|
||||
+ if (node && of_machine_is_compatible("brcm,bcm4708"))
|
||||
+ xhci->quirks |= XHCI_FAKE_DOORBELL;
|
||||
}
|
||||
|
||||
/* called during probe() after chip reset completes */
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -161,6 +161,49 @@ int xhci_start(struct xhci_hcd *xhci)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * xhci_fake_doorbell - Perform a fake doorbell on a specified slot
|
||||
+ *
|
||||
+ * Some controllers require a fake doorbell to start correctly. Without that
|
||||
+ * they simply don't detect any devices.
|
||||
+ */
|
||||
+static int xhci_fake_doorbell(struct xhci_hcd *xhci, int slot_id)
|
||||
+{
|
||||
+ u32 temp;
|
||||
+
|
||||
+ /* Alloc a virt device for that slot */
|
||||
+ if (!xhci_alloc_virt_device(xhci, slot_id, NULL, GFP_NOIO)) {
|
||||
+ xhci_warn(xhci, "Could not allocate xHCI USB device data structures\n");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ /* Ring fake doorbell for slot_id ep 0 */
|
||||
+ xhci_ring_ep_doorbell(xhci, slot_id, 0, 0);
|
||||
+ usleep_range(1000, 1500);
|
||||
+
|
||||
+ /* Read the status to check if HSE is set or not */
|
||||
+ temp = readl(&xhci->op_regs->status);
|
||||
+
|
||||
+ /* Clear HSE if set */
|
||||
+ if (temp & STS_FATAL) {
|
||||
+ xhci_dbg(xhci, "HSE problem detected, status: 0x%08x\n", temp);
|
||||
+ temp &= ~0x1fff;
|
||||
+ temp |= STS_FATAL;
|
||||
+ writel(temp, &xhci->op_regs->status);
|
||||
+ usleep_range(1000, 1500);
|
||||
+ readl(&xhci->op_regs->status);
|
||||
+ }
|
||||
+
|
||||
+ /* Free virt device */
|
||||
+ xhci_free_virt_device(xhci, slot_id);
|
||||
+
|
||||
+ /* We're done if controller is already running */
|
||||
+ if (readl(&xhci->op_regs->command) & CMD_RUN)
|
||||
+ return 0;
|
||||
+
|
||||
+ return xhci_start(xhci);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Reset a halted HC.
|
||||
*
|
||||
@@ -480,6 +523,15 @@ static int xhci_run_finished(struct xhci
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
+ if (xhci->quirks & XHCI_FAKE_DOORBELL) {
|
||||
+ int err = xhci_fake_doorbell(xhci, 1);
|
||||
+ if (err) {
|
||||
+ xhci_halt(xhci);
|
||||
+ spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
+ return err;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
xhci->cmd_ring_state = CMD_RING_STATE_RUNNING;
|
||||
|
||||
if (xhci->quirks & XHCI_NEC_HOST)
|
||||
--- a/drivers/usb/host/xhci.h
|
||||
+++ b/drivers/usb/host/xhci.h
|
||||
@@ -1661,6 +1661,7 @@ struct xhci_hcd {
|
||||
#define XHCI_WRITE_64_HI_LO BIT_ULL(47)
|
||||
#define XHCI_CDNS_SCTX_QUIRK BIT_ULL(48)
|
||||
#define XHCI_ETRON_HOST BIT_ULL(49)
|
||||
+#define XHCI_FAKE_DOORBELL BIT_ULL(50)
|
||||
|
||||
unsigned int num_active_eps;
|
||||
unsigned int limit_active_eps;
|
||||
@@ -0,0 +1,111 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Wed, 24 Sep 2014 22:14:07 +0200
|
||||
Subject: [PATCH] ARM: BCM5301X: Disable MMU and Dcache during decompression
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Broadcom devices have broken CFE (bootloader) that leaves hardware in an
|
||||
invalid state. It causes problems with booting Linux. On Northstar
|
||||
devices kernel was randomly hanging in ~25% of tries during early init.
|
||||
Hangs used to happen at random places in the start_kernel. On BCM53573
|
||||
kernel doesn't even seem to start booting.
|
||||
|
||||
To workaround this problem we need to do following very early:
|
||||
1) Clear 2 following bits in the SCTLR register:
|
||||
#define CR_M (1 << 0) /* MMU enable */
|
||||
#define CR_C (1 << 2) /* Dcache enable */
|
||||
2) Flush the whole D-cache
|
||||
3) Disable L2 cache
|
||||
|
||||
Unfortunately this patch is not upstreamable as it does above things
|
||||
unconditionally. We can't check if we are running on Broadcom platform
|
||||
in any safe way and doing such hacks with ARCH_MULTI_V7 is unacceptable
|
||||
as it could break other devices support.
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
|
||||
--- a/arch/arm/boot/compressed/Makefile
|
||||
+++ b/arch/arm/boot/compressed/Makefile
|
||||
@@ -36,6 +36,11 @@ ifeq ($(CONFIG_ARCH_ACORN),y)
|
||||
OBJS += ll_char_wr.o font.o
|
||||
endif
|
||||
|
||||
+ifeq ($(CONFIG_ARCH_BCM_5301X),y)
|
||||
+OBJS += head-bcm_5301x-mpcore.o
|
||||
+OBJS += cache-v7-min.o
|
||||
+endif
|
||||
+
|
||||
ifeq ($(CONFIG_ARCH_SA1100),y)
|
||||
OBJS += head-sa1100.o
|
||||
endif
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/compressed/head-bcm_5301x-mpcore.S
|
||||
@@ -0,0 +1,37 @@
|
||||
+/*
|
||||
+ *
|
||||
+ * Platform specific tweaks. This is merged into head.S by the linker.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/linkage.h>
|
||||
+#include <asm/assembler.h>
|
||||
+#include <asm/cp15.h>
|
||||
+
|
||||
+ .section ".start", "ax"
|
||||
+
|
||||
+/*
|
||||
+ * This code section is spliced into the head code by the linker
|
||||
+ */
|
||||
+
|
||||
+__plat_uncompress_start:
|
||||
+
|
||||
+ @ Preserve r8/r7 i.e. kernel entry values
|
||||
+ mov r12, r8
|
||||
+
|
||||
+ @ Clear MMU enable and Dcache enable bits
|
||||
+ mrc p15, 0, r0, c1, c0, 0 @ Read SCTLR
|
||||
+ bic r0, #CR_C|CR_M
|
||||
+ mcr p15, 0, r0, c1, c0, 0 @ Write SCTLR
|
||||
+ nop
|
||||
+
|
||||
+ @ Call the cache invalidation routine
|
||||
+ bl v7_flush_dcache_all
|
||||
+ nop
|
||||
+ mov r0,#0
|
||||
+ ldr r3, =0x19022000 @ L2 cache controller, control reg
|
||||
+ str r0, [r3, #0x100] @ Disable L2 cache
|
||||
+ nop
|
||||
+
|
||||
+ @ Restore
|
||||
+ mov r8, r12
|
||||
--- a/arch/arm/boot/compressed/cache-v7-min.S
|
||||
+++ b/arch/arm/boot/compressed/cache-v7-min.S
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/init.h>
|
||||
+#include <asm/assembler.h>
|
||||
|
||||
__INIT
|
||||
|
||||
@@ -63,7 +64,7 @@ loop2:
|
||||
ARM( orr r11, r11, r9, lsl r2 ) @ factor index number into r11
|
||||
THUMB( lsl r6, r9, r2 )
|
||||
THUMB( orr r11, r11, r6 ) @ factor index number into r11
|
||||
- mcr p15, 0, r11, c7, c14, 2 @ clean & invalidate by set/way
|
||||
+ mcr p15, 0, r11, c7, c6, 2 @ clean & invalidate by set/way
|
||||
subs r9, r9, #1 @ decrement the index
|
||||
bge loop2
|
||||
subs r4, r4, #1 @ decrement the way
|
||||
--- a/arch/arm/boot/compressed/vmlinux.lds.S
|
||||
+++ b/arch/arm/boot/compressed/vmlinux.lds.S
|
||||
@@ -41,6 +41,7 @@ SECTIONS
|
||||
*(.start)
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
+ *(.init.text)
|
||||
ARM_STUBS_TEXT
|
||||
}
|
||||
.table : ALIGN(4) {
|
||||
@@ -0,0 +1,675 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Subject: [PATCH] ARM: dts: BCM5301X: Specify switch ports for remaining
|
||||
devices
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac56u.dts
|
||||
@@ -92,3 +92,41 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac68u.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4708-asus-rt-ac68u.dts
|
||||
@@ -83,3 +83,41 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wzr-1750dhp.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wzr-1750dhp.dts
|
||||
@@ -149,3 +149,41 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4708-linksys-ea6300-v1.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4708-linksys-ea6300-v1.dts
|
||||
@@ -46,3 +46,41 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4708-linksys-ea6500-v2.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4708-linksys-ea6500-v2.dts
|
||||
@@ -43,3 +43,41 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4708-netgear-r6300-v2.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4708-netgear-r6300-v2.dts
|
||||
@@ -86,3 +86,41 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47081-asus-rt-n18u.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47081-asus-rt-n18u.dts
|
||||
@@ -77,3 +77,41 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4709-asus-rt-ac87u.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4709-asus-rt-ac87u.dts
|
||||
@@ -77,6 +77,40 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&nandcs {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4709-buffalo-wxr-1900dhp.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4709-buffalo-wxr-1900dhp.dts
|
||||
@@ -130,3 +130,41 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4709-netgear-r7000.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4709-netgear-r7000.dts
|
||||
@@ -104,3 +104,41 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47094-netgear-r8500.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47094-netgear-r8500.dts
|
||||
@@ -94,3 +94,41 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47094-phicomm-k3.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47094-phicomm-k3.dts
|
||||
@@ -38,6 +38,40 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&nandcs {
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47081-tplink-archer-c5-v2.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47081-tplink-archer-c5-v2.dts
|
||||
@@ -91,6 +91,44 @@
|
||||
};
|
||||
};
|
||||
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm4709-tplink-archer-c9-v1.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4709-tplink-archer-c9-v1.dts
|
||||
@@ -100,6 +100,44 @@
|
||||
vcc-gpio = <&chipcommon 12 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&spi_nor {
|
||||
status = "okay";
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm47081-buffalo-wzr-900dhp.dts
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm47081-buffalo-wzr-900dhp.dts
|
||||
@@ -107,3 +107,42 @@
|
||||
&usb3_phy {
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+&srab {
|
||||
+ status = "okay";
|
||||
+
|
||||
+ ports {
|
||||
+ port@0 {
|
||||
+ label = "lan1";
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ label = "lan2";
|
||||
+ };
|
||||
+
|
||||
+ port@2 {
|
||||
+ label = "lan3";
|
||||
+ };
|
||||
+
|
||||
+ port@3 {
|
||||
+ label = "lan4";
|
||||
+ };
|
||||
+
|
||||
+ port@4 {
|
||||
+ label = "wan";
|
||||
+ };
|
||||
+
|
||||
+ port@5 {
|
||||
+ label = "cpu";
|
||||
+ };
|
||||
+
|
||||
+ port@7 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+
|
||||
+ port@8 {
|
||||
+ status = "disabled";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
@@ -0,0 +1,64 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Subject: [PATCH] ARM: BCM5301X: Add DT for Netgear R7900
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
---
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/Makefile
|
||||
+++ b/arch/arm/boot/dts/broadcom/Makefile
|
||||
@@ -68,6 +68,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
|
||||
bcm4709-buffalo-wxr-1900dhp.dtb \
|
||||
bcm4709-linksys-ea9200.dtb \
|
||||
bcm4709-netgear-r7000.dtb \
|
||||
+ bcm4709-netgear-r7900.dtb \
|
||||
bcm4709-netgear-r8000.dtb \
|
||||
bcm4709-tplink-archer-c9-v1.dtb \
|
||||
bcm47094-asus-rt-ac3100.dtb \
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm4709-netgear-r7900.dts
|
||||
@@ -0,0 +1,42 @@
|
||||
+/*
|
||||
+ * Broadcom BCM470X / BCM5301X ARM platform code.
|
||||
+ * DTS for Netgear R7900
|
||||
+ *
|
||||
+ * Copyright (C) 2016 Rafał Miłecki <zajec5@gmail.com>
|
||||
+ *
|
||||
+ * Licensed under the GNU/GPL. See COPYING for details.
|
||||
+ */
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "bcm4709.dtsi"
|
||||
+#include "bcm5301x-nand-cs0-bch8.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ compatible = "netgear,r7900", "brcm,bcm4709", "brcm,bcm4708";
|
||||
+ model = "Netgear R7900";
|
||||
+
|
||||
+ chosen {
|
||||
+ bootargs = "console=ttyS0,115200";
|
||||
+ };
|
||||
+
|
||||
+ memory {
|
||||
+ reg = <0x00000000 0x08000000
|
||||
+ 0x88000000 0x08000000>;
|
||||
+ };
|
||||
+
|
||||
+ axi@18000000 {
|
||||
+ usb3@23000 {
|
||||
+ reg = <0x00023000 0x1000>;
|
||||
+
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <1>;
|
||||
+
|
||||
+ vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&uart0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
@@ -0,0 +1,52 @@
|
||||
From 35bba88e75311242841dde83073c211310ec0259 Mon Sep 17 00:00:00 2001
|
||||
From: Matthew Hagan <mnhagan88@gmail.com>
|
||||
Date: Wed, 4 May 2022 08:07:06 +0100
|
||||
Subject: [PATCH] bcm53xx: partition fixups for Meraki MX64/MX65
|
||||
|
||||
We need to enlarge the u-boot partition to add extra features like UBI
|
||||
booting. The shmoo and newly created env partitions can easily be moved
|
||||
to the nvram partition. This fixup allows u-boot to be enlarged to up to
|
||||
1MiB.
|
||||
|
||||
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/broadcom/bcm958625-meraki-mx6x-common.dtsi | 20 ++++++++++++--------
|
||||
1 file changed, 12 insertions(+), 8 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm958625-meraki-mx6x-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm958625-meraki-mx6x-common.dtsi
|
||||
@@ -84,13 +84,7 @@
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
- reg = <0x0 0x80000>;
|
||||
- read-only;
|
||||
- };
|
||||
-
|
||||
- partition@80000 {
|
||||
- label = "shmoo";
|
||||
- reg = <0x80000 0x80000>;
|
||||
+ reg = <0x0 0x100000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
@@ -101,7 +95,18 @@
|
||||
|
||||
partition@400000 {
|
||||
label = "nvram";
|
||||
- reg = <0x400000 0x100000>;
|
||||
+ reg = <0x400000 0x40000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@440000 {
|
||||
+ label = "u-boot-env";
|
||||
+ reg = <0x440000 0x40000>;
|
||||
+ };
|
||||
+
|
||||
+ partition@480000 {
|
||||
+ label = "shmoo";
|
||||
+ reg = <0x480000 0x80000>;
|
||||
+ read-only;
|
||||
};
|
||||
|
||||
partition@500000 {
|
||||
@@ -0,0 +1,83 @@
|
||||
From 9f4e68261b89df87457f46999c471d11754b5de2 Mon Sep 17 00:00:00 2001
|
||||
From: Lech Perczak <lech.perczak@gmail.com>
|
||||
Date: Sun, 6 Oct 2024 15:57:44 +0200
|
||||
Subject: [PATCH] bcm53xx: dts: meraki-mx6x: add OpenWrt-specific LED aliases
|
||||
|
||||
Assign green power LED for "boot", "running", orange for "upgrade" and
|
||||
red for "failsafe" functions - the same as done for MR33 and MR74.
|
||||
|
||||
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
|
||||
---
|
||||
arch/arm/boot/dts/broadcom/bcm958625-meraki-alamo.dtsi | 9 ++++++++-
|
||||
arch/arm/boot/dts/broadcom/bcm958625-meraki-kingpin.dtsi | 8 +++++++-
|
||||
.../boot/dts/broadcom/bcm958625-meraki-mx6x-common.dtsi | 4 ++--
|
||||
3 files changed, 17 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm958625-meraki-alamo.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm958625-meraki-alamo.dtsi
|
||||
@@ -8,6 +8,13 @@
|
||||
#include "bcm958625-meraki-mx6x-common.dtsi"
|
||||
|
||||
/ {
|
||||
+ aliases {
|
||||
+ led-boot = &led_power;
|
||||
+ led-running = &led_power;
|
||||
+ led-upgrade = &led_fault;
|
||||
+ led-failsafe = &led_failsafe;
|
||||
+ };
|
||||
+
|
||||
keys {
|
||||
compatible = "gpio-keys-polled";
|
||||
autorepeat;
|
||||
@@ -55,7 +62,7 @@
|
||||
gpios = <&gpioa 26 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
- led-4 {
|
||||
+ led_fault: led-4 {
|
||||
/* amber:power */
|
||||
function = LED_FUNCTION_FAULT;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm958625-meraki-kingpin.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm958625-meraki-kingpin.dtsi
|
||||
@@ -8,6 +8,12 @@
|
||||
#include "bcm958625-meraki-mx6x-common.dtsi"
|
||||
|
||||
/ {
|
||||
+ aliases {
|
||||
+ led-boot = &led_power;
|
||||
+ led-running = &led_power;
|
||||
+ led-upgrade = &led_fault;
|
||||
+ led-failsafe = &led_failsafe;
|
||||
+ };
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys-polled";
|
||||
@@ -104,7 +110,7 @@
|
||||
gpios = <&gpioa 29 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
- led-a {
|
||||
+ led_fault: led-a {
|
||||
/* amber:power */
|
||||
function = LED_FUNCTION_FAULT;
|
||||
color = <LED_COLOR_ID_AMBER>;
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm958625-meraki-mx6x-common.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm958625-meraki-mx6x-common.dtsi
|
||||
@@ -14,14 +14,14 @@
|
||||
pwm-leds {
|
||||
compatible = "pwm-leds";
|
||||
|
||||
- led-1 {
|
||||
+ led_failsafe: led-1 {
|
||||
function = LED_FUNCTION_INDICATOR;
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
pwms = <&pwm 1 50000>;
|
||||
max-brightness = <255>;
|
||||
};
|
||||
|
||||
- led-2 {
|
||||
+ led_power: led-2 {
|
||||
function = LED_FUNCTION_POWER;
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
pwms = <&pwm 2 50000>;
|
||||
@@ -0,0 +1,59 @@
|
||||
From 2a2af518266a29323cf30c3f9ba9ef2ceb1dd84b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
|
||||
Date: Thu, 16 Oct 2014 20:52:16 +0200
|
||||
Subject: [PATCH] UBI: Detect EOF mark and erase all remaining blocks
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
||||
---
|
||||
drivers/mtd/ubi/attach.c | 5 +++++
|
||||
drivers/mtd/ubi/io.c | 4 ++++
|
||||
drivers/mtd/ubi/ubi.h | 1 +
|
||||
3 files changed, 10 insertions(+)
|
||||
|
||||
--- a/drivers/mtd/ubi/attach.c
|
||||
+++ b/drivers/mtd/ubi/attach.c
|
||||
@@ -82,6 +82,9 @@ static int self_check_ai(struct ubi_devi
|
||||
#define AV_ADD BIT(1)
|
||||
#define AV_FIND_OR_ADD (AV_FIND | AV_ADD)
|
||||
|
||||
+/* Set on finding block with 0xdeadc0de, indicates erasing all blocks behind */
|
||||
+bool erase_all_next;
|
||||
+
|
||||
/**
|
||||
* find_or_add_av - internal function to find a volume, add a volume or do
|
||||
* both (find and add if missing).
|
||||
@@ -1580,6 +1583,8 @@ int ubi_attach(struct ubi_device *ubi, i
|
||||
if (!ai)
|
||||
return -ENOMEM;
|
||||
|
||||
+ erase_all_next = false;
|
||||
+
|
||||
#ifdef CONFIG_MTD_UBI_FASTMAP
|
||||
/* On small flash devices we disable fastmap in any case. */
|
||||
if ((int)mtd_div_by_eb(ubi->mtd->size, ubi->mtd) <= UBI_FM_MAX_START) {
|
||||
--- a/drivers/mtd/ubi/io.c
|
||||
+++ b/drivers/mtd/ubi/io.c
|
||||
@@ -717,6 +717,10 @@ int ubi_io_read_ec_hdr(struct ubi_device
|
||||
}
|
||||
|
||||
magic = be32_to_cpu(ec_hdr->magic);
|
||||
+ if (magic == 0xdeadc0de)
|
||||
+ erase_all_next = true;
|
||||
+ if (erase_all_next)
|
||||
+ return read_err ? UBI_IO_FF_BITFLIPS : UBI_IO_FF;
|
||||
if (magic != UBI_EC_HDR_MAGIC) {
|
||||
if (mtd_is_eccerr(read_err))
|
||||
return UBI_IO_BAD_HDR_EBADMSG;
|
||||
--- a/drivers/mtd/ubi/ubi.h
|
||||
+++ b/drivers/mtd/ubi/ubi.h
|
||||
@@ -822,6 +822,7 @@ extern struct mutex ubi_devices_mutex;
|
||||
extern struct blocking_notifier_head ubi_notifiers;
|
||||
|
||||
/* attach.c */
|
||||
+extern bool erase_all_next;
|
||||
struct ubi_ainf_peb *ubi_alloc_aeb(struct ubi_attach_info *ai, int pnum,
|
||||
int ec);
|
||||
void ubi_free_aeb(struct ubi_attach_info *ai, struct ubi_ainf_peb *aeb);
|
||||
@@ -0,0 +1,36 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Mon, 20 Jun 2022 10:01:18 +0200
|
||||
Subject: [PATCH] net: disable GRO by default
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
In many cases GRO improves network performance however it comes at a
|
||||
cost of chacksums calculations. In case of slow CPU and missing hardware
|
||||
csum calculation support GRO can actually decrease network speed.
|
||||
|
||||
On BCM4708 *disabling* GRO results in following NAT masquarade speed
|
||||
changes:
|
||||
1. 364 Mb/s → 396 Mb/s (packet steering disabled)
|
||||
2. 341 Mb/s → 566 Mb/s (packet steering enabled)
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
include/linux/netdev_features.h | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/include/linux/netdev_features.h
|
||||
+++ b/include/linux/netdev_features.h
|
||||
@@ -243,10 +243,10 @@ static inline int find_next_netdev_featu
|
||||
#define NETIF_F_UPPER_DISABLES NETIF_F_LRO
|
||||
|
||||
/* changeable features with no special hardware requirements */
|
||||
-#define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO | NETIF_F_GRO_FRAGLIST)
|
||||
+#define NETIF_F_SOFT_FEATURES (NETIF_F_GSO)
|
||||
|
||||
/* Changeable features with no special hardware requirements that defaults to off. */
|
||||
-#define NETIF_F_SOFT_FEATURES_OFF (NETIF_F_GRO_UDP_FWD)
|
||||
+#define NETIF_F_SOFT_FEATURES_OFF (NETIF_F_GRO_UDP_FWD | NETIF_F_GRO | NETIF_F_GRO_FRAGLIST)
|
||||
|
||||
#define NETIF_F_VLAN_FEATURES (NETIF_F_HW_VLAN_CTAG_FILTER | \
|
||||
NETIF_F_HW_VLAN_CTAG_RX | \
|
||||
@@ -0,0 +1,33 @@
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Fri, 10 Jun 2022 13:10:47 +0200
|
||||
Subject: [PATCH] bgmac: reduce max frame size to support just MTU 1500
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
bgmac allocates new replacement buffer before handling each received
|
||||
frame. Allocating & DMA-preparing 9724 B each time consumes a lot of CPU
|
||||
time. Ideally bgmac should just respect currently set MTU but it isn't
|
||||
the case right now. For now just revert back to the old limited frame
|
||||
size.
|
||||
|
||||
This change bumps NAT masquarade speed by ~95%.
|
||||
|
||||
Ref: 8c7da63978f1 ("bgmac: configure MTU and add support for frames beyond 8192 byte size")
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
drivers/net/ethernet/broadcom/bgmac.h | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/broadcom/bgmac.h
|
||||
+++ b/drivers/net/ethernet/broadcom/bgmac.h
|
||||
@@ -328,8 +328,7 @@
|
||||
#define BGMAC_RX_FRAME_OFFSET 30 /* There are 2 unused bytes between header and real data */
|
||||
#define BGMAC_RX_BUF_OFFSET (NET_SKB_PAD + NET_IP_ALIGN - \
|
||||
BGMAC_RX_FRAME_OFFSET)
|
||||
-/* Jumbo frame size with FCS */
|
||||
-#define BGMAC_RX_MAX_FRAME_SIZE 9724
|
||||
+#define BGMAC_RX_MAX_FRAME_SIZE 1536
|
||||
#define BGMAC_RX_BUF_SIZE (BGMAC_RX_FRAME_OFFSET + BGMAC_RX_MAX_FRAME_SIZE)
|
||||
#define BGMAC_RX_ALLOC_SIZE (SKB_DATA_ALIGN(BGMAC_RX_BUF_SIZE + BGMAC_RX_BUF_OFFSET) + \
|
||||
SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
|
||||
@@ -0,0 +1,80 @@
|
||||
From 6f1c62440eb6846cb8045d7a5480ec7bbe47c96f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
|
||||
Date: Mon, 15 Aug 2016 10:30:41 +0200
|
||||
Subject: [PATCH] BCM53573 minor hacks
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
||||
---
|
||||
|
||||
--- a/arch/arm/boot/dts/broadcom/bcm53573.dtsi
|
||||
+++ b/arch/arm/boot/dts/broadcom/bcm53573.dtsi
|
||||
@@ -54,6 +54,7 @@
|
||||
<GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
|
||||
<GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
|
||||
<GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ clocks = <&ilp>;
|
||||
};
|
||||
|
||||
clocks {
|
||||
--- a/drivers/bcma/main.c
|
||||
+++ b/drivers/bcma/main.c
|
||||
@@ -331,14 +331,6 @@ static int bcma_register_devices(struct
|
||||
}
|
||||
#endif
|
||||
|
||||
-#ifdef CONFIG_BCMA_SFLASH
|
||||
- if (bus->drv_cc.sflash.present) {
|
||||
- err = platform_device_register(&bcma_sflash_dev);
|
||||
- if (err)
|
||||
- bcma_err(bus, "Error registering serial flash\n");
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
#ifdef CONFIG_BCMA_NFLASH
|
||||
if (bus->drv_cc.nflash.present) {
|
||||
err = platform_device_register(&bcma_nflash_dev);
|
||||
@@ -418,6 +410,14 @@ int bcma_bus_register(struct bcma_bus *b
|
||||
bcma_register_core(bus, core);
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_BCMA_SFLASH
|
||||
+ if (bus->drv_cc.sflash.present) {
|
||||
+ err = platform_device_register(&bcma_sflash_dev);
|
||||
+ if (err)
|
||||
+ bcma_err(bus, "Error registering serial flash\n");
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
/* Try to get SPROM */
|
||||
err = bcma_sprom_get(bus);
|
||||
if (err == -ENOENT) {
|
||||
--- a/drivers/clocksource/arm_arch_timer.c
|
||||
+++ b/drivers/clocksource/arm_arch_timer.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <linux/smp.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/cpu_pm.h>
|
||||
+#include <linux/clk.h>
|
||||
#include <linux/clockchips.h>
|
||||
#include <linux/clocksource.h>
|
||||
#include <linux/clocksource_ids.h>
|
||||
@@ -1048,6 +1049,16 @@ static void __init arch_timer_of_configu
|
||||
if (of_property_read_u32(np, "clock-frequency", &arch_timer_rate))
|
||||
arch_timer_rate = rate;
|
||||
|
||||
+ /* Get clk rate through clk driver if present */
|
||||
+ if (!arch_timer_rate) {
|
||||
+ struct clk *clk = of_clk_get(np, 0);
|
||||
+
|
||||
+ if (!IS_ERR(clk)) {
|
||||
+ if (!clk_prepare_enable(clk))
|
||||
+ arch_timer_rate = clk_get_rate(clk);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* Check the timer frequency. */
|
||||
if (validate_timer_rate())
|
||||
pr_warn("frequency not available\n");
|
||||
17
target/linux/bcm53xx/profiles/100-Generic.mk
Normal file
17
target/linux/bcm53xx/profiles/100-Generic.mk
Normal file
@@ -0,0 +1,17 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2013 OpenWrt.org
|
||||
|
||||
define Profile/Generic
|
||||
NAME:=Broadcom SoC, BCM43xx WiFi (b43, brcmfmac, default)
|
||||
PACKAGES:=kmod-b43 kmod-brcmfmac
|
||||
endef
|
||||
|
||||
define Profile/Generic/Description
|
||||
Package set compatible with any hardware using Broadcom BCM47xx or
|
||||
BCM535x SoCs with an ARM CPU like the BCM4707, BCM4708, BCM4709,
|
||||
BCM53010
|
||||
endef
|
||||
|
||||
$(eval $(call Profile,Generic))
|
||||
|
||||
Reference in New Issue
Block a user