I've made progress on adding support to the Netgear EX6200v2, and thankfully got DSA working & worked out some LED issues I was having.
The last issue I'm working on resolving is getting the USB port to work. I've traced it to a power issue and confirmed the GPIO of interest; if I turn on the GPIO manually using the code below I can mount a USB drive no problem.
root@OpenWrt_Backyard:~# ls -la /dev/sd*
ls: /dev/sd*: No such file or directory
root@OpenWrt_Backyard:~# cd /sys/class/gpio
root@OpenWrt_Backyard:/sys/class/gpio# GPIO=415
root@OpenWrt_Backyard:/sys/class/gpio# echo $GPIO > export
root@OpenWrt_Backyard:/sys/class/gpio# echo "out" > gpio$GPIO/direction
root@OpenWrt_Backyard:/sys/class/gpio# echo 1 > gpio$GPIO/value
root@OpenWrt_Backyard:/sys/class/gpio# ls -la /dev/sd*
brw------- 1 root root 8, 0 Dec 13 23:30 /dev/sda
brw------- 1 root root 8, 1 Dec 13 23:30 /dev/sda1
I've tried to set the DTS to set that gpio to high on boot by adding the following, but it doesn't seem to do the trick.
For the record the GPIO is 415 but I've also tried implementing with setting the GPIO to 11 (415 minus the base GPIO which is 404 for some reason? this is also what I did to get LEDs working)
I suspect it's because this GPIO is part of another gpiochip, gpiochip412 per below output?
root@OpenWrt_Backyard:/sys/class/gpio# ls
export gpio415 gpiochip404 gpiochip412 unexport
I did see another post where this question was asked a few years ago but my output to 'cat /sys/kernel/debug/gpio' looks a little different (specifically the parent) and I'm unsure how to define this in DTS to properly set GPIO 415
root@OpenWrt_Backyard:/sys/class/gpio# cat /sys/kernel/debug/gpio
gpiochip1: GPIOs 404-411, parent: spi/spi2.0, 74hc595, can sleep:
gpio-404 ( |green:usb ) out hi ACTIVE LOW
gpio-405 ( |green:wlan5g ) out lo ACTIVE LOW
gpio-406 ( |red:wlan5g ) out hi ACTIVE LOW
gpio-407 ( |green:wlan2g ) out hi ACTIVE LOW
gpio-408 ( |red:wlan2g ) out hi ACTIVE LOW
gpio-409 ( |green:power ) out lo ACTIVE LOW
gpio-410 ( |amber:power ) out hi ACTIVE LOW
gpiochip0: GPIOs 412-511, parent: platform/1000000.pinctrl, 1000000.pinctrl:
gpio0 : in high func0 4mA pull up
gpio1 : in high func0 2mA pull up
gpio2 : in high func0 2mA pull up
gpio3 : out high func0 2mA no pull
gpio4 : out high func0 4mA pull up
gpio5 : out low func0 4mA pull up
Entire DTS pasted below, I'm not sure how to answer your second question but it seems the LED GPIO are under HC595, so I'd think the one for USB power is under an SOC provided?