mediatek: remove custom layout for Qihoo 360T7

Since the mainline implementation has been accepted by upstream,
it doesn't make sense to keep these hacks. People are also confused
with these "custom layouts".

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen
2024-01-06 14:26:13 +08:00
parent 8593c213b0
commit af5c80ecd1
5 changed files with 1 additions and 290 deletions

View File

@@ -100,8 +100,7 @@ jdcloud,re-cp-03)
ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
;;
livinet,zr-3020|\
livinet,zr-3020-ubootmod|\
qihoo,360t7-ubootmod)
livinet,zr-3020-ubootmod)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" "1"
;;
mercusys,mr90x-v1|\

View File

@@ -1,258 +0,0 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "mt7981.dtsi"
/ {
model = "Qihoo 360T7 (custom U-Boot layout)";
compatible = "qihoo,360t7-ubootmod", "mediatek,mt7981";
aliases {
led-boot = &red_led;
led-failsafe = &red_led;
led-running = &green_led;
led-upgrade = &green_led;
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
memory {
reg = <0 0x40000000 0 0x10000000>;
};
gpio-keys {
compatible = "gpio-keys";
button-reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
};
button-wps {
label = "wps";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
};
};
gpio-leds {
compatible = "gpio-leds";
red_led: led-0 {
label = "red:system";
gpios = <&pio 3 GPIO_ACTIVE_LOW>;
};
green_led: led-1 {
label = "green:system";
gpios = <&pio 7 GPIO_ACTIVE_LOW>;
};
};
};
&eth {
pinctrl-names = "default";
pinctrl-0 = <&mdio_pins>;
status = "okay";
gmac0: mac@0 {
compatible = "mediatek,eth-mac";
reg = <0>;
phy-mode = "2500base-x";
nvmem-cells = <&macaddr_factory_14 0>;
nvmem-cell-names = "mac-address";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
};
&mdio_bus {
switch: switch@1f {
compatible = "mediatek,mt7531";
reg = <31>;
reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&pio>;
interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
};
};
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_flash_pins>;
status = "okay";
spi_nand: flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <52000000>;
spi-cal-enable;
spi-cal-mode = "read-data";
spi-cal-datalen = <7>;
spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
spi-cal-addrlen = <5>;
spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
mediatek,nmbm;
mediatek,bmt-max-ratio = <1>;
mediatek,bmt-max-reserved-blocks = <64>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "BL2";
reg = <0x00000 0x100000>;
};
partition@100000 {
label = "u-boot-env";
reg = <0x100000 0x80000>;
};
factory: partition@180000 {
label = "Factory";
reg = <0x180000 0x200000>;
};
partition@380000 {
label = "FIP";
reg = <0x380000 0x200000>;
};
partition@580000 {
label = "ubi";
reg = <0x580000 0x6c00000>;
};
partition@7180000 {
label = "stock-config";
reg = <0x7180000 0x100000>;
read-only;
};
partition@7280000 {
label = "stock-factory";
reg = <0x7280000 0x80000>;
read-only;
compatible = "nvmem-cells";
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_factory_14: macaddr@14 {
compatible = "mac-base";
reg = <0x14 0x11>;
#nvmem-cell-cells = <1>;
};
};
};
partition@7300000 {
label = "stock-log";
reg = <0x7300000 0x400000>;
read-only;
};
};
};
};
&switch {
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
label = "lan1";
};
port@1 {
reg = <1>;
label = "lan2";
};
port@2 {
reg = <2>;
label = "lan3";
};
port@3 {
reg = <3>;
label = "wan";
nvmem-cells = <&macaddr_factory_14 1>;
nvmem-cell-names = "mac-address";
};
port@6 {
reg = <6>;
ethernet = <&gmac0>;
phy-mode = "2500base-x";
fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
};
};
&pio {
spi0_flash_pins: spi0-pins {
mux {
function = "spi";
groups = "spi0", "spi0_wp_hold";
};
conf-pu {
pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
drive-strength = <8>;
bias-pull-up = <103>;
};
conf-pd {
pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
drive-strength = <8>;
bias-pull-down = <103>;
};
};
};
&uart0 {
status = "okay";
};
&watchdog {
status = "okay";
};
&wifi {
status = "okay";
mediatek,mtd-eeprom = <&factory 0x0>;
};

View File

@@ -32,7 +32,6 @@ mediatek_setup_interfaces()
livinet,zr-3020|\
livinet,zr-3020-ubootmod|\
qihoo,360t7|\
qihoo,360t7-ubootmod|\
routerich,ax3000)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
;;

View File

@@ -125,11 +125,6 @@ case "$board" in
[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
;;
qihoo,360t7-ubootmod)
addr=$(cat /sys/class/net/eth0/address)
[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
;;
smartrg,sdg-8612|\
smartrg,sdg-8614|\
smartrg,sdg-8622|\

View File

@@ -856,7 +856,6 @@ TARGET_DEVICES += netgear_wax220
define Device/qihoo_360t7
DEVICE_VENDOR := Qihoo
DEVICE_MODEL := 360T7
DEVICE_VARIANT := (OpenWrt U-Boot layout)
DEVICE_DTS := mt7981b-qihoo-360t7
DEVICE_DTS_DIR := ../dts
UBINIZE_OPTS := -E 5
@@ -878,29 +877,6 @@ define Device/qihoo_360t7
endef
TARGET_DEVICES += qihoo_360t7
define Device/qihoo_360t7-ubootmod
DEVICE_VENDOR := Qihoo
DEVICE_MODEL := 360T7
DEVICE_VARIANT := (custom U-Boot layout)
DEVICE_DTS := mt7981b-qihoo-360t7-ubootmod
DEVICE_DTS_DIR := ../dts
DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware
SUPPORTED_DEVICES += qihoo,360-t7-ubootmod
UBINIZE_OPTS := -E 5
BLOCKSIZE := 128k
PAGESIZE := 2048
IMAGE_SIZE := 65536k
KERNEL_IN_UBI := 1
IMAGES += factory.bin
IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
KERNEL = kernel-bin | lzma | \
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
KERNEL_INITRAMFS = kernel-bin | lzma | \
fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd
endef
TARGET_DEVICES += qihoo_360t7-ubootmod
define Device/routerich_ax3000
DEVICE_VENDOR := Routerich
DEVICE_MODEL := AX3000