@frank-w thanks for the help - is your copy of the schematic publicly available?
Using GPIO32 as the reset makes sense as avoids the push button conflict.
I see you authored the upstream Linux DTS file for the board, so I would like to coordinate a few fixes with you to get patched. I am still learning about the process for submitting fixes.
The fixes I have made so far:
uart0
There is no default pin group, so I added:
&pio {
...
uart0_pins: uart0-pins {
mux {
function = "uart";
groups = "uart0";
};
};
...
};
...
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
status = "okay";
};
uart1
The RTS CTS pins for UART1 are available on the CON1 header but are not in the pin group, so I changed from “uart1_rx_tx” to “uart1” group which includes RTS/CTS pins:
&pio {
...
uart1_pins: uart1-pins {
mux {
function = "uart";
groups = "uart1";
};
};
...
};
pcie:
The pin group “pcie_clk” has a conflict between PCIE_CLK_REQ and GPIO9 for reset-key device, so I removed the “pcie_clk” pin group:
&pio {
...
pcie_pins: pcie-pins {
mux {
function = "pcie";
groups = "pcie_pereset";
};
};
...
};
This fixes a kernel boot log error:
[ 3.741529] mt7986a-pinctrl 1001f000.pinctrl: pin GPIO_4 already requested by pinctrl_moore:521; cannot claim for 11280000.pcie
[ 3.753137] mt7986a-pinctrl 1001f000.pinctrl: pin-9 (11280000.pcie) status -22
which was preventing the pcie driver from loading.
ssusb:
The required voltage regulator supply entries were missing, so I added a fixed 3.3V and 5V regulator:
/ {
...
reg_5v: regulator-5v {
compatible = "regulator-fixed";
regulator-name = "5vd";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-boot-on;
regulator-always-on;
vin-supply = <&dcin>;
};
...
};
...
&ssusb {
status = "okay";
vbus-supply = <®_5v>;
vusb33-supply = <®_3p3v>;
};
This fixes a kernel log warning:
[ 3.836017] xhci-mtk 11200000.usb: supply vbus not found, using dummy regulator
[ 3.843721] xhci-mtk 11200000.usb: supply vusb33 not found, using dummy regulator
The schematic shows the USB 3 socket and USB 2 pin header each have their own 5V regulator coming off the main 5V regulator, but seems unnecessary to add that detail as all the regulators are always on and don’t have an enable GPIO.
There are a few other changes I am considering but I need to do more testing:
Add a gpio-decoder device for the boot mode DIP switch 2 bits - this will occupy GPIO5 and GPIO6 which will help detect future conflicts and provide a convenient way to check the switch position.
Add an audio device (which now has in-tree drivers) and hook up pin groups for the CON1 PCM pins - this could be an overlay file. I have ordered an audio codec breakout board to test this.
Add the SNFI/SNAND device. This is not populated on the board I have so might need to leave it as disabled, and use this as documentation of the pin connections. Though without populating the chip I can’t test this so perhaps that won’t be allowed in the Linux tree.