From owner-freebsd-arm@FreeBSD.ORG Tue Sep 17 22:00:16 2013 Return-Path: Delivered-To: freebsd-arm@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 34931DBD for ; Tue, 17 Sep 2013 22:00:16 +0000 (UTC) (envelope-from fabiodive@gmail.com) Received: from mail-we0-x22b.google.com (mail-we0-x22b.google.com [IPv6:2a00:1450:400c:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C66B12739 for ; Tue, 17 Sep 2013 22:00:15 +0000 (UTC) Received: by mail-we0-f171.google.com with SMTP id t61so5587904wes.2 for ; Tue, 17 Sep 2013 15:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:date:message-id :cc:to:mime-version; bh=xIfQEu3c0WwB8hey0hM92EiKOUl6Vq+vPgzpkfCjI3A=; b=LBPnvWPzOL3Tuv+3i55W7zzHHrKK+vxr4PtQYS5nPgFJxFrpmhx++v5dC5UU0bdVQl NDcbJcbzGoYd0lJelhoIe7K3G3TP8eG/H+LG6NoRG6TG3S/r/nyrHQngW7jJPwNFxkYD kxplw37TCDjSUnglCfc1ZQr7fvxdgGWnAkhUJoED+MRfLjbsxhLNN+ERf1GHNS5wJEII mjgJfrSuVsa0FKKVTMNCnIwFiJ9/If+EUWQPX+EogWryrBwctigBGRAmG/CnwHdu6h/c 6F4HJ44csUxonDpYJt7mBIS3qx/A1L/iZvIdYfUbxii2OPMh7VHj4+G10SJx899hQXkK 2H+g== X-Received: by 10.180.107.167 with SMTP id hd7mr4268831wib.13.1379455214198; Tue, 17 Sep 2013 15:00:14 -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 dq11sm7401733wid.3.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Sep 2013 15:00:13 -0700 (PDT) From: fabiodive Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: SPI device on Raspberry PI Date: Tue, 17 Sep 2013 23:00:11 +0100 Message-Id: <935B7003-F750-42E7-9100-C27028B6A111@gmail.com> To: Luiz Otavio O Souza Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) X-Mailer: Apple Mail (2.1510) Cc: "freebsd-arm@FreeBSD.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Sep 2013 22:00:16 -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=