RM520N I2C interface

I would like to use an I2C interface on the RM520N module to communicate with external slave devices. I’m using the SDK version RM520NGLAAR03A01M4G_OCPU_BETA_20230619C_01.200.01.200.

I can see there is I2C device /dev/i2c-3 in the system. Is this I2C device accessible/routed to any GPIO pins on the module which could be used by the customer?

Alternately, I could use the Linux i2c-gpio.c bit-banged driver on two spare GPIOs. But I don’t know which of the GPIOs that are spare in my design can be used by the driver for this purpose. In my design, the following GPIO/signals are not used:

Pin 8: W_DISABLE1#
Pin 23: WAKE_ON_WAN#
Pin 25: DPR
Pin 26: W_DISABLE2#
Pin 38: WLAN_TX_EN
Pin 40: USIM2_DET
Pin 56: RFFE_CLK
Pin 58: RFFE_DATA
Pin 60: N79_TX_EN
Pin 62: COEX_RXD
Pin 64: COEX_TXD
Pin 66: USIM1_DET

Please can you explain if any of these pins could be mapped to GPIO function (like you did in this post)?

Thank you!

Hi @ben.campbell

About /dev/i2c-3, do you mean you want configure those two pins(like I2C_SDA, I2C_SCL) as gpio?
If so, first you need to disabled the i2c_3 function, it mean to set the “status” value to “disabled” of the i2c_3 node and then build kernel image and then update the kernel.
i2c3_scl: pin77 gpio_11
i2c3_sda: pin78 gpio_10

about following pins.
Pin 8: W_DISABLE1#
Pin 23: WAKE_ON_WAN#
Pin 25: DPR
Pin 26: W_DISABLE2#
Pin 38: WLAN_TX_EN
Pin 40: USIM2_DET
Pin 56: RFFE_CLK
Pin 58: RFFE_DATA
Pin 60: N79_TX_EN
Pin 62: COEX_RXD
Pin 64: COEX_TXD
Pin 66: USIM1_DET

They all have their own unique features, and it is not recommended to configure them as GPIO. If you want to use GPIO, these pins are recommended first as they default to GPIO functionality

pin98 gpio_32
pin45 gpio_86
pin93 gpio_97
pin99 gpio_38
pin106 gpio_80

BTW, I’m not sure what type of your product you’re developing, cpe, router or ?
In order to better support you, I would like to know where you obtained the SDK from?

Thanks

Hello @Puck-Q, thanks for replying.

do you mean you want configure those two pins(like I2C_SDA, I2C_SCL) as gpio?

No - I need to have a I2C interface on the RM520N to connect to an external I2C slave device. I saw in adb shell there is a /dev/i2c-3 interface, but I don’t know if that interface is routed to pins on the RM520N M.2 connector?

As an alternative, it would be possible to use a Linux gpio-base I2C driver (bit-banged), which is why I then mentioned the list of pins I’m not using on the RN520N connector.

If you want to use GPIO, these pins are recommended first as they default to GPIO functionality
pin98 gpio_32
pin45 gpio_86
pin93 gpio_97
pin99 gpio_38
pin106 gpio_80

Thanks for the list of GPIO pins. On what pins of the RM520N M.2 connector are those signals routed? I can’t see those pins in any documentation, and the M.2 only has 75 pins?

BTW, I’m not sure what type of your product you’re developing, cpe, router or ?

IOT device.

In order to better support you, I would like to know where you obtained the SDK from?

I obtained it from Quectel support in UK.

Thank you.

Hi @ben.campbell

Thank you for your feedback.

I see that you lack a lot of documentation, and to be honest, without local technical support, such development will be very difficult, so you need to contact that support(Quectel support in UK.) to get updated information. If you can get the sdk, there should be local Sales or FAE have contacted you or your company.

Thanks