From owner-svn-src-stable-10@FreeBSD.ORG Thu May 15 16:23:26 2014 Return-Path: Delivered-To: svn-src-stable-10@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 23FEB214; Thu, 15 May 2014 16:23:26 +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 04AA328A8; Thu, 15 May 2014 16:23:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4FGNP4Q077512; Thu, 15 May 2014 16:23:25 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4FGNOrt077505; Thu, 15 May 2014 16:23:24 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201405151623.s4FGNOrt077505@svn.freebsd.org> From: Ian Lepore Date: Thu, 15 May 2014 16:23:24 +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: r266155 - in stable/10/sys: arm/conf arm/freescale/vybrid boot/fdt/dts X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 May 2014 16:23:26 -0000 Author: ian Date: Thu May 15 16:23:24 2014 New Revision: 266155 URL: http://svnweb.freebsd.org/changeset/base/266155 Log: MFC r261411, r261413, r261416: Add support for Colibri VF50 Evaluation Board. Add driver for Display Control Unit (DCU4). Add prototype for tcon_bypass() used by dcu4. Add register definition. Added: stable/10/sys/arm/conf/COLIBRI-VF50 - copied unchanged from r261411, head/sys/arm/conf/COLIBRI-VF50 stable/10/sys/arm/freescale/vybrid/vf_dcu4.c - copied unchanged from r261413, head/sys/arm/freescale/vybrid/vf_dcu4.c stable/10/sys/arm/freescale/vybrid/vf_tcon.c - copied, changed from r261413, head/sys/arm/freescale/vybrid/vf_tcon.c stable/10/sys/boot/fdt/dts/vybrid-colibri-vf50.dts - copied unchanged from r261411, head/sys/boot/fdt/dts/vybrid-colibri-vf50.dts Modified: stable/10/sys/arm/conf/VYBRID.common stable/10/sys/arm/freescale/vybrid/files.vybrid stable/10/sys/arm/freescale/vybrid/vf_common.h Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/arm/conf/COLIBRI-VF50 (from r261411, head/sys/arm/conf/COLIBRI-VF50) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/conf/COLIBRI-VF50 Thu May 15 16:23:24 2014 (r266155, copy of r261411, head/sys/arm/conf/COLIBRI-VF50) @@ -0,0 +1,26 @@ +# Kernel configuration for Toradex Colibri VF50 Evaluation Board. +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +include "VYBRID.common" +ident COLIBRI-VF50 + +#FDT +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=vybrid-colibri-vf50.dts Modified: stable/10/sys/arm/conf/VYBRID.common ============================================================================== --- stable/10/sys/arm/conf/VYBRID.common Thu May 15 16:22:09 2014 (r266154) +++ stable/10/sys/arm/conf/VYBRID.common Thu May 15 16:23:24 2014 (r266155) @@ -137,3 +137,10 @@ device axe # ASIX Electronics USB Eth device bpf # Berkeley packet filter device sound + +# Framebuffer +device vt +device kbdmux +options SC_DFLT_FONT # compile font in +makeoptions SC_DFLT_FONT=cp437 +device ukbd Modified: stable/10/sys/arm/freescale/vybrid/files.vybrid ============================================================================== --- stable/10/sys/arm/freescale/vybrid/files.vybrid Thu May 15 16:22:09 2014 (r266154) +++ stable/10/sys/arm/freescale/vybrid/files.vybrid Thu May 15 16:23:24 2014 (r266155) @@ -21,6 +21,8 @@ arm/freescale/vybrid/vf_anadig.c standa arm/freescale/vybrid/vf_iomuxc.c standard arm/freescale/vybrid/vf_mscm.c standard arm/freescale/vybrid/vf_src.c standard +arm/freescale/vybrid/vf_tcon.c optional vt +arm/freescale/vybrid/vf_dcu4.c optional vt arm/freescale/vybrid/vf_nfc.c optional nand arm/freescale/vybrid/vf_ehci.c optional ehci arm/freescale/vybrid/vf_gpio.c optional gpio Modified: stable/10/sys/arm/freescale/vybrid/vf_common.h ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_common.h Thu May 15 16:22:09 2014 (r266154) +++ stable/10/sys/arm/freescale/vybrid/vf_common.h Thu May 15 16:23:24 2014 (r266155) @@ -38,3 +38,5 @@ bus_space_read_1(_sc->bst, _sc->bsh, _reg) #define WRITE1(_sc, _reg, _val) \ bus_space_write_1(_sc->bst, _sc->bsh, _reg, _val) + +uint32_t tcon_bypass(void); Copied: stable/10/sys/arm/freescale/vybrid/vf_dcu4.c (from r261413, head/sys/arm/freescale/vybrid/vf_dcu4.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/freescale/vybrid/vf_dcu4.c Thu May 15 16:23:24 2014 (r266155, copy of r261413, head/sys/arm/freescale/vybrid/vf_dcu4.c) @@ -0,0 +1,359 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * 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. + */ + +/* + * Vybrid Family Display Control Unit (DCU4) + * Chapter 55, Vybrid Reference Manual, Rev. 5, 07/2013 + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include "fb_if.h" + +#include + +#define DCU_CTRLDESCCURSOR1 0x000 /* Control Descriptor Cursor 1 */ +#define DCU_CTRLDESCCURSOR2 0x004 /* Control Descriptor Cursor 2 */ +#define DCU_CTRLDESCCURSOR3 0x008 /* Control Descriptor Cursor 3 */ +#define DCU_CTRLDESCCURSOR4 0x00C /* Control Descriptor Cursor 4 */ +#define DCU_DCU_MODE 0x010 /* DCU4 Mode */ +#define DCU_MODE_M 0x3 +#define DCU_MODE_S 0 +#define DCU_MODE_NORMAL 0x1 +#define DCU_MODE_TEST 0x2 +#define DCU_MODE_COLBAR 0x3 +#define RASTER_EN (1 << 14) /* Raster scan of pixel data */ +#define DCU_BGND 0x014 /* Background */ +#define DCU_DISP_SIZE 0x018 /* Display Size */ +#define DELTA_M 0x7ff +#define DELTA_Y_S 16 +#define DELTA_X_S 0 +#define DCU_HSYN_PARA 0x01C /* Horizontal Sync Parameter */ +#define BP_H_SHIFT 22 +#define PW_H_SHIFT 11 +#define FP_H_SHIFT 0 +#define DCU_VSYN_PARA 0x020 /* Vertical Sync Parameter */ +#define BP_V_SHIFT 22 +#define PW_V_SHIFT 11 +#define FP_V_SHIFT 0 +#define DCU_SYNPOL 0x024 /* Synchronize Polarity */ +#define INV_HS (1 << 0) +#define INV_VS (1 << 1) +#define DCU_THRESHOLD 0x028 /* Threshold */ +#define LS_BF_VS_SHIFT 16 +#define OUT_BUF_HIGH_SHIFT 8 +#define OUT_BUF_LOW_SHIFT 0 +#define DCU_INT_STATUS 0x02C /* Interrupt Status */ +#define DCU_INT_MASK 0x030 /* Interrupt Mask */ +#define DCU_COLBAR_1 0x034 /* COLBAR_1 */ +#define DCU_COLBAR_2 0x038 /* COLBAR_2 */ +#define DCU_COLBAR_3 0x03C /* COLBAR_3 */ +#define DCU_COLBAR_4 0x040 /* COLBAR_4 */ +#define DCU_COLBAR_5 0x044 /* COLBAR_5 */ +#define DCU_COLBAR_6 0x048 /* COLBAR_6 */ +#define DCU_COLBAR_7 0x04C /* COLBAR_7 */ +#define DCU_COLBAR_8 0x050 /* COLBAR_8 */ +#define DCU_DIV_RATIO 0x054 /* Divide Ratio */ +#define DCU_SIGN_CALC_1 0x058 /* Sign Calculation 1 */ +#define DCU_SIGN_CALC_2 0x05C /* Sign Calculation 2 */ +#define DCU_CRC_VAL 0x060 /* CRC Value */ +#define DCU_PDI_STATUS 0x064 /* PDI Status */ +#define DCU_PDI_STA_MSK 0x068 /* PDI Status Mask */ +#define DCU_PARR_ERR_STATUS1 0x06C /* Parameter Error Status 1 */ +#define DCU_PARR_ERR_STATUS2 0x070 /* Parameter Error Status 2 */ +#define DCU_PARR_ERR_STATUS3 0x07C /* Parameter Error Status 3 */ +#define DCU_MASK_PARR_ERR_ST1 0x080 /* Mask Parameter Error Status 1 */ +#define DCU_MASK_PARR_ERR_ST2 0x084 /* Mask Parameter Error Status 2 */ +#define DCU_MASK_PARR_ERR_ST3 0x090 /* Mask Parameter Error Status 3 */ +#define DCU_THRESHOLD_INP_BUF_1 0x094 /* Threshold Input 1 */ +#define DCU_THRESHOLD_INP_BUF_2 0x098 /* Threshold Input 2 */ +#define DCU_THRESHOLD_INP_BUF_3 0x09C /* Threshold Input 3 */ +#define DCU_LUMA_COMP 0x0A0 /* LUMA Component */ +#define DCU_CHROMA_RED 0x0A4 /* Red Chroma Components */ +#define DCU_CHROMA_GREEN 0x0A8 /* Green Chroma Components */ +#define DCU_CHROMA_BLUE 0x0AC /* Blue Chroma Components */ +#define DCU_CRC_POS 0x0B0 /* CRC Position */ +#define DCU_LYR_INTPOL_EN 0x0B4 /* Layer Interpolation Enable */ +#define DCU_LYR_LUMA_COMP 0x0B8 /* Layer Luminance Component */ +#define DCU_LYR_CHRM_RED 0x0BC /* Layer Chroma Red */ +#define DCU_LYR_CHRM_GRN 0x0C0 /* Layer Chroma Green */ +#define DCU_LYR_CHRM_BLUE 0x0C4 /* Layer Chroma Blue */ +#define DCU_COMP_IMSIZE 0x0C8 /* Compression Image Size */ +#define DCU_UPDATE_MODE 0x0CC /* Update Mode */ +#define READREG (1 << 30) +#define MODE (1 << 31) +#define DCU_UNDERRUN 0x0D0 /* Underrun */ +#define DCU_GLBL_PROTECT 0x100 /* Global Protection */ +#define DCU_SFT_LCK_BIT_L0 0x104 /* Soft Lock Bit Layer 0 */ +#define DCU_SFT_LCK_BIT_L1 0x108 /* Soft Lock Bit Layer 1 */ +#define DCU_SFT_LCK_DISP_SIZE 0x10C /* Soft Lock Display Size */ +#define DCU_SFT_LCK_HS_VS_PARA 0x110 /* Soft Lock Hsync/Vsync Parameter */ +#define DCU_SFT_LCK_POL 0x114 /* Soft Lock POL */ +#define DCU_SFT_LCK_L0_TRANSP 0x118 /* Soft Lock L0 Transparency */ +#define DCU_SFT_LCK_L1_TRANSP 0x11C /* Soft Lock L1 Transparency */ + +/* Control Descriptor */ +#define DCU_CTRLDESCL(n, m) 0x200 + (0x40 * n) + 0x4 * (m - 1) +#define DCU_CTRLDESCLn_1(n) DCU_CTRLDESCL(n, 1) +#define DCU_CTRLDESCLn_2(n) DCU_CTRLDESCL(n, 2) +#define DCU_CTRLDESCLn_3(n) DCU_CTRLDESCL(n, 3) +#define TRANS_SHIFT 20 +#define DCU_CTRLDESCLn_4(n) DCU_CTRLDESCL(n, 4) +#define BPP_MASK 0xf /* Bit per pixel Mask */ +#define BPP_SHIFT 16 /* Bit per pixel Shift */ +#define BPP24 0x5 +#define EN_LAYER (1 << 31) /* Enable the layer */ +#define DCU_CTRLDESCLn_5(n) DCU_CTRLDESCL(n, 5) +#define DCU_CTRLDESCLn_6(n) DCU_CTRLDESCL(n, 6) +#define DCU_CTRLDESCLn_7(n) DCU_CTRLDESCL(n, 7) +#define DCU_CTRLDESCLn_8(n) DCU_CTRLDESCL(n, 8) +#define DCU_CTRLDESCLn_9(n) DCU_CTRLDESCL(n, 9) + +#define DISPLAY_WIDTH 480 +#define DISPLAY_HEIGHT 272 + +struct dcu_softc { + struct resource *res[2]; + bus_space_tag_t bst; + bus_space_handle_t bsh; + void *ih; + device_t dev; + device_t sc_fbd; /* fbd child */ + struct fb_info sc_info; +}; + +static struct resource_spec dcu_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static int +dcu_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "fsl,mvf600-dcu4")) + return (ENXIO); + + device_set_desc(dev, "Vybrid Family Display Control Unit (DCU4)"); + return (BUS_PROBE_DEFAULT); +} + +static void +dcu_intr(void *arg) +{ + struct dcu_softc *sc; + int reg; + + sc = arg; + + /* Ack interrupts */ + reg = READ4(sc, DCU_INT_STATUS); + WRITE4(sc, DCU_INT_STATUS, reg); + + /* TODO interrupt handler */ +} + +static int +dcu_init(struct dcu_softc *sc) +{ + int reg; + + /* Configure DCU */ + reg = ((sc->sc_info.fb_height) << DELTA_Y_S); + reg |= (sc->sc_info.fb_width / 16); + WRITE4(sc, DCU_DISP_SIZE, reg); + + /* TODO: export panel info to FDT */ + + reg = (2 << BP_H_SHIFT); + reg |= (41 << PW_H_SHIFT); + reg |= (2 << FP_H_SHIFT); + WRITE4(sc, DCU_HSYN_PARA, reg); + + reg = (2 << BP_V_SHIFT); + reg |= (10 << PW_V_SHIFT); + reg |= (2 << FP_V_SHIFT); + WRITE4(sc, DCU_VSYN_PARA, reg); + + WRITE4(sc, DCU_BGND, 0); + WRITE4(sc, DCU_DIV_RATIO, 30); + + reg = (INV_VS | INV_HS); + WRITE4(sc, DCU_SYNPOL, reg); + + reg = (0x3 << LS_BF_VS_SHIFT); + reg |= (0x78 << OUT_BUF_HIGH_SHIFT); + reg |= (0 << OUT_BUF_LOW_SHIFT); + WRITE4(sc, DCU_THRESHOLD, reg); + + /* Mask all the interrupts */ + WRITE4(sc, DCU_INT_MASK, 0xffffffff); + + /* Setup first layer */ + reg = (sc->sc_info.fb_width | (sc->sc_info.fb_height << 16)); + WRITE4(sc, DCU_CTRLDESCLn_1(0), reg); + WRITE4(sc, DCU_CTRLDESCLn_2(0), 0x0); + WRITE4(sc, DCU_CTRLDESCLn_3(0), sc->sc_info.fb_pbase); + reg = (BPP24 << BPP_SHIFT); + reg |= EN_LAYER; + reg |= (0xFF << TRANS_SHIFT); /* completely opaque */ + WRITE4(sc, DCU_CTRLDESCLn_4(0), reg); + WRITE4(sc, DCU_CTRLDESCLn_5(0), 0xffffff); + WRITE4(sc, DCU_CTRLDESCLn_6(0), 0x0); + WRITE4(sc, DCU_CTRLDESCLn_7(0), 0x0); + WRITE4(sc, DCU_CTRLDESCLn_8(0), 0x0); + WRITE4(sc, DCU_CTRLDESCLn_9(0), 0x0); + + /* Enable DCU in normal mode */ + reg = READ4(sc, DCU_DCU_MODE); + reg &= ~(DCU_MODE_M << DCU_MODE_S); + reg |= (DCU_MODE_NORMAL << DCU_MODE_S); + reg |= (RASTER_EN); + WRITE4(sc, DCU_DCU_MODE, reg); + WRITE4(sc, DCU_UPDATE_MODE, READREG); + + return (0); +} + +static int +dcu_attach(device_t dev) +{ + struct dcu_softc *sc; + int err; + + sc = device_get_softc(dev); + + if (bus_alloc_resources(dev, dcu_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* Memory interface */ + sc->bst = rman_get_bustag(sc->res[0]); + sc->bsh = rman_get_bushandle(sc->res[0]); + + /* Setup interrupt handler */ + err = bus_setup_intr(dev, sc->res[1], INTR_TYPE_BIO | INTR_MPSAFE, + NULL, dcu_intr, sc, &sc->ih); + if (err) { + device_printf(dev, "Unable to alloc interrupt resource.\n"); + return (ENXIO); + } + + /* Bypass timing control (used for raw lcd panels) */ + tcon_bypass(); + + sc->sc_info.fb_width = DISPLAY_WIDTH; + sc->sc_info.fb_height = DISPLAY_HEIGHT; + sc->sc_info.fb_stride = sc->sc_info.fb_width * 3; + sc->sc_info.fb_bpp = sc->sc_info.fb_depth = 24; + sc->sc_info.fb_size = sc->sc_info.fb_height * sc->sc_info.fb_stride; + sc->sc_info.fb_vbase = (intptr_t)contigmalloc(sc->sc_info.fb_size, + M_DEVBUF, M_ZERO, 0, ~0, PAGE_SIZE, 0); + sc->sc_info.fb_pbase = (intptr_t)vtophys(sc->sc_info.fb_vbase); + +#if 0 + printf("%dx%d [%d]\n", sc->sc_info.fb_width, sc->sc_info.fb_height, + sc->sc_info.fb_stride); + printf("pbase == 0x%08x\n", sc->sc_info.fb_pbase); +#endif + + memset((int8_t *)sc->sc_info.fb_vbase, 0x0, sc->sc_info.fb_size); + + dcu_init(sc); + + sc->sc_info.fb_name = device_get_nameunit(dev); + + /* Ask newbus to attach framebuffer device to me. */ + sc->sc_fbd = device_add_child(dev, "fbd", device_get_unit(dev)); + if (sc->sc_fbd == NULL) + device_printf(dev, "Can't attach fbd device\n"); + + if (device_probe_and_attach(sc->sc_fbd) != 0) { + device_printf(sc->dev, "Failed to attach fbd device\n"); + } + + return (0); +} + +static struct fb_info * +dcu4_fb_getinfo(device_t dev) +{ + struct dcu_softc *sc = device_get_softc(dev); + + return (&sc->sc_info); +} + +static device_method_t dcu_methods[] = { + DEVMETHOD(device_probe, dcu_probe), + DEVMETHOD(device_attach, dcu_attach), + + /* Framebuffer service methods */ + DEVMETHOD(fb_getinfo, dcu4_fb_getinfo), + { 0, 0 } +}; + +static driver_t dcu_driver = { + "fb", + dcu_methods, + sizeof(struct dcu_softc), +}; + +static devclass_t dcu_devclass; + +DRIVER_MODULE(fb, simplebus, dcu_driver, dcu_devclass, 0, 0); Copied and modified: stable/10/sys/arm/freescale/vybrid/vf_tcon.c (from r261413, head/sys/arm/freescale/vybrid/vf_tcon.c) ============================================================================== --- head/sys/arm/freescale/vybrid/vf_tcon.c Sun Feb 2 20:25:27 2014 (r261413, copy source) +++ stable/10/sys/arm/freescale/vybrid/vf_tcon.c Thu May 15 16:23:24 2014 (r266155) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #define TCON0_CTRL1 0x00 +#define TCON_BYPASS (1 << 29) struct tcon_softc { struct resource *res[1]; @@ -80,7 +81,7 @@ tcon_bypass(void) sc = tcon_sc; - WRITE4(tcon_sc, TCON0_CTRL1, (1 << 29)); + WRITE4(tcon_sc, TCON0_CTRL1, TCON_BYPASS); return (0); } Copied: stable/10/sys/boot/fdt/dts/vybrid-colibri-vf50.dts (from r261411, head/sys/boot/fdt/dts/vybrid-colibri-vf50.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/vybrid-colibri-vf50.dts Thu May 15 16:23:24 2014 (r266155, copy of r261411, head/sys/boot/fdt/dts/vybrid-colibri-vf50.dts) @@ -0,0 +1,73 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * 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/ "vybrid.dtsi" + +/ { + model = "Toradex Colibri VF50"; + + memory { + device_type = "memory"; + reg = < 0x80000000 0x08000000 >; /* 128MB RAM */ + }; + + SOC: vybrid { + serial0: serial@40027000 { + status = "okay"; + }; + + fec1: ethernet@400D1000 { + status = "okay"; + iomux_config = < 54 0x1 55 0x1 + 56 0x1 57 0x1 + 58 0x1 59 0x1 + 60 0x1 61 0x1 + 62 0x1 0 0x1 >; + }; + + sai3: sai@40032000 { + status = "okay"; + }; + + adc0: adc@4003B000 { + status = "okay"; + }; + + edma1: edma@40098000 { + status = "okay"; + }; + }; + + chosen { + bootargs = "-v"; + stdin = "serial0"; + stdout = "serial0"; + }; +};