Commit Graph

360 Commits

Author SHA1 Message Date
Oleksandr Tymoshenko
00120249a7 Add "xlnx,zynq-7000" to zedboard and zybo compatible property
This property is required to boot CURRENT on zedboard and zybo

PR:		221208
Submitted by:	Thomas Skibo <thoma555-bsd@yahoo.com>
2017-08-24 02:08:52 +00:00
Emmanuel Vadot
d5d62a7a89 RPI DTS: Add value previously set by VideoCore and DTB links
Using latest U-Boot for RPI 1 or 2 the DTB loaded by the firmware is discarded.
The DTB was previously patched by the firmware to contain the DMA channel mask.
DTB provided by the rpi firmware or DTS in the Linux tree contain the raw value
directly. Do the same for our DTS as we cannot switch to the upstream ones yet.
Not having the DMA channel mask setup properly cause mmc not to be detected
(and probably other problems on driver using DMA).

Also, add links for rpi dtb to the name used by u-boot. This way the dtb can be
loaded by ubldr using the U-Boot env variable fdtfile.

Tested On: RPI B Rev2, RPI Zero, RPI 2 v1.1 RPI 2 v1.2

Thanks to Sylvain Garrigues <sylvain@sylvaingarrigues.com> for the help.

PR:		218344
2017-08-19 14:27:11 +00:00
Ruslan Bukin
af19cc59ca Support for v1.10 (latest) of RISC-V privilege specification.
New version is not compatible on supervisor mode with v1.9.1
(previous version).

Highlights:
    o BBL (Berkeley Boot Loader) provides no initial page tables
      anymore allowing us to choose VM, to build page tables manually
      and enable MMU in S-mode.
    o SBI interface changed.
    o GENERIC kernel.
      FDT is now chosen standard for RISC-V hardware description.
      DTB is now provided by Spike (golden model simulator). This
      allows us to introduce GENERIC kernel. However, description
      for console and timer devices is not provided in DTB, so move
      these devices temporary to nexus bus.
    o Supervisor can't access userspace by default. Solution is to
      set SUM (permit Supervisor User Memory access) bit in sstatus
      register.
    o Compressed extension is now turned on by default.
    o External GCC 7.1 compiler used.
    o _gp renamed to __global_pointer$
    o Compiler -march= string is now in use allowing us to choose
      required extensions (compressed, FPU, atomic, etc).

Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D11800
2017-08-10 14:18:09 +00:00
Marcin Wojtas
29a263df94 Update pl310 node in Armada 38x DTS to match the one used in Linux
Since the cache controller nodes fixup is added to the platform code,
this patch aligns it to the Linux device tree representation.

Submitted by: Patryk Duda <pdk@semihalf.com>
Reviewed by: cognet (mentor)
Approved by: cognet (mentor)
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D11884
2017-08-09 01:31:05 +00:00
Marcin Wojtas
30608f6dd6 Remove clock-frequency properties from Armada 38x timer nodes
Since the timers' base frequency setting is added to the platform code,
this patch removes clock-frequency properties from global
and twd timers, aligning both to the Linux device tree.

Submitted by: Patryk Duda <pdk@semihalf.com>
Reviewed by: cognet (mentor)
Approved by: cognet (mentor)
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D11882
2017-08-09 01:20:53 +00:00
Marcin Wojtas
f2d9a004fb Restore original /soc ranges on Marvell Armada 38x boards
Because fdt_get_ranges can process now multiple 'ranges' entries,
restoring the ranges from original Linux device trees is possible.

Submitted by: Patryk Duda <pdk@semihalf.com>
Reviewed by: cognet (mentor)
Approved by: cognet (mentor)
Obtained from: Semihalf
Differential Revision: https://reviews.freebsd.org/D11877
2017-08-09 00:51:45 +00:00
Emmanuel Vadot
5393952249 Alwinner: nanopi-neo: Remove r_i2c node from DTS as it isn't used on the board 2017-08-01 19:22:00 +00:00
Emmanuel Vadot
2353f805ff dts: arm: Fix our local patches for H3
sun4i-a10.h is not included anymore, define directly the drive strengh
of the pins.
2017-07-09 13:56:34 +00:00
Zbigniew Bodek
3706b98788 Enable arm,io-coherent property of PL310 L2 cache on Armada 38x platforms
This patch disables outer cache sync in PL310 driver
by adding "arm,io-coherent" property. In addition to
the previous patches it was the last bit needed
for enabling proper operation of Armada 38x SoCs
with the IO cache coherency.

Submitted by: Michal Mazur <mkm@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Reviewed by: mmel
Differential revision: https://reviews.freebsd.org/D11204
2017-06-21 18:28:37 +00:00
Emmanuel Vadot
ef7b0c3b49 Remove some custom DTS files as we are using upstream ones. 2017-06-20 03:41:06 +00:00
Zbigniew Bodek
08d94c6eab Enable HWPMC overflow IRQ on both CPUs in MPIC
This commit enables usage of HWPMC interrupts for the
Marvell SoCs, which use MPIC (Armada38x and ArmadaXP).
Those interrupts require extra unmasking, comparing to
others. Also, in order to process counters per-CPU,
they are masked/unmasked using separate registers' sets
for each core.

Submitted by: Michal Mazur <mkm@semihalf.com>
    	      Marcin Wojtas <mw@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield, Netgate
Differential revision: https://reviews.freebsd.org/D10913
2017-06-13 18:55:21 +00:00
Zbigniew Bodek
0f7028d7f8 Enable in-band link management on A388-Clearfog board
This patch adds in-band link management over SGMII of the
SFP transceiver on Armada-388-Clearfog board.

Submitted by: Marcin Wojtas <mw@semihalf.com>
Obtained from: Semihalf
Sponsored by: Netgate
Reviewed by: loos
Differential revision: https://reviews.freebsd.org/D10708
2017-06-13 18:48:51 +00:00
Zbigniew Bodek
1717c1f1a3 Restore DTS node of PCIe controller for A38X boards
Add pcie-controller node as a bus-parent of pcie nodes for Armada38x
boards. This reduces diff between Linux and FreeBSD PCIe device tree
representation to the minimum. This commit also allows for using multiple
PCIe ports, thanks to the recent driver updates, which support such
hierarchy. Restore original PCIe nodes in armada-385.dtsi and
apply necessary changes in hitherto unused armada-380.dtsi.

Submitted by:	Michal Mazur <mkm@semihalf.com>
		Marcin Wojtas <mw@semihalf.com>
Obtained from:	Semihalf
Sponsored by:	Stormshield, Netgate
Differential revision: https://reviews.freebsd.org/D10907
2017-06-08 16:55:58 +00:00
Luiz Otavio O Souza
c1212a7a74 Fix the offset for the CPU0 MPIC registers.
Please note that only a subset of CPU0 registers are exported.  CPU1
registers are not touched.

Obtained from:	ARMADA38X Functional Specifications
Sponsored by:	Rubicon Communications, LLC (Netgate)
2017-05-17 22:05:07 +00:00
Adrian Chadd
5c99cda025 [arm] [rt1310] add initial RT1310 SoC code.
This code base on lpc code. Ralink RT1310 is oem from 5V Technologies.
RT1310 is ARM926EJS(arm5t).

Tested:

* Buffalo WZR2-G300N

Submitted by:	Hiroki Mori <yamori813@yahoo.co.jp>
Reviewed by:	mizhka
Differential Revision:	https://reviews.freebsd.org/D7238
2017-05-06 06:14:46 +00:00
Ruslan Bukin
31cfa79fab Switch BERI Programmable Interrupt Controller to INTRNG.
Sponsored by:	DARPA, AFRL
2017-04-18 17:20:03 +00:00
Emmanuel Vadot
b7e79ebdd0 Reduce the diff on beaglebone-black DTS.
The HDMI TX (tda19988) is already enabled in upstream DTS so use it directly
instead.
2017-04-01 21:55:09 +00:00
Ian Lepore
98641b99e3 Delete our local imx53-qsb.dts file; the code now runs fine using the
standard vendor-supplied file in sys/gnu/dts/arm.
2017-03-19 18:50:03 +00:00
Oleksandr Tymoshenko
947d877109 [loader][fdt] Fix applying overlays without __local_fixups__ node
Do not return error if __local_fixups__ node is missing in DTB overlay
because local fixup data is optional.

Reported by:	Manuel Stuhn
MFC after:	1 week
2017-03-10 19:15:57 +00:00
Michal Meloun
a1e98ef35a Match JETSON-TK1 FreeBSD specific DTS stub with r314854. 2017-03-08 07:23:15 +00:00
Emmanuel Vadot
39e6bebd91 Update our Allwinner DTS to latest DTS changes in Linux 4.10 2017-03-07 13:59:30 +00:00
Ruslan Bukin
10102d1ce4 Set USB OTG mode to host (missed in vendor DTS for some reason).
Sponsored by:	DARPA, AFRL
2017-03-01 10:55:12 +00:00
Ruslan Bukin
428157830b Add support for Intel Arria 10 SoC Development Kit.
Use standard DTS files for SOCKIT and SOCDK.

Sponsored by:	DARPA, AFRL
2017-02-28 14:02:16 +00:00
Pedro F. Giffuni
e099b90b80 sys: Replace zero with NULL for pointers.
Found with:	devel/coccinelle
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D9694
2017-02-22 02:35:59 +00:00
Jared McNeill
265c594a2c Add missing ephy bus gates and resets. 2017-01-31 14:36:06 +00:00
Oleksandr Tymoshenko
3279df7e87 [am335x] Use upstream tda19988 framer node from upstream DTS
Remove custom DTS duplicate of tda19988 node and use upstream-provided
one introduced by r295436. This duplication created two tdaX devices
which confused fb driver into using only 640x480 area while setting
display to native resolution.

Reported by:	Michael Smith
MFC after:	3 days
2017-01-23 19:20:55 +00:00
Ruslan Bukin
1c6fccc166 Remove empty ranges property so beri_simplebus can be attached again.
Sponsored by:	DARPA, AFRL
2017-01-18 14:41:59 +00:00
Luiz Otavio O Souza
a396e10cd9 The write-protect is not wired on uFW, disable it to allow writes to SD
card.

Sponsored by:	Rubicon Communications, LLC (Netgate)
2017-01-17 18:04:13 +00:00
Zbigniew Bodek
2833497cae Add DTS file for Armada 385 DB-AP board
Armada38x is already supported in the tree.
This commit adds support for DB-AP board.
File was taken from Linux v4.8 and accustomed to FreeBSD
in minimal possible way.

Submitted by:	Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:	Semihalf
Sponsored by:	Stormshield
Differential revision: https://reviews.freebsd.org/D7327
2017-01-05 17:27:50 +00:00
Zbigniew Bodek
3471cb6e63 Add DTS file for Solidrun ClearFog board
ClearFog is equipped with Marvell Armada 388 SoC, which is already
supported in FreeBSD.

Submitted by:	Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:	Semihalf
Sponsored by:	Stormshield
Differential revision: https://reviews.freebsd.org/D7326
2017-01-05 17:25:16 +00:00
Zbigniew Bodek
2677b6e77f Correct CESA node in armada-38x.dtsi
CESA resources were invalid, what caused driver to fail
during attach call.

Submitted by:	Bartosz Szczepanek <bsz@semihalf.com>
Obtained from:	Semihalf
Sponsored by:	Stormshield
Differential revision: https://reviews.freebsd.org/D8180
2017-01-05 17:14:56 +00:00
Zbigniew Bodek
414a6b11c2 Add buffer management entries to armada-38x.dtsi
Hardware buffer management entries are not used yet by FreeBSD.
They were added for compliance with Linux Armada 38x device tree
representation and will be used in future network support.

Submitted by:  Bartosz Szczepanek <bsz@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Stormshield
Differential revision: https://reviews.freebsd.org/D8179
2017-01-05 17:12:53 +00:00
Luiz Otavio O Souza
722e888dce Remove a GPL licensed DTS.
The micro-Firewall DTS is now a single BSD licensed file.

Reported by:	manu
Obtained from:	pfSense
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC (Netgate)
2017-01-03 16:46:51 +00:00
Jared McNeill
c4df255db7 Fix a typo in the third address of the reg property for the usbphy node.
MFC after:	1 week
2016-12-31 13:10:06 +00:00
Jared McNeill
c560956880 Add missing reg property to usbphy node.
MFC after:	1 week
2016-12-30 20:16:09 +00:00
Ian Lepore
2e3bf68492 Add an ethernet0 alias pointing to the /aix/usb/hub/ethernet node. This
is required for u-boot to locate the ethernet node when it's doing fixup
of the mac-address property when the user has overridden the default addr.
2016-11-26 17:55:46 +00:00
Emmanuel Vadot
24de97b49a Enable the SPI1 and SPI2 node for Olimex A20 SOM EVB.
This was missed in r309079.
2016-11-24 06:43:11 +00:00
Emmanuel Vadot
fd13077148 Enable UEXT related nodes for Olimex A20 SOM
UEXT are Universal EXTension connector from Olimex. They embed i2c, spi
and uart pins along power in one connector and are found on most,
if not all, Olimex boards.
The Olimex A20 SOM EVB have two UEXT connector so enable the nodes found on
those two connectors.

Patch has been applied upstream, in the meantime add the nodes to our custom
DTS.
2016-11-23 18:31:34 +00:00
Jared McNeill
5cba9041d0 Add dts for Xunlong Orange Pi Plus 2E. 2016-11-20 19:38:46 +00:00
Jared McNeill
e73fb284af Add dts for FriendlyARM NanoPi NEO. 2016-11-20 19:38:05 +00:00
Jared McNeill
a7fc4a032b Add dtsi for FreeBSD-specific Allwinner H3 nodes. 2016-11-20 19:36:17 +00:00
Oleksandr Tymoshenko
08036373dc [FDT] Remove empty wrapper for upstream am335x-evm.dts
Remove empty wrapper for sys/gnu version of am335x-evm.dts located in
sys/boot/fdt, with current include paths priority it's recursive #include
and current build system can find file in sys/gnu when generating dtb

Reported by:	Jared McNeill
2016-11-20 18:56:04 +00:00
Emmanuel Vadot
51503e707b Upstream DTS provides PLL3 and PLL7 nodes (and their x2 form),
so remove them from our DTS and adapt the code to handle them correctly.
This fix HDMI video on A20.
2016-11-15 07:08:33 +00:00
Justin Hibbits
3e7ddf02dc Make dpaa work with only slightly modified Linux device trees.
Linux has a slightly different device tree definition for DPAA than originally
done in the FreeBSD driver.  This changes the driver to be mostly compatible
with the Linux device tree definitions.  Currently the differences are:

bman-portals: compatible = "fsl,bman-portals" (Linux is "simple-bus")
qman-portals: compatible = "fsl,qman-portals" (Linux is "simple-bus")
fman: compatible = "fsl,fman" (Linux is "simple-bus")

The Linux device tree doesn't specify anything for rgmii in the mdio.  This
change still requires the device tree to specify the phy-handle, and doesn't yet
support tbi.
2016-11-12 20:45:03 +00:00
Luiz Otavio O Souza
3c9cab9453 Add the DTS for the Netgate SG-1000 (micro-Firewall).
The SG-1000 boots with GENERIC ARM kernel on -head.

Obtained from:	pfSense
Sponsored by:	Rubicon Communications, LLC (Netgate)
2016-11-09 04:07:15 +00:00
Michal Meloun
ccf5e68e5b Add NVIDIA Tegra XHCI driver and coresponding firmware blob.
MFC after: 3 weeks
Approved by: core@ (NVIDIA license)
2016-11-07 05:37:10 +00:00
Emmanuel Vadot
25da7a9dc5 Add AXP221 node in our BananaPi M2 dts. 2016-11-04 20:06:32 +00:00
Emmanuel Vadot
3a140f67b4 Add needed cpu-supply property for cpufreq.
Patch is merged upstream, in the meantime add it in our DTS.
2016-10-24 21:09:48 +00:00
Wojciech Macek
246d07a7a3 Support for Alpine Serializer/Deserializer.
The exported functions will be used by
Alpine Ethernet driver.

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Reviewed by:           wma
Differential Revision: https://reviews.freebsd.org/D7763
2016-10-20 11:26:51 +00:00
Wojciech Macek
be48125bbf Support for MSI-X on Annapurna Alpine
This patch adds support for MSI-X interrupts
on Annapurna Alpine platform. MSI-X on Alpine
work similarly to GICv2m, i.e. some range of
SPI interrupts is reserved in GIC and individual
SPIs can be triggered by MSI-X messages.
This SPI range is defined in FDT.

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Reviewed by:           nwhitehorn, wma
Differential Revision: https://reviews.freebsd.org/D7579
2016-10-20 11:23:59 +00:00