diff --git a/share/man/man4/man4.arm/aw_sid.4 b/share/man/man4/man4.arm/aw_sid.4 --- a/share/man/man4/man4.arm/aw_sid.4 +++ b/share/man/man4/man4.arm/aw_sid.4 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 6, 2018 +.Dd October 8, 2024 .Dt AW_SID 4 .Os .Sh NAME @@ -53,6 +53,10 @@ allwinner,sun8i-a83t-sid .It allwinner,sun8i-h3-sid +.It +allwinner,sun50i-h5-sid +.It +allwinner,sun20i-d1-sid .El .Sh SYSCTL VARIABLES The following read-only variables are available via diff --git a/sys/arm/allwinner/aw_sid.c b/sys/arm/allwinner/aw_sid.c --- a/sys/arm/allwinner/aw_sid.c +++ b/sys/arm/allwinner/aw_sid.c @@ -169,6 +169,27 @@ }, }; +static struct aw_sid_efuse d1_efuses[] = { + { + .name = "rootkey", + .desc = "Root Key or ChipID", + .base = EFUSE_OFFSET, + .offset = 0x00, + .size = 16, + .id = AW_SID_FUSE_ROOTKEY, + .public = true, + }, + { + .name = "calibration", + .desc = "Thermal Sensor Calibration Data", + .base = EFUSE_OFFSET, + .offset = 0x34, + .size = 4, + .id = AW_SID_FUSE_THSSENSOR, + .public = true, + }, +}; + struct aw_sid_conf { struct aw_sid_efuse *efuses; size_t nfuses; @@ -204,6 +225,11 @@ .nfuses = nitems(h5_efuses), }; +static const struct aw_sid_conf d1_conf = { + .efuses = d1_efuses, + .nfuses = nitems(d1_efuses), +}; + static struct ofw_compat_data compat_data[] = { { "allwinner,sun4i-a10-sid", (uintptr_t)&a10_conf}, { "allwinner,sun7i-a20-sid", (uintptr_t)&a20_conf}, @@ -211,6 +237,7 @@ { "allwinner,sun8i-a83t-sid", (uintptr_t)&a83t_conf}, { "allwinner,sun8i-h3-sid", (uintptr_t)&h3_conf}, { "allwinner,sun50i-h5-sid", (uintptr_t)&h5_conf}, + { "allwinner,sun20i-d1-sid", (uintptr_t)&d1_conf}, { NULL, 0 } }; diff --git a/sys/arm/allwinner/if_awg.c b/sys/arm/allwinner/if_awg.c --- a/sys/arm/allwinner/if_awg.c +++ b/sys/arm/allwinner/if_awg.c @@ -143,12 +143,14 @@ EMAC_A83T = 1, EMAC_H3, EMAC_A64, + EMAC_D1, }; static struct ofw_compat_data compat_data[] = { { "allwinner,sun8i-a83t-emac", EMAC_A83T }, { "allwinner,sun8i-h3-emac", EMAC_H3 }, { "allwinner,sun50i-a64-emac", EMAC_A64 }, + { "allwinner,sun20i-d1-emac", EMAC_D1 }, { NULL, 0 } }; diff --git a/sys/riscv/allwinner/files.allwinner b/sys/riscv/allwinner/files.allwinner --- a/sys/riscv/allwinner/files.allwinner +++ b/sys/riscv/allwinner/files.allwinner @@ -1,7 +1,9 @@ arm/allwinner/aw_rtc.c optional aw_rtc fdt arm/allwinner/aw_syscon.c optional syscon +arm/allwinner/aw_sid.c optional aw_sid nvmem arm/allwinner/aw_wdog.c optional aw_wdog +arm/allwinner/if_awg.c optional awg syscon # Allwinner clock drivers dev/clk/allwinner/aw_ccung.c optional aw_ccu fdt diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -83,6 +83,7 @@ # pseudo devices device clk device hwreset +device nvmem device phy device regulator device syscon diff --git a/sys/riscv/conf/std.allwinner b/sys/riscv/conf/std.allwinner --- a/sys/riscv/conf/std.allwinner +++ b/sys/riscv/conf/std.allwinner @@ -7,6 +7,8 @@ device aw_ccu # Allwinner clock controller device aw_rtc # Allwinner Real-time Clock +device aw_sid # Allwinner Secure ID EFUSE device aw_wdog # Allwinner Watchdog +device awg # Allwinner EMAC Gigabit Ethernet files "../allwinner/files.allwinner"