Author: gonzo Date: Tue Apr 10 20:31:25 2018 New Revision: 332392 URL: https://svnweb.freebsd.org/changeset/base/332392
Log: [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. [1] https://github.com/raspberrypi/firmware/tree/master/boot [2] https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README No objections from: phk@ Modified: head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c Tue Apr 10 20:22:36 2018 (r332391) +++ head/sys/arm/broadcom/bcm2835/bcm2835_pwm.c Tue Apr 10 20:31:25 2018 (r332392) @@ -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); -#endif if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"