From owner-freebsd-arm@freebsd.org Tue Sep 19 07:45:25 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 59535E02565 for ; Tue, 19 Sep 2017 07:45:25 +0000 (UTC) (envelope-from hrabanek@gmail.com) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (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 E06C36F0AA for ; Tue, 19 Sep 2017 07:45:24 +0000 (UTC) (envelope-from hrabanek@gmail.com) Received: by mail-wm0-x231.google.com with SMTP id i189so2626125wmf.1 for ; Tue, 19 Sep 2017 00:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=tsYSRsGvC3ZCe8RTtuB+sLmGk7lzEcz5poBDvhp1t4o=; b=LHapkv6WCJbHbOEuO0ZyFryLNJAs1/0X7LJOuBWBNaTWH2xMRXS9XzIKBwGgvMJ6Xy pU1hoT3g6xDqPfrMmP7ZBub/8vQML6pqTaxhk+PBYRDAY8u34/lNuyw/xEXkuyonIlYO 2KHAzvsvN0eu7tKZuwwfL5CxJaAx0LGv3pD5g28a9LNzs4Cg0z7nJmDM88QBk3wVZQ5U 2n2/Aum5brBxJu0Ngw/U5GDiPeSIrrPsLv5j9W0IQazAQJyp6YikjR4SH3uNIGmU2Bbj kmdG1iQfbl/QkoFE34XdnDVoGRzApxKoI8p1tUQpTLo4MK3lGQX42SGrlq0cDeX8GtPh IFXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=tsYSRsGvC3ZCe8RTtuB+sLmGk7lzEcz5poBDvhp1t4o=; b=gdSWp1dzUUJfzPJQhR6Qe5JAjeelxv8byOO5tJiUGT/eG6FQjjcotFnGfeB0c3eeDy xAN3beaVsuejP9TKwM/w/XKf8A3yijgNOHmXB+KaRR/TwmOHfCn9Gwj7OC7ovx6bEeIC WGfDw3DM2ZqbQ4l/Bvm1cTYXeUeHL9KWKCV+cG7y0o1mRPhmP5hsMp4DWfaMJmFGK6Vt o1i+ANrGqxK8ycYV9inAtRrIHDXe7x/ZGTSkW9TaTfQ553/oqy0mumvJjCWbgSXnLJzx 8GS3R7qbxbBpWn6yEerU3UTubO6lNFOmvCHfl4hsBNgr6qEv90E+d64Ae3vWvvHz3jKd wLtA== X-Gm-Message-State: AHPjjUha5Q3so9q04J5Y6hvSDNwFcY8r4kzhbLNZIO4GytT865LYS9Qc H4YVsT7MUdx8ujrraJ5PPCFa0ip/W1F45zAXL3h01z2a X-Google-Smtp-Source: AOwi7QBKyhYXb0ICbFDAT4jSqYkCuQ63eglHGxLj3gR6NPH89WK7ci7XnEeMUT1ilebIXYCYnkoSdEMNdrcxClU7+nk= X-Received: by 10.80.144.242 with SMTP id d47mr833299eda.79.1505807122653; Tue, 19 Sep 2017 00:45:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.183.36 with HTTP; Tue, 19 Sep 2017 00:45:22 -0700 (PDT) From: Michael Hrabanek Date: Tue, 19 Sep 2017 09:45:22 +0200 Message-ID: Subject: Allwinner H3 (NanoPi Neo): Getting PORTL (on /dev/gpioc1) to work To: 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, 19 Sep 2017 07:45:25 -0000 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