Skip to content

mediatek: filogic: add support for ASUS RT-AX57GO - #15055

Open
liushiyou006 wants to merge 1 commit into
openwrt:mainfrom
liushiyou006:main
Open

mediatek: filogic: add support for ASUS RT-AX57GO#15055
liushiyou006 wants to merge 1 commit into
openwrt:mainfrom
liushiyou006:main

Conversation

@liushiyou006

Copy link
Copy Markdown

Hardware

SOC: MediaTek MT7981b
RAM: 512MB DDR4
FLASH: 128MB SPI-NAND (Winbond W25N01KV)
WIFI: Mediatek MT7981b DBDC 802.11ax 2.4/5 GHz
PHY: Airoha en8801sc
UART: 3V3 115200 8N1 (Pinout silkscreened / Do not ocnnect VCC)

Patch Description

1: 798-net-phy-airoha-Add-the-Airoha-en8801sc-PHY-driver.patch
Add airoha en8801sc phy driver for RT-AX57GO
2: 892-v6.1-mtd-spinand-winbond-add-W25N01KV.patch
support winbond W2N01KV for RT-AX7GO
3: 965-net-ethernet-mtk_eth_soc-update-mtk_sgmii_init.patch
sync mtk_sgmii_int from sdk

Installation

Install openwrt image:

  1. Download the OpenWrt initramfs image.
    Copy the image to a TFTP server reachable at 192.168.1.70/24.
    Rename the image to rtax57go.bin.

  2. Connect the PC with TFTP server to the RT-AX57GO.
    Set a static ip on the ethernet interface of your PC. (ip address: 192.168.1.70, subnet mask:255.255.255.0).
    Conect to the serial console, interrupt the autoboot process by pressing '4' when prompted.

  3. Download & Boot the OpenWrt initramfs image.
    $ setenv ipaddr 192.168.1.1
    $ setenv serverip 192.168.1.70
    $ tftpboot 0x46000000 rtax57go.bin
    $ bootm 0x46000000

  4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device using scp and install using sysupgrade.
    $ sysupgrade -n <path-to-sysupgrade.bin>

@castiel652

Copy link
Copy Markdown
Contributor
  1. Those patches should be in separate commits.
  2. Have you sent those patches to upstream Linux already?

Comment thread target/linux/generic/pending-6.1/892-v6.1-mtd-spinand-winbond-add-W25N01KV.patch Outdated
Comment thread target/linux/mediatek/filogic/base-files/etc/board.d/02_network Outdated
@github-actions github-actions Bot added kernel pull request/issue with Linux kernel related changes core packages pull request/issue for core (in-tree) packages target/mediatek pull request/issue for mediatek target labels Apr 3, 2024
@musashino205

Copy link
Copy Markdown
Contributor

mediatek:filogic: add support for ASUS RT-AX57GO

Please insert a space between two prefixes: mediatek: filogic:

@liushiyou006 liushiyou006 changed the title mediatek:filogic: add support for ASUS RT-AX57GO mediatek: filogic: add support for ASUS RT-AX57GO Apr 16, 2024
Hardware
--------
SOC:   MediaTek MT7981b
RAM:   512MB DDR4
FLASH: 128MB SPI-NAND (Winbond W25N01KV)
WIFI:  Mediatek MT7981b DBDC 802.11ax 2.4/5 GHz
PHY:   Airoha en8801sc
UART:  3V3 115200 8N1 (Pinout silkscreened / Do not ocnnect VCC)
--------

Patch Description
-----------------
1: 798-net-phy-airoha-Add-the-Airoha-en8801sc-PHY-driver.patch
   Add airoha en8801sc phy driver for RT-AX57GO
2: 892-v6.1-mtd-spinand-winbond-add-W25N01KV.patch
   support winbond W2N01KV for RT-AX7GO
3: 965-net-ethernet-mtk_eth_soc-update-mtk_sgmii_init.patch
   sync mtk_sgmii_int from sdk

Installation
-----------------------------------------------------------
Install openwrt image:
1. Download the OpenWrt initramfs image. Copy the image to a TFTP server
   reachable at 192.168.1.70/24. Rename the image to rtax57go.bin.

2. Connect the PC with TFTP server to the RT-AX57GO.
   Set a static ip on the ethernet interface of your PC.
     (ip address: 192.168.1.70, subnet mask:255.255.255.0)
  Conect to the serial console,
   interrupt the autoboot process by pressing '4' when prompted.

3. Download & Boot the OpenWrt initramfs image.

   $ setenv ipaddr 192.168.1.1
   $ setenv serverip 192.168.1.70
   $ tftpboot 0x46000000 rtax57go.bin
   $ bootm 0x46000000

4. Wait for OpenWrt to boot. Transfer the sysupgrade image to the device
   using scp and install using sysupgrade.

   $ sysupgrade -n <path-to-sysupgrade.bin>

Signed-off-by: shiyou006 liu <liushiyou006@gmail.com>
@liushiyou006

Copy link
Copy Markdown
Author

mediatek:filogic: add support for ASUS RT-AX57GO

Please insert a space between two prefixes: mediatek: filogic:

This has already been adjusted

@musashino205

Copy link
Copy Markdown
Contributor

Please rebase from the latest main branch and update to use Linux Kernel 6.6.
And, please separate the commit to 3 commits, like the followings:

  • adding airoha PHY package
  • adding support for SPI-NAND flash
  • adding support for RT-AX57GO

@liushiyou006

Copy link
Copy Markdown
Author

Please rebase from the latest main branch and update to use Linux Kernel 6.6. And, please separate the commit to 3 commits, like the followings:

  • adding airoha PHY package
  • adding support for SPI-NAND flash
  • adding support for RT-AX57GO

Hello musashino205: May I ask if one PR contains these three commits or if these three commits are divided into three PRs? Thanks.

@liushiyou006 liushiyou006 reopened this Nov 6, 2024

@abajk abajk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both patches are already in the tree. This PR should be rebased.


memory {
// fpga ddr2: 128MB*2
reg = <0 0x40000000 0 0x10000000>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
reg = <0 0x40000000 0 0x10000000>;
memory@40000000 {
reg = <0 0x40000000 0 0x10000000>;
device_type = "memory";
};


reserved-memory {
/* 24 KiB reserved for PWM[ch0,ch1,ch2] */
pwm_reserved: pwmbuf@4C7FA000 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove pwm reserved-memory and pinctrl. This device doesn't have pwm peripheral.

};

timer {
clock-frequency = <12996791>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This node seems useless.

/* wan */
gmac1: mac@1 {
compatible = "mediatek,eth-mac";
reg = <1>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use tabs to align.

compatible = "ethernet-phy-id03a2.9461";
reg = <0>;
phy-mode = "gmii";
nvmem-cells = <&phy_calibration>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember this phy has already been defined in mt7981b.dtsi.

CI_UBIPART="UBI_DEV"
addr=$(mtd_get_mac_binary_ubi "Factory" 0x4)
wan_mac="${addr}"
lan_mac="${addr}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAC address assignment can be done in device tree.

case "$board" in
asus,rt-ax57go)
CI_UBIPART="UBI_DEV"
caldata_extract_ubi "Factory" 0x0 0x1000

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eeprom assignment can also be done in device tree.

;;
asus,rt-ax57go|\
asus,tuf-ax4200|\
asus,tuf-ax6000)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need it.

DEVICE_DTS := mt7981b-asus_rt-ax57go
DEVICE_DTS_DIR := ../dts
DEVICE_DTS_LOADADDR := 0x47000000
DEVICE_PACKAGES := kmod-usb3 kmod-mt7981-firmware mt7981-wo-firmware kmod-phy-airoha-en8801sc

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we need mt7915e driver package here.

&xhci {
mediatek,u3p-dis-msk = <0x0>;
phys = <&u2port0 PHY_TYPE_USB2>,
<&u3port0 PHY_TYPE_USB3>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mediatek,u3p-dis-msk and phys can be removed.

led_status_green: led-0 {
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
gpios = <&pio 1 GPIO_ACTIVE_LOW>;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite unlikely that reset button and a status LED share a GPIO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core packages pull request/issue for core (in-tree) packages kernel pull request/issue with Linux kernel related changes target/mediatek pull request/issue for mediatek target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants