From owner-freebsd-arm@freebsd.org Tue Oct 15 11:18: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 767C715BB76 for ; Tue, 15 Oct 2019 11:18:46 +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 46stGY46cCz44QT for ; Tue, 15 Oct 2019 11:18:44 +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 fd7e0a0a; Tue, 15 Oct 2019 13:18:43 +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=yAAYHhL0VGhud6tj8jxZxaK8Kqg=; b=sf/WSpHZpB4g4Ue46UcsA8+Ev550 5Y9ANZ5n5027sdEH2t6DIiNdVGMa2rlQItr68r4I4KaFJJPfXPJ8+8B7loFXt2Ql sFU/Be8gLx10NHxirxE46iZTLv3aA7RLMF9WAfFmI8HaHEU+QtpvRm2SKUV3v5pe Bg+hB1WN2zGHAsM= 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=cNUK4jGb0oGT3iD3NiAnJT0RX3RG6E+qLyZwEA+bkq/DWa26MKtIwvBr +Wv0+Zkqn8b8sR+mkFNZD4MJ9x7CT/qRB6UsKbuJjQn8J5BTG7PGX6EmiQtfZ3i0 5rkCiVI7Fgk8MJXkXFB1bDahgU3G8rjG0EXeFiENf/GHfr57afQ= Received: from sonic.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 0ad0f53a TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Tue, 15 Oct 2019 13:18:43 +0200 (CEST) Date: Tue, 15 Oct 2019 13:18:42 +0200 From: Emmanuel Vadot To: Gary Otten Cc: freebsd-arm@freebsd.org Subject: Re: GPIO on Olimex A64 board. Bank E not working. Message-Id: <20191015131842.370e113b9f494ead760b9b6f@bidouilliste.com> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46stGY46cCz44QT X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mail header.b=sf/WSpHZ; dmarc=none; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.177.182 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-1.33 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mail]; NEURAL_HAM_MEDIUM(-0.81)[-0.810,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.83.177.182/32]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bidouilliste.com]; NEURAL_HAM_LONG(-1.00)[-0.995,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.38)[ip: (-0.68), ipnet: 212.83.160.0/19(2.46), asn: 12876(0.11), country: FR(-0.00)]; ASN(0.00)[asn:12876, ipnet:212.83.160.0/19, country:FR]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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: Tue, 15 Oct 2019 11:18:46 -0000 Hi Gary, On Mon, 14 Oct 2019 14:46:12 -0400 Gary Otten wrote: > I have successfully booted the FreeBSD on the Olimex board which has the > Allwinner A64. I have been experimenting with the gpios, again with > success. However the 40 pin connector on the Olimex board exposes GPIO pins > PB0 - PB4 which function normally (voltage corresponds to software setting > for that pin) and then PE0-PE17 which don't. I have played with most > of the PE0- PE17 pins with various settings, again nothing works, no signs > of activity. I have successfully lit the LED (PE17) with the armbian > (linux) distribution for this board so I know it should work. > > Example > gpioctl -f /dev/gpioc0 -c PB0 OUT > gpioctl -f /dev/gpioc0 PB0 1 > > The pin PB0 then goes high (1) as expected. > > gpioctl -f /dev/gpioc0 -c PE17 OUT > gpioctl -f /dev/gpioc0 PE17 1 > > No activity on PE17 > > > I have dug into the the driver code a bit and the files containing the > settings for this board/processor, but I have had no luck figuring it out. > I have studied the Allwinner a64 manual but I haven't had luck figuring > out any other settings that might work. I think I am missing a simple > setting but can't figure it out, does anyone know how to get pins PE0 to > PE17 to work? Thanks. What version of FreeBSD are you booting on this board ? PE is a bit special on the Olinuxino as it's also used for MIPI-CSI and it's drived at 2.8V by default. It's using the regulator ALDO1 from the AXP PMIC and you should be able to confirm that it's enabled by doing sysctl hw.regulator.vcc-pe Check for the .enable sysctl It should be on as there is the always-on property in the DTS. By default I think that the gpio pins are configured for 20mA so I don't know if it would be enough for this led. If you have a multimeter it would be good to confirm if you have any voltage on the ext connector (you can use any PE pins, from what I see from the schematics they are all safe to play with). -- Emmanuel Vadot