From owner-freebsd-arm@FreeBSD.ORG Mon Mar 2 23:14:31 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1E90256 for ; Mon, 2 Mar 2015 23:14:31 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33D24826 for ; Mon, 2 Mar 2015 23:14:31 +0000 (UTC) Received: by widex7 with SMTP id ex7so17769807wid.1 for ; Mon, 02 Mar 2015 15:14:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=oOwH02v0VIfzzrBmW2eCSNaOPvydJr2HeRGJVoFkyqA=; b=j8F+EV8KEPEx1BvZQUI4ydSFaTwn0b/ytVzyOxbs0tSUPh8iXP8Rxgd4UbSGRv6TiA 9e/PBKH8cyLT4WyF/aP7hRHSNGDhTnih8T8t/14/J/YRapja3VPZXvmmVIQ5QcpwFCcF VeGfpGcg6NIZoHaol+p1GTnfhH/ZwiXlioy7QCpJuzP8w2F2c7mTKdpto9Np964JsTc6 SXhKIslS6g9CjW7Rst9TZHI9d4fmyaKmk3LVyMEqfSa1mPtRiAc9SyoOuAqQKCSlU2v+ Fb/DbLZHCyUtgsitNt4wQelWvlWC78BT5ekukNh9KscXmKdOyTOg3T9ywB/bapfJgqta 4dsg== MIME-Version: 1.0 X-Received: by 10.181.13.39 with SMTP id ev7mr40838940wid.3.1425338069395; Mon, 02 Mar 2015 15:14:29 -0800 (PST) Received: by 10.180.195.99 with HTTP; Mon, 2 Mar 2015 15:14:29 -0800 (PST) In-Reply-To: <20150302124103.689135d3@zeta.dino.sk> References: <20150216093418.3d1be83b@zeta.dino.sk> <20150219075342.7d2e7eec@zeta.dino.sk> <20150302124103.689135d3@zeta.dino.sk> Date: Mon, 2 Mar 2015 20:14:29 -0300 Message-ID: Subject: Re: Raspberry Pi SPI device example? From: Luiz Otavio O Souza To: Milan Obuch Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-arm@freebsd.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2015 23:14:31 -0000 On 2 March 2015 at 08:41, Milan Obuch wrote: > On Thu, 19 Feb 2015 07:53:42 +0100 > Milan Obuch wrote: > > Hello, > > I am trying to do something, but no luck yet - it looks like I need > somehow write into rpi.dtb blob that I added something into kernel. > Unfortunatelly, none of those five files help in this area, they are > 'activated' via hints mechanism which does not help me... > > Do we have something to shed some light here for me? Also, is it > possible to boot kernel with verbose logging, but not with some option > in kernel config and rebuild? > > Regards, > Milan Milan, If you have a serial console attached, you can stop the boot while kernel is being loaded and boot with 'boot -v' for a verbose boot. Edit the DTS source file (bcm2835.dtsi and/or rpi.dts in sys/boot/fdt/dts/arm/) and then the DTB will be built as part of the next kernel build (you can also build it manually in sys/modules/dtb/rpi). Here is a patch I'm using to attach a mx25l compatible flash on my RPi (old patch...): http://loos.com.br/mx25l-fdt-intr.diff And the DTS changes: Index: sys/boot/fdt/dts/rpi.dts =================================================================== --- sys/boot/fdt/dts/rpi.dts (revision 253747) +++ sys/boot/fdt/dts/rpi.dts (working copy) @@ -281,6 +281,14 @@ broadcom,function = "ALT3"; }; }; + + spi0 { + flash0 { + compatible = "flash,mx25l"; + spi-chipselect = <0>; + }; + }; + usb { hub { compatible = "usb,hub", "usb,device"; HTH, Luiz