Commit ac49a21c authored by Anuj Pathak's avatar Anuj Pathak Committed by Henrik Brix Andersen
Browse files

Drivers: Serial: Generic [tx/rx]-invert properties yaml.



Refactored vendor-specific duplicates of uart tx/rx invert properties
into a common dts file uart-controller-pin-inversion.yaml

Signed-off-by: default avatarAnuj Pathak <anuj@croxel.com>
parent d2c0bd9d
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ description: ESP32 UART

compatible: "espressif,esp32-uart"

include: [uart-controller.yaml, pinctrl-device.yaml]
include: [uart-controller.yaml, uart-controller-pin-inversion.yaml, pinctrl-device.yaml]

properties:
  reg:
@@ -21,15 +21,3 @@ properties:
      Overrides hw-flow-control if both are set.
      Using this mode, the pin assigned to DTR
      is asserted during transmission.

  tx-invert:
    type: boolean
    description: |
      Invert the binary logic of tx pin. When enabled, physical logic levels are inverted and
      we use 1=Low, 0=High instead of 1=High, 0=Low.

  rx-invert:
    type: boolean
    description: |
      Invert the binary logic of rx pin. When enabled, physical logic levels are inverted and
      we use 1=Low, 0=High instead of 1=High, 0=Low.
+1 −13
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ description: Kinetis LPUART

compatible: "nxp,kinetis-lpuart"

include: [uart-controller.yaml, pinctrl-device.yaml]
include: [uart-controller.yaml, uart-controller-pin-inversion.yaml, pinctrl-device.yaml]

properties:
  reg:
@@ -23,18 +23,6 @@ properties:
      only TX pin is used afterwards and should be configured.
      RX/TX conflicts must be handled on user side.

  tx-invert:
    type: boolean
    description: |
      Invert the binary logic of tx pin. When enabled, physical logic levels are inverted and
      we use 1=Low, 0=High instead of 1=High, 0=Low.

  rx-invert:
    type: boolean
    description: |
      Invert the binary logic of rx pin. When enabled, physical logic levels are inverted and
      we use 1=Low, 0=High instead of 1=High, 0=Low.

  nxp,rs485-mode:
    type: boolean
    description: |
+1 −12
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ include:
      - clock-frequency
  - name: pinctrl-device.yaml
  - name: reset-device.yaml
  - name: uart-controller-pin-inversion.yaml

properties:
  reg:
@@ -37,18 +38,6 @@ properties:
    description:
      Swap the TX and RX pins. Used in case of a cross wired connection.

  tx-invert:
    type: boolean
    description: |
      Invert the binary logic of tx pin. When enabled, physical logic levels are inverted and
      we use 1=Low, 0=High instead of 1=High, 0=Low.

  rx-invert:
    type: boolean
    description: |
      Invert the binary logic of rx pin. When enabled, physical logic levels are inverted and
      we use 1=Low, 0=High instead of 1=High, 0=Low.

  pinctrl-0:
    required: true

+16 −0
Original line number Diff line number Diff line
# Copyright (c) 2024 Croxel, Inc.
# SPDX-License-Identifier: Apache-2.0

description: Pin Inversion fields for UART controllers

properties:
  tx-invert:
    type: boolean
    description: |
      Invert the binary logic of tx pin. When enabled, physical logic levels are inverted and
      we use 1=Low, 0=High instead of 1=High, 0=Low.
  rx-invert:
    type: boolean
    description: |
      Invert the binary logic of rx pin. When enabled, physical logic levels are inverted and
      we use 1=Low, 0=High instead of 1=High, 0=Low.