Hi,

On Wednesday, 04.04.2018 at 14:07, Andre Przywara wrote:
> Ah, interesting, but would make some sense: PG9 is pulled high on the
> board, so you have to actively drive it *low* to *disable* the power.
> Do you have some nodes for the WiFi/BT module in the DT? The UART1 CTS
> is also on PG9, and we bundle it with the RTS pin in one group. RTS is
> used by the BT module, but CTS is not.
> So as soon as we initialise UART1, we might accidentally pull that line
> low and disable USB power.

I've since upgraded to mainline v4.16.0 with the DT changes from your
olinuxino Github branch, plus the additional change adding dr_mode = "otg" to 
the
&usb_otg node. In the DT [1] there are some nodes referring to
"wifi_pwrseq" (L61, L117), a "wifi@1" (L122) and a "vcc-wifi-io" (L225). I
don't understand enough of the syntax to know if these are what you're
asking about?

[1]
https://github.com/apritzel/linux/blob/f1827ce503ca19e6873847128f86849788cfc7db/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts

For reference, I've uploaded a full dmesg of this kernel booting, here:
https://gist.github.com/mato/96bfaf3a99a824024c0f27e76d99bc63


> Ah, yes, you need CONFIG_GPIO_SYSFS in your .config. You can use any
> other userland tool to manipulate GPIOs, though.
> You may also try to use U-Boot's "gpio" command, though I am not sure
> that works on the A64 at the moment. Possibly today's sunxi/master
> U-Boot branch would fix this.

Adding CONFIG_GPIO_SYSFS gives me the sysfs directory, but the "export"
does not work:

root@olinuxino:/# cd /sys/class/gpio
root@olinuxino:/sys/class/gpio# ls -l
total 0
--w------- 1 root root 4096 Nov  3 17:17 export
lrwxrwxrwx 1 root root    0 Nov  3 17:16 gpiochip0 -> 
../../devices/platform/soc/1c20800.pinctrl/gpio/gpiochip0
lrwxrwxrwx 1 root root    0 Nov  3 17:16 gpiochip352 -> 
../../devices/platform/soc/1f02c00.pinctrl/gpio/gpiochip352
--w------- 1 root root 4096 Nov  3 17:16 unexport
root@olinuxino:/sys/class/gpio# echo 201 > export
-bash: echo: write error: Device or resource busy

Cheers,

-mato

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to