Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nRF Desktop: common DTS HID/USBD improvements #19239

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
};
};

&usbd {
compatible = "nordic,nrf-usbd";
status = "okay";
num-bidir-endpoints = <0>;
num-in-endpoints = <7>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The common configuration had to handle the worst possible use-case (with 4 USB HID class instances).

Together with changing approach, it would be reasonable to tailor the number of endpoints to needs of a given build type: https://github.com/nrfconnect/sdk-nrf/blob/main/applications/nrf_desktop/src/modules/usb_state.c#L125. We should also take into account additional USB endpoints used by the BLE QoS's USB CDC ACM class (to make it work without need to updating DTS manually).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was just a restructure of the DTS definitions. Your suggestion changes the DTS descriptions for each build type, which requires runtime tests. We can consider creating a follow-up ticket to optimize the USB part of DTS.

Copy link
Contributor

@MarekPieta MarekPieta Dec 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A follow-up ticket should be ok. Please link it here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

num-out-endpoints = <2>;
num-isoin-endpoints = <0>;
num-isoout-endpoints = <0>;
};

&cdc_acm_uart {
status = "okay";
};
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@
in-report-size = <64>;
};
};

&usbd {
compatible = "nordic,nrf-usbd";
status = "okay";
num-bidir-endpoints = <0>;
num-in-endpoints = <7>;
num-out-endpoints = <2>;
num-isoin-endpoints = <0>;
num-isoout-endpoints = <0>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@
in-report-size = <64>;
};
};

&usbd {
compatible = "nordic,nrf-usbd";
status = "okay";
num-bidir-endpoints = <0>;
num-in-endpoints = <7>;
num-out-endpoints = <2>;
num-isoin-endpoints = <0>;
num-isoout-endpoints = <0>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,6 @@
};
};

&usbd {
compatible = "nordic,nrf-usbd";
status = "okay";
num-bidir-endpoints = <0>;
num-in-endpoints = <7>;
num-out-endpoints = <2>;
num-isoin-endpoints = <0>;
num-isoout-endpoints = <0>;
};

&pwm0 {
status = "okay";
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@
in-report-size = <64>;
};
};

&usbd {
compatible = "nordic,nrf-usbd";
status = "okay";
num-bidir-endpoints = <0>;
num-in-endpoints = <7>;
num-out-endpoints = <2>;
num-isoin-endpoints = <0>;
num-isoout-endpoints = <0>;
};
Loading