From owner-freebsd-arm@freebsd.org Fri Nov 29 16:23:40 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 4E2DB1B518A for ; Fri, 29 Nov 2019 16:23:40 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (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 47Pfvb67mRz44kL for ; Fri, 29 Nov 2019 16:23:39 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1575044618; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=KrJzc5eA+eYkP/L6AfUaNtrylP5+CDXSIq4PkdpmswPmvhqN/cellfLLlmp1+b0mNZ4kqeWXElKcz 41ewJW/xuX6gfQtaWOLXsUn85tmk4PBQ3KPH6O9o8pKZThJCgjJev+3w07GIaRMDxepUSD86hsfSUS 8/bFnG21VB55KolVR9CGKdreXvxkMZOY7Kdd7GokIxhWDq4BEl8w2nydAta76wqZ+mLcmQFXwrE7Df mhNzHutCpeeUb5EajhuAiw3TREIRVljVkIs4I06bkIbrS3UKdE1GqnyJ5UgS3mB1A8jQ58q1tKlz4f TuNQMwjY0PHWFjKiSGp9wqJkbpkAZYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=NHh0M21cCXmtuBik9nMpjEDdNQylUWn+qwdEvE2AEdQ=; b=hHURnVnkphFl9Y9UO2n45OkAe3gCXMHc+XeLgbe+C2UR0P2RhiPxEh1vY2W8N2jajNdEvBwhmcaab UxEjwnHr08BUpVPZvbS6au9SVTkTg+wBuPYky2lnFT4Ste9BX7ec2NFfOSu4kQpIopHH23oZTjMMdn Ed4lvUCnHo0+QrvS57Jx9u5omyB5+jierVmFFAreds7CWdQsRad+MbON4NHjlzV6zSowo14JOJ6iT0 I+Hp/MbWNgZaSgyTfF+Cu4MnR5q6E9lMcam0KFuIDjtoQKFK3PkfOC+Y/A+8gjH1QcDwugVqhfKe6t thzBe9gUroJw0ZAnJz5LVKRZmlZdSjw== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=NHh0M21cCXmtuBik9nMpjEDdNQylUWn+qwdEvE2AEdQ=; b=Fp6mhKDUPjx9hkrFw5vj32mVuQ+7mS/TIRhFYYVGlgjaog7aoW56RPKSTy1ZE4jOBwnogaG0tBv3A pBiXAlVexkHcwdHfbcaXNvSRn8bXcSd1LJgOhgbRGJm457znJDOntkO2bhHBsWS7CNAfkLoTKnc75W orvapnXOdjn7e8kRtH9xQ+vC1+9pHX6uYMdHVnhiPQLdxtffVOJG/SvzCra4nUuroozfbmg/vM0vTe VNNmI5nUdRKfuyCJCw+dTw6DmJse1hgX6XGYr/Mqk3tWbIwQmfwl4M85ILIP/2UA5QngbW5juBiPKN aMsn3uYUjHAMqc6uAHP/EwzQNc2LjpQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 95f6a63c-12c4-11ea-829e-79a40d15cccd X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 95f6a63c-12c4-11ea-829e-79a40d15cccd; Fri, 29 Nov 2019 16:23:36 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id xATGNVa7084654; Fri, 29 Nov 2019 09:23:31 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <0ce78262af1dd3b404b9a85a780933d7e11f008e.camel@freebsd.org> Subject: Re: gpioiic FDT overlays for sun8i-h3 From: Ian Lepore To: Emmanuel Vadot , Nick Kostirya Cc: Milan Obuch , freebsd-arm@freebsd.org Date: Fri, 29 Nov 2019 09:23:31 -0700 In-Reply-To: <20191129150944.67a2b723a6724c46f7559f96@bidouilliste.com> References: <20191128152901.39dbeb4d@thinkpad> <20191128062149.577be86eb7dc15ae5805f31a@bidouilliste.com> <20191129153754.28fb5763@thinkpad> <20191129144316.739c8664@zeta.dino.sk> <20191129155431.05d4e14f@thinkpad> <20191129150944.67a2b723a6724c46f7559f96@bidouilliste.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47Pfvb67mRz44kL X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.81 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.90)[-0.900,0]; NEURAL_HAM_LONG(-0.91)[-0.910,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] 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: Fri, 29 Nov 2019 16:23:40 -0000 On Fri, 2019-11-29 at 15:09 +0100, Emmanuel Vadot wrote: > On Fri, 29 Nov 2019 15:54:31 +0200 > Nick Kostirya wrote: > > > From: Nick Kostirya > > To: Milan Obuch > > 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 wrote: > > > > > On Fri, 29 Nov 2019 15:37:54 +0200 > > > Nick Kostirya via freebsd-arm wrote: > > > > > > > On Thu, 28 Nov 2019 06:21:49 +0100 > > > > Emmanuel Vadot 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