drivers: usb: Add STM32G4X USB support
Add USB driver support for STM32G4X SoC series. Signed-off-by: Richard Osterloh <richard.osterloh@gmail.com>
This commit is contained in:
parent
3e5187b458
commit
37514ae660
4 changed files with 28 additions and 2 deletions
|
@ -37,7 +37,7 @@ config USB_DC_STM32
|
||||||
select USE_STM32_HAL_PCD
|
select USE_STM32_HAL_PCD
|
||||||
select USE_STM32_HAL_PCD_EX
|
select USE_STM32_HAL_PCD_EX
|
||||||
help
|
help
|
||||||
Enable USB support on the STM32 F0, F1, F2, F3, F4, F7, L0 and L4 family of
|
Enable USB support on the STM32 F0, F1, F2, F3, F4, F7, L0, L4 and G4 family of
|
||||||
processors.
|
processors.
|
||||||
|
|
||||||
config USB_DC_SAM0
|
config USB_DC_SAM0
|
||||||
|
|
|
@ -75,7 +75,7 @@ LOG_MODULE_REGISTER(usb_dc_stm32);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* USB and USB_OTG_FS are defined in STM32Cube HAL and allows to distinguish
|
* USB and USB_OTG_FS are defined in STM32Cube HAL and allows to distinguish
|
||||||
* between two kind of USB DC. STM32 F0, F3, and L0 series support USB device
|
* between two kind of USB DC. STM32 F0, F3, L0 and G4 series support USB device
|
||||||
* controller. STM32 F4 and F7 series support USB_OTG_FS device controller.
|
* controller. STM32 F4 and F7 series support USB_OTG_FS device controller.
|
||||||
* STM32 F1 and L4 series support either USB or USB_OTG_FS device controller.
|
* STM32 F1 and L4 series support either USB or USB_OTG_FS device controller.
|
||||||
*
|
*
|
||||||
|
|
|
@ -409,8 +409,26 @@
|
||||||
label = "RTC_0";
|
label = "RTC_0";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
usb: usb@40005c00 {
|
||||||
|
compatible = "st,stm32-usb";
|
||||||
|
reg = <0x40005c00 0x400>;
|
||||||
|
interrupts = <20 0>, <19 0>;
|
||||||
|
interrupt-names = "usb", "usbhp";
|
||||||
|
num-bidir-endpoints = <8>;
|
||||||
|
ram-size = <1024>;
|
||||||
|
phys = <&usb_fs_phy>;
|
||||||
|
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00800000>;
|
||||||
|
status = "disabled";
|
||||||
|
label= "USB";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
usb_fs_phy: usbphy {
|
||||||
|
compatible = "usb-nop-xceiv";
|
||||||
|
#phy-cells = <0>;
|
||||||
|
label = "USB_FS_PHY";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&nvic {
|
&nvic {
|
||||||
|
|
|
@ -177,6 +177,14 @@
|
||||||
#define DT_SPI_3_CLOCK_BITS DT_ST_STM32_SPI_FIFO_40003C00_CLOCK_BITS
|
#define DT_SPI_3_CLOCK_BITS DT_ST_STM32_SPI_FIFO_40003C00_CLOCK_BITS
|
||||||
#define DT_SPI_3_CLOCK_BUS DT_ST_STM32_SPI_FIFO_40003C00_CLOCK_BUS
|
#define DT_SPI_3_CLOCK_BUS DT_ST_STM32_SPI_FIFO_40003C00_CLOCK_BUS
|
||||||
|
|
||||||
|
#define DT_USB_BASE_ADDRESS DT_ST_STM32_USB_40005C00_BASE_ADDRESS
|
||||||
|
#define DT_USB_IRQ DT_ST_STM32_USB_40005C00_IRQ_USB
|
||||||
|
#define DT_USB_IRQ_PRI DT_ST_STM32_USB_40005C00_IRQ_USB_PRIORITY
|
||||||
|
#define DT_USB_NUM_BIDIR_ENDPOINTS DT_ST_STM32_USB_40005C00_NUM_BIDIR_ENDPOINTS
|
||||||
|
#define DT_USB_RAM_SIZE DT_ST_STM32_USB_40005C00_RAM_SIZE
|
||||||
|
#define DT_USB_CLOCK_BITS DT_ST_STM32_USB_40005C00_CLOCK_BITS
|
||||||
|
#define DT_USB_CLOCK_BUS DT_ST_STM32_USB_40005C00_CLOCK_BUS
|
||||||
|
|
||||||
#define DT_PWM_STM32_1_DEV_NAME DT_ST_STM32_PWM_40012C00_PWM_LABEL
|
#define DT_PWM_STM32_1_DEV_NAME DT_ST_STM32_PWM_40012C00_PWM_LABEL
|
||||||
#define DT_PWM_STM32_1_PRESCALER DT_ST_STM32_PWM_40012C00_PWM_ST_PRESCALER
|
#define DT_PWM_STM32_1_PRESCALER DT_ST_STM32_PWM_40012C00_PWM_ST_PRESCALER
|
||||||
#define DT_TIM_STM32_1_BASE_ADDRESS DT_ST_STM32_TIMERS_40012C00_BASE_ADDRESS
|
#define DT_TIM_STM32_1_BASE_ADDRESS DT_ST_STM32_TIMERS_40012C00_BASE_ADDRESS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue