Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed May 28, 2024
1 parent 7edf61c commit ff322cf
Show file tree
Hide file tree
Showing 7 changed files with 574 additions and 5 deletions.
2 changes: 2 additions & 0 deletions devices/mediatek_filogic/.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-xe3000=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_comfast_cf-e393ax=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_nokia_ea0326gmp=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_openembed_som7981=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_ikuai_q3000=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_openwrt_one=y
CONFIG_PACKAGE_luci-ssl=y # uhttpd服务

CONFIG_PACKAGE_kmod-pcie_mhi=m
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,319 @@
/dts-v1/;
#include "mt7981.dtsi"
/ {
compatible = "ikuai,q3000", "mediatek,mt7981-spim-snand-rfb";
model = "q3000";

aliases {
led-boot = &red_led;
led-failsafe = &red_led;
led-running = &green_led;
led-upgrade = &blue_led;
};

chosen {
bootargs = "console=ttyS0,115200n1 loglevel=8 earlycon=uart8250,mmio32,0x11002000 clk_ignore_unused";
};

gpio-keys {
compatible = "gpio-keys";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&pio 1 GPIO_ACTIVE_LOW>;
};

wps {
label = "wps";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&pio 0 GPIO_ACTIVE_LOW>;
};
};

leds {
compatible = "gpio-leds";

green_led: green {
label = "q3000:green";
gpios = <&pio 11 1>;
};

red_led: red {
label = "q3000:red";
gpios = <&pio 10 1>;
};

blue_led: blue {
label = "q3000:blue";
gpios = <&pio 12 1>;
};
};

nmbm_spim_nand {
compatible = "generic,nmbm";

#address-cells = <1>;
#size-cells = <1>;

lower-mtd-device = <&spi_nand>;
forced-create;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

partition@0 {
label = "BL2";
reg = <0x00000 0x0100000>;
read-only;
};

partition@100000 {
label = "u-boot-env";
reg = <0x0100000 0x0080000>;
};

partition@180000 {
label = "Factory";
reg = <0x180000 0x0200000>;
};

partition@380000 {
label = "FIP";
reg = <0x380000 0x0200000>;
};

partition@580000 {
label = "ubi";
reg = <0x580000 0x4000000>;
};
};
};

sound_wm8960 {
compatible = "mediatek,mt79xx-wm8960-machine";
mediatek,platform = <&afe>;
audio-routing = "Headphone", "HP_L",
"Headphone", "HP_R",
"LINPUT1", "AMIC",
"RINPUT1", "AMIC";
mediatek,audio-codec = <&wm8960>;
status = "disabled";
};

sound_si3218x {
compatible = "mediatek,mt79xx-si3218x-machine";
mediatek,platform = <&afe>;
mediatek,ext-codec = <&proslic_spi>;
status = "disabled";
};
};

&afe {
pinctrl-names = "default";
pinctrl-0 = <&pcm_pins>;
status = "okay";
};

&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c_pins>;
status = "disabled";

wm8960: wm8960@1a {
compatible = "wlf,wm8960";
reg = <0x1a>;
};
};

&uart0 {
status = "okay";
};

&watchdog {
status = "okay";
};

&eth {
status = "okay";

gmac0: mac@0 {
compatible = "mediatek,eth-mac";
reg = <0>;
phy-mode = "2500base-x";

fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};


mdio: mdio-bus {
#address-cells = <1>;
#size-cells = <0>;

switch@0 {
compatible = "mediatek,mt7531";
reg = <31>;
reset-gpios = <&pio 39 0>;

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";
};

port@6 {
reg = <6>;
label = "cpu";
ethernet = <&gmac0>;
phy-mode = "2500base-x";

fixed-link {
speed = <2500>;
full-duplex;
pause;
};
};
};
};
};
};

&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_flash_pins>;
status = "okay";
spi_nand: spi_nand@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <52000000>;
spi-tx-buswidth = <4>;
spi-rx-buswidth = <4>;
};
};

&spi1 {
pinctrl-names = "default";
pinctrl-0 = <&spic_pins>;
status = "okay";

proslic_spi: proslic_spi@0 {
compatible = "silabs,proslic_spi";
reg = <0>;
spi-max-frequency = <10000000>;
spi-cpha = <1>;
spi-cpol = <1>;
channel_count = <1>;
debug_level = <4>; /* 1 = TRC, 2 = DBG, 4 = ERR */
reset_gpio = <&pio 15 0>;
ig,enable-spi = <1>; /* 1: Enable, 0: Disable */
};
};

&pio {
i2c_pins: i2c-pins-g0 {
mux {
function = "i2c";
groups = "i2c0_0";
};
};

pcm_pins: pcm-pins-g0 {
mux {
function = "pcm";
groups = "pcm";
};
};

pwm0_pin: pwm0-pin-g0 {
mux {
function = "pwm";
groups = "pwm0_0";
};
};

pwm1_pin: pwm1-pin-g0 {
mux {
function = "pwm";
groups = "pwm1_0";
};
};

pwm2_pin: pwm2-pin {
mux {
function = "pwm";
groups = "pwm2";
};
};

spi0_flash_pins: spi0-pins {
mux {
function = "spi";
groups = "spi0", "spi0_wp_hold";
};

conf-pu {
pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
drive-strength = <MTK_DRIVE_8mA>;
bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
};

conf-pd {
pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
drive-strength = <MTK_DRIVE_8mA>;
bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
};
};

spic_pins: spi1-pins {
mux {
function = "spi";
groups = "spi1_1";
};
};

uart1_pins: uart1-pins-g1 {
mux {
function = "uart";
groups = "uart1_1";
};
};

uart2_pins: uart2-pins-g1 {
mux {
function = "uart";
groups = "uart2_1";
};
};
};

&xhci {
mediatek,u3p-dis-msk = <0x0>;
phys = <&u2port0 PHY_TYPE_USB2>,
<&u3port0 PHY_TYPE_USB3>;
status = "okay";
};
11 changes: 6 additions & 5 deletions devices/mediatek_filogic/patches/20-ea0326gmp.patch
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,21 @@ diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/
index 62b7a209ed4059..cefe2ac853899c 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -83,11 +83,7 @@ platform_do_upgrade() {
@@ -84,12 +84,8 @@ platform_do_upgrade() {
bananapi,bpi-r3-mini|\
bananapi,bpi-r4|\
bananapi,bpi-r4-poe|\
- jdcloud,re-cp-03|\
- mediatek,mt7988a-rfb|\
jdcloud,re-cp-03|\
- tplink,tl-xdr4288|\
- tplink,tl-xdr6086|\
- tplink,tl-xdr6088|\
- xiaomi,redmi-router-ax6000-ubootmod)
+ jdcloud,re-cp-03)
+ mediatek,mt7988a-rfb)
[ -e /dev/fit0 ] && fitblk /dev/fit0
[ -e /dev/fitrw ] && fitblk /dev/fitrw
bootdev="$(fitblk_get_bootdev)"
@@ -145,7 +141,11 @@ platform_do_upgrade() {
@@ -147,7 +143,11 @@ platform_do_upgrade() {
CI_UBIPART="ubi0"
nand_do_upgrade "$1"
;;
Expand All @@ -116,4 +117,4 @@ index 62b7a209ed4059..cefe2ac853899c 100755
+ xiaomi,redmi-router-ax6000-ubootmod)
[ -e /dev/fit0 ] && fitblk /dev/fit0
[ -e /dev/fitrw ] && fitblk /dev/fitrw
CI_KERNPART="fit"
CI_KERNPART="fit"
Loading

0 comments on commit ff322cf

Please sign in to comment.