Module Name: src Committed By: jmcneill Date: Thu Jun 21 10:46:39 UTC 2018
Added Files: src/sys/arch/arm/dts: rk3328-rock64.dts rk3328.dtsi Log Message: Enable DWC3 USB DRD (host mode) on Rock64. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/dts/rk3328-rock64.dts \ src/sys/arch/arm/dts/rk3328.dtsi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Added files: Index: src/sys/arch/arm/dts/rk3328-rock64.dts diff -u /dev/null src/sys/arch/arm/dts/rk3328-rock64.dts:1.1 --- /dev/null Thu Jun 21 10:46:39 2018 +++ src/sys/arch/arm/dts/rk3328-rock64.dts Thu Jun 21 10:46:39 2018 @@ -0,0 +1,38 @@ +/* $NetBSD: rk3328-rock64.dts,v 1.1 2018/06/21 10:46:39 jmcneill Exp $ */ + +/*- + * Copyright (c) 2018 Jared McNeill <jmcne...@invisible.ca> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "../../../external/gpl2/dts/dist/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts" +#include "rk3328.dtsi" + +&usbdrd3 { + status = "okay"; + snps,phyif-utmi-bits = <16>; + snps,dis-enblslpm-quirk; + snps,dis-u2-freeclk-exists-quirk; + snps,dis-u2-susphy-quirk; +}; Index: src/sys/arch/arm/dts/rk3328.dtsi diff -u /dev/null src/sys/arch/arm/dts/rk3328.dtsi:1.1 --- /dev/null Thu Jun 21 10:46:39 2018 +++ src/sys/arch/arm/dts/rk3328.dtsi Thu Jun 21 10:46:39 2018 @@ -0,0 +1,45 @@ +/* $NetBSD: rk3328.dtsi,v 1.1 2018/06/21 10:46:39 jmcneill Exp $ */ + +/*- + * Copyright (c) 2018 Jared McNeill <jmcne...@invisible.ca> + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/ { + usbdrd3: usb@ff600000 { + compatible = "rockchip,rk3328-dwc3"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + status = "disabled"; + + usbdrd_dwc3: dwc3@ff600000 { + compatible = "snps,dwc3"; + reg = <0x0 0xff600000 0x0 0x100000>; + interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; + dr_mode = "host"; + }; + }; +};