From owner-freebsd-arm@freebsd.org Thu Nov 28 14:50:46 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2CEF1AC047 for ; Thu, 28 Nov 2019 14:50:46 +0000 (UTC) (envelope-from nikolay.kostirya@i11.co) Received: from mx.i11.co (mx.i11.co [159.69.78.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47P0tt0J0zz4fMT for ; Thu, 28 Nov 2019 14:50:45 +0000 (UTC) (envelope-from nikolay.kostirya@i11.co) Received: from [82.207.42.188] (helo=thinkpad) by mx.i11.co with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iaL80-0006sk-Ey; Thu, 28 Nov 2019 14:50:44 +0000 Date: Thu, 28 Nov 2019 16:50:42 +0200 From: Nick Kostirya To: Emmanuel Vadot Cc: Nick Kostirya via freebsd-arm Subject: Re: gpioiic FDT overlays for sun8i-h3 Message-ID: <20191128165042.71cbbfe4@thinkpad> In-Reply-To: <20191128062149.577be86eb7dc15ae5805f31a@bidouilliste.com> References: <20191128152901.39dbeb4d@thinkpad> <20191128062149.577be86eb7dc15ae5805f31a@bidouilliste.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i386-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47P0tt0J0zz4fMT X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.36 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[i11.co:s=omicron]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:159.69.78.69]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-1.86)[ip: (-9.04), ipnet: 159.69.0.0/16(1.32), asn: 24940(-1.58), country: DE(-0.01)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[i11.co:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[i11.co,reject]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:159.69.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 14:50:46 -0000 On Thu, 28 Nov 2019 06:21:49 +0100 Emmanuel Vadot wrote: > On Thu, 28 Nov 2019 15:29:01 +0200 > Nick Kostirya via freebsd-arm wrote: > > > Hello. > > I want use gpioiic on Nanopi NEO with PA0 and PA2 pins. > > Nanopi NEO will be master. > > Help me, please, to write overlay. ... > > I've never tested gpioiic but it seems that it needs to be a child of > the gpio controller as the busdev is get via device_get_parent. It also > doesn't seems to use a 'gpios' property, only scl/sda pin number, which > means that you can only use it on one gpio controller (i.e. you can't > have scl on one gpio controller and sda on another). > > Try this but I haven't even compiled it : > > /dts-v1/; > /plugin/; > > / { > compatible = "allwinner,sun8i-h3"; > }; > > &{/soc/pinctrl@1c20800} { > gpioiic0 { > compatible = "gpioiic"; > scl = <0>; /* GPIO pin 00 (PA0) */ > sda = <2>; /* GPIO pin 02 (PA2) */ > > }; > }; > > -- > Emmanuel Vadot # ofwdump -p /soc/pinctrl@1c20800/gpioiic0 Node 0x1ce4: gpioiic0 sda: 00 00 00 02 scl: 00 00 00 00 compatible: 67 70 69 6f 69 69 63 00 'gpioiic' # kldstat | grep iic 2 1 0xc0cab000 50ac gpioiic.ko 3 2 0xc0cb1000 6248 iicbb.ko But I do not see it in devinfo and /dev.