Power & Source of Big Ideas

GPIO Connector: I2C2

Moderators: chensy, FATechsupport

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
We’ll add some demo to show hot to use I2C under linux in the future update, please wait.

Thank You.
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
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
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
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.
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
We have MIPI-CSI camera module(CAM1320), it seems using the I2C2, the module can work well too.
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
So can you modify your review on NanoPC-T4? Thank You
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
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.

Who is online

In total there are 28 users online :: 0 registered, 0 hidden and 28 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 28 guests