? dev/fdt/usbphy.c ? dev/fdt/usbphy.h Index: arch/arm64/conf/GENERIC =================================================================== RCS file: /cvs/src/sys/arch/arm64/conf/GENERIC,v retrieving revision 1.193 diff -u -p -r1.193 GENERIC --- arch/arm64/conf/GENERIC 8 Mar 2021 20:56:10 -0000 1.193 +++ arch/arm64/conf/GENERIC 7 Apr 2021 06:26:27 -0000 @@ -85,7 +85,8 @@ sdmmc* at sdhc? bwfm* at sdmmc? # Broadcom FullMAC #smmu* at fdt? xhci* at fdt? -ccp* at fdt? # AMD Cryptographic Co-processor +ccpbus* at fdt? # AMD Cryptographic Co-processor +ccp* at ccpbus? ipmi* at fdt? # NS16550 compatible serial ports Index: dev/fdt/ccp_fdt.c =================================================================== RCS file: /cvs/src/sys/dev/fdt/ccp_fdt.c,v retrieving revision 1.1 diff -u -p -r1.1 ccp_fdt.c --- dev/fdt/ccp_fdt.c 20 Apr 2018 04:37:21 -0000 1.1 +++ dev/fdt/ccp_fdt.c 7 Apr 2021 06:26:27 -0000 @@ -30,6 +30,38 @@ #include +static int ccpbus_match(struct device *, void *, void *); +static void ccpbus_attach(struct device *, struct device *, void *); + +struct cfattach ccpbus_ca = { + sizeof(struct device), + ccpbus_match, + ccpbus_attach +}; + +struct cfdriver ccpbus_cd = { + NULL, + "ccpbus", + DV_DULL +}; + +static int +ccpbus_match(struct device *parent, void *match, void *aux) +{ + struct fdt_attach_args *faa = aux; + + return OF_is_compatible(faa->fa_node, "amd,ccp-seattle-v1a"); +} + +static void +ccpbus_attach(struct device *parent, struct device *self, void *aux) +{ + struct fdt_attach_args *faa = aux; + + printf(": hi!\n"); + config_found(self, faa, NULL); +} + static int ccp_fdt_match(struct device *, void *, void *); static void ccp_fdt_attach(struct device *, struct device *, void *); Index: dev/fdt/files.fdt =================================================================== RCS file: /cvs/src/sys/dev/fdt/files.fdt,v retrieving revision 1.146 diff -u -p -r1.146 files.fdt --- dev/fdt/files.fdt 5 Feb 2021 00:05:20 -0000 1.146 +++ dev/fdt/files.fdt 7 Apr 2021 06:26:27 -0000 @@ -515,8 +515,10 @@ device imxspi: spi attach imxspi at fdt file dev/fdt/imxspi.c imxspi -attach ccp at fdt with ccp_fdt -file dev/fdt/ccp_fdt.c ccp_fdt +device ccpbus {} +attach ccpbus at fdt +attach ccp at ccpbus with ccp_fdt +file dev/fdt/ccp_fdt.c ccbbus | ccp_fdt attach com at fdt with com_fdt file dev/fdt/com_fdt.c com_fdt