Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -39,6 +39,7 @@ ampedwireless,ally-r1900k)
|
||||
;;
|
||||
beeline,smartbox-giga|\
|
||||
beeline,smartbox-turbo|\
|
||||
beeline,smartbox-turbo-plus|\
|
||||
etisalat,s3|\
|
||||
rostelecom,rt-sf-1)
|
||||
ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
|
||||
|
||||
@@ -101,6 +101,24 @@ speed_str(int speed)
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
static void
|
||||
free_attr_val(const struct switch_attr *attr, const struct switch_val *val)
|
||||
{
|
||||
switch (attr->type) {
|
||||
case SWITCH_TYPE_STRING:
|
||||
free(val->value.s);
|
||||
break;
|
||||
case SWITCH_TYPE_PORTS:
|
||||
free(val->value.ports);
|
||||
break;
|
||||
case SWITCH_TYPE_LINK:
|
||||
free(val->value.link);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_attr_val(const struct switch_attr *attr, const struct switch_val *val)
|
||||
{
|
||||
@@ -150,8 +168,10 @@ show_attrs(struct switch_dev *dev, struct switch_attr *attr, struct switch_val *
|
||||
printf("\t%s: ", attr->name);
|
||||
if (swlib_get_attr(dev, attr, val) < 0)
|
||||
printf("???");
|
||||
else
|
||||
else {
|
||||
print_attr_val(attr, val);
|
||||
free_attr_val(attr, val);
|
||||
}
|
||||
putchar('\n');
|
||||
}
|
||||
attr = attr->next;
|
||||
@@ -354,6 +374,7 @@ int main(int argc, char **argv)
|
||||
goto out;
|
||||
}
|
||||
print_attr_val(a, &val);
|
||||
free_attr_val(a, &val);
|
||||
putchar('\n');
|
||||
break;
|
||||
case CMD_LOAD:
|
||||
|
||||
@@ -11,6 +11,7 @@ proto_qmi_init_config() {
|
||||
no_device=1
|
||||
proto_config_add_string "device:device"
|
||||
proto_config_add_string apn
|
||||
proto_config_add_string v6apn
|
||||
proto_config_add_string auth
|
||||
proto_config_add_string username
|
||||
proto_config_add_string password
|
||||
@@ -19,6 +20,7 @@ proto_qmi_init_config() {
|
||||
proto_config_add_string modes
|
||||
proto_config_add_string pdptype
|
||||
proto_config_add_int profile
|
||||
proto_config_add_int v6profile
|
||||
proto_config_add_boolean dhcp
|
||||
proto_config_add_boolean dhcpv6
|
||||
proto_config_add_boolean autoconnect
|
||||
@@ -31,14 +33,14 @@ proto_qmi_init_config() {
|
||||
proto_qmi_setup() {
|
||||
local interface="$1"
|
||||
local dataformat connstat plmn_mode mcc mnc
|
||||
local device apn auth username password pincode delay modes pdptype
|
||||
local profile dhcp dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS
|
||||
local device apn v6apn auth username password pincode delay modes pdptype
|
||||
local profile v6profile dhcp dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS
|
||||
local ip4table ip6table
|
||||
local cid_4 pdh_4 cid_6 pdh_6
|
||||
local ip_6 ip_prefix_length gateway_6 dns1_6 dns2_6
|
||||
|
||||
json_get_vars device apn auth username password pincode delay modes
|
||||
json_get_vars pdptype profile dhcp dhcpv6 autoconnect plmn ip4table
|
||||
json_get_vars device apn v6apn auth username password pincode delay modes
|
||||
json_get_vars pdptype profile v6profile dhcp dhcpv6 autoconnect plmn ip4table
|
||||
json_get_vars ip6table timeout mtu $PROTO_DEFAULT_OPTIONS
|
||||
|
||||
[ "$timeout" = "" ] && timeout="10"
|
||||
@@ -309,10 +311,13 @@ proto_qmi_setup() {
|
||||
|
||||
uqmi -s -d "$device" --set-client-id wds,"$cid_6" --set-ip-family ipv6 > /dev/null 2>&1
|
||||
|
||||
: "${v6apn:=${apn}}"
|
||||
: "${v6profile:=${profile}}"
|
||||
|
||||
pdh_6=$(uqmi -s -d "$device" --set-client-id wds,"$cid_6" \
|
||||
--start-network \
|
||||
${apn:+--apn $apn} \
|
||||
${profile:+--profile $profile} \
|
||||
${v6apn:+--apn $v6apn} \
|
||||
${v6profile:+--profile $v6profile} \
|
||||
${auth:+--auth-type $auth} \
|
||||
${username:+--username $username} \
|
||||
${password:+--password $password} \
|
||||
@@ -383,6 +388,7 @@ proto_qmi_setup() {
|
||||
json_init
|
||||
json_add_string name "${interface}_6"
|
||||
json_add_string ifname "@$interface"
|
||||
[ "$pdptype" = "ipv4v6" ] && json_add_string iface_464xlat "0"
|
||||
json_add_string proto "dhcpv6"
|
||||
[ -n "$ip6table" ] && json_add_string ip6table "$ip6table"
|
||||
proto_add_dynamic_defaults
|
||||
|
||||
@@ -48,12 +48,12 @@ def get_kernel_header(args):
|
||||
struct.pack_into('<L', header, 0x2c, rootfs_size)
|
||||
struct.pack_into('<L', header, 0x30, crc)
|
||||
|
||||
rootfs_end_offset = args.rootfs_offset + rootfs_size
|
||||
struct.pack_into('<L', header, 0x4, rootfs_end_offset)
|
||||
|
||||
kernel_size = os.path.getsize(args.kernel_file)
|
||||
struct.pack_into('<L', header, 0x14, kernel_size)
|
||||
|
||||
kernel_end_offset = args.kernel_offset + kernel_size
|
||||
struct.pack_into('<L', header, 0x4, kernel_end_offset)
|
||||
|
||||
buf = open(args.kernel_file,'rb').read()
|
||||
crc = binascii.crc32(buf) & 0xffffffff
|
||||
struct.pack_into('<L', header, 0x18, crc)
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
board_config_update
|
||||
|
||||
case "$(board_name)" in
|
||||
comtrend,wap-5813n)
|
||||
ucidef_set_led_usbport "usb" "USB" "green:usb" "usb1-port1" "usb2-port1"
|
||||
;;
|
||||
netgear,dgnd3700-v1 |\
|
||||
netgear,dgnd3800b)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "switch.1"
|
||||
@@ -15,6 +18,11 @@ netgear,dgnd3800b)
|
||||
ucidef_set_led_usbport "usb1" "USB1" "green:usb1" "usb1-port1" "usb2-port1"
|
||||
ucidef_set_led_usbport "usb2" "USB2" "green:usb2" "usb1-port2" "usb2-port2"
|
||||
;;
|
||||
netgear,evg2000)
|
||||
ucidef_set_led_netdev "lan" "LAN" "green:lan" "switch.1"
|
||||
ucidef_set_led_netdev "wan" "WAN" "green:wan" "wan"
|
||||
ucidef_set_led_usbdev "usb" "USB" "green:usb" "usb1-port1" "usb2-port1" "usb1-port2" "usb2-port2"
|
||||
;;
|
||||
observa,vh4032n)
|
||||
ucidef_set_led_usbport "usb1" "USB1" "blue:hspa" "usb1-port1" "usb2-port1"
|
||||
ucidef_set_led_usbport "usb2" "USB2" "red:hspa" "1-2-port1" "1-2-port2"
|
||||
|
||||
@@ -10,8 +10,14 @@ observa,vh4032n)
|
||||
ucidef_set_bridge_device switch
|
||||
ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
|
||||
;;
|
||||
comtrend,vr-3025un)
|
||||
ucidef_set_bridge_device switch
|
||||
ucidef_set_interface_lan "lan1 lan2 lan3 iptv"
|
||||
;;
|
||||
comtrend,wap-5813n |\
|
||||
netgear,dgnd3700-v1 |\
|
||||
netgear,dgnd3800b)
|
||||
netgear,dgnd3800b |\
|
||||
netgear,evg2000)
|
||||
ucidef_set_bridge_device switch
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
|
||||
;;
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
case "$(board_name)" in
|
||||
comtrend,vr-3025u |\
|
||||
comtrend,vr-3025un |\
|
||||
comtrend,wap-5813n |\
|
||||
netgear,evg2000 |\
|
||||
observa,vh4032n)
|
||||
mtd fixtrx firmware
|
||||
;;
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
|
||||
led-internet = &led_internet_green;
|
||||
led-usb = &led_mobile_green;
|
||||
led-wireless = &led_wireless_green;
|
||||
};
|
||||
|
||||
keys {
|
||||
@@ -56,7 +52,7 @@
|
||||
label = "red:mobile";
|
||||
};
|
||||
|
||||
led_mobile_green: led@1 {
|
||||
led@1 {
|
||||
reg = <1>;
|
||||
label = "green:mobile";
|
||||
};
|
||||
@@ -64,9 +60,10 @@
|
||||
led_power_red: led@8 {
|
||||
reg = <8>;
|
||||
label = "red:power";
|
||||
panic-indicator;
|
||||
};
|
||||
|
||||
led_wireless_green: led@9 {
|
||||
led@9 {
|
||||
reg = <9>;
|
||||
label = "green:wifi";
|
||||
};
|
||||
@@ -86,7 +83,7 @@
|
||||
label = "red:internet";
|
||||
};
|
||||
|
||||
led_internet_green: led@15 {
|
||||
led@15 {
|
||||
reg = <15>;
|
||||
label = "green:internet";
|
||||
};
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
led-failsafe = &led_power_green;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
|
||||
led-dsl = &led_dsl_green;
|
||||
led-internet = &led_internet_green;
|
||||
led-usb = &led_usb_green;
|
||||
};
|
||||
|
||||
keys {
|
||||
@@ -78,13 +74,13 @@
|
||||
label = "red:internet";
|
||||
};
|
||||
|
||||
led_dsl_green: led@3 {
|
||||
led@3 {
|
||||
reg = <3>;
|
||||
active-low;
|
||||
label = "green:dsl";
|
||||
};
|
||||
|
||||
led_usb_green: led@4 {
|
||||
led@4 {
|
||||
reg = <4>;
|
||||
active-low;
|
||||
label = "green:usb";
|
||||
@@ -96,7 +92,7 @@
|
||||
label = "green:wps";
|
||||
};
|
||||
|
||||
led_internet_green: led@8 {
|
||||
led@8 {
|
||||
reg = <8>;
|
||||
active-low;
|
||||
label = "green:internet";
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_red;
|
||||
led-upgrade = &led_power_red;
|
||||
|
||||
led-internet = &led_internet_green;
|
||||
led-usb = &led_modem_green;
|
||||
led-wireless = &led_wireless_green;
|
||||
};
|
||||
|
||||
i2c {
|
||||
@@ -82,7 +78,7 @@
|
||||
label = "red:modem";
|
||||
};
|
||||
|
||||
led_modem_green: led@2 {
|
||||
led@2 {
|
||||
reg = <2>;
|
||||
label = "green:modem";
|
||||
};
|
||||
@@ -107,7 +103,7 @@
|
||||
label = "green:phone";
|
||||
};
|
||||
|
||||
led_wireless_green: led@7 {
|
||||
led@7 {
|
||||
reg = <7>;
|
||||
label = "green:wifi";
|
||||
};
|
||||
@@ -117,7 +113,7 @@
|
||||
label = "red:power";
|
||||
};
|
||||
|
||||
led_internet_green: led@9 {
|
||||
led@9 {
|
||||
reg = <9>;
|
||||
label = "green:internet";
|
||||
};
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
|
||||
led-dsl = &led_dsl_green;
|
||||
led-internet = &led_internet_green;
|
||||
led-usb = &led_usb_green;
|
||||
};
|
||||
|
||||
keys {
|
||||
@@ -130,41 +126,41 @@
|
||||
label = "green:power";
|
||||
};
|
||||
|
||||
led_usb_green: led@2 {
|
||||
led@2 {
|
||||
reg = <2>;
|
||||
active-low;
|
||||
label = "green:usb";
|
||||
};
|
||||
|
||||
led@4 {
|
||||
/* EPHY0 Act */
|
||||
reg = <4>;
|
||||
brcm,hardware-controlled;
|
||||
brcm,link-signal-sources = <4>;
|
||||
/* EPHY0 Act */
|
||||
};
|
||||
|
||||
led@5 {
|
||||
/* EPHY1 Act */
|
||||
reg = <5>;
|
||||
brcm,hardware-controlled;
|
||||
brcm,link-signal-sources = <5>;
|
||||
/* EPHY1 Act */
|
||||
};
|
||||
|
||||
led@6 {
|
||||
/* EPHY2 Act */
|
||||
reg = <6>;
|
||||
brcm,hardware-controlled;
|
||||
brcm,link-signal-sources = <6>;
|
||||
/* EPHY2 Act */
|
||||
};
|
||||
|
||||
led@7 {
|
||||
/* EPHY3 Act */
|
||||
reg = <7>;
|
||||
brcm,hardware-controlled;
|
||||
brcm,link-signal-sources = <7>;
|
||||
/* EPHY3 Act */
|
||||
};
|
||||
|
||||
led_internet_green: led@8 {
|
||||
led@8 {
|
||||
reg = <8>;
|
||||
active-low;
|
||||
label = "green:internet";
|
||||
@@ -176,7 +172,7 @@
|
||||
label = "red:internet";
|
||||
};
|
||||
|
||||
led_dsl_green: led@10 {
|
||||
led@10 {
|
||||
reg = <10>;
|
||||
active-low;
|
||||
label = "green:dsl";
|
||||
@@ -186,6 +182,7 @@
|
||||
reg = <11>;
|
||||
active-low;
|
||||
label = "red:power";
|
||||
panic-indicator;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
|
||||
led-dsl = &led_dsl_green;
|
||||
led-internet = &led_internet_green;
|
||||
};
|
||||
|
||||
keys {
|
||||
@@ -129,9 +126,10 @@
|
||||
led_power_red: led@4 {
|
||||
reg = <4>;
|
||||
label = "red:power";
|
||||
panic-indicator;
|
||||
};
|
||||
|
||||
led_internet_green: led@7 {
|
||||
led@7 {
|
||||
reg = <7>;
|
||||
label = "green:internet";
|
||||
};
|
||||
@@ -141,7 +139,7 @@
|
||||
label = "green:power";
|
||||
};
|
||||
|
||||
led_dsl_green: led@11 {
|
||||
led@11 {
|
||||
reg = <11>;
|
||||
active-low;
|
||||
label = "green:dsl";
|
||||
|
||||
@@ -3,17 +3,14 @@
|
||||
#include "bcm6358.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "huawei,hg556a-b", "brcm,bcm6358";
|
||||
model = "Huawei EchoLife HG556a (version B)";
|
||||
compatible = "huawei,hg556a-b", "brcm,bcm6358";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power_red;
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_red;
|
||||
led-upgrade = &led_power_red;
|
||||
|
||||
led-dsl = &led_dsl_red;
|
||||
led-usb = &led_hspa_red;
|
||||
};
|
||||
|
||||
keys {
|
||||
@@ -57,12 +54,12 @@
|
||||
gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_hspa_red: led@1 {
|
||||
led@1 {
|
||||
label = "red:hspa";
|
||||
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_dsl_red: led@2 {
|
||||
led@2 {
|
||||
label = "red:dsl";
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
led-boot = &led_phone_green;
|
||||
led-failsafe = &led_phone_green;
|
||||
led-upgrade = &led_phone_green;
|
||||
|
||||
led-internet = &led_internet_green;
|
||||
led-usb = &led_usb_green;
|
||||
led-wireless = &led_wireless_green;
|
||||
};
|
||||
|
||||
keys {
|
||||
@@ -50,7 +46,7 @@
|
||||
gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_usb_green: led@30 {
|
||||
led@30 {
|
||||
label = "green:usb";
|
||||
gpios = <&gpio 30 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
@@ -74,13 +70,13 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_leds>;
|
||||
|
||||
led_internet_green: led@3 {
|
||||
led@3 {
|
||||
reg = <3>;
|
||||
active-low;
|
||||
label = "green:internet";
|
||||
};
|
||||
|
||||
led_wireless_green: led@5 {
|
||||
led@5 {
|
||||
reg = <5>;
|
||||
active-low;
|
||||
label = "green:wifi";
|
||||
|
||||
@@ -11,12 +11,6 @@
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
|
||||
led-dsl = &led_dsl_green;
|
||||
led-ethernet = &led_ethernet_green;
|
||||
led-internet = &led_internet_green;
|
||||
led-usb = &led_usb1_green;
|
||||
led-usb2 = &led_usb2_green;
|
||||
};
|
||||
|
||||
keys {
|
||||
@@ -48,7 +42,7 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_dsl_green: led@28 {
|
||||
led@28 {
|
||||
label = "green:dsl";
|
||||
gpios = <&gpio 28 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
@@ -56,6 +50,7 @@
|
||||
led_power_red: led@34 {
|
||||
label = "red:power";
|
||||
gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
|
||||
panic-indicator;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -82,7 +77,7 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_leds &pinctrl_serial_led>;
|
||||
|
||||
led_internet_green: led@1 {
|
||||
led@1 {
|
||||
reg = <1>;
|
||||
active-low;
|
||||
label = "green:internet";
|
||||
@@ -99,13 +94,13 @@
|
||||
label = "green:wps";
|
||||
};
|
||||
|
||||
led_usb1_green: led@10 {
|
||||
led@10 {
|
||||
reg = <10>;
|
||||
active-low;
|
||||
label = "green:usb1";
|
||||
};
|
||||
|
||||
led_usb2_green: led@11 {
|
||||
led@11 {
|
||||
reg = <11>;
|
||||
active-low;
|
||||
label = "green:usb2";
|
||||
@@ -117,7 +112,7 @@
|
||||
label = "amber:internet";
|
||||
};
|
||||
|
||||
led_ethernet_green: led@13 {
|
||||
led@13 {
|
||||
reg = <13>;
|
||||
active-low;
|
||||
label = "green:ethernet";
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
|
||||
led-dsl = &led_dsl_green;
|
||||
led-internet = &led_internet_green;
|
||||
};
|
||||
|
||||
keys {
|
||||
@@ -31,12 +28,12 @@
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_dsl_green: led@2 {
|
||||
led@2 {
|
||||
label = "green:dsl";
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_internet_green: led@5 {
|
||||
led@5 {
|
||||
label = "green:internet";
|
||||
gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
@@ -49,6 +46,7 @@
|
||||
led_power_red: led@24 {
|
||||
label = "red:power";
|
||||
gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
|
||||
panic-indicator;
|
||||
};
|
||||
|
||||
led@31 {
|
||||
|
||||
182
target/linux/bmips/dts/bcm6368-comtrend-vr-3025un.dts
Normal file
182
target/linux/bmips/dts/bcm6368-comtrend-vr-3025un.dts
Normal file
@@ -0,0 +1,182 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "bcm6368.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Comtrend VR-3025un";
|
||||
compatible = "comtrend,vr-3025un", "brcm,bcm6368";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power_green;
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys-polled";
|
||||
poll-interval = <100>;
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led@2 {
|
||||
label = "green:dsl";
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led@5 {
|
||||
label = "green:internet";
|
||||
gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_power_green: led@22 {
|
||||
label = "green:power";
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_power_red: led@24 {
|
||||
label = "red:power";
|
||||
gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
|
||||
panic-indicator;
|
||||
};
|
||||
|
||||
led@31 {
|
||||
label = "red:internet";
|
||||
gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
bcm43222-sprom {
|
||||
compatible = "brcm,ssb-sprom";
|
||||
|
||||
pci-bus = <0>;
|
||||
pci-dev = <1>;
|
||||
|
||||
nvmem-cells = <&macaddr_cfe_6a0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <1>;
|
||||
|
||||
brcm,sprom = "brcm/bcm43222-sprom.bin";
|
||||
brcm,sprom-fixups = <97 0xfeb3>,
|
||||
<98 0x1618>,
|
||||
<99 0xfab0>,
|
||||
<113 0xfed1>,
|
||||
<114 0x1609>,
|
||||
<115 0xfad9>;
|
||||
};
|
||||
};
|
||||
|
||||
&ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&macaddr_cfe_6a0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pflash {
|
||||
status = "okay";
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
label = "CFE";
|
||||
reg = <0x000000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
compatible = "brcm,bcm963xx-imagetag";
|
||||
label = "firmware";
|
||||
reg = <0x010000 0x7e0000>;
|
||||
};
|
||||
|
||||
partition@1fe0000 {
|
||||
label = "nvram";
|
||||
reg = <0x7f0000 0x010000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_ephy0_led &pinctrl_ephy1_led
|
||||
&pinctrl_ephy2_led &pinctrl_ephy3_led>;
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "lan1";
|
||||
|
||||
phy-handle = <&phy1>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
label = "lan2";
|
||||
|
||||
phy-handle = <&phy2>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
label = "lan3";
|
||||
|
||||
phy-handle = <&phy3>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
label = "iptv";
|
||||
|
||||
phy-handle = <&phy4>;
|
||||
phy-mode = "mii";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbh {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cfe {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_cfe_6a0: macaddr@6a0 {
|
||||
reg = <0x6a0 0x6>;
|
||||
};
|
||||
};
|
||||
@@ -59,14 +59,14 @@
|
||||
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
/* usb front */
|
||||
led@13 {
|
||||
/* Front USB port */
|
||||
label = "green:usb2";
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
/* usb back */
|
||||
led@14 {
|
||||
/* Back USB port */
|
||||
label = "green:usb1";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
@@ -85,7 +85,6 @@
|
||||
led_power_green: led@24 {
|
||||
label = "green:power";
|
||||
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led@26 {
|
||||
|
||||
@@ -58,12 +58,12 @@
|
||||
led_power_blue: led@22 {
|
||||
label = "blue:power";
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
|
||||
led_power_red: led@24 {
|
||||
label = "red:power";
|
||||
gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
|
||||
panic-indicator;
|
||||
};
|
||||
|
||||
led@25 {
|
||||
|
||||
230
target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts
Normal file
230
target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts
Normal file
@@ -0,0 +1,230 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "bcm6368.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Comtrend WAP-5813n";
|
||||
compatible = "comtrend,wap-5813n", "brcm,bcm6369", "brcm,bcm6368";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power_green;
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys-polled";
|
||||
poll-interval = <100>;
|
||||
|
||||
wlan {
|
||||
label = "wlan";
|
||||
gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WLAN>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led@5 {
|
||||
label = "green:internet";
|
||||
gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led@14 {
|
||||
label = "green:usb";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_power_green: led@22 {
|
||||
label = "green:power";
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led@23 {
|
||||
label = "green:wps";
|
||||
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_power_red: led@24 {
|
||||
label = "red:power";
|
||||
gpios = <&gpio 24 GPIO_ACTIVE_HIGH>;
|
||||
panic-indicator;
|
||||
};
|
||||
|
||||
led@31 {
|
||||
label = "red:internet";
|
||||
gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
bcm4322-sprom {
|
||||
compatible = "brcm,ssb-sprom";
|
||||
|
||||
pci-bus = <0>;
|
||||
pci-dev = <1>;
|
||||
|
||||
nvmem-cells = <&macaddr_cfe_6a0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <1>;
|
||||
|
||||
brcm,sprom = "brcm/bcm4322-sprom.bin";
|
||||
brcm,sprom-fixups = <97 0xfeed>,
|
||||
<98 0x15d1>,
|
||||
<99 0xfb0d>,
|
||||
<113 0xfef7>,
|
||||
<114 0x15f7>,
|
||||
<115 0xfb1a>;
|
||||
};
|
||||
};
|
||||
|
||||
&ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&macaddr_cfe_6a0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&lsspi {
|
||||
status = "okay";
|
||||
|
||||
switch@0 {
|
||||
compatible = "brcm,bcm53115";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <781000>;
|
||||
dsa,member = <1 0>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "lan4";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
reg = <4>;
|
||||
label = "wan";
|
||||
};
|
||||
|
||||
port@5 {
|
||||
reg = <5>;
|
||||
|
||||
phy-mode = "rgmii";
|
||||
ethernet = <&switch0port4>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pflash {
|
||||
status = "okay";
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
label = "CFE";
|
||||
reg = <0x000000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
label = "firmware";
|
||||
reg = <0x010000 0x7e0000>;
|
||||
compatible = "brcm,bcm963xx-imagetag";
|
||||
};
|
||||
|
||||
partition@fe0000 {
|
||||
label = "nvram";
|
||||
reg = <0x7f0000 0x010000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
dsa,member = <0 0>;
|
||||
|
||||
ports {
|
||||
switch0port4: port@4 {
|
||||
reg = <4>;
|
||||
label = "extsw";
|
||||
|
||||
phy-mode = "rgmii";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbh {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cfe {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_cfe_6a0: macaddr@6a0 {
|
||||
reg = <0x6a0 0x6>;
|
||||
};
|
||||
};
|
||||
237
target/linux/bmips/dts/bcm6369-netgear-evg2000.dts
Normal file
237
target/linux/bmips/dts/bcm6369-netgear-evg2000.dts
Normal file
@@ -0,0 +1,237 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "bcm6368.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Netgear EVG2000";
|
||||
compatible = "netgear,evg2000", "brcm,bcm6369", "brcm,bcm6368";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power_green;
|
||||
led-failsafe = &led_power_red;
|
||||
led-running = &led_power_green;
|
||||
led-upgrade = &led_power_green;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys-polled";
|
||||
poll-interval = <100>;
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 25 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led@2 {
|
||||
label = "green:voip2";
|
||||
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led@4 {
|
||||
label = "red:internet";
|
||||
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led@5 {
|
||||
label = "green:internet";
|
||||
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led@14 {
|
||||
label = "green:voip1";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led@15 {
|
||||
label = "green:usb";
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_power_green: led@22 {
|
||||
label = "green:power";
|
||||
gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led_power_red: led@23 {
|
||||
label = "red:power";
|
||||
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
|
||||
panic-indicator;
|
||||
};
|
||||
|
||||
led@24 {
|
||||
label = "green:lan";
|
||||
gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
led@27 {
|
||||
label = "green:wan";
|
||||
gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
bcm4322-sprom {
|
||||
compatible = "brcm,ssb-sprom";
|
||||
|
||||
pci-bus = <0>;
|
||||
pci-dev = <1>;
|
||||
|
||||
nvmem-cells = <&macaddr_cfe_6a0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <1>;
|
||||
|
||||
brcm,sprom = "brcm/bcm4322-sprom.bin";
|
||||
brcm,sprom-fixups = <219 0xec08>;
|
||||
};
|
||||
};
|
||||
|
||||
&ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
|
||||
nvmem-cells = <&macaddr_cfe_6a0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&mdio_ext {
|
||||
switch@1e {
|
||||
compatible = "brcm,bcm53115";
|
||||
reg = <30>;
|
||||
|
||||
dsa,member = <1 0>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
label = "wan";
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
reg = <3>;
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
reg = <4>;
|
||||
label = "lan4";
|
||||
};
|
||||
|
||||
port@8 {
|
||||
reg = <8>;
|
||||
|
||||
phy-mode = "rgmii";
|
||||
ethernet = <&switch0port5>;
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
dsa,member = <0 0>;
|
||||
|
||||
ports {
|
||||
switch0port5: port@5 {
|
||||
reg = <5>;
|
||||
label = "extsw";
|
||||
|
||||
phy-mode = "rgmii";
|
||||
|
||||
fixed-link {
|
||||
speed = <1000>;
|
||||
full-duplex;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pflash {
|
||||
status = "okay";
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
cfe: partition@0 {
|
||||
label = "CFE";
|
||||
reg = <0x000000 0x020000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@20000 {
|
||||
label = "firmware";
|
||||
reg = <0x020000 0xf40000>;
|
||||
compatible = "brcm,bcm963xx-imagetag";
|
||||
};
|
||||
|
||||
partition@f60000 {
|
||||
label = "board_data";
|
||||
reg = <0xf60000 0x080000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@fe0000 {
|
||||
label = "nvram";
|
||||
reg = <0xfe0000 0x020000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbh {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&cfe {
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_cfe_6a0: macaddr@6a0 {
|
||||
reg = <0x6a0 0x6>;
|
||||
};
|
||||
};
|
||||
@@ -313,7 +313,7 @@ define Device/bcm63xx-nand
|
||||
DEVICE_PACKAGES += nand-utils
|
||||
endef
|
||||
|
||||
define Device/bcm63xx_netgear
|
||||
define Device/bcm63xx-netgear
|
||||
$(Device/bcm63xx-cfe)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
IMAGES := factory.chk sysupgrade.bin
|
||||
|
||||
@@ -14,8 +14,35 @@ define Device/comtrend_vr-3025u
|
||||
endef
|
||||
TARGET_DEVICES += comtrend_vr-3025u
|
||||
|
||||
define Device/comtrend_vr-3025un
|
||||
$(Device/bcm63xx-cfe)
|
||||
DEVICE_VENDOR := Comtrend
|
||||
DEVICE_MODEL := VR-3025un
|
||||
CHIP_ID := 6368
|
||||
CFE_BOARD_ID := 96368M-1341N
|
||||
FLASH_MB := 8
|
||||
DEVICE_PACKAGES += $(USB2_PACKAGES) \
|
||||
$(B43_PACKAGES) broadcom-43222-sprom \
|
||||
kmod-leds-gpio
|
||||
endef
|
||||
TARGET_DEVICES += comtrend_vr-3025un
|
||||
|
||||
define Device/comtrend_wap-5813n
|
||||
$(Device/bcm63xx-cfe)
|
||||
DEVICE_VENDOR := Comtrend
|
||||
DEVICE_MODEL := WAP-5813n
|
||||
CHIP_ID := 6368
|
||||
SOC := bcm6369
|
||||
CFE_BOARD_ID := 96369R-1231N
|
||||
FLASH_MB := 8
|
||||
DEVICE_PACKAGES += $(USB2_PACKAGES) \
|
||||
$(B43_PACKAGES) broadcom-4322-sprom \
|
||||
kmod-leds-gpio
|
||||
endef
|
||||
TARGET_DEVICES += comtrend_wap-5813n
|
||||
|
||||
define Device/netgear_dgnd3700-v1
|
||||
$(Device/bcm63xx_netgear)
|
||||
$(Device/bcm63xx-netgear)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := DGND3700
|
||||
DEVICE_VARIANT := v1
|
||||
@@ -25,12 +52,13 @@ define Device/netgear_dgnd3700-v1
|
||||
NETGEAR_BOARD_ID := U12L144T01_NETGEAR_NEWLED
|
||||
NETGEAR_REGION := 1
|
||||
DEVICE_PACKAGES += $(USB2_PACKAGES) \
|
||||
$(B43_PACKAGES)
|
||||
$(B43_PACKAGES) \
|
||||
kmod-leds-gpio
|
||||
endef
|
||||
TARGET_DEVICES += netgear_dgnd3700-v1
|
||||
|
||||
define Device/netgear_dgnd3800b
|
||||
$(Device/bcm63xx_netgear)
|
||||
$(Device/bcm63xx-netgear)
|
||||
DEVICE_VENDOR := NETGEAR
|
||||
DEVICE_MODEL := DGND3800B
|
||||
CFE_BOARD_ID := 96368MVWG
|
||||
@@ -39,10 +67,26 @@ define Device/netgear_dgnd3800b
|
||||
NETGEAR_BOARD_ID := U12L144T11_NETGEAR_NEWLED
|
||||
NETGEAR_REGION := 1
|
||||
DEVICE_PACKAGES += $(USB2_PACKAGES) \
|
||||
$(B43_PACKAGES)
|
||||
$(B43_PACKAGES) \
|
||||
kmod-leds-gpio
|
||||
endef
|
||||
TARGET_DEVICES += netgear_dgnd3800b
|
||||
|
||||
define Device/netgear_evg2000
|
||||
$(Device/bcm63xx-netgear)
|
||||
DEVICE_MODEL := EVG2000
|
||||
CFE_BOARD_ID := 96369PVG
|
||||
CHIP_ID := 6368
|
||||
SOC := bcm6369
|
||||
BLOCKSIZE := 0x20000
|
||||
NETGEAR_BOARD_ID := U12H154T90_NETGEAR
|
||||
NETGEAR_REGION := 1
|
||||
DEVICE_PACKAGES += $(USB2_PACKAGES) \
|
||||
$(B43_PACKAGES) broadcom-4322-sprom \
|
||||
kmod-leds-gpio
|
||||
endef
|
||||
TARGET_DEVICES += netgear_evg2000
|
||||
|
||||
define Device/observa_vh4032n
|
||||
$(Device/bcm63xx-cfe)
|
||||
DEVICE_VENDOR := Observa
|
||||
|
||||
248
target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts
Normal file
248
target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts
Normal file
@@ -0,0 +1,248 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
|
||||
#include "mt7621.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
compatible = "beeline,smartbox-turbo-plus", "mediatek,mt7621-soc";
|
||||
model = "Beeline SmartBox TURBO+";
|
||||
|
||||
aliases {
|
||||
label-mac-device = &gmac0;
|
||||
|
||||
led-boot = &led_status_green;
|
||||
led-failsafe = &led_status_red;
|
||||
led-running = &led_status_green;
|
||||
led-upgrade = &led_status_red;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led-0 {
|
||||
label = "blue:wan";
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_WAN;
|
||||
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status_green: led-1 {
|
||||
label = "green:status";
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_status_red: led-2 {
|
||||
label = "red:status";
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
ubi-concat {
|
||||
compatible = "mtd-concat";
|
||||
devices = <&ubiconcat0 &ubiconcat1 &ubiconcat2>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "ubi";
|
||||
reg = <0x0 0x4f80000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&nand {
|
||||
status = "okay";
|
||||
|
||||
partitions {
|
||||
compatible = "sercomm,sc-partitions", "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x100000>;
|
||||
sercomm,scpart-id = <0>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "dynamic partition map";
|
||||
reg = <0x100000 0x100000>;
|
||||
sercomm,scpart-id = <1>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@200000 {
|
||||
label = "Factory";
|
||||
reg = <0x200000 0x100000>;
|
||||
sercomm,scpart-id = <2>;
|
||||
read-only;
|
||||
|
||||
compatible = "nvmem-cells";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_factory_21000: macaddr@21000 {
|
||||
reg = <0x21000 0x6>;
|
||||
};
|
||||
};
|
||||
|
||||
partition@300000 {
|
||||
label = "Boot Flag";
|
||||
reg = <0x300000 0x100000>;
|
||||
sercomm,scpart-id = <3>;
|
||||
};
|
||||
|
||||
partition@400000 {
|
||||
label = "kernel";
|
||||
reg = <0x400000 0x600000>;
|
||||
sercomm,scpart-id = <4>;
|
||||
};
|
||||
|
||||
partition@a00000 {
|
||||
label = "Kernel 2";
|
||||
reg = <0xa00000 0x600000>;
|
||||
sercomm,scpart-id = <5>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
ubiconcat0: partition@1000000 {
|
||||
label = "File System 1";
|
||||
reg = <0x1000000 0x2000000>;
|
||||
sercomm,scpart-id = <6>;
|
||||
};
|
||||
|
||||
partition@3000000 {
|
||||
label = "File System 2";
|
||||
reg = <0x3000000 0x2000000>;
|
||||
sercomm,scpart-id = <7>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
ubiconcat1: partition@5000000 {
|
||||
label = "Configuration/log";
|
||||
reg = <0x5000000 0x1400000>;
|
||||
sercomm,scpart-id = <8>;
|
||||
};
|
||||
|
||||
ubiconcat2: partition@6400000 {
|
||||
label = "application tmp buffer (Ftool)";
|
||||
reg = <0x6400000 0x1b80000>;
|
||||
sercomm,scpart-id = <9>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
|
||||
nvmem-cells = <&macaddr_factory_21000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(5)>;
|
||||
};
|
||||
};
|
||||
|
||||
&pcie1 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x0>;
|
||||
ieee80211-freq-limit = <2400000 2500000>;
|
||||
|
||||
nvmem-cells = <&macaddr_factory_21000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(4)>;
|
||||
};
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&macaddr_factory_21000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
phy-handle = <ðphy0>;
|
||||
|
||||
nvmem-cells = <&macaddr_factory_21000>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
mac-address-increment = <(1)>;
|
||||
};
|
||||
|
||||
&mdio {
|
||||
ethphy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
&switch0 {
|
||||
ports {
|
||||
port@1 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@2 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
port@3 {
|
||||
status = "okay";
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
status = "okay";
|
||||
label = "lan4";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uartlite3 {
|
||||
status = "okay";
|
||||
current-speed = <57600>;
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "i2c", "jtag";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
@@ -148,10 +148,26 @@
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
nvmem-cells = <&macaddr_factory_e006>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&gmac1 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
phy-handle = <ðphy4>;
|
||||
|
||||
nvmem-cells = <&macaddr_factory_0004>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&mdio {
|
||||
ethphy4: ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&switch0 {
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
@@ -176,13 +192,6 @@
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
port@4 {
|
||||
status = "okay";
|
||||
label = "wan";
|
||||
nvmem-cells = <&macaddr_factory_0004>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -201,5 +210,9 @@
|
||||
macaddr_factory_0004: macaddr@0004 {
|
||||
reg = <0x0004 0x6>;
|
||||
};
|
||||
|
||||
macaddr_factory_e006: macaddr@e006 {
|
||||
reg = <0xe006 0x6>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
DEVICE_VARS += SERCOMM_KERNEL_OFFSET SERCOMM_ROOTFS_OFFSET
|
||||
DEVICE_VARS += SERCOMM_KERNEL2_OFFSET SERCOMM_ROOTFS2_OFFSET
|
||||
|
||||
define Build/sercomm-crypto
|
||||
$(TOPDIR)/scripts/sercomm-crypto.py \
|
||||
@@ -16,6 +17,23 @@ define Build/sercomm-crypto
|
||||
rm -f $@.enc $@.key
|
||||
endef
|
||||
|
||||
define Build/sercomm-factory-cqr
|
||||
$(TOPDIR)/scripts/sercomm-pid.py \
|
||||
--hw-version $(SERCOMM_HWVER) \
|
||||
--hw-id $(SERCOMM_HWID) \
|
||||
--sw-version $(SERCOMM_SWVER) \
|
||||
--pid-file $@.fhdr
|
||||
printf $$(stat -c%s $(IMAGE_KERNEL)) | \
|
||||
dd seek=$$((0x70)) of=$@.fhdr bs=1 conv=notrunc 2>/dev/null
|
||||
printf $$(($$(stat -c%s $@)-$$(stat -c%s $(IMAGE_KERNEL))-$$((0x200)))) | \
|
||||
dd seek=$$((0x80)) of=$@.fhdr bs=1 conv=notrunc 2>/dev/null
|
||||
dd bs=$$((0x200)) skip=1 if=$@ conv=notrunc 2>/dev/null | \
|
||||
$(MKHASH) md5 | awk '{print $$1}' | tr -d '\n' | \
|
||||
dd seek=$$((0x1e0)) of=$@.fhdr bs=1 conv=notrunc 2>/dev/null
|
||||
dd if=$@ >> $@.fhdr 2>/dev/null
|
||||
mv $@.fhdr $@
|
||||
endef
|
||||
|
||||
define Build/sercomm-kernel
|
||||
$(TOPDIR)/scripts/sercomm-kernel-header.py \
|
||||
--kernel-image $@ \
|
||||
@@ -26,6 +44,22 @@ define Build/sercomm-kernel
|
||||
mv $@.hdr $@
|
||||
endef
|
||||
|
||||
define Build/sercomm-kernel-factory
|
||||
$(TOPDIR)/scripts/sercomm-kernel-header.py \
|
||||
--kernel-image $@ \
|
||||
--kernel-offset $(SERCOMM_KERNEL_OFFSET) \
|
||||
--rootfs-offset $(SERCOMM_ROOTFS_OFFSET) \
|
||||
--output-header $@.khdr1
|
||||
$(TOPDIR)/scripts/sercomm-kernel-header.py \
|
||||
--kernel-image $@ \
|
||||
--kernel-offset $(SERCOMM_KERNEL2_OFFSET) \
|
||||
--rootfs-offset $(SERCOMM_ROOTFS2_OFFSET) \
|
||||
--output-header $@.khdr2
|
||||
cat $@.khdr1 $@.khdr2 > $@.khdr
|
||||
dd if=$@ >> $@.khdr 2>/dev/null
|
||||
mv $@.khdr $@
|
||||
endef
|
||||
|
||||
define Build/sercomm-part-tag
|
||||
$(call Build/sercomm-part-tag-common,$(word 1,$(1)) $@)
|
||||
endef
|
||||
@@ -64,24 +98,37 @@ define Build/sercomm-prepend-tagged-kernel
|
||||
mv $(IMAGE_KERNEL).tagged $@
|
||||
endef
|
||||
|
||||
define Device/sercomm_dxx
|
||||
$(Device/dsa-migration)
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
KERNEL_SIZE := 6144k
|
||||
UBINIZE_OPTS := -E 5
|
||||
define Device/sercomm
|
||||
$(Device/nand)
|
||||
LOADER_TYPE := bin
|
||||
KERNEL_SIZE := 6144k
|
||||
KERNEL_LOADADDR := 0x81001000
|
||||
LZMA_TEXT_START := 0x82800000
|
||||
SERCOMM_KERNEL_OFFSET := 0x400100
|
||||
SERCOMM_ROOTFS_OFFSET := 0x1000000
|
||||
IMAGES += factory.img
|
||||
endef
|
||||
|
||||
define Device/sercomm_cxx
|
||||
$(Device/sercomm)
|
||||
SERCOMM_KERNEL2_OFFSET := 0xa00100
|
||||
SERCOMM_ROOTFS2_OFFSET := 0x3000000
|
||||
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | lzma -a0 | \
|
||||
uImage lzma
|
||||
IMAGE/sysupgrade.bin := append-kernel | sercomm-kernel | \
|
||||
sysupgrade-tar kernel=$$$$@ | append-metadata
|
||||
IMAGE/factory.img := append-kernel | sercomm-kernel-factory | \
|
||||
append-ubi | sercomm-factory-cqr
|
||||
endef
|
||||
|
||||
define Device/sercomm_dxx
|
||||
$(Device/sercomm)
|
||||
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | lzma -a0 | \
|
||||
uImage lzma | sercomm-kernel
|
||||
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | \
|
||||
lzma -a0 | uImage lzma
|
||||
IMAGES += factory.img
|
||||
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
||||
IMAGE/factory.img := append-ubi | check-size | \
|
||||
sercomm-part-tag rootfs | sercomm-prepend-tagged-kernel kernel | \
|
||||
gzip | sercomm-payload | sercomm-crypto
|
||||
SERCOMM_KERNEL_OFFSET := 0x400100
|
||||
SERCOMM_ROOTFS_OFFSET := 0x1000000
|
||||
endef
|
||||
|
||||
@@ -410,6 +410,18 @@ define Device/beeline_smartbox-turbo
|
||||
endef
|
||||
TARGET_DEVICES += beeline_smartbox-turbo
|
||||
|
||||
define Device/beeline_smartbox-turbo-plus
|
||||
$(Device/sercomm_cxx)
|
||||
IMAGE_SIZE := 32768k
|
||||
SERCOMM_HWID := CQR
|
||||
SERCOMM_HWVER := 10000
|
||||
SERCOMM_SWVER := 2010
|
||||
DEVICE_VENDOR := Beeline
|
||||
DEVICE_MODEL := SmartBox TURBO+
|
||||
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615-firmware kmod-usb3
|
||||
endef
|
||||
TARGET_DEVICES += beeline_smartbox-turbo-plus
|
||||
|
||||
define Device/belkin_rt1800
|
||||
$(Device/nand)
|
||||
IMAGE_SIZE := 49152k
|
||||
|
||||
@@ -35,6 +35,7 @@ asus,rt-n56u-b1)
|
||||
beeline,smartbox-flash|\
|
||||
beeline,smartbox-giga|\
|
||||
beeline,smartbox-turbo|\
|
||||
beeline,smartbox-turbo-plus|\
|
||||
etisalat,s3|\
|
||||
rostelecom,rt-sf-1)
|
||||
ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan"
|
||||
|
||||
@@ -9,6 +9,7 @@ boot() {
|
||||
echo -e "bootcount\nbootchanged\n" | /usr/sbin/fw_setenv -s -
|
||||
;;
|
||||
beeline,smartbox-turbo|\
|
||||
beeline,smartbox-turbo-plus|\
|
||||
rostelecom,rt-sf-1)
|
||||
[[ $(hexdump -n 1 -e '/1 "%1d"' -s $((0x20001)) /dev/mtd3) == \
|
||||
$((0xff)) ]] || printf '\xff' | dd of=/dev/mtdblock3 \
|
||||
|
||||
@@ -60,6 +60,7 @@ platform_do_upgrade() {
|
||||
beeline,smartbox-flash|\
|
||||
beeline,smartbox-giga|\
|
||||
beeline,smartbox-turbo|\
|
||||
beeline,smartbox-turbo-plus|\
|
||||
belkin,rt1800|\
|
||||
dlink,dap-x1860-a1|\
|
||||
dlink,dir-1960-a1|\
|
||||
|
||||
2021
toolchain/gcc/patches-11.x/700-RISCV-Inline-subword-atomic-ops.patch
Normal file
2021
toolchain/gcc/patches-11.x/700-RISCV-Inline-subword-atomic-ops.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,36 @@
|
||||
From 203f3060dd363361b172f7295f42bb6bf5ac0b3b Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@suse.de>
|
||||
Date: Sat, 23 Apr 2022 15:48:42 +0200
|
||||
Subject: [PATCH] riscv/linux: Don't add -latomic with -pthread
|
||||
|
||||
Now that we have support for inline subword atomic operations, it is no
|
||||
longer necessary to link against libatomic. This also fixes testsuite
|
||||
failures because the framework does not properly set up the linker flags
|
||||
for finding libatomic.
|
||||
The use of atomic operations is also independent of the use of libpthread.
|
||||
|
||||
gcc/
|
||||
* config/riscv/linux.h (LIB_SPEC): Don't redefine.
|
||||
---
|
||||
gcc/config/riscv/linux.h | 10 ----------
|
||||
1 file changed, 10 deletions(-)
|
||||
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -35,16 +35,6 @@ along with GCC; see the file COPYING3.
|
||||
#undef MUSL_DYNAMIC_LINKER
|
||||
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
|
||||
|
||||
-/* Because RISC-V only has word-sized atomics, it requries libatomic where
|
||||
- others do not. So link libatomic by default, as needed. */
|
||||
-#undef LIB_SPEC
|
||||
-#ifdef LD_AS_NEEDED_OPTION
|
||||
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC \
|
||||
- " %{pthread:" LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION "}"
|
||||
-#else
|
||||
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC " -latomic "
|
||||
-#endif
|
||||
-
|
||||
#define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
|
||||
|
||||
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
|
||||
@@ -114,7 +114,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000
|
||||
; On SVR4 targets, it also controls whether or not to emit a
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -9058,6 +9058,17 @@ This option is only supported for C and
|
||||
@@ -9059,6 +9059,17 @@ This option is only supported for C and
|
||||
@option{-Wall} and by @option{-Wpedantic}, which can be disabled with
|
||||
@option{-Wno-pointer-sign}.
|
||||
|
||||
|
||||
2021
toolchain/gcc/patches-12.x/700-RISCV-Inline-subword-atomic-ops.patch
Normal file
2021
toolchain/gcc/patches-12.x/700-RISCV-Inline-subword-atomic-ops.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,36 @@
|
||||
From 203f3060dd363361b172f7295f42bb6bf5ac0b3b Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@suse.de>
|
||||
Date: Sat, 23 Apr 2022 15:48:42 +0200
|
||||
Subject: [PATCH] riscv/linux: Don't add -latomic with -pthread
|
||||
|
||||
Now that we have support for inline subword atomic operations, it is no
|
||||
longer necessary to link against libatomic. This also fixes testsuite
|
||||
failures because the framework does not properly set up the linker flags
|
||||
for finding libatomic.
|
||||
The use of atomic operations is also independent of the use of libpthread.
|
||||
|
||||
gcc/
|
||||
* config/riscv/linux.h (LIB_SPEC): Don't redefine.
|
||||
---
|
||||
gcc/config/riscv/linux.h | 10 ----------
|
||||
1 file changed, 10 deletions(-)
|
||||
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -35,16 +35,6 @@ along with GCC; see the file COPYING3.
|
||||
#undef MUSL_DYNAMIC_LINKER
|
||||
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
|
||||
|
||||
-/* Because RISC-V only has word-sized atomics, it requries libatomic where
|
||||
- others do not. So link libatomic by default, as needed. */
|
||||
-#undef LIB_SPEC
|
||||
-#ifdef LD_AS_NEEDED_OPTION
|
||||
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC \
|
||||
- " %{pthread:" LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION "}"
|
||||
-#else
|
||||
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC " -latomic "
|
||||
-#endif
|
||||
-
|
||||
#define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
|
||||
|
||||
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
|
||||
@@ -114,7 +114,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000
|
||||
; On SVR4 targets, it also controls whether or not to emit a
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -9596,6 +9596,17 @@ This option is only supported for C and
|
||||
@@ -9597,6 +9597,17 @@ This option is only supported for C and
|
||||
@option{-Wall} and by @option{-Wpedantic}, which can be disabled with
|
||||
@option{-Wno-pointer-sign}.
|
||||
|
||||
|
||||
2021
toolchain/gcc/patches-13.x/700-RISCV-Inline-subword-atomic-ops.patch
Normal file
2021
toolchain/gcc/patches-13.x/700-RISCV-Inline-subword-atomic-ops.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,36 @@
|
||||
From 203f3060dd363361b172f7295f42bb6bf5ac0b3b Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@suse.de>
|
||||
Date: Sat, 23 Apr 2022 15:48:42 +0200
|
||||
Subject: [PATCH] riscv/linux: Don't add -latomic with -pthread
|
||||
|
||||
Now that we have support for inline subword atomic operations, it is no
|
||||
longer necessary to link against libatomic. This also fixes testsuite
|
||||
failures because the framework does not properly set up the linker flags
|
||||
for finding libatomic.
|
||||
The use of atomic operations is also independent of the use of libpthread.
|
||||
|
||||
gcc/
|
||||
* config/riscv/linux.h (LIB_SPEC): Don't redefine.
|
||||
---
|
||||
gcc/config/riscv/linux.h | 10 ----------
|
||||
1 file changed, 10 deletions(-)
|
||||
|
||||
--- a/gcc/config/riscv/linux.h
|
||||
+++ b/gcc/config/riscv/linux.h
|
||||
@@ -35,16 +35,6 @@ along with GCC; see the file COPYING3.
|
||||
#undef MUSL_DYNAMIC_LINKER
|
||||
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-riscv" XLEN_SPEC MUSL_ABI_SUFFIX ".so.1"
|
||||
|
||||
-/* Because RISC-V only has word-sized atomics, it requries libatomic where
|
||||
- others do not. So link libatomic by default, as needed. */
|
||||
-#undef LIB_SPEC
|
||||
-#ifdef LD_AS_NEEDED_OPTION
|
||||
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC \
|
||||
- " %{pthread:" LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION "}"
|
||||
-#else
|
||||
-#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC " -latomic "
|
||||
-#endif
|
||||
-
|
||||
#define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
|
||||
|
||||
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
|
||||
@@ -114,7 +114,7 @@ Date: Tue Jul 31 00:52:27 2007 +0000
|
||||
; On SVR4 targets, it also controls whether or not to emit a
|
||||
--- a/gcc/doc/invoke.texi
|
||||
+++ b/gcc/doc/invoke.texi
|
||||
@@ -10061,6 +10061,17 @@ This option is only supported for C and
|
||||
@@ -10062,6 +10062,17 @@ This option is only supported for C and
|
||||
@option{-Wall} and by @option{-Wpedantic}, which can be disabled with
|
||||
@option{-Wno-pointer-sign}.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user