Date: Tue, 15 Oct 2019 11:46:14 -0400 From: Gary Otten <gdotten@gmail.com> To: Emmanuel Vadot <manu@bidouilliste.com> Cc: freebsd-arm@freebsd.org Subject: Re: GPIO on Olimex A64 board. Bank E not working. Message-ID: <CABZQu%2BgNj10BPm7XDeHakKvHJ7vWTMUBo=xUudEwoSGMqc2Xzw@mail.gmail.com> In-Reply-To: <20191015131842.370e113b9f494ead760b9b6f@bidouilliste.com> References: <CABZQu%2Bg%2BtixWWM=nZevrLG4nvdaoTySTHJpfknMff51iWw9Gig@mail.gmail.com> <20191015131842.370e113b9f494ead760b9b6f@bidouilliste.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <manu@bidouilliste.com> wrote: > > Hi Gary, > > On Mon, 14 Oct 2019 14:46:12 -0400 > Gary Otten <gdotten@gmail.com> 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 <manu@bidouilliste.com> >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABZQu%2BgNj10BPm7XDeHakKvHJ7vWTMUBo=xUudEwoSGMqc2Xzw>