ite,it8xxx2-pinctrl

Vendor: ITE Tech. Inc.

Description

The ITE IT8XXX2 pin controller is a node responsible for controlling
pin function selection and pin properties. For example, you can
use this node to route UART1 RX and TX setting the alternate
function 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.
   */

  /* include pre-defined pins and functions for the SoC used by the board */
  #include <dt-bindings/pinctrl/it8xxx2-pinctrl.h>

  &pinctrl {
    /* configuration for I2C0 default state */
    i2c0_clk_pb3_default: i2c0_clk_pb3_default {
            pinmuxs = <&pinctrlb 3 IT8XXX2_ALT_FUNC_1>;
            gpio-voltage = "1p8";
    };
    i2c0_data_pb4_default: i2c0_data_pb4_default {
            pinmuxs = <&pinctrlb 4 IT8XXX2_ALT_FUNC_1>;
            gpio-voltage = "1v8";
    };
    /* configuration for UART0 default state */
    uart1_rx_pb0_default: uart1_rx_pb0_default {
            pinmuxs = <&pinctrlb 0 IT8XXX2_ALT_FUNC_3>;
            bias-pull-up;
    };
    uart1_tx_pb1_default: uart1_tx_pb1_default {
            pinmuxs = <&pinctrlb 1 IT8XXX2_ALT_FUNC_3>;
    };
  };

The 'uart1_rx_pb0_default' child node encodes the pin configurations
for a particular state of a device; in this case, the default
(that is, active) state.

To link pin configurations 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 "board-pinctrl.dtsi"

  &uart0 {
    pinctrl-0 = <&uart1_rx_pb0_default &uart1_tx_pb1_default>;
    pinctrl-1 = <&uart1_rx_pb0_sleep &uart1_tx_pb1_sleep>;
    pinctrl-names = "default", "sleep";
  };

Properties

Top level properties

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

Properties not inherited from the base binding file.

(None)

Child node properties

Name

Type

Details

bias-high-impedance

boolean

high impedance mode ("third-state", "floating")

bias-pull-up

boolean

enable pull-up resistor

bias-pull-down

boolean

enable pull-down resistor

bias-pull-pin-default

boolean

use pin's default pull state

drive-push-pull

boolean

drive actively high and low

drive-open-drain

boolean

drive with open drain (hardware AND)

input-enable

boolean

enable input on pin (e.g. enable an input buffer, no effect on output)

pinmuxs

phandle-array

ITE IT8XXX2 pin's configuration (pinctrl node, pin and function).

This property is required.

gpio-voltage

string

Pin input voltage selection 3.3V or 1.8V. All gpio pins support 3.3V.
This property only needs to be configured if the board specifies a
pin as 1.8V. So the default is 3.3V.
kSI[7:0] and KSO[15:0] pins only support 3.3V.

Default value: 3v3

Legal values: '3v3', '1v8'