From: Daniel Golle Date: Fri, 19 Apr 2024 16:51:51 +0000 (+0100) Subject: mediatek: filogic: add Adtran SmartRG Mount Stuart series X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c71b68acdd63b6e2760defb334bef5d65776ebea;p=openwrt%2Fstaging%2Fansuel.git mediatek: filogic: add Adtran SmartRG Mount Stuart series Common specifications: * Mediatek MT7988A (4x Cortex-A73, up to 1.8 GHz clock speed) * 8 GiB eMMC * 2 GiB DDR4 RAM * 1x 10000M/1000M/100M + 3x 1000M/100M/10M LAN ports * MT7996 Tri-band (2.4G, 5G, 6G) 4T4R 802.11be Wi-Fi * Airoha AG3352 GPS * Renesas DA14531MOD Bluetooth * 2 buttons (Reset, Mesh/WPS) * uC-controlled RGB LED via I2C * 2x LED for each 1G port, 3x LED for each 10G port * USB 3.0 type A port * 3.3V-level 115200 baud UART console via 4-pin Dupont connector exposed at the bottom of the device * USB-C PD power input SDG-8733: 1x 10000M/1000M/100M WAN port SDG-8734: 1x USXGMII/10GBase-R/5GBase-R/2500Base-X/1000Base-X/SGMII SFP+ Both models are also available in versions including 2x FXS POTS interfaces for analog phones. Those interfaces are not supported by OpenWrt. Signed-off-by: Daniel Golle --- diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index c439af12c8..0a7494cd11 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -109,6 +109,11 @@ openembed,som7981) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x80000" ubootenv_add_uci_sys_config "/dev/mtd3" "0x0" "0x100000" "0x100000" ;; +smartrg,sdg-8733|\ +smartrg,sdg-8734) + local envdev=$(find_mmc_part "u-boot-env" "mmcblk0") + ubootenv_add_uci_config "$envdev" "0x0" "0x8000" "0x8000" + ;; ubnt,unifi-6-plus) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000" ;; diff --git a/target/linux/mediatek/dts/mt7988a-smartrg-SDG-8733.dts b/target/linux/mediatek/dts/mt7988a-smartrg-SDG-8733.dts new file mode 100644 index 0000000000..c8c58271a3 --- /dev/null +++ b/target/linux/mediatek/dts/mt7988a-smartrg-SDG-8733.dts @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2023 SmartRG Inc. + * Author: Chad Monroe + */ + +#include "mt7988a-smartrg-mt-stuart.dtsi" + +/ { + model = "SmartRG SDG-8733"; + compatible = "smartrg,sdg-8733", "mediatek,mt7988a"; +}; + +&gmac1 { + phy-connection-type = "usxgmii"; + phy = <&phy0>; +}; diff --git a/target/linux/mediatek/dts/mt7988a-smartrg-SDG-8734.dts b/target/linux/mediatek/dts/mt7988a-smartrg-SDG-8734.dts new file mode 100644 index 0000000000..6eeb4993f5 --- /dev/null +++ b/target/linux/mediatek/dts/mt7988a-smartrg-SDG-8734.dts @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2023 SmartRG Inc. + * Author: Chad Monroe + */ + +#include "mt7988a-smartrg-mt-stuart.dtsi" + +/ { + model = "SmartRG SDG-8734"; + compatible = "smartrg,sdg-8734", "mediatek,mt7988a"; + + gpio-leds { + compatible = "gpio-leds"; + + sfp_green { + color = ; + function = "sfp"; + gpios = <&pio 69 GPIO_ACTIVE_HIGH>; + }; + + sfp_red { + color = ; + function = "sfp"; + gpios = <&pio 70 GPIO_ACTIVE_HIGH>; + }; + }; + + i2c_sfp1: i2c-gpio-0 { + pinctrl-names = "default"; + pinctrl-0 = <&sfp_i2c_pins>; + + compatible = "i2c-gpio"; + sda-gpios = <&pio 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&pio 22 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; + + sfp1: sfp1 { + compatible = "sff,sfp"; + i2c-bus = <&i2c_sfp1>; + los-gpios = <&pio 32 GPIO_ACTIVE_HIGH>; + mod-def0-gpios = <&pio 35 GPIO_ACTIVE_LOW>; + rate-select0-gpios = <&pio 34 GPIO_ACTIVE_HIGH>; + rate-select1-gpios = <&pio 33 GPIO_ACTIVE_HIGH>; + tx-disable-gpios = <&pio 36 GPIO_ACTIVE_HIGH>; + tx-fault-gpios = <&pio 37 GPIO_ACTIVE_HIGH>; + maximum-power-milliwatt = <4000>; + }; +}; + +&gmac1 { + sfp = <&sfp1>; + managed = "in-band-status"; +}; diff --git a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi new file mode 100644 index 0000000000..2b468f9bb3 --- /dev/null +++ b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi @@ -0,0 +1,684 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2023 SmartRG Inc. + * Author: Chad Monroe + */ + +/dts-v1/; +#include "mt7988a.dtsi" +#include +#include +#include +#include +#include + +/ { + aliases { + serial0 = &uart0; + ethernet0 = &gmac0; + ethernet1 = &gmac1; + led-boot = &led_sys_green; + led-failsafe = &led_sys_blue; + led-running = &led_sys_white; + led-upgrade = &led_sys_red; + }; + + chosen { + stdout-path = &uart0; + bootargs = "console=ttyS0,115200n1 loglevel=8 pci=pcie_bus_perf root=PARTLABEL=rootfs"; + }; + + memory { + reg = <0x0 0x40000000 0x0 0x40000000>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + /delete-node/ramoops@42ff0000; + + bootdata@45000000 { + no-map; + reg = <0x0 0x45000000 0x0 0x00001000>; + }; + + ramoops_reserved: ramoops@45001000 { + no-map; + compatible = "ramoops"; + reg = <0x0 0x45001000 0x0 0x00140000>; + ftrace-size = <0x20000>; + record-size = <0x20000>; + console-size = <0x20000>; + pmsg-size = <0x80000>; + }; + }; + + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_3p3v: regulator-3p3v { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&button_pins>; + + factory { + label = "reset"; + linux,code = ; + gpios = <&pio 13 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "sync"; + linux,code = ; + gpios = <&pio 14 GPIO_ACTIVE_LOW>; + }; + }; + + gpio-export { + compatible = "gpio-export"; + + bluetooth_reset { + gpio-export,name = "bt_reset"; + gpio-export,direction_may_change; + gpios = <&pio 20 GPIO_ACTIVE_HIGH>; + }; + + bluetooth_txrx_ctl { + gpio-export,name = "bt_txrx_ctl"; + gpio-export,direction_may_change; + gpios = <&pio 74 GPIO_ACTIVE_HIGH>; + }; + + gps_enable { + gpio-export,name = "gps_enable"; + gpio-export,output = <1>; + gpios = <&pio 9 GPIO_ACTIVE_LOW>; + }; + + slic_interrupt { + gpio-export,name = "slic_interrupt"; + gpio-export,direction_may_change; + gpios = <&pio 54 GPIO_ACTIVE_HIGH>; + }; + + slic_reset { + gpio-export,name = "slic_reset"; + gpio-export,output = <0>; + gpios = <&pio 72 GPIO_ACTIVE_HIGH>; + }; + + usb_enable { + gpio-export,name = "usb_enable"; + gpio-export,output = <1>; + gpios = <&pio 63 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&cpu0 { + proc-supply = <&rt5190_buck3>; +}; + +&cpu1 { + proc-supply = <&rt5190_buck3>; +}; + +&cpu2 { + proc-supply = <&rt5190_buck3>; +}; + +&cpu3 { + proc-supply = <&rt5190_buck3>; +}; + +&cci { + proc-supply = <&rt5190_buck3>; +}; + +&cpu_thermal { + /delete-node/cooling-maps; + /delete-node/trips; + + trips { + cpu_trip_crit: crit { + temperature = <125000>; + hysteresis = <2000>; + type = "critical"; + }; + + cpu_trip_hot: hot { + temperature = <120000>; + hysteresis = <2000>; + type = "hot"; + }; + + cpu_trip_active_high: active-high { + temperature = <110000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_trip_active_med: active-med { + temperature = <80000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_trip_active_low: active-low { + temperature = <60000>; + hysteresis = <2000>; + type = "active"; + }; + + cpu_trip_active_silent: active-silent { + temperature = <40000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + cpu-active-high { + /* active: set fan to cooling level 3 */ + cooling-device = <&fan 3 3>; + trip = <&cpu_trip_active_high>; + }; + + cpu-active-med { + /* active: set fan to cooling level 2 */ + cooling-device = <&fan 2 2>; + trip = <&cpu_trip_active_med>; + }; + + cpu-active-low { + /* active: set fan to cooling level 1 */ + cooling-device = <&fan 1 1>; + trip = <&cpu_trip_active_low>; + }; + + cpu-active-silent { + /* active: set fan to cooling level 0 */ + cooling-device = <&fan 0 0>; + trip = <&cpu_trip_active_silent>; + }; + }; +}; + +ð { + pinctrl-0 = <&mdio0_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&fan { + pwms = <&pwm 0 40000 0>; + + /** + * set fan speed + * + * 0 = off + * 61 = 24% duty cycle + * 77 = 30% duty cycle + * 102 = 40% duty cycle + * 128 - 50% duty cycle + * 255 = 100% duty cycle + */ + cooling-levels = <61 77 102 128>; + + interrupt-parent = <&pio>; + interrupts = <21 IRQ_TYPE_EDGE_FALLING>; + pulses-per-revolution = <2>; + + status = "okay"; +}; + +&gmac0 { + status = "okay"; +}; + +&gmac1 { + label = "wan"; + status = "okay"; + phy-mode = "usxgmii"; +}; + +&gmac2 { + label = "lan1"; + status = "okay"; + phy-mode = "usxgmii"; + phy-connection-type = "usxgmii"; + phy = <&phy8>; +}; + +&gsw_phy0 { + status = "disabled"; +}; + +&gsw_phy1 { + pinctrl-names = "gbe-led"; + pinctrl-0 = <&gbe1_led0_pins>, <&gbe1_led1_pins>; +}; + +&gsw_phy1_led0 { + status = "okay"; + color = ; +}; + +&gsw_phy1_led1 { + status = "okay"; + color = ; +}; + +&gsw_phy2 { + pinctrl-names = "gbe-led"; + pinctrl-0 = <&gbe2_led0_pins>, <&gbe2_led1_pins>; +}; + +&gsw_phy2_led0 { + status = "okay"; + color = ; +}; + +&gsw_phy2_led1 { + status = "okay"; + color = ; +}; + +&gsw_phy3 { + pinctrl-names = "gbe-led"; + pinctrl-0 = <&gbe3_led0_pins>, <&gbe3_led1_pins>; +}; + +&gsw_phy3_led0 { + status = "okay"; + color = ; +}; + +&gsw_phy3_led1 { + status = "okay"; + color = ; +}; + +&i2c0 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + status = "okay"; + + rt5190a_64: rt5190a@64 { + compatible = "richtek,rt5190a"; + reg = <0x64>; + /*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/ + vin2-supply = <&rt5190_buck1>; + vin3-supply = <&rt5190_buck1>; + vin4-supply = <&rt5190_buck1>; + + regulators { + rt5190_buck1: buck1 { + regulator-name = "rt5190a-buck1"; + regulator-min-microvolt = <5090000>; + regulator-max-microvolt = <5090000>; + regulator-allowed-modes = + ; + regulator-boot-on; + regulator-always-on; + }; + buck2 { + regulator-name = "vcore"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1400000>; + regulator-boot-on; + regulator-always-on; + }; + rt5190_buck3: buck3 { + regulator-name = "vproc"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1400000>; + regulator-boot-on; + }; + buck4 { + regulator-name = "rt5190a-buck4"; + regulator-min-microvolt = <850000>; + regulator-max-microvolt = <850000>; + regulator-allowed-modes = + ; + regulator-boot-on; + regulator-always-on; + }; + ldo { + regulator-name = "rt5190a-ldo"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-boot-on; + regulator-always-on; + }; + }; + }; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + status = "okay"; + + system-leds { + compatible = "srg,sysled"; + reg = <0x30>; + + led_sys_red: system_red { + label = "red"; + reg = <1>; + }; + + led_sys_green: system_green { + label = "green"; + reg = <2>; + }; + + led_sys_blue: system_blue { + label = "blue"; + reg = <3>; + }; + + led_sys_white: system_white { + label = "white"; + reg = <4>; + }; + }; +}; + +&mdio_bus { + phy0: ethernet-phy@0 { + /* AQR113C */ + compatible = "ethernet-phy-ieee802.3-c45"; + reg = <0>; + + reset-gpios = <&pio 62 GPIO_ACTIVE_LOW>; + reset-assert-us = <100000>; + reset-deassert-us = <1000000>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + function = LED_FUNCTION_WAN; + color = ; + }; + + led@1 { + reg = <1>; + function = LED_FUNCTION_WAN; + color = ; + }; + + led@2 { + reg = <2>; + function = LED_FUNCTION_WAN; + color = ; + active-low; + }; + }; + }; + + phy8: ethernet-phy@8 { + /* AQR113C */ + compatible = "ethernet-phy-ieee802.3-c45"; + reg = <8>; + + reset-gpios = <&pio 71 GPIO_ACTIVE_LOW>; + reset-assert-us = <100000>; + reset-deassert-us = <1000000>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + function = LED_FUNCTION_LAN; + color = ; + }; + + led@1 { + reg = <1>; + function = LED_FUNCTION_LAN; + color = ; + }; + + led@2 { + reg = <2>; + function = LED_FUNCTION_LAN; + color = ; + active-low; + }; + }; + }; +}; + +&mmc0 { + pinctrl-names = "default", "state_uhs"; + pinctrl-0 = <&mmc0_pins_emmc_51>; + pinctrl-1 = <&mmc0_pins_emmc_51>; + bus-width = <8>; + max-frequency = <200000000>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + hs400-ds-delay = <0x12814>; + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_1p8v>; + non-removable; + no-sd; + no-sdio; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + card@0 { + #address-cells = <0>; + #size-cells = <0>; + compatible = "mmc-card"; + reg = <0>; + + block { + compatible = "block-device"; + + partitions { + block-partition-factory { + partname = "factory"; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x1e00>; + }; + }; + }; + }; + }; + }; +}; + +&pcie0 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie0_1_pins>; + reset-gpios = <&pio 7 GPIO_ACTIVE_LOW>; + status = "okay"; + + pcie@0,0 { + reg = <0x0000 0 0 0 0>; + + mt7996@0,0 { + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + ieee80211-freq-limit = <2400000 2500000>, <5170000 5835000>, <5945000 7125000>; + }; + }; +}; + +&pcie1 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie1_pins>; + status = "okay"; +}; + +&pcie2 { + status = "disabled"; +}; + +&pcie3 { + status = "disabled"; +}; + +&pio { + button_pins: button-pins { + pins = "GPIO_RESET", "GPIO_WPS"; + mediatek,pull-down-adv = <0>; /* bias-disable */ + }; + + pcie0_1_pins: pcie0-pins-g1 { + mux { + function = "pcie"; + groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0"; + }; + }; + + pwm_pins: pwm-pins { + mux { + function = "pwm"; + groups = "pwm0", "pwm1"; + }; + }; + + sfp_i2c_pins: sfp-i2c-pins { + conf-scl { + pins = "LED_A"; + drive-strength = <8>; + mediatek,pull-up-adv = <1>; + }; + conf-sda { + pins = "LED_E"; + drive-strength = <8>; + mediatek,pull-up-adv = <0>; + }; + }; + + uart1_pins: uart1-pins { + mux { + function = "uart"; + groups = "uart1_2"; + }; + }; + + uart2_pins: uart2-pins { + mux { + function = "uart"; + groups = "uart2"; + }; + }; +}; + +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm_pins>; + status = "okay"; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_flash_pins>; + status = "disabled"; + + spi_nand: spi_nand@0 { + compatible = "spi-nand"; + reg = <0>; + spi-max-frequency = <52000000>; + spi-tx-buswidth = <4>; + spi-rx-buswidth = <4>; + }; + +}; + +&ssusb0 { + status = "okay"; +}; + +&ssusb1 { + status = "okay"; +}; + +&switch { + status = "okay"; + + ports { + port@0 { + status = "disabled"; + }; + + port@1 { + label = "lan2"; + }; + + port@2 { + label = "lan3"; + }; + + port@3 { + label = "lan4"; + }; + }; +}; + +&tphy { + status = "okay"; +}; + +&uart0 { + status = "okay"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + status = "okay"; + + /* Airoha AG3352 GPS */ +}; + +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pins>; + status = "okay"; + + /* DA14531MOD Bluetooth */ +}; + +&watchdog { + status = "okay"; +}; + +&xphy { + status = "okay"; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index ec239cb0cf..2b439f7320 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -72,6 +72,21 @@ routerich,ax3000) ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" "link tx rx" ucidef_set_led_netdev "wan-off" "wan-off" "red:wan" "wan" "link" ;; +smartrg,sdg-8733|\ +smartrg,sdg-8734) + ucidef_set_led_netdev "lan-1-green" "LAN1" "mdio-bus:08:green:lan" "lan1" "link_2500 link_5000" + ucidef_set_led_netdev "lan-1-orange" "LAN1" "mdio-bus:08:orange:lan" "lan1" "link_100 link_1000" + ucidef_set_led_netdev "lan-1-white" "LAN1" "mdio-bus:08:white:lan" "lan1" "link_10000" + ucidef_set_led_netdev "lan-2-green" "LAN2" "mt7530-0:01:green:lan" "lan2" "link_1000" + ucidef_set_led_netdev "lan-2-amber" "LAN2" "mt7530-0:01:amber:lan" "lan2" "link_100 link_10" + ucidef_set_led_netdev "lan-3-green" "LAN3" "mt7530-0:02:green:lan" "lan3" "link_1000" + ucidef_set_led_netdev "lan-3-amber" "LAN3" "mt7530-0:02:amber:lan" "lan3" "link_100 link_10" + ucidef_set_led_netdev "lan-4-green" "LAN4" "mt7530-0:03:green:lan" "lan4" "link_1000" + ucidef_set_led_netdev "lan-4-amber" "LAN4" "mt7530-0:03:amber:lan" "lan4" "link_100 link_10" + ucidef_set_led_netdev "wan-green" "WAN" "mdio-bus:00:green:wan" "wan" "link_2500 link_5000" + ucidef_set_led_netdev "wan-orange" "WAN" "mdio-bus:00:orange:wan" "wan" "link_100 link_1000" + ucidef_set_led_netdev "wan-white" "WAN" "mdio-bus:00:white:wan" "wan" "link_10000" + ;; xiaomi,mi-router-wr30u-stock|\ xiaomi,mi-router-wr30u-ubootmod) ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" "link tx rx" diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index fc4bc07b2f..3e3d30cc23 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -166,7 +166,9 @@ mediatek_setup_macs() smartrg,sdg-8612|\ smartrg,sdg-8614|\ smartrg,sdg-8622|\ - smartrg,sdg-8632) + smartrg,sdg-8632|\ + smartrg,sdg-8733|\ + smartrg,sdg-8734) label_mac=$(mmc_get_mac_ascii mfginfo MFG_MAC) wan_mac=$label_mac lan_mac=$(macaddr_add "$label_mac" 1) diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index e0e1e1f1fc..e992eaa604 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -136,6 +136,12 @@ case "$board" in [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "2" ] && macaddr_add $addr 4 > /sys${DEVPATH}/macaddress ;; + smartrg,sdg-8733|\ + smartrg,sdg-8634) + addr=$(mmc_get_mac_ascii mfginfo MFG_MAC) + [ "$PHYNBR" = "0" ] && macaddr_add $addr 4 > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "1" ] && macaddr_add $addr a > /sys${DEVPATH}/macaddress + [ "$PHYNBR" = "2" ] && macaddr_add $addr 6 > /sys${DEVPATH}/macaddress tplink,tl-xdr4288|\ tplink,tl-xdr6086|\ tplink,tl-xdr6088) diff --git a/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh index 37b5be1334..2fe48b0ccf 100644 --- a/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh +++ b/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh @@ -22,7 +22,9 @@ preinit_set_mac_address() { ip link set dev eth1 address "$(macaddr_add $addr 1)" ;; smartrg,sdg-8612|\ - smartrg,sdg-8614) + smartrg,sdg-8614|\ + smartrg,sdg-8733|\ + smartrg,sdg-8734) addr=$(mmc_get_mac_ascii mfginfo MFG_MAC) lan_addr=$(macaddr_add $addr 1) ip link set dev wan address "$addr" diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index 5ccebb2565..4a55ecc0ac 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -68,7 +68,9 @@ platform_do_upgrade() { smartrg,sdg-8612|\ smartrg,sdg-8614|\ smartrg,sdg-8622|\ - smartrg,sdg-8632) + smartrg,sdg-8632|\ + smartrg,sdg-8733|\ + smartrg,sdg-8734) CI_KERNPART="kernel" CI_ROOTPART="rootfs" emmc_do_upgrade "$1" @@ -245,6 +247,8 @@ platform_copy_config() { smartrg,sdg-8614|\ smartrg,sdg-8622|\ smartrg,sdg-8632|\ + smartrg,sdg-8733|\ + smartrg,sdg-8734|\ ubnt,unifi-6-plus) emmc_copy_config ;; diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 35baccf95e..fed550551f 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -140,8 +140,7 @@ TARGET_DEVICES += acer_predator-w6 define Device/adtran_smartrg DEVICE_VENDOR := Adtran DEVICE_DTS_DIR := ../dts - DEVICE_PACKAGES := e2fsprogs f2fsck mkf2fs kmod-hwmon-pwmfan \ - kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware + DEVICE_PACKAGES := e2fsprogs f2fsck mkf2fs kmod-hwmon-pwmfan IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef @@ -149,6 +148,7 @@ define Device/smartrg_sdg-8612 $(call Device/adtran_smartrg) DEVICE_MODEL := SDG-8612 DEVICE_DTS := mt7986a-smartrg-SDG-8612 + DEVICE_PACKAGES += kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware endef TARGET_DEVICES += smartrg_sdg-8612 @@ -156,6 +156,7 @@ define Device/smartrg_sdg-8614 $(call Device/adtran_smartrg) DEVICE_MODEL := SDG-8614 DEVICE_DTS := mt7986a-smartrg-SDG-8614 + DEVICE_PACKAGES += kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware endef TARGET_DEVICES += smartrg_sdg-8614 @@ -163,7 +164,7 @@ define Device/smartrg_sdg-8622 $(call Device/adtran_smartrg) DEVICE_MODEL := SDG-8622 DEVICE_DTS := mt7986a-smartrg-SDG-8622 - DEVICE_PACKAGES += kmod-mt7915e kmod-mt7915-firmware + DEVICE_PACKAGES += kmod-mt7915e kmod-mt7915-firmware kmod-mt7986-firmware mt7986-wo-firmware endef TARGET_DEVICES += smartrg_sdg-8622 @@ -171,10 +172,26 @@ define Device/smartrg_sdg-8632 $(call Device/adtran_smartrg) DEVICE_MODEL := SDG-8632 DEVICE_DTS := mt7986a-smartrg-SDG-8632 - DEVICE_PACKAGES += kmod-mt7915e kmod-mt7915-firmware + DEVICE_PACKAGES += kmod-mt7915e kmod-mt7915-firmware kmod-mt7986-firmware mt7986-wo-firmware endef TARGET_DEVICES += smartrg_sdg-8632 +define Device/smartrg_sdg-8733 +$(call Device/adtran_smartrg) + DEVICE_MODEL := SDG-8733 + DEVICE_DTS := mt7988a-smartrg-SDG-8733 + DEVICE_PACKAGES += kmod-mt7996-firmware kmod-phy-aquantia kmod-usb3 +endef +TARGET_DEVICES += smartrg_sdg-8733 + +define Device/smartrg_sdg-8734 +$(call Device/adtran_smartrg) + DEVICE_MODEL := SDG-8734 + DEVICE_DTS := mt7988a-smartrg-SDG-8734 + DEVICE_PACKAGES += kmod-mt7996-firmware kmod-phy-aquantia kmod-sfp kmod-usb3 +endef +TARGET_DEVICES += smartrg_sdg-8734 + define Device/asus_rt-ax59u DEVICE_VENDOR := ASUS DEVICE_MODEL := RT-AX59U