From owner-svn-src-head@freebsd.org Sat Aug 19 14:27:12 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4BF3DC8C14; Sat, 19 Aug 2017 14:27:12 +0000 (UTC) (envelope-from manu@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 mx1.freebsd.org (Postfix) with ESMTPS id 86AD476C04; Sat, 19 Aug 2017 14:27:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7JERBcU057521; Sat, 19 Aug 2017 14:27:11 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7JERBvn057518; Sat, 19 Aug 2017 14:27:11 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201708191427.v7JERBvn057518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 19 Aug 2017 14:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r322694 - in head/sys: boot/fdt/dts/arm modules/dtb/rpi X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys: boot/fdt/dts/arm modules/dtb/rpi X-SVN-Commit-Revision: 322694 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.23 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: Sat, 19 Aug 2017 14:27:12 -0000 Author: manu Date: Sat Aug 19 14:27:11 2017 New Revision: 322694 URL: https://svnweb.freebsd.org/changeset/base/322694 Log: RPI DTS: Add value previously set by VideoCore and DTB links Using latest U-Boot for RPI 1 or 2 the DTB loaded by the firmware is discarded. The DTB was previously patched by the firmware to contain the DMA channel mask. DTB provided by the rpi firmware or DTS in the Linux tree contain the raw value directly. Do the same for our DTS as we cannot switch to the upstream ones yet. Not having the DMA channel mask setup properly cause mmc not to be detected (and probably other problems on driver using DMA). Also, add links for rpi dtb to the name used by u-boot. This way the dtb can be loaded by ubldr using the U-Boot env variable fdtfile. Tested On: RPI B Rev2, RPI Zero, RPI 2 v1.1 RPI 2 v1.2 Thanks to Sylvain Garrigues for the help. PR: 218344 Modified: head/sys/boot/fdt/dts/arm/bcm2835.dtsi head/sys/boot/fdt/dts/arm/bcm2836.dtsi head/sys/modules/dtb/rpi/Makefile Modified: head/sys/boot/fdt/dts/arm/bcm2835.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/bcm2835.dtsi Sat Aug 19 12:14:46 2017 (r322693) +++ head/sys/boot/fdt/dts/arm/bcm2835.dtsi Sat Aug 19 14:27:11 2017 (r322694) @@ -439,7 +439,7 @@ interrupts = <24 25 26 27 28 29 30 31 32 33 34 35 36>; interrupt-parent = <&intc>; - broadcom,channels = <0>; /* Set by VideoCore */ + broadcom,channels = <0x7f35>; }; vc_mbox: mbox { Modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/bcm2836.dtsi Sat Aug 19 12:14:46 2017 (r322693) +++ head/sys/boot/fdt/dts/arm/bcm2836.dtsi Sat Aug 19 14:27:11 2017 (r322694) @@ -432,7 +432,7 @@ interrupts = <24 25 26 27 28 29 30 31 32 33 34 35 36>; interrupt-parent = <&intc>; - broadcom,channels = <0>; /* Set by VideoCore */ + broadcom,channels = <0x7f35>; }; vc_mbox: mbox { Modified: head/sys/modules/dtb/rpi/Makefile ============================================================================== --- head/sys/modules/dtb/rpi/Makefile Sat Aug 19 12:14:46 2017 (r322693) +++ head/sys/modules/dtb/rpi/Makefile Sat Aug 19 14:27:11 2017 (r322694) @@ -2,4 +2,11 @@ # DTS files for the Raspberry Pi-B DTS=rpi.dts rpi2.dts +LINKS= \ + ${DTBDIR}/rpi.dtb ${DTBDIR}/bcm2835-rpi-b.dtb \ + ${DTBDIR}/rpi.dtb ${DTBDIR}/bcm2835-rpi-b-rev2.dtb \ + ${DTBDIR}/rpi.dtb ${DTBDIR}/bcm2835-rpi-b-plus.dtb \ + ${DTBDIR}/rpi.dtb ${DTBDIR}/bcm2835-rpi-zero.dtb \ + ${DTBDIR}/rpi2.dtb ${DTBDIR}/bcm2836-rpi-2-b.dtb + .include