Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/arch/arm Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/73452cc728dc
branches: netbsd-9
changeset: 1002237:73452cc728dc
user: martin <martin%NetBSD.org@localhost>
date: Sun Apr 25 11:13:03 2021 +0000
description:
Pull up following revision(s) (requested by riastradh in ticket #1252):
sys/arch/arm/sunxi/sun8i_h3_ccu.c: revision 1.18 (patch)
sys/arch/arm/sunxi/sun8i_crypto.c: revision 1.24 (patch)
sys/arch/arm/dts/sun50i-h5.dtsi: revision 1.2 (patch)
arm/sunxi: Wire up sun8icrypto(4) on Allwinner H5.
Tested on NanoPi Neo PLUS2.
diffstat:
sys/arch/arm/dts/sun50i-h5.dtsi | 15 ++++++++++++++-
sys/arch/arm/sunxi/sun8i_crypto.c | 5 +++--
sys/arch/arm/sunxi/sun8i_h3_ccu.c | 16 ++++++++++++++--
3 files changed, 31 insertions(+), 5 deletions(-)
diffs (113 lines):
diff -r 9d06f7df7ca2 -r 73452cc728dc sys/arch/arm/dts/sun50i-h5.dtsi
--- a/sys/arch/arm/dts/sun50i-h5.dtsi Sun Apr 25 11:07:45 2021 +0000
+++ b/sys/arch/arm/dts/sun50i-h5.dtsi Sun Apr 25 11:13:03 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sun50i-h5.dtsi,v 1.1 2018/01/28 18:31:15 jmcneill Exp $ */
+/* $NetBSD: sun50i-h5.dtsi,v 1.1.8.1 2021/04/25 11:13:03 martin Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -28,6 +28,19 @@
#include "sun8i-h3.dtsi"
+/ {
+ soc {
+ crypto: crypto@1c15000 {
+ compatible = "allwinner,sun50i-h5-crypto";
+ reg = <0x01c15000 0x1000>;
+ interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>;
+ clock-names = "bus", "mod";
+ resets = <&ccu RST_BUS_CE>;
+ };
+ };
+};
+
&rtp {
compatible = "allwinner,sun50i-h5-ts";
};
diff -r 9d06f7df7ca2 -r 73452cc728dc sys/arch/arm/sunxi/sun8i_crypto.c
--- a/sys/arch/arm/sunxi/sun8i_crypto.c Sun Apr 25 11:07:45 2021 +0000
+++ b/sys/arch/arm/sunxi/sun8i_crypto.c Sun Apr 25 11:13:03 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sun8i_crypto.c,v 1.14.2.2 2020/05/18 18:45:40 martin Exp $ */
+/* $NetBSD: sun8i_crypto.c,v 1.14.2.3 2021/04/25 11:13:03 martin Exp $ */
/*-
* Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.14.2.2 2020/05/18 18:45:40 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sun8i_crypto.c,v 1.14.2.3 2021/04/25 11:13:03 martin Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -209,6 +209,7 @@
static const struct of_compat_data compat_data[] = {
{"allwinner,sun50i-a64-crypto", 0},
+ {"allwinner,sun50i-h5-crypto", 0},
{NULL}
};
diff -r 9d06f7df7ca2 -r 73452cc728dc sys/arch/arm/sunxi/sun8i_h3_ccu.c
--- a/sys/arch/arm/sunxi/sun8i_h3_ccu.c Sun Apr 25 11:07:45 2021 +0000
+++ b/sys/arch/arm/sunxi/sun8i_h3_ccu.c Sun Apr 25 11:13:03 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sun8i_h3_ccu.c,v 1.16 2019/01/31 01:49:28 jmcneill Exp $ */
+/* $NetBSD: sun8i_h3_ccu.c,v 1.16.4.1 2021/04/25 11:13:03 martin Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: sun8i_h3_ccu.c,v 1.16 2019/01/31 01:49:28 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sun8i_h3_ccu.c,v 1.16.4.1 2021/04/25 11:13:03 martin Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -60,6 +60,7 @@
#define SDMMC0_CLK_REG 0x088
#define SDMMC1_CLK_REG 0x08c
#define SDMMC2_CLK_REG 0x090
+#define CE_CLK_REG 0x09c
#define SPI0_CLK_REG 0x0a0
#define SPI1_CLK_REG 0x0a4
#define USBPHY_CFG_REG 0x0cc
@@ -154,6 +155,7 @@
static const char *ahb2_parents[] = { "ahb1", "pll_periph0" };
static const char *apb1_parents[] = { "ahb1" };
static const char *apb2_parents[] = { "losc", "hosc", "pll_periph0" };
+static const char *ce_parents[] = { "hosc", "pll_periph0_2x", "pll_periph1_2x" };
static const char *mod_parents[] = { "hosc", "pll_periph0", "pll_periph1" };
static const char *ths_parents[] = { "hosc" };
static const char *de_parents[] = { "pll_periph0_2x", "pll_de" };
@@ -329,6 +331,14 @@
0, /* enable */
SUNXI_CCU_NM_POWER_OF_TWO),
+ SUNXI_CCU_NM(H3_CLK_CE, "ce", ce_parents,
+ CE_CLK_REG, /* reg */
+ __BITS(17,16), /* n */
+ __BITS(3,0), /* m */
+ __BITS(25,24), /* sel */
+ __BIT(31), /* enable */
+ SUNXI_CCU_NM_POWER_OF_TWO|SUNXI_CCU_NM_ROUND_DOWN),
+
SUNXI_CCU_DIV_GATE(H3_CLK_THS, "ths", ths_parents,
THS_CLK_REG, /* reg */
__BITS(1,0), /* div */
@@ -400,6 +410,8 @@
__BIT(31), /* enable */
0),
+ SUNXI_CCU_GATE(H3_CLK_BUS_CE, "bus-ce", "ahb1",
+ BUS_CLK_GATING_REG0, 5),
SUNXI_CCU_GATE(H3_CLK_BUS_DMA, "bus-dma", "ahb1",
BUS_CLK_GATING_REG0, 6),
SUNXI_CCU_GATE(H3_CLK_BUS_MMC0, "bus-mmc0", "ahb1",
Home |
Main Index |
Thread Index |
Old Index