From owner-freebsd-arm@freebsd.org Tue Aug 1 11:37:23 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 2BD8CDD1511 for ; Tue, 1 Aug 2017 11:37:23 +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 8A3D772DC7; Tue, 1 Aug 2017 11:37:21 +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 a6f6979f; Tue, 1 Aug 2017 13:37:18 +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=kenn4y6gasyBzzP53UZ80oN9dZA=; b=FkeqOlkojkUUnGCQapUKrqhYFFW6 ciKNpeawDi86pSszyPIT97hfQamt+yhh1EMNqpbDp2zYrtsef+slYHPMBD+vBq6r dygSr23LXiGrzaNx/kgbiFb0a1Io3geRYWUpGisQlasG+fh4X4G58pHzk2ltR66y SsQ1q4A9lceSTgI= 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=ONiyR0DPCzC14aEk/hRnihzcAg1XbTmR9tjnxBYIccuFCPt8t1HBKcHw cyYcwy3ZAkYerpRDNkO0bQ7VZjsSQh5snzLikKqe6NiG4TQjJ5r2f9OyiVs18+nz hOqUEB1IGtYtT5fc6lMIN6UhvTWWwDHdCq9nmEJL8VmmMUBqlus= Received: from arcadia (evadot.gandi.net [217.70.181.36]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 899564a2 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 1 Aug 2017 13:37:18 +0200 (CEST) Date: Tue, 1 Aug 2017 13:37:15 +0200 From: Emmanuel Vadot To: Milan Obuch Cc: Dustin Marquess , freebsd-arm@freebsd.org, Ian Lepore Subject: Re: Allwinner GPIO IRQ? Message-Id: <20170801133715.57e7eea10c18ddafcad3006e@bidouilliste.com> In-Reply-To: <20170801125024.4d38b893@zeta.dino.sk> References: <1501537511.90400.116.camel@freebsd.org> <20170801081921.0f9224bea088b8f58140ab9d@bidouilliste.com> <20170801125024.4d38b893@zeta.dino.sk> 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, 01 Aug 2017 11:37:23 -0000 On Tue, 1 Aug 2017 12:50:24 +0200 Milan Obuch wrote: > On Tue, 1 Aug 2017 08:19:21 +0200 > Emmanuel Vadot wrote: > > > On Mon, 31 Jul 2017 17:22:11 -0500 > > Dustin Marquess wrote: > > > > > Ian, > > > > > > Thanks for the confirmation! I'm not exactly a kernel-level dev, > > > so I was just pretty much guessing and poking around :). > > > > > > Thanks! > > > -Dustin > > > > > > > As Ian said the controller driver doesn't support interrupts, this > > would be easy to add but I have too much stuff to do so if someone > > want to work on this I'll be very happy. > > > > [ snip ] > > I am interested in this, too, as I am just starting to try a gpiopps... > > > > > From a quick glance at the docs, it looks like only 32 of the > > > > pins on allwinner can be configured as interrupt sources, but it > > > > doesn't look like our code is ready to do that at all (I don't > > > > see any pins in the padconf tables that have "irq" as one of > > > > their choices). > > > > Yes, not all pins can be interrupts sources. > > I've added for most of the padconf information on which pins can do > > it (see > > https://svnweb.freebsd.org/base/head/sys/arm/allwinner/a20/a20_padconf.c?revision=310117&view=markup#l104 > > for example). > > They are named eint like in the datasheet and linux (so a dts that > > would reference them on linux would work for us). > > > > From a quick glance over this file I see there are both PC19 and PH10 > marked as eint12 - is it OK? Similarly PC20 and PH11, PC21 and PH12, > PC22 and PH13. Also, Pins PI10 to PI19 are marked with eint. I did not > try to read a datasheet, yet, so this could be dumb question, but > still, I would like to know the reason... See http://dl.linux-sunxi.org/A20/A20%20User%20Manual%202013-03-22.pdf Multiple pins have the same function, depending on pinmuxing. I could have made a mistake (it happened before as I "parse" the datasheet manually) but here it's correct :) > Anyway, as I am working with Orange Pi boards, I think this is not > relevant for me, I am looking in h3_padconf.c and h3_r_padconf.c, it > looks like all pins from PA, PG and PL blocks are usable as interrupt > source... and I see no such double usage here. > > Regards, > Milan Different SoC, different pinmux setting :) -- Emmanuel Vadot