Allwinner H5: Enhance support

Add proper gpio and clock support
This commit is contained in:
manu 2017-12-05 21:21:23 +00:00
parent 923e962b98
commit ac75444f39
6 changed files with 25 additions and 6 deletions

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2016 Emmanuel Vadot <manu@freebsd.org>
* Copyright (c) 2016-2017 Emmanuel Vadot <manu@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},

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2016 Emmanuel Vadot <manu@freebsd.org>
* Copyright (c) 2016-2017 Emmanuel Vadot <manu@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},

View File

@ -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"