From owner-freebsd-arm@freebsd.org Fri Dec 30 19:36:26 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BC57C98F2C for ; Fri, 30 Dec 2016 19:36:26 +0000 (UTC) (envelope-from thomasskibo@yahoo.com) Received: from nm8-vm2.bullet.mail.gq1.yahoo.com (nm8-vm2.bullet.mail.gq1.yahoo.com [98.136.218.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4704010A4 for ; Fri, 30 Dec 2016 19:36:26 +0000 (UTC) (envelope-from thomasskibo@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1483126382; bh=ZAPm0BJZW+8vHCTpdCJ6dWMtqrC6MR5ta14vyh1iVWY=; h=From:Subject:Date:To:From:Subject; b=dASZkdXAVX3QStzGmmHF6zypaQXWr2anF48WhigqDB2HF03BVl+4FGbt3ZAx29Q+zNA3fuzl8P+5A536XjI2unE6X21LXc/qgMqAWD8ssRA3ocE9+2z38Py6c4pyL7bfPhEqhZf63+joG4lixD5V0TBeglXTDPEfBKt42bhObmmx2uZBKzpFKN0FXUIHqFxCnPcCs89aA8+akrWExxFPtOeZim2IZQ3ouxbi9MiUTzYyrPDO+9OViVS/LBkgBsxmf4uahmaarVzPsWHY8pGWBcRYwhUO0DcFynGmnMu++6c5/6+0gJI+g9r3+DGW5EwiFoTF1e3tOug7koWdYlv2Pw== Received: from [98.137.12.174] by nm8.bullet.mail.gq1.yahoo.com with NNFMP; 30 Dec 2016 19:33:02 -0000 Received: from [208.71.42.195] by tm13.bullet.mail.gq1.yahoo.com with NNFMP; 30 Dec 2016 19:33:02 -0000 Received: from [127.0.0.1] by smtp206.mail.gq1.yahoo.com with NNFMP; 30 Dec 2016 19:33:02 -0000 X-Yahoo-Newman-Id: 774856.29480.bm@smtp206.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Mj0W3BYVM1l.jAFpeMoR2biX2..i386A8c.0Ob4YI2GUhjD XvBWvaSopN2YLqTPKY.sAGymBKaBCBQoQlTKs_mbtr2vuzL98nG_IKeTKm31 tribgg5aw03Xfz9_fpGD4qTs8ac8G0Bn4kptLYgUChNuBZfHcoRdwTZeStsM uyKJU7Ut67QSOvwG5Zi1tdmN8IVBXoKsv0IYxROSKjVI69f.pr_N_T1itdB. 6GN0IRr7uzrDLYhdg5r6KOOXoz54wB.fc8UcaC.6OR6UWmV0nLGHI5LMuPzU aDxa_rtI7Bpdcs5.fb20dW_1W3qOc0BhiQijErquRoaXOKZwUpRF29maXrdX yaKpDs6T9XLaXX9C1q2zFa0df7Z0Lg1Jwfulj710A2qPL4_NoauZ0ZaIuJnn L1ir_t_S_GvhZKirBYOwmZsl.Kb_2vwB54pgKyqEVaZMjRBkmYUyoDVUL7AO FcklHaoqhtyg4rHIzFLheOJxRKUP9_NXXzOnt642s.Hor82egSY3vN74ixBL ikb9.LcBKoMxo1XjkeiW3Vy3WbpXPT4LhUt0Ssi5F12eroJdggHmWUfytcIt 5ykoIn4ZkO398OrmXlZfyR.jDKBUKcUjz5sN3YWQFYeA- X-Yahoo-SMTP: .8Dytk6swBAeTUTcf.ezO8BKaYfn.mUV From: Thomas Skibo Content-Type: multipart/mixed; boundary="Apple-Mail=_AA84A1E2-5020-413E-8832-953C02FE2E4D" Subject: Re: Finally bringing FreeBSD to Parallella Message-Id: <2CAC521E-AB65-453F-B1CC-DE025DA43596@yahoo.com> Date: Fri, 30 Dec 2016 11:33:01 -0800 To: freebsd-arm@freebsd.org, =?utf-8?Q?Daniel_H=C3=BCbleitner?= Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2016 19:36:26 -0000 --Apple-Mail=_AA84A1E2-5020-413E-8832-953C02FE2E4D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello. Using the GNU dts files for Zynq boards is not as easy as just adding = the proper compat strings. Off the top of my head: - A range of physical memory must be reserved because it is not = accessible by all AXI masters. This is done in zynq-7000.dtsi right now = but maybe it can be done in zy7_machdep.c (?)) - Several peripherals (including mpcore-timers) must derive their = reference clock speed automagically from the PS clock speed instead of = being specified in each peripheral's device tree entry. - The ethernet driver needs to be able to change its reference clock in = response to media speed changes. The hack I use for this requires the = ethernet=E2=80=99s device tree entry to specify the =E2=80=9Cunit = number" of its reference clock so it can request speed changes from the = SLCR block. It=E2=80=99s kind of on my to-do list to have GNU DTS files working for = 12.0 but I haven=E2=80=99t been working on it lately. Regarding Parallella: I had FreeBSD booting on Parallella several years ago but I bricked my = board and so I stopped updating it. The Parallella has u-boot in a = flash memory but without the API option. Rather than trying to re-flash = the u-boot and risk bricking the Parallella (which I eventually did = anyway), I packaged a u-boot binary with the proper options in a uImage = file so the boot process was FSBL =E2=80=94> U-boot =E2=80=94> U-boot = =E2=80=94> ubldr =E2=80=94> FreeBSD. The uImage file I used is in a = tarball at http://www.skibo.net/zedbsd/parallella_freebsd.tgz . I think it would be better, for now, to use RELEASE-11.0 which has good = Zynq support and just come up with a BSD style DTS file for Parallella. = I think the only difference between Parallella and Zedboard is that the = SD card is attached to SDHCI1 instead of SDHCI0 and the memory size is = larger. My best guess for a DTS file is attached. Happy New Year. =E2=80=94 Thomas Skibo thomasskibo@yahoo.com --Apple-Mail=_AA84A1E2-5020-413E-8832-953C02FE2E4D Content-Disposition: attachment; filename=parallella.dts Content-Type: application/octet-stream; name="parallella.dts" Content-Transfer-Encoding: 7bit /*- * Copyright (c) 2016 The FreeBSD Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $FreeBSD$ */ /dts-v1/; /include/ "zynq-7000.dtsi" / { model = "parallella"; compatible = "adapteva,parallella"; memory { // First megabyte isn't accessible by all interconnect masters. device_type = "memory"; reg = <0x100000 0x3ff00000>; /* 1GB RAM at 0x100000 */ }; fb0: fb@43000000 { compatible = "xlnx,xlnx-fb"; reg = <0x43000000 0x10000>, <0x43c00000 0x10000>; }; chosen { stdin = &uart1; stdout = &uart1; }; }; &slcr { clock-frequency = <33333333>; // 33Mhz PS_CLK }; &global_timer { clock-frequency = <333333333>; // 333Mhz }; &uart1 { status = "okay"; }; ð0 { status = "okay"; }; &sdhci1 { status = "okay"; }; &ehci0 { status = "okay"; }; --Apple-Mail=_AA84A1E2-5020-413E-8832-953C02FE2E4D--