Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jun 2017 16:41:26 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320315 - in head/sys: arm/allwinner arm/conf conf modules/dtb/allwinner
Message-ID:  <201706241641.v5OGfQoM008230@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Sat Jun 24 16:41:26 2017
New Revision: 320315
URL: https://svnweb.freebsd.org/changeset/base/320315

Log:
  Allwinner: Add support for H2 Plus SoC
  
  H2+ SoC is a stripped down version of H3 without gigabit ethernet and 4K HDMI.
  Also add sun8i-h2-plus-orangepi-zero.dts to the build as we run on this board.

Modified:
  head/sys/arm/allwinner/aw_ccu.c
  head/sys/arm/allwinner/aw_machdep.c
  head/sys/arm/conf/GENERIC
  head/sys/conf/options.arm
  head/sys/modules/dtb/allwinner/Makefile

Modified: head/sys/arm/allwinner/aw_ccu.c
==============================================================================
--- head/sys/arm/allwinner/aw_ccu.c	Sat Jun 24 16:36:30 2017	(r320314)
+++ head/sys/arm/allwinner/aw_ccu.c	Sat Jun 24 16:41:26 2017	(r320315)
@@ -82,6 +82,7 @@ static struct ofw_compat_data compat_data[] = {
 	{ "allwinner,sun50i-a64",	CLOCK_CCU },
 	{ "allwinner,sun8i-a33",	CLOCK_CCU },
 	{ "allwinner,sun8i-a83t",	CLOCK_CCU|CLOCK_PRCM|CLOCK_SYSCTRL },
+	{ "allwinner,sun8i-h2-plus",	CLOCK_CCU|CLOCK_PRCM },
 	{ "allwinner,sun8i-h3",		CLOCK_CCU|CLOCK_PRCM },
 	{ NULL, 0 }
 };

Modified: head/sys/arm/allwinner/aw_machdep.c
==============================================================================
--- head/sys/arm/allwinner/aw_machdep.c	Sat Jun 24 16:36:30 2017	(r320314)
+++ head/sys/arm/allwinner/aw_machdep.c	Sat Jun 24 16:41:26 2017	(r320315)
@@ -261,6 +261,21 @@ static platform_method_t a83t_methods[] = {
 FDT_PLATFORM_DEF(a83t, "a83t", 0, "allwinner,sun8i-a83t", 200);
 #endif
 
+#if defined(SOC_ALLWINNER_H2PLUS)
+static platform_method_t h2_plus_methods[] = {
+	PLATFORMMETHOD(platform_attach,         h3_attach),
+	PLATFORMMETHOD(platform_devmap_init,    allwinner_devmap_init),
+	PLATFORMMETHOD(platform_cpu_reset,	allwinner_cpu_reset),
+
+#ifdef SMP
+	PLATFORMMETHOD(platform_mp_start_ap,	aw_mp_start_ap),
+	PLATFORMMETHOD(platform_mp_setmaxid,	aw_mp_setmaxid),
+#endif
+	PLATFORMMETHOD_END,
+};
+FDT_PLATFORM_DEF(h2_plus, "h2_plus", 0, "allwinner,sun8i-h2-plus", 200);
+#endif
+
 #if defined(SOC_ALLWINNER_H3)
 static platform_method_t h3_methods[] = {
 	PLATFORMMETHOD(platform_attach,         h3_attach),
@@ -275,6 +290,8 @@ static platform_method_t h3_methods[] = {
 };
 FDT_PLATFORM_DEF(h3, "h3", 0, "allwinner,sun8i-h3", 200);
 #endif
+
+
 
 u_int
 allwinner_soc_type(void)

Modified: head/sys/arm/conf/GENERIC
==============================================================================
--- head/sys/arm/conf/GENERIC	Sat Jun 24 16:36:30 2017	(r320314)
+++ head/sys/arm/conf/GENERIC	Sat Jun 24 16:41:26 2017	(r320315)
@@ -53,6 +53,7 @@ options 	SOC_ALLWINNER_A31
 options 	SOC_ALLWINNER_A31S
 options 	SOC_ALLWINNER_A33
 options 	SOC_ALLWINNER_A83T
+options 	SOC_ALLWINNER_H2PLUS
 options 	SOC_ALLWINNER_H3
 options 	SOC_BCM2836
 options		SOC_TI_AM335X

Modified: head/sys/conf/options.arm
==============================================================================
--- head/sys/conf/options.arm	Sat Jun 24 16:36:30 2017	(r320314)
+++ head/sys/conf/options.arm	Sat Jun 24 16:41:26 2017	(r320315)
@@ -50,6 +50,7 @@ SOC_ALLWINNER_A31	opt_global.h
 SOC_ALLWINNER_A31S	opt_global.h
 SOC_ALLWINNER_A33	opt_global.h
 SOC_ALLWINNER_A83T	opt_global.h
+SOC_ALLWINNER_H2PLUS	opt_global.h
 SOC_ALLWINNER_H3	opt_global.h
 SOC_ALTERA_ARRIA10	opt_global.h
 SOC_ALTERA_CYCLONE5	opt_global.h

Modified: head/sys/modules/dtb/allwinner/Makefile
==============================================================================
--- head/sys/modules/dtb/allwinner/Makefile	Sat Jun 24 16:36:30 2017	(r320314)
+++ head/sys/modules/dtb/allwinner/Makefile	Sat Jun 24 16:41:26 2017	(r320315)
@@ -13,6 +13,7 @@ DTS=	\
 	sun7i-a20-cubieboard2.dts \
 	sun7i-a20-olimex-som-evb.dts \
 	sun7i-a20-pcduino3.dts \
+	sun8i-h2-plus-orangepi-zero.dts \
 	sun8i-h3-orangepi-one.dts
 
 LINKS= \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706241641.v5OGfQoM008230>