forked from FreeBSD/src
1
0
Fork 0

Allwinner H5: Enhance support

Add proper gpio and clock support
releng/12.0
Emmanuel Vadot 5 years ago
parent d14c853ba3
commit 34b8ef3d77
  1. 5
      sys/arm/allwinner/a10_gpio.c
  2. 4
      sys/arm/allwinner/clkng/ccu_h3.c
  3. 4
      sys/arm/allwinner/clkng/ccu_sun8i_r.c
  4. 8
      sys/arm/allwinner/h3/h3_padconf.c
  5. 8
      sys/arm/allwinner/h3/h3_r_padconf.c
  6. 2
      sys/conf/files.arm64

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

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

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

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

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

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

Loading…
Cancel
Save