Hello I am running raspberry pi3B and with lastest fedora 28 (with kernel 4.16.0-300.fc28.aarch64)
I read from the unicorn Hat that I need to activate SPI using raspi-config ( for raspbian only)
So I tried to do it manually .. and that's when everything did not go so well :) I understood that I have to tune /boot/efi/config.txt file adding device_tree_param=spi=on I guess I have also to add a dtoverlay line but I don't which one ...
Thanks
Ok, I worked a little on this issue and I found something.
module spidev is not loaded, so it tried to load it with modprobe spidev. it worked but nothing was created into /dev
I also ran dtc -Ifs /proc/device-tree and found
spi@7e204000 { compatible = "brcm,bcm2835-spi"; clocks = <0x7 0x14>; status = "disabled"; #address-cells = <0x1>; interrupts = <0x2 0x16>; #size-cells = <0x0>; reg = <0x7e204000 0x1000>; };
spi@7e215080 { compatible = "brcm,bcm2835-aux-spi"; clocks = <0xf 0x1>; status = "disabled"; #address-cells = <0x1>; interrupts = <0x1 0x1d>; #size-cells = <0x0>; reg = <0x7e215080 0x40>; };
spi@7e2150c0 { compatible = "brcm,bcm2835-aux-spi"; clocks = <0xf 0x2>; status = "disabled"; #address-cells = <0x1>; interrupts = <0x1 0x1d>; #size-cells = <0x0>; reg = <0x7e2150c0 0x40>; };
but status of these trees is "disabled" ... how can I enable them, that will probably creat the devices into /dev :)
Thanks a lot
On Mon, Apr 9, 2018 at 10:04 PM, Pierre-Francois RENARD pfrenard@gmail.com wrote:
Ok, I worked a little on this issue and I found something.
module spidev is not loaded, so it tried to load it with modprobe spidev. it worked but nothing was created into /dev
I also ran dtc -Ifs /proc/device-tree and found
spi@7e204000 { compatible = "brcm,bcm2835-spi"; clocks = <0x7 0x14>; status = "disabled"; #address-cells = <0x1>; interrupts = <0x2 0x16>; #size-cells = <0x0>; reg = <0x7e204000 0x1000>; };
spi@7e215080 { compatible = "brcm,bcm2835-aux-spi"; clocks = <0xf 0x1>; status = "disabled"; #address-cells = <0x1>; interrupts = <0x1 0x1d>; #size-cells = <0x0>; reg = <0x7e215080 0x40>; };
spi@7e2150c0 { compatible = "brcm,bcm2835-aux-spi"; clocks = <0xf 0x2>; status = "disabled"; #address-cells = <0x1>; interrupts = <0x1 0x1d>; #size-cells = <0x0>; reg = <0x7e2150c0 0x40>; };
but status of these trees is "disabled" ... how can I enable them, that will probably creat the devices into /dev :)
I'm hoping to have a solution to that shortly, it's not working just yet which is why I'm yet to respond with details
If you need me to run a few commands or give you any logs, tell me :) Fox
on the command line you can modify the device tree blobs with fdtget/fdtput to get the status of any given node: # fdtget /boot/dtb/bcm2837-rpi-3-b.dtb /soc/spi@7e204000 status disabled to change the status of the node # fdtput --type s /boot/dtb/bcm2837-rpi-3-b.dtb /soc/spi@7e204000 status okay
but i don't know if enabling the spi stuff in the dtb will make your device accessible my issue was i wanted to add an ethernet device to spi on fedora, and i had to actually patch dts files and rebuild the dtb completely
I tried that after I had it on the dtb file fdtget /boot/dtb/broadcom/bcm2837-rpi-3-b-plus.dtb /soc/spi@7e204000 status okay
but after rebooting everything stays "disabled"
How did you build the dtb from dts ?
How did you build the dtb from dts ?
get the kernel source apply patch diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi index ac00e730f898..1bcbd98ed1c2 100644 --- a/arch/arm/boot/dts/bcm283x.dtsi +++ b/arch/arm/boot/dts/bcm283x.dtsi @@ -376,6 +376,14 @@ brcm,pins = <42 43>; brcm,function = <BCM2835_FSEL_ALT5>; }; + spi0_pins: spi0_pins { + brcm,pins = <9 10 11>; + brcm,function = <4>; /* alt0 */ + }; + spi0_cs_pins: spi0_cs_pins { + brcm,pins = <8 7>; + brcm,function = <1>; /* output */ + }; };
uart0: serial@7e201000 { @@ -416,7 +424,29 @@ clocks = <&clocks BCM2835_CLOCK_VPU>; #address-cells = <1>; #size-cells = <0>; - status = "disabled"; + status = "okay"; + /* Add alias */ + dmas = <&dma 6>, <&dma 7>; + dma-names = "tx", "rx"; + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins &spi0_cs_pins>; + cs-gpios = <&gpio 8 1>, <&gpio 7 1>; + + spidev0: spidev@0{ + compatible = "spidev"; + reg = <0>; /* CE0 */ + #address-cells = <1>; + #size-cells = <0>; + spi-max-frequency = <125000000>; + }; + + spidev1: spidev@1{ + compatible = "spidev"; + reg = <1>; /* CE1 */ + #address-cells = <1>; + #size-cells = <0>; + spi-max-frequency = <125000000>; + }; };
i2c0: i2c@7e205000 {
cd arch/arm/boot/dts/ $CPP -I../../../../include -E -P -x assembler-with-cpp bcm2837-rpi-3-b.dts | dtc -I dts -O dtb -o bcm2837-rpi-3-b.dtb - sudo cp bcm2837-rpi-3-b.dtb /boot/dtb-4.16.0-300.fc28.aarch64/broadcom/bcm2837-rpi-3-b.dtb
important note: i don't have a raspberry pi in front of me, this might not do anything for you
wow !
in fact it was much more simple .. I was playing with a raspberry 3B and not a 3B+ so the dtb file was not the good one :)
Finally I have this : cd /proc/device-tree/soc ls -dal spi* drwxr-xr-x. 2 root root 0 Mar 5 23:16 spi@7e204000 drwxr-xr-x. 2 root root 0 Mar 5 23:16 spi@7e215080 drwxr-xr-x. 2 root root 0 Mar 5 23:16 spi@7e2150c0 cat spi*/status okay disabled okay
but no device in /dev.. do you have any hints ?
Thanks
things i should have probably asked first: have you tried the unicorn hat in raspbian, is it functional? which unicorn hat is it exactly, which pins are you using?, because it looks like there are ones that use spi0 and others spi1
and as for spi: spi@7e204000 is spi0 spi@7e215080 is spi1 spi@7e2150c0 is spi2 which doesn't actually exist on a raspberry pi unless you use the computing module, so it should probably remain disabled
things i should have probably asked first:
have you tried the unicorn hat in raspbian, is it functional?
which unicorn hat is it exactly, which pins are you using?,
because it looks like there are ones that use
spi0 and others spi1 and as for spi:
spi@7e204000 is spi0
spi@7e215080 is spi1
spi@7e2150c0 is spi2
which doesn't actually exist on a raspberry pi unless you use the computing module, so it should probably remain disabled
this is the Unicorn Hat HD : https://shop.pimoroni.com/products/unicorn-hat-hd
I'll do the test of the raspbian.
I have tried again with one of the latest f28 build (20180419), same issue.
I have also these messages from dmesg, is it related ?
[ 27.131987] bcm2835_thermal spi_bcm2835aux spi_bcm2835 bcm2835_rng bcm2835_wdt leds_gpio xfs uas usb_storage libcrc32c vc4 snd_soc_core ac97_bus snd_pcm_dmaengine cec rc_core snd_pcm snd_timer snd mmc_block soundcore drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm dwc2 udc_core sdhci_iproc sdhci_pltfm sdhci pwm_bcm2835 i2c_bcm2835 bcm2835 bcm2835_dma phy_generic dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua [ 27.219620] CPU: 0 PID: 5 Comm: kworker/u8:0 Not tainted 4.16.2-300.fc28.aarch64 #1 [ 27.233188] Hardware name: raspberrypi rpi/rpi, BIOS 2018.03 04/15/2018 [ 27.245700] Workqueue: events_unbound async_run_entry_fn [ 27.256928] pstate: 20400005 (nzCv daif +PAN -UAO) [ 27.267518] pc : gpiod_set_value+0x60/0x68 [ 27.277239] lr : gpiod_set_value+0x30/0x68 [ 27.286793] sp : ffff00000804bbc0 [ 27.295392] x29: ffff00000804bbc0 x28: 0000000000000000 [ 27.305921] x27: ffff800037073fb8 x26: ffff000008c8e008 [ 27.316398] x25: 0000000000000000 x24: 000000000000002c [ 27.326889] x23: ffff0000013f40b8 x22: 0000000000000000 [ 27.337376] x21: 0000000000000000 x20: 0000000000000000 [ 27.347862] x19: ffff800031f76b00 x18: 00000000000000ef [ 27.358353] x17: 0000000000000000 x16: 0000000000000000 [ 27.368820] x15: 00005f2acaff6414 x14: 000000000000000c [ 27.379257] x13: 0000000000000001 x12: 0000000000000000 [ 27.389681] x11: 0000000000000003 x10: 0101010101010101 [ 27.399951] x9 : 01fefefefefefeff x8 : ffff800030de1b00 [ 27.410086] x7 : ffff800008007c80 x6 : ffff7e0000c37840 [ 27.410095] x5 : 0000000000008d6b x4 : ffff80003e51d8e0 [ 27.410102] x3 : 0000000000008d6c x2 : ffff800034794a28 [ 27.410109] x1 : ffff800035d12400 x0 : 0000000000000001 [ 27.410117] Call trace: [ 27.410134] gpiod_set_value+0x60/0x68 [ 27.410254] bcm_gpio_set_shutdown+0x28/0x38 [hci_uart] [ 27.410364] bcm_gpio_set_power+0xc0/0x168 [hci_uart] [ 27.482065] bcm_serdev_probe+0x80/0xe8 [hci_uart] [ 27.482084] serdev_drv_probe+0x28/0x38 [ 27.497995] really_probe+0x204/0x3c8 [ 27.505029] driver_probe_device+0x54/0xd8 [ 27.512340] __driver_attach+0x124/0x128 [ 27.519341] bus_for_each_dev+0x70/0xa8 [ 27.526142] driver_attach+0x30/0x40 [ 27.532620] driver_attach_async+0x20/0x60 [ 27.539580] async_run_entry_fn+0x4c/0x188 [ 27.539587] process_one_work+0x19c/0x3a8 [ 27.539592] worker_thread+0x4c/0x418 [ 27.539600] kthread+0x130/0x138 [ 27.539615] ret_from_fork+0x10/0x18 [ 27.572525] ---[ end trace 3bb3eadcdf1398ca ]--- [ 27.573515] uart-pl011 3f201000.serial: no DMA platform data [ 27.589215] WARNING: CPU: 0 PID: 5 at drivers/gpio/gpiolib.c:2986 gpiod_set_value+0x60/0x68 [ 27.604174] Modules linked in: hci_uart btbcm btintel btqca brcmfmac bluetooth brcmutil cfg80211 smsc95xx rc_cec usbnet ecdh_generic mii crc32_ce gpio_raspberrypi_exp rfkill nvmem_core bcm2835_thermal spi_bcm2835aux spi_bcm2835 bcm2835_rng bcm2835_wdt leds_gpio xfs uas usb_storage libcrc32c vc4 snd_soc_core ac97_bus snd_pcm_dmaengine cec rc_core snd_pcm snd_timer snd mmc_block soundcore drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm dwc2 udc_core sdhci_iproc sdhci_pltfm sdhci pwm_bcm2835 i2c_bcm2835 bcm2835 bcm2835_dma phy_generic dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua [ 27.687283] CPU: 0 PID: 5 Comm: kworker/u8:0 Tainted: G W 4.16.2-300.fc28.aarch64 #1 [ 27.687287] Hardware name: raspberrypi rpi/rpi, BIOS 2018.03 04/15/2018 [ 27.687311] Workqueue: events_unbound async_run_entry_fn [ 27.687321] pstate: 20400005 (nzCv daif +PAN -UAO) [ 27.687335] pc : gpiod_set_value+0x60/0x68 [ 27.687343] lr : gpiod_set_value+0x30/0x68 [ 27.687346] sp : ffff00000804bb50 [ 27.687349] x29: ffff00000804bb50 x28: 0000000000000000 [ 27.687357] x27: ffff800037073fb8 x26: ffff000008c8e008 [ 27.687365] x25: 0000000000000000 x24: 000000000000002c [ 27.687372] x23: ffff0000013f40b8 x22: fffffffffffffffe [ 27.687380] x21: 0000000000000001 x20: 0000000000000001 [ 27.687387] x19: ffff800031f76b00 x18: 0000000000000000 [ 27.687394] x17: 0000000000000000 x16: 0000000000000000 [ 27.687402] x15: 0000000000aaaaaa x14: 0e200e200e200e20 [ 27.687410] x13: 0000000000000001 x12: 00000000ffffffff [ 27.687417] x11: ffff000000bb3088 x10: 0000000000000020 [ 27.687424] x9 : 0000000000000000 x8 : ffff00000c115260 [ 27.687432] x7 : 0000000000000000 x6 : 000000000000003f [ 27.687439] x5 : ffff00000804ba58 x4 : 0000000000000000 [ 27.687446] x3 : 0000000000000002 x2 : ffff800034794a28 [ 27.687453] x1 : ffff800035d12400 x0 : 0000000000000001 [ 27.687461] Call trace: [ 27.687471] gpiod_set_value+0x60/0x68 [ 27.687597] bcm_gpio_set_shutdown+0x28/0x38 [hci_uart] [ 27.687700] bcm_gpio_set_power+0x40/0x168 [hci_uart] [ 27.687802] bcm_open+0xe8/0x1c8 [hci_uart] [ 27.687903] hci_uart_register_device+0x3c/0x2a0 [hci_uart] [ 27.688007] bcm_serdev_probe+0x94/0xe8 [hci_uart] [ 27.688018] serdev_drv_probe+0x28/0x38 [ 27.688026] really_probe+0x204/0x3c8 [ 27.688033] driver_probe_device+0x54/0xd8 [ 27.688040] __driver_attach+0x124/0x128 [ 27.688046] bus_for_each_dev+0x70/0xa8 [ 27.688052] driver_attach+0x30/0x40 [ 27.688058] driver_attach_async+0x20/0x60 [ 27.688065] async_run_entry_fn+0x4c/0x188 [ 27.688071] process_one_work+0x19c/0x3a8 [ 27.688076] worker_thread+0x4c/0x418 [ 27.688083] kthread+0x130/0x138 [ 27.688093] ret_from_fork+0x10/0x18 [ 27.688098] ---[ end trace 3bb3eadcdf1398cb ]---
ok,
I did the test and I am now a little confused :)
Raspbian works fine, and I can find the /dev/spidev0.0 and /dev/spidev0.1.
I have setup all the stuff for UnicornHat HD ('curl https://get.pimoroni.com/unicornhathd | bash') but it is not working....
nothing happens when I run all the examples, no warning, no errors, no light !
I have also change the Unicorn Hat HD as I have 2 of them. Same results !
I am going to ask support from unicornHatHD community :)
But I have a raspbian which can create the proper devices into /dev, so we can continue to investigate, I just have to switch the SD card to test again on F28)
Fox
you're going to have to opt for a more manual installation procedure since pimoroni's install method assumes you're using raspbian, and has more debianesque methods built-in
first, the eariler patch i posted for bcm283x.dtsi to generate bcm2837-rpi-3-b.dtb will get spidev enabled on fedora (again, you'll need the kernel source and a preprocessor) then (this is speculation just by looking at the internals of unicornhathd, the instructions of https://github.com/pimoroni/unicorn-hat-hd, and my limited knowledge of fedora in general) you're going to need to: dnf install python2-pip python3-pip python2-devel python3-devel then afaict: git clone https://github.com/doceme/py-spidev cd py-spidev; python setup.py install then: pip3 install unicornhathd then: pip install unicornhathd again, this is a lot of speculation, i'm just shooting in the dark here
OK,
first of all when your device is unicornhat and you think it is a unicornhathd, it will never work :)
I tried the unicornhat setup on rapsbian and it worked :)
I'll now try on f28. I'll give you news :)
Fox
OK,
so when I am installing kernel source from repository I have no dts files
I have no diff --git is not working ("unrecognized option '--git'")
I tried to compile kernel, thinking it will generate dts files, but I have a seg fault in the first command :
I have opened bug https://bugzilla.redhat.com/show_bug.cgi?id=1570571
Fox
fortunately you don't have to compile the kernel completely, just generate a single dtb in the sources and that diff --git is just part of the output of a git diff, you need to: dnf install patch dtc gcc cd /usr/src/kernel/4.16.3-300.fc28.aarch64/ patch -p1 < /tmp/bcm283x.dtsi.patch cd arch/arm/boot/dts/ gcc -E -I../../../../include -P -x assembler-with-cpp bcm2837-rpi-3-b.dts | dtc -I dts -O dtb -o bcm2837-rpi-3-b.dtb - cp bcm2837-rpi-3-b.dtb /boot/dtb-4.16.3-300.fc28.aarch64/broadcom/bcm2837-rpi-3-b.dtb reboot, and then you should have two /dev/spi*
can you tell me where I have to download the patch :) (do I have to copy/paste what you provided into your post ?)
I am running aarch64, so do I have to play with arm or arm64 ?
When going into arch directories I have no dts file at all ? Did I miss something ?
Sorry for the stupid questions !
(do I have to copy/paste what you provided into your post ?)
yes, save that into bcm2837.dtsi.diff
I am running aarch64, so do I have to play with arm or arm64 ?
the instructions should also work for arm64 systems
When going into arch directories I have no dts file at all ? Did I miss something ?
if there are no dts/dtsi files in the extracted fedora srpm sources, you can download vanilla kernel sources from kernel.org
Sorry for the stupid questions !
you're learning stuff, that's always good!
On Tue, Apr 24, 2018 at 7:35 AM, pfrenard pfrenard@gmail.com wrote:
can you tell me where I have to download the patch :) (do I have to copy/paste what you provided into your post ?)
What patch? What post? Can you provide more details here?
I am running aarch64, so do I have to play with arm or arm64 ?
When going into arch directories I have no dts file at all ? Did I miss something ?
Sorry for the stupid questions !
Just needs some more details :-) The HAT support for Fedora is not great ATM, although I'm hoping the general support will be better RSN. I'm working with a few people to improve the support of HATs but I support the Raspberry Pi in Fedora in mostly my own time and there's been other things, like making the new 3+ work that have taken priority here and also taken longer than I expected.
Peter
On 04/24/2018 12:39 PM, Peter Robinson wrote:
On Tue, Apr 24, 2018 at 7:35 AM, pfrenard pfrenard@gmail.com wrote:
can you tell me where I have to download the patch :) (do I have to copy/paste what you provided into your post ?)
What patch? What post? Can you provide more details here?
I was asking adpdyj+4aw13di0ccx1w@sharklasers.com https://lists.fedoraproject.org/archives/users/114176193582679935481622677514606917093/ :)
I am running aarch64, so do I have to play with arm or arm64 ?
When going into arch directories I have no dts file at all ? Did I miss something ?
Sorry for the stupid questions !
Just needs some more details :-) The HAT support for Fedora is not great ATM, although I'm hoping the general support will be better RSN. I'm working with a few people to improve the support of HATs but I support the Raspberry Pi in Fedora in mostly my own time and there's been other things, like making the new 3+ work that have taken priority here and also taken longer than I expected.
Peter
ok, it makes sense,
I still have a lot to learn but if I can help - at least testing stuff, it will be a pleasure :)
I'll try adpdyj+4aw13di0ccx1w@sharklasers.com https://lists.fedoraproject.org/archives/users/114176193582679935481622677514606917093/ patch & stuffs and give you feedbacks.
Fox
On 04/24/2018 01:18 PM, RENARD Pierre-Francois wrote:
On 04/24/2018 12:39 PM, Peter Robinson wrote:
On Tue, Apr 24, 2018 at 7:35 AM, pfrenardpfrenard@gmail.com wrote:
can you tell me where I have to download the patch :) (do I have to copy/paste what you provided into your post ?)
What patch? What post? Can you provide more details here?
I was asking adpdyj+4aw13di0ccx1w@sharklasers.com https://lists.fedoraproject.org/archives/users/114176193582679935481622677514606917093/ :)
I am running aarch64, so do I have to play with arm or arm64 ?
When going into arch directories I have no dts file at all ? Did I miss something ?
Sorry for the stupid questions !
Just needs some more details :-) The HAT support for Fedora is not great ATM, although I'm hoping the general support will be better RSN. I'm working with a few people to improve the support of HATs but I support the Raspberry Pi in Fedora in mostly my own time and there's been other things, like making the new 3+ work that have taken priority here and also taken longer than I expected.
Peter
ok, it makes sense,
I still have a lot to learn but if I can help - at least testing stuff, it will be a pleasure :)
I'll try adpdyj+4aw13di0ccx1w@sharklasers.com https://lists.fedoraproject.org/archives/users/114176193582679935481622677514606917093/ patch & stuffs and give you feedbacks.
Fox
Well Well Well :)
it seams that unicornhat will be a mess for fedora and especially aarch64
https://forums.pimoroni.com/t/fedora-aarch64-error-compiling-ws281x/7600/4
(pip3 install is failing with a gcc error ... ) so I did try to do it from scratch ...
ws281x is the issue and the post from pimoroni is an answer to my loneliness :)
never mind I'll try to make spi work !
Fox
On Tue, Apr 24, 2018 at 3:39 PM, pfrenard pfrenard@gmail.com wrote:
On 04/24/2018 01:18 PM, RENARD Pierre-Francois wrote:
On 04/24/2018 12:39 PM, Peter Robinson wrote:
On Tue, Apr 24, 2018 at 7:35 AM, pfrenard pfrenard@gmail.com wrote:
can you tell me where I have to download the patch :) (do I have to copy/paste what you provided into your post ?)
What patch? What post? Can you provide more details here?
I was asking adpdyj+4aw13di0ccx1w@sharklasers.com :)
I am running aarch64, so do I have to play with arm or arm64 ?
When going into arch directories I have no dts file at all ? Did I miss something ?
Sorry for the stupid questions !
Just needs some more details :-) The HAT support for Fedora is not great ATM, although I'm hoping the general support will be better RSN. I'm working with a few people to improve the support of HATs but I support the Raspberry Pi in Fedora in mostly my own time and there's been other things, like making the new 3+ work that have taken priority here and also taken longer than I expected.
Peter
ok, it makes sense,
I still have a lot to learn but if I can help - at least testing stuff, it will be a pleasure :)
I'll try adpdyj+4aw13di0ccx1w@sharklasers.com patch & stuffs and give you feedbacks.
Fox
Well Well Well :)
it seams that unicornhat will be a mess for fedora and especially aarch64
https://forums.pimoroni.com/t/fedora-aarch64-error-compiling-ws281x/7600/4
(pip3 install is failing with a gcc error ... ) so I did try to do it from scratch ...
ws281x is the issue and the post from pimoroni is an answer to my loneliness :)
I like pimoroni the company, I've followed them since their first case released for the original RPi. Their software support remains shaky at best, few of their HATs have published DT overlays, they have little interest in supporting things out of a very closed Raspbian ecosystem and the response on that forum makes me think they basically throw stuff at a wall until it sticks. :-(
never mind I'll try to make spi work !
Check the list archives there's a few threads around SPI and how to enable it using various DT commands.
Peter
On Sun, Apr 22, 2018 at 4:30 PM, pfrenard pfrenard@gmail.com wrote:
ok,
I did the test and I am now a little confused :)
Raspbian works fine, and I can find the /dev/spidev0.0 and /dev/spidev0.1.
I have setup all the stuff for UnicornHat HD ('curl https://get.pimoroni.com/unicornhathd | bash') but it is not working....
I have no idea what that script does but it's very unlikely to be distribution agnostic and hence very unlikely to work with Fedora (or probably any other distro)
nothing happens when I run all the examples, no warning, no errors, no light !
I have also change the Unicorn Hat HD as I have 2 of them. Same results !
I am going to ask support from unicornHatHD community :)
But I have a raspbian which can create the proper devices into /dev, so we can continue to investigate, I just have to switch the SD card to test again on F28)
Fox _______________________________________________ arm mailing list -- arm@lists.fedoraproject.org To unsubscribe send an email to arm-leave@lists.fedoraproject.org
2018-04-24 12:35 GMT+02:00 Peter Robinson pbrobinson@gmail.com:
On Sun, Apr 22, 2018 at 4:30 PM, pfrenard pfrenard@gmail.com wrote:
ok,
I did the test and I am now a little confused :)
Raspbian works fine, and I can find the /dev/spidev0.0 and /dev/spidev0.1.
I have setup all the stuff for UnicornHat HD ('curl https://get.pimoroni.com/unicornhathd | bash') but it is not working....
I have no idea what that script does but it's very unlikely to be distribution agnostic and hence very unlikely to work with Fedora (or probably any other distro)
Yeah. Most of the times, these scripts are designed for Rasbian only.
Ciao A.
On Tue, Apr 24, 2018 at 11:35 AM, Peter Robinson pbrobinson@gmail.com wrote:
On Sun, Apr 22, 2018 at 4:30 PM, pfrenard pfrenard@gmail.com wrote:
ok,
I did the test and I am now a little confused :)
Raspbian works fine, and I can find the /dev/spidev0.0 and /dev/spidev0.1.
I have setup all the stuff for UnicornHat HD ('curl https://get.pimoroni.com/unicornhathd | bash') but it is not working....
I have no idea what that script does but it's very unlikely to be distribution agnostic and hence very unlikely to work with Fedora (or probably any other distro)
Taking a 30 second look at this script it references .deb files, kernel cmd line files (which we'll never use), config.txt configs (which we should hopefully support in F-29, but it'll be a different path) and a bunch of other things that indicate it won't work out of the box on Fedora.
Peter
I have tried again with one of the latest f28 build (20180419), same issue.
Tried it myself. I was able do build bcm2837-rpi-3-b.dtb file applying the patch written in some previous message in this thread. Even if /dev/spidev0.0 and /dev/spidev0.1 are in place, and fdtget /boot/dtb/bcm2837-rpi-3-b.dtb /soc/spi@7e204000 status is okay, spidev and spi_bcm2835 are loaded, I have such errors in the dmesg [1] starting with "spidev spi0.0: buggy DT: spidev listed directly in DT". Then, as usual without understanding very well what I'm doing :-) using some tools to test SPI (spincl, airspayce library, wiringpi, Adafruit_Nokia_LCD) I get segmentation faults or messages like "mmap (GPIO) failed: Operation not permitted".
[1] https://alciregi.fedorapeople.org/dmesg-spi.txt
Ciao, A.
I finally managed to use a SPI LCD display. I tinkered a lot, so I don't know if it is the right way to achieve the goal to enable SPI on Fedora. However here you can find my notes: https://blog.oless.xyz/post/fedorarpispi/
Ciao A.
Alessio,
thanks for your job ! :)
I am using arch aarch64 and not armv7hl, and it is also working with a few changes.
1/ dtb are available into directory /boot/dtb/broadcom ( and not /boot/dtb )
that's where we have to cp the new dtb file.
2/ dts and dtsi seem to be avaible into the same directory as for aarch64 I found a "includes" from arm directory.
am I wrong on this ?
3/ I was not able to apply patch bcm283x.dtsi.patch using patch, but I was able to apply it "by hand"
by the way I tried to use command : "patch -p0 < <patchfile>", is that the good one ?
4/ at the end I have the /dev/spidev0.[0.1] files after reboot and all tests are OK. :)
the gpiomem stuff was easy except for the <TAB> into Makefile, I had to read it twice :)
5/ finally I was trying to make unicornhathd work so I tried all the stuff from github. https://github.com/pimoroni/unicorn-hat-hd
dnf install -y python3-pip python3-numpy # numpy is used into examples
pip3 install unicornhathd (this will download/compile python3-spidev that is not package into fedora repos - at least I did not find it :) )
git clone https://github.com/pimoroni/unicorn-hat-hd
cd unicorn-hat-hd/examples
python3 ./demo.py
and that's it, it works fine !!
6/ is all this the same for raspberry pi 3B+ for the dtb generation ? I guess so but I am not sure. :)
7/ how can we make all this stuff "official" and by default ?
Thanks !!!
On Wed, Aug 22, 2018 at 9:05 AM RENARD Pierre-Francois pfrenard@gmail.com wrote:
Alessio,
thanks for your job ! :)
I am using arch aarch64 and not armv7hl, and it is also working with a few changes.
1/ dtb are available into directory /boot/dtb/broadcom ( and not /boot/dtb )
that's where we have to cp the new dtb file.
Correct, with aarch64 they've moved (thankfully) to putting them in vendor directories.
2/ dts and dtsi seem to be avaible into the same directory as for aarch64 I found a "includes" from arm directory.
am I wrong on this ?
No, the RPi is a bit of a special case in the dt case, the aarch64 basically is a minimal dts that just includes all the ARMv7 dts.
3/ I was not able to apply patch bcm283x.dtsi.patch using patch, but I was able to apply it "by hand"
by the way I tried to use command : "patch -p0 < <patchfile>", is
that the good one ?
4/ at the end I have the /dev/spidev0.[0.1] files after reboot and all tests are OK. :)
the gpiomem stuff was easy except for the <TAB> into Makefile, I had
to read it twice :)
5/ finally I was trying to make unicornhathd work so I tried all the stuff from github. https://github.com/pimoroni/unicorn-hat-hd
dnf install -y python3-pip python3-numpy # numpy is used into examples pip3 install unicornhathd (this will download/compile
python3-spidev that is not package into fedora repos - at least I did not find it :) )
git clone https://github.com/pimoroni/unicorn-hat-hd cd unicorn-hat-hd/examples python3 ./demo.py and that's it, it works fine !!
6/ is all this the same for raspberry pi 3B+ for the dtb generation ? I guess so but I am not sure. :)
Yes, should be fairly similar across all 3 supported Pis
7/ how can we make all this stuff "official" and by default ?
I'm working, as I get the time, to move all the RPi HAT stuff to be much closer to the way Raspbian works. This will include things like being able to use config.txt to configure most overlays. There's somethings that won't ever be the same (we're never going to enable the legacy gpio interface) but I'm working with various upstreams to try and mitigate that (eg being able to use RPi.GPIO on distros other than Raspbian with the new sane interface) but the RPi support is something I do in my own time and that has been eroded greatly of late. That being said I think I have the config.txt stuff worked out and I'm hoping to be able to test it RSN.
P
this is really cool the only thing i'd change is use dkms to have the gpiomem module built automatically on kernel upgrades