boards: frdm_kl25z: add USB support
Add USB support to FRDM_KL25Z board. Signed-off-by: Johann Fischer <j.fischer@phytec.de>
This commit is contained in:
parent
558eac2f98
commit
2055b84f79
8 changed files with 44 additions and 0 deletions
|
@ -64,4 +64,11 @@ config SOC_FLASH_MCUX
|
|||
|
||||
endif # FLASH
|
||||
|
||||
if USB
|
||||
|
||||
config USB_KINETIS
|
||||
def_bool y
|
||||
|
||||
endif # USB
|
||||
|
||||
endif # SOC_MKL25Z
|
||||
|
|
|
@ -21,4 +21,10 @@
|
|||
#define FLASH_DEV_BASE_ADDRESS NXP_KINETIS_FTFA_40020000_BASE_ADDRESS
|
||||
#define FLASH_DEV_NAME NXP_KINETIS_FTFA_40020000_LABEL
|
||||
|
||||
#define CONFIG_USBD_KINETIS_NAME NXP_KINETIS_USBD_40072000_LABEL
|
||||
#define CONFIG_USBD_KINETIS_IRQ NXP_KINETIS_USBD_40072000_IRQ_USB_OTG
|
||||
#define CONFIG_USBD_KINETIS_IRQ_PRI NXP_KINETIS_USBD_40072000_IRQ_USB_OTG_PRIORITY
|
||||
#define CONFIG_USBD_KINETIS_BASE_ADDRESS NXP_KINETIS_USBD_40072000_BASE_ADDRESS
|
||||
#define CONFIG_USBD_KINETIS_NUM_BIDIR_EP NXP_KINETIS_USBD_40072000_NUM_BIDIR_ENDPOINTS
|
||||
|
||||
/* End of SoC Level DTS fixup file */
|
||||
|
|
|
@ -98,6 +98,10 @@ static ALWAYS_INLINE void clkInit(void)
|
|||
#ifdef CONFIG_UART_MCUX_LPSCI_0
|
||||
CLOCK_SetLpsci0Clock(LPSCI0SRC_MCGFLLCLK);
|
||||
#endif
|
||||
#if CONFIG_USB_KINETIS
|
||||
CLOCK_EnableUsbfs0Clock(kCLOCK_UsbSrcPll0,
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int kl2x_init(struct device *arg)
|
||||
|
|
|
@ -17,6 +17,7 @@ extern "C" {
|
|||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
#include <fsl_common.h>
|
||||
#include <device.h>
|
||||
#include <misc/util.h>
|
||||
#include <random/rand32.h>
|
||||
|
|
|
@ -61,6 +61,8 @@ The frdm_kl25z board configuration supports the following hardware features:
|
|||
+-----------+------------+-------------------------------------+
|
||||
| FLASH | on-chip | soc flash |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| USB | on-chip | USB device |
|
||||
+-----------+------------+-------------------------------------+
|
||||
|
||||
The default configuration can be found in the defconfig file:
|
||||
|
||||
|
@ -106,6 +108,13 @@ Serial Port
|
|||
|
||||
The KL25Z UART0 is used for the console.
|
||||
|
||||
USB
|
||||
===
|
||||
|
||||
The KL25Z SoC has a USB OTG (USBOTG) controller that supports both
|
||||
device and host functions through its mini USB connector (USB KL25Z).
|
||||
Only USB device function is supported in Zephyr at the moment.
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
|
|
|
@ -70,3 +70,9 @@
|
|||
status = "ok";
|
||||
current-speed = <115200>;
|
||||
};
|
||||
|
||||
&usbd {
|
||||
compatible = "nxp,kinetis-usbd";
|
||||
status = "ok";
|
||||
num-bidir-endpoints = <8>;
|
||||
};
|
||||
|
|
|
@ -15,3 +15,4 @@ supported:
|
|||
- adc
|
||||
- i2c
|
||||
- gpio
|
||||
- usb_device
|
||||
|
|
|
@ -137,6 +137,16 @@
|
|||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
};
|
||||
|
||||
usbd: usbd@40072000 {
|
||||
compatible = "nxp,kinetis-usbd";
|
||||
reg = <0x40072000 0x1000>;
|
||||
interrupts = <24 1>;
|
||||
interrupt-names = "usb_otg";
|
||||
num-bidir-endpoints = <16>;
|
||||
status = "disabled";
|
||||
label = "USBD";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue