Zyxel P-2812HNU-F1 vT .dts file

Please expand the router list for Lantiq -> XRX200 -> "Zyxel P-2812HNU-F1 vT". Original P2812HNUF1.dts is not right for model signed vT (wireless doesn't detect, and only leds for wan and lan 1-4 works). This is the working content of .dts file for model P-2812HNU-F1 vT (model with wireless RT3092L chip on board). LEDE system compiled with .dts below, and router works over week and all seems ok.
Ps. Great work LEDE team, thanks especially for DSL/VDSL driver for Lantiq modells. My VDSL line works perfect with synchro 83.518 Mb/s / 8.567 Mb/s and very stable.
Best Regards

/include/ "P2812HNUFX.dtsi"

/ {
model = "P2812HNUF1 - ZyXEL P-2812HNU-F1";

fpi@10000000 {
    localbus@0 {
        nand-parts@0 {
            compatible = "gen_nand", "lantiq,nand-xway";
            lantiq,cs = <1>;
            bank-width = <2>;
            reg = <0 0x0 0x2000000>;
            #address-cells = <1>;
            #size-cells = <1>;

            partition@0 {
                label = "uboot";
                reg = <0x00000 0x40000>;
            };
            partition@40000 {
                label = "uboot-env";
                reg = <0x40000 0x20000>;
            };
            partition@60000 {
                label = "kernel";
                reg = <0x60000 0x200000>;
            };
            partition@260000 {
                label = "ubi";
                reg = <0x260000 0x7da0000>;
            };
        };
    };
};

ralink_eep {
    compatible = "ralink,eeprom";
    ralink,eeprom = "RT3092.eeprom";
};

};

dts file looks good, however we do not accept patches via the forum. please send a PR via github or the patch via email to the mailing list.

Could please post your line details? how long is it?

Hi,

I'm new to OpenWrt, and thought I should install it on my P-2812HNU-F1 vT which used to be branded with Telenor firmware. I didn't realize then that the vT suffix of the product name meant that it was a different hardware than the P-2812HNU-F1, so now I'm trying to figure out what's needed to get the wireless RT3092 module working.

From the stock firmware I've recovered a file, "RT3092_PCIe_LNA_2T2R_ALC_V1_2.bin" which I presume is the required eeprom to get the wireless module running.

I've also tried to figure out how to add a sub-target for the F1 vT model based on the dts file in this thread. I've been able to build a new firmware image from it and flash my device to it, but I can't get the wireless interface to load.

My dts file looks like this, but I've no idea if that is correct or not:

#include "vr9_zyxel_p-2812hnu-fx.dtsi"

/ {
	compatible = "zyxel,p-2812hnu-f1vt", "zyxel,p-2812hnu-f1", "zyxel,p-2812hnu", "lantiq,xway", "lantiq,vr9";
	model = "ZyXEL P-2812HNU-F1 vT";

	aliases {
		led-usb = &led_usb1;
		led-usb2 = &led_usb2;
	};

	leds {
		led_usb1: usb1 {
			label = "green:usb1";
			gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
		};
		led_usb2: usb2 {
			label = "green:usb2";
			gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
		};
	};
};

&localbus {
	flash@0 {
		compatible = "lantiq,nand-xway";
		lantiq,cs = <1>;
		bank-width = <2>;
		reg = <0 0x0 0x2000000>;

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

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

			partition@0 {
				label = "uboot";
				reg = <0x00000 0x40000>;
			};
			partition@40000 {
				label = "u-boot-env";
				reg = <0x40000 0x20000>;
			};
			partition@60000 {
				label = "kernel";
				reg = <0x60000 0x300000>;
			};
			partition@360000 {
				label = "ubi";
				reg = <0x360000 0x7ca0000>;
			};
		};
	};
};

&pci0 {
	wifi@1814,3092 {
		compatible = "pci1814,3092";
		reg = <0x7000 0 0 0 0>;
		ralink,eeprom = "RT3092.eeprom";
	};
};

When running the system I get the following related to pci in the kernel log:

[    0.220835] PCI host bridge /fpi@10000000/pci@e105400 ranges:
[    0.303693] pci_bus 0000:00: root bus resource [mem 0x18000000-0x19ffffff]
[    0.310601] pci_bus 0000:00: root bus resource [io  0x1ae00000-0x1affffff]
[    0.317555] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.324384] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.334833] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.755718] pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY
[    0.953932] pcie-xrx200 1d900000.pcie: failed to request gpio 500
[    0.958668] pcie-xrx200: probe of 1d900000.pcie failed with error -16

The stock firmware boot log contains the following:

Lantiq PCI host controller driver, version 1.2.0, (c) 2001-2011 Lantiq Deutschland GmbH
Lantiq PCIe Root Complex driver, version 1.6.5, (c) 2001-2011 Lantiq Deutschland GmbH
<< deleted lines >>
pci 0000:00:00.0: PME# supported from D1 D2
pci 0000:00:00.0: PME# disabled
ifx_pcie_rc_class_early_fixup port 0: fixed pcie host bridge to pci-pci bridge
pci 0000:01:00.0: PME# supported from D0 D3hot
pci 0000:01:00.0: PME# disabled
pci 0000:01:00.0: PCI bridge, secondary bus 0000:02
pci 0000:01:00.0:   IO window: disabled
pci 0000:01:00.0:   MEM window: 0x1c000000-0x1c0fffff
pci 0000:01:00.0:   PREFETCH window: disabled
<< deleted lines >>
=== pAd = c0ca7000, size = 617584 ===

<-- RTMPAllocAdapterBlock, Status=0
device_id=3092
device_id=3092
RX DESC a3c5c000  size = 2048
<-- RTMPAllocTxRxRingMemory, Status=0
1. Phy Mode = 9
2. Phy Mode = 9
3. Phy Mode = 9
e[mAntCfgInit: primary/secondary ant 0/1
e[mMCS Set = ff ff 00 00 01
Main bssid = 2a:28:5d:39:79:2c
<==== rt28xx_init, Status=0
0x1300 = 00064320
/proc/driver/wlan_short_cut created
Init RALINK_FP_Handle
device ra0 entered promiscuous mode
br0: port 2(ra0) entering learning state
device ra1 entered promiscuous mode
device ra2 entered promiscuous mode
device ra3 entered promiscuous mode
Remove RALINK_FP_Handle
/proc/driver/wlan_short_cut removed
br0: port 2(ra0) entering disabled state
RX DESC a3c5c000  size = 2048
<-- RTMPAllocTxRxRingMemory, Status=0
1. Phy Mode = 9
2. Phy Mode = 9
3. Phy Mode = 9
e[mAntCfgInit: primary/secondary ant 0/1
e[mMCS Set = ff ff 00 00 01
Main bssid = 2a:28:5d:39:79:2c
<==== rt28xx_init, Status=0
0x1300 = 00064320
/proc/driver/wlan_short_cut created

Does anyone have any suggestions on how to debug this further, or maybe even know how to solve it?

I'm considering if I should try to hack the original firmware backup to give me root access, and then restore that to the device, but I'd rather run OpenWrt if I can get it running.

Hi gramphos,

Welcome to OpenWrt community.

I also replied on other message according Wi-Fi and ZyXEL P-2812HNU-F1.
Maybe you have already fixed the problem, please let us now.
In case you did not ( as no reply yet on other message ):

Do you also have a build .dtsi file?
There should be the same as written in:

Keep your MTD settings !! As the once from didzej is older with too small kernel reservation.

Rename (copy) your RT3092_PCIe_LNA_2T2R_ALC_V1_2.bin file to build-directory:
files/lib/firmware/RT3092.eeprom
Then it is implemented in final build.

Or directly to already running OpenWrt router: /lib/firmware/RT3092.eeprom

After reboot (or restart network & Wi-Fi) this should result in working Wi-Fi or messages in syslog why not.
Install also pciutils in your builds, then on OpenWrt you can check with lspci -vv much more info about Wi-Fi devices.

DG.

1 Like

Hi DG,

I've let this project rest for a few weeks and thoough I should give it another go.

I didn't create a dtsi file, only a dts file. (But I'm inclufing the "vr9_zyxel_p-2812hnu-fx.dtsi" file. There has been some chhanges to the code in openwrt since the original post was written so I have a been trying to put bits and pieces together.

I tried to copy the RT3092 definition from the vr9_zyxel_p-2812hnu-f3.dts, thinking that it was the correct one, given the changes to how the dts files werestructured in the code.

I'll try with exactly the quoted pice of code and see how that goes.

Do you know if it is possible to get a readout of what config options were used to build a particular OpenWrf firmware? There are so manyoptions, and I would like to start with someth9ing that matches the F1 firmware I got runningon the device just now, but built from source to know that I got the building right.

I don't get any output from lspci, and I still think the problem is the PCI-E root not working.

Gramphos,

No, sorry I don't know. I had some communication, years ago also with scapi, after which the F1 was added to the main build. From then on, I use the regular build process to make my own firmware-images, without problems.
What I do know is that you need rt2800-pci-firmware - 20190416-1
And their corresponding kmod files.

Maybe Mafketel or Mijzelf or someone else has more info to help you out.

All I use are these 2 links to build own firmware:
https://openwrt.org/toh/zyxel/p2812hnu-f1

You have to keep in mind that the RT3062.eeprom file is a special file, needed for Wifi and had its mac-address inside. It should be (on router) in folder: /lib/firmware
During build you can place the file in file/lib/firmware then the file will be in your builds.
(Then, the mac address stays the same...)

My lspci (and with -cvv) returns:

# lspci
00:0e.0 Network controller: Ralink corp. RT3062 Wireless 802.11n 2T/2R
#
# lspci -vv
00:0e.0 Network controller: Ralink corp. RT3062 Wireless 802.11n 2T/2R
        Subsystem: Ralink corp. RT3062 Wireless 802.11n 2T/2R
        Device tree node: /sys/firmware/devicetree/base/fpi@10000000/pci@e105400/wifi@1814,3062
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 64 (500ns min, 1000ns max), Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 30
        Region 0: Memory at 18000000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: rt2800pci
lspci: Unable to load libkmod resources: error -12

And the last 'error -12' does not interfere, it just works fine.

DG.

First try to remove leds definitions from dts as they may interfere with pcie definition.
If this doesn't help try adding:

&pcie0 {
	status = "okay";
	gpio-reset = <&gpio 21 GPIO_ACTIVE_HIGH>;
};

or

&pcie0 {
	status = "okay";
	gpio-reset = <&gpio 38 GPIO_ACTIVE_HIGH>;
};

Don't remember correct pcie reset gpio, it's basically like F3 without nor.