Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tinkerboard Error: Could not open file /dev/i2c-1' or /dev/i2c/1' #5362

Closed
cserl opened this issue Mar 16, 2022 · 2 comments
Closed

Tinkerboard Error: Could not open file /dev/i2c-1' or /dev/i2c/1' #5362

cserl opened this issue Mar 16, 2022 · 2 comments

Comments

@cserl
Copy link

cserl commented Mar 16, 2022

Hello,
I used to have i2cdetect -y 1 working on dietPI v6.28 running on my Tinkerboard 2GB model. The Tinkerboard model name is without any postfix characters.
But after performing a clean install of dietPI 8.2.2 on the same Tinkerboard and when running the command "sudo i2cdetect -y 1" this is the response I get:

Error: Could not open file /dev/i2c-1' or /dev/i2c/1' : No such file or directory.

The following prerequisites were installed:
sudo apt-get install python3-smbus
sudo apt-get install i2c-tools

I have googled all forum threads dealing with the problem and tried different settings in /boot/config.txt and /etc/modules without success.

i2cdetect -l
i2c-2 i2c rk3x-i2c I2C adapter
i2c-0 i2c rk3x-i2c I2C adapter
i2c-5 i2c rk3x-i2c I2C adapter

uname -a
Linux DietPi82TinkerBoard 5.15.25-rockchip #22.02.1 SMP PREEMPT Sun Feb 27 09:23:03 UTC 2022 armv7l GNU/Linux

cat /etc/issue
Debian GNU/Linux 11 \n \l

Current content of /etc/modules after manually adding entries:
8723bs
i2c-bcm2708
i2c-dev

Current content of /boot/config.txt after manually adding entries:
dtparam=i2c_arm=on
dtparam=i2c_arm_baudrate=10000
dtparam=i2c1=on
dtparam=i2c_vc=on

Maybe something with device tree overlays?
Please help fixing this and advise with next steps for troubleshooting.

Bug report: 73ca9ec4-212d-4729-95d4-e88f0e272533

@MichaIng
Copy link
Owner

MichaIng commented Mar 17, 2022

Many thanks for your report.

This is funny, /boot/armbianEnv.txt contains a bunch of overlays, but those do not exist, the kernel comes without any overlays at /boot/dtb/overlay 🤔.

I had a look into the Armbian forum, strangely someone is talking about activating I2C4 via device tree overlay: https://forum.armbian.com/topic/19974-utilization-of-additional-serial-ports-and-i2c-busses-on-tinkerboard-s/

Having a look into the Armbian image, I still don't see any overlays, but still those listed in armbianEnv.txt. The armbian-config tool does no magic but lists only overlays (if) present in /boot/dtb/overlay. Confusing.

Current content of /boot/config.txt after manually adding entries:

This file is only present on Raspberry Pi and has no effect on any other SBC:

rm /boot/config.txt

Current content of /etc/modules after manually adding entries:

In the era of device tree overlays this is not required anymore. Kernel modules are loaded automatically when required by a loaded device, but it is missing:

sed -i '/^[^#]/d' /etc/modules

Both looks like you followed a very old guide for Raspberry Pi on ASUS Tinker Board. Note that any hardware feature related things are SBC-dependant, and the Raspberry Pi is most different with its closed source bootloader/firmware blobs, while most others use mainline kernel and common U-Boot.

@MichaIng
Copy link
Owner

Marking as closed due to outstanding reply. Feel free to reopen if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants