Hi,
I would like to create a gpio-based i2c bus for communicating with an RTC
IC (unfortunately the pins for the hardware i2c busses are not available
for my board, only GPIOs are exposed). I have the following device tree
overlay. The beaglebone will compile and load the overlay, but i2c-gpio is
never loaded, and i2cdetect -l never detects a new bus. The RTC part is
commented out for now, I just want to see if I can get a new i2c bus going:
#cat BB-GIRTC-00A0.dts
/dts-v1/;
/plugin/;
/{
compatible = "ti,beaglebone", "ti,beaglebone-black",
"ti,beaglebone-green";
part-number = "BB-GIRTC";
version = "00A0";
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
bb_i2cx_pins: pinmux_bb_i2cx_pins {
pinctrl-single,pins = <
0x0dc 0x72 // gpio0 11 0 P8.32
0x0cc 0x72 // gpio2 17 0 P8.34
>;
};
};
};
fragment@1 {
target = <&ocp>;
__overlay__ {
i2c@0 {
compatible = "i2c-gpio";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&bb_i2cx_pins>;
gpios = <&gpio0 11 0 // sda
&gpio2 17 0 // scl
>;
i2c-gpio,sda-open-drain;
i2c-gpio,scl-open-drain;
i2c-gpio,delay-us = <2>; // ~100 kHz
#address-cells = <1>;
#size-cells = <0>;
/*
pcf8523: pcf8523@68 {
compatible = "nxp,pcf8523";
reg = <0x68>;
status = "disable";
};
*/
};
};
};
#dtc -O dtb -o -b 0 -@ BB-GIRTC-00A0.dts
#cp BB-GIRTC-00A0.dtbo /lib/firmware
#echo BB-GIRTC > /sys/devices/platform/bone_capemgr/slots
# cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
9: P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-GIRTC
#dmesg
...
[ 8128.755262] bone_capemgr bone_capemgr: part_number 'BB-GIRTC', version
'N/A'
[ 8128.755347] bone_capemgr bone_capemgr: slot #9: override
[ 8128.755393] bone_capemgr bone_capemgr: Using override eeprom data at
slot 9
[ 8128.755440] bone_capemgr bone_capemgr: slot #9: 'Override Board
Name,00A0,Override Manuf,BB-GIRTC'
[ 8128.756870] bone_capemgr bone_capemgr: slot #9: dtbo
'BB-GIRTC-00A0.dtbo' loaded; overlay id #0
Running on Debian with the following Kernel:
uname -a
Linux beaglebone 4.4.82-ti-r118 #1 SMP Wed Aug 16 03:24:52 UTC 2017 armv7l
GNU/Linux
Any suggestions would be appreciated.
Tom
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/54d88dfa-09b8-4ff4-b6b5-40c766cdabb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.