Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Aug 2018 15:00:37 +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: r338294 - in head/sys: dts/arm64 dts/arm64/overlays modules/dtb/allwinner
Message-ID:  <201808241500.w7OF0bZ8010717@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Fri Aug 24 15:00:36 2018
New Revision: 338294
URL: https://svnweb.freebsd.org/changeset/base/338294

Log:
  arm64: Add DTS overlays for A64
  
   - sun50i-a64-sid.dtso registers the Security ID node, needed for thermal
   - sun50i-a64-ths.dtso registers the thermal node, for which we already have a
  driver
   - sun50i-a64-timer.dtso registers the timer node, needed as the generic timer
   glitch on A64 SoC.
  
  Approved by:    re (gjb)

Added:
  head/sys/dts/arm64/
  head/sys/dts/arm64/Makefile   (contents, props changed)
  head/sys/dts/arm64/overlays/
  head/sys/dts/arm64/overlays/Makefile   (contents, props changed)
  head/sys/dts/arm64/overlays/sun50i-a64-sid.dtso   (contents, props changed)
  head/sys/dts/arm64/overlays/sun50i-a64-ths.dtso   (contents, props changed)
  head/sys/dts/arm64/overlays/sun50i-a64-timer.dtso   (contents, props changed)
Modified:
  head/sys/modules/dtb/allwinner/Makefile

Added: head/sys/dts/arm64/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dts/arm64/Makefile	Fri Aug 24 15:00:36 2018	(r338294)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+DTS!=ls *.dts
+
+all: test-dts
+
+.include <bsd.init.mk>

Added: head/sys/dts/arm64/overlays/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dts/arm64/overlays/Makefile	Fri Aug 24 15:00:36 2018	(r338294)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+DTSO!=ls *.dtso
+
+all: test-dtso
+
+.include <bsd.init.mk>

Added: head/sys/dts/arm64/overlays/sun50i-a64-sid.dtso
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dts/arm64/overlays/sun50i-a64-sid.dtso	Fri Aug 24 15:00:36 2018	(r338294)
@@ -0,0 +1,17 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+	compatible = "allwinner,sun50i-a64";
+};
+
+&{/soc} {
+	sid: eeprom@1c14000 {
+		compatible = "allwinner,sun50i-a64-sid";
+		reg = <0x1c14000 0x400>;
+
+		ths_calib: calib@234 {
+			reg = <0x234 0x6>;
+		};
+	};
+};

Added: head/sys/dts/arm64/overlays/sun50i-a64-ths.dtso
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dts/arm64/overlays/sun50i-a64-ths.dtso	Fri Aug 24 15:00:36 2018	(r338294)
@@ -0,0 +1,27 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/sun50i-a64-ccu.h>
+#include <dt-bindings/reset/sun50i-a64-ccu.h>
+
+/ {
+	compatible = "allwinner,sun50i-a64";
+};
+
+&{/soc} {
+	ths: thermal_sensor@1c25000 {
+		compatible = "allwinner,sun50i-a64-ths";
+		reg = <0x01c25000 0x100>;
+		interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
+		clock-names = "apb", "ths";
+		resets = <&ccu RST_BUS_THS>;
+		reset-names = "apb";
+		#thermal-sensor-cells = <2>;
+		status = "okay";
+
+		nvmem-cells = <&ths_calib>;
+		nvmem-cell-names = "ths-calib";
+	};
+};

Added: head/sys/dts/arm64/overlays/sun50i-a64-timer.dtso
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dts/arm64/overlays/sun50i-a64-timer.dtso	Fri Aug 24 15:00:36 2018	(r338294)
@@ -0,0 +1,17 @@
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+/ {
+	compatible = "allwinner,sun50i-a64";
+};
+
+&{/soc} {
+	timer@1c20c00 {
+		compatible = "allwinner,sun8i-a23-timer";
+		reg = <0x1c20c00 0x2C>;
+		interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
+		status = "okay";
+	};
+};

Modified: head/sys/modules/dtb/allwinner/Makefile
==============================================================================
--- head/sys/modules/dtb/allwinner/Makefile	Fri Aug 24 14:53:46 2018	(r338293)
+++ head/sys/modules/dtb/allwinner/Makefile	Fri Aug 24 15:00:36 2018	(r338294)
@@ -43,6 +43,11 @@ DTS=	\
 	allwinner/sun50i-a64-pine64.dts \
 	allwinner/sun50i-a64-sopine-baseboard.dts \
 	allwinner/sun50i-h5-orangepi-pc2.dts
+
+DTSO=	sun50i-a64-sid.dtso \
+	sun50i-a64-ths.dtso \
+	sun50i-a64-timer.dtso
+
 .endif
 
 .include <bsd.dtb.mk>



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