From owner-freebsd-arm@FreeBSD.ORG Fri May 2 05:59:35 2014 Return-Path: Delivered-To: freebsd-arm@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 80D13EC6 for ; Fri, 2 May 2014 05:59:35 +0000 (UTC) Received: from mail-ee0-x22a.google.com (mail-ee0-x22a.google.com [IPv6:2a00:1450:4013:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 15DD91C1C for ; Fri, 2 May 2014 05:59:34 +0000 (UTC) Received: by mail-ee0-f42.google.com with SMTP id d17so2796235eek.1 for ; Thu, 01 May 2014 22:59:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=LcmJBkdTyG5c1LEP2EeztGsKkZh3Tt5cnF9bYe1nDCw=; b=BBeoyhNwK3zar/tUqd58iP3kpdgXkl6HKHAT2PPqmW5LsS1c32AKhDzNAY1PkY4zxw 3cZOeOFxnaAJ7WnN5BaUEblpiO1opQOly4gV597MHYxFLsu7mmFOlb+MxwKaoOWD2PZI FwkW0WB6GyzRAF0sY4y34sP5SkYOVgDPbgwi52cKNQbu1efWOZarFQ2t4uO0aRRFpYMc Vz902bkXtYLe/D2qNZmpWyqvcYJUfXPCUNvJN+EWiTBpg+1ihnBuq2dwgyz/GbAs3Nc5 AtlAOgARjkABGW1sUPnuYqad30vgJlC+hdCzoTbkVj73Tr80Ht/jHNTkWR3mQQXrdd+O VW0A== X-Received: by 10.14.2.68 with SMTP id 44mr12905338eee.63.1399010372485; Thu, 01 May 2014 22:59:32 -0700 (PDT) Received: from ketas-laptop.mydomain (ketas-laptop6.si.pri.ee. [2001:ad0:91f:0:21a:6bff:fe66:2ad3]) by mx.google.com with ESMTPSA id y7sm1912438eev.5.2014.05.01.22.59.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 May 2014 22:59:30 -0700 (PDT) Sender: Sulev-Madis Silber Message-ID: <53633440.3070702@hot.ee> Date: Fri, 02 May 2014 08:59:28 +0300 From: "Sulev-Madis Silber (ketas)" User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:15.0) Gecko/20120912 Thunderbird/15.0.1 MIME-Version: 1.0 To: Winston Smith Subject: BBB/I2C: Read PMIC data References: In-Reply-To: X-TagToolbar-Keys: D20140502085928676 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: FreeBSD ARM X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2014 05:59:35 -0000 On 2014-05-01 20:12, Winston Smith wrote: > Continuing on with working with the I2C interface on the BBB I wrote a > utility to read the BBB's 28 byte system EEPROM on iic0, address 0x50 > which contains the model and serial numbers. See pastebin here: > > http://pastebin.com/p7XwKUGZ > > However, when I run the utility: > > root@beaglebone:~ # ./bbb_eeprom > Read from slave 50 on /dev/iic0, signature=AA:55:33:EE > Model: A335BNLT0A6A > Serial: 0214BBBK4321 > > > I see the following warning on the console: > > interrupt storm detected on "intr70:"; throttling interrupt source > > > Does this mean anything, or is it just a spurious warning. > > BTW: This is with FreeBSD 11-CURRENT r265163. > > > -W Could you look into reading data from PMIC? I tried... there is all the code that shows power status on boot... there are PMIC I2C specs... there is your code... however I clearly can't write C enough to get that one byte out of PMIC and displayed in human-readable form. And I would want to see this code ending up in base. So I could read that serial and live power status (+ other things from PMIC) from somewhere. PMIC also has power button monitoring and interrupt firing on power input status change. Also battery-related stuff. I wish the onboard PMIC could also measure voltages of inputs and battery. But sadly you need external components to get those functions. While you're there, try not to blow up system by reconfiguring PMIC output voltages... :P although those are protected a bit.