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: change UART DT pinmux properties to tx-gpios, rx-gpios, rts-gpios, cts-gpios #32653

Conversation

mbolivar-nordic
Copy link
Contributor

This continues work begun in #31965 by making a similar change to UART bindings.

A prototypical example is to specify TX and RX like this in an overlay:

   &uart0 {
         tx-gpios = <&gpio0 1 0>;
         rx-gpios = <&gpio1 4 0>;
   };

Instead of:

   &uart0 {
         tx-pin = <1>;
         rx-pin = <36>;
   };

The old style is still supported, but at most one property in each pair can be given. Provide error checking and understandable error messages for invalid configurations.

@mbolivar-nordic
Copy link
Contributor Author

Blocked on #31965; only the final 3 commits are truly part of this PR.

Copy link
Member

@dcpleung dcpleung left a comment

Choose a reason for hiding this comment

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

UART changes look good.

@mbolivar-nordic
Copy link
Contributor Author

I found some RST docs that still reference the old properties. I'll update those too.

@mbolivar-nordic mbolivar-nordic force-pushed the dt-nrf-uart-gpios branch 2 times, most recently from 541aee6 to ee0138a Compare March 1, 2021 17:00
@mbolivar-nordic mbolivar-nordic added DNM This PR should not be merged (Do Not Merge) and removed Blocked Blocked by another PR or issue labels Mar 1, 2021
@mbolivar-nordic
Copy link
Contributor Author

Rebased on master now that #31965 is merged. Driver changes are ready for review.

DNM for now since it has increased the BK parallelism and I still need to update the RST files. That will require pulling some additional docs patches out of an older PR.

In addition to the tx-pin, rx-pin, rts-pin, and cts-pin properties in
the devicetree, provide new tx-gpios, rx-gpios, rts-gpios, and
cts-gpios properties.

This lets the user specify TX and RX like this:

   &uart0 {
         tx-gpios = <&gpio0 1 0>;
         rx-gpios = <&gpio1 4 0>;
   };

Instead of having to use:

   &uart0 {
         tx-pin = <1>;
         rx-pin = <36>;
   };

Provide error checking and understandable error messages for invalid
configurations.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Convert uses of the following properties to these equivalents:

    tx-pin  -> tx-gpios
    rx-pin  -> rx-gpios
    rts-pin -> rts-gpios
    cts-pin -> cts-gpios

Done with a script except for the /delete-property/ line in the
samples. Sample, board, and test changes are combined for bisectability.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Deprecate the no longer used properties.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Trying to pass CI.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
@carlescufi
Copy link
Member

@mbolivar-nordic please rebase

@mbolivar-nordic
Copy link
Contributor Author

Abandoning due to #31965 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth area: Boards area: Continuous Integration area: Devicetree area: I2C area: Sensors Sensors area: UART Universal Asynchronous Receiver-Transmitter DNM This PR should not be merged (Do Not Merge) platform: nRF Nordic nRFx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants