drivers: usb: add support for USB OTG FS on STM32F2
Add support for usbotg_fs, by adding the DT fixup, pinmux macros, and the DT entries in stm32f2.dtsi. Signed-off-by: Istvan Bisz <istvan.bisz@t-online.hu>
This commit is contained in:
parent
95b64fb776
commit
ea9d4a79c9
4 changed files with 24 additions and 1 deletions
|
@ -38,4 +38,10 @@
|
|||
#define CONFIG_UART_STM32_UART_5_IRQ_PRI ST_STM32_UART_40005000_IRQ_0_PRIORITY
|
||||
#define UART_5_IRQ ST_STM32_UART_40005000_IRQ_0
|
||||
|
||||
#define CONFIG_USB_BASE_ADDRESS ST_STM32_OTGFS_50000000_BASE_ADDRESS
|
||||
#define CONFIG_USB_IRQ ST_STM32_OTGFS_50000000_IRQ_OTGFS
|
||||
#define CONFIG_USB_IRQ_PRI ST_STM32_OTGFS_50000000_IRQ_OTGFS_PRIORITY
|
||||
#define CONFIG_USB_NUM_BIDIR_ENDPOINTS ST_STM32_OTGFS_50000000_NUM_BIDIR_ENDPOINTS
|
||||
#define CONFIG_USB_RAM_SIZE ST_STM32_OTGFS_50000000_RAM_SIZE
|
||||
|
||||
/* End of SoC Level DTS fixup file */
|
||||
|
|
|
@ -40,6 +40,12 @@
|
|||
#define STM32F2_PINMUX_FUNC_PA10_USART1_RX \
|
||||
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
||||
|
||||
#define STM32F2_PINMUX_FUNC_PA11_OTG_FS_DM \
|
||||
(STM32_PINMUX_ALT_FUNC_10 | STM32_PUSHPULL_NOPULL)
|
||||
|
||||
#define STM32F2_PINMUX_FUNC_PA12_OTG_FS_DP \
|
||||
(STM32_PINMUX_ALT_FUNC_10 | STM32_PUSHPULL_NOPULL)
|
||||
|
||||
/* Port B */
|
||||
#define STM32F2_PINMUX_FUNC_PB6_USART1_TX \
|
||||
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
||||
|
|
|
@ -38,7 +38,7 @@ config USB_DC_STM32
|
|||
select USE_STM32_HAL_PCD_EX
|
||||
select HAS_DTS_USB
|
||||
help
|
||||
Enable USB support on the STM32 F0, F1, F3, F4, F7, L0 and L4 family of
|
||||
Enable USB support on the STM32 F0, F1, F2, F3, F4, F7, L0 and L4 family of
|
||||
processors.
|
||||
|
||||
config USB_DC_SAM0
|
||||
|
|
|
@ -191,6 +191,17 @@
|
|||
status = "disabled";
|
||||
label = "UART_5";
|
||||
};
|
||||
|
||||
usbotg_fs: usb@50000000 {
|
||||
compatible = "st,stm32-otgfs";
|
||||
reg = <0x50000000 0x40000>;
|
||||
interrupts = <67 0>;
|
||||
interrupt-names = "otgfs";
|
||||
num-bidir-endpoints = <4>;
|
||||
ram-size = <1280>;
|
||||
status = "disabled";
|
||||
label = "OTGFS";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue