Page 1 of 1

GPIO Connector: I2C2

Posted: Wed Jun 13, 2018 2:37 am
by mpanetta
I'm trying to get my SBS based battery to work with the NanoPC-T4 and having issues. I managed to rebuild the kernel for android and the dtb and added sbs-battery driver to the kernel.

You can see this by the following output:

Code: Select all

mike@Scorpius:~$ adb shell dmesg | grep sbs-bat
[    1.570799] sbs-battery 0-000b: sbs_probe: Failed to get device status
[    1.580098] sbs-battery 1-000b: sbs_probe: Failed to get device status
[    1.596272] sbs-battery 2-000b: sbs_probe: Failed to get device status
[    1.611882] sbs-battery 7-000b: sbs_probe: Failed to get device status
[    1.619168] sbs-battery 4-000b: sbs_probe: Failed to get device status
mike@Scorpius:~$


I can't however get the board to detect the device on any of the available I2C busses. Is there something I need to add to the .dts file for power or enabling the GPIO I2C port?

I know this battery works with rk3399 because I have it working with another board based on that SOC by just adding the battery to the .dts on i2c4.

Thanks for any help!

Mike

Re: GPIO Connector: I2C2

Posted: Sun Jun 24, 2018 6:00 am
by Mindee
We’ll add some demo to show hot to use I2C under linux in the future update, please wait.

Thank You.

Re: GPIO Connector: I2C2

Posted: Thu Jun 28, 2018 5:02 am
by mpanetta
In your next kernel builds can you add the sbs-battery driver and dts to make it work on the GPIO port please? Or at least provide instructions for that.

I'm not interested in a userspace driver, the kernel already has one.

Thanks!

Mike

Re: GPIO Connector: I2C2

Posted: Thu Jun 28, 2018 6:02 am
by Mindee
We have no sbs-battery, and can't test it. You can have a try to config & compile the kernel since it's open source.

P.S Can I know what kind of SBS battery do you use?

Thank you

Re: GPIO Connector: I2C2

Posted: Fri Jun 29, 2018 3:29 am
by mpanetta
Mindee wrote:
We have no sbs-battery, and can't test it. You can have a try to config & compile the kernel since it's open source.

P.S Can I know what kind of SBS battery do you use?

Thank you


It is DIY: https://github.com/bentwire/SB-4S5A

It works fine with a FireFly RK3399 board on I2C-4, I can't seem to get it to work on I2C-2 on your board though. I still need to check it on my 'scope, but I don't think the port is working. Does it need an external pullup, or is that provided on the board for the I2C?

Thanks!
Mike

Re: GPIO Connector: I2C2

Posted: Fri Jun 29, 2018 8:35 am
by Mindee
We have no that to test.

The HDMI, LCD module, PMU etc all use I2C, and all can work fine. So the I2C is no problem. We’ll add a demo using I2C to connect with a OLED module in the future.

Re: GPIO Connector: I2C2

Posted: Fri Jun 29, 2018 7:05 pm
by mpanetta
Mindee wrote:
We have no that to test.

The HDMI, LCD module, PMU etc all use I2C, and all can work fine. So the I2C is no problem. We’ll add a demo using I2C to connect with a OLED module in the future.


None of those use Bus 2. According to the schematic the only things on bus 2 are CSI1 and the M.2 slot. So I am not convinced that I2C bus 2 is working. I2C Bus 2 is the only I2C bus available on the IO connector.

From the schematic:

I2C device list :
I2C0(3V), SYR838PKC, SYR837, RK808-D
I2C1(1.8V) CSI0, ALC5651
I2C2(1.8V) CSI1, M.2
I2C3
I2C4(1.8V), FUSB302MPX, LCD Touch
I2C5
I2C6
I2C7(1.8V) HDMI
I2C8


Thanks,
Mike

Re: GPIO Connector: I2C2

Posted: Sat Jun 30, 2018 12:31 am
by Mindee
We have MIPI-CSI camera module(CAM1320), it seems using the I2C2, the module can work well too.

Re: GPIO Connector: I2C2

Posted: Sat Jun 30, 2018 1:36 am
by mpanetta
Got it working! One of my dupont wires went bad... Go figure. Didn't find it until I hooked my oscilloscope up and noticed the clk line was stuck low.

Thanks!

Mike

Re: GPIO Connector: I2C2

Posted: Mon Jul 02, 2018 2:21 pm
by Mindee
So can you modify your review on NanoPC-T4? Thank You

Re: GPIO Connector: I2C2

Posted: Tue Jul 03, 2018 1:24 am
by mpanetta
Mindee wrote:
So can you modify your review on NanoPC-T4? Thank You


I wrote a new one. It would not let me update the old one. I also purchased another board :)

Thanks,
Mike

Re: GPIO Connector: I2C2

Posted: Tue Jul 03, 2018 11:27 pm
by Mindee
mpanetta wrote:
Mindee wrote:
So can you modify your review on NanoPC-T4? Thank You


I wrote a new one. It would not let me update the old one. I also purchased another board :)

Thanks,
Mike



Thank You, Have a nice day.