Date: Fri, 29 Nov 2019 20:12:44 +0200 From: Nick Kostirya <nikolay.kostirya@i11.co> To: Ian Lepore <ian@freebsd.org> Cc: Emmanuel Vadot <manu@bidouilliste.com>, Milan Obuch <milan@obuch.sk>, freebsd-arm@freebsd.org Subject: Re: gpioiic FDT overlays for sun8i-h3 Message-ID: <20191129201244.0bc85b09@thinkpad> In-Reply-To: <0ce78262af1dd3b404b9a85a780933d7e11f008e.camel@freebsd.org> References: <20191128152901.39dbeb4d@thinkpad> <20191128062149.577be86eb7dc15ae5805f31a@bidouilliste.com> <20191129153754.28fb5763@thinkpad> <20191129144316.739c8664@zeta.dino.sk> <20191129155431.05d4e14f@thinkpad> <20191129150944.67a2b723a6724c46f7559f96@bidouilliste.com> <0ce78262af1dd3b404b9a85a780933d7e11f008e.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 29 Nov 2019 09:23:31 -0700 Ian Lepore <ian@freebsd.org> wrote: > On Fri, 2019-11-29 at 15:09 +0100, Emmanuel Vadot wrote: > > On Fri, 29 Nov 2019 15:54:31 +0200 > > Nick Kostirya <nikolay.kostirya@i11.co> wrote: > > > > > From: Nick Kostirya <nikolay.kostirya@i11.co> > > > To: Milan Obuch <milan@obuch.sk> > > > Subject: Re: gpioiic FDT overlays for sun8i-h3 > > > Date: Fri, 29 Nov 2019 15:53:05 +0200 > > > X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i386-portbld-freebsd12.0) > > > > > > On Fri, 29 Nov 2019 14:43:16 +0100 > > > Milan Obuch <milan@obuch.sk> wrote: > > > > > > > On Fri, 29 Nov 2019 15:37:54 +0200 > > > > Nick Kostirya via freebsd-arm <freebsd-arm@freebsd.org> wrote: > > > > > > > > > On Thu, 28 Nov 2019 06:21:49 +0100 > > > > > Emmanuel Vadot <manu@bidouilliste.com> wrote: > > > > > > > > > > > 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) */ > > > > > > > > > > > > }; > > > > > > }; > > > > > > > > > > Maybe I must rebuild all u-boot with this overlay? > > > > > > > > > > Because the overlay do not help when it is in /boot/dtb/overlays/ and > > > > > /boot/msdos/dtb/overlays/. > > > > > > > > > > > > > Did you add in /boot/loader.conf line like > > > > > > > > fdt_overlays="gpioiic" > > > > > > Yes. > > > I have > > > fdt_overlays="sun8i-h3-sid,sun8i-h3-ths,sun8i-h3-opp,sun8i-h3-gpio-iic0" > > > > > > where sun8i-h3-gpio-iic0 if gpioiic overlay. > > > > > > I see gpioiic in ofwdump -a output. > > > > Which means that the overlays was applied. > > I've spent a few hours yesterday to find how to use this module and > > the result is we can't. The reason is that the driver is at an higher > > bus pass number than the parent (gpiobus) so the driver isn't probed > > and is removed from the child list of gpiobus, meaning that it's never > > added later. > > ian@ and I agreed that it the driver would need to be rewritten > > because of this and because you cannot use gpio from different banks as > > it needs to be a children of one gpio controller. > > So the TLDR is : right now this driver is useless (at least on FDT > > system). > > I am working on this, though. I'm thinking we should have something > usable later today, or at worst by the end of the weekend if it turns > complicated. > > -- Ian Thank you very match!!! I hope the new driver can be used in FreeBSD 12. Nick.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191129201244.0bc85b09>