[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-08-30 Thread adpdyj+4aw13di0ccx1w
this is really cool
the only thing i'd change is use dkms to have the gpiomem module built 
automatically on kernel upgrades
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/arm@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-08-22 Thread RENARD Pierre-Francois

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 < ", 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  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 !!!

___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/arm@lists.fedoraproject.org/message/RBT3DTYZQDILO3OMWDO6IN36JDG3TBBJ/


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-08-18 Thread Alessio Ciregia
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: 

Ciao
A.
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/arm@lists.fedoraproject.org/message/W5L4SNMW7GSYWGLTTJ4YHAX4Z6E3HJSX/


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-08-14 Thread Alessio Ciregia
> 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] 

Ciao,
A.
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/arm@lists.fedoraproject.org/message/PWXEHOIM3LA2BQ6VELN4JVN2S5L34JIU/


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-24 Thread Peter Robinson
On Tue, Apr 24, 2018 at 3:39 PM, pfrenard  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  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
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-24 Thread pfrenard

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  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 :)



never mind I'll try to make spi work !


Fox

___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-24 Thread RENARD Pierre-Francois

On 04/24/2018 12:39 PM, Peter Robinson wrote:

On Tue, Apr 24, 2018 at 7:35 AM, pfrenard  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



___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-24 Thread Peter Robinson
On Tue, Apr 24, 2018 at 11:35 AM, Peter Robinson  wrote:
> On Sun, Apr 22, 2018 at 4:30 PM, pfrenard  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
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-24 Thread Alessio Ciregia
2018-04-24 12:35 GMT+02:00 Peter Robinson :
> On Sun, Apr 22, 2018 at 4:30 PM, pfrenard  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.
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-24 Thread Peter Robinson
On Tue, Apr 24, 2018 at 7:35 AM, pfrenard  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
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-24 Thread Peter Robinson
On Sun, Apr 22, 2018 at 4:30 PM, pfrenard  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-le...@lists.fedoraproject.org
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-24 Thread adpdyj+4aw13di0ccx1w
> (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!
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-23 Thread adpdyj+4aw13di0ccx1w
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*
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-23 Thread pfrenard

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
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-23 Thread pfrenard

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

___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-22 Thread adpdyj+4aw13di0ccx1w
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
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-22 Thread pfrenard

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
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-21 Thread pfrenard

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: 2045 (nzCv daif +PAN -UAO)
[   27.267518] pc : gpiod_set_value+0x60/0x68
[   27.277239] lr : gpiod_set_value+0x30/0x68
[   27.286793] sp : 0804bbc0
[   27.295392] x29: 0804bbc0 x28: 
[   27.305921] x27: 800037073fb8 x26: 08c8e008
[   27.316398] x25:  x24: 002c
[   27.326889] x23: 013f40b8 x22: 
[   27.337376] x21:  x20: 
[   27.347862] x19: 800031f76b00 x18: 00ef
[   27.358353] x17:  x16: 
[   27.368820] x15: 5f2acaff6414 x14: 000c
[   27.379257] x13: 0001 x12: 
[   27.389681] x11: 0003 x10: 0101010101010101
[   27.399951] x9 : 01fefefefefefeff x8 : 800030de1b00
[   27.410086] x7 : 88007c80 x6 : 7ec37840
[   27.410095] x5 : 8d6b x4 : 80003e51d8e0
[   27.410102] x3 : 8d6c x2 : 800034794a28
[   27.410109] x1 : 800035d12400 x0 : 0001
[   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: 2045 (nzCv daif +PAN -UAO)
[   27.687335] pc : gpiod_set_value+0x60/0x68
[   27.687343] lr : gpiod_set_value+0x30/0x68
[   27.687346] sp : 0804bb50
[   27.687349] x29: 0804bb50 x28: 
[   27.687357] x27: 800037073fb8 x26: 08c8e008
[   27.687365] x25:  x24: 002c
[   27.687372] x23: 013f40b8 x22: fffe
[   27.687380] x21: 0001 x20: 0001
[   27.687387] x19: 800031f76b00 x18: 
[   27.687394] x17:  x16: 
[   27.687402] x15: 00aa x14: 0e200e200e200e20
[   27.687410] x13: 0001 x12: 
[   27.687417] x11: 00bb3088 

[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-15 Thread adpdyj+4aw13di0ccx1w
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
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-15 Thread Pierre-Francois RENARD
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
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-15 Thread adpdyj+4aw13di0ccx1w
>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 = ;
};
+   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 = < BCM2835_CLOCK_VPU>;
#address-cells = <1>;
#size-cells = <0>;
-   status = "disabled";
+   status = "okay";
+   /* Add alias */
+   dmas = < 6>, < 7>;
+   dma-names = "tx", "rx";
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins _cs_pins>;
+   cs-gpios = < 8 1>, < 7 1>;
+
+   spidev0: spidev@0{
+   compatible = "spidev";
+   reg = <0>;  /* CE0 */
+   #address-cells = <1>;
+   #size-cells = <0>;
+   spi-max-frequency = <12500>;
+   };
+
+   spidev1: spidev@1{
+   compatible = "spidev";
+   reg = <1>;  /* CE1 */
+   #address-cells = <1>;
+   #size-cells = <0>;
+   spi-max-frequency = <12500>;
+   };
};
 
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
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-14 Thread Pierre-Francois RENARD
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 ? 
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-10 Thread adpdyj+4aw13di0ccx1w
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
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-10 Thread Pierre-Francois RENARD
If you need me to run a few commands or give you any logs, tell me :)
Fox
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-09 Thread Peter Robinson
On Mon, Apr 9, 2018 at 10:04 PM, Pierre-Francois RENARD
 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
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org


[fedora-arm] Re: [RaspberryPI 3B] [unicorn Hat] [how to configure spi]

2018-04-09 Thread Pierre-Francois RENARD

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
___
arm mailing list -- arm@lists.fedoraproject.org
To unsubscribe send an email to arm-le...@lists.fedoraproject.org