<icenowy[m]>
montjoie: P.S. the H6 MAC control register in syscon has a internal/external PHY switch register, which needs to be always set to 0
<icenowy[m]>
kevans91: basically. but Ethernet part changed.
<kevans91>
In what way?
<icenowy[m]>
kevans91: changed to a switch
<kevans91>
I was trying to find dts for this thing to see if we support it easily
<kevans91>
Ohhh, right. One of our freebsd-wifi-build guys was working on this thing
<icenowy[m]>
I think bringing up the basical parts are easy
<kevans91>
I'll ping him and see how far he got. It might be easier to go with rpi if you're wanting FreeBSD nat64, probably easier to build the image for that one
victhor has quit [Ping timeout: 272 seconds]
<icenowy[m]>
but advanced functions of the switch may be difficult
<icenowy[m]>
e.g. VLAN
<wens>
kevans91: the b53 thingy
chlorine_ has quit [Ping timeout: 240 seconds]
<wens>
kevans91: I don't need its function, so even the dumb passthrough mode is good
<wens>
FreeBSD docs for ARM seems a bit scarse though, especially for building a custom image
<wens>
icenowy[m]: internal/external switch that always need to be set to 0... left over from h3/h5? :p
<kevans91>
Still working on coming up with a decent way to build a custom image, honestly. Crochet kind of sucks
<beeble>
wens: have a x86 freebsd machine? then you can just cross compile a buildkernel and buildworld
nuuuciano has joined #linux-sunxi
<icenowy[m]>
montjoie: (restore the interrupt context) the PHY switch bit should be always 0
<kevans91>
manu or someone was working on adding image support to poudriere, haven't tried it yet. That'd probably be the recommended way if ti works
<icenowy[m]>
seems even for "internal" PHY
<icenowy[m]>
but it's orig val is 1
<wens>
beeble: I have a remote one, but it's a bit old, like 10 years old x86 dual socket server
<beeble>
in that case just use a vm
<BenG83>
moin
<wens>
icenowy[m]: that sucks
<BenG83>
icenowy[m], do you know if setting MAC side delays via dts works with dwmac for A64?
<wens>
kevans91: poudriere looks like it's for packages? for pkg repo?
<wens>
* builds for official pkg repo?
<icenowy[m]>
beng83: should work
<icenowy[m]>
but it's different with the situation on Pine A64
<wens>
beeble: I don't like spending hours waiting for buildworld :(
<wens>
I guess I could use the cubieboard2 image then replace U-boot and the dtb
<icenowy[m]>
wens: I think AW used a EMAC design with EPHY on H6, but without actual EPHY
<BenG83>
I found patches in net-next where someone got some more info from Realtek regarding the magic extended pages
<BenG83>
for RTL8211x
<icenowy[m]>
could you place them to me?
<beeble>
wens: understandable. but if you ever have to do it, it's quite straight forward
<BenG83>
the location for RX delay is now known, so rgmii-id should work now
<BenG83>
that is another thing I want to test
<wens>
hmm, didn't someone do a patch for that already? but it wasn't accepted?
<kevans91>
wens: It's generally for building things in a jail, so they repurposed it for generating image
<BenG83>
I think the first time was because there was no source for the magic numbers
<BenG83>
which is also configured via the extended patches
<BenG83>
but I think no board uses the IRQ function
<wens>
this one is new
<BenG83>
yeah
ernestask has joined #linux-sunxi
<wens>
beeble: I know, just been ages since I did it now that we have freebsd-update
<wens>
I don't think any of the boards wire INTB
<kevans91>
I don't recall if we support the switch on the r1, though. mizhka was working on it
<wens>
the EMAC/GMAC seems to also have a register for RGMII status... wonder if that's inband signalling
<wens>
I've not seen code that actually reads the register
rasp has quit [Remote host closed the connection]
victhor has joined #linux-sunxi
<kevans91>
Ooo, broadcom
<wens>
kevans91: it's ok. I'm not using it under Linux anyway :)
<kevans91>
wens: =p. What's your timeline for this? If you point me to right u-boot and dtb, I have one of these at home that I can reimage and work on
<kevans91>
(Am FreeBSD person as well)
<kevans91>
I'm not sure how well it works out of the box, but I'd be able to tell you as soon as Monday if it's worth trying
<icenowy[m]>
BenG83: it's for F not E
<BenG83>
yeah but afaik it is all the same from C to F
<icenowy[m]>
for F it seems to be documented
<icenowy[m]>
not the same
<wens>
kevans91: Lamobo_R1_defconfig for U-boot (any recent version should work)
<wens>
kevans91: sun7i-a20-lamobo-r1.dts is the device tree
<wens>
kevans91: no rush though, using a sunxi board is just a bonus, since this is actually for my day job
<icenowy[m]>
beng83: the magic register is at 0xa4 ext page on rtl8211e
chlorine has quit [Read error: Connection reset by peer]
chlorine_ has joined #linux-sunxi
<BenG83>
are we sure it controls the same thing?
<kevans91>
wens: I'm slowly running out of other things to work on, so this seems like a good one
kaspter has quit [Quit: kaspter]
<kevans91>
We have reasonable support for the a20 and at least support the gmac, but we don't touch the ethernet-switch here at all
kaspter has joined #linux-sunxi
<BenG83>
icenowy[m], do you know what granularity the MAC delay registers have on the A64?
<BenG83>
100ps?
<wens>
yup
<BenG83>
there is one thing that I find puzzling then
<BenG83>
ETXDC only has 3 bits
<BenG83>
that doesnt add up to 2ns
<BenG83>
ERXDC has 5 bits
<icenowy[m]>
P.S. as TL said, magic bit = RXDLY bit on PHY = 2ns
<BenG83>
ok
<BenG83>
maybe I can write a mail to Realtek to at least clear up the delay bit/ext page address for the different variants
<BenG83>
they seem to answer detail questions without NDA
<BenG83>
ayufan tuned delays on RK3328 MAC without using the ones inside RTL8211F and that works now for 4.4.x and mainline
<BenG83>
with the script tkaiser made
f0xx has quit [Ping timeout: 268 seconds]
<icenowy[m]>
P.S. as TL said the problem on Pine64 is a silicon bug
<BenG83>
in A64 or the PHY?
<icenowy[m]>
phy
<BenG83>
that batch of particular PHYs must be gone at some point I hope :P
<BenG83>
maybe that is the reason Rock64 uses F instead of E...
<icenowy[m]>
but Pine H64 is E again
<BenG83>
yeah I guess it is probably what the particular board house has in store for Pine
<BenG83>
I think Rock64 are made by a different one
<icenowy[m]>
P.S. The ODM of Pine64 seems to have some PHY templete
<BenG83>
PHY template?
elros_ has joined #linux-sunxi
<icenowy[m]>
yes... do you remember the schematics
<BenG83>
yeah
<icenowy[m]>
it's for many PHYs
<icenowy[m]>
not only 8211E
<BenG83>
yeah that part of the reference design is a mess
<BenG83>
I did a comparison of baseboard and and clusterboard PHY connections
<BenG83>
and it doesnt help that you can assign multiple names in PADS to the same net
nuuuciano has quit [Read error: Connection timed out]
<BenG83>
that makes tracing signals in PDFs painful
<BenG83>
I haven't found a native viewer for Linux for PADS schematic files...