Author: manu Date: Tue Dec 5 21:21:23 2017 New Revision: 326579 URL: https://svnweb.freebsd.org/changeset/base/326579
Log: Allwinner H5: Enhance support Add proper gpio and clock support Modified: head/sys/arm/allwinner/a10_gpio.c head/sys/arm/allwinner/clkng/ccu_h3.c head/sys/arm/allwinner/clkng/ccu_sun8i_r.c head/sys/arm/allwinner/h3/h3_padconf.c head/sys/arm/allwinner/h3/h3_r_padconf.c head/sys/conf/files.arm64 Modified: head/sys/arm/allwinner/a10_gpio.c ============================================================================== --- head/sys/arm/allwinner/a10_gpio.c Tue Dec 5 21:00:31 2017 (r326578) +++ head/sys/arm/allwinner/a10_gpio.c Tue Dec 5 21:21:23 2017 (r326579) @@ -113,7 +113,7 @@ extern const struct allwinner_padconf a33_padconf; #endif /* Defined in h3_padconf.c */ -#ifdef SOC_ALLWINNER_H3 +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) extern const struct allwinner_padconf h3_padconf; extern const struct allwinner_padconf h3_r_padconf; #endif @@ -156,8 +156,9 @@ static struct ofw_compat_data compat_data[] = { {"allwinner,sun8i-a83t-pinctrl", (uintptr_t)&a83t_padconf}, {"allwinner,sun8i-a83t-r-pinctrl", (uintptr_t)&a83t_r_padconf}, #endif -#ifdef SOC_ALLWINNER_H3 +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) {"allwinner,sun8i-h3-pinctrl", (uintptr_t)&h3_padconf}, + {"allwinner,sun50i-h5-pinctrl", (uintptr_t)&h3_padconf}, {"allwinner,sun8i-h3-r-pinctrl", (uintptr_t)&h3_r_padconf}, #endif #ifdef SOC_ALLWINNER_A64 Modified: head/sys/arm/allwinner/clkng/ccu_h3.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_h3.c Tue Dec 5 21:00:31 2017 (r326578) +++ head/sys/arm/allwinner/clkng/ccu_h3.c Tue Dec 5 21:21:23 2017 (r326579) @@ -37,6 +37,10 @@ __FBSDID("$FreeBSD$"); #include <dev/extres/clk/clk_fixed.h> #include <dev/extres/clk/clk_mux.h> +#if defined(__aarch64__) +#include "opt_soc.h" +#endif + #include <arm/allwinner/clkng/aw_ccung.h> #include <arm/allwinner/clkng/aw_clk.h> #include <arm/allwinner/clkng/aw_clk_nm.h> Modified: head/sys/arm/allwinner/clkng/ccu_sun8i_r.c ============================================================================== --- head/sys/arm/allwinner/clkng/ccu_sun8i_r.c Tue Dec 5 21:00:31 2017 (r326578) +++ head/sys/arm/allwinner/clkng/ccu_sun8i_r.c Tue Dec 5 21:21:23 2017 (r326579) @@ -33,6 +33,10 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/bus.h> +#if defined(__aarch64__) +#include "opt_soc.h" +#endif + #include <dev/extres/clk/clk_div.h> #include <dev/extres/clk/clk_fixed.h> #include <dev/extres/clk/clk_mux.h> Modified: head/sys/arm/allwinner/h3/h3_padconf.c ============================================================================== --- head/sys/arm/allwinner/h3/h3_padconf.c Tue Dec 5 21:00:31 2017 (r326578) +++ head/sys/arm/allwinner/h3/h3_padconf.c Tue Dec 5 21:21:23 2017 (r326579) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Emmanuel Vadot <m...@freebsd.org> + * Copyright (c) 2016-2017 Emmanuel Vadot <m...@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,9 +33,13 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/types.h> +#if defined(__aarch64__) +#include "opt_soc.h" +#endif + #include <arm/allwinner/allwinner_pinctrl.h> -#ifdef SOC_ALLWINNER_H3 +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) const static struct allwinner_pins h3_pins[] = { {"PA0", 0, 0, {"gpio_in", "gpio_out", "uart2", "jtag", NULL, NULL, "pa_eint0", NULL}, 6, 0}, Modified: head/sys/arm/allwinner/h3/h3_r_padconf.c ============================================================================== --- head/sys/arm/allwinner/h3/h3_r_padconf.c Tue Dec 5 21:00:31 2017 (r326578) +++ head/sys/arm/allwinner/h3/h3_r_padconf.c Tue Dec 5 21:21:23 2017 (r326579) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Emmanuel Vadot <m...@freebsd.org> + * Copyright (c) 2016-2017 Emmanuel Vadot <m...@freebsd.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,9 +33,13 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/types.h> +#if defined(__aarch64__) +#include "opt_soc.h" +#endif + #include <arm/allwinner/allwinner_pinctrl.h> -#ifdef SOC_ALLWINNER_H3 +#if defined(SOC_ALLWINNER_H3) || defined(SOC_ALLWINNER_H5) const static struct allwinner_pins h3_r_pins[] = { {"PL0", 0, 0, {"gpio_in", "gpio_out", "s_twi", NULL, NULL, NULL, "pl_eint0", NULL}, 6, 0}, Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Tue Dec 5 21:00:31 2017 (r326578) +++ head/sys/conf/files.arm64 Tue Dec 5 21:21:23 2017 (r326579) @@ -28,6 +28,8 @@ arm/allwinner/a10_gpio.c optional gpio aw_gpio fdt arm/allwinner/a10_mmc.c optional mmc aw_mmc fdt arm/allwinner/a64/a64_padconf.c optional soc_allwinner_a64 fdt arm/allwinner/a64/a64_r_padconf.c optional soc_allwinner_a64 fdt +arm/allwinner/h3/h3_padconf.c optional soc_allwinner_h5 fdt +arm/allwinner/h3/h3_r_padconf.c optional soc_allwinner_h5 fdt arm/allwinner/aw_ccu.c optional aw_ccu fdt arm/allwinner/aw_nmi.c optional aw_nmi fdt \ compile-with "${NORMAL_C} -I$S/gnu/dts/include" _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"