From owner-freebsd-embedded@FreeBSD.ORG Tue Sep 17 21:58:42 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 438BCD3A for ; Tue, 17 Sep 2013 21:58:42 +0000 (UTC) (envelope-from fabiodive@gmail.com) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE13E2700 for ; Tue, 17 Sep 2013 21:58:41 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id cb5so5602488wib.4 for ; Tue, 17 Sep 2013 14:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3Kmr9dgspfNBJCVOmF0d2AkDQVuOpx8upKDvU/1zFbE=; b=l1VLH11sI2f3U26oDMS4wG6EiVUwFHLy444hOgBPvLFscsJ1y1cefIkHrT2SvqUqpc 0WTOw3Z6qkjF6EjVckMt/H9R89uvTeweWoVWA9/l/k0FYNNuLzRZw/V7pIphOAkflk5/ trfhiOBXamGCpByvfI6Dznt/pRnave6KfQiYS+bdKhsuy7beTiuvq9SYBwBbXI715Cs9 y8P0ilBlCT3o7abqZ2t2qhQm1xQ+wAlp17toGXotgpRF0FSxGhXhVhNBHYJXAUCisd/s X4ftd+isulD8tQTvj232C/etmK7CLKiUW2Td/uDd0zgrYkE8rpzn8jBfQjYsFJgY0Sa/ Ba0A== X-Received: by 10.180.210.243 with SMTP id mx19mr4206472wic.35.1379455120192; Tue, 17 Sep 2013 14:58:40 -0700 (PDT) Received: from [192.168.113.40] (135.Red-80-24-42.staticIP.rima-tde.net. [80.24.42.135]) by mx.google.com with ESMTPSA id l9sm7368300wif.10.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Sep 2013 14:58:39 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: DIR-825B1 iicbus thing From: fabiodive In-Reply-To: Date: Tue, 17 Sep 2013 22:58:37 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <7B91DB28-4938-4E02-8BE8-B7CD813CE895@gmail.com> References: <1378491503.48812.5.camel@localhost> <1378493166.48894.1.camel@localhost> <1378573350.1588.6.camel@localhost> <1378573596.1588.7.camel@localhost> To: Luiz Otavio O Souza X-Mailer: Apple Mail (2.1510) Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 21:58:42 -0000 Hello Luiz, I was able to use your patches on Raspberry PI, I builded an image with crochet and this is my dmesg output: root@:/usr/ports # dmesg KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2013 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights = reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 10.0-ALPHA2 #0 r255620M: Tue Sep 17 02:45:12 UTC 2013 = seaman@bluehouse:/tank/projects/boreview_freebsd/crochet-freebsd/work/obj/= arm.armv6/tank/projects/boreview_freebsd/head/sys/RPI-B arm FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 module_register: module iichb/iicbus already exists! Module iichb/iicbus failed to register: 17 CPU: ARM1176JZ-S rev 7 (ARM11J core) Supported features: ARM_ISA THUMB2 JAZELLE ARMv4 Security_Ext WB enabled LABT branch prediction enabled 16KB/32B 4-way instruction cache 16KB/32B 4-way write-back-locking-C data cache real memory =3D 536870912 (512 MB) avail memory =3D 484188160 (461 MB) kbd0 at kbdmux0 random: initialized simplebus0: mem 0x20000000-0x20ffffff = on fdtbus0 intc0: mem 0x2000b200-0x2000b3ff on = simplebus0 systimer0: mem 0x20003000-0x20003fff irq = 8,9,10,11 on simplebus0 Event timer "BCM2835 Event Timer 3" frequency 1000000 Hz quality 1000 Timecounter "BCM2835 Timecounter" frequency 1000000 Hz quality 1000 bcmwd0: mem 0x2010001c-0x20100027 on simplebus0 gpio0: mem 0x20200000-0x202000af irq = 57,59,58,60 on simplebus0 gpio0: read-only pins: 46,47,48,49,50,51,52,53. gpio0: reserved pins: 48,49,50,51,52,53. gpioc0: on gpio0 gpiobus0: on gpio0 iichb0: mem 0x20205000-0x2020501f irq 61 = on simplebus0 iicbus0: on iichb0 iic0: on iicbus0 iichb1: mem 0x20804000-0x2080401f irq 61 = on simplebus0 iicbus1: on iichb1 iic1: on iicbus1 spi0: mem 0x20204000-0x2020401f irq 62 on = simplebus0 spibus0: on spi0 miibus0: on smsc0 ukphy0: PHY 1 on miibus0 ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto ue0: on smsc0 and this is /dev root@:/usr/ports # ls /dev bpf cuau0.lock iic0 log nfslock = stderr ttyv0 ttyv7 ttyve = uhid0 bpf0 devctl iic1 mdctl null = stdin ttyv1 ttyv8 ttyvf = ukbd0 console devstat kbd0 mem openfirm = stdout ttyv2 ttyv9 ufssuspend = urandom consolectl fd kbd1 mmcsd0 ptmx = sysmouse ttyv3 ttyva ugen0.1 = usb ctty fido kbdmux0 mmcsd0s1 pts = ttyu0 ttyv4 ttyvb ugen0.2 = usbctl cuau0 geom.ctl klog mmcsd0s2 random = ttyu0.init ttyv5 ttyvc ugen0.3 = xpt0 cuau0.init gpioc0 kmem mmcsd0s2a snp = ttyu0.lock ttyv6 ttyvd ugen0.4 = zero root@:/usr/ports #=20 Now.. I see the GPIO device and iic as well but what about SPI? Should I create the device or just use GPIO? Any ideas? Thank you Fabio=