Hi,
Custom board using Octavo Systems OSD3358-basic based upon Beaglebone Black. My design has two ethernet PHYs connected in RMII mode.
Referring to USB document https://octavosystems.com/app_notes/osd335x-design-tutorial/osd335x-lesson-2-minimal-linux-boot/osd335x-lesson-2-usb-circuitry/
The active low Over Current output of the Power Switch (pin 5 of the TPS2501 attached to the USB1_OCN signal in Figure 1) can be connected to any of the GPIOs of the OSD335x as shown in Figure 3 (GPMC_A10 pin is chosen in this case) to detect issues with USB Client devices trying to draw more power than allowed.
The BBB and the app note has USB1_OCn output pad T16 (mode 0, GPMC_A10, gpio1-26).
However in my design, PHY2 is connected to pad T16 (mode3, GPMC_A10.RMII2_RXD1, gpio1-26).
The app note states that ‘any’ GPIO can be attached to USB1_OCn. I have pad V5 (mode 3, LCD_PCLK.GPMC_A10, gpio2-24) available.
I have many questions.
USB subsystem questions,
Does the USB subsystem have to specificly use GPMC_A10?
Does it have to use GPMC_A10 or can it use any open GPMC?
Does it have to use a GPMC or can it use any open GPIO?
If any GPIO, Is the GPIO line an input or output?
Device tree questions,
snippets from am33xx.dtsi device tree file
gpio1: gpio@4804c000 {
compatible = "ti,omap4-gpio";
ti,hwmods = "gpio2";
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
reg = <0x4804c000 0x1000>;
interrupts = <98>;
gpio-line-names =
"GPMC_A10", // 26
};
usb1_phy: usb-phy@47401b00 {
compatible = "ti,am335x-usb-phy";
reg = <0x47401b00 0x100>;
reg-names = "phy";
status = "disabled";
ti,ctrl_mod = <&usb_ctrl_mod>;
#phy-cells = <0>;
};
usb1: usb@47401800 {
compatible = "ti,musb-am33xx";
status = "disabled";
reg = <0x47401c00 0x400
0x47401800 0x200>;
reg-names = "mc", "control";
interrupts = <19>;
interrupt-names = "mc";
dr_mode = "otg";
mentor,multipoint = <1>;
mentor,num-eps = <16>;
mentor,ram-bits = <12>;
mentor,power = <500>;
phys = <&usb1_phy>;
dmas = <&cppi41dma 15 0 &cppi41dma 16 0
&cppi41dma 17 0 &cppi41dma 18 0
&cppi41dma 19 0 &cppi41dma 20 0
&cppi41dma 21 0 &cppi41dma 22 0
&cppi41dma 23 0 &cppi41dma 24 0
&cppi41dma 25 0 &cppi41dma 26 0
&cppi41dma 27 0 &cppi41dma 28 0
&cppi41dma 29 0 &cppi41dma 15 1
&cppi41dma 16 1 &cppi41dma 17 1
&cppi41dma 18 1 &cppi41dma 19 1
&cppi41dma 20 1 &cppi41dma 21 1
&cppi41dma 22 1 &cppi41dma 23 1
&cppi41dma 24 1 &cppi41dma 25 1
&cppi41dma 26 1 &cppi41dma 27 1
&cppi41dma 28 1 &cppi41dma 29 1>;
dma-names =
"rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
"rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
"rx14", "rx15",
"tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
"tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
"tx14", "tx15";
};
Which setting in the am33xx.dtsi (or other) file configures the USB subsystem to use GPMC_A10 (gpio1-26) as the USB1_OCn signal?
If pad V5 (gpio2-24 or any other unused GPIO) is used instead of pad T16, what setting(s) in the device tree require changes to configure the USB subsystem to use the new instead of T16 gpio1-26?
Is the new line pinmux configured as input or output?
How and where is the pinmux defined?
Is there a way to temporary disable USB subsystem from checking for a Over Current event?
I apologize for the number of questions asked.
Thank you in advance for your answers/suggestions.