Radxa zero 3w overlays

I tried the official images for the zero3w and it seems the cli images are broken and they are all quite far out of date.

Armbian cli seems to work ok, but as a novice I cannot figure out how to enable overlays specific to the zero3.

I am looking to enable /dev/i2c1 on pins 3 and 5, how would I go about doing this on a zero3w running armbian?

According to the docs, you can’t.

Pin# 3  = UART3_RX_M0|GPIO1_A0	
Pin# 5  = UART3_TX_M0|GPIO1_A1	
Pin# 27 = I2C4_SDA_M0
Pin# 28 = I2C4_SCL_M0

I am still unsure if resistors are needed for the i2c4 to work properly.

Regarding Armbian overlays, it’s only my guess:

sudo rsetup

the tip above the gpio diagram in the docs states

Pin 3, Pin 5, Pin 27, and Pin 28 add extra pull-up resistors for I2C device power supply, so they work abnormally when used as GPIOs.

So its a bit confusing. I don’t seem to have access to rsetup with armbian.

I think it works like this doc:
https://docs.armbian.com/User-Guide_Allwinner_overlays/
something like:

overlays=i2c4

As for the tip, I think the device to be connected to zero 3w must have pull-up resistors or it will be necessary to add it. I don’t have a welder here with me to check if the i2c4 needs additional resistors. My device to be tested has pogopins.

I expected the hw guys to step in and give some advice but it looks like it’s a silly question so no one bothers to answer…

But you can enable the i2c4 and try it out and let us know.:wink:

Try to attach your device and type in the cmd to check if it is detected:

rock@rzero-3w:~$ i2cdetect -l
i2c-0	i2c       	rk3x-i2c                        	I2C adapter
i2c-2	i2c       	rk3x-i2c                        	I2C adapter
i2c-3	i2c       	rk3x-i2c                        	I2C adapter
i2c-6	i2c       	DesignWare HDMI                 	I2C adapter

with i2c4 enabled:

rock@rzero-3w:~$ i2cdetect -l
i2c-0	i2c       	rk3x-i2c                        	I2C adapter
i2c-2	i2c       	rk3x-i2c                        	I2C adapter
i2c-3	i2c       	rk3x-i2c                        	I2C adapter
i2c-4	i2c       	rk3x-i2c                        	I2C adapter
i2c-6	i2c       	DesignWare HDMI                 	I2C adapter

I tested the i2c4 with an i2c display (SSD1306, address:3d).

Instructions:

  • enable i2c4 (Pin# 27 and 28)
  • wired GND,5vcc,SDL,SDA
  • check if its wired correctly:
rock@rzero-3w:~/SSD1306$ i2cdetect -y 4
    0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- 3d -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --      

Run the display program…

I am stuck on this part though, The releases that have rsetup are too old now. Adding overlays=i2c4 to armbianEnv.txt did not work. I tried adding i2c1-6 one at a time and nothing extra gets added to i2cdetect.

Regarding i2c on pins 3 and 5:


The documentation here suggests they should be i2c3

Maybe there are different hw revisions.

Perhaps this can help:
https://docs.armbian.com/User-Guide_Armbian-Config/

I don’t think armbian config recognises the board, the hardware option pages are all blank.

I kept trying cli builds and the first “b1” build actually booted and worked (without working wifi), using rsetup to enable i2c3 has allowed me to get an oled output on pins 3 and 5. So I have at least confirmed those pins work.

I am not sure why broken builds are left up on github, they really need purging to stop people wasting time on them.

So now I just need a working armbian overlay that allows i2c3 to be properly enabled there too. At the moment it shows up in /dev by default, but nothing is detected on it.

I use the overlay rk3568-i2c3-m0.dts from the radxa-pkg/radxa-overlays repository on Github. (Unfortunately I can’t add the link here, it’s not allowed!)
And activate it with armbian-add-overlay
Works fine on my 3E devices.

2 Likes

Exercising my hardware side of the brain, the comments on that overlay confirm what I thought, you can’t use i2c3 on pins 3 and 5 (3W), it’s already in use by fusb302 which controls USB-C and this appears to be necessary for wifi 5G. But i may be wrong.:wink:

The previous hw version used a 2.4Ghz Wifi, then you could use pin3 and 5. That’s the reason one doc mentions i2c3 on pin# 3 and 5 and the other not.

I was wrong, i2c3 works the same as i2c4.
if you follow burberius’s tip it should work as expected.

1 Like