From owner-freebsd-embedded@FreeBSD.ORG Wed Feb 19 12:58:58 2014 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4D85B52; Wed, 19 Feb 2014 12:58:58 +0000 (UTC) Received: from mail-yh0-x234.google.com (mail-yh0-x234.google.com [IPv6:2607:f8b0:4002:c01::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7351013CB; Wed, 19 Feb 2014 12:58:58 +0000 (UTC) Received: by mail-yh0-f52.google.com with SMTP id a41so321118yho.25 for ; Wed, 19 Feb 2014 04:58:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:subject:message-id:date:to:mime-version; bh=Rq9JbySepSJlen7BZtrHxXBcKN0VleZkGWMl9TpW9lY=; b=dhsly0SthJIg4yJTxI0hZxBBKFsBk5INNiQ+vt8kvnYW44XAhBuTfFHhKcCxnyzgny o2ykay8zTsOORe2VpxZ1Nb2aDGqo5c0UMJbWg0ex/Ipzust0X9uZcxkjnr6+13LgcImz 2n344jvDlWjmH3AZBP2LstEHiZiP4PuTLfcI3BoJBjkmAa9vPHT5CiiUDm35oKN2698H /Y2DIr0x35VcCcN8TD6aVHcyGSRNqTF6mxeIZDEEJeZwiS2SrpwwH7rLOiIq4i9nNfDY z4Yh4liyKfnNRCiCfJb9haDSxpBxD3aZ1+ujiSi2HiVTD1WutW66Ycls7Qj0LtoYhtdS TYfw== X-Received: by 10.236.44.173 with SMTP id n33mr31437556yhb.98.1392814737747; Wed, 19 Feb 2014 04:58:57 -0800 (PST) Received: from [10.10.1.113] ([201.72.203.70]) by mx.google.com with ESMTPSA id c23sm374898yhk.23.2014.02.19.04.58.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Feb 2014 04:58:56 -0800 (PST) From: Luiz Otavio O Souza Content-Type: multipart/mixed; boundary="Apple-Mail=_93E3800A-CBBC-43A6-A941-EEADF69175A6" Subject: Enable I2C1 and I2C2 on BBB by default Message-Id: Date: Wed, 19 Feb 2014 09:58:47 -0300 To: freebsd-arm@freebsd.org, freebsd-embedded@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) X-Mailer: Apple Mail (2.1827) X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Feb 2014 12:58:58 -0000 --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--