Hello!
I work linux-3.18 from Freescale/linux-fslc · GitHub on custom board with iMX287 CPU.
USB schema:
Pin | Pad |
---|---|
USB0_ID | J5 |
USB0_D_P | B10 |
USB0_D_M | A10 |
USB0_OVERCURRENT | K5 |
USB1_D_M | B8 |
USB1_D_P | A8 |
USB1_OVERCURRENT | K8 |
DTS-file:
ahb@80080000 {
usb0: usb@80080000 {
pinctrl-names = "default";
pinctrl-0 = <&usb0_id_pins_a>;
vbus-supply = <®_usb0_vbus>;
status = "okay";
};
usb1: usb@80090000 {
vbus-supply = <®_usb1_vbus>;
status = "okay";
};
};
regulators {
compatible = "simple-bus";
reg_usb0_vbus: usb0_vbus {
compatible = "regulator-fixed";
regulator-name = "usb0_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
reg_usb1_vbus: usb1_vbus {
compatible = "regulator-fixed";
regulator-name = "usb1_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
dmesg output:
~ # dmesg | grep usb
[ 0.708009] usb0_vbus: 5000 mV
[ 0.713149] usb1_vbus: 5000 mV
[ 1.653267] usb1_vbus: disabling
[ 1.656738] usb0_vbus: disabling
Bacause USB is disabled problem in configuration and I not understand gpio configuration in usb_vbus.
Can you help me?
Thank you and excuse my bad english.
Problem solved, right way - enable CONFIG_USB_CHIPIDEA in linux.
Ok, I understang GPIO configuration:
USB0 power is LCS_RD pin, USB1 - LCD_CS.
pinctrl@80018000 {
pinctrl-names = "default";
pinctrl-0 = <&hog_pins_a>;
hog_pins_a: hog@0 {
reg = <0>;
fsl,pinmux-ids = <
// 0x31e3 /* Relay1 */
// 0x1193 /* Relay2 */
0x40d3 /* FEC RESET */
0x11B3 /* USB1 PWR */
0x1183 /* USB0 PWR */
>;
fsl,drive-strength = <0>;
fsl,voltage = <1>;
fsl,pull-up = <0>;
};
#define MX28_PAD_LCD_RD_E__GPIO_1_24 0x1183 | ||
|
But why USB is disabled?
Hi Kirill
do you have 5V applied to i.MX28 VDD5V pad ?
Best regards
igor
I think yes, because with linux-2.6.35 all work.
I add regulator-always-on in description and this solve problem, now dmesg not contained usb1_vbus: disabling.
But after conect device to USB port I not see messages about this, system not register new USB device.