From owner-svn-src-all@FreeBSD.ORG Fri May 16 12:43:47 2014 Return-Path: Delivered-To: svn-src-all@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 C0F4885A; Fri, 16 May 2014 12:43:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A727C2A76; Fri, 16 May 2014 12:43:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GChlNn022144; Fri, 16 May 2014 12:43:47 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GChjkb022131; Fri, 16 May 2014 12:43:45 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405161243.s4GChjkb022131@svn.freebsd.org> From: Ian Lepore Date: Fri, 16 May 2014 12:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r266217 - in stable/10/sys: arm/at91 contrib/dts contrib/dts/arm dev/nand dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 12:43:47 -0000 Author: ian Date: Fri May 16 12:43:45 2014 New Revision: 266217 URL: http://svnweb.freebsd.org/changeset/base/266217 Log: MFC r262591, r262592, r262593, r262597, r262598, r262599, r262600, r262601, r262606 Initial import of Linux/Vendor DTS files for various embedded boards. Initial import of DTS files from Linux Correct initial import script New AT91 devices or fdt probe added to existing devices. Some of these are just stubs for testing the new dts. - nand - SDRAMC - shdwc - tcb - usb host and gadget Added: stable/10/sys/arm/at91/at91_sdramc.c - copied unchanged from r262598, head/sys/arm/at91/at91_sdramc.c stable/10/sys/arm/at91/at91_shdwc.c - copied unchanged from r262599, head/sys/arm/at91/at91_shdwc.c stable/10/sys/arm/at91/at91_tcb.c - copied unchanged from r262600, head/sys/arm/at91/at91_tcb.c stable/10/sys/contrib/dts/ - copied from r262591, head/sys/contrib/dts/ stable/10/sys/contrib/dts/arm/animeo_ip.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/animeo_ip.dts stable/10/sys/contrib/dts/arm/at91-ariag25.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91-ariag25.dts stable/10/sys/contrib/dts/arm/at91-cosino.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91-cosino.dtsi stable/10/sys/contrib/dts/arm/at91-cosino_mega2560.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91-cosino_mega2560.dts stable/10/sys/contrib/dts/arm/at91-foxg20.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91-foxg20.dts stable/10/sys/contrib/dts/arm/at91-qil_a9260.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91-qil_a9260.dts stable/10/sys/contrib/dts/arm/at91-sama5d3_xplained.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91-sama5d3_xplained.dts stable/10/sys/contrib/dts/arm/at91rm9200.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91rm9200.dtsi stable/10/sys/contrib/dts/arm/at91rm9200_pqfp.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91rm9200_pqfp.dtsi stable/10/sys/contrib/dts/arm/at91rm9200ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91rm9200ek.dts stable/10/sys/contrib/dts/arm/at91sam9260.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9260.dtsi stable/10/sys/contrib/dts/arm/at91sam9263.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9263.dtsi stable/10/sys/contrib/dts/arm/at91sam9263ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9263ek.dts stable/10/sys/contrib/dts/arm/at91sam9g15.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g15.dtsi stable/10/sys/contrib/dts/arm/at91sam9g15ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g15ek.dts stable/10/sys/contrib/dts/arm/at91sam9g20.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g20.dtsi stable/10/sys/contrib/dts/arm/at91sam9g20ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g20ek.dts stable/10/sys/contrib/dts/arm/at91sam9g20ek_2mmc.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g20ek_2mmc.dts stable/10/sys/contrib/dts/arm/at91sam9g20ek_common.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g20ek_common.dtsi stable/10/sys/contrib/dts/arm/at91sam9g25.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g25.dtsi stable/10/sys/contrib/dts/arm/at91sam9g25ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g25ek.dts stable/10/sys/contrib/dts/arm/at91sam9g35.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g35.dtsi stable/10/sys/contrib/dts/arm/at91sam9g35ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g35ek.dts stable/10/sys/contrib/dts/arm/at91sam9g45.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9g45.dtsi stable/10/sys/contrib/dts/arm/at91sam9m10g45ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9m10g45ek.dts stable/10/sys/contrib/dts/arm/at91sam9n12.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9n12.dtsi stable/10/sys/contrib/dts/arm/at91sam9n12ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9n12ek.dts stable/10/sys/contrib/dts/arm/at91sam9x25.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x25.dtsi stable/10/sys/contrib/dts/arm/at91sam9x25ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x25ek.dts stable/10/sys/contrib/dts/arm/at91sam9x35.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x35.dtsi stable/10/sys/contrib/dts/arm/at91sam9x35ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x35ek.dts stable/10/sys/contrib/dts/arm/at91sam9x5.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x5.dtsi stable/10/sys/contrib/dts/arm/at91sam9x5_macb0.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x5_macb0.dtsi stable/10/sys/contrib/dts/arm/at91sam9x5_macb1.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x5_macb1.dtsi stable/10/sys/contrib/dts/arm/at91sam9x5_usart3.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x5_usart3.dtsi stable/10/sys/contrib/dts/arm/at91sam9x5cm.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x5cm.dtsi stable/10/sys/contrib/dts/arm/at91sam9x5ek.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/at91sam9x5ek.dtsi stable/10/sys/contrib/dts/arm/ethernut5.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/ethernut5.dts stable/10/sys/contrib/dts/arm/evk-pro3.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/evk-pro3.dts stable/10/sys/contrib/dts/arm/ge863-pro3.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/ge863-pro3.dtsi stable/10/sys/contrib/dts/arm/kizbox.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/kizbox.dts stable/10/sys/contrib/dts/arm/mpa1600.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/mpa1600.dts stable/10/sys/contrib/dts/arm/pm9g45.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/pm9g45.dts stable/10/sys/contrib/dts/arm/sama5d3.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3.dtsi stable/10/sys/contrib/dts/arm/sama5d31.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d31.dtsi stable/10/sys/contrib/dts/arm/sama5d31ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d31ek.dts stable/10/sys/contrib/dts/arm/sama5d33.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d33.dtsi stable/10/sys/contrib/dts/arm/sama5d33ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d33ek.dts stable/10/sys/contrib/dts/arm/sama5d34.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d34.dtsi stable/10/sys/contrib/dts/arm/sama5d34ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d34ek.dts stable/10/sys/contrib/dts/arm/sama5d35.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d35.dtsi stable/10/sys/contrib/dts/arm/sama5d35ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d35ek.dts stable/10/sys/contrib/dts/arm/sama5d36.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d36.dtsi stable/10/sys/contrib/dts/arm/sama5d36ek.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d36ek.dts stable/10/sys/contrib/dts/arm/sama5d3_can.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_can.dtsi stable/10/sys/contrib/dts/arm/sama5d3_emac.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_emac.dtsi stable/10/sys/contrib/dts/arm/sama5d3_gmac.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_gmac.dtsi stable/10/sys/contrib/dts/arm/sama5d3_lcd.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_lcd.dtsi stable/10/sys/contrib/dts/arm/sama5d3_mci2.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_mci2.dtsi stable/10/sys/contrib/dts/arm/sama5d3_tcb1.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_tcb1.dtsi stable/10/sys/contrib/dts/arm/sama5d3_uart.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3_uart.dtsi stable/10/sys/contrib/dts/arm/sama5d3xcm.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3xcm.dtsi stable/10/sys/contrib/dts/arm/sama5d3xdm.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3xdm.dtsi stable/10/sys/contrib/dts/arm/sama5d3xmb.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/sama5d3xmb.dtsi stable/10/sys/contrib/dts/arm/tny_a9260.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/tny_a9260.dts stable/10/sys/contrib/dts/arm/tny_a9260_common.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/tny_a9260_common.dtsi stable/10/sys/contrib/dts/arm/tny_a9263.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/tny_a9263.dts stable/10/sys/contrib/dts/arm/tny_a9g20.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/tny_a9g20.dts stable/10/sys/contrib/dts/arm/usb_a9260.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/usb_a9260.dts stable/10/sys/contrib/dts/arm/usb_a9260_common.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/usb_a9260_common.dtsi stable/10/sys/contrib/dts/arm/usb_a9263.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/usb_a9263.dts stable/10/sys/contrib/dts/arm/usb_a9g20.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/usb_a9g20.dts stable/10/sys/contrib/dts/arm/usb_a9g20_common.dtsi - copied unchanged from r262592, head/sys/contrib/dts/arm/usb_a9g20_common.dtsi stable/10/sys/contrib/dts/arm/usb_a9g20_lpw.dts - copied unchanged from r262592, head/sys/contrib/dts/arm/usb_a9g20_lpw.dts stable/10/sys/dev/usb/controller/at91dci_fdt.c - copied unchanged from r262601, head/sys/dev/usb/controller/at91dci_fdt.c stable/10/sys/dev/usb/controller/ohci_fdt.c - copied unchanged from r262601, head/sys/dev/usb/controller/ohci_fdt.c Modified: stable/10/sys/contrib/dts/FreeBSD-upgrade stable/10/sys/dev/nand/nfc_at91.c Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/arm/at91/at91_sdramc.c (from r262598, head/sys/arm/at91/at91_sdramc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/at91/at91_sdramc.c Fri May 16 12:43:45 2014 (r266217, copy of r262598, head/sys/arm/at91/at91_sdramc.c) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2014 Warner Losh. 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 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 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. + */ + +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#ifdef FDT +#include +#include +#include +#endif + +struct sdramc_softc { + struct resource *mem_res; /* Memory resource */ + device_t sc_dev; +}; + +static int +at91_sdramc_probe(device_t dev) +{ +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91sam9260-sdramc")) + return (ENXIO); +#endif + device_set_desc(dev, "SDRAMC"); + return (0); +} + +static int +at91_sdramc_attach(device_t dev) +{ + int rid, err = 0; + struct sdramc_softc *sc; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + + if (sc->mem_res == NULL) + panic("couldn't allocate register resources"); + + return (err); +} + +static device_method_t at91_sdramc_methods[] = { + DEVMETHOD(device_probe, at91_sdramc_probe), + DEVMETHOD(device_attach, at91_sdramc_attach), + DEVMETHOD_END +}; + +static driver_t at91_sdramc_driver = { + "at91_sdramc", + at91_sdramc_methods, + sizeof(struct sdramc_softc), +}; + +static devclass_t at91_sdramc_devclass; + +#ifdef FDT +DRIVER_MODULE(at91_sdramc, simplebus, at91_sdramc_driver, at91_sdramc_devclass, NULL, + NULL); +#else +DRIVER_MODULE(at91_sdramc, atmelarm, at91_sdramc_driver, at91_sdramc_devclass, NULL, + NULL); +#endif Copied: stable/10/sys/arm/at91/at91_shdwc.c (from r262599, head/sys/arm/at91/at91_shdwc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/at91/at91_shdwc.c Fri May 16 12:43:45 2014 (r266217, copy of r262599, head/sys/arm/at91/at91_shdwc.c) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2014 Warner Losh. 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 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 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. + */ + +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#ifdef FDT +#include +#include +#include +#endif + +struct shdwc_softc { + struct resource *mem_res; /* Memory resource */ + device_t sc_dev; +}; + +static int +at91_shdwc_probe(device_t dev) +{ +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91sam9260-shdwc")) + return (ENXIO); +#endif + device_set_desc(dev, "SHDWC"); + return (0); +} + +static int +at91_shdwc_attach(device_t dev) +{ + int rid, err = 0; + struct shdwc_softc *sc; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + + if (sc->mem_res == NULL) + panic("couldn't allocate register resources"); + + return (err); +} + +static device_method_t at91_shdwc_methods[] = { + DEVMETHOD(device_probe, at91_shdwc_probe), + DEVMETHOD(device_attach, at91_shdwc_attach), + DEVMETHOD_END +}; + +static driver_t at91_shdwc_driver = { + "at91_shdwc", + at91_shdwc_methods, + sizeof(struct shdwc_softc), +}; + +static devclass_t at91_shdwc_devclass; + +#ifdef FDT +DRIVER_MODULE(at91_shdwc, simplebus, at91_shdwc_driver, at91_shdwc_devclass, NULL, + NULL); +#else +DRIVER_MODULE(at91_shdwc, atmelarm, at91_shdwc_driver, at91_shdwc_devclass, NULL, + NULL); +#endif Copied: stable/10/sys/arm/at91/at91_tcb.c (from r262600, head/sys/arm/at91/at91_tcb.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/at91/at91_tcb.c Fri May 16 12:43:45 2014 (r266217, copy of r262600, head/sys/arm/at91/at91_tcb.c) @@ -0,0 +1,105 @@ +/*- + * Copyright (c) 2014 Warner Losh. 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 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 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. + */ + +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#ifdef FDT +#include +#include +#include +#endif + +struct tcb_softc { + struct resource *mem_res; /* Memory resource */ + device_t sc_dev; +}; + +static int +at91_tcb_probe(device_t dev) +{ +#ifdef FDT + if (!ofw_bus_is_compatible(dev, "atmel,at91rm9200-tcb")) + return (ENXIO); +#endif + device_set_desc(dev, "TCB"); + return (0); +} + +static int +at91_tcb_attach(device_t dev) +{ + int rid, err = 0; + struct tcb_softc *sc; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + rid = 0; + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + + if (sc->mem_res == NULL) + panic("couldn't allocate register resources"); + + return (err); +} + +static device_method_t at91_tcb_methods[] = { + DEVMETHOD(device_probe, at91_tcb_probe), + DEVMETHOD(device_attach, at91_tcb_attach), + DEVMETHOD_END +}; + +static driver_t at91_tcb_driver = { + "at91_tcb", + at91_tcb_methods, + sizeof(struct tcb_softc), +}; + +static devclass_t at91_tcb_devclass; + +#ifdef FDT +DRIVER_MODULE(at91_tcb, simplebus, at91_tcb_driver, at91_tcb_devclass, NULL, + NULL); +#else +DRIVER_MODULE(at91_tcb, atmelarm, at91_tcb_driver, at91_tcb_devclass, NULL, + NULL); +#endif Modified: stable/10/sys/contrib/dts/FreeBSD-upgrade ============================================================================== --- head/sys/contrib/dts/FreeBSD-upgrade Fri Feb 28 01:31:35 2014 (r262591) +++ stable/10/sys/contrib/dts/FreeBSD-upgrade Fri May 16 12:43:45 2014 (r266217) @@ -18,7 +18,7 @@ # # This script should take care of all that the first time... -s=svn+ssh://svn.freebsd.org/base/vendor/device-tree/ +s=svn+ssh://svn.freebsd.org/base/vendor/device-tree/dist/ args=$(grep -v ^# FreeBSD-list | sed -e"s=^=$s=") svn cp -m "Initial import of DTS files from Linux" ${args} svn+ssh://svn.freebsd.org/base/head/sys/contrib/dts/arm Copied: stable/10/sys/contrib/dts/arm/animeo_ip.dts (from r262592, head/sys/contrib/dts/arm/animeo_ip.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/contrib/dts/arm/animeo_ip.dts Fri May 16 12:43:45 2014 (r266217, copy of r262592, head/sys/contrib/dts/arm/animeo_ip.dts) @@ -0,0 +1,167 @@ +/* + * animeo_ip.dts - Device Tree file for Somfy Animeo IP Boards + * + * Copyright (C) 2011-2012 Jean-Christophe PLAGNIOL-VILLARD + * + * Licensed under GPLv2 only. + */ + +/dts-v1/; +#include "at91sam9260.dtsi" + +/ { + model = "Somfy Animeo IP"; + compatible = "somfy,animeo-ip", "atmel,at91sam9260", "atmel,at91sam9"; + + aliases { + serial0 = &usart1; + serial1 = &usart2; + serial2 = &usart0; + serial3 = &dbgu; + serial4 = &usart3; + serial5 = &uart0; + serial6 = &uart1; + }; + + chosen { + linux,stdout-path = &usart2; + }; + + memory { + reg = <0x20000000 0x4000000>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + main_clock: clock@0 { + compatible = "atmel,osc", "fixed-clock"; + clock-frequency = <18432000>; + }; + }; + + ahb { + apb { + usart0: serial@fffb0000 { + pinctrl-0 = <&pinctrl_usart0 &pinctrl_usart0_rts>; + linux,rs485-enabled-at-boot-time; + status = "okay"; + }; + + usart1: serial@fffb4000 { + pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts>; + linux,rs485-enabled-at-boot-time; + status = "okay"; + }; + + usart2: serial@fffb8000 { + pinctrl-0 = <&pinctrl_usart2>; + status = "okay"; + }; + + macb0: ethernet@fffc4000 { + pinctrl-0 = <&pinctrl_macb_rmii &pinctrl_macb_rmii_mii>; + phy-mode = "mii"; + status = "okay"; + }; + + mmc0: mmc@fffa8000 { + pinctrl-0 = <&pinctrl_mmc0_clk + &pinctrl_mmc0_slot1_cmd_dat0 + &pinctrl_mmc0_slot1_dat1_3>; + status = "okay"; + + slot@1 { + reg = <1>; + bus-width = <4>; + }; + }; + + watchdog@fffffd40 { + status = "okay"; + }; + }; + + nand0: nand@40000000 { + nand-bus-width = <8>; + nand-ecc-mode = "soft"; + nand-on-flash-bbt; + status = "okay"; + + barebox@0 { + label = "barebox"; + reg = <0x0 0x58000>; + }; + + u_boot_env@58000 { + label = "u_boot_env"; + reg = <0x58000 0x8000>; + }; + + ubi@60000 { + label = "ubi"; + reg = <0x60000 0x1FA0000>; + }; + }; + + usb0: ohci@00500000 { + num-ports = <2>; + atmel,vbus-gpio = <&pioB 15 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + }; + + leds { + compatible = "gpio-leds"; + + power_green { + label = "power_green"; + gpios = <&pioC 17 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "heartbeat"; + }; + + power_red { + label = "power_red"; + gpios = <&pioA 2 GPIO_ACTIVE_HIGH>; + }; + + tx_green { + label = "tx_green"; + gpios = <&pioC 19 GPIO_ACTIVE_HIGH>; + }; + + tx_red { + label = "tx_red"; + gpios = <&pioC 18 GPIO_ACTIVE_HIGH>; + }; + }; + + gpio_keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + + keyswitch_in { + label = "keyswitch_in"; + gpios = <&pioB 1 GPIO_ACTIVE_HIGH>; + linux,code = <28>; + gpio-key,wakeup; + }; + + error_in { + label = "error_in"; + gpios = <&pioB 2 GPIO_ACTIVE_HIGH>; + linux,code = <29>; + gpio-key,wakeup; + }; + + btn { + label = "btn"; + gpios = <&pioC 23 GPIO_ACTIVE_HIGH>; + linux,code = <31>; + gpio-key,wakeup; + }; + }; +}; Copied: stable/10/sys/contrib/dts/arm/at91-ariag25.dts (from r262592, head/sys/contrib/dts/arm/at91-ariag25.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/contrib/dts/arm/at91-ariag25.dts Fri May 16 12:43:45 2014 (r266217, copy of r262592, head/sys/contrib/dts/arm/at91-ariag25.dts) @@ -0,0 +1,180 @@ +/* + * at91-ariag25.dts - Device Tree file for Acme Systems Aria G25 (AT91SAM9G25 based) + * + * Copyright (C) 2013 Douglas Gilbert , + * Robert Nelson + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "at91sam9g25.dtsi" + +/ { + model = "Acme Systems Aria G25"; + compatible = "acme,ariag25", "atmel,at91sam9x5ek", + "atmel,at91sam9x5", "atmel,at91sam9"; + + aliases { + serial0 = &dbgu; + serial1 = &usart0; + serial2 = &usart1; + serial3 = &usart2; + serial4 = &usart3; + serial5 = &uart0; + serial6 = &uart1; + }; + + chosen { + bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait"; + }; + + memory { + /* 128 MB, change this for 256 MB revision */ + reg = <0x20000000 0x8000000>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + main_clock: clock@0 { + compatible = "atmel,osc", "fixed-clock"; + clock-frequency = <12000000>; + }; + }; + + ahb { + apb { + mmc0: mmc@f0008000 { + /* N.B. Aria has no SD card detect (CD), assumed present */ + + pinctrl-0 = < + &pinctrl_mmc0_slot0_clk_cmd_dat0 + &pinctrl_mmc0_slot0_dat1_3>; + status = "okay"; + slot@0 { + reg = <0>; + bus-width = <4>; + }; + }; + + i2c0: i2c@f8010000 { + status = "okay"; + }; + + i2c1: i2c@f8014000 { + status = "okay"; + }; + + /* TWD2+TCLK2 hidden behind ethernet, so no i2c2 */ + + usart0: serial@f801c000 { + pinctrl-0 = <&pinctrl_usart0 + &pinctrl_usart0_rts + &pinctrl_usart0_cts>; + status = "okay"; + }; + + usart1: serial@f8020000 { + pinctrl-0 = <&pinctrl_usart1 + /* &pinctrl_usart1_rts */ + /* &pinctrl_usart1_cts */ + >; + status = "okay"; + }; + + usart2: serial@f8024000 { + /* cannot activate RTS2+CTS2, clash with + * ethernet on PB0 and PB1 */ + pinctrl-0 = <&pinctrl_usart2>; + status = "okay"; + }; + + usart3: serial@f8028000 { + compatible = "atmel,at91sam9260-usart"; + reg = <0xf8028000 0x200>; + interrupts = <8 4 5>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usart3 + /* &pinctrl_usart3_rts */ + /* &pinctrl_usart3_cts */ + >; + status = "okay"; + }; + + macb0: ethernet@f802c000 { + phy-mode = "rmii"; + /* + * following can be overwritten by bootloader: + * for example u-boot 'ftd set' command + */ + local-mac-address = [00 00 00 00 00 00]; + status = "okay"; + }; + + /* + * UART0/1 pins are marked as GPIO on + * Aria documentation. + * Change to "okay" if you need additional serial ports + */ + uart0: serial@f8040000 { + status = "disabled"; + }; + + uart1: serial@f8044000 { + status = "disabled"; + }; + + adc0: adc@f804c000 { + status = "okay"; + atmel,adc-channels-used = <0xf>; + atmel,adc-num-channels = <4>; + }; + + dbgu: serial@fffff200 { + status = "okay"; + }; + + pinctrl@fffff400 { + w1_0 { + pinctrl_w1_0: w1_0-0 { + atmel,pins = <0 21 0x0 0x1>; /* PA21 PIO, pull-up */ + }; + }; + }; + + rtc@fffffeb0 { + status = "okay"; + }; + }; + + usb0: ohci@00600000 { + status = "okay"; + num-ports = <3>; + }; + + usb1: ehci@00700000 { + status = "okay"; + }; + }; + + leds { + compatible = "gpio-leds"; + + /* little green LED in middle of Aria G25 module */ + aria_led { + label = "aria_led"; + gpios = <&pioB 8 GPIO_ACTIVE_HIGH>; /* PB8 */ + linux,default-trigger = "heartbeat"; + }; + + }; + + onewire@0 { + compatible = "w1-gpio"; + gpios = <&pioA 21 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_w1_0>; + }; +}; Copied: stable/10/sys/contrib/dts/arm/at91-cosino.dtsi (from r262592, head/sys/contrib/dts/arm/at91-cosino.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/contrib/dts/arm/at91-cosino.dtsi Fri May 16 12:43:45 2014 (r266217, copy of r262592, head/sys/contrib/dts/arm/at91-cosino.dtsi) @@ -0,0 +1,122 @@ +/* + * at91-cosino.dtsi - Device Tree file for Cosino core module + * + * Copyright (C) 2013 - Rodolfo Giometti + * HCE Engineering + * + * Derived from at91sam9x5ek.dtsi by: + * Copyright (C) 2012 Atmel, + * 2012 Nicolas Ferre + * + * Licensed under GPLv2 or later. + */ + +#include "at91sam9g35.dtsi" + +/ { + model = "HCE Cosino core module"; + compatible = "hce,cosino", "atmel,at91sam9x5", "atmel,at91sam9"; + + chosen { + bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait"; + }; + + memory { + reg = <0x20000000 0x8000000>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + main_clock: clock@0 { + compatible = "atmel,osc", "fixed-clock"; + clock-frequency = <12000000>; + }; + }; + + ahb { + apb { + mmc0: mmc@f0008000 { + pinctrl-0 = < + &pinctrl_board_mmc0 + &pinctrl_mmc0_slot0_clk_cmd_dat0 + &pinctrl_mmc0_slot0_dat1_3>; + status = "okay"; + slot@0 { + reg = <0>; + bus-width = <4>; + cd-gpios = <&pioD 15 GPIO_ACTIVE_HIGH>; + }; + }; + + dbgu: serial@fffff200 { + status = "okay"; + }; + + usart0: serial@f801c000 { + status = "okay"; + }; + + i2c0: i2c@f8010000 { + status = "okay"; + }; + + adc0: adc@f804c000 { + atmel,adc-clock-rate = <1000000>; + atmel,adc-ts-wires = <4>; + atmel,adc-ts-pressure-threshold = <10000>; + status = "okay"; + }; + + pinctrl@fffff400 { + mmc0 { + pinctrl_board_mmc0: mmc0-board { + atmel,pins = + ; /* PD15 gpio CD pin pull up and deglitch */ + }; + }; + }; + + watchdog@fffffe40 { + status = "okay"; + }; + }; + + nand0: nand@40000000 { + nand-bus-width = <8>; + nand-ecc-mode = "hw"; + atmel,has-pmecc; /* Enable PMECC */ + atmel,pmecc-cap = <4>; + atmel,pmecc-sector-size = <512>; + nand-on-flash-bbt; + status = "okay"; + + at91bootstrap@0 { + label = "at91bootstrap"; + reg = <0x0 0x40000>; + }; + + uboot@40000 { + label = "u-boot"; + reg = <0x40000 0x80000>; + }; + + ubootenv@c0000 { + label = "U-Boot Env"; + reg = <0xc0000 0x140000>; + }; + + kernel@200000 { + label = "kernel"; + reg = <0x200000 0x600000>; + }; + + rootfs@800000 { + label = "rootfs"; + reg = <0x800000 0x0f800000>; + }; + }; + }; +}; Copied: stable/10/sys/contrib/dts/arm/at91-cosino_mega2560.dts (from r262592, head/sys/contrib/dts/arm/at91-cosino_mega2560.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/contrib/dts/arm/at91-cosino_mega2560.dts Fri May 16 12:43:45 2014 (r266217, copy of r262592, head/sys/contrib/dts/arm/at91-cosino_mega2560.dts) @@ -0,0 +1,84 @@ +/* + * at91-cosino_mega2560.dts - Device Tree file for Cosino board with + * Mega 2560 extension + * + * Copyright (C) 2013 - Rodolfo Giometti + * HCE Engineering + * + * Derived from at91sam9g35ek.dts by: + * Copyright (C) 2012 Atmel, + * 2012 Nicolas Ferre + * + * Licensed under GPLv2 or later. + */ + +/dts-v1/; +#include "at91-cosino.dtsi" + +/ { + model = "HCE Cosino Mega 2560"; + compatible = "hce,cosino_mega2560", "atmel,at91sam9x5", "atmel,at91sam9"; + + ahb { + apb { + macb0: ethernet@f802c000 { + phy-mode = "rmii"; + status = "okay"; + }; + + adc0: adc@f804c000 { + atmel,adc-clock-rate = <1000000>; + atmel,adc-ts-wires = <4>; + atmel,adc-ts-pressure-threshold = <10000>; + status = "okay"; + }; + + + tsadcc: tsadcc@f804c000 { + status = "okay"; + }; + + rtc@fffffeb0 { + status = "okay"; + }; + + usart1: serial@f8020000 { + status = "okay"; + }; + + usart2: serial@f8024000 { + status = "okay"; + }; + + usb2: gadget@f803c000 { + atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + + mmc1: mmc@f000c000 { + pinctrl-0 = < + &pinctrl_mmc1_slot0_clk_cmd_dat0 + &pinctrl_mmc1_slot0_dat1_3>; + status = "okay"; + slot@0 { + reg = <0>; + bus-width = <4>; + non-removable; + }; + }; + }; + + usb0: ohci@00600000 { + status = "okay"; + num-ports = <3>; + atmel,vbus-gpio = <0 /* &pioD 18 GPIO_ACTIVE_LOW */ + &pioD 19 GPIO_ACTIVE_LOW + &pioD 20 GPIO_ACTIVE_LOW + >; + }; + + usb1: ehci@00700000 { + status = "okay"; + }; + }; +}; Copied: stable/10/sys/contrib/dts/arm/at91-foxg20.dts (from r262592, head/sys/contrib/dts/arm/at91-foxg20.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/contrib/dts/arm/at91-foxg20.dts Fri May 16 12:43:45 2014 (r266217, copy of r262592, head/sys/contrib/dts/arm/at91-foxg20.dts) @@ -0,0 +1,157 @@ +/* + * at91-foxg20.dts - Device Tree file for Acme Systems FoxG20 board + * + * Based on DT files for at91sam9g20ek evaluation board (AT91SAM9G20 SoC) + * + * Copyright (C) 2013 Douglas Gilbert + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "at91sam9g20.dtsi" + +/ { + model = "Acme Systems FoxG20"; + compatible = "acme,foxg20", "atmel,at91sam9g20", "atmel,at91sam9"; + + chosen { + bootargs = "console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait"; + }; + + memory { + reg = <0x20000000 0x4000000>; + }; + + clocks { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + main_clock: clock@0 { + compatible = "atmel,osc", "fixed-clock"; + clock-frequency = <18432000>; + }; + }; + + ahb { + apb { + usb1: gadget@fffa4000 { + atmel,vbus-gpio = <&pioC 6 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + + mmc0: mmc@fffa8000 { + pinctrl-0 = < + &pinctrl_mmc0_clk + &pinctrl_mmc0_slot1_cmd_dat0 + &pinctrl_mmc0_slot1_dat1_3>; + status = "okay"; + + slot@1 { + reg = <1>; + bus-width = <4>; + }; + }; + + usart0: serial@fffb0000 { + pinctrl-0 = + <&pinctrl_usart0 + &pinctrl_usart0_rts + &pinctrl_usart0_cts + >; + status = "okay"; + }; + + usart1: serial@fffb4000 { + status = "okay"; + }; + + usart2: serial@fffb8000 { + status = "okay"; + }; + + macb0: ethernet@fffc4000 { + phy-mode = "rmii"; + status = "okay"; + }; + + usart3: serial@fffd0000 { + status = "okay"; + }; + + uart0: serial@fffd4000 { + status = "okay"; + }; + + uart1: serial@fffd8000 { + status = "okay"; + }; + + dbgu: serial@fffff200 { + status = "okay"; + }; + + pinctrl@fffff400 { + board { + pinctrl_pck0_as_mck: pck0_as_mck { + atmel,pins = *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***