Hi everyone here. I was wondering is there any way to enable the SPI and I2C interfaces for Tinker? They have posted the kernel source and it seems that drivers for those are present there. Is there any chance to use SPI and I2C as of now?
|
SPI and I2C for Rockchip
|
|
SPI (3x) and I2C (6x) are in use now. You can study DeviceTree or newer from kernel sources and/or rk3288 Technical resource manuals (i2c) and (spi), schematics, connector and hardware config:
Code: # cat /boot/hw_intf.confi2c0 - "pmu" - used internally for power management - chip rk808 i2c1 - "sensor" - on connector pin3+5 i2c2 - "audio" - on connector MIPI-CSI (camera) + eeprom (at24c08) i2c3 - "cam" - on connector MIPI-DSI (display) i2c4 - "tp" - on connector pin27+28 i2c5 - "hdmi" - used as hdmi ddc spi0 - disabled - multiplexed with GPIO on connector pins 11,13,15,29,31 spi1 - disabled spi2 - on connector pins 19,21,23,24,26 devices: /dev/i2c* /dev/spi* find /sys/devices/platform/*i2c find /sys/devices/platform/*spi find /sys/firmware/devicetree/base/i2c* find /sys/firmware/devicetree/base/spi* (04-12-2017, 05:11 PM)Seraphim Wrote: Is there any chance to use SPI and I2C as of now? Yes, you can use it too to be happy tinker/hacker.
I left this community in Aug 2017 due to ASUS bad product quality and ASUS community support that did not match my expectation.
04-13-2017, 07:04 PM
(04-13-2017, 05:57 PM)mcerveny Wrote: SPI (3x) and I2C (6x) are in use now. You can study DeviceTree or newer from kernel sources and/or rk3288 Technical resource manuals (i2c) and (spi), schematics, connector and hardware config: I understand that. However I can not find out how to place new drivers in system and how interface with them (My tries with Python an C fails). As of now system sees the interfaces, but when I run i2cdetect -y 1 there is no recognition. Please, advice the algorithm. Thank you in advance. (04-13-2017, 07:04 PM)Seraphim Wrote: I understand that. However I can not find out how to place new drivers in system and how interface with them (My tries with Python an C fails). As of now system sees the interfaces, but when I run i2cdetect -y 1 there is no recognition. Please, advice the algorithm. Thank you in advance. If you need kernel-level drivers you need modify main DeviceTree or make DeviceTree overlay (see CONFIG_OF_CONFIGFS) and enable driver in kernel. Search the internet. If you need userspace access python is sufficient. I attached BMP180 gadget to pins 1+3+5+9 (eg. i2c1). It is i2c bus gadget and it has embedded bus pull-up resistors on PCB."i2cdetect" works for me okay (TinkerOS1.4 kernel). I also prepared simple testing code (attached) for BMP180 in python and run it without problems. Code: # i2cdetect -y 1
I left this community in Aug 2017 due to ASUS bad product quality and ASUS community support that did not match my expectation.
05-14-2017, 07:00 PM
More examples: https://github.com/sabrigultekin/Asus-Tinker-Board
I left this community in Aug 2017 due to ASUS bad product quality and ASUS community support that did not match my expectation.
(04-13-2017, 05:57 PM)mcerveny Wrote: spi2 - on connector pins 19,21,23,24,26Do not use TinkerOS (or rockchip-linux derivates) with SPI driver "CONFIG_SPI_ROCKCHIP" ! It works only up to 32 bytes length transfers and sends random length and random data to device if more data is requested (and results to SPI chip is unpredictable). Issue#19 was logged. UPDATE: resolved with TinkerOS >= 2.0.1
I left this community in Aug 2017 due to ASUS bad product quality and ASUS community support that did not match my expectation.
Hi all,
Stupid question: finally, can I use SPI0, or its permanently disabled? I have this config now: cat /boot/hw_intf.conf intf: spi0=off ... intf: spi2=on
06-26-2018, 12:35 PM
(This post was last modified: 06-27-2018, 02:26 AM by Tinker Board. Edited 2 times in total.)
Small addition to the old post: even if I enable
Code: "intf:spi0=on" in /boot/hw_intf.conf, "ls /dev/spi*"
06-27-2018, 07:22 AM
(06-26-2018, 12:35 PM)DVE Wrote: Small addition to the old post: even if I enable Hi DVE, That is our know issue...but have been fixed. You can take a try by compiling and replace with new kernel, base-on https://github.com/TinkerBoard/debian_kernel/ (develop branch). Or wait our next release image version. Thanks.
06-28-2018, 12:09 PM
(This post was last modified: 06-28-2018, 12:10 PM by DVE. Edited 1 time in total.)
Thanks. Will it be in 2.0.7, or later?
I am using SPI0 in my project but I don't want to replace kernel myself, so it would be nice to know, do I need to add software SPI in the project or not. |
|
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)



![[-]](https://tinkerboarding.co.uk/forum/images/collapse.png)

to pins 1+3+5+9 (eg. i2c1). It is i2c bus gadget and it has embedded bus pull-up resistors on PCB.