From 3ff95acd8124f47baa3a02209c3d3e7edc54a790 Mon Sep 17 00:00:00 2001 From: kettenis Date: Sat, 17 Feb 2024 13:29:25 +0000 Subject: [PATCH] Bindings for the rk3288/rk3328/rk3399 have landed in Linux and are being adopted by U-Boot. So check for the new compatible strings. Leave the old ones in place until we have U-Boot packages with update device trees. ok phessler@, patrick@ --- sys/dev/fdt/rkrng.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/dev/fdt/rkrng.c b/sys/dev/fdt/rkrng.c index 61d6fb1835d..75b8ad0b901 100644 --- a/sys/dev/fdt/rkrng.c +++ b/sys/dev/fdt/rkrng.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rkrng.c,v 1.5 2023/04/14 01:11:32 dlg Exp $ */ +/* $OpenBSD: rkrng.c,v 1.6 2024/02/17 13:29:25 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis * @@ -124,6 +124,9 @@ rkrng_match(struct device *parent, void *match, void *aux) struct fdt_attach_args *faa = aux; return OF_is_compatible(faa->fa_node, "rockchip,cryptov1-rng") || + OF_is_compatible(faa->fa_node, "rockchip,rk3288-crypto") || + OF_is_compatible(faa->fa_node, "rockchip,rk3328-crypto") || + OF_is_compatible(faa->fa_node, "rockchip,rk3399-crypto") || OF_is_compatible(faa->fa_node, "rockchip,cryptov2-rng"); } @@ -133,7 +136,10 @@ rkrng_attach(struct device *parent, struct device *self, void *aux) struct rkrng_softc *sc = (struct rkrng_softc *)self; struct fdt_attach_args *faa = aux; - if (OF_is_compatible(faa->fa_node, "rockchip,cryptov1-rng")) + if (OF_is_compatible(faa->fa_node, "rockchip,cryptov1-rng") || + OF_is_compatible(faa->fa_node, "rockchip,rk3288-crypto") || + OF_is_compatible(faa->fa_node, "rockchip,rk3328-crypto") || + OF_is_compatible(faa->fa_node, "rockchip,rk3399-crypto")) sc->sc_v = &rkrnv_v1; else if (OF_is_compatible(faa->fa_node, "rockchip,cryptov2-rng")) sc->sc_v = &rkrnv_v2; -- 2.20.1