diff --git a/sys/arm/broadcom/bcm2835/bcm2835_pwm.c b/sys/arm/broadcom/bcm2835/bcm2835_pwm.c
index a55bce86d32f..a36197a6eaef 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_pwm.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_pwm.c
@@ -160,6 +160,8 @@ bcm_pwm_reconf(struct bcm_pwm_softc *sc)
 
 	/* Config PWM */
 	W_RNG(sc, sc->period);
+	if (sc->ratio > sc->period)
+		sc->ratio = sc->period;
 	W_DAT(sc, sc->ratio);
 
 	/* Start PWM */
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index 892c50ab3198..925d89a341fd 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -60,6 +60,7 @@ SUBDIR=	\
 	${_autofs} \
 	${_auxio} \
 	${_bce} \
+	${_bcm283x_pwm} \
 	bfe \
 	bge \
 	bhnd \
@@ -806,6 +807,10 @@ _cloudabi64=	cloudabi64
 
 .endif
 
+.if ${MACHINE_ARCH:Marmv[67]*} != "" || ${MACHINE_CPUARCH} == "aarch64"
+_bcm283x_pwm=  bcm283x_pwm
+.endif
+
 .if ${MACHINE_ARCH:Marmv[67]*} != ""
 _ffec=		ffec
 .endif
diff --git a/sys/modules/rpi_pwm/Makefile b/sys/modules/bcm283x_pwm/Makefile
similarity index 88%
rename from sys/modules/rpi_pwm/Makefile
rename to sys/modules/bcm283x_pwm/Makefile
index b1e7088d652f..cb51c4ea36ae 100644
--- a/sys/modules/rpi_pwm/Makefile
+++ b/sys/modules/bcm283x_pwm/Makefile
@@ -2,7 +2,7 @@
 
 .PATH: ${SRCTOP}/sys/arm/broadcom/bcm2835/
 
-KMOD=	rpi_pwm
+KMOD=	bcm283x_pwm
 SRCS=	bcm2835_pwm.c
 
 SRCS+= bus_if.h device_if.h ofw_bus_if.h