Raspberry Pi 4 mmap

More
22 Sep 2019 12:15 #145833 by Bertho
Replied by Bertho on topic Raspberry Pi 4
Hi all,

Gene already mentioned that he received a newer version for the hm2_rpspi driver from me. The changes in that version are in my localtree: github.com/BsAtHome/linuxcnc/blob/hm2_rp...hostmot2/hm2_rpspi.c and github.com/BsAtHome/linuxcnc/blob/hm2_rp...2/spi_common_rpspi.h

The change should fix the RPi detection dependency away from /proc/cpuinfo, which lacks information in the 64-bit arch. The fix gets the IObase address from /proc/device-tree/soc/ranges and functions in a similar way as libbcm_host. It also does away with RPi 1/2/3/4 distinction entirely because it is a none-issue. LCNC only works well on 3 and 4 anyway (maybe slowly on a 2). It will, however, note the hardware version by logging the content of /proc/device-tree/model.

The bad news is that I have not been able to test the code. The changes are entirely academic at the moment. Gene has been working on getting infrastructure up and running to test it. However, there are some challenges with the RPi4, so it takes time ;-)
I am reasonable convinced that the changes are correct, but there might be small issues yet.

If more have a running setup on RPi3 and RPi4, please see if the change works correctly. The changes in the driver reduce the underlying linux version and bitsize dependency and get the info directly from the kernel. That should be a good thing.

--
Greetings Bertho

Please Log in or Create an account to join the conversation.

More
22 Sep 2019 12:56 #145836 by Gene1934
Replied by Gene1934 on topic Raspberry Pi 4
So I'll install what Bertho has sent right now, and do a new dpkg-buildpackage -b -uc.
Then I'll install the deb and try it right on the pi4 as I'll have time to make a 26 pin jumper cable while its building. I have more 7i90's, with damaged outputs to test it with.

I was hoping to see a new commit of PCW's version, but don't as of now, so I'll test what I've got.

Cheers.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

Please Log in or Create an account to join the conversation.

More
22 Sep 2019 13:33 #145838 by PCW
Replied by PCW on topic Raspberry Pi 4
My version should not make any difference since it just adds support for the 7C80 and 7C81. I have merged my changes to Berthos new code ( my previous version was using svantegs patch). I have not tested it yet but will try tomorrow.

Please Log in or Create an account to join the conversation.

More
22 Sep 2019 16:23 #145863 by cakeslob
Replied by cakeslob on topic Raspberry Pi 4
I was using a 2.9.0pre , run in place. btu it also looked like i had a 2.8pre run in place, which also didnt load for the same reason. im reloading the image from scratch now so ill see hopw that goes. this is my start up from 2.9

File Attachment:

File Name: startup_20...9-22.txt
File Size:1 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
22 Sep 2019 16:31 - 22 Sep 2019 16:32 #145864 by Bertho
Replied by Bertho on topic Raspberry Pi 4
Do you use my version with a new card? This message looks like it:
hm2_rpspi: Unknown board at SPI0/CE0: MESA7C81
I have not incorporated PCW's changes to support additional boards. That said, the driver loads and communicates up to the point where it detects an unsupported board.

So, if you are using my new driver, then at least it would be confirmed that it can talk to the RPi hardware.
Last edit: 22 Sep 2019 16:32 by Bertho.

Please Log in or Create an account to join the conversation.

More
22 Sep 2019 16:47 #145866 by Gene1934
Replied by Gene1934 on topic Raspberry Pi 4
I've hit a show stopper here. For some reason /media/pi/workspace, a 240GB ssd plugged into a usb3 hub, plugged into a usb3 port, went ro while sitting hot overnight. And now I can't boot a fully functioning rt kernel, its screen is 16 pixels small all the way around, and while the ssd's must be mounting as there's 3 disk icons on this undersized screen, but no mouse or keyboard response. Edit /boot/config.txt to restore the default non-rt boot, and it all works. I'm plumb bumfuzzled, been around this loop about 8 times now and need to fix some lunch for us.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

Please Log in or Create an account to join the conversation.

More
22 Sep 2019 16:52 #145867 by acondit
Replied by acondit on topic Raspberry Pi 4
Do you have a heatsink on your rpi 4b? I have been reading about them running hot and causing some people problems.

Alan

Please Log in or Create an account to join the conversation.

More
22 Sep 2019 17:10 #145871 by Gene1934
Replied by Gene1934 on topic Raspberry Pi 4
got the big 2 piece sandwich w/o the fans from bangood on it, make -j4 doesn't phase it.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <geneslinuxbox.net:6309/gene>

Please Log in or Create an account to join the conversation.

More
22 Sep 2019 17:25 - 22 Sep 2019 17:28 #145873 by PCW
Replied by PCW on topic Raspberry Pi 4
Note that a non-recognized the card should not be fatal, I've run a 7C80 for more than 1 year with Berthos
original driver and a 7C80, it complains but runs fine

Here's Berthos new RPI4 compatible code with 7C80/7C81 support added:

File Attachment:

File Name: hm2_rpspi.c
File Size:44 KB
Attachments:
Last edit: 22 Sep 2019 17:28 by PCW.

Please Log in or Create an account to join the conversation.

More
22 Sep 2019 18:03 #145876 by Bertho
Replied by Bertho on topic Raspberry Pi 4
Just a thought: Shouldn't the io_connector_pin_names not be of type "const char"? It seems to be completely static and immutable data. It may be additionally possible to declare the pointer array const as well.

This goes for "hm2_7c80_pin_names" and "hm2_7c81_pin_names" in the driver, but also the declaration of the structure in hostmot2-lowlevel.h.

Please Log in or Create an account to join the conversation.

Time to create page: 0.131 seconds
Powered by Kunena Forum