SPI-enable doesn't work outside Ubuntu (if it works at all)

Options
Michael Wachs
Michael Wachs New Member Posts: 19
Hello,

The content of "SPI-enable.zip" does not seem to work outside Ubuntu (if it works at all).

I use UP² board with the newest firmware "upa1am21".

I would never install Ubuntu. Among other things because the packages are outdated and incompatible with software/libraries I use.

What I did to get it running under Archlinux:

I got the zip file, investigated its content and found a simple way to get it runnung.

I configure and use the newest mainline kernel 4.13.2, because the kernel (4.12.12) from archlinux
distribution (archlinux-2017.09.01-x86-64.iso) generates some unfaithful error messages.
I hate warnings and error messages in the kernel output...

* Linux kernel configuration:
Device Drivers --> SPI support
<*> PXA2xx SSP SPI master

(I'm not sure if other driver from this menu are required)

Power management and ACPI options --> ACPI Support
[*] Deprecated power /proc/acpi directories
[*] Allow supported ACPI revision to be overridden
[*] Allow upgrading ACPI tables via initrd

I think other setting in this menu are unimportant at first.
I need the entries in "/proc/acpi".
* mkottman's acpi_call kernel module
Maybe it is not necessary for this project, but I need it for other things.
* Provisioning of the files "spidev1.x.aml":
Because Archlinux doesn't provide "acpica-tools" (we need iasl), I got the
source code "acpica-unix-20170831".
In few minutes it's compiled and installed.

Input :
iasl spidev1.0.asl
Output :
ASL Input: spidev1.0.asl - 31 lines, 1064 bytes, 5 keywords
AML Output: spidev1.0.aml - 183 bytes, 5 named objects, 0 executable opcodes

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations

Input :
iasl spidev1.1.asl
Output :
ASL Input: spidev1.1.asl - 31 lines, 1064 bytes, 5 keywords
AML Output: spidev1.1.aml - 183 bytes, 5 named objects, 0 executable opcodes

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations

The resulting files must find a way to the directory "/kernel/firmware/acpi".
See also documentaion in linux mainline kernel "Documentation/acpi/initrd_table_override.txt"!

The file "/etc/mkinitcpio.conf" must know about the existence of these files:
...........................................................................
# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way. This is useful for config files.
FILES="/kernel/firmware/acpi/spidev1.0.aml /kernel/firmware/acpi/spidev1.1.aml"
...........................................................................

Create an initramfs with this files:
mkinitcpio --kernel /boot/vmlinuz --generate /boot/initramfs.img

Inspect the resulting initramfs by command "lsinitcpio /boot/initramfs.img":
...........................................................................
buildconfig
config
kernel
kernel/firmware
kernel/firmware/acpi
kernel/firmware/acpi/spidev1.1.aml
kernel/firmware/acpi/spidev1.0.aml
hooks
...
...........................................................................

THAT'S ALL! Finito!

After reboot the device files "/dev/spi<what ever>" are not available!

I've attached some important files:
- kernel config file "config-4.13.2"
- dmesg output "dmesg-4.13.2.log"
- content of the sysfs "sysfs-pxa2xx-spi.10" and "sysfs-pxa2xx-spi.11"

in the "attachment.tar.gz"

Thanks in advance,
Michael