From owner-freebsd-arm@freebsd.org Tue Oct 3 11:27:50 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 21EC9E39513 for ; Tue, 3 Oct 2017 11:27:50 +0000 (UTC) (envelope-from hrabanek@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA8656FE1A for ; Tue, 3 Oct 2017 11:27:49 +0000 (UTC) (envelope-from hrabanek@gmail.com) Received: by mail-wm0-x232.google.com with SMTP id i124so16151167wmf.3 for ; Tue, 03 Oct 2017 04:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=WzGQd3f/3zgyGHeYWnRwwm/QRPjiBx5TsbLYlZNB378=; b=jQoRP0mwAin1jKL/Ge+IrGgiZf44WGsOvvXmytajmvwaHDYjRtkg5DkisiFK/uuCtC 3ZcRb+0fTNfOJvyRJ7ljBQvsA1k5ZkRUkrHQmkPVIGDZjFWfUyXmreJqDteNb6DSwMzR /4QqB+bJ+qjP3DUC3BmzUDqdI+gfL3MbZmo93Oo6sfaq3W5527Bt9Ff6hGAl8e31lY0U Aundm08ey1F/r/ZMA01D7LPA4Qv/4nq290wVdNd7n9SArHsp9cpFM/dZyHD7WzwKncT4 KSiFzL/qvzkT9Gvuj3CdOX72TMTQ1QMzQ+ra2zbEPN8qk2uuxIfrMeJbMHnTT8OnoZDv Icow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=WzGQd3f/3zgyGHeYWnRwwm/QRPjiBx5TsbLYlZNB378=; b=h3/Ld3QTlwlXhJnr0iylSM9NLfiUclXjQsjwkGSiAKxrjcoIY6h+INS/4XggCga/Dk k1j4MQHa6Fis57297dEZoTPCHIVbz0xkk2Mx4aZbIMi8jxsvd0O2UcDrdYY/0sYOWnBM 4GEUI6dUu58DezXmLWtmv9HpMKQqP9OmYxXo6PexC4lk7p9udUuc1il/dnhqcOnJ6iUh ICRV7Vic6L4sw0irxYJBIc8a2QszMXRw2SJHcfk1aGJtUTiXZsMCpi+BXbitoINWrPhP D8o9aKlPVUwQwXxA4R6GNeVpNZ7XtFcUkemQJkCCuGLpxWOjH0ZlgCh6q5vZp8BskbNW KUqQ== X-Gm-Message-State: AHPjjUhPv+ZZGvmB9elWqoLgNT1fz9y4sV6MiQSHFetDXOVLLVmorRAs H8VSZ5d7DeoS+xnfhRXjx2MT7Fjl0SD1ljTSA75T/g== X-Google-Smtp-Source: AOwi7QDbcsgaOxZ/GEfLv/u7ObVfeaNErTBGIsmvyCl9mGiZC4EMGadhjM+pwVn1PM9NBBiI6a5beNZArq4MgmDU4YE= X-Received: by 10.80.221.197 with SMTP id x5mr22981142edk.166.1507030068228; Tue, 03 Oct 2017 04:27:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.183.98 with HTTP; Tue, 3 Oct 2017 04:27:47 -0700 (PDT) In-Reply-To: <20170921082259.aa46e554e653ce7bf2d403b2@bidouilliste.com> References: <20170921082259.aa46e554e653ce7bf2d403b2@bidouilliste.com> From: Michael Hrabanek Date: Tue, 3 Oct 2017 13:27:47 +0200 Message-ID: Subject: Re: Allwinner H3 (NanoPi Neo): Getting PORTL (on /dev/gpioc1) to work To: Emmanuel Vadot , freebsd-arm@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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:27:50 -0000 Hello, any updates? If you'll need any testing done I'd be happy to help Cheers, Michael 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 >