realtek,ameba-pinctrl

Description

Realtek Ameba pinctrl is a singleton node responsible for controlling pin function selection
and pin properties. For example, you can use this node to route UART0 TX to pin PB_17
and enable the pull-up resistor on the pin.

All device pin configurations should be placed in child nodes of the 'pinctrl' node,
as shown in this example:
  /* put this example in places like a board-pinctrl.dtsi file in your board directory,
   * or a devicetree overlay in your application.
   */
  &pinctrl {
    /* configuration for uart0 device, default state */
    uart0_default: uart0_default {
      /* 'group1' name is arbitrary, if pin's settings are not same,
       * add other group like group2 {}
       */
      group1 {
        pinmux = <AMEBA_PINMUX('B', 17, AMEBA_UART2_TXD)>,
                 <AMEBA_PINMUX('B', 18, AMEBA_UART2_RXD)>;
        bias-pull-up;
      };
    };
  };

The 'uart0_default' child node encodes the pin configurations for a particular state of a device;
in this case, the default (that is, active) state. You would specify the low-power configuration
for the same device in a separate child node.

As shown, pin configurations are organized in groups within each child node. Each group can
specify a list of pin function selections in the 'pinmux' property. The AMEBA_PINMUX macro is
used to specify a pin function selection and pin configuration. You could choose pinmux specified
function to specified pin. And you could configure driver direction, driver state and pull state
for the specified pad.

To link this pin configuration with a device, use a pinctrl-N property for some number N,
like this example you could place in your board's DTS file:
  &uart0 {
    pinctrl-0 = <&uart0_default>;
    pinctrl-names = "default";
  };

Properties

Top level properties

These property descriptions apply to “realtek,ameba-pinctrl” nodes themselves. This page also describes child node properties in the following sections.

Properties not inherited from the base binding file.

(None)

Grandchild node properties

Name

Type

Details

pinmux

array

Pin mux selections for this group. An array of pins sharing the same group properties.
Each element of the array is an integer constructed from the pin number and
the alternative function of the pin.

This property is required.

slew-rate-slow

boolean

Pin output slew rate.If not set, default value is fast.

drive-strength-low

boolean

Drive strength of the output pin.If not set, default ability is high.

digital-input-disable

boolean

Disable the digital input function.

swd-off

boolean

Disable the SWD function.

bias-disable

boolean

disable any pin bias

bias-pull-up

boolean

enable pull-up resistor

bias-pull-down

boolean

enable pull-down resistor

input-schmitt-disable

boolean

disable schmitt-trigger mode