RK3288 initial rants
Michael Grunditz (467) 531 posts |
And EHCI works! *usbdevices But I am kind of sad , because the normal USB ports are connected to the DWC controller :( The BSD DWC driver works on RK3288, so I will look on if it is possible to port that. |
Michael Grunditz (467) 531 posts |
I am reading the RO dwc driver… what is MPHI used for? There is no such thing in RK3288. |
Jeffrey Lee (213) 6048 posts |
The RO DWC driver has been customised fairly heavily for use with the Pi (since it’s based off the Linux version of the driver that’s also been customised heavily for the Pi). The MPHI is a peripheral that was being abused as a way of downgrading FIQs to IRQs – i.e. the FIQ handler would poke the MPHI peripheral, then the MPHI would raise an IRQ (the Pi driver makes heavy use of FIQs, due to the DWC silicon in the Pi requiring the driver to do a lot of grunt work, compared to e.g. EHCI controllers). On something with a GIC, you might be able to use a software-generated interrupt for the same purpose (although I’m not sure offhand what the rules are for having a core send an interrupt to itself). Although you’ll also have the headache of trying to get FIQs working with the GIC (something that I don’t think we have support for any any RISC OS ports yet – I was thinking about adding support for it to the IMX6 HAL, but haven’t got round to it yet) If you go back in time far enough (e.g. DWCDriver 0.04) you’ll find that most/all of the Pi-specific tweaks to DWCDriver are contained in #ifdef BCM2835 checks, where I tried to keep our version of the code a bit cleaner than the Pi version. But as the FIQ-related changes got more and more involved I ended up abandoning that approach (early versions of the driver only used IRQs). |
Michael Grunditz (467) 531 posts |
The u-boot driver doesn’t use FIQs at all. I am optimistic! |
Michael Grunditz (467) 531 posts |
The 0.4 version looks interesting. Can someone check it out for me and provide a archive? Might actually work. It looks more like the current FreeBSD driver than the current RO driver does. |
Michael Grunditz (467) 531 posts |
Video is UP! Bring me USB! BTW, I tried to force start Desktop using XOS_CLI. It tries to set screenmode several times, which I don’t support at all atm. I get a not so nice display with coloured bars etc. EDIT: I changed my VetMode function to return “supported” if the suggested mode is the same as “my” mode. With that change the desktop doesn’t call setmode. |
Michael Grunditz (467) 531 posts |
I switched to BGR in the VOP. The display is exactly the same. Gradient (looks quite nice) bars and random garbage. If you look closely you might see the riscos display as small rects at the top of the screen. |
Michael Grunditz (467) 531 posts |
WIth 800×600 8bit I get four small windows att the top of the screen ( the message about boot sequence) |
Jeffrey Lee (213) 6048 posts |
It’ll normally default to 640×480 8bpp (RISC OS mode 28), but it can also do strange things if the video driver is only half-functioning. I think *Configure Wimpmode will only write the new value to CMOS (which I’m guessing you won’t have working yet), and not affect the “live” configuration. *Wimpmode will affect the live configuration (although without an MDF/EDID loaded into ScreenModes, you’ll be limited to using numbered modes). To override the OS’s mode selection logic in a fairly reliable way, you can have your video driver implement GraphicsV 16. If you need to use something which isn’t a numbered mode (i.e. you can only describe the mode using a mode selector block) then you can also have your driver load an MDF containing an entry for that mode – similar to the code in IMXVideo that’s wrapped in the CustomBits option. |
Michael Grunditz (467) 531 posts |
I use a old version of the i.MX6 video module. I use the included MDF. I was wrong in bits.. The VOP can¨t do 8-bit without much work so I am stuck at 24 bit (or 16). |
Michael Grunditz (467) 531 posts |
I tried to include a BASIC program as resourcefile in Kernel.s.NewReset. But when I run “basic -quit Resources:….basicfile” I get file not found. |
Michael Grunditz (467) 531 posts |
It is strange with the desktop. The same configuration worked in the early I.mx6 days. Why might wimpmode be ignored? |
Michael Grunditz (467) 531 posts |
Now I get a even more serious issue: This is when RISC OS should be printed. Instead I get that error on screen. |
Michael Grunditz (467) 531 posts |
BAH. It was the Video module. Resetting that and a few another tweeks… gui runs with a error window :) I really could do with that old DWC module. Either help if I can access the CVS, or if some kind person can make a archive. |
Michael Grunditz (467) 531 posts |
I have been worried about the VOP clocking since it is a very hairy procedure.. I just found out that it isn’t needed. Apparently it is programmed with good defaults. |
Michael Grunditz (467) 531 posts |
Managed to checkout old DWC. I am now stuck in that it can’t communicate with USBDriver. I get abort on instruction fetch at 0000004 as soon as it tries to call USBDriver_RegisterBus, it never gets there. Hmm now it does, built with “NetBSD” from the same era. It now fails in ca_attach (hub). I have never managed to trace down what happens in that call. Error: DataAbort:Abort on data transfer at &FC1C3A8C (Error Number & I have tried to read the symbol list, but no luck. Hmm again Normally it would stay on. |
Tristan M. (2946) 1039 posts |
I’m just curious if the core of this thing is related to the one you are working on? |
Michael Grunditz (467) 531 posts |
The SoC is similar, but the ARM core is different. |
Michael Grunditz (467) 531 posts |
This call: Fails like this: In this: The module looks identical to curent DWC up to that ( at least). Old USBDriver doesn’t crash like that, but fails on checking USB1/2 etc. The “bus” above is dwc. |
Michael Grunditz (467) 531 posts |
Progress! *usbdevices prints the roothub. USBDriver: adding bus 20027da4 using 20035c54 size 50 |
Tristan M. (2946) 1039 posts |
You are making great progress. It looks like you almost have USB working properly. That’s a massive step! I’ve been watching your progress. It’s very helpful to me because you are so far ahead, and seem to be facing similar issues. |
Michael Grunditz (467) 531 posts |
Yea.. EHCI is fully working.. but this isn’t Yea.. EHCI is fully working.. but this isn’tThe second device in the chain is a 4 port hub ( the physical ports on the board) It is being marked as generic in USBDriver and therefor UHUB attach doesn’t happen. If I skip the test for generic , it doesn’t register the roothub properly and stops. Yea.. EHCI is fully working.. but this isn’tThe second device in the chain is a 4 port hub ( the physical ports on the board) It is being marked as generic in USBDriver and therefor UHUB attach doesn’t happen. If I skip the test for generic , it doesn’t register the roothub properly and stops.Jeffry, How is the supposed to work? |
Michael Grunditz (467) 531 posts |
Why is the forum post all messed up? |
Michael Grunditz (467) 531 posts |
I have now “hacked” the current DWC module to use the same IRQ way as the old one. Still stuck at the same place. The second device is marked as generic and isn’t matched against hub. USBDriver: adding bus 20019d38 using 20023f74 size 50 |
Michael Grunditz (467) 531 posts |
Wrong IRQ number .. ! Both old and new driver.. From USBDriver it seems like it actually finds new device after root hub, but it fails on it. |