drivers/usb: usb_dc_stm32: Convert to DT_INST

Convert usb_stm32 driver to use of DT_INST macros.

Since driver is compatible with 3 different dt compatibles and
compatible string is included in DT_INST macros, I've kept the
DT_USB_ compatible agnostic macros based on DT_INST ones, which
allowed to remove fixup definitions.
Use of DT_USB symbols is now limited to usb_dc_stm32.

Additionally, compatible "st,stm32-otgfs" is removed from list
of compatibles for usbotg_hs ips.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2020-03-04 14:15:11 +01:00 committed by Kumar Gala
commit 9367c6ad3f
14 changed files with 51 additions and 139 deletions

View file

@ -145,28 +145,6 @@
#define DT_I2C_4_CLOCK_BITS DT_ST_STM32_I2C_V2_40006000_CLOCK_BITS
#define DT_I2C_4_CLOCK_BUS DT_ST_STM32_I2C_V2_40006000_CLOCK_BUS
#ifdef DT_ST_STM32_OTGFS_50000000_BASE_ADDRESS
#define DT_USB_BASE_ADDRESS DT_ST_STM32_OTGFS_50000000_BASE_ADDRESS
#define DT_USB_IRQ DT_ST_STM32_OTGFS_50000000_IRQ_OTGFS
#define DT_USB_IRQ_PRI DT_ST_STM32_OTGFS_50000000_IRQ_OTGFS_PRIORITY
#define DT_USB_NUM_BIDIR_ENDPOINTS DT_ST_STM32_OTGFS_50000000_NUM_BIDIR_ENDPOINTS
#define DT_USB_RAM_SIZE DT_ST_STM32_OTGFS_50000000_RAM_SIZE
#define DT_USB_MAXIMUM_SPEED DT_ST_STM32_OTGFS_50000000_MAXIMUM_SPEED
#define DT_USB_CLOCK_BITS DT_ST_STM32_OTGFS_50000000_CLOCK_BITS
#define DT_USB_CLOCK_BUS DT_ST_STM32_OTGFS_50000000_CLOCK_BUS
#endif /* DT_ST_STM32_OTGFS_50000000_BASE_ADDRESS */
#ifdef DT_ST_STM32_OTGHS_40040000_BASE_ADDRESS
#define DT_USB_HS_BASE_ADDRESS DT_ST_STM32_OTGHS_40040000_BASE_ADDRESS
#define DT_USB_IRQ DT_ST_STM32_OTGHS_40040000_IRQ_OTGHS
#define DT_USB_IRQ_PRI DT_ST_STM32_OTGHS_40040000_IRQ_OTGHS_PRIORITY
#define DT_USB_NUM_BIDIR_ENDPOINTS DT_ST_STM32_OTGHS_40040000_NUM_BIDIR_ENDPOINTS
#define DT_USB_RAM_SIZE DT_ST_STM32_OTGHS_40040000_RAM_SIZE
#define DT_USB_MAXIMUM_SPEED DT_ST_STM32_OTGHS_40040000_MAXIMUM_SPEED
#define DT_USB_CLOCK_BITS DT_ST_STM32_OTGHS_40040000_CLOCK_BITS
#define DT_USB_CLOCK_BUS DT_ST_STM32_OTGHS_40040000_CLOCK_BUS
#endif /* DT_ST_STM32_OTGHS_40040000_BASE_ADDRESS */
#define DT_RTC_0_NAME DT_INST_0_ST_STM32_RTC_LABEL
#define DT_FLASH_DEV_NAME DT_INST_0_ST_STM32F7_FLASH_CONTROLLER_LABEL