Raspberry Pi 4 and Ultibo

Anything related to hardware, devices, drivers and how to use them with Ultibo.
User avatar
Ultibo
Site Admin
Posts: 2257
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Raspberry Pi 4 and Ultibo

Postby Ultibo » Tue Jun 25, 2019 12:10 am

No doubt if you are reading this post you've heard about the new Raspberry Pi 4 and all the new and improved capabilities it offers.

You are also probably wondering when it might be possible to run your Ultibo creations on it and take advantage of USB 3.0, Gigabit Ethernet, extra UART, I2C and SPI just to name a few.

The answer at this point in time is very much unknown and so far not a lot of real information is available about the new Pi 4, while a lot has been said about the headline features and shiny new specs the detailed information needed to write the code to support these features hasn't escaped from Pi headquarters just yet.

We've ordered ourselves one which will take a week or two to arrive in Australia and maybe by that time a little more information will start to become available, certainly the Raspberry Pi github will have been updated with all the changes needed to support the Pi 4 and that will provide a vast amount of detail about the inner workings of the SoC and peripherals.

We do know a couple of things so far:

1. The Pi 4 includes PCI Express which is used to connect the USB controller, Ultibo will need to have not only a PCIe driver but the related architecture to support detection, enumeration and a driver model for PCI.

2. The new USB 3.0 controller is a standards based xHCI device which will require a new driver, that's okay because the same driver will work on many other platforms unlike the oddball DWCOTG in all previous models.

3. The memory arrangement is based around the ARM Large Physical Address Extensions (LPAE) in order to support more RAM, some changes will be needed to fit that into the Ultibo memory layout.

4. The gigabit ethernet controller is some form of Broadcom device connected over an RGMII link, that's something new again which will need to be developed and tested.

5. The VC4 and the Userland/VCHIQ interface has been replaced by a new VC6 and the Mesa 3D library, what is unknown at this point is what elements of the old remain and what has been removed completely.

All in all it will likely take a while to get full support for the new USB, Ethernet and peripherals and then even longer to work out how to get access to OpenGL and other graphics capabilities, we've made this post a sticky and will update it as more information is known and we start to make some progress.
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1625
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Raspberry Pi 4 and Ultibo

Postby Gavinmc42 » Tue Jun 25, 2019 2:37 am

We've ordered ourselves one which will take a week

Core Electronics had some 1GB in stock, should get one here Thursday?
The 4GB will replace my home Linux box for Pi development, but that is next month?
Ultiboinstaller.sh should just work?

Some of the stuff should be easy once register addresses are known.
I2c, uarts I expect to be simple.
The extra uarts look like they have separate clocks, which will make them independent of the cpu clock?
Best info so far is here?
https://cdn.shopify.com/s/files/1/1560/ ... 4.pdf?2142
That will change as source files show up on Raspberry github?

Will we get a decent 2711 datasheet with register maps?
A V3D manual too?

I've been told OpenVG is still there on the VC6, so if framebuffer works then this may too?
Where are the mailbox addresses etc in memory?
Lots of hardware registers locations will be needed to be found.

Is the V3D the VC5/6 source code? "rename VC5 to V3D" I suspect so?
https://gitlab.freedesktop.org/mesa/mes ... um/drivers
Looks like OpenCL is there too.
That Vulkan stuff is a game changer :lol:

PCIe yikes, that is big bit to chew on?
I know nearly nothing about PCI-e except it is inside PCs.
Could be very interesting if a Compute module comes out with that broken out to connectors.

We have 2 years to figure it out before Pi5 is ready?

Edit - Element14 has some useful links to chips.
https://www.element14.com/community/doc ... nfo-topban
hansotten
Posts: 60
Joined: Thu Feb 04, 2016 7:07 am

Re: Raspberry Pi 4 and Ultibo

Postby hansotten » Tue Jun 25, 2019 8:13 am

Tough decisions for Ultibo development to be made!

Invest time in the current Pi support completion (e.g. wireless networking) or the support of the new and radical different Pi 4?

For me the Pi 4 is more a desktop computer than an embedded controller, and Ultibo shines as software to develop embedded systems.
Gavinmc42
Posts: 1625
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Raspberry Pi 4 and Ultibo

Postby Gavinmc42 » Tue Jun 25, 2019 8:59 am

Invest time in the current Pi support completion (e.g. wireless networking) or the support of the new and radical different Pi 4?

Same wifi/ble chip in 3B+ and 4B? And probably in the Pi5 too?
So effort there will not be wasted.

Some is new, some is old.
What is the minimum needed to get the Pi4B to framebuffer stage?

Wonder if that eeprom can be turned into a dual bootloader?
Gnu grub?

Latest Raspbian device tree overlays have i2c0-5, uart0-5, spi0-6..
Time to check that source code?
My 4B1 has shipped :D
5 new Raspbian version SDcards ready, counting down the hours ;)
pik33
Posts: 878
Joined: Fri Sep 30, 2016 6:30 pm
Location: Poland
Contact:

Re: Raspberry Pi 4 and Ultibo

Postby pik33 » Tue Jun 25, 2019 1:22 pm

All omx stuff and mailbox interface was left intact so the framebuffer should work without a lot of changes

The problem with RPi4 boot is its new MMU which has to be set up before all the rest of the stuff can run. To do this one has to know how the new MMU works.

Then the Ultibo has to fit in the new memory configuration.

This has to be done before any framebuffer initialization...


And the new USB and eth controlers means new drivers have to be written before Ultibo can communicate with an external world using its interfaces other than GPIO... we wven don't know yet if the GPIO base is still 3F/7E but there is chance that this was left without changes

Maybe I will get my RPi4 tomorrow. I bought a 4GB version of it.
User avatar
Ultibo
Site Admin
Posts: 2257
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Raspberry Pi 4 and Ultibo

Postby Ultibo » Tue Jun 25, 2019 11:32 pm

hansotten wrote:Invest time in the current Pi support completion (e.g. wireless networking) or the support of the new and radical different Pi 4?

That's exactly what we meant by "that's a quick way to change everyone's plans", we all knew the Pi4 was coming but it was in no way expected until 2020 so we thought we had time to complete some other work first.

hansotten wrote:For me the Pi 4 is more a desktop computer than an embedded controller, and Ultibo shines as software to develop embedded systems.

We've been considering the options a lot and weighing up whether to delay support for Pi4 in favor of other core functionality but we keep coming back to one conclusion.

Human nature being what it is as soon as the supply chain for the Pi4 fills up and there is general availability worldwide people will stop buying the other Pi models and suppliers will stop selling them, leaving us supporting only a collection of boards that are of diminishing interest to users. We think the only solution is to get basic support for the Pi4 (including general functionality like USB and networking) working as soon as possible and then go back to working on our other core functionality while considering the options with regard to graphics and other features.

There doesn't seem to be anyway to estimate a time frame for this but suppliers in Australia seem to be quoting September for availability of the 2GB and 4GB models so that gives about three months as a starting point for supply availability.
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1625
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Raspberry Pi 4 and Ultibo

Postby Gavinmc42 » Wed Jun 26, 2019 1:09 am

Time for a Pi4 survey?
Where should Garry and team focus?

we all knew the Pi4 was coming but it was in no way expected until 2020 so we thought we had time to complete some other work first.

Yep how dare they bring it out early, I was hoping for at least another year of learning on the other Pi's.
I mean, it is not even Xmas or a leap year ;)

I did see this Pi4 is rev 4.0, that suggests a long time to get working going through all those revisions.

For embedded Ultibo the 4B1 makes most sense, which is why I ordered one ;)
The 4B4 to be used as desktop replacement and native development.
4B2? embedded dual display apps?
A 4A1 or 4A0.5 will be nice for Ultibo stuff too.

Eben did say the 512 RAM was cheaper but that is would be hard to get the price low enough.
That suggests they are getting a good deal on those USB and LAN bits.
https://www.techrepublic.com/article/ra ... ben-upton/

With dual HDMI, I would prefer graphics above wifi in priority.
I suspect all the baremetal guys will sort that out fairly quickly if enough VC6 info can be provided.

I guess it is still early too, not enough in the wild to see which parts will just drop in.
Wow, need to bookmark the Pi baremetal forum.

Er, no that is not a datasheet, that is just a product brief.
A datasheet should have register addresses at least.

So many uarts has got me thinking about all those comms apps that the older Pi's could not do due to lacking comms.
Make a multiuser mini computer with Pi Zero serial terminals?
Lots of embedded apps need comms for radio modems, GPS etc. Mobile robotics, marine, air navigation etc.

These new Pi4's are a very serious bit of kit.
These are not just embedded fast SoC's anymore, but embedded PC's.
Compute 4's could end up in all sorts of places.

Can we use the Linux device drivers in Ultibo?
All those device overlay module thingies?
All C function stuff but it might speed a few porting things up?

Did this double or triple Ultibo's workload?
Pick the easy fruit first?

Eben said they tired to make 100k-200k Pi4 initially?
That is a lot to basically sell out in a day or so.
The supply train will now need to refill and ramp up.
What the steady state quantities are going to be could take months to sort out.

With the dual screens this is the Desktop box that schools need to get rid of PC's.

Ultibo working on Pi's and part of the Bloated Raspbian Distribution?
Native and baremetal Laz/FPC.
There is probably a way to get stuff working in Linux/Laz/FPC first before porting it to baremetal Ultibo.
ie prototype and test in Raspbian first.

Ok, 10 times the work load :lol:
Garry, I hope you are not too close to retirement ;)
pvn0
Posts: 2
Joined: Wed Jun 26, 2019 5:24 am
Location: Slovenia

Re: Raspberry Pi 4 and Ultibo

Postby pvn0 » Wed Jun 26, 2019 5:56 am

Gavinmc42 wrote:That Vulkan stuff is a game changer :lol:


Not coming to rpi4 any time soon tho, https://www.raspberrypi.org/forums/view ... p?t=243376

There's not a lot of people that are going to stick with rpi3 given the performance improvements rpi4 offers, also, spending too much development time on obsolete generations will have a cascading effect in terms of time available until the next gen drops.
hansotten
Posts: 60
Joined: Thu Feb 04, 2016 7:07 am

Re: Raspberry Pi 4 and Ultibo

Postby hansotten » Wed Jun 26, 2019 7:24 am

The Pi Zero (W) is still alive and will continue so I think. Being the ultra low cost very small footprint version with enough cpu power for many things. Ultibo shines there and will be even more of wifi support is available (yes, I am aware of the huge effort it will take).

The Pi 3A+ also will be a viable option for quite some time, much lower power than the Pi 4, more cpu power, small footprint, low price. Great with Ultibo also.

The Pi 4 will replace the Pi 3B+ very quickly, as mediaplayer, general purpose computer, same market and quite bit above the 3B+ .

Garry is right that Ultibo not available on the new high end Pi range will be a 'marketing' issue.
Gavinmc42
Posts: 1625
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Raspberry Pi 4 and Ultibo

Postby Gavinmc42 » Wed Jun 26, 2019 8:10 am

Vulkan will happen, even if I have to learn how to do it myself ;)
But lots of unknowns and there are much better and smarter coders out there than me.

How long before Vulkan in Raspbian or Gentoo64 or ??? till a baremetal version? No idea.

There are performance advantages to Vulkan.
Who knows, Khronos might even offer a bounty to port it.

Time to leave early, a PI4B1 is calling me :D

Return to “General”

Who is online

Users browsing this forum: No registered users and 0 guests