Commit Graph

17 Commits

Author SHA1 Message Date
Emmanuel Vadot
357145a0ce Remove "all rights reserved" from copyright for the file that Jared McNeill
own. He gave me permission to do this.
2019-12-03 21:05:33 +00:00
Emmanuel Vadot
e53a11bef5 arm: allwinner: Set aw_ccu to BUS_PASS_BUS
In r350842 I've switched the bus pass to resource so it matches the other
clock drivers but this cannot work as this drivers is meant to match
the dts node '/clocks' and if we don't do it at this pass simplebus is
catching this node and we cannot attach.
This solve booting on Allwinner boards that are still using /clocks (A20 SoC)

MFC after:	3 days
2019-08-15 18:57:48 +00:00
Emmanuel Vadot
cfc8861b06 allwinner: Rework the BUS_PASS on drivers
- Put all clock and control unit driver in BUS_PASS_RESOURCE except
  for the DE2 CCU as it needs the main CCU to be available.
- Use BUS_PASS_CPU for a20_cpu_cfg as it makes more sense.
- For aw_syscon use SCHEDULER pass as we need it early for drivers
  that attach in BUS_PASS_SUPPORTDEV
- For the rest we can use BUS_PASS_SUPPORTDEV
2019-08-10 17:58:30 +00:00
Conrad Meyer
e2e050c8ef Extract eventfilter declarations to sys/_eventfilter.h
This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"
in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header
pollution substantially.

EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c
files into appropriate headers (e.g., sys/proc.h, powernv/opal.h).

As a side effect of reduced header pollution, many .c files and headers no
longer contain needed definitions.  The remainder of the patch addresses
adding appropriate includes to fix those files.

LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by
sys/mutex.h since r326106 (but silently protected by header pollution prior
to this change).

No functional change (intended).  Of course, any out of tree modules that
relied on header pollution for sys/eventhandler.h, sys/lock.h, or
sys/mutex.h inclusion need to be fixed.  __FreeBSD_version has been bumped.
2019-05-20 00:38:23 +00:00
Emmanuel Vadot
b800eb9d17 allwinner: clk: Garbage collect old clock implementation
The old clocks are disconneted from the build since r337344.
Remove all those pseudo drivers. The only one remaining is for gmac
(the ethernet controller) so move it to sys/arm/allwinner.
While here remove a83t support from gmacclk as it is unneeded since r326114.

MFC after:	1 month
2019-04-16 19:38:16 +00:00
Emmanuel Vadot
48ee531892 arm64: Add Allwinner H5 SoC
Allwinner H5 is an H3 (arm32) with Cortex A53 cores.
Add support for it and enable it in GENERIC kernel config

Tested on: OrangePi PC2
2017-08-02 20:19:19 +00:00
Emmanuel Vadot
7f61394200 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.
2017-06-24 16:41:26 +00:00
Emmanuel Vadot
cf72965fbf Allwinner: Add A33 support
Add basic support for A33/R16 that is enough to boot a kernel.
This adds the platform code, padconf data and the new clocks strings.

MFC after:	2 weeks
2017-01-04 03:35:39 +00:00
Andrew Turner
df7675353e Stop including fdt_common.h from the arm code when it's unneeded.
Sponsored by:	ABT Systems Ltd
2016-11-14 11:41:22 +00:00
Andrew Turner
87acb7f815 Use the modern spelling of ofw_bus_node_is_compatible in sys/arm.
Sponsored by:	ABT Systems Ltd
2016-11-11 15:13:30 +00:00
Jared McNeill
63f6b1a75a aw_ccu on H3 needs access to PRCM space. The r_pio controller works now. 2016-10-16 12:55:31 +00:00
Jared McNeill
9f2b8101d7 Add support for Allwinner A64.
Reviewed by:	andrew, manu
2016-07-11 20:15:46 +00:00
Emmanuel Vadot
356c50adff Add support for Allwinner A13.
Reviewed by:	jmcneill
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D6809
2016-07-08 23:38:25 +00:00
Jared McNeill
b8f34c287a Fix a crash while iterating compat strings when no match is found.
Spotted by:	ian
2016-05-31 21:58:09 +00:00
Emmanuel Vadot
0aa4b81381 Add support for Allwinner H3 SoC.
For now clocks, GPIO, Pinmux, UART, MMC, EHCI is supported.
Tested on OrangePi-One

Reviewed by:	jmcneill
Approved by:	cognet (mentor)
Differential Revision:	https://reviews.freebsd.org/D6311
2016-05-13 18:20:54 +00:00
Jared McNeill
8a0fd1a7cd Add support for the Allwinner A83T (sun8iw6p1) SoC.
Clocks, GPIO, UART, SD card / eMMC, USB, watchdog, and ethernet are
supported. Note that the A83T contains two clusters of four Cortex-A7
CPUs, and only CPUs in first cluster are started for now.

Tested on a Sinovoip Banana Pi BPI-M3.
2016-05-05 09:41:57 +00:00
Jared McNeill
6a05f063ed Convert Allwinner port to extres clk/hwreset/regulator APIs.
Reviewed by:		andrew, gonzo, Emmanuel Vadot <manu@bidouilliste.com>
Approved by:		gonzo (mentor)
Differential Revision:	https://reviews.freebsd.org/D5752
2016-04-06 23:11:03 +00:00