Draytek Vigor2862 (lantiq xrx330/grx390)

Hey all,

Recently, I got my hands on a "security gateway" router from Draytek. It is the Vigor2862. (note that the name is without any suffixes; this is the model without wireless)
Over the last few weeks, I have been trying to port OpenWrt. I came quite far, but now I've really hit a wall.

The hardware

The router is based on a lantiq xRX330 series SoC. Specs are

  • mips34Kc cpu (2 cores 1 thread or 1 core 2 threads; not sure...)
  • 256 MB ram
  • 128 MB nand
  • 256 KB spi nor flash
  • 5 port gigabit ethernet switch
  • 2 usb 2.0 ports
  • dsl (seems to be supported with closed firmware blobs, like the other lantiq soc's, but I have not looked into this yet.)

The firmware

The stock os is a proprietary RTOS from Draytek called "DrayOS". It is not linux based, and there are no GPL sources for this board.
That may make it seem hard to get this router working, but I think it is doable.

The bootloader is a barely modified u-boot fork called "Drayboot" and can be interrupted by pressing "u" while the router is booting. (a populated uart header is present)
Some commands are disabled, but tftpboot is still working fine!

Mainline support

For those who know the lantiq target a bit, there are some older soc families and then there are ar9 (xrx100 series) and vr9 which corresponds to the xrx200 line of SoC's, which is really well supported.
After these, there seem to be ar10 (xrx300) and grx390 (xrx330). Both targets have had patches make it into mainline linux. The same goes for most of the other hardware on these boards.
While this SoC is not yet supported by openwrt, there have been some efforts in the past on ar10 and grx390:

Where are we now

Based on the device trees in these pull requests, the existing targets, some gpl dumps for other lantiq devices and a dtb extracted from the Draytek firmware, I have managed to put together a device tree that makes it boot openwrt.

What works?

  • core stuff to get it to boot (rcu, memory, cpu, etc.)
  • nand
  • spi
  • gpio/pinctrl
  • buttons
  • leds (can manually drive them, tough haven't configured it in the dts yet; not a priority now)
  • usb (including vbus power control via gpio)

What does not work

  • the switch

Not looked at

  • pci/pcie; my board has no actual pcie slots, so would be hard for me to test on this device
  • dsl; don't have dsl at home, so again I cannot test this

The problem

The first problem was firmware. The switch has 4 GPHY's which run their own proprietary binary blobs. The upstream lantiq dsa driver already handles the loading of these blobs, I just had to add them to the tree (redistributability aside, that comes later, we can always extract them from u-boot and load them from user space or something).

The device tree segment with these gphy's was also present in the pull requests (I only found out after digging through all of the gpl dumps and reverse engineering most of it myself...).
After I added these with the proper reset lines, the leds on the switch would now turn on or off when a cable was plugged in. I think this means that the firmware is loaded properly and the gphys function.

The problem is that the ethernet phys driven by the gphys do not show up on the mdio bus and the dsa driver fails to load as it cannot find the phys.

I also don't really know what port numbers I should use, as this indicates "where" the phys are located on the mdio bus (for now I just copied the dts from dwr966). I doubt if this is the problem though, as the phys themselves don't show up on the mdio bus at all...

Any help would be greatly appreciated :slight_smile:

grx390.dtsi

/dts-v1/;

/ {
	#address-cells = <1>;
	#size-cells = <1>;
	compatible = "lantiq,xway", "lantiq,grx390";

	aliases {
		serial0 = &asc1;
	};

	chosen {
		stdout-path = "serial0:115200n8";
	};

	// two cores show up regardless of how many we configure here
	cpus {
		#address-cells = <1>;
		#size-cells = <0>;

		cpu@0 {
			compatible = "mips,mips34Kc";
			reg = <0>;
		};

		cpu@1 {
			compatible = "mips,mips34Kc";
			reg = <1>;
		};
	};

	biu@1f800000 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "lantiq,biu", "simple-bus";
		reg = <0x1f800000 0x800000>;
		ranges = <0x00 0x1f800000 0x7fffff>;

		icu0: icu0@80200 {
			/*
			 * merged the two seperate icu nodes into
			 * one and merged all the smaller register maps into
			 * two big ones, 1 for each icu. It is the same way on vr9.
			 */
			#interrupt-cells = <1>;
			interrupt-controller;
			compatible = "lantiq,icu";
			reg = <0x80200 0xc8   /* icu0 */
			       0x80300 0xc8>; /* icu1 */
		};

		watchdog@803f0 {
			compatible = "lantiq,xrx100-wdt", "lantiq,wdt";
			reg = <0x803f0 0x10>;

			regmap = <&rcu0>;
		};
	};

	sram: sram@1f000000 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "lantiq,sram", "simple-bus";
		reg = <0x1f000000 0x800000>;
		ranges = <0x00 0x1f000000 0x7fffff>;

		// these three are core platform devices which the kernel checks for
		// if not present, the kernel panics
		eiu@101000 {
			#interrupt-cells = <1>;
			interrupt-controller;
			compatible = "lantiq,eiu-xway";
			reg = <0x101000 0x1000>;
			interrupt-parent = <&icu0>;
			lantiq,eiu-irqs = <166 135 66 40 41 42>;
		};

		pmu@102000 { 
			compatible = "lantiq,pmu-xway";
			reg = <0x102000 0x1000>;
		};

		cgu@103000 {
			compatible = "lantiq,cgu-xway";
			reg = <0x103000 0x1000>;
			// might have to add lantiq,phy_clk_src later for gphy
		};
		
		dcdc@106a00 { // good
			compatible = "lantiq,dcdc-xrx200";
			reg = <0x106a00 0x200>;
		};

		/* there might be a way to initialize this rcu via the fpi
		 * bus driver; lantiq,rcu property does some initialization
		 *
		 * also note that the lantiq,xrx200-rcu string has no kernel
		 * driver looking for it, effectively this uses the simple-mfd
		 * or syscon driver.
		 */
		rcu0: rcu@203000 {
			compatible = "lantiq,xrx200-rcu", "simple-mfd", "syscon";
			reg = <0x203000 0x1000>;
			ranges = <0x0 0x203000 0x100>;
			big-endian;

			reset0: reset-controller@10 {
				compatible = "lantiq,xrx200-reset";
				reg = <0x10 4>, <0x14 4>;
				reg-names = "reset", "status";

				#reset-cells = <2>;
			};

			reset1: reset-controller@48 {
				compatible = "lantiq,xrx200-reset";
				reg = <0x48 4>, <0x24 4>;
				reg-names = "reset", "status";

				#reset-cells = <2>;
			};

			// xrx300 and xrx200 do the same
			usb_phy0: usb2-phy@18 {
				compatible = "lantiq,xrx200-usb2-phy";
				reg = <0x18 4>, <0x38 4>;
				status = "disabled";

				resets = <&reset1 4 4>, <&reset0 4 4>;
				reset-names = "phy", "ctrl";
				#phy-cells = <0>;
			};

			usb_phy1: usb2-phy@34 {
				compatible = "lantiq,xrx200-usb2-phy";
				reg = <0x34 4>, <0x3c 4>;
				status = "disabled";

				resets = <&reset1 5 4>, <&reset0 4 4>;
				reset-names = "phy", "ctrl";
				#phy-cells = <0>;
			};

			reboot@10 {
				compatible = "syscon-reboot";
				offset = <0x10>;
				mask = <0xe0000000>;
			};
		};
	};

	/* 
	 * may need work? only vr9 uses lantiq,xrx200-fpi, the
	 * others use lantiq,fpi
	 */

	fpi: fpi@10000000 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "lantiq,fpi", "simple-bus";
		ranges = <0x00 0x10000000 0xeefffff>;
		reg = <0x10000000 0xef00000>;

		localbus: localbus@0 {
			compatible = "lantiq,localbus", "simple-bus";
			#address-cells = <2>;
			#size-cells = <1>;
			/*
			 * copied this from ar9/vr9/xrx330/everything else
			 * that seems to have the same.
			 */
			ranges = <0 0 0x00 0x3ffffff   /* addrsel0 ??? */
					 1 0 0x4000000 0x4000010>; /* addrsel1 ??? */
		};

		gptu@e100a00 { // done
			compatible = "lantiq,gptu-xway";
			reg = <0xe100a00 0x100>;
			interrupt-parent = <&icu0>;
			interrupts = <126 127 128 129 130 131>;
		};

		spi: spi@e100800 {
			compatible = "lantiq,xrx200-spi", "lantiq,xrx100-spi";
			reg = <0xe100800 0x100>;
			interrupt-parent = <&icu0>;
			interrupts = <22 23 24>;
			interrupt-names = "spi_rx", "spi_tx", "spi_err";
			#address-cells = <1>;
			#size-cells = <0>;

		//	pinctrl-0 = <&spi_pins>;
		//	pinctrl-names = "default"; 

			status = "disabled";
		};

		gpio: pinmux@e100b10 {
			compatible = "lantiq,xrx200-pinctrl";
			#gpio-cells = <2>;
			gpio-controller;
			reg = <0xe100b10 0xa0>;

			interrupt-parent = <&icu0>;

			exin_pins: exin {
				mux {
					lantiq,groups = "exin3";
					lantiq,function = "exin";
					lantiq,pull = <2>;
				};
			};

			mdio_pins: mdio {
				mux {
					lantiq,groups = "mdio";
					lantiq,function = "mdio";
				};
			};

			nand_pins: nand {
				output_pins { // gpio's 24 13 49
					lantiq,groups = "nand cle", "nand ale", "nand rd";
					lantiq,function = "ebu";
					lantiq,open-drain = <0>;
					lantiq,pull = <0>;
					lantiq,output = <1>;
				};

				input_pins {
					lantiq,groups = "nand rdy"; // gpio48
					lantiq,function = "ebu";
					lantiq,pull = <2>;
				};
			};

			nand_cs1_pins: nand-cs1 {
				mux {
					lantiq,groups = "nand cs1"; // gpio 23
					lantiq,function = "ebu";
					lantiq,open-drain = <0>;
					lantiq,pull = <0>;
					lantiq,output = <1>;
				};
			};

			spi_pins: spi {
				input_pins {
					lantiq,groups = "spi_di"; // gpio 16
					lantiq,function = "spi";
					lantiq,pull = <2>;
				};

				output_pins { // gpio 17 18 15 13
					lantiq,pins = "spi_do", "spi_clk", "spi_cs1"; //, "spi_cs3";
					lantiq,function = "spi";
					lantiq,open-drain = <0>;
					lantiq,pull = <0>;
					lantiq,output = <1>;
				};
			};

			stp_pins: stp {
				mux { // gpio 4 5 6
					lantiq,groups = "stp";
					lantiq,function = "stp";
					lantiq,open-drain = <0>;
					lantiq,pull = <0>;
					lantiq,output = <1>;
				};
			};
		};

		stp: stp@e100bb0 {
			compatible = "lantiq,gpio-stp-xway";
			reg = <0xe100bb0 0x40>;
			#gpio-cells = <2>;
			gpio-controller;

			pinctrl-0 = <&stp_pins>;
			pinctrl-names = "default";

			// look into dsl and values for lantiq,phyX
			lantiq,shadow = <0xffff>;
			lantiq,groups = <0x07>;
			lantiq,phy1 = <0x03>;
			lantiq,phy2 = <0x03>;
			lantiq,phy3 = <0x03>;
			lantiq,phy4 = <0x03>;
		};

		asc1: serial@e100c00 { // done
			compatible = "lantiq,asc";
			reg = <0xe100c00 0x400>;
			interrupt-parent = <&icu0>;
			interrupts = <112 113 114>;
		};

		dma@e104100 { // done
			compatible = "lantiq,dma-xway";
			reg = <0xe104100 0x800>;
		};

		// External Bus Unit; related to nand; not sure if confured right
		ebu0: ebu@6000000 {
			compatible = "lantiq,ebu-xway";
			reg = <0x6000000 0x100 0x6000100 0x100>; // why two, not seen before
			reg-names = "ebunand_reg", "hsnand_reg";
		};

		usb0: usb@e101000 {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "disabled";
			compatible = "lantiq,xrx300-usb";
			reg = <0xe101000 0x1000
						0xe120000 0x3f000>;
			interrupt-parent = <&icu0>;
			interrupts = <62 91>;
			dr_mode = "host";
			phys = <&usb_phy0>;
			phy-names = "usb2-phy";
			// #phy-cells = ?

			// do we need this port node?
			ehci_port1: port@1 {
				reg = <1>;
				#trigger-source-cells = <0>;
			};
		};

		usb1: usb@e106000 {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "disabled";
			compatible = "lantiq,xrx300-usb";
			reg = <0xe106000 0x1000
						0xe1e0000 0x3f000>; // is the second register needed on usb1? also has an interrupt less.
			interrupt-parent = <&icu0>;
			interrupts = <91>;
			dr_mode = "host";
			phys = <&usb_phy1>;
			phy-names = "usb2-phy";

			ehci_port2: port@1 {
				reg = <1>;
				#trigger-source-cells = <0>;
			};
		};

		gswip: switch@e108000 {
			compatible = "lantiq,xrx330-gswip";
			#address-cells = <1>;
			#size-cells = <0>;
			reg = <0xe108000 0x3000>,	/* switch */
						<0xe10b100 0x70>,		/* mdio */
						<0xe10b1d8 0x30>;		/* mii */
			reg-names = "switch", "mdio", "mii";
			dsa,member = <0 0>;

			gswip_ports: ports {
				#address-cells = <1>;
				#size-cells = <0>;

				port@6 {
					reg = <0x6>;
					label = "cpu";
					phy-mode = "internal";
					ethernet = <&eth0>;

					// is this needed for the cpu port?
					fixed-link {
						speed = <1000>;
						full-duplex;
					};
				};
			};

			gswip_mdio: mdio {
				#address-cells = <1>;
				#size-cells = <0>;
				compatible = "latiq,xrx200-mdio";
			};

			gphy-fw {
				compatible = "lantiq,xrx330-gphy-fw", "lantiq,gphy-fw";
				lantiq,rcu = <&rcu0>;
				#address-cells = <1>;
				#size-cells = <0>;

				/*
				 * found out the registers and reset specs
				 * from gpl dump of telekom router
				 * uboot was very readable and switch_api also helped.
				 */
				gphy0: gphy@20 {
					reg = <0x20>;

					resets = <&reset0 31 30>, <&reset1 6 6>;
					reset-names = "gphy", "gphy2";
				};

				gphy1: gphy@58 {
					reg = <0x58>;

					resets = <&reset0 29 28>, <&reset1 7 7>;
					reset-names = "gphy", "gphy2";
				};

				gphy2: gphy@ac {
					reg = <0xac>;

					resets = <&reset0 28 13>, <&reset1 8 8>;
					reset-names = "gphy", "gphy2";
				};

				gphy3: gphy@264 {
					reg = <0x264>;

					resets = <&reset0 10 10>; // do we need a second reset line here?
					reset-names = "gphy";
				};
			};
		};

		eth0: eth@e10b308 { // address is correct (ar10.h)
			compatible = "lantiq,xrx200-net";
			reg = <0xe10b308 0x30>; /* pmac */
			interrupt-parent = <&icu0>;
			interrupts = <73>, <72>;
			interrupt-names = "tx", "rx";
			resets = <&reset0 21 16>, <&reset0 8 8>, <&reset0 3 3>;
			reset-names = "switch", "ppe", "ppe_dsp";
			#adderss-cells = <1>;
			#size-cells = <0>;
			// lantiq,tx-burst-length = ?
			// lantiq,rx-burst-length = ?

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

grx390_draytek_vigor2862.dts

#include "grx390.dtsi"
#include <dt-bindings/mips/lantiq_rcu_gphy.h>
#include <dt-bindings/input/input.h>

/ {
	compatible = "draytek,vigor2862", "lantiq,xway", "lantiq,grx390";
	model = "Draytek Vigor2862";

	chosen {
		bootargs = "console=ttyLTQ0,115200";
	};

	memory@0 {
		device_type = "memory";
		reg = <0x00 0xff00000>;
	};

	usb0_vbus: regulator-usb0-vbus {
		compatible = "regulator-fixed";

		regulator-name = "USB0_VBUS";

		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;

		gpios = <&stp 4 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};

	usb1_vbus: regulator-usb1-vbus {
		compatible = "regulator-fixed";
		regulator-name = "USB1_VBUS";

		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;

		gpios = <&stp 7 GPIO_ACTIVE_HIGH>;
		enable-active-high;
	};
};

&gphy0 {
	lantiq,gphy-mode = <GPHY_MODE_GE>;
};

&gphy1 {
	lantiq,gphy-mode = <GPHY_MODE_GE>;
};

&gphy2 {
	lantiq,gphy-mode = <GPHY_MODE_GE>;
};

&gphy3 {
	lantiq,gphy-mode = <GPHY_MODE_GE>;
};


&gswip {
	pinctrl-0 = <&mdio_pins>;
	pinctrl-names = "default";
};


&gswip_mdio {
	phy1: ethernet-phy@1 {
		reg = <0x01>;
	};

	phy2: ethernet-phy@2 {
		reg = <0x02>;
	};

	phy3: ethernet-phy@3 {
		reg = <0x03>;
	};

	phy4: ethernet-phy@4 {
		reg = <0x04>;
	};
};

/*
 * port 1 2 3 4 6 are internal;
 * 0 can do all types of rgmii in addition to rmii and gmii;
 * 5 can do all types of rgmii in addition to rmii and internal;
 */
&gswip_ports {
	port@1 {
		reg = <1>;
		label = "port1";
		phy-mode = "internal";
		phy-handle = <&phy1>;
	};

	port@2 {
		reg = <2>;
		label = "port2";
		phy-mode = "internal";
		phy-handle = <&phy2>;
	};

	port@3 {
		reg = <3>;
		label = "port3";
		phy-mode = "internal";
		phy-handle = <&phy3>;
	};

	port@4 {
		reg = <4>;
		label = "port4";
		phy-mode = "internal";
		phy-handle = <&phy4>;
	};
};

&localbus {
	// not fully working yet, partitions don't show up
	nand@1 {
		compatible = "lantiq,nand-xway";
		lantiq,cs = <1>;
		bank-width = <2>;
		reg = <1 0x0 0x2000000>;
		#address-cells = <1>;
		#size-cells = <1>;

		pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
		pinctrl-names = "default";

		nand-on-flash-bbt;

		// ecc?

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

			partition@0 {
				label = "uboot";
				reg = <0x00 0x100000>;
				read-only;
			};

			partition@100000 {
				label = "ubootconfigA";
				reg = <0x100000 0x40000>;
				read-only;
			};

			partition@140000 {
				label = "ubootconfigB";
				reg = <0x140000 0x40000>;
				read-only;
			};

			partition@180000 {
				label = "gphyfirmware";
				reg = <0x180000 0x40000>;
				read-only;
			};

			partition@1c0000 {
				label = "system_sw";
				reg = <0x1c0000 0x3200000>;
				read-only;
			};

			partition@33c0000 {
				label = "calibration";
				reg = <0x33c0000 0x100000>;
				read-only;
			};

			partition@34c0000 {
				label = "res";
				reg = <0x34c0000 0xb40000>;
				read-only;
			};
		};
	};
};


&spi {
	status = "okay";

	m25p80@1 { 
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "jedec,spi-nor";
		reg = <1>;
		spi-max-frequency = <1000000>; // 1 MHz

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

			partition@0 {
				reg = <0x00 0x31000>;
				label = "DrayBoot (u-boot)";
				read-only;
			};

			partition@31000 {
				reg = <0x31000 0xf000>;
				label = "res (unknown)";
				read-only;
			};
		};
	};
};

&usb_phy0 {
	status = "okay";
};

&usb_phy1 {
	status = "okay";
};

&usb0 {
	status = "okay";
	vbus-supply = <&usb0_vbus>;
};

&usb1 {
	status = "okay";
	vbus-supply = <&usb1_vbus>;
};

Boot log:

# cu -l ttyAMA0 -s 115200
Connected

ROM VER: 1.0.0
CFG 05

ROM VER: 1.0.0
CFG 05

Starting DDR tuning ...
DDR tuning range is [0xa0000000 - 0xa3ffffff]
SDRAM testing pass ... start booting...



Vigor2862-DrayBoot-v23

CLOCK CPU 600Mhz, RAM 300Mhz
16 Bit RAM, 128 MB
NAND Flash : VID: 0x98, PID: 0xd1 (Toshiba NAND 128MB 3,3V 8-bit)
Bad block table at page 65472 (ver=01)
Bad block table at page 65408 (ver=01)
Clock of internal PHY is 25Mhz
Firmware version of Internal GPHY is: 0x8435


Can not detect XRA1403 !!
Size of SPI Flash is : 256 KB MX25L200 series

Can not detect XRA1403 !!

GRX330 # help
?       - alias for 'help'
base    - print or set address offset
bootm   - boot application image from memory
bootp   - boot image via network using BOOTP/TFTP protocol
chpart  - change active partition
cmp     - memory compare
cp      - memory copy
crc32   - checksum calculation
echo    - echo args to console
go      - start application at address 'addr'
help    - print command description/usage
httpd   - httpd- start http server

loop    - infinite loop on address range
md      - memory display
mm      - memory modify (auto-incrementing address)
mtdparts- define flash/nand partitions
mtest   - simple RAM read/write test
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
sf      - SPI flash sub-system
tftpboot- boot image via network using TFTP protocol
ubi     - ubi commands
upgrade - upgrade - forward/backward copy memory to pre-defined flash location

version - print monitor version
GRX330 # tftpboot /srv/www/try-053.bin
Using ar10 Switch device
TFTP from server 192.168.1.199; our IP address is 192.168.1.1
Filename '/srv/www/try-053.bin'.
Load address: 0x80800000
aoading: *
done
Bytes transferred = 7711205 (75a9e5 hex)
GRX330 # bootm
## Booting kernel from Legacy Image at 80800000 ...
   Image Name:   MIPS OpenWrt Linux-6.6.80
   Created:      2025-03-04  22:18:15 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    7711141 Bytes = 7.4 MB
   Load Address: 80002000
   Entry Point:  80002000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Linux version 6.6.80 (buildbot@6703b5ff65e2) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 13.3.0 unknown) 13.3.0, GNU ld (GNU Binutils) 2.42) #0 SMP Tue Mar  4 22:18:15 2025
[    0.000000] SoC: xRX330 rev 1.1
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019556 (MIPS 34Kc)
[    0.000000] MIPS: machine is Draytek Vigor2862
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Detected 1 available secondary CPU(s)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fefffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fefffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fefffff]
[    0.000000] percpu: Embedded 11 pages/cpu s16320 r8192 d20544 u45056
[    0.000000] Kernel command line: console=ttyLTQ0,115200
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Writing ErrCtl register=0000a080
[    0.000000] Readback ErrCtl register=0000a080
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64706
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 242060K/261120K available (7958K kernel code, 650K rwdata, 2092K rodata, 5476K init, 220K bss, 19060K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] CPU Clock: 600MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns
[    0.000002] sched_clock: 32 bits at 300MHz, resolution 3ns, wraps every 7158278654ns
[    0.007963] Calibrating delay loop... 398.13 BogoMIPS (lpj=1990656)
[    0.074082] pid_max: default: 32768 minimum: 301
[    0.092076] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.099292] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.120720] RCU Tasks Trace: Setting shift to 1 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=2.
[    0.130666] rcu: Hierarchical SRCU implementation.
[    0.135305] rcu:     Max phase no-delay instances is 1000.
[    0.141774] smp: Bringing up secondary CPUs ...
[    0.147685] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.147723] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.147827] CPU1 revision is: 00019556 (MIPS 34Kc)
[    0.200812] Synchronize counters for CPU 1: done.
[    0.225065] smp: Brought up 1 node, 2 CPUs
[    0.236297] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.246065] futex hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.258957] pinctrl core: initialized pinctrl subsystem
[    0.268491] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.279206] dcdc-xrx200 1f106a00.dcdc: Core Voltage : 0 mV
[    0.291837] pinctrl-xway 1e100b10.pinmux: Init done
[    0.306686] dma-xway 1e104100.dma: Init done - hw rev: 8, ports: 5, channels: 24
[    0.330450] gpio-stp-xway 1e100bb0.stp: Init done
[    0.336029] usbcore: registered new interface driver usbfs
[    0.341510] usbcore: registered new interface driver hub
[    0.346819] usbcore: registered new device driver usb
[    0.357071] clocksource: Switched to clocksource MIPS
[    0.378010] NET: Registered PF_INET protocol family
[    0.383043] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.391735] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.400027] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.407827] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.415527] TCP bind hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.422910] TCP: Hash tables configured (established 2048 bind 2048)
[    0.430135] MPTCP token hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.437856] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.444264] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.452590] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.458240] PCI: CLS 0 bytes, default 32
[    0.462324] gptu: totally 6 16-bit timers/counters
[    0.467220] gptu: misc_register on minor 127
[    0.471567] gptu: succeeded to request irq 126
[    0.476054] gptu: succeeded to request irq 127
[    0.480592] gptu: succeeded to request irq 128
[    0.485005] gptu: succeeded to request irq 129
[    0.489685] gptu: succeeded to request irq 130
[    0.494097] gptu: succeeded to request irq 131
[    0.499053] No VPEs reserved for AP/SP, not initialize VPE loader
[    0.499053] Pass maxvpes=<n> argument as kernel argument
[    0.510431] No TCs reserved for AP/SP, not initializing RTLX.
[    0.510431] Pass maxtcs=<n> argument as kernel argument
[    0.546938] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.557560] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.563263] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.228261] 1e100c00.serial: ttyLTQ0 at MMIO 0x1e100c00 (irq = 112, base_baud = 0) is a lantiq,asc
[    1.237255] printk: console [ttyLTQ0] enabled
[    1.237255] printk: console [ttyLTQ0] enabled
[    1.245820] printk: bootconsole [early0] disabled
[    1.245820] printk: bootconsole [early0] disabled
[    1.266045] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xd1
[    1.270947] nand: Toshiba TC58NVG0S3E 1G 3.3V 8-bit
[    1.275785] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.285641] Bad block table found at page 65472, version 0x01
[    1.291054] Bad block table found at page 65408, version 0x01
[    1.306363] spi-lantiq-ssc 1e100800.spi: Lantiq SSC SPI controller (Rev 9, TXFS 8, RXFS 8, DMA 1)
[    1.317474] spi-nor spi0.1: mx25l2005a (256 Kbytes)
[    1.321058] 2 fixed-partitions partitions found on MTD device spi0.1
[    1.327390] Creating 2 MTD partitions on "spi0.1":
[    1.331993] 0x000000000000-0x000000031000 : "DrayBoot (u-boot)"
[    1.340601] 0x000000031000-0x000000040000 : "res (unknown)"
[    2.556941] NET: Registered PF_INET6 protocol family
[    2.570983] Segment Routing with IPv6
[    2.573367] In-situ OAM (IOAM) with IPv6
[    2.577430] NET: Registered PF_PACKET protocol family
[    2.582645] 8021q: 802.1Q VLAN Support v1.8
[    8.907145] gswip 1e108000.switch: configuring for fixed/internal link mode
[    8.912938] gswip 1e108000.switch port1 (uninitialized): failed to connect to PHY: -ENODEV
[    8.920955] gswip 1e108000.switch port1 (uninitialized): error -19 setting up PHY for tree 0, switch 0, port 1
[    8.931148] gswip 1e108000.switch port2 (uninitialized): failed to connect to PHY: -ENODEV
[    8.939079] gswip 1e108000.switch port2 (uninitialized): error -19 setting up PHY for tree 0, switch 0, port 2
[    8.949303] gswip 1e108000.switch port3 (uninitialized): failed to connect to PHY: -ENODEV
[    8.957193] gswip 1e108000.switch port3 (uninitialized): error -19 setting up PHY for tree 0, switch 0, port 3
[    8.967371] gswip 1e108000.switch port4 (uninitialized): failed to connect to PHY: -ENODEV
[    8.975280] gswip 1e108000.switch port4 (uninitialized): error -19 setting up PHY for tree 0, switch 0, port 4
[    8.985962] lantiq,xrx200-net 1e10b308.eth eth0: entered promiscuous mode
[    8.992175] DSA: tree 0 setup
[    8.994894] gswip 1e108000.switch: probed GSWIP version 22 mod 1
[    9.001455] gswip 1e108000.switch: Link is Up - 1Gbps/Full - flow control off
[    9.026217] Freeing unused kernel image (initmem) memory: 5476K
[    9.030935] This architecture does not have kernel memory protection.
[    9.037168] Run /init as init process
[    9.990437] init: Console is alive
[    9.992877] init: - watchdog -
[   10.021665] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[   10.033191] gpio_button_hotplug: loading out-of-tree module taints kernel.
[   10.050106] dwc2 1e101000.usb: supply vusb_d not found, using dummy regulator
[   10.056047] dwc2 1e101000.usb: supply vusb_a not found, using dummy regulator
[   10.165705] dwc2 1e101000.usb: DWC OTG Controller
[   10.169166] dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
[   10.175996] dwc2 1e101000.usb: irq 62, io mem 0x1e101000
[   10.182841] hub 1-0:1.0: USB hub found
[   10.185283] hub 1-0:1.0: 1 port detected
[   10.191260] dwc2 1e106000.usb: supply vusb_d not found, using dummy regulator
[   10.197495] dwc2 1e106000.usb: supply vusb_a not found, using dummy regulator
[   10.307209] dwc2 1e106000.usb: DWC OTG Controller
[   10.310508] dwc2 1e106000.usb: new USB bus registered, assigned bus number 2
[   10.317586] dwc2 1e106000.usb: irq 91, io mem 0x1e106000
[   10.324336] hub 2-0:1.0: USB hub found
[   10.326838] hub 2-0:1.0: 1 port detected
[   10.335822] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[   10.343266] init: - preinit -
[   14.856807] random: crng init done
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   19.629227] procd: - early -
[   19.631055] procd: - watchdog -
[   20.215829] procd: - watchdog -
[   20.219325] procd: - ubus -
[   20.288879] procd: - init -
Please press Enter to activate this console.
[   21.118825] kmodloader: loading kernel modules from /etc/modules.d/*
[   21.133904] IFXOS, Version 1.7.1 (c) Copyright 2009, Lantiq Deutschland GmbH
[   21.145473] NET: Registered PF_ATMPVC protocol family
[   21.149313] NET: Registered PF_ATMSVC protocol family
[   21.319115] usbcore: registered new interface driver ax88179_178a
[   21.326407] usbcore: registered new interface driver cdc_ether
[   21.335805] usbcore: registered new interface driver cdc_ncm
[   21.423050] PPP generic driver version 2.4.2
[   21.429952] NET: Registered PF_PPPOX protocol family
[   21.537579] kmodloader: 2 modules could not be probed
[   21.541560] kmodloader: dependency not loaded drv_mei_cpe
[   21.547088] kmodloader: - drv_dsl_cpe_api - 1
[   21.551231] kmodloader: - drv_mei_cpe - 0
[   23.239705] urngd: v1.0.2 started.



BusyBox v1.37.0 (2025-03-04 22:18:15 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, unknown
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------

 OpenWrt recently switched to the "apk" package manager!

 OPKG Command           APK Equivalent      Description
 ------------------------------------------------------------------
 opkg install <pkg>     apk add <pkg>       Install a package
 opkg remove <pkg>      apk del <pkg>       Remove a package
 opkg upgrade           apk upgrade         Upgrade all packages
 opkg files <pkg>       apk info -L <pkg>   List package contents
 opkg list-installed    apk info            List installed packages
 opkg update            apk update          Update package lists
 opkg search <pkg>      apk search <pkg>    Search for packages
 ------------------------------------------------------------------

For more https://openwrt.org/docs/guide-user/additional-software/opkg-to-apk-cheatsheet

root@OpenWrt:~# ip a
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1508 qdisc fq_codel state DOWN qlen 1000
    link/ether 6a:8e:a6:f8:5d:ee brd ff:ff:ff:ff:ff:ff
root@OpenWrt:~# mdio
fixed-0
root@OpenWrt:~# mdio fixed-0
 DEV      PHY-ID  LINK
root@OpenWrt:~# cat /proc/cpuinfo
system type             : xRX330 rev 1.1
machine                 : Draytek Vigor2862
processor               : 0
cpu model               : MIPS 34Kc V5.6
BogoMIPS                : 398.13
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp mt
Options implemented     : tlb 4kex 4k_cache 32fpr prefetch mcheck ejtag llsc dc_aliases userlocal vint perf_cntr_intr_bit perf mm_full
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VPE                     : 0
VCED exceptions         : not available
VCEI exceptions         : not available

processor               : 1
cpu model               : MIPS 34Kc V5.6
BogoMIPS                : 398.13
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp mt
Options implemented     : tlb 4kex 4k_cache 32fpr prefetch mcheck ejtag llsc dc_aliases userlocal vint perf_cntr_intr_bit perf mm_full
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VPE                     : 1
VCED exceptions         : not available
VCEI exceptions         : not available

root@OpenWrt:~#