Porting guide ar71xx to ath79?

From quickly glancing over your devicetree it seems like there is an error with the ethernet switch.
The old ar71xx setup logic has it this way (when translated to DTS):

&mdio0 {
       status = "okay";

       phy-mask = <0>;
                               
       phy0: ethernet-phy@0 {
               reg = <0>;
               phy-mode = "sgmii";
       };
};
                               
                               
&eth0 {
       status = "okay";
                       
       mtd-mac-address = <&eeprom 0x0>;
       phy-handle = <&phy0>;
       phy-mode = "sgmii";
};

(notice the <0> instead of the <4>)
However im not sure if this needs a switch node to function correctly.

it can be 0 or 4, try the initramfs image and see

Will try when im home from uni will take some time.
Thanks though!

Mach file says its 0.
Also QCA8334 needs configuration

yes, I saw some 8237 setup in match file, I don't know how to read the values, I'll correct the phy

Hm,there is gotta be a way to read the registers directly from the switch like I did.

@MartB will have access to the device and maybe he can try the utility

Well,I am trying to think of a way to read them from OpenWrt since ar71xx already has them set.
The utility I used is some UBNT home cooked that was left in the firmware.

Ethtool offers to dump registers but I dont think it dumps them all

I remember that i requested GPL sources from UBNT and they never provided.
I just did it again and if they dont honor it i will forward that to linux / u-boot maybe they finally take action then.

If you provide me some instructions i can try anything you want tonight.

Having the same issue with the Toughswitch.
At first they were like we will get it ASAP and then simply stopped responding.

And they are just getting worse and worse

If i should include a build feel free to post in this thread.
Greets

3 Likes

They redirected me to their compliance team lets see maybe we get something out of it.

@lucize i will compile this and test asap.

Weird then that they are simply ignoring my request

@lucize and @MartB Are you try to get the right values for "qca,ar8327-initvals" for Ubiquiti UniFi-AC-PRO?

I think it the mdio0 node should be the following according to the mach file:

&mdio0 {
	status = "okay";

	phy-mask = <0>;
	phy0: ethernet-phy@0 {
		reg = <0>;
		phy-mode = "sgmii";

		qca,ar8327-initvals = <
		    0x04 0x00080080 /* PORT0 PAD MODE CTRL */
		    0x7c 0x0000007e /* PORT0_STATUS */
		>;
	};
};

You clould calculate the first value for PORT0_PAD from ar8327.c#L65

And the second value for PORT0_STATUS from ar8327.c#L154

1 Like

once i figure out which of the unpopulated 4 pin thingies is u-boot i will give everything a try^^

https://wiki.openwrt.org/toh/ubiquiti/unifiac#serial_console

for me it was the upper ones (J1), gnd in the right

image

i saw that it doesnt look the same on the pro, it is j1 though!
now i only need to setup tftp properly.

I never change the uboot setings, I just try without anything, and then rename the image and add ip address to tftp server

Hit any key to stop autoboot:  0
ath> tft
Trying eth0
dup 1 speed 100
*** Warning: no boot file name; using '1401A8C0.img'
Using eth0 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.20
Filename '1401A8C0.img'.

[...]

ath> bootm

Boots fine, no network though!

swconfig list is empty.