From owner-freebsd-arm@freebsd.org Fri Jan 19 20:36:22 2018 Return-Path: Delivered-To: freebsd-arm@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 02330EC6B84 for ; Fri, 19 Jan 2018 20:36:22 +0000 (UTC) (envelope-from freebsd-arm@dino.sk) Received: from mailhost.netlabit.sk (mailhost.netlabit.sk [84.245.65.72]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 844E973CF5; Fri, 19 Jan 2018 20:36:20 +0000 (UTC) (envelope-from freebsd-arm@dino.sk) Received: from zeta.dino.sk (fw3.dino.sk [84.245.95.254]) (AUTH: LOGIN milan) by mailhost.netlabit.sk with ESMTPA; Fri, 19 Jan 2018 21:36:18 +0100 id 00F4BE7F.5A6256C2.00013A6C Date: Fri, 19 Jan 2018 21:36:17 +0100 From: Milan Obuch To: Kyle Evans Cc: freebsd-arm@freebsd.org Subject: Re: Orange Pi R1 ethernet #2 + SDIO question Message-ID: <20180119213617.67e31e94@zeta.dino.sk> In-Reply-To: References: <20180119211953.5140bb57@zeta.dino.sk> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; i386-portbld-freebsd10.4) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2018 20:36:22 -0000 On Fri, 19 Jan 2018 14:30:11 -0600 Kyle Evans wrote: > On Fri, Jan 19, 2018 at 2:19 PM, Milan Obuch > wrote: > > Hi, > > > > today I looked over some docs about Orange Pi R1's second ethernet > > interface. Actually it is basically the same board as Orange Pi > > Zero, just onboard USB connector is replaced with some Realtek USB > > ethernet chip. With our current kernel and Orange Pi Zero DTB there > > is nothing in usbconfig output. > > > > Most probably we are missing some initialization step. After finding > > mention of GPIO pin 20 in some Linux DTS, I decided simply try > > > > # gpioctl -f /dev/gpioc0 20 1 > > > > and voila, it works: > > > > ugen2.2: at usbus2 > > ure0 on uhub1 > > ure0: on > > usbus2 random: harvesting attach, 8 bytes (4 bits) from ure0 > > miibus1: on ure0 > > rlphy0: PHY 0 on miibus1 > > rlphy0: OUI 0x00e04c, model 0x0008, rev. 2 > > rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto > > random: harvesting attach, 8 bytes (4 bits) from rlphy0 > > random: harvesting attach, 8 bytes (4 bits) from miibus1 > > ue0: on ure0 > > ue0: bpf attached > > ue0: Ethernet address: c0:74:2b:ff:e5:ff > > ue0: link state changed to DOWN > > > > After > > > > # dhclient ue0 > > > > I was able to use this USB ethernet interface. > > > > Maybe this activation could be inserted in DTS, but for now I > > consider this ethernet usable (I tried some ping, ssh and some such > > over it with success). > > I can't comment on SDIO, but this stuff should ride in on 4.16 DTS in > a couple months and just work; see [1]. > > [1] > https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git/tree/arch/arm/boot/dts/sun8i-h2-plus-orangepi-r1.dts?h=sunxi/for-next OK. I just like to let others know what I tried, so anybody interested could have usable hack for the time being. Maybe not the nicest, but simple and working. Regards, Milan