realtek,bee-pinctrl

Description

Bee pin controller.
The bee pin controller is a singleton node responsible for controlling
pin function selection and pin properties. For example, you can use this
node to route UART2 TX to pin P3_2 and enable the pull-up resistor on the
pin.

The node has the 'pinctrl' node label set in your SoC's devicetree,
so you can modify it like this:

  &pinctrl {
          /* your modifications go here */
  };

All device pin configurations should be placed in child nodes of the
'pinctrl' node, as shown in this example:

  /* You can put this in places like a board-pinctrl.dtsi file in
   * your board directory, or a devicetree overlay in your application.
   */
  &pinctrl {
    /* configuration for uart2 device, default state */
    uart2_default: uart2_default {
      /* group 1 ('group1' name is arbitrary) */
      group1 {
        psels = <BEE_PSEL(UART2_TX, P3_2)>;
        output-enable;
        output-high;
        bias-pull-up;
      };

      group2 {
        psels = <BEE_PSEL(UART2_RX, P3_3)>;
        output-disable;
        bias-pull-up;
      };
    };
  };

The 'uart2_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 into groups within each child node.
Each group can specify a list of pin function selections in the psels property.
The BEE_PSEL macro is used to specify pin function selection and pin properties,
allowing you to map a specific function to a specific pin. Additionally, within
a group, you can configure shared pin states for that group, such as
the direction, drive strength, and pull state of the corresponding pads.
Available pin functions can be found in the
zephyr\include\zephyr\dt-bindings\pinctrl\rtl87xxx-pinctrl.h header file.

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:

   #include "rtlxxxx_evb-pinctrl.dtsi"

   &uart2 {
         pinctrl-0 = <&uart2_default>;
         pinctrl-names = "default";
   };

Properties

Top level properties

These property descriptions apply to “realtek,bee-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

psels

array

Pinmux function number and pad configurations.

This property is required.

bias-pull-strong

boolean

enable pull-strong resistor

current-level

int

current level of pin
when VDDIO is set to 1.8V, the pad driving current is as followed:
    level0: 1.25 mA
    level1: 2.50 mA
    level2: 3.75 mA
    level3: 5.00 mA
When VDDIO is set to 3.3V, the pad driving current is as followed:
    level0: 4 mA
    level1: 8 mA
    level2: 12 mA
    level3: 16 mA

Legal values: 0, 1, 2, 3

bias-disable

boolean

disable any pin bias

bias-pull-up

boolean

enable pull-up resistor

bias-pull-down

boolean

enable pull-down resistor

output-disable

boolean

disable output on a pin (e.g. disable an output buffer)

output-enable

boolean

enable output on a pin without actively driving it (e.g. enable an output
buffer)

output-low

boolean

set the pin to output mode with low level

output-high

boolean

set the pin to output mode with high level