Index: head/sys/arm/allwinner/a10_clk.c =================================================================== --- head/sys/arm/allwinner/a10_clk.c +++ head/sys/arm/allwinner/a10_clk.c @@ -109,7 +109,8 @@ static devclass_t a10_ccm_devclass; -DRIVER_MODULE(a10_ccm, simplebus, a10_ccm_driver, a10_ccm_devclass, 0, 0); +EARLY_DRIVER_MODULE(a10_ccm, simplebus, a10_ccm_driver, a10_ccm_devclass, 0, 0, + BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); int a10_clk_usb_activate(void) @@ -200,7 +201,7 @@ /* Set GMAC mode. */ reg_value = CCM_GMAC_CLK_MII; - if (OF_getprop_alloc(node, "phy-type", 1, (void **)&phy_type) > 0) { + if (OF_getprop_alloc(node, "phy-mode", 1, (void **)&phy_type) > 0) { if (strcasecmp(phy_type, "rgmii") == 0) reg_value = CCM_GMAC_CLK_RGMII | CCM_GMAC_MODE_RGMII; else if (strcasecmp(phy_type, "rgmii-bpi") == 0) { Index: head/sys/arm/allwinner/a10_common.c =================================================================== --- head/sys/arm/allwinner/a10_common.c +++ head/sys/arm/allwinner/a10_common.c @@ -50,7 +50,7 @@ { int offset; - if (fdt_is_compatible(node, "allwinner,sun4i-ic")) + if (fdt_is_compatible(node, "allwinner,sun4i-a10-ic")) offset = 0; else if (fdt_is_compatible(node, "arm,gic")) offset = 32; Index: head/sys/arm/allwinner/a10_ehci.c =================================================================== --- head/sys/arm/allwinner/a10_ehci.c +++ head/sys/arm/allwinner/a10_ehci.c @@ -43,10 +43,10 @@ #include #include -#include +#include #include -#include +#include #include #include @@ -90,6 +90,12 @@ bs_r_1_proto(reversed); bs_w_1_proto(reversed); +static struct ofw_compat_data compat_data[] = { + {"allwinner,sun4i-a10-ehci", 1}, + {"allwinner,sun7i-a20-ehci", 1}, + {NULL, 0} +}; + static int a10_ehci_probe(device_t self) { @@ -97,7 +103,7 @@ if (!ofw_bus_status_okay(self)) return (ENXIO); - if (!ofw_bus_is_compatible(self, "allwinner,usb-ehci")) + if (ofw_bus_search_compatible(self, compat_data)->ocd_data == 0) return (ENXIO); device_set_desc(self, EHCI_HC_DEVSTR); Index: head/sys/arm/allwinner/a10_gpio.c =================================================================== --- head/sys/arm/allwinner/a10_gpio.c +++ head/sys/arm/allwinner/a10_gpio.c @@ -73,6 +73,12 @@ #define A10_GPIO_INPUT 0 #define A10_GPIO_OUTPUT 1 +static struct ofw_compat_data compat_data[] = { + {"allwinner,sun4i-a10-pinctrl", 1}, + {"allwinner,sun7i-a20-pinctrl", 1}, + {NULL, 0} +}; + struct a10_gpio_softc { device_t sc_dev; device_t sc_busdev; @@ -373,7 +379,7 @@ if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-gpio")) + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); device_set_desc(dev, "Allwinner GPIO controller"); @@ -493,7 +499,9 @@ sizeof(struct a10_gpio_softc), }; -DRIVER_MODULE(a10_gpio, simplebus, a10_gpio_driver, a10_gpio_devclass, 0, 0); +EARLY_DRIVER_MODULE(a10_gpio, simplebus, a10_gpio_driver, a10_gpio_devclass, 0, 0, + BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); + int a10_gpio_ethernet_activate(uint32_t func) Index: head/sys/arm/allwinner/a10_mmc.c =================================================================== --- head/sys/arm/allwinner/a10_mmc.c +++ head/sys/arm/allwinner/a10_mmc.c @@ -62,6 +62,12 @@ TUNABLE_INT("hw.a10.mmc.pio_mode", &a10_mmc_pio_mode); +static struct ofw_compat_data compat_data[] = { + {"allwinner,sun4i-a10-mmc", 1}, + {"allwinner,sun5i-a13-mmc", 1}, + {NULL, 0} +}; + struct a10_mmc_softc { bus_space_handle_t a10_bsh; bus_space_tag_t a10_bst; @@ -123,8 +129,9 @@ if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-a10-mmc")) + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); + device_set_desc(dev, "Allwinner Integrated MMC/SD controller"); return (BUS_PROBE_DEFAULT); Index: head/sys/arm/allwinner/a10_wdog.c =================================================================== --- head/sys/arm/allwinner/a10_wdog.c +++ head/sys/arm/allwinner/a10_wdog.c @@ -95,7 +95,7 @@ if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_is_compatible(dev, "allwinner,sun4i-wdt")) { + if (ofw_bus_is_compatible(dev, "allwinner,sun4i-a10-wdt")) { device_set_desc(dev, "Allwinner A10 Watchdog"); return (BUS_PROBE_DEFAULT); } Index: head/sys/arm/allwinner/a20/a20_cpu_cfg.c =================================================================== --- head/sys/arm/allwinner/a20/a20_cpu_cfg.c +++ head/sys/arm/allwinner/a20/a20_cpu_cfg.c @@ -117,7 +117,8 @@ static devclass_t a20_cpu_cfg_devclass; -DRIVER_MODULE(a20_cpu_cfg, simplebus, a20_cpu_cfg_driver, a20_cpu_cfg_devclass, 0, 0); +EARLY_DRIVER_MODULE(a20_cpu_cfg, simplebus, a20_cpu_cfg_driver, a20_cpu_cfg_devclass, 0, 0, + BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE); uint64_t a20_read_counter64(void) Index: head/sys/arm/allwinner/aintc.c =================================================================== --- head/sys/arm/allwinner/aintc.c +++ head/sys/arm/allwinner/aintc.c @@ -79,6 +79,12 @@ #define SW_INT_ENABLE_REG(_b) (0x40 + ((_b) * 4)) #define SW_INT_MASK_REG(_b) (0x50 + ((_b) * 4)) +static struct ofw_compat_data compat_data[] = { + {"allwinner,sun4i-a10-ic", 1}, + {"allwinner,sun7i-a20-sc-nmi", 1}, + {NULL, 0} +}; + struct a10_aintc_softc { device_t sc_dev; struct resource * aintc_res; @@ -101,7 +107,7 @@ if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-ic")) + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); device_set_desc(dev, "A10 AINTC Interrupt Controller"); return (BUS_PROBE_DEFAULT); @@ -158,7 +164,8 @@ static devclass_t a10_aintc_devclass; -DRIVER_MODULE(aintc, simplebus, a10_aintc_driver, a10_aintc_devclass, 0, 0); +EARLY_DRIVER_MODULE(aintc, simplebus, a10_aintc_driver, a10_aintc_devclass, 0, 0, + BUS_PASS_INTERRUPT + BUS_PASS_ORDER_FIRST); int arm_get_next_irq(int last_irq) Index: head/sys/arm/allwinner/files.a10 =================================================================== --- head/sys/arm/allwinner/files.a10 +++ head/sys/arm/allwinner/files.a10 @@ -1,3 +1,4 @@ # $FreeBSD$ arm/allwinner/aintc.c standard +arm/allwinner/timer.c standard Index: head/sys/arm/allwinner/files.allwinner =================================================================== --- head/sys/arm/allwinner/files.allwinner +++ head/sys/arm/allwinner/files.allwinner @@ -12,5 +12,4 @@ arm/allwinner/a20/a20_cpu_cfg.c standard arm/allwinner/allwinner_machdep.c standard arm/allwinner/if_emac.c optional emac -arm/allwinner/timer.c standard #arm/allwinner/console.c standard Index: head/sys/arm/allwinner/if_emac.c =================================================================== --- head/sys/arm/allwinner/if_emac.c +++ head/sys/arm/allwinner/if_emac.c @@ -756,7 +756,7 @@ emac_probe(device_t dev) { - if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-emac")) + if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-a10-emac")) return (ENXIO); device_set_desc(dev, "A10/A20 EMAC ethernet controller"); Index: head/sys/arm/allwinner/timer.c =================================================================== --- head/sys/arm/allwinner/timer.c +++ head/sys/arm/allwinner/timer.c @@ -50,7 +50,7 @@ #include -#include "a20/a20_cpu_cfg.h" +#include /** * Timer registers addr @@ -84,7 +84,6 @@ uint32_t sc_period; uint32_t timer0_freq; struct eventtimer et; - uint8_t sc_timer_type; /* 0 for A10, 1 for A20 */ }; int a10_timer_get_timerfreq(struct a10_timer_softc *); @@ -127,10 +126,6 @@ { uint32_t lo, hi; - /* In case of A20 get appropriate counter info */ - if (a10_timer_sc->sc_timer_type) - return (a20_read_counter64()); - /* Latch counter, wait for it to be ready to read. */ timer_write_4(a10_timer_sc, CNT64_CTRL_REG, CNT64_RL_EN); while (timer_read_4(a10_timer_sc, CNT64_CTRL_REG) & CNT64_RL_EN) @@ -146,14 +141,16 @@ a10_timer_probe(device_t dev) { struct a10_timer_softc *sc; + u_int soc_family; sc = device_get_softc(dev); - if (ofw_bus_is_compatible(dev, "allwinner,sun4i-timer")) - sc->sc_timer_type = 0; - else if (ofw_bus_is_compatible(dev, "allwinner,sun7i-timer")) - sc->sc_timer_type = 1; - else + if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-a10-timer")) + return (ENXIO); + + soc_family = allwinner_soc_family(); + if (soc_family != ALLWINNERSOC_SUN4I && + soc_family != ALLWINNERSOC_SUN5I) return (ENXIO); device_set_desc(dev, "Allwinner A10/A20 timer"); @@ -352,7 +349,8 @@ static devclass_t a10_timer_devclass; -DRIVER_MODULE(a10_timer, simplebus, a10_timer_driver, a10_timer_devclass, 0, 0); +EARLY_DRIVER_MODULE(a10_timer, simplebus, a10_timer_driver, a10_timer_devclass, 0, 0, + BUS_PASS_TIMER + BUS_PASS_ORDER_MIDDLE); void DELAY(int usec) Index: head/sys/arm/conf/A10 =================================================================== --- head/sys/arm/conf/A10 +++ head/sys/arm/conf/A10 @@ -0,0 +1,105 @@ +# +# A10 -- Custom configuration for the AllWinner A10 SoC +# +# 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$ + +ident A10 + +include "std.armv6" +include "../allwinner/std.a10" + +options HZ=100 +options SCHED_4BSD # 4BSD scheduler +options PLATFORM + +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options ALT_BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +# NFS root from boopt/dhcp +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=emac0 + +# MMC/SD/SDIO Card slot support +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards + +# ATA controllers +device ahci # AHCI-compatible SATA controllers +#device ata # Legacy ATA/SATA controllers + +# Console and misc +device uart +device uart_ns8250 +device pty +device snp +device md +device random # Entropy device + +# I2C support +#device iicbus +#device iic + +# GPIO +device gpio +device gpioled + +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device pass # Passthrough device (direct ATA/SCSI access) + +# USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +device usb +options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE +#device uhci +#device ohci +device ehci + +device umass + +# Ethernet +device loop +device ether +device mii +device bpf + +device emac + +# USB ethernet support, requires miibus +device miibus + +# Flattened Device Tree +options FDT # Configure using FDT/DTB data +makeoptions MODULES_EXTRA=dtb/allwinner Index: head/sys/arm/conf/A20 =================================================================== --- head/sys/arm/conf/A20 +++ head/sys/arm/conf/A20 @@ -52,12 +52,12 @@ #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=dwc0 -# Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:/dev/da0s2\" - # Interrupt controller device gic +# ARM Generic Timer +device generic_timer + # MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards Index: head/sys/arm64/arm64/swtch.S =================================================================== --- head/sys/arm64/arm64/swtch.S +++ head/sys/arm64/arm64/swtch.S @@ -129,12 +129,6 @@ * x3 to x7, x16 and x17 are caller saved */ ENTRY(cpu_switch) - /* Store the new curthread */ - str x1, [x18, #PC_CURTHREAD] - /* And the new pcb */ - ldr x4, [x1, #TD_PCB] - str x4, [x18, #PC_CURPCB] - /* * Save the old context. */ @@ -174,10 +168,15 @@ mov x0, x19 #endif + /* Store the new curthread */ + str x1, [x18, #PC_CURTHREAD] + /* - * Restore the saved context. + * Restore the saved context and save it as the curpcb. */ ldr x4, [x1, #TD_PCB] + str x4, [x18, #PC_CURPCB] + /* * TODO: We may need to flush the cache here if switching Index: head/sys/boot/fdt/dts/arm/bananapi.dts =================================================================== --- head/sys/boot/fdt/dts/arm/bananapi.dts +++ head/sys/boot/fdt/dts/arm/bananapi.dts @@ -28,7 +28,8 @@ /dts-v1/; -/include/ "sun7i-a20.dtsi" +#include "sun7i-a20.dtsi" + #include @@ -65,7 +66,7 @@ }; gmac@01c50000 { - phy-type = "rgmii-bpi"; + phy-mode = "rgmii-bpi"; status = "okay"; }; Index: head/sys/boot/fdt/dts/arm/cubieboard2.dts =================================================================== --- head/sys/boot/fdt/dts/arm/cubieboard2.dts +++ head/sys/boot/fdt/dts/arm/cubieboard2.dts @@ -1,5 +1,6 @@ /*- * Copyright (c) 2013 Ganbold Tsagaankhuu + * Copyright (c) 2016 Emmanuel Vadot * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -22,78 +23,19 @@ * 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/ "sun7i-a20.dtsi" - -#include +#include "sun7i-a20-cubieboard2.dts" / { - model = "Cubietech Cubieboard2"; - - memory { - device_type = "memory"; - reg = < 0x40000000 0x40000000 >; /* 1GB RAM */ - }; - - aliases { - soc = &SOC; - UART0 = &UART0; - }; - - SOC: a20 { - - usb1: usb@01c14000 { - status = "okay"; - }; - - usb2: usb@01c1c000 { - status = "okay"; - }; - - UART0: serial@01c28000 { - status = "okay"; - }; - - mmc0: mmc@01c0f000 { - status = "okay"; - }; - - emac@01c0b000 { - status = "okay"; - }; - - gmac@01c50000 { - status = "okay"; - }; - - ahci: sata@01c18000 { - status = "okay"; + soc@01c00000 { + ccm@01c20000 { + compatible = "allwinner,sun4i-ccm"; + #address-cells = <1>; + #size-cells = <1>; + reg = < 0x01c20000 0x400 >; }; }; - - leds { - compatible = "gpio-leds"; - - blue { - label = "cubieboard2:blue:usr"; - gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; - }; - - green { - label = "cubieboard2:green:usr"; - gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>; - }; - }; - - chosen { - bootargs = "-v"; - stdin = "UART0"; - stdout = "UART0"; - }; }; - Index: head/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts =================================================================== --- head/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts +++ head/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2015 Emmanuel Vadot + * 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$ + */ + +#include "sun7i-a20-olimex-som-evb.dts" + +/ { + soc@01c00000 { + ccm@01c20000 { + compatible = "allwinner,sun4i-ccm"; + #address-cells = <1>; + #size-cells = <1>; + reg = < 0x01c20000 0x400 >; + }; + }; +}; Index: head/sys/boot/fdt/dts/arm/olinuxino-lime.dts =================================================================== --- head/sys/boot/fdt/dts/arm/olinuxino-lime.dts +++ head/sys/boot/fdt/dts/arm/olinuxino-lime.dts @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2015 Emmanuel Vadot + * 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$ + */ + +#include "sun4i-a10-olinuxino-lime.dts" + +/ { + soc@01c00000 { + ccm@01c20000 { + compatible = "allwinner,sun4i-ccm"; + #address-cells = <1>; + #size-cells = <1>; + reg = < 0x01c20000 0x400 >; + }; + }; +}; Index: head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi =================================================================== --- head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi +++ head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi @@ -45,7 +45,7 @@ bus-frequency = <0>; AINTC: interrupt-controller@01c20400 { - compatible = "allwinner,sun4i-ic"; + compatible = "allwinner,sun4i-a10-ic"; interrupt-controller; #address-cells = <0>; #interrupt-cells = <1>; @@ -67,7 +67,7 @@ }; timer@01c20c00 { - compatible = "allwinner,sun4i-timer"; + compatible = "allwinner,sun4i-a10-timer"; reg = <0x01c20c00 0x90>; interrupts = < 22 >; interrupt-parent = <&AINTC>; @@ -82,7 +82,7 @@ GPIO: gpio@01c20800 { #gpio-cells = <3>; - compatible = "allwinner,sun4i-gpio"; + compatible = "allwinner,sun4i-a10-pinctrl"; gpio-controller; reg =< 0x01c20800 0x400 >; interrupts = < 28 >; @@ -90,14 +90,14 @@ }; usb1: usb@01c14000 { - compatible = "allwinner,usb-ehci", "usb-ehci"; + compatible = "allwinner,sun4i-a10-ehci", "generic-ehci"; reg = <0x01c14000 0x1000>; interrupts = < 39 >; interrupt-parent = <&AINTC>; }; usb2: usb@01c1c000 { - compatible = "allwinner,usb-ehci", "usb-ehci"; + compatible = "allwinner,sun4i-a10-ehci", "generic-ehci"; reg = <0x01c1c000 0x1000>; interrupts = < 40 >; interrupt-parent = <&AINTC>; @@ -130,7 +130,7 @@ }; emac@01c0b000 { - compatible = "allwinner,sun4i-emac"; + compatible = "allwinner,sun4i-a10-emac"; reg = <0x01c0b000 0x1000>; interrupts = <55>; interrupt-parent = <&AINTC>; Index: head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi =================================================================== --- head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi +++ head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi @@ -26,6 +26,8 @@ * $FreeBSD$ */ +#include + / { compatible = "allwinner,sun7i-a20"; #address-cells = <1>; @@ -37,6 +39,14 @@ soc = &SOC; }; + timer { + compatible = "arm,armv7-timer"; + interrupts = , + , + , + ; + }; + SOC: a20 { #address-cells = <1>; #size-cells = <1>; @@ -47,9 +57,12 @@ GIC: interrupt-controller@01c81000 { compatible = "arm,gic"; reg = <0x01c81000 0x1000>, /* Distributor Registers */ - <0x01c82000 0x0100>; /* CPU Interface Registers */ + <0x01c82000 0x0100>, /* CPU Interface Registers */ + <0x01c84000 0x2000>, + <0x01c86000 0x2000>; interrupt-controller; - #interrupt-cells = <1>; + #interrupt-cells = <3>; + interrupts = ; }; sramc@01c00000 { @@ -74,53 +87,59 @@ }; timer@01c20c00 { - compatible = "allwinner,sun7i-timer"; + compatible = "allwinner,sun4i-a10-timer"; reg = <0x01c20c00 0x90>; - interrupts = < 22 >; + interrupts = , + , + , + , + , + ; interrupt-parent = <&GIC>; clock-frequency = < 24000000 >; }; watchdog@01c20c90 { - compatible = "allwinner,sun4i-wdt"; + compatible = "allwinner,sun4i-a10-wdt"; reg = <0x01c20c90 0x10>; }; pio: gpio@01c20800 { #gpio-cells = <3>; - compatible = "allwinner,sun4i-gpio"; + compatible = "allwinner,sun7i-a20-pinctrl"; gpio-controller; reg =< 0x01c20800 0x400 >; - interrupts = < 28 >; + interrupts = ; + interrupt-controller; + #interrupt-cells = <2>; interrupt-parent = <&GIC>; }; usb1: usb@01c14000 { - compatible = "allwinner,usb-ehci", "usb-ehci"; + compatible = "allwinner,sun7i-a20-ehci", "generic-ehci"; reg = <0x01c14000 0x1000>; - interrupts = < 39 >; + interrupts = ; interrupt-parent = <&GIC>; }; usb2: usb@01c1c000 { - compatible = "allwinner,usb-ehci", "usb-ehci"; + compatible = "allwinner,sun7i-a20-ehci", "generic-ehci"; reg = <0x01c1c000 0x1000>; - interrupts = < 40 >; + interrupts = ; interrupt-parent = <&GIC>; }; mmc0: mmc@01c0f000 { - compatible = "allwinner,sun4i-a10-mmc"; + compatible = "allwinner,sun5i-a13-mmc"; reg = <0x01c0f000 0x1000>; - interrupts = <32>; - interrupt-parent = <&GIC>; + interrupts = ; status = "disabled"; }; sata@01c18000 { compatible = "allwinner,sun4i-a10-ahci"; reg = <0x01c18000 0x1000>; - interrupts = <56>; + interrupts = ; interrupt-parent = <&GIC>; status = "disabled"; }; @@ -129,16 +148,15 @@ compatible = "snps,dw-apb-uart"; reg = <0x01c28000 0x400>; reg-shift = <2>; - interrupts = <1>; - interrupt-parent = <&GIC>; + interrupts = ; current-speed = <115200>; clock-frequency = < 24000000 >; }; emac@01c0b000 { - compatible = "allwinner,sun4i-emac"; + compatible = "allwinner,sun4i-a10-emac"; reg = <0x01c0b000 0x1000>; - interrupts = <55>; + interrupts = ; interrupt-parent = <&GIC>; status = "disabled"; }; @@ -146,7 +164,7 @@ gmac@01c50000 { compatible = "allwinner,sun7i-a20-gmac"; reg = <0x01c50000 0x10000>; - interrupts = <85>; + interrupts = ; interrupt-parent = <&GIC>; snps,pbl = <2>; snps,fixed-burst; Index: head/sys/modules/dtb/allwinner/Makefile =================================================================== --- head/sys/modules/dtb/allwinner/Makefile +++ head/sys/modules/dtb/allwinner/Makefile @@ -3,6 +3,8 @@ DTS= \ bananapi.dts \ cubieboard.dts \ - cubieboard2.dts + cubieboard2.dts \ + olimex-a20-som-evb.dts \ + olinuxino-lime.dts .include