Looking for programming guide to enable SPI on Hikey with Android running onit

Looking for programming guide to enable SPI on Hikey with Android running onit.

Hi @niruyadla,

The HiKey SoC reference is here (https://github.com/96boards/documentation/blob/master/hikey/Hi6220V100_Multi-Mode_Application_Processor_Function_Description.pdf). It doesn’t contain the SPI register info because they’re based on the ARM PL022, so you can get the register info here instead: http://infocenter.arm.com/help/topic/com.arm.doc.ddi0194g/DDI0194G_ssp_pl022_r1p3_trm.pdf, but all the low level stuffs should have already been taken care of for you anyway.

You can also refer to this thread (https://lists.96boards.org/pipermail/dev/2015-November/000519.html, https://lists.96boards.org/pipermail/dev/2015-November/000520.html) to see how other users have enabled, used and tested SPI. This is for Linux, but should at least give you some good starting point.

HTH

You can also find some sample SPI code/tutorial here for the Linker Mezzanine module:
http://linksprite.com/wiki/index.php5?title=Linker_Mezzanine_card_starter_kit_for_96board#Tutorials

These tutorials use libsoc to interface with the SPI.
The SPI related tutorials are:
Sliding rheostat
Photoresistor
Touch sensor and LED

If you use/adapt these, please note that the code (GPIO pin numbers) are based on the Dragonboard so you’ll have to adjust for HiKey.

Thanks for your information,Tried following to bring up SPI on HiKey board with AOSP build

Step1: Made (8,10,12 and 14 pins on 40 pin connector used for SPI)connections between Hikey Board and Audio DSP(FPGA Board) .
Step2: Checked SPI,if spi device is listed by going to $adb shell and go to $cd /sys/devices/smb
>>>>However we could not find spi device listed.

Step3: Does HiKey support automated discovery/enumeration of SPI slave device, which is connected via low speed expansion connector?

When I run below command at Hikey shell it shows following.
hikey:/ $ find / -name “spi*”
/sys/bus/spi
/sys/devices/platform/soc/f7106000.spi/spi_master
/sys/devices/platform/soc/f7106000.spi/spi_master/spi0
/sys/devices/platform/soc/f7106000.spi/spi_master/spi0/statistics/spi_sync_immediate
/sys/devices/platform/soc/f7106000.spi/spi_master/spi0/statistics/spi_sync
/sys/devices/platform/soc/f7106000.spi/spi_master/spi0/statistics/spi_async
/sys/class/spi_master
/sys/class/spi_master/spi0
/sys/firmware/devicetree/base/soc/pinmux@f7010000/spi0_pmx_func
/sys/firmware/devicetree/base/soc/pinmux@f7010800/spi0_cfg_func
/sys/firmware/devicetree/base/soc/spi@f7106000
/sys/firmware/devicetree/base/aliases/spi0

I could not find SPI slave device.
Please help me, If I am missing something in Hikey-linakro kernel to automatically detect the SPI slave device.

@niruyadla

Someone correct me if I’m wrong, but I don’t believe the slave device shows up on the target board (HiKey)'s file system. Just make the connections and then try to run your program to talk to the slave. It would be helpful (necessary I would say) to have a logic analyzer to see if the signals are coming out properly from the HiKey pins.

If it is not listed in the target board (HiKey)’s file system.
How can we write program to open device?
fd = open("/dev/spidev1.1", O_RDWR);
if (fd < 0){
pabort(“can’t open device”);
}

Sorry, you’re right. I got confused with something else I’m currently doing that’s not going through linux user space.

Anyway, if you want to use spidev, the threads mentioned above (also below) showed how to get spidev up.
https://lists.96boards.org/pipermail/dev/2015-November/000519.html
http://www.96boards.org/forums/topic/hikey-board-spi/ -> this is for hikey.
https://www.96boards.org/forums/topic/how-to-enable-spi-and-access-it-in-debian-os/ -> this is for the dragonboard, but a good reference.

You need to check the kernel source for your build, and make sure there are spidev nodes in the DT like below:

If not using spidev, then you need to add your device to the DT.

HTH

Used below patch and I could see device listed at “/dev/spidev0.0”
diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
index 466985a8…027d08a8 100644
— a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi
@@ -681,6 +681,7 @@
spi_0: spi@f7106000 {
compatible = “arm,pl022”, “arm,primecell”;
reg = <0x0 0xf7106000 0x0 0x1000>;
interrupts = <0 50 4>;
bus-id = <0>;
enable-dma = <0>;
@@ -691,6 +692,12 @@
num-cs = <1>;
cs-gpios = <&gpio6 2 0>;
status = “ok”;

  •   	spidev@0 {
    
  •   		compatible = "spidev";
    
  •   		reg = &lt;0x0&gt;;
    
  •   		spi-max-frequency=&lt;12000000&gt;;
    
  •   	};
      };
    
      i2c0: i2c@f7100000 {
    

diff --git a/arch/arm64/configs/hikey_defconfig b/arch/arm64/configs/hikey_defconfig
index d0d6180…10553a1 100644
— a/arch/arm64/configs/hikey_defconfig
+++ b/arch/arm64/configs/hikey_defconfig
@@ -275,6 +275,7 @@ CONFIG_I2C_CHARDEV=y
CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_SPI=y
CONFIG_SPI_PL022=y
+CONFIG_SPI_SPIDEV=y
CONFIG_PINCTRL_SINGLE=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_PL061=y

I have tried this patch and built the images. But when i flashed the images to the board it was not listing the spidev. Is it required to build the boot.img (kernel) seperately again?

Does this patch method working in the new version of AOSP as well? I was able to do this with the older version of AOSP. But somehow it is not working with platform/manifest - Git at Google -b master and kernel/hikey-linaro - Git at Google (kernel)
I am able to build it… But spidev0.0 is not being listed in the /dev

Hi,

  1. Are there any differences in arch/arm64/boot/dts/hisilicon/* between the old and new version?
  2. Do you see a warning with full complete backtrace for spidev while booting?
  3. What branch are you using for the kernel? master?
  4. Can you list steps to build or reproduce?
  1. Yes. I can see majorly the following differences in the older version and the new version,
    a. In the hi6220-hikey.dts file the following entry is present which was not there previously
&amp;spi_0 {
	#address-cells = &lt;1&gt;;
	#size-cells = &lt;0&gt;;
	status = &quot;ok&quot;;

	spidev@0 {
		compatible = &quot;linux,spidev&quot;;
		spi-max-frequency = &lt;1280000&gt;;
		reg = &lt;0&gt;;
		status = &quot;ok&quot;;
	};
};

b. In the hi6220.dtsi the following has been changed in the spi_0: spi@f7106000 entry
clocks = <&clock_sys HI6220_SPI_CLK>;
to
clocks = <&sys_ctrl HI6220_SPI_CLK>;

2.i am working on the device remotely using adb. How to get the backtrace?

  1. No I am referring to android-hikey-linaro-4.4 as per https://source.android.com/source/devices.html

  2. I followed the same excact procedure defined in https://source.android.com/source/devices.html. The only difference is after git checkout -b android-hikey-linaro-4.4 origin/android-hikey-linaro-4.4 in the building kernel section i will update the hi6220.dtsi and hikey_defconfig . Then i will build the kernel and bootimage as specified

I am able to see /sys/class/spi_master and /sys/class/spidev. But spi_master is enabled and i can see spi0 and other directories inside sp0 where spidev is empty.

1a. Is the new version you’re looking at arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts - kernel/hikey-linaro - Git at Google? If yes, then the contents of the spi_0 node is slightly different than the one you’d posted above, i.e. status is “disabled” vs “ok”. Does the one you’d posted reflect changes you’d made?

1b. Can you please provide the url and branch name for the old version you’re using?

  1. Do you have access to the uart serial console? That will allow you to see the boot log on power up.

  2. In any case, I think the changes to hi6220.dtsi is duplicating the one in hi6220-hikey.dts. So please try these changes:

In arch/arm64/boot/dts/hisilicon/hi6220.dtsi - kernel/hikey-linaro - Git at Google

Just replace
status = "disabled";
with
status = "ok";

Do NOT add in the spidev node.

In arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts - kernel/hikey-linaro - Git at Google, just delete line 444 which says “status = “disabled”;” or change “disabled” to “ok”.

Also remember to set “CONFIG_SPI_SPIDEV=y” as you’re already doing for hikey_defconfig.

Hopefully that’ll work.

Also remember to set “CONFIG_SPI_SPIDEV=y” as you’re already doing for hikey_defconfig.

You meant to say in the hikey_defconfig i should set “CONFIG_SPI_SPIDEV=y”. Or in some other file as well i should do this?

Sorry for not being clear. Just in hikey_defconfig.

Here is the boot log that u asked:

[    0.396419] vdso: 2 pages (1 code @ ffffff8008c75000, 1 data @ ffffff8009528000)
[    0.396451] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.397905] DMA: preallocated 256 KiB pool for atomic allocations
[    0.398072] Serial: AMBA PL011 UART driver
[    0.402128] f8015000.uart: ttyAMA0 at MMIO 0xf8015000 (irq = 7, base_baud = 0) is a PL011 rev2
[    0.402830] uart-pl011 f7111000.uart: could not find pctldev for node /soc/pinmux@f7010000/uart1_pmx_func, deferring probe
[    0.403239] uart-pl011 f7112000.uart: could not find pctldev for node /soc/pinmux@f7010000/uart2_pmx_func, deferring probe
[    0.415094] hi6220-mbox f7510000.mailbox: Mailbox enabled
[    0.421052] console [pstore-1] enabled
[    0.421368] pstore: Registered ramoops as persistent store backend
[    0.421381] ramoops: attached 0x100000@0x21f00000, ecc: 0/0
[    0.544351] raid6: int64x1  gen()   464 MB/s
[    0.612389] raid6: int64x1  xor()   455 MB/s
[    0.680570] raid6: int64x2  gen()   692 MB/s
[    0.748656] raid6: int64x2  xor()   602 MB/s
[    0.816844] raid6: int64x4  gen()  1003 MB/s
[    0.884923] raid6: int64x4  xor()   738 MB/s
[    0.953074] raid6: int64x8  gen()  1035 MB/s
[    1.021180] raid6: int64x8  xor()   727 MB/s
[    1.089305] raid6: neonx1   gen()   689 MB/s
[    1.157445] raid6: neonx1   xor()   689 MB/s
[    1.225574] raid6: neonx2   gen()  1088 MB/s
[    1.293708] raid6: neonx2   xor()   962 MB/s
[    1.361858] raid6: neonx4   gen()  1444 MB/s
[    1.429961] raid6: neonx4   xor()  1112 MB/s
[    1.498078] raid6: neonx8   gen()  1276 MB/s
[    1.566215] raid6: neonx8   xor()  1063 MB/s
[    1.566226] raid6: using algorithm neonx4 gen() 1444 MB/s
[    1.566236] raid6: .... xor() 1112 MB/s, rmw enabled
[    1.566246] raid6: using intx1 recovery algorithm
[    1.566775] ACPI: Interpreter disabled.
[    1.567677] vgaarb: loaded
[    1.568302] SCSI subsystem initialized
[    1.568750] libata version 3.00 loaded.
[    1.568863] ssp-pl022 f7106000.spi: could not find pctldev for node /soc/pinmux@f7010000/spi0_pmx_func, deferring probe
[    1.569651] usbcore: registered new interface driver usbfs
[    1.569772] usbcore: registered new interface driver hub
[    1.570010] usbcore: registered new device driver usb
[    1.570626] i2c_designware f7100000.i2c: could not find pctldev for node /soc/pinmux@f7010000/i2c0_pmx_func, deferring probe
[    1.570674] i2c_designware f7101000.i2c: could not find pctldev for node /soc/pinmux@f7010000/i2c1_pmx_func, deferring probe
[    1.570714] i2c_designware f7102000.i2c: could not find pctldev for node /soc/pinmux@f7010000/i2c2_pmx_func, deferring probe
[    1.570917] Linux video capture interface: v2.00
[    1.571607] dmi: Firmware registration failed.
[    1.572409] Advanced Linux Sound Architecture Driver Initialized.
[    1.573399] Bluetooth: Core ver 2.21
[    1.573527] NET: Registered protocol family 31
[    1.573538] Bluetooth: HCI device and connection manager initialized
[    1.573558] Bluetooth: HCI socket layer initialized
[    1.573576] Bluetooth: L2CAP socket layer initialized
[    1.573655] Bluetooth: SCO socket layer initialized
[    1.574442] NetLabel: Initializing
[    1.574453] NetLabel:  domain hash size = 128
[    1.574462] NetLabel:  protocols = UNLABELED CIPSOv4
[    1.574527] NetLabel:  unlabeled traffic allowed by default
[    1.575139] clocksource: Switched to clocksource arch_sys_counter
[    1.731955] pnp: PnP ACPI: disabled
[    1.745472] NET: Registered protocol family 2
[    1.746329] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
[    1.746484] TCP bind hash table entries: 16384 (order: 6, 262144 bytes)
[    1.746743] TCP: Hash tables configured (established 16384 bind 16384)
[    1.746821] UDP hash table entries: 1024 (order: 3, 32768 bytes)
[    1.746873] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes)
[    1.747354] NET: Registered protocol family 1
[    1.747914] RPC: Registered named UNIX socket transport module.
[    1.747924] RPC: Registered udp transport module.
[    1.747932] RPC: Registered tcp transport module.
[    1.747940] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.747962] PCI: CLS 0 bytes, default 128
[    1.748387] Trying to unpack rootfs image as initramfs...
[    1.832867] Freeing initrd memory: 1796K (ffffffc03830e000 - ffffffc0384cf000)
[    1.833848] kvm [1]: interrupt-controller@f6804000 IRQ6
[    1.834127] kvm [1]: timer IRQ3
[    1.834155] kvm [1]: Hyp mode initialized successfully
[    1.839873] futex hash table entries: 2048 (order: 6, 262144 bytes)
[    1.840038] audit: initializing netlink subsys (disabled)
[    1.840109] audit: type=2000 audit(1.783:1): initialized
[    1.841319] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    1.841839] VFS: Disk quotas dquot_6.6.0
[    1.841918] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    1.842389] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.842956] NFS: Registering the id_resolver key type
[    1.843010] Key type id_resolver registered
[    1.843020] Key type id_legacy registered
[    1.843395] fuse init (API version 7.23)
[    1.843891] 9p: Installing v9fs 9p2000 file system support
[    1.844101] SELinux:  Registering netfilter hooks
[    1.849181] io scheduler noop registered
[    1.849276] io scheduler cfq registered (default)
[    1.851778] pinctrl-single f7010000.pinmux: 159 pins at pa ffffff800972c000 size 636
[    1.852521] pinctrl-single f7010800.pinmux: 163 pins at pa ffffff800972e800 size 652
[    1.852863] pinctrl-single f8001800.pinmux: 30 pins at pa ffffff8009730800 size 120
[    1.853720] pl061_gpio f8011000.gpio: PL061 GPIO chip @0x00000000f8011000 registered
[    1.854102] pl061_gpio f8012000.gpio: PL061 GPIO chip @0x00000000f8012000 registered
[    1.854453] pl061_gpio f8013000.gpio: PL061 GPIO chip @0x00000000f8013000 registered
[    1.854817] pl061_gpio f8014000.gpio: PL061 GPIO chip @0x00000000f8014000 registered
[    1.855239] pl061_gpio f7020000.gpio: PL061 GPIO chip @0x00000000f7020000 registered
[    1.855619] pl061_gpio f7021000.gpio: PL061 GPIO chip @0x00000000f7021000 registered
[    1.855967] pl061_gpio f7022000.gpio: PL061 GPIO chip @0x00000000f7022000 registered
[    1.856334] pl061_gpio f7023000.gpio: PL061 GPIO chip @0x00000000f7023000 registered
[    1.856680] pl061_gpio f7024000.gpio: PL061 GPIO chip @0x00000000f7024000 registered
[    1.857043] pl061_gpio f7025000.gpio: PL061 GPIO chip @0x00000000f7025000 registered
[    1.857410] pl061_gpio f7026000.gpio: PL061 GPIO chip @0x00000000f7026000 registered
[    1.857769] pl061_gpio f7027000.gpio: PL061 GPIO chip @0x00000000f7027000 registered
[    1.858125] pl061_gpio f7028000.gpio: PL061 GPIO chip @0x00000000f7028000 registered
[    1.858486] pl061_gpio f7029000.gpio: PL061 GPIO chip @0x00000000f7029000 registered
[    1.858846] pl061_gpio f702a000.gpio: PL061 GPIO chip @0x00000000f702a000 registered
[    1.859289] pl061_gpio f702b000.gpio: PL061 GPIO chip @0x00000000f702b000 registered
[    1.859645] pl061_gpio f702c000.gpio: PL061 GPIO chip @0x00000000f702c000 registered
[    1.860009] pl061_gpio f702d000.gpio: PL061 GPIO chip @0x00000000f702d000 registered
[    1.860373] pl061_gpio f702e000.gpio: PL061 GPIO chip @0x00000000f702e000 registered
[    1.860743] pl061_gpio f702f000.gpio: PL061 GPIO chip @0x00000000f702f000 registered
[    1.868043] k3-dma f7370000.dma: initialized
[    1.873897] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.876510] [drm] Initialized drm 1.1.0 20060810
[    1.877326] [drm] wait for external HDMI bridge driver.
[    1.877480] Mali&lt;2&gt;: Inserting Mali v800 device driver. 
[    1.877495] Mali&lt;2&gt;: Compiled: Feb 16 2017, time: 10:10:44.
[    1.877507] Mali&lt;2&gt;: Driver revision: -v3.14-140204-g3578a51
[    1.877520] Mali&lt;2&gt;: mali_module_init() registering driver
[    1.877670] Mali&lt;2&gt;: mali_probe(): Called for platform device 3f100000.mali
[    1.878230] Mali&lt;2&gt;: Mali SWAP: Swap out threshold vaule is 60M
[    1.878276] Mali&lt;2&gt;: Mali memory settings (shared: 0x40000000)
[    1.878291] Mali&lt;2&gt;: Using device defined frame buffer settings (0x00708000@0x3F100000)
[    1.878305] Mali&lt;2&gt;: Memory Validator installed for Mali physical address base=0x3F100000, size=0x00708000
[    1.878326] Mali&lt;2&gt;: Mali PM domain: Creating Mali PM domain (mask=0x00001000)
[    1.878342] Mali&lt;2&gt;: Broadcast: Creating Mali Broadcast unit: Mali_Broadcast
[    1.878376] Mali&lt;2&gt;: Mali PP: Creating Mali PP core: Mali_PP0
[    1.878389] Mali&lt;2&gt;: Mali PP: Base address of PP core: 0xf4088000
[    1.878528] Mali&lt;2&gt;: Found Mali GPU Mali-450 MP r0p0
[    1.879071] Mali&lt;2&gt;: Mali DLBU: Initializing
[    1.879214] Mali&lt;2&gt;: Mali L2 cache: Created Mali_L2:   8K, 4-way, 64byte cache line, 128bit external bus
[    1.879239] Mali&lt;2&gt;: Mali L2 cache: Created Mali_L2: 128K, 4-way, 64byte cache line, 128bit external bus
[    1.879275] Mali&lt;2&gt;: Mali MMU: Creating Mali MMU: Mali_GP_MMU
[    1.879316] Mali&lt;2&gt;: mali_mmu_probe_irq_acknowledge: intstat 0x3
[    1.879327] Mali&lt;2&gt;: Probe: Page fault detect: PASSED
[    1.879336] Mali&lt;2&gt;: Probe: Bus read error detect: PASSED
[    1.879368] Mali&lt;2&gt;: Mali GP: Creating Mali GP core: Mali_GP
[    1.879423] Mali&lt;2&gt;: Mali MMU: Creating Mali MMU: Mali_PP0_MMU
[    1.879460] Mali&lt;2&gt;: mali_mmu_probe_irq_acknowledge: intstat 0x3
[    1.879469] Mali&lt;2&gt;: Probe: Page fault detect: PASSED
[    1.879478] Mali&lt;2&gt;: Probe: Bus read error detect: PASSED
[    1.879506] Mali&lt;2&gt;: Mali PP: Creating Mali PP core: Mali_PP0
[    1.879519] Mali&lt;2&gt;: Mali PP: Base address of PP core: 0xf4088000
[    1.879585] Mali&lt;2&gt;: Mali MMU: Creating Mali MMU: Mali_PP1_MMU
[    1.879627] Mali&lt;2&gt;: mali_mmu_probe_irq_acknowledge: intstat 0x3
[    1.879637] Mali&lt;2&gt;: Probe: Page fault detect: PASSED
[    1.879645] Mali&lt;2&gt;: Probe: Bus read error detect: PASSED
[    1.879674] Mali&lt;2&gt;: Mali PP: Creating Mali PP core: Mali_PP1
[    1.879686] Mali&lt;2&gt;: Mali PP: Base address of PP core: 0xf408a000
[    1.879748] Mali&lt;2&gt;: Mali MMU: Creating Mali MMU: Mali_PP2_MMU
[    1.879788] Mali&lt;2&gt;: mali_mmu_probe_irq_acknowledge: intstat 0x3
[    1.879797] Mali&lt;2&gt;: Probe: Page fault detect: PASSED
[    1.879806] Mali&lt;2&gt;: Probe: Bus read error detect: PASSED
[    1.879834] Mali&lt;2&gt;: Mali PP: Creating Mali PP core: Mali_PP2
[    1.879847] Mali&lt;2&gt;: Mali PP: Base address of PP core: 0xf408c000
[    1.879909] Mali&lt;2&gt;: Mali MMU: Creating Mali MMU: Mali_PP3_MMU
[    1.879948] Mali&lt;2&gt;: mali_mmu_probe_irq_acknowledge: intstat 0x3
[    1.879957] Mali&lt;2&gt;: Probe: Page fault detect: PASSED
[    1.879965] Mali&lt;2&gt;: Probe: Bus read error detect: PASSED
[    1.879994] Mali&lt;2&gt;: Mali PP: Creating Mali PP core: Mali_PP3
[    1.880007] Mali&lt;2&gt;: Mali PP: Base address of PP core: 0xf408e000
[    1.880060] Mali&lt;2&gt;: Starting new virtual group for MMU PP broadcast core Mali_PP_MMU_Broadcast
[    1.880074] Mali&lt;2&gt;: Mali DLBU: Creating Mali dynamic load balancing unit: Mali_DLBU
[    1.880095] Mali&lt;2&gt;: Broadcast: Creating Mali Broadcast unit: Mali_Broadcast
[    1.880115] Mali&lt;2&gt;: Mali MMU: Creating Mali MMU: Mali_PP_MMU_Broadcast
[    1.880132] Mali&lt;2&gt;: Mali PP: Creating Mali PP core: Mali_PP_Broadcast
[    1.880145] Mali&lt;2&gt;: Mali PP: Base address of PP core: 0xf4096000
[    1.880204] Mali&lt;2&gt;: 4+0 PP cores initialized
[    1.880232] Mali&lt;2&gt;: Mali GPU Timer: 50
[    1.880245] Mali&lt;2&gt;: Mali GPU Utilization: No platform utilization handler installed
[    1.881747] Mali&lt;2&gt;: mali_probe(): Successfully initialized driver for platform device 3f100000.mali
[    1.881931] Mali: Mali device driver loaded
[    1.899819] brd: module loaded
[    1.908877] loop: module loaded
[    1.909412] (stk) :sysfs entries created
[    1.909599] (hci_tty): inside hci_tty_init
[    1.909872] (hci_tty): allocated 250, 0
[    1.909890] (hci_tty): hdev ffffffc074d36000
[    1.910602] (hci_tty): HCI device registered (hdev ffffffc074d36000)
[    1.914784] (hci_tty): called dumb_hci_callback
[    1.918151] tun: Universal TUN/TAP device driver, 1.6
[    1.918170] tun: (C) 1999-2004 Max Krasnyansky &lt;maxk@qualcomm.com&gt;
[    1.919039] (hci_tty): called dumb_hci_send_callback
[    1.919216] PPP generic driver version 2.4.2
[    1.919502] PPP BSD Compression module registered
[    1.919518] PPP Deflate Compression module registered
[    1.919550] PPP MPPE Compression module registered
[    1.919842] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
[    1.919963] usbcore: registered new interface driver pegasus
[    1.920081] usbcore: registered new interface driver rtl8150
[    1.920214] usbcore: registered new interface driver r8152
[    1.920332] usbcore: registered new interface driver asix
[    1.920450] usbcore: registered new interface driver ax88179_178a
[    1.920565] usbcore: registered new interface driver cdc_ether
[    1.920694] usbcore: registered new interface driver dm9601
[    1.920811] usbcore: registered new interface driver CoreChips
[    1.920944] usbcore: registered new interface driver smsc75xx
[    1.921060] usbcore: registered new interface driver smsc95xx
[    1.921176] usbcore: registered new interface driver net1080
[    1.921292] usbcore: registered new interface driver plusb
[    1.921411] usbcore: registered new interface driver cdc_subset
[    1.921536] usbcore: registered new interface driver zaurus
[    1.921653] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[    1.921789] usbcore: registered new interface driver cdc_ncm
[    1.922279] ehci_hcd: USB 2.0 &#039;Enhanced&#039; Host Controller (EHCI) Driver
[    1.922294] ehci-pci: EHCI PCI platform driver
[    1.922419] ehci-platform: EHCI generic platform driver
[    1.922678] ohci_hcd: USB 1.1 &#039;Open&#039; Host Controller (OHCI) Driver
[    1.922724] ohci-pci: OHCI PCI platform driver
[    1.922840] ohci-platform: OHCI generic platform driver
[    1.923297] usbcore: registered new interface driver cdc_acm
[    1.923309] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[    1.923429] usbcore: registered new interface driver usb-storage
[    1.923677] usbcore: registered new interface driver usbserial
[    1.923792] usbcore: registered new interface driver usbserial_generic
[    1.923915] usbserial: USB Serial support registered for generic
[    1.924028] usbcore: registered new interface driver ftdi_sio
[    1.924141] usbserial: USB Serial support registered for FTDI USB Serial Device
[    1.924252] usbcore: registered new interface driver option
[    1.924364] usbserial: USB Serial support registered for GSM modem (1-port)
[    1.924477] usbcore: registered new interface driver pl2303
[    1.924593] usbserial: USB Serial support registered for pl2303
[    1.924712] usbcore: registered new interface driver qcserial
[    1.924826] usbserial: USB Serial support registered for Qualcomm USB modem
[    1.924940] usbcore: registered new interface driver usb_serial_simple
[    1.925049] usbserial: USB Serial support registered for carelink
[    1.925156] usbserial: USB Serial support registered for zio
[    1.925264] usbserial: USB Serial support registered for funsoft
[    1.925376] usbserial: USB Serial support registered for flashloader
[    1.925495] usbserial: USB Serial support registered for google
[    1.925602] usbserial: USB Serial support registered for vivopay
[    1.925715] usbserial: USB Serial support registered for moto_modem
[    1.925824] usbserial: USB Serial support registered for novatel_gps
[    1.925940] usbserial: USB Serial support registered for hp4x
[    1.926049] usbserial: USB Serial support registered for suunto
[    1.926168] usbserial: USB Serial support registered for siemens_mpi
[    1.927088] mousedev: PS/2 mouse device common for all mice
[    1.928686] input: HISI 65xx PowerOn Key as /devices/platform/f8000000.pmic/f8000000.pmic:ponkey@b1/input/input0
[    1.929733] rtc-pl031 f8003000.rtc: rtc core: registered pl031 as rtc0
[    1.930180] i2c /dev entries driver
[    1.937260] hisi_thermal f7030700.tsensor: THERMAL ALARM: T &gt; 0
[    1.937320] hisi_thermal f7030700.tsensor: failed to register sensor id 0: -19
[    1.937333] hisi_thermal f7030700.tsensor: failed to register thermal sensor: -19
[    1.937363] hisi_thermal f7030700.tsensor: failed to register sensor id 1: -19
[    1.937374] hisi_thermal f7030700.tsensor: failed to register thermal sensor: -19
[    1.951205] hisi_thermal f7030700.tsensor: failed to register sensor id 3: -19
[    1.951218] hisi_thermal f7030700.tsensor: failed to register thermal sensor: -19
[    1.951772] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised: dm-devel@redhat.com
[    1.951935] Bluetooth: HCI UART driver ver 2.3
[    1.951950] Bluetooth: HCI UART protocol H4 registered
[    1.952898] (stc):  chnl_id list empty :4 
[    1.952911] (stk) : st_kim_start
[    1.971686] sdhci: Secure Digital Host Controller Interface driver
[    1.971725] sdhci: Copyright(c) Pierre Ossman
[    1.972061] Synopsys Designware Multimedia Card Interface Driver
[    1.974648] dwmmc_k3 f723d000.dwmmc0: fifo-depth property not found, using value of FIFOTH register as default
[    1.974795] dwmmc_k3 f723d000.dwmmc0: IDMAC supports 32-bit address mode.
[    1.975098] dwmmc_k3 f723d000.dwmmc0: Using internal DMA controller.
[    1.975288] dwmmc_k3 f723d000.dwmmc0: Version ID is 250a
[    1.975506] dwmmc_k3 f723d000.dwmmc0: DW MMC controller at irq 39,32 bit host data width,8 deep fifo
[    1.976147] dwmmc_k3 f723d000.dwmmc0: No vqmmc regulator found
[    2.007541] dwmmc_k3 f723d000.dwmmc0: 1 slots initialized
[    2.008001] dwmmc_k3 f723e000.dwmmc1: fifo-depth property not found, using value of FIFOTH register as default
[    2.008107] dwmmc_k3 f723e000.dwmmc1: IDMAC supports 32-bit address mode.
[    2.008252] dwmmc_k3 f723e000.dwmmc1: Using internal DMA controller.
[    2.008268] dwmmc_k3 f723e000.dwmmc1: Version ID is 250a
[    2.008339] dwmmc_k3 f723e000.dwmmc1: DW MMC controller at irq 40,32 bit host data width,128 deep fifo
[    2.008768] dwmmc_k3 f723e000.dwmmc1: Got CD GPIO
[    2.039641] dwmmc_k3 f723e000.dwmmc1: 1 slots initialized
[    2.040163] dwmmc_k3 f723f000.dwmmc2: fifo-depth property not found, using value of FIFOTH register as default
[    2.040226] dwmmc_k3 f723f000.dwmmc2: IDMAC supports 32-bit address mode.
[    2.040543] dwmmc_k3 f723f000.dwmmc2: Using internal DMA controller.
[    2.040558] dwmmc_k3 f723f000.dwmmc2: Version ID is 250a
[    2.040637] dwmmc_k3 f723f000.dwmmc2: DW MMC controller at irq 41,32 bit host data width,128 deep fifo
[    2.041048] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.042767] ledtrig-cpu: registered to indicate activity on CPUs
[    2.043233] hidraw: raw HID events driver (C) Jiri Kosina
[    2.045682] usbcore: registered new interface driver usbhid
[    2.045701] usbhid: USB HID core driver
[    2.046654] ashmem: initialized
[    2.047107] hi6220-irq-debug f7113000.fiq-debugger: No signal IRQ, error=-6
[    2.047160] hi6220-irq-debug f7113000.fiq-debugger: No wakeup IRQ, error=-6
[    2.053578] mmc0: MAN_BKOPS_EN bit is not set
[    2.054957] mmc_host mmc0: Bus speed (slot 0) = 51756522Hz (slot req 52000000Hz, actual 51756522HZ div = 0)
[    2.055948] mmc0: new high speed MMC card at address 0001
[    2.056933] mmcblk0: mmc0:0001 8GND3R 7.28 GiB 
[    2.057402] mmcblk0boot0: mmc0:0001 8GND3R partition 1 4.00 MiB
[    2.057888] mmcblk0boot1: mmc0:0001 8GND3R partition 2 4.00 MiB
[    2.058345] (stk) :ldisc_install = 1
[    2.058346] mmcblk0rpmb: mmc0:0001 8GND3R partition 3 512 KiB
[    2.063404] GPT:partition_entry_array_crc32 values don&#039;t match: 0x47fc96aa != 0xdbcc2084
[    2.063410] GPT: Use GNU Parted to correct GPT errors.
[    2.063448]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10
[    3.055322] (stk) :ldisc installation timeout
[    4.055328] (stk) :ldisc_install = 0
[    4.162347] (stk) : timed out waiting for ldisc to be un-installed
[    4.546446] (stk) :ldisc_install = 1
[    4.546448] console [ttyFIQ0] enabled
[    4.554007] Registered fiq debugger ttyFIQ0
[    4.561016] optee firmware:optee: probing for conduit method from DT.
[    4.567581] optee firmware:optee: api uid mismatch
[    4.572456] optee: probe of firmware:optee failed with error -22
[    4.578781] usbcore: registered new interface driver snd-usb-audio
[    4.585997] hi6210_i2s f7118000.hi6210_i2s: Registered as hi6210_i2s
[    4.593634] hi6210_i2s f7118000.hi6210_i2s: Failed to get DMA channel capabilities, falling back to period counting: -6
[    4.604561] hi6210-hdmi-audio 0.hi6210_hdmi_card: hi6210_hdmi_dai &lt;-&gt; f7118000.hi6210_i2s mapping ok
[    4.618027] u32 classifier
[    4.620792]     Actions configured
[    4.624260] Netfilter messages via NETLINK v0.30.
[    4.629102] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[    4.636260] ctnetlink v0.93: registering with nfnetlink.
[    4.642310] xt_time: kernel timezone is -0000
[    4.647040] ip_tables: (C) 2000-2006 Netfilter Core Team
[    4.652634] arp_tables: (C) 2002 David S. Miller
[    4.657393] Initializing XFRM netlink socket
[    4.663925] NET: Registered protocol family 10
[    4.672842] mip6: Mobile IPv6
[    4.675906] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    4.681649] sit: IPv6 over IPv4 tunneling driver
[    4.687101] NET: Registered protocol family 17
[    4.691639] NET: Registered protocol family 15
[    4.696184] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    4.708973] Bridge firewalling registered
[    4.713631] Bluetooth: RFCOMM TTY layer initialized
[    4.718587] Bluetooth: RFCOMM socket layer initialized
[    4.723692] cfg80211: Timeout while waiting for CRDA to reply, restoring regulatory settings
[    4.723702] cfg80211: Restoring regulatory settings
[    4.723726] cfg80211: Kicking the queue
[    4.723839] Bluetooth: RFCOMM ver 1.11
[    4.727659] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[    4.733670] Bluetooth: HIDP socket layer initialized
[    4.738810] 8021q: 802.1Q VLAN Support v1.8
[    4.743438] 9pnet: Installing 9P2000 support
[    4.747877] Key type dns_resolver registered
[    4.753128] Registered cp15_barrier emulation handler
[    4.758804] Registered setend emulation handler
[    4.764075] registered taskstats version 1
[    4.776069] Btrfs loaded
[    4.781169] Key type encrypted registered
[    4.786205] f7111000.uart: ttyAMA1 at MMIO 0xf7111000 (irq = 8, base_baud = 0) is a PL011 rev2
[    4.795619] f7112000.uart: ttyAMA2 at MMIO 0xf7112000 (irq = 9, base_baud = 0) is a PL011 rev2
[    4.805537] ssp-pl022 f7106000.spi: ARM PL022 driver, device ID: 0x00041022
[    4.812690] ssp-pl022 f7106000.spi: mapped registers from 0x00000000f7106000 to ffffff80099c2000
[    4.823255] spidev spi0.0: buggy DT: spidev listed directly in DT
[    4.829485] ------------[ cut here ]------------
[    4.834151] WARNING: at drivers/spi/spidev.c:719
[    4.838815] 
[    4.840323] CPU: 5 PID: 1144 Comm: kworker/u16:4 Not tainted 4.4.43-140204-g3578a51-dirty #4
[    4.848851] Hardware name: HiKey Development Board (DT)
[    4.854147] Workqueue: deferwq deferred_probe_work_func
[    4.859434] task: ffffffc074f70e00 ti: ffffffc074150000 task.ti: ffffffc074150000
[    4.867002] PC is at spidev_probe+0x1b4/0x1d0
[    4.871405] LR is at spidev_probe+0x1b0/0x1d0
[    4.875806] pc : [&lt;ffffff80087182ac&gt;] lr : [&lt;ffffff80087182a8&gt;] pstate: 80400045
[    4.883280] sp : ffffffc0741537d0
[    4.886626] x29: ffffffc0741537d0 x28: ffffffc0740dad48 
[    4.892006] x27: 0000000000000001 x26: 0000000000000000 
[    4.897384] x25: 0000000000000000 x24: 0000000000000005 
[    4.902762] x23: ffffffc0740da000 x22: 0000000000000001 
[    4.908141] x21: 0000000000000000 x20: ffffff80095e5530 
[    4.913519] x19: ffffff8008d0cf18 x18: 0000000000000000 
[    4.918896] x17: 0000000000000000 x16: 0000000000000000 
[    4.924274] x15: 0000000000000000 x14: 0ffffffffffffffe 
[    4.929651] x13: 0000000000000030 x12: 0000000000000020 
[    4.935029] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f 
[    4.940407] x9 : fefefeff75646368 x8 : 7f7f7f7f7f7f7f7f 
[    4.945785] x7 : 6f722b77746d686b x6 : 0000000000000000 
[    4.951162] x5 : ffffffc074153760 x4 : ffffffc07bf64090 
[    4.956540] x3 : 0000000000000000 x2 : ffffff800952c000 
[    4.961917] x1 : 0000000000000000 x0 : 0000000000000000 
[    4.967296] \x0aSP: 0xffffffc074153750:
[    4.972312] 3750  00000001 00000000 740da000 ffffffc0 00000005 00000000 00000000 00000000
[    4.980633] 3770  00000000 00000000 00000001 00000000 740dad48 ffffffc0 741537d0 ffffffc0
[    4.988954] 3790  087182a8 ffffff80 741537d0 ffffffc0 087182ac ffffff80 80400045 00000000
[    4.997274] 37b0  08d0cf18 ffffff80 74153760 ffffffc0 ffffffff ffffffff 740da000 ffffffc0
[    5.005595] 37d0  74153820 ffffffc0 08714104 ffffff80 740da000 ffffffc0 095e5530 ffffff80
[    5.013916] 37f0  00000000 00000000 00000001 00000000 095e5550 ffffff80 00000005 00000000
[    5.022237] 3810  00000000 00000000 095e5530 ffffff80 74153840 ffffffc0 086a342c ffffff80
[    5.030559] 3830  740da000 ffffffc0 096cf000 ffffff80 74153880 ffffffc0 086a368c ffffff80
[    5.038882] \x0aX4: 0xffffffc07bf64010:
[    5.043897] 4010  08004010 ffffff80 08005000 ffffff80 7bf600a0 ffffffc0 00000000 00000000
[    5.052217] 4030  74153330 ffffffc0 0000001e 00000000 7bf64080 ffffffc0 08085960 ffffff80
[    5.060537] 4050  74153330 ffffffc0 00000000 00000080 0165e000 00000000 08122d54 ffffff80
[    5.068857] 4070  60400045 00000000 00000000 00000000 74153460 ffffffc0 74153330 ffffffc0
[    5.077178] 4090  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.085499] 40b0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.093819] 40d0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.102139] 40f0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.110461] \x0aX5: 0xffffffc0741536e0:
[    5.115476] 36e0  7f7f7f7f 7f7f7f7f 75646368 fefefeff 7f7f7f7f 7f7f7f7f 01010101 01010101
[    5.123796] 3700  00000020 00000000 00000030 00000000 fffffffe 0fffffff 00000000 00000000
[    5.132118] 3720  00000000 00000000 00000000 00000000 00000000 00000000 08d0cf18 ffffff80
[    5.140438] 3740  095e5530 ffffff80 00000000 00000000 00000001 00000000 740da000 ffffffc0
[    5.148757] 3760  00000005 00000000 00000000 00000000 00000000 00000000 00000001 00000000
[    5.157076] 3780  740dad48
[    5.159553] (stk) :ldisc installation timeout
[    5.159558] (stk) :ldisc_install = 0
[    5.165967]  ffffffc0
[    5.166943]  741537d0 ffffffc0 087182a8 ffffff80 741537d0 ffffffc0
[    5.171907] 37a0  087182ac ffffff80 80400045 00000000 08d0cf18 ffffff80 74153760 ffffffc0
[    5.180226] 37c0  ffffffff ffffffff 740da000 ffffffc0 74153820 ffffffc0 08714104 ffffff80
[    5.188554] \x0aX23: 0xffffffc0740d9f80:
[    5.193657] 9f80  05f1c200 ffffffc0 75251f80 ffffffc0 08f4ee98 ffffff80 00000000 00000000
[    5.201979] 9fa0  ffffffff ffffffff 05f1b628 ffffffc0 740d9a28 ffffffc0 00000000 00000000
[    5.210299] 9fc0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.218619] 9fe0  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.226938] a000  740da800 ffffffc0 740db700 ffffffc0 740d9400 ffffffc0 750ddc00 ffffffc0
[    5.235258] a020  740da818 ffffffc0 740da810 ffffffc0 750ddc00 ffffffc0 095d82a0 ffffff80
[    5.243578] a040  740dff28 ffffffc0 00000003 00000007 00000000 00000000 00000000 00000000
[    5.251899] a060  00000000 00000000 740da068 ffffffc0 740da068 ffffffc0 74f70e00 ffffffc0
[    5.260221] \x0aX28: 0xffffffc0740dacc8:
[    5.265325] acc8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.273646] ace8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.281966] ad08  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.290286] ad28  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.298606] ad48  7531f000 ffffffc0 095e56e0 ffffff80 f7106000 00000000 099c2000 ffffff80
[    5.306926] ad68  740d9a00 ffffffc0 740da800 ffffffc0 740d9f18 ffffffc0 00000000 00000000
[    5.315245] ad88  00000000 00000000 00000000 00000000 0871bab0 ffffff80 740dad48 ffffffc0
[    5.323565] ada8  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    5.331887] \x0aX29: 0xffffffc074153750:
[    5.336990] 3750  00000001 00000000 740da000 ffffffc0 00000005 00000000 00000000 00000000
[    5.345310] 3770  00000000 00000000 00000001 00000000 740dad48 ffffffc0 741537d0 ffffffc0
[    5.353631] 3790  087182a8 ffffff80 741537d0 ffffffc0 087182ac ffffff80 80400045 00000000
[    5.361951] 37b0  08d0cf18 ffffff80 74153760 ffffffc0 ffffffff ffffffff 740da000 ffffffc0
[    5.370271] 37d0  74153820 ffffffc0 08714104 ffffff80 740da000 ffffffc0 095e5530 ffffff80
[    5.378591] 37f0  00000000 00000000 00000001 00000000 095e5550 ffffff80 00000005 00000000
[    5.386911] 3810  00000000 00000000 095e5530 ffffff80 74153840 ffffffc0 086a342c ffffff80
[    5.395230] 3830  740da000 ffffffc0 096cf000 ffffff80 74153880 ffffffc0 086a368c ffffff80
[    5.403549] 
[    5.405052] ---[ end trace 171670cd55c56c5f ]---
[    5.409717] Call trace:
[    5.412187] Exception stack(0xffffffc074153600 to 0xffffffc074153730)
[    5.418699] 3600: ffffff8008d0cf18 0000008000000000 000000000165e000 ffffff80087182ac
[    5.426614] 3620: ffffffc074153660 ffffff8008516d74 ffffffc074153700 ffffffc074153740
[    5.434529] 3640: ffffffc074f70e00 ffffffc074f70e00 ffffffc0740da000 ffffff800808be7c
[    5.442445] 3660: ffffffc074153670 ffffff800808be7c ffffffc0741536b0 ffffff800808bfec
[    5.450360] 3680: ffffffc074153700 ffffffc0741536f0 ffffff8008090150 ffffffc074f70e00
[    5.458274] 36a0: 0000000000000000 0000000000000000 ffffff800952c000 0000000000000000
[    5.466190] 36c0: ffffffc07bf64090 ffffffc074153760 0000000000000000 6f722b77746d686b
[    5.474106] 36e0: 7f7f7f7f7f7f7f7f fefefeff75646368 7f7f7f7f7f7f7f7f 0101010101010101
[    5.482022] 3700: 0000000000000020 0000000000000030 0ffffffffffffffe 0000000000000000
[    5.489936] 3720: 0000000000000000 0000000000000000
[    5.494866] [&lt;ffffff80087182ac&gt;] spidev_probe+0x1b4/0x1d0
[    5.500324] [&lt;ffffff8008714104&gt;] spi_drv_probe+0x74/0xd4
[    5.505693] [&lt;ffffff80086a342c&gt;] driver_probe_device+0x1c8/0x2ec
[    5.511763] [&lt;ffffff80086a368c&gt;] __device_attach_driver+0x8c/0xb8
[    5.517922] [&lt;ffffff80086a18c0&gt;] bus_for_each_drv+0x68/0xa8
[    5.523553] [&lt;ffffff80086a3148&gt;] __device_attach+0xc8/0x130
[    5.529185] [&lt;ffffff80086a373c&gt;] device_initial_probe+0x24/0x30
[    5.535166] [&lt;ffffff80086a1b84&gt;] bus_probe_device+0x9c/0xa4
[    5.540800] [&lt;ffffff80086a0124&gt;] device_add+0x3d4/0x544
[    5.546081] [&lt;ffffff8008716a78&gt;] spi_add_device+0xe4/0x1a8
[    5.551627] [&lt;ffffff8008716f60&gt;] of_register_spi_device+0x1f0/0x2e4
[    5.557961] [&lt;ffffff8008717330&gt;] spi_register_master+0x2dc/0x554
[    5.564033] [&lt;ffffff80087175f4&gt;] devm_spi_register_master+0x4c/0x9c
[    5.570367] [&lt;ffffff800871a458&gt;] pl022_probe+0x4b4/0x6e8
[    5.575739] [&lt;ffffff80085b57b0&gt;] amba_probe+0xcc/0x1cc
[    5.580931] [&lt;ffffff80086a342c&gt;] driver_probe_device+0x1c8/0x2ec
[    5.587002] [&lt;ffffff80086a368c&gt;] __device_attach_driver+0x8c/0xb8
[    5.593161] [&lt;ffffff80086a18c0&gt;] bus_for_each_drv+0x68/0xa8
[    5.598792] [&lt;ffffff80086a3148&gt;] __device_attach+0xc8/0x130
[    5.604424] [&lt;ffffff80086a373c&gt;] device_initial_probe+0x24/0x30
[    5.610406] [&lt;ffffff80086a1b84&gt;] bus_probe_device+0x9c/0xa4
[    5.616038] [&lt;ffffff80086a2b3c&gt;] deferred_probe_work_func+0x80/0xb4
[    5.622375] [&lt;ffffff80080e3250&gt;] process_one_work+0x168/0x458
[    5.628182] [&lt;ffffff80080e367c&gt;] worker_thread+0x13c/0x4b4
[    5.633727] [&lt;ffffff80080ea080&gt;] kthread+0xd8/0xec
[    5.638570] [&lt;ffffff80080860e0&gt;] ret_from_fork+0x10/0x30
[    5.664024] [drm] host attach, client name=[dummy], id=0
[    5.669439] kirin-drm f4100000.ade: bound f4107800.dsi (ops dsi_ops)
[    5.675896] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    5.682592] [drm] No driver support for vblank timestamp query.
[    5.689598] [drm] client change to HDMI
[    5.916328] Checking mode 1280x1024@60 clock: 108000...BAD
[    5.922201] Checking mode 1152x864@75 clock: 108000...BAD
[    5.927836] Checking mode 800x600@60 clock: 40000...OK
[    5.933196] Checking mode 640x480@75 clock: 31500...BAD
[    5.938644] Checking mode 640x480@60 clock: 25200...BAD
[    5.944154] Checking mode 720x400@70 clock: 28320...BAD
[    5.949519] Checking mode 1280x1024@75 clock: 135000...BAD
[    5.955155] Checking mode 1024x768@75 clock: 78800...BAD
[    5.960617] Checking mode 1024x768@60 clock: 65000...BAD
[    5.966025] Checking mode 800x600@75 clock: 49500...BAD
[    5.974968] kirin-drm f4100000.ade: fb0:  frame buffer device
[    5.996398] [drm] Initialized kirin 1.0.0 20150718 on minor 0
[    6.002690] f72c0000.usb supply vusb_d not found, using dummy regulator
[    6.009495] f72c0000.usb supply vusb_a not found, using dummy regulator
[    6.160062] (stk) : timed out waiting for ldisc to be un-installed
[    6.273389] (stk) :ldisc_install = 1
[    6.347722] dwc2 f72c0000.usb: EPs: 16, dedicated fifos, 1920 entries in SPRAM
[    6.924419] dwc2 f72c0000.usb: DWC OTG Controller
[    6.929476] dwc2 f72c0000.usb: new USB bus registered, assigned bus number 1
[    6.937475] dwc2 f72c0000.usb: irq 37, io mem 0x00000000
[    6.947416] hub 1-0:1.0: USB hub found
[    6.951529] hub 1-0:1.0: 1 port detected
[    6.962683] dwmmc_k3 f723f000.dwmmc2: fifo-depth property not found, using value of FIFOTH register as default
[    6.973307] dwmmc_k3 f723f000.dwmmc2: IDMAC supports 32-bit address mode.
[    6.980793] dwmmc_k3 f723f000.dwmmc2: Using internal DMA controller.
[    6.987371] dwmmc_k3 f723f000.dwmmc2: Version ID is 250a
[    6.992834] dwmmc_k3 f723f000.dwmmc2: DW MMC controller at irq 41,32 bit host data width,64 deep fifo
[    7.002723] dwmmc_k3 f723f000.dwmmc2: No vqmmc regulator found
[    7.116851] dwmmc_k3 f723f000.dwmmc2: 1 slots initialized
[    7.123350] otg_wakelock_init: No USB transceiver found
[    7.128210] dwmmc_k3 f723f000.dwmmc2: card claims to support voltages below defined range
[    7.139899] rtc-pl031 f8003000.rtc: setting system clock to 1970-01-01 00:00:16 UTC (16)
[    7.156700] mmc_host mmc2: Bus speed (slot 0) = 24800000Hz (slot req 25000000Hz, actual 24800000HZ div = 0)
[    7.181830] mmc2: queuing unknown CIS tuple 0x91 (3 bytes)
[    7.190719] SOC_MED: disabling
[    7.191315] mmc2: new SDIO card at address 0001
[    7.194358] wl18xx_driver wl18xx.1.auto: Direct firmware load for ti-connectivity/wl1271-nvs.bin failed with error -2
[    7.194367] wl18xx_driver wl18xx.1.auto: Falling back to user helper
[    7.215645] LDO2_2V8: disabling
[    7.218829] LDO7_SDIO: disabling
[    7.222135] LDO10_2V85: disabling
[    7.225507] LDO13_1V8: disabling
[    7.228810] LDO14_2V8: disabling
[    7.232096] LDO17_2V5: disabling
[    7.235591] ALSA device list:
[    7.238587]   #0: hi6210-hdmi

Can I add my own spi slave ie an audio fpga board?
How can I do that?

@vvn2023 Are you @sharahan? Anyway, from the boot logs we can see the spidev node being loaded, so there should be a /dev/spidev0 or with a different number. Maybe you can try testing with it first. To add your own slave you would have to do make changes to the hi6220.dtsi file similar to how the spidev slave was added above, and then rebuild the kernel.

No, I am not sharahan.

I am just a newbie learning with hikey.
Yaa, there is /dev/spidev0 node.
Now I am trying to add my slave spi device to it.

Thank you @vchong

I am getting these errors when I changed

	spidev@0 {
		compatible = &quot;linux,spidev&quot;;
		spi-max-frequency = &lt;500000&gt;;
		reg = &lt;0&gt;;
		status = &quot;ok&quot;;
	};

to

	spidev@1 {
		compatible = &quot;linux,spidev&quot;;
		spi-max-frequency = &lt;500000&gt;;
		reg = &lt;1&gt;;
		status = &quot;ok&quot;;
	};

hikey:/ # dmesg | grep -i spi
[    1.557527] ssp-pl022 f7106000.spi: could not find pctldev for node /soc/pinmux@f7010000/spi0_pmx_func, deferring probe
[    4.792638] ssp-pl022 f7106000.spi: ARM PL022 driver, device ID: 0x00041022
[    4.799842] ssp-pl022 f7106000.spi: mapped registers from 0x00000000f7106000 to ffffff800a95a000
[    4.809778] ssp-pl022 f7106000.spi: cs1 &gt;= max 1
[    4.814469] spi_master spi0: spi_device register error /soc/spi@f7106000/spidev@1
[    4.822146] spi_master spi0: Failed to create SPI device for /soc/spi@f7106000/spidev@1

Is that because it has only one chip select line?

As answered in http://www.96boards.org/forums/topic/how-can-i-add-spi-slave. Please try not to double post.