Date: Wed, 19 Feb 2014 09:58:47 -0300 From: Luiz Otavio O Souza <loos.br@gmail.com> To: freebsd-arm@freebsd.org, freebsd-embedded@freebsd.org Subject: Enable I2C1 and I2C2 on BBB by default Message-ID: <F45FF8F2-7AEE-4F11-BAED-EF9BB05DEFAA@gmail.com>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Is there any problem if i enable the second and the third I2C controllers by default on BBB ?
ATM only the first controller is enabled and it is only used to connect the on-board devices (PMIC and HDMI framer), this iicbus isn’t exposed on the expansion headers.
The two additional controllers are exposed on P9 expansion header, the I2C1 is at pins 17 and 18 and the I2C2 is at pins 19 and 20.
The I2C2 is the default iicbus used to read the cape eeprom contents (when you have a cape installed).
Both controllers had been tested and seems to work fine on my BBB.
Regards,
Luiz
[-- Attachment #2 --]
Index: src/sys/boot/fdt/dts/am335x.dtsi
===================================================================
--- src/sys/boot/fdt/dts/am335x.dtsi (revision 262131)
+++ src/sys/boot/fdt/dts/am335x.dtsi (working copy)
@@ -210,6 +210,26 @@
i2c-device-id = <0>;
};
+ i2c1: i2c@4802a000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "ti,i2c";
+ reg =< 0x4802a000 0x1000 >;
+ interrupts = <71>;
+ interrupt-parent = <&AINTC>;
+ i2c-device-id = <1>;
+ };
+
+ i2c2: i2c@4819c000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ compatible = "ti,i2c";
+ reg =< 0x4819c000 0x1000 >;
+ interrupts = <30>;
+ interrupt-parent = <&AINTC>;
+ i2c-device-id = <2>;
+ };
+
pwm@48300000 {
compatible = "ti,am335x-pwm";
#address-cells = <1>;
Index: src/sys/boot/fdt/dts/beaglebone-black.dts
===================================================================
--- src/sys/boot/fdt/dts/beaglebone-black.dts (revision 262131)
+++ src/sys/boot/fdt/dts/beaglebone-black.dts (working copy)
@@ -52,6 +52,12 @@
/* I2C0 */
"I2C0_SDA", "I2C0_SDA","i2c",
"I2C0_SCL", "I2C0_SCL","i2c",
+ /* I2C1 */
+ "SPI0_D1", "I2C1_SDA", "i2c",
+ "SPI0_CS0", "I2C1_SCL", "i2c",
+ /* I2C2 */
+ "UART1_CTSn", "I2C2_SDA", "i2c",
+ "UART1_RTSn", "I2C2_SCL", "i2c",
/* Ethernet */
"MII1_RX_ER", "gmii1_rxerr", "input_pulldown",
"MII1_TX_EN", "gmii1_txen", "output",
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F45FF8F2-7AEE-4F11-BAED-EF9BB05DEFAA>
