From owner-freebsd-arm@freebsd.org Tue Oct 3 11:39:07 2017 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 37D3BE398FF for ; Tue, 3 Oct 2017 11:39:07 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BC468705A0 for ; Tue, 3 Oct 2017 11:39:06 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id dcb46ec4; Tue, 3 Oct 2017 13:39:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=JG5XaUpdaY+Ubu3BTSkCtvIzirI=; b=IFz1oPA6snFG1miXywbvVu6k1KPj dmjSqntDPk/WOSO0utIn/mk5ayum01oSvs7iOknZQ92dkKDqww7OgyoHhe5jUl4s Y8brlm8ACMixPUj5/xHWtHsg0uzmRrJ4J4xqB87P9MuNav+k8hWPwwAPP8/fh+yq cIyQLyqE25v5Qec= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=iUPtsRlhn5B8GeoiAN1jZygKNdKcVSf8QjdSokKUnljREab9hnsbYRIN tqfgGcC1ygbTyncr4kxcVNxh0uPCTlVd7wnR6hxwOiTa+hF7uWeehhhWlNM/ksB8 i81iA8c26lCg7eSAqego9FcyAhh77n7LUWX3AKirOtOT6FpttgM= Received: from arcadia (evadot.gandi.net [217.70.181.36]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 505002ca TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 3 Oct 2017 13:39:03 +0200 (CEST) Date: Tue, 3 Oct 2017 13:39:01 +0200 From: Emmanuel Vadot To: Michael Hrabanek Cc: freebsd-arm@freebsd.org Subject: Re: Allwinner H3 (NanoPi Neo): Getting PORTL (on /dev/gpioc1) to work Message-Id: <20171003133901.1de20ce9637720671eee3d33@bidouilliste.com> In-Reply-To: References: <20170921082259.aa46e554e653ce7bf2d403b2@bidouilliste.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; amd64-portbld-freebsd12.0) 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.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Oct 2017 11:39:07 -0000 On Tue, 3 Oct 2017 13:27:47 +0200 Michael Hrabanek wrote: > Hello, > any updates? If you'll need any testing done I'd be happy to help > > Cheers, > Michael I've fixed our gpio driver to not attach if we cannot enable one of the needed clocks. Now I need to code the clock driver for H3, it seems that there is no docs so it will take some time. > On Thu, Sep 21, 2017 at 8:22 AM, Emmanuel Vadot > wrote: > > > On Tue, 19 Sep 2017 09:45:22 +0200 > > Michael Hrabanek wrote: > > > > > Hi everybody, > > > I'm running 12.0-CURRENT (rev 323710) using GENERIC kernel on NanoPi Neo > > > (allwinner H3). I can use and control all gpio pins on /dev/gpioc0 > > without > > > any issue, but if I try to configure any pin on /dev/gpioc1 (there are > > only > > > PORTL pins there), nothing happens (pin configuration stays the same, > > > gpioctl returns 0 and no error in log). > > > > > > root@nanopi-neo:~ # gpioctl -f /dev/gpioc1 -lv > > > pin 00: 0 PL0, caps: > > > pin 01: 0 PL1, caps: > > > pin 02: 0 PL2<>, caps: > > > pin 03: 0 PL3<>, caps: > > > pin 04: 0 PL4<>, caps: > > > pin 05: 0 PL5<>, caps: > > > pin 06: 0 PL6<>, caps: > > > pin 07: 0 PL7<>, caps: > > > pin 08: 0 PL8<>, caps: > > > pin 09: 0 PL9<>, caps: > > > pin 10: 0 PL10<>, caps: > > > pin 11: 0 PL11<>, caps: > > > > > > root@nanopi-neo:~ # gpioctl -f /dev/gpioc1 -c 10 OUT > > > > > > root@nanopi-neo:~ # gpioctl -f /dev/gpioc1 -lv > > > <...> > > > pin 10: 0 PL10<>, caps: > > > pin 11: 0 PL11<>, caps: > > > > > > Did anyone managed to get pins on PORTL working? (btw there are two LEDs > > on > > > nanopi neo, the blue one on PA10, which I can control normally and the > > > green (pwr) one, wired to PL10, which only slightly dims (ie. pin is not > > > configured as output)). > > > Any idea what's wrong? Is there an issue with FDT config? (I'm using > > > default one from src nanopi-neo.dtb) Or some bug in kernel? I'm not > > afraid > > > of some kernel hacking, but I'd welcome some pointers where to look > > first. > > > Any suggestions would be greatly appreciated, > > > Michael > > > > Hello, > > > > Thanks for reporting, I totally forgot that I needed to do a r_ccu > > driver for H3. > > The PORTL on H3 lives on another gpio controller, for which it's clock > > lives in another clock controller and we miss the driver for the latest. > > It also raise a problem on our gpio driver as it shouldn't attach and > > create the node while the clocks are missing. > > I'll invastigate after EuroBSDCon. > > > > Cheers, > > > > -- > > Emmanuel Vadot > > -- Emmanuel Vadot