From owner-freebsd-arm@freebsd.org Tue Oct 15 15:54:06 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 496A614B817 for ; Tue, 15 Oct 2019 15:54:06 +0000 (UTC) (envelope-from gdotten@gmail.com) Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46t0NF48VLz4PhD for ; Tue, 15 Oct 2019 15:54:05 +0000 (UTC) (envelope-from gdotten@gmail.com) Received: by mail-qk1-x730.google.com with SMTP id 201so19616335qkd.13 for ; Tue, 15 Oct 2019 08:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TlNMmFt+sbEp78wYGJY/WDHqwP5X03DpJ6lXcedbY24=; b=eZ1d8hM7D3ZQQyuSqoS9TqgAmlk6sncnGXWUwTUOwYXzZciUq707JCbpx+wydgvg6V 5/xHtQwESsq25CMkrQ48cIKKgzYfg96X/BHypReTVY8ctcxjtU4im/VoTYUqn6UM6u/o C/7MPcYq9dSsPl3pphk2o4Ic6bM90Pg7t/9QKf6fHZElmUyvWVt4YRWvjKcgTdIcSHOC MCdmDFkbtpdcdBL8RHvccI/dRJCyvqKPcS3XNt0Jaxaq1Lm5NfD/FzyhXKF0JxpXO6Ws ASVSW6e/BfA+ChQdnpq43cnZn2m3U4QSC3oXY3GYxWiU/IVR6La9n0q3ZTWmeHYZW+/K HgyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TlNMmFt+sbEp78wYGJY/WDHqwP5X03DpJ6lXcedbY24=; b=I15VuRvw+AzLEAYwnvi91fC+iwJXg6SSjPqZS6YBOCNFrORAvbzJTAZCUTf7AYYjgR qsC9/JH3V84vomkOILeo4gJ3O0gdTuNi8o39SOqepEZDhFh7GUmaicNZCDKr9A4QzVLA YzQcIW8KV8DzexjsX38KCpVhINVe2BxKs5oiZIFEFe4aisuLeB+LiPwSYNWaUHjKIPR1 UNcnAqf+UH0nWe1Ws8vtR10xzGU3OVmFm8os1BNB2iXkkdUEbHrba9GSyBLD6mP867kL aPAoUx3W8SkBBi9dP9UX9VvgFsJKW8DcZzL/qgXyFuUr+b/3Vm8vL8XGWKdljcMHjBI1 mGvw== X-Gm-Message-State: APjAAAXu2Oe/DXoMhjEHIuCRB7NUr9yoL3KdETEAhNIFBIwXI8MLFmXP d2d9DI/yX2Xug3gHwdQ4Xqc5kWn9IzRlzBGSVvVxBB7q X-Google-Smtp-Source: APXvYqxAjYoQzVUiujM0RRazoUE3MeERG0fZCTbti2jxeBV4ZO2f98VtqkvNul/hg0Wwhkfs0CFP59gLG0YsAqYs/Wg= X-Received: by 2002:ae9:ed57:: with SMTP id c84mr35355134qkg.426.1571154844318; Tue, 15 Oct 2019 08:54:04 -0700 (PDT) MIME-Version: 1.0 References: <20191015131842.370e113b9f494ead760b9b6f@bidouilliste.com> In-Reply-To: <20191015131842.370e113b9f494ead760b9b6f@bidouilliste.com> From: Gary Otten Date: Tue, 15 Oct 2019 11:46:14 -0400 Message-ID: Subject: Re: GPIO on Olimex A64 board. Bank E not working. To: Emmanuel Vadot Cc: freebsd-arm@freebsd.org X-Rspamd-Queue-Id: 46t0NF48VLz4PhD X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=eZ1d8hM7; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gdotten@gmail.com designates 2607:f8b0:4864:20::730 as permitted sender) smtp.mailfrom=gdotten@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[0.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; IP_SCORE(0.00)[ip: (-9.37), ipnet: 2607:f8b0::/32(-2.48), asn: 15169(-2.10), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 15:54:06 -0000 Thanks for your response. Freebsd Version 12.0-STABLE root@:/dev # sysctl hw.regulator.vcc-pe hw.regulator.vcc-pe.uvolt: 2800000 hw.regulator.vcc-pe.always_on: 1 hw.regulator.vcc-pe.boot_on: 0 hw.regulator.vcc-pe.enable_cnt: 0 hw.regulator.vcc-pe.enable_delay: 0 hw.regulator.vcc-pe.ramp_delay: 0 hw.regulator.vcc-pe.max_uamp: 0 hw.regulator.vcc-pe.min_uamp: 0 hw.regulator.vcc-pe.max_uvolt: 2800000 hw.regulator.vcc-pe.min_uvolt: 2800000 Yes I am testing the pins with a multimeter, I am not seeing any voltage swings at all on Port E. On the external connector I see 5V on pin 1, 3.3 on pin 3 and the correct voltage( software setting) on the other pins, except bank E. PB0-PB4 voltage corresponds to software setting. PC4,PC7 voltage corresponds to software setting. PE0-PE17 no voltage swings, doesn't work. PL7-PL12 voltage corresponds to software setting. I don't know if it will help, but if I make output on a pin low, still when I switch the that pin from In to out, , I see a small voltage swing in the milli volt range, but when I switch the PE pins from in to out, I don't see that small swing. Its as if they is no software connection to the PE pins. On Tue, Oct 15, 2019 at 7:18 AM Emmanuel Vadot wrote: > > 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 >