Is SPI Working?
#31
(07-21-2016, 11:59 AM)alevecchio Wrote: The main problem is when i compile the modules, i don't know where the files are and how to put them in place.

Are you doing cross-compiling or compile directly on PineA64 ?

Usually, after compile "make zImage", you also need to compile "make modules".
Then you need to install it into a temporary folder using "make INSTALL_MOD_PATH=$PWD/output modules_install", it will copy all modules into output/lib/modules/3.10.102+.
You simply have to copy this folder into your PineA64 SDCard at lib/modules/3.10.102+.
  Reply
#32
I first tried to compile on Pine. But a lot of errors on the log. Maybe because i used the commands exactly like on github (make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4 LOCALVERSION= Image).
When i compile it on my Ubuntu server i have running on a different machine, it compile ok, but i couldn't make the "make zImage" to work.

Again Martin, i just want to thank you very much for your effort and time to make this work. I was not capable to do in the time i need/have. I really hope to have a new kernel version released as soon as possible to use my new boards.

Smile
  Reply
#33
Ok. Insisting more...

I found this thread on the forum, about compiling a kernel. http://forum.pine64.org/showthread.php?tid=619
It was very easy to follow all the steps. In the end, the kernel version was changed, but /dev/spidev is not there after boot.

Checking with lsmod the module is loaded, but no SPI device listed on /dev.

Anything else to try?
  Reply
#34
Did you enabled it in the DTS ?
(longsleep default DTS have them as "disabled", you need to switch those to "okay")
  Reply
#35
Ok Martin, you were right. Now i enable it, triplechecked everything, including the eth 0x00whatever and nothing.

I even changed the kernel version on the Makefile to be sure it will be a new one, but no SPI on /dev .

Now i will be far from the board for a few days because i will work on the Olympic Games here in Brazil. Thanks for your support.
  Reply
#36
Do you have the spidev section inside the spi definition ?

Some thing like the following :


Code:
               spi@01c68000 {
                       #address-cells = <0x1>;
                       #size-cells = <0x0>;
                       compatible = "allwinner,sun50i-spi";
                       device_type = "spi0";
                       reg = <0x0 0x1c68000 0x0 0x1000>;
                       interrupts = <0x0 0x41 0x4>;
                       clocks = <0x4 0x52>;
                       clock-frequency = <0x5f5e100>;
                       pinctrl-names = "default", "sleep";
                       pinctrl-1 = <0x55>;
                       spi0_cs_number = <0x1>;
                       spi0_cs_bitmap = <0x1>;
                       status = "okay";
                       pinctrl-0 = <0xa7 0xa8>;

                       spidev@0 {
                               compatible = "allwinner,sun50i-spi";
                               reg = <0x0>;
                               spi-max-frequency = <0x2faf080>;
                       };
               };
  Reply
#37
Not sure if i mentioned it somewhere, but the drm Kernel build has spidev as module.
  Reply
#38
(08-02-2016, 12:13 PM)longsleep Wrote: Not sure if i mentioned it somewhere, but the drm Kernel build has spidev as module.

This is good news all around, thanks longsleep !
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#39
(08-02-2016, 12:52 PM)MarkHaysHarris777 Wrote:
(08-02-2016, 12:13 PM)longsleep Wrote: Not sure if i mentioned it somewhere, but the drm Kernel build has spidev as module.

This is good news all around, thanks longsleep !


I have been able to update my kernel to the latest using the update_kernel script found in /usr/local/sbin etc.

I also decompiled, edited and recompiled the .dtb file as Martin mentioned above. 

I'm still not finding anything regarding spi in /dev or in /etc
lsmod also doesn't bring up anything regarding SPI.

Any help on this would be appreciated!


Code:
ubuntu@localhost:~$ uname -r
3.10.102-3-pine64-longsleep
ubuntu@localhost:~$ lsmod
Module                  Size  Used by
vfe_v4l2              747618  0
ir_lirc_codec          12756  0
lirc_dev               17032  1 ir_lirc_codec
ir_jvc_decoder         12487  0
ir_mce_kbd_decoder     12628  0
ir_rc5_decoder         12487  0
ir_sony_decoder        12489  0
ir_sanyo_decoder       12491  0
ir_rc6_decoder         12520  0
w1_gpio                12739  0
ir_nec_decoder         12487  0
sunxi_ir_rx            12902  0
videobuf2_dma_contig    17668  1 vfe_v4l2
wire                   23744  1 w1_gpio
vfe_io                 34085  1 vfe_v4l2
ss                     33083  0
cedar_ve               17368  0
uvcvideo               70966  0
videobuf2_vmalloc      12843  1 uvcvideo
videobuf2_memops       12546  2 videobuf2_vmalloc,videobuf2_dma_contig
videobuf2_core         30952  2 uvcvideo,vfe_v4l2
mali                  199851  0
8723bs               1365012  0
cfg80211              374207  1 8723bs
ubuntu@localhost:~$ cd /dev
ubuntu@localhost:/dev$ ls
autofs           kmsg                ram11      tty13  tty40  ttyS1
block            kvm                 ram12      tty14  tty41  ttyS2
btrfs-control    lirc0               ram13      tty15  tty42  ttyS3
bus              log                 ram14      tty16  tty43  ttyS4
cedar_dev        loop-control        ram15      tty17  tty44  uinput
char             loop0               ram2       tty18  tty45  urandom
console          loop1               ram3       tty19  tty46  v4l
cpu_dma_latency  loop2               ram4       tty2   tty47  vcs
cuse             loop3               ram5       tty20  tty48  vcs1
disk             loop4               ram6       tty21  tty49  vcs2
disp             loop5               ram7       tty22  tty5   vcs3
fb0              loop6               ram8       tty23  tty50  vcs4
fb1              loop7               ram9       tty24  tty51  vcs5
fb2              mali                random     tty25  tty52  vcs6
fb3              mapper              rfkill     tty26  tty53  vcs7
fb4              mem                 rtc        tty27  tty54  vcsa
fb5              mmcblk0             rtc0       tty28  tty55  vcsa1
fb6              mmcblk0p1           shm        tty29  tty56  vcsa2
fb7              mmcblk0p2           snd        tty3   tty57  vcsa3
fd               mqueue              stderr     tty30  tty58  vcsa4
full             net                 stdin      tty31  tty59  vcsa5
fuse             network_latency     stdout     tty32  tty6   vcsa6
hdmi             network_throughput  sunxi-reg  tty33  tty60  vcsa7
hugepages        null                sw_sync    tty34  tty61  video0
i2c-0            psaux               tty        tty35  tty62  zero
i2c-1            ptmx                tty0       tty36  tty63
initctl          pts                 tty1       tty37  tty7
input            ram0                tty10      tty38  tty8
ion              ram1                tty11      tty39  tty9
kmem             ram10               tty12      tty4   ttyS0
ubuntu@localhost:/dev$ ls /etc/
ImageMagick-6           hostname              polkit-1
NetworkManager          hosts                 ppp
UPower                  hosts.allow           profile
X11                     hosts.deny            profile.d
acpi                    hp                    protocols
adduser.conf            ifplugd               pulse
alternatives            init                  purple
anacrontab              init.d                python
apache2                 initramfs-tools       python2.7
apm                     inputrc               python3
apparmor                insserv               python3.5
apparmor.d              insserv.conf          rc.local
apport                  insserv.conf.d        rc0.d
apt                     inxi.conf             rc1.d
at-spi2                 iproute2              rc2.d
avahi                   issue                 rc3.d
bash.bashrc             issue.net             rc4.d
bash_completion.d       java-8-openjdk        rc5.d
bindresvport.blacklist  kbd                   rc6.d
binfmt.d                kernel                rcS.d
bluetooth               ld.so.cache           resolv.conf
brlapi.key              ld.so.conf            resolvconf
brltty                  ld.so.conf.d          rmt
brltty.conf             ldap                  rpc
ca-certificates         legal                 rsyslog.conf
ca-certificates.conf    libao.conf            rsyslog.d
calendar                libaudit.conf         samba
chatscripts             libgda-5.0            sane.d
compizconfig            libnl-3               securetty
console-setup           libpaper.d            security
cron.d                  libreoffice           selinux
cron.daily              lightdm               sensors.d
cron.hourly             lighttpd              sensors3.conf
cron.monthly            locale.alias          services
cron.weekly             locale.gen            sgml
crontab                 localtime             shadow
cups                    logcheck              shadow-
cupshelpers             login.defs            shells
dbus-1                  logrotate.conf        signon-ui
debconf.conf            logrotate.d           signond.conf
debian_version          lsb-release           skel
default                 machine-id            sound
deluser.conf            magic                 speech-dispatcher
depmod.d                magic.mime            ssh
dhcp                    mailcap               ssl
dictionaries-common     mailcap.order         subgid
dnsmasq.d               manpath.config        subgid-
dpkg                    mate-settings-daemon  subuid
drirc                   menu-methods          subuid-
emacs                   mime.types            sudoers
environment             mke2fs.conf           sudoers.d
esound                  modprobe.d            sysctl.conf
ffserver.conf           modules               sysctl.d
firefox                 modules-load.d        systemd
fonts                   motion                terminfo
fstab                   mplayer               thunderbird
fuse.conf               mtab                  timezone
gai.conf                mysql                 tmpfiles.d
gconf                   nanorc                ucf.conf
gdb                     netscsid.conf         udev
ghostscript             network               udisks2
gnome                   networks              ufw
gnome-app-install       newt                  update-manager
gnome-system-tools      nsswitch.conf         update-motd.d
groff                   ntp.conf              update-notifier
group                   openal                usb_modeswitch.conf
group-                  opt                   usb_modeswitch.d
gshadow                 os-release            vdpau_wrapper.cfg
gshadow-                pam.conf              vim
gss                     pam.d                 vtrgb
gtk-2.0                 papersize             wgetrc
gtk-3.0                 passwd                wodim.conf
guest-session           passwd-               wpa_supplicant
gufw                    perl                  xdg
hddtemp.db              pki                   xml
hdparm.conf             pm                    xrdb
host.conf               pnm2ppa.conf
ubuntu@localhost:/dev$
  Reply
#40
any update about spi? I can't see /dev/
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  touch screen not working mike280z 1 3,600 12-22-2016, 12:46 PM
Last Post: Bluphire
  RaZberry Module (z-wave) need support to get it working! Luxus 13 18,711 11-03-2016, 02:04 AM
Last Post: Luxus

Forum Jump:


Users browsing this thread: 2 Guest(s)