File tree Expand file tree Collapse file tree 9 files changed +1022
-0
lines changed Expand file tree Collapse file tree 9 files changed +1022
-0
lines changed Original file line number Diff line number Diff line change 11/dts-v1/;
22#include <ambiq/ambiq_apollo4p_blue.dtsi>
3+ #include <zephyr/dt-bindings/input/input-event-codes.h>
34
45#include "apollo4p_blue_kxr_evb-pinctrl.dtsi"
56
4546
4647 buttons {
4748 compatible = "gpio-keys";
49+ polling-mode;
4850 button0: button_0 {
4951 gpios = <&gpio0_31 17 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
5052 label = "BTN0";
53+ zephyr,code = <INPUT_KEY_0>;
54+ status = "okay";
5155 };
5256 button1: button_1 {
5357 gpios = <&gpio0_31 19 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
5458 label = "BTN1";
59+ zephyr,code = <INPUT_KEY_1>;
60+ status = "okay";
5561 };
5662 };
5763};
129135 status = "okay";
130136};
131137
138+ zephyr_udc0: &usb {
139+ vddusb33-gpios = <&gpio0_31 13 (GPIO_PULL_UP)>;
140+ vddusb0p9-gpios = <&gpio0_31 15 (GPIO_PULL_UP)>;
141+ status = "okay";
142+ };
143+
132144&gpio0_31 {
133145 status = "okay";
134146};
Original file line number Diff line number Diff line change 11/dts-v1/;
22#include <ambiq/ambiq_apollo4p.dtsi>
3+ #include <zephyr/dt-bindings/input/input-event-codes.h>
34
45#include "apollo4p_evb-pinctrl.dtsi"
56
4546
4647 buttons {
4748 compatible = "gpio-keys";
49+ polling-mode;
4850 button0: button_0 {
4951 gpios = <&gpio0_31 18 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
5052 label = "BTN0";
53+ zephyr,code = <INPUT_KEY_0>;
54+ status = "okay";
5155 };
5256 button1: button_1 {
5357 gpios = <&gpio0_31 19 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
5458 label = "BTN1";
59+ zephyr,code = <INPUT_KEY_1>;
60+ status = "okay";
5561 };
5662 };
5763};
Original file line number Diff line number Diff line change @@ -17,3 +17,4 @@ zephyr_library_sources_ifdef(CONFIG_UDC_NXP_EHCI udc_mcux_ehci.c)
1717zephyr_library_sources_ifdef(CONFIG_UDC_NXP_IP3511 udc_mcux_ip3511.c)
1818zephyr_library_sources_ifdef(CONFIG_UDC_NUMAKER udc_numaker.c)
1919zephyr_library_sources_ifdef(CONFIG_UDC_RPI_PICO udc_rpi_pico.c)
20+ zephyr_library_sources_ifdef(CONFIG_UDC_AMBIQ udc_ambiq.c)
Original file line number Diff line number Diff line change @@ -64,5 +64,6 @@ source "drivers/usb/udc/Kconfig.it82xx2"
6464source "drivers/usb/udc/Kconfig.mcux"
6565source "drivers/usb/udc/Kconfig.numaker"
6666source "drivers/usb/udc/Kconfig.rpi_pico"
67+ source "drivers/usb/udc/Kconfig.ambiq"
6768
6869endif # UDC_DRIVER
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2024 Ambiq Micro Inc.
2+ # SPDX-License-Identifier: Apache-2.0
3+
4+ config UDC_AMBIQ
5+ bool "USB device controller driver for ambiq devices"
6+ default y
7+ depends on DT_HAS_AMBIQ_USB_ENABLED
8+ select GPIO
9+ select AMBIQ_HAL
10+ select AMBIQ_HAL_USE_USB
11+ help
12+ Enable USB Device Controller Driver.
13+
14+ config UDC_AMBIQ_STACK_SIZE
15+ int "UDC AMBIQ driver internal thread stack size"
16+ depends on UDC_AMBIQ
17+ default 2048
18+ help
19+ AMBIQ driver internal thread stack size.
20+
21+ config UDC_AMBIQ_THREAD_PRIORITY
22+ int "UDC AMBIQ driver thread priority"
23+ depends on UDC_AMBIQ
24+ default 8
25+ help
26+ AMBIQ driver thread priority.
27+
28+
29+ config UDC_AMBIQ_MAX_QMESSAGES
30+ int "UDC AMBIQ maximum number of ISR event messages"
31+ range 4 64
32+ default 8
33+ help
34+ AMBIQ maximum number of ISR event messages.
You can’t perform that action at this time.
0 commit comments