I have a custom system running on a Raspberry Pi B+ V1.2, based on Debian Jessie (buildroot, systemd, udev) - not Raspbian - and a custom built 3.19.3 Kernel chainloaded by U-Boot and a custom init
script (you see I am not unfamiliar with Linux low-level stuff - although I have little experience with I²C under Linux).
Everything is working fine (including HDMI, USB, Ethernet), but I can't get I²C working (which I do need for a DS3231 RTC). Both /sys/class/i2c-adapter
and /sys/class/i2c-dev
remain empty no matter what I do and no /dev/i2c*
device wants to appear.
Obviously i2cdetect
aborts with an error, too, because the I²C devices are missing.
I guess it's some simple config I'm missing, but I can't find out what it is.
My bootloader config.txt
contains only a few entries:
dtparam=i2c_arm=on
dtparam=spi=on
dtoverlay=i2c-rtc,ds3231
kernel=u-boot.bin
Relevant I2C Kernel configs:
cat .config | grep -F I2C | grep -v "^#"
CONFIG_REGMAP_I2C=m
CONFIG_INPUT_AD714X_I2C=m
CONFIG_INPUT_ADXL34X_I2C=m
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_CHARDEV=m
CONFIG_I2C_MUX=m
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=m
CONFIG_I2C_BCM2708=m
CONFIG_I2C_BCM2708_BAUDRATE=100000
CONFIG_STMPE_I2C=y
CONFIG_MFD_ARIZONA_I2C=m
CONFIG_I2C_SI470X=m
CONFIG_I2C_SI4713=m
CONFIG_VIDEO_IR_I2C=m
CONFIG_SND_SOC_I2C_AND_SPI=m
CONFIG_SND_SOC_PCM512x_I2C=m
Calling modprobe i2c-dev
and modprobe i2c-bcm2708
succeeds without any error message. Kernel log just says i2c /dev entries driver
.
What am I doing wrong? Any additional module necessary? Some important line in config.txt
missing? ...?
Update
The problem probably is that in my case the Raspberry bootloader doesn't boot Linux directly. Instead, U-Boot is in between, which (1) doesn't care about the device tree settings of the earlier bootloader and (2) doesn't seem to support device tree overlays by itself. I opened a related question to perhaps solve that problem.