drivers: usb: add support for USB OTG FS on STM32F7
The STM32F7 uses the same USB OTG FS controller than the STM32F4 series. It is therefore trivial to add support for it, by adding the DT fixup and pinmux macros, and the DT entries in stm32f7.dtsi. Keep it disabled, it should be enabled at the board level. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
f6bf897780
commit
9107e3dac8
4 changed files with 22 additions and 1 deletions
|
@ -50,4 +50,10 @@
|
|||
#define CONFIG_UART_STM32_USART_8_NAME ST_STM32_USART_40007800_LABEL
|
||||
#define USART_8_IRQ ST_STM32_USART_40007C00_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 */
|
||||
|
|
|
@ -51,9 +51,13 @@
|
|||
|
||||
#define STM32F7_PINMUX_FUNC_PA11_USART1_CTS \
|
||||
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
||||
#define STM32F7_PINMUX_FUNC_PA11_OTG_FS_DM \
|
||||
(STM32_PINMUX_ALT_FUNC_10 | STM32_PUSHPULL_NOPULL)
|
||||
|
||||
#define STM32F7_PINMUX_FUNC_PA12_USART1_RTS \
|
||||
(STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP)
|
||||
#define STM32F7_PINMUX_FUNC_PA12_OTG_FS_DP \
|
||||
(STM32_PINMUX_ALT_FUNC_10 | STM32_PUSHPULL_NOPULL)
|
||||
|
||||
#define STM32F7_PINMUX_FUNC_PA15_USART4_RTS \
|
||||
(STM32_PINMUX_ALT_FUNC_8 | STM32_PUSHPULL_PULLUP)
|
||||
|
|
|
@ -41,7 +41,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, L0 and L4 family of
|
||||
Enable USB support on the STM32 F0, F1, F3, F4, F7, L0 and L4 family of
|
||||
processors.
|
||||
|
||||
config USB_DC_SAM0
|
||||
|
|
|
@ -202,6 +202,17 @@
|
|||
status = "disabled";
|
||||
label = "UART_8";
|
||||
};
|
||||
|
||||
usbotg_fs: usb@50000000 {
|
||||
compatible = "st,stm32-otgfs";
|
||||
reg = <0x50000000 0x40000>;
|
||||
interrupts = <67 0>;
|
||||
interrupt-names = "otgfs";
|
||||
num-bidir-endpoints = <6>;
|
||||
ram-size = <1280>;
|
||||
status = "disabled";
|
||||
label = "OTGFS";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue