Author: gonzo
Date: Tue Apr 10 20:31:25 2018
New Revision: 332392

  [pi] Do not attach bcm2835_pwm if DTB node is not enabled
  Switch to standard FDT-base driver behavior and don't attach
  if node "status" property value nn DTS is not set to "okay"
  On RPi PWM by default is disabled, to enable it pwm.dtbo
  from official repo[1] should be copied to overlays directory
  on SD card FAT partition and "dtoverlay=pwm" line added to
  config.txt. For more details see pwm overlay documentation[2]
  sysutils/rpi-firmware port now includes overlays, so they
  can be installed as a part of release image build.
  No objections from:   phk@


Modified: head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c
--- head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c Tue Apr 10 20:22:36 2018        
+++ head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c Tue Apr 10 20:31:25 2018        
@@ -276,12 +276,8 @@ static int
 bcm_pwm_probe(device_t dev)
-#if 0
-       // XXX: default state is disabled in RPI3 DTB, assume for now
-       // XXX: that people want the PWM to work if the KLD this module.
        if (!ofw_bus_status_okay(dev))
                return (ENXIO);
        if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0)
                return (ENXIO);
_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to