Skip site navigation (1)Skip section navigation (2)
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>

next in thread | raw e-mail | index | archive | help

--Apple-Mail=_93E3800A-CBBC-43A6-A941-EEADF69175A6
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=windows-1252


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=92t 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





--Apple-Mail=_93E3800A-CBBC-43A6-A941-EEADF69175A6
Content-Disposition: attachment;
	filename=bbb-i2c.diff
Content-Type: application/octet-stream;
	name="bbb-i2c.diff"
Content-Transfer-Encoding: 7bit

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",

--Apple-Mail=_93E3800A-CBBC-43A6-A941-EEADF69175A6--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F45FF8F2-7AEE-4F11-BAED-EF9BB05DEFAA>