From owner-p4-projects@FreeBSD.ORG Fri Apr 5 15:11:39 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4C126238; Fri, 5 Apr 2013 15:11:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0EEEA236 for ; Fri, 5 Apr 2013 15:11:39 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id DC63ED49 for ; Fri, 5 Apr 2013 15:11:38 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r35FBc9P013697 for ; Fri, 5 Apr 2013 15:11:38 GMT (envelope-from bz@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r35FBcsa013694 for perforce@freebsd.org; Fri, 5 Apr 2013 15:11:38 GMT (envelope-from bz@freebsd.org) Date: Fri, 5 Apr 2013 15:11:38 GMT Message-Id: <201304051511.r35FBcsa013694@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bz@freebsd.org using -f From: "Bjoern A. Zeeb" Subject: PERFORCE change 227441 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Apr 2013 15:11:39 -0000 http://p4web.freebsd.org/@@227441?ac=10 Change 227441 by bz@bz_zenith on 2013/04/05 15:10:56 Bottom half of the implementation to support ISP1761 on the DE4. This allows us to detect the Host Controller and Root Hub but nothing further, thus disable the FDT attachment for the moment and do not include any USB related options into the kernel config. We use a private bus_space template as we do need to byte swap the register values, which is not the same as USB_EHCI_BIG_ENDIAN_DESC. We force the chip to 32bit access only given we hardwire the A1 line to 0. For the moment the OTG (DC, Peripheral) interrupt and special IO space can be optionally mapped should we decide we need it and want to have it all in the one file. The current assumption is that someone will need to implement the slightly Philips specific PTD handling, but it could be that this is not the only thing preventing us from discovering the Internal Hub (with TT support) and powering up individual ports and detecting devices. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#21 edit .. //depot/projects/ctsrd/beribsd/src/sys/dev/usb/controller/ehci_isp1761_fdt.c#1 add .. //depot/projects/ctsrd/beribsd/src/sys/mips/beri/files.beri#32 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/boot/fdt/dts/beripad-de4.dts#21 (text+ko) ==== @@ -180,6 +180,9 @@ 0x7f005520 0x20 0x7f005400 0x8 0x7f005420 0x20>; + /* RX, TX */ + interrupts = <11 12>; + interrupt-parent = <&beripic>; }; touchscreen@70400000 { @@ -189,6 +192,17 @@ 0x70177000 0x2000>; }; +/* + usb@0x7f100000 { + compatible = "philips,isp1761"; + reg = <0x7f100000 0x40000 + 0x7f140000 0x4>; + / * IRQ 4 is DC, IRQ 5 is HC. * / + interrupts = <4 5>; + interrupt-parent = <&beripic>; + }; +*/ + avgen@0x7f009000 { compatible = "sri-cambridge,avgen"; reg = <0x7f009000 0x2>; @@ -212,5 +226,14 @@ sri-cambridge,fileio = "rw"; sri-cambridge,devname = "de4tempfan"; }; + + avgen@0x7f100000 { + compatible = "sri-cambridge,avgen"; + reg = <0x7f100000 0x40000>; + sri-cambridge,width = <4>; + sri-cambridge,fileio = "r"; + sri-cambridge,devname = "usbmem"; + }; + }; }; ==== //depot/projects/ctsrd/beribsd/src/sys/mips/beri/files.beri#32 (text+ko) ==== @@ -16,6 +16,7 @@ dev/terasic/mtl/terasic_mtl_reg.c optional terasic_mtl dev/terasic/mtl/terasic_mtl_syscons.c optional terasic_mtl dev/terasic/mtl/terasic_mtl_text.c optional terasic_mtl +dev/usb/controller/ehci_isp1761_fdt.c optional ehci usb fdt mips/beri/beri_asm.S standard mips/beri/beri_machdep.c standard mips/beri/beri_mp.c optional smp