Connecting an I2C device to a Raspberry pi Zero running OpenWrt 21.02.0

I'm running OpenWRT 21.02.0 with Kernel version 5.4.143 on a Raspberry Pi Zero v1.3. I'm now trying to attach an I2C display to it.

Currently, I2C 'seems' to run but devices are not recognized.

The display is connected to the RPi in the following way:

VCC -> 3V3
GND -> GND
SDA -> GPIO2
SCL -> GPIO3

I ran Raspberry OS on the RPi with the very same cabling and managed to connect the display successfully, so no hardware problems here.

Furthermore, I installed the following packages:

i2c-tools - 4.3-1
kmod-i2c-algo-bit - 5.4.143-1
kmod-i2c-algo-pcf - 5.4.143-1
kmod-i2c-bcm2835 - 5.4.143-1
kmod-i2c-core - 5.4.143-1
kmod-i2c-gpio - 5.4.143-1
kmod-i2c-mux - 5.4.143-1
libi2c - 4.3-1
python3-smbus - 4.3-1

The package kmod-i2c-gpio-custom, which is referred to in many documentation, is not available anymore according to this.
Then, I made the following additions to /boot/config.txt

...
# Place your custom settings here.
dtparam=i2c1=on
dtparam=spi=on

After a reboot, I2C on channel 1 seems to be up:

root@OpenWrt:~# i2cdetect -F 1
Functionalities implemented by /dev/i2c-1:
I2C                              yes
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               yes
SMBus Block Write                yes
SMBus Block Read                 no
SMBus Block Process Call         no
SMBus PEC                        yes
I2C Block Write                  yes
I2C Block Read                   yes

However, when I run i2cdetect -y 1 to discover all connected devices, the display does not show:

root@OpenWrt:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

When doing the same command on Raspberry OS, it would correctly show at position 0x3c.

This conforms to the output of dmesg:

root@OpenWrt:~# dmesg | grep i2c
[   11.130965] i2c /dev entries driver

Any idea what could be wrong here? The documentation on that topic is very sparse unfortunately.
Also kindly note that I am not an experienced kernel developer (not even an inexperienced one).

Thanks in advance

Dumb questions from someone less experienced than you:

  • Are you sure that sda and scl are assigned to gpio 2 and 3 in your configuration?
  • Why did you activate spi too?
  • Are you sure you are not missing any package? (looks less likely because i2c "seems to run")
1 Like

According to the Raspberry Pi pinout, these are the default ports for I2C. Is there any configuration in OpenWRT where I need to set that?

For no particular reason. I must have enabled it during testing and didn't disable it again, but I had the same problems with SPI off.

Most resources on the internet mention these packages. Only the package kmod-i2c-gpio-custom is missing, as explained. Then again, most resources on the internet are a little outdated, so I actually might be missing something, but I really have no idea what it is.

If it's still relevant.
It is possible that the i2c hardware driver itself is not included in the kernel configuration.
sda and scl pins can be used without it.

This is for bcm2708-rpi-zero.
(For bcm2708-rpi-zero-w, edit the commands themselves below.)

  1. Disable overlay for i2c1 in /boot/config.txt.
  2. Install dtc:

opkg update
opkg install dtc

  1. Make a backup once, commands with PuTty:

dtc -I dtb -O dts -o /tmp/bcm2708-rpi-zero.dts /boot/bcm2708-rpi-zero.dtb
dtc -I dts -O dtb -o /boot/baccup-bcm2708-rpi-zero.dtb /tmp/bcm2708-rpi-zero.dts

  1. Convert from dtb to dts:

dtc -I dtb -O dts -o /tmp/bcm2708-rpi-zero.dts /boot/bcm2708-rpi-zero.dtb

  1. Open the /tmp/bcm2708-rpi-zero.dts file in a text editor.
    Edit the lines (as shown in the file part) to look like this:
		i2s = "/soc/i2s@7e203000";
		i2c0 = "/soc/i2c0mux/i2c@0";
//		i2c1 = "/soc/i2c@7e804000";
		i2c1 = "/i2c1";
		i2c10 = "/soc/i2c0mux/i2c@1";
		spi0 = "/soc/spi@7e204000";
		spi1 = "/soc/spi@7e215080";
		spi2 = "/soc/spi@7e2150c0";
		usb = "/soc/usb@7e980000";
		leds = "/leds";
		fb = "/soc/fb";
		thermal = "/soc/thermal@7e212000";
		axiperf = "/soc/axiperf";
		i2c2 = "/soc/i2c@7e805000";
	};

	i2c1 {
		compatible = "i2c-gpio";
		pinctrl-names = "default";
		sda-gpios = <0x02 0x07>;	// <gpio-2 sda-open-drain>
		scl-gpios = <0x03 0x07>;	// <gpio-3 scl-open-drain>
		i2c-gpio,delay-us = <0x02>;	// ~100 kHz
		status = "okay";		// enable
	};

	chosen {
		bootargs = "coherent_pool=1M snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
	};


Perhaps this is no longer necessary edit? But just in case.
I don't have a Raspberry Pi Zero to check.
Still at the bottom (where to overlay) edit the lines (as shown in the part of the file) to look like this:

		spi2 = "/soc/spi@7e2150c0";
		pwm = "/soc/pwm@7e20c000";
		hvs = "/soc/hvs@7e400000";
		dsi1 = "/soc/dsi@7e700000";
//		i2c1 = "/soc/i2c@7e804000";
		vec = "/soc/vec@7e806000";
		usb = "/soc/usb@7e980000";
		dma = "/soc/dma@7e007000";

Convert back dts to dtb

dtc -I dts -O dtb -o /boot/baccup-bcm2708-rpi-zero.dtb /tmp/bcm2708-rpi-zero.dts
reboot

After reboot, check for sda and scl:

cat /sys/kernel/debug/gpio

And in the boot log itself:

dmesg | grep i2c

[    1.198509] i2c /dev entries driver
[   10.180697] i2c-gpio i2c1: using lines 2 (SDA) and 3 (SCL)

Good luck.

1 Like

Hello,

and thanks for answering. Unfortunately, I wasn't successful. Here is what I did:

Contents of /boot/config.txt:

# OpenWrt config
include distroconfig.txt

[all]
# Place your custom settings here.
dtparam=i2c1=off
dtparam=i2c0=on
dtparam=spi=on
root@OpenWrt:~# 

root@OpenWrt:~# dtc -I dtb -O dts -o /tmp/bcm2708-rpi-zero-w.dts /boot/bcm2708-rpi-zero-w.dtb
/tmp/bcm2708-rpi-zero-w.dts: Warning (dma_ranges_format): /soc/firmware:dma-ranges: empty "dma-ranges" property but its #address-cells (2) differs from /soc (1)
/tmp/bcm2708-rpi-zero-w.dts: Warning (unit_address_vs_reg): /soc: node has a reg or ranges property, but no unit name
/tmp/bcm2708-rpi-zero-w.dts: Warning (unit_address_vs_reg): /soc/axiperf: node has a reg or ranges property, but no unit name
/tmp/bcm2708-rpi-zero-w.dts: Warning (unit_address_vs_reg): /soc/gpiomem: node has a reg or ranges property, but no unit name
/tmp/bcm2708-rpi-zero-w.dts: Warning (simple_bus_reg): /soc/i2c0mux: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts: Warning (simple_bus_reg): /soc/gpu: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts: Warning (simple_bus_reg): /soc/axiperf: simple-bus unit address format error, expected "7e009800"
/tmp/bcm2708-rpi-zero-w.dts: Warning (simple_bus_reg): /soc/firmware/clocks: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts: Warning (simple_bus_reg): /soc/power: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts: Warning (simple_bus_reg): /soc/gpiomem: simple-bus unit address format error, expected "7e200000"
/tmp/bcm2708-rpi-zero-w.dts: Warning (simple_bus_reg): /soc/fb: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts: Warning (simple_bus_reg): /soc/vcsm: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts: Warning (simple_bus_reg): /soc/sound: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts: Warning (unique_unit_address): /soc/mmc@7e300000: duplicate unit-address (also used in node /soc/mmcnr@7e300000)
/tmp/bcm2708-rpi-zero-w.dts: Warning (unique_unit_address): /soc/firmwarekms@7e600000: duplicate unit-address (also used in node /soc/smi@7e600000)
/tmp/bcm2708-rpi-zero-w.dts: Warning (clocks_property): /__symbols__:clocks: property size (21) is invalid, expected multiple of 4
/tmp/bcm2708-rpi-zero-w.dts: Warning (gpios_property): /aliases:gpio: property size (19) is invalid, expected multiple of 4
/tmp/bcm2708-rpi-zero-w.dts: Warning (gpios_property): /__symbols__:gpio: property size (19) is invalid, expected multiple of 4
root@OpenWrt:~# dtc -I dts -O dtb -o /boot/baccup-bcm2708-rpi-zero-w.dtb /tmp/bcm2708-rpi-zero-w.dts
/tmp/bcm2708-rpi-zero-w.dts:959.4-15: Warning (dma_ranges_format): /soc/firmware:dma-ranges: empty "dma-ranges" property but its #address-cells (2) differs from /soc (1)
/tmp/bcm2708-rpi-zero-w.dts:78.6-1016.4: Warning (unit_address_vs_reg): /soc: node has a reg or ranges property, but no unit name
/tmp/bcm2708-rpi-zero-w.dts:948.11-954.5: Warning (unit_address_vs_reg): /soc/axiperf: node has a reg or ranges property, but no unit name
/tmp/bcm2708-rpi-zero-w.dts:993.11-996.5: Warning (unit_address_vs_reg): /soc/gpiomem: node has a reg or ranges property, but no unit name
/tmp/bcm2708-rpi-zero-w.dts:586.11-610.5: Warning (simple_bus_reg): /soc/i2c0mux: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts:860.7-864.5: Warning (simple_bus_reg): /soc/gpu: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts:948.11-954.5: Warning (simple_bus_reg): /soc/axiperf: simple-bus unit address format error, expected "7e009800"
/tmp/bcm2708-rpi-zero-w.dts:962.11-966.6: Warning (simple_bus_reg): /soc/firmware/clocks: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts:969.9-974.5: Warning (simple_bus_reg): /soc/power: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts:993.11-996.5: Warning (simple_bus_reg): /soc/gpiomem: simple-bus unit address format error, expected "7e200000"
/tmp/bcm2708-rpi-zero-w.dts:998.6-1003.5: Warning (simple_bus_reg): /soc/fb: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts:1005.8-1010.5: Warning (simple_bus_reg): /soc/vcsm: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts:1012.9-1015.5: Warning (simple_bus_reg): /soc/sound: missing or empty reg/ranges property
/tmp/bcm2708-rpi-zero-w.dts:866.16-879.5: Warning (unique_unit_address): /soc/mmc@7e300000: duplicate unit-address (also used in node /soc/mmcnr@7e300000)
/tmp/bcm2708-rpi-zero-w.dts:897.24-904.5: Warning (unique_unit_address): /soc/firmwarekms@7e600000: duplicate unit-address (also used in node /soc/smi@7e600000)
/tmp/bcm2708-rpi-zero-w.dts:106.4-80: Warning (clocks_property): /soc/cprman@7e101000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:106.4-80: Warning (clocks_property): /soc/cprman@7e101000:clocks: cell 1 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:106.4-80: Warning (clocks_property): /soc/cprman@7e101000:clocks: cell 3 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:106.4-80: Warning (clocks_property): /soc/cprman@7e101000:clocks: cell 5 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:106.4-80: Warning (clocks_property): /soc/cprman@7e101000:clocks: cell 7 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:106.4-80: Warning (clocks_property): /soc/cprman@7e101000:clocks: cell 9 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:106.4-80: Warning (clocks_property): /soc/cprman@7e101000:clocks: cell 11 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:492.4-35: Warning (clocks_property): /soc/serial@7e201000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:492.4-35: Warning (clocks_property): /soc/serial@7e201000:clocks: cell 2 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:515.4-25: Warning (clocks_property): /soc/mmc@7e202000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:530.4-25: Warning (clocks_property): /soc/i2s@7e203000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:544.4-25: Warning (clocks_property): /soc/spi@7e204000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:578.4-25: Warning (clocks_property): /soc/i2c@7e205000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:615.4-35: Warning (clocks_property): /soc/dpi@7e208000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:615.4-35: Warning (clocks_property): /soc/dpi@7e208000:clocks: cell 2 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:630.4-45: Warning (clocks_property): /soc/dsi@7e209000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:630.4-45: Warning (clocks_property): /soc/dsi@7e209000:clocks: cell 2 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:630.4-45: Warning (clocks_property): /soc/dsi@7e209000:clocks: cell 4 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:642.4-25: Warning (clocks_property): /soc/aux@7e215000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:650.4-25: Warning (clocks_property): /soc/serial@7e215040:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:670.4-25: Warning (clocks_property): /soc/spi@7e215080:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:681.4-25: Warning (clocks_property): /soc/spi@7e2150c0:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:691.4-25: Warning (clocks_property): /soc/pwm@7e20c000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:714.4-45: Warning (clocks_property): /soc/dsi@7e700000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:714.4-45: Warning (clocks_property): /soc/dsi@7e700000:clocks: cell 2 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:714.4-45: Warning (clocks_property): /soc/dsi@7e700000:clocks: cell 4 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:726.4-25: Warning (clocks_property): /soc/i2c@7e804000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:739.4-25: Warning (clocks_property): /soc/vec@7e806000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:752.4-20: Warning (clocks_property): /soc/usb@7e980000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:784.4-55: Warning (clocks_property): /soc/watchdog@7e100000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:784.4-55: Warning (clocks_property): /soc/watchdog@7e100000:clocks: cell 2 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:784.4-55: Warning (clocks_property): /soc/watchdog@7e100000:clocks: cell 4 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:784.4-55: Warning (clocks_property): /soc/watchdog@7e100000:clocks: cell 6 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:809.4-25: Warning (clocks_property): /soc/thermal@7e212000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:819.4-25: Warning (clocks_property): /soc/i2c@7e805000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:841.4-35: Warning (clocks_property): /soc/hdmi@7e902000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:841.4-35: Warning (clocks_property): /soc/hdmi@7e902000:clocks: cell 2 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:870.4-25: Warning (clocks_property): /soc/mmc@7e300000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:885.4-25: Warning (clocks_property): /soc/mmcnr@7e300000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:910.4-25: Warning (clocks_property): /soc/smi@7e600000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:923.4-35: Warning (clocks_property): /soc/csi@7e800000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:923.4-35: Warning (clocks_property): /soc/csi@7e800000:clocks: cell 2 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:937.4-35: Warning (clocks_property): /soc/csi@7e801000:clocks: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:937.4-35: Warning (clocks_property): /soc/csi@7e801000:clocks: cell 2 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:1135.3-35: Warning (clocks_property): /__symbols__:clocks: property size (21) is invalid, expected multiple of 4
/tmp/bcm2708-rpi-zero-w.dts:517.4-29: Warning (dmas_property): /soc/mmc@7e202000:dmas: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:532.4-33: Warning (dmas_property): /soc/i2s@7e203000:dmas: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:532.4-33: Warning (dmas_property): /soc/i2s@7e203000:dmas: cell 2 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:548.4-33: Warning (dmas_property): /soc/spi@7e204000:dmas: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:548.4-33: Warning (dmas_property): /soc/spi@7e204000:dmas: cell 2 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:843.4-28: Warning (dmas_property): /soc/hdmi@7e902000:dmas: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:871.4-23: Warning (dmas_property): /soc/mmc@7e300000:dmas: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:886.4-23: Warning (dmas_property): /soc/mmcnr@7e300000:dmas: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:913.4-23: Warning (dmas_property): /soc/smi@7e600000:dmas: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:958.4-20: Warning (mboxes_property): /soc/firmware:mboxes: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:754.4-18: Warning (phys_property): /soc/usb@7e980000:phys: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:634.4-32: Warning (power_domains_property): /soc/dsi@7e209000:power-domains: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:718.4-32: Warning (power_domains_property): /soc/dsi@7e700000:power-domains: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:742.4-32: Warning (power_domains_property): /soc/vec@7e806000:power-domains: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:757.4-32: Warning (power_domains_property): /soc/usb@7e980000:power-domains: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:846.4-32: Warning (power_domains_property): /soc/hdmi@7e902000:power-domains: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:855.4-32: Warning (power_domains_property): /soc/v3d@7ec00000:power-domains: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:925.4-32: Warning (power_domains_property): /soc/csi@7e800000:power-domains: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:939.4-32: Warning (power_domains_property): /soc/csi@7e801000:power-domains: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:69.4-29: Warning (thermal_sensors_property): /thermal-zones/cpu-thermal:thermal-sensors: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:23.3-31: Warning (gpios_property): /aliases:gpio: property size (19) is invalid, expected multiple of 4
/tmp/bcm2708-rpi-zero-w.dts:505.5-39: Warning (gpios_property): /soc/serial@7e201000/bluetooth:shutdown-gpios: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:552.4-47: Warning (gpios_property): /soc/spi@7e204000:cs-gpios: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:552.4-47: Warning (gpios_property): /soc/spi@7e204000:cs-gpios: cell 3 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:660.5-39: Warning (gpios_property): /soc/serial@7e215040/bluetooth:shutdown-gpios: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:847.4-33: Warning (gpios_property): /soc/hdmi@7e902000:hpd-gpios: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:1100.4-29: Warning (gpios_property): /leds/act:gpios: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:1138.3-31: Warning (gpios_property): /__symbols__:gpio: property size (19) is invalid, expected multiple of 4
root@OpenWrt:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-53, parent: platform/20200000.gpio, pinctrl-bcm2835:
 gpio-3   (                    |sysfs               ) out hi 
 gpio-4   (                    |sysfs               ) out lo 
 gpio-18  (                    |sysfs               ) out hi 
 gpio-47  (                    |led0                ) out lo ACTIVE LOW

root@OpenWrt:~# dmesg | grep i2c
[   11.311275] i2c /dev entries driver

And the file /tmp/bcm2708-rpi-zero.dts (shortened down):

/dts-v1/;

/memreserve/	0x0000000000000000 0x0000000000001000;
/ {
	compatible = "raspberrypi,model-zero\0brcm,bcm2835";
	model = "Raspberry Pi Zero";
	#address-cells = <0x01>;
	#size-cells = <0x01>;
	interrupt-parent = <0x01>;

	aliases {
		serial0 = "/soc/serial@7e201000";
		serial1 = "/soc/serial@7e215040";
		audio = "/soc/mailbox@7e00b840/bcm2835_audio";
		aux = "/soc/aux@7e215000";
		sound = "/soc/sound";
		soc = "/soc";
		dma = "/soc/dma@7e007000";
		intc = "/soc/interrupt-controller@7e00b200";
		watchdog = "/soc/watchdog@7e100000";
		random = "/soc/rng@7e104000";
		mailbox = "/soc/mailbox@7e00b880";
		gpio = "/soc/gpio@7e200000";
		uart0 = "/soc/serial@7e201000";
		uart1 = "/soc/serial@7e215040";
		sdhost = "/soc/mmc@7e202000";
		mmc = "/soc/mmc@7e300000";
		mmc1 = "/soc/mmc@7e300000";
		mmc0 = "/soc/mmc@7e202000";
		i2s = "/soc/i2s@7e203000";
		i2c0 = "/soc/i2c0mux/i2c@0";
//		i2c1 = "/soc/i2c@7e804000";
		i2c1 = "/i2c1";
		i2c10 = "/soc/i2c0mux/i2c@1";
		spi0 = "/soc/spi@7e204000";
		spi1 = "/soc/spi@7e215080";
		spi2 = "/soc/spi@7e2150c0";
		usb = "/soc/usb@7e980000";
		leds = "/leds";
		fb = "/soc/fb";
		thermal = "/soc/thermal@7e212000";
		axiperf = "/soc/axiperf";
		i2c2 = "/soc/i2c@7e805000";
	};

	i2c1 {
		compatible = "i2c-gpio";
		pinctrl-names = "default";
		sda-gpios = <0x02 0x07>;	// <gpio-2 sda-open-drain>
		scl-gpios = <0x03 0x07>;	// <gpio-3 scl-open-drain>
		i2c-gpio,delay-us = <0x02>;	// ~100 kHz
		status = "okay";		// enable
	};

	chosen {
		bootargs = "coherent_pool=1M snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1";
	};

...

	__symbols__ {
		rmem = "/reserved-memory";
		cma = "/reserved-memory/linux,cma";
		cpu_thermal = "/thermal-zones/cpu-thermal";
		soc = "/soc";
		system_timer = "/soc/timer@7e003000";
		txp = "/soc/txp@7e004000";
		clocks = "/soc/cprman@7e101000";
		random = "/soc/rng@7e104000";
		mailbox = "/soc/mailbox@7e00b880";
		gpio = "/soc/gpio@7e200000";
		dpi_gpio0 = "/soc/gpio@7e200000/dpi_gpio0";
		emmc_gpio22 = "/soc/gpio@7e200000/emmc_gpio22";
		emmc_gpio34 = "/soc/gpio@7e200000/emmc_gpio34";
		emmc_gpio48 = "/soc/gpio@7e200000/emmc_gpio48";
		gpclk0_gpio4 = "/soc/gpio@7e200000/gpclk0_gpio4";
		gpclk1_gpio5 = "/soc/gpio@7e200000/gpclk1_gpio5";
		gpclk1_gpio42 = "/soc/gpio@7e200000/gpclk1_gpio42";
		gpclk1_gpio44 = "/soc/gpio@7e200000/gpclk1_gpio44";
		gpclk2_gpio6 = "/soc/gpio@7e200000/gpclk2_gpio6";
		gpclk2_gpio43 = "/soc/gpio@7e200000/gpclk2_gpio43";
		i2c0_gpio0 = "/soc/gpio@7e200000/i2c0_gpio0";
		i2c0_gpio28 = "/soc/gpio@7e200000/i2c0_gpio28";
		i2c0_gpio44 = "/soc/gpio@7e200000/i2c0_gpio44";
		i2c1_gpio2 = "/soc/gpio@7e200000/i2c1_gpio2";
		i2c1_gpio44 = "/soc/gpio@7e200000/i2c1_gpio44";
		jtag_gpio22 = "/soc/gpio@7e200000/jtag_gpio22";
		pcm_gpio18 = "/soc/gpio@7e200000/pcm_gpio18";
		pcm_gpio28 = "/soc/gpio@7e200000/pcm_gpio28";
		sdhost_gpio48 = "/soc/gpio@7e200000/sdhost_gpio48";
		spi0_gpio7 = "/soc/gpio@7e200000/spi0_gpio7";
		spi0_gpio35 = "/soc/gpio@7e200000/spi0_gpio35";
		spi1_gpio16 = "/soc/gpio@7e200000/spi1_gpio16";
		spi2_gpio40 = "/soc/gpio@7e200000/spi2_gpio40";
		uart0_gpio14 = "/soc/gpio@7e200000/uart0_gpio14";
		uart0_ctsrts_gpio16 = "/soc/gpio@7e200000/uart0_ctsrts_gpio16";
		uart0_ctsrts_gpio30 = "/soc/gpio@7e200000/uart0_ctsrts_gpio30";
		uart0_gpio32 = "/soc/gpio@7e200000/uart0_gpio32";
		uart0_gpio36 = "/soc/gpio@7e200000/uart0_gpio36";
		uart0_ctsrts_gpio38 = "/soc/gpio@7e200000/uart0_ctsrts_gpio38";
		uart1_gpio14 = "/soc/gpio@7e200000/uart1_gpio14";
		uart1_ctsrts_gpio16 = "/soc/gpio@7e200000/uart1_ctsrts_gpio16";
		uart1_gpio32 = "/soc/gpio@7e200000/uart1_gpio32";
		uart1_ctsrts_gpio30 = "/soc/gpio@7e200000/uart1_ctsrts_gpio30";
		uart1_gpio40 = "/soc/gpio@7e200000/uart1_gpio40";
		uart1_ctsrts_gpio42 = "/soc/gpio@7e200000/uart1_ctsrts_gpio42";
		i2c_slave_gpio18 = "/soc/gpio@7e200000/i2c_slave_gpio18";
		jtag_gpio4 = "/soc/gpio@7e200000/jtag_gpio4";
		pwm0_gpio12 = "/soc/gpio@7e200000/pwm0_gpio12";
		pwm0_gpio18 = "/soc/gpio@7e200000/pwm0_gpio18";
		pwm0_gpio40 = "/soc/gpio@7e200000/pwm0_gpio40";
		pwm1_gpio13 = "/soc/gpio@7e200000/pwm1_gpio13";
		pwm1_gpio19 = "/soc/gpio@7e200000/pwm1_gpio19";
		pwm1_gpio41 = "/soc/gpio@7e200000/pwm1_gpio41";
		pwm1_gpio45 = "/soc/gpio@7e200000/pwm1_gpio45";
		dpi_18bit_gpio0 = "/soc/gpio@7e200000/dpi_18bit_gpio0";
		gpioout = "/soc/gpio@7e200000/gpioout";
		alt0 = "/soc/gpio@7e200000/alt0";
		spi0_pins = "/soc/gpio@7e200000/spi0_pins";
		spi0_cs_pins = "/soc/gpio@7e200000/spi0_cs_pins";
		i2c0_pins = "/soc/gpio@7e200000/i2c0";
		i2c1_pins = "/soc/gpio@7e200000/i2c1";
		i2s_pins = "/soc/gpio@7e200000/i2s";
		audio_pins = "/soc/gpio@7e200000/audio_pins";
		uart0 = "/soc/serial@7e201000";
		sdhost = "/soc/mmc@7e202000";
		i2s = "/soc/i2s@7e203000";
		spi0 = "/soc/spi@7e204000";
		spi = "/soc/spi@7e204000";
		spidev0 = "/soc/spi@7e204000/spidev@0";
		spidev1 = "/soc/spi@7e204000/spidev@1";
		i2c0if = "/soc/i2c@7e205000";
		i2c0mux = "/soc/i2c0mux";
		i2c0 = "/soc/i2c0mux/i2c@0";
		i2c_csi_dsi = "/soc/i2c0mux/i2c@1";
		dpi = "/soc/dpi@7e208000";
		dsi0 = "/soc/dsi@7e209000";
		aux = "/soc/aux@7e215000";
		uart1 = "/soc/serial@7e215040";
		spi1 = "/soc/spi@7e215080";
		spi2 = "/soc/spi@7e2150c0";
		pwm = "/soc/pwm@7e20c000";
		hvs = "/soc/hvs@7e400000";
		dsi1 = "/soc/dsi@7e700000";
//		i2c1 = "/soc/i2c@7e804000";
		vec = "/soc/vec@7e806000";
		usb = "/soc/usb@7e980000";
		dma = "/soc/dma@7e007000";
		intc = "/soc/interrupt-controller@7e00b200";
		watchdog = "/soc/watchdog@7e100000";
		pm = "/soc/watchdog@7e100000";
		pixelvalve0 = "/soc/pixelvalve@7e206000";
		pixelvalve1 = "/soc/pixelvalve@7e207000";
		thermal = "/soc/thermal@7e212000";
		i2c2 = "/soc/i2c@7e805000";
		pixelvalve2 = "/soc/pixelvalve@7e807000";
		hdmi = "/soc/hdmi@7e902000";
		v3d = "/soc/v3d@7ec00000";
		vc4 = "/soc/gpu";
		sdhci = "/soc/mmc@7e300000";
		mmc = "/soc/mmc@7e300000";
		mmcnr = "/soc/mmcnr@7e300000";
		firmwarekms = "/soc/firmwarekms@7e600000";
		smi = "/soc/smi@7e600000";
		csi0 = "/soc/csi@7e800000";
		csi1 = "/soc/csi@7e801000";
		axiperf = "/soc/axiperf";
		firmware = "/soc/firmware";
		firmware_clocks = "/soc/firmware/clocks";
		power = "/soc/power";
		vchiq = "/soc/mailbox@7e00b840";
		audio = "/soc/mailbox@7e00b840/bcm2835_audio";
		fb = "/soc/fb";
		vcsm = "/soc/vcsm";
		sound = "/soc/sound";
		clk_osc = "/clocks/clk-osc";
		clk_usb = "/clocks/clk-usb";
		usbphy = "/phy";
		leds = "/leds";
		act_led = "/leds/act";
		vdd_3v3_reg = "/fixedregulator_3v3";
		vdd_5v0_reg = "/fixedregulator_5v0";
	};
};

Also, i2cdetect -y 1 complains that it doesn't find the file /dev/i2c-1, so I2C is seemingly disabled.
There are a lot of warnings, but the most interesting are probably these:

/tmp/bcm2708-rpi-zero-w.dts:49.3-27: Warning (gpios_property): /i2c1:sda-gpios: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:46.7-53.4: Warning (gpios_property): /i2c1: Missing property '#gpio-cells' in node /soc/thermal@7e212000 or bad phandle (referred from sda-gpios[0])
/tmp/bcm2708-rpi-zero-w.dts:50.3-27: Warning (gpios_property): /i2c1:scl-gpios: cell 0 is not a phandle reference
/tmp/bcm2708-rpi-zero-w.dts:46.7-53.4: Warning (gpios_property): /i2c1: Missing property '#gpio-cells' in node /clocks/clk-osc or bad phandle (referred from scl-gpios[0])

ps. In the meantime, I established a dirty hack to make it work. I connected an ESP8266-01 Microcontroller via UART to my RPi Zero wot OpenWRT and then connected the screen via I2C to the Microcontroller. OpenWRT now sends commands to the ESP (see e.g. https://openwrt.org/docs/guide-user/advanced/arduino) which then parses them and generates a display on the screen.
I'm not happy with this solution, but I can live with it, so I'm not in a hurry here. But this remains a question of general interest, so if anyone has anymore ideas, feel free to post them.

Thanks

I don't have raspberry boards and I
described "gpio" incorrectly.
Write like this:

	i2c1 {
		compatible = "i2c-gpio";
		pinctrl-names = "default";
		sda-gpios = <0xa 0x02 0x07>;	// <gpio-2 sda-open-drain>
		scl-gpios = <0xa 0x03 0x07>;	// <gpio-3 scl-open-drain>
		i2c-gpio,delay-us = <0x02>;	// ~100 kHz
		status = "okay";		// enable
	};

Remove this completely from the config.txt.: dtparam=i2c1=off

I found something in your first answer. I think the line

should be

dtc -I dts -O dtb -o /boot/bcm2708-rpi-zero.dtb /tmp/bcm2708-rpi-zero.dts

With this correction and your recent post, i managed to get I2C working.

root@OpenWrt:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-53, parent: platform/20200000.gpio, pinctrl-bcm2835:
 gpio-2   (                    |sda                 ) out lo ACTIVE LOW
 gpio-3   (                    |scl                 ) out lo ACTIVE LOW
 gpio-18  (                    |sysfs               ) out hi 
 gpio-47  (                    |led0                ) out lo ACTIVE LOW

root@OpenWrt:~# dmesg | grep i2c
[   11.243399] i2c /dev entries driver
[   11.302189] i2c-gpio i2c1: using lines 2 (SDA) and 3 (SCL)

I now have two I2C lines

root@OpenWrt:~# i2cdetect -l
i2c-11	i2c       	bcm2835 (i2c@7e205000)          	I2C adapter
i2c-12	i2c       	i2c1                            	I2C adapter

Unfortunately, none of them finds my display, a search with i2cdetect still yields nothing (i attached the display to another device and confirmed that it's working).

Thanks anyway, you already got me a big step ahead.

[root@dca632 /usbstick 60°] i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
[root@dca632 /usbstick 61°] i2cdetect -l
i2c-1	i2c       	bcm2835 (i2c@7e804000)          	I2C adapter

(4b)

blank
i2cdetect -y 12
or
i2cdetect -y 11

Sorry, I forgot to mention that i checked both lines using exactly these commands, but didn't find any devices

root@OpenWrt:~# i2cdetect -y 12
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
root@OpenWrt:~# i2cdetect -y 11
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --