From owner-svn-src-head@freebsd.org Tue Apr 10 20:31:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5538FF96FA1; Tue, 10 Apr 2018 20:31:26 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 08B6975F4B; Tue, 10 Apr 2018 20:31:26 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 03BFE12889; Tue, 10 Apr 2018 20:31:26 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3AKVPbn088766; Tue, 10 Apr 2018 20:31:25 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3AKVPQk088753; Tue, 10 Apr 2018 20:31:25 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201804102031.w3AKVPQk088753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 10 Apr 2018 20:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332392 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 332392 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Apr 2018 20:31:26 -0000 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);