BeagleV I2C2 not working

i’m tring to get an RTC working on the BeagleV board
have added

&i2c2 {
    clock-frequency = <100000>;
	status = "okay";
	extrtc: ds1307@68 {
		compatible = "maxim,ds1307";
		reg = <0x68>;
	};
};

to light-beagle-ref.dts (changed clock from 400K to 100K JIC)
have verified that it is being compiled into light-beagle.dtb by converting the dtb to a dts
dmesg has
rtc-ds1307: probe of 2-0068 failed with error -121
have attached oscilloscope probes to both SCL and SDA, no signals at all
i2cdetect does not indicate there is a device present and there is no oscilloscope signal when running the command.
The connections: P9 row 1, gnd, row 2, 3v3, row 10 outside, SCL, row 10 inside SDA
P9 row 1 is closes to the barrel connector

what have i missed??

thanks,

edit #1
reconfigured I2C2 pins as led gpios, and i can toggle them. so hardware should be good.

edit #2
bada bing bada boom,
i2c2 is now working
my changes were to configure I2C2 in u-boot,
in light.c file,
thead-build/light-fm/tmp-glibc/work/light_beagle-oe-linux/u-boot/1_2020.10-r0/git/board/thead/light-c910/light.c
Around line 1856, comment out original I2C2 light_pin_mux and light_pin_cfg and add new light_pin_cfg as follows
/* P9_19 (Ball:G4) I2C2_SCL_MUX*/
//light_pin_mux(I2C2_SCL,3);
//light_pin_cfg(I2C2_SCL, PIN_SPEED_NORMAL, PIN_PN, 2);
light_pin_cfg(I2C2_SCL,PIN_SPEED_NORMAL,PIN_PN,4);
/* P9_20 (Ball:G3) I2C2_SDA_MUX*/
//light_pin_mux(I2C2_SDA,3);
//light_pin_cfg(I2C2_SDA, PIN_SPEED_NORMAL, PIN_PN, 2);
light_pin_cfg(I2C2_SDA, PIN_SPEED_NORMAL, PIN_PN, 4);

rebuild u-boot and yocto image and deploy to BeagleV board

1 Like

I am messing w/ the BeagleV-Ahead too. I am messing w/ GPIO right now w/ the Relay Cape.

I wanted to start a conversation in this post…

The reason being, if there are any advancements, I would like to know too.

Seth

P.S. I added some DTC changes and then compiled them. I am still searching for sysfs or libgpiod-dev/gpiod ideas in the fs. No luck on my end so far.

sysfsutils is part of the yocto build, libgpiod is not in this meta data, but there is a libgpiod.bb out there, so it is supported buy a yocto build somewhere. not that it’s compatible with BeagleV.

1 Like

Oh. I was unaware of that fact. Thank you for the heads up.

Seth

P.S. There is an Ubuntu Image available for the BeagleV-Ahead. It is in the docs.

also, i2c2 does not work from u-boot command prompt either.

after a few days and a clean rebuild, i’m getting the following errors
[ 47.153999] rtc-ds1307 2-0068: write error -121
[ 47.158959] rtc-ds1307 2-0068: read error -121
there is no oscilloscope signals
the time is being set from the RTC

these errors only show up when Ethernet cable is connected to BeagleV
disconnecting the Ethernet cable after the errors start printing, does not stop the errors.