Microchip PIO3 Pinmux Controller

Schema identifier ($id): "http://devicetree.org/schemas/pinctrl/atmel,at91rm9200-pinctrl.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Manikandan Muralidharan <manikandan.m@microchip.com>"

The AT91 Pinmux Controller, enables the IC to share one PAD to several functional blocks. The sharing is done by multiplexing the PAD input/output signals. For each PAD there are up to 8 muxing options (called periph modes). Since different modules require different PAD settings (like pull up, keeper, etc) the controller controls also the PAD settings parameters.

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Array item rules (items)

Item 1

Allowed values (enum): "atmel,at91rm9200-pinctrl", "atmel,at91sam9x5-pinctrl", "atmel,sama5d3-pinctrl", "microchip,sam9x60-pinctrl"

Item 2

Exact value (const): "simple-mfd"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "microchip,sam9x7-pinctrl"

Item 2

Exact value (const): "microchip,sam9x60-pinctrl"

Item 3

Exact value (const): "simple-mfd"

#address-cells — required here #

Exact value (const): 1

#size-cells — required here #

Exact value (const): 1

ranges — required here #

true — No constraints added by this property rule.

atmel,mux-mask — required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-matrix

Array of mask (periph per bank) to describe if a pin can be configured in this periph mode. All the periph and bank need to be described.

#How to create such array:

Each column will represent the possible peripheral of the pinctrl Each line will represent a pio bank

#Example:

In at91sam9260.dtsi, Peripheral: 2 ( A and B) Bank: 3 (A, B and C)

# A B 0xffffffff 0xffc00c3b # pioA 0xffffffff 0x7fff3ccf # pioB 0xffffffff 0x007fffff # pioC

For each peripheral/bank we will describe in a u32 if a pin can be configured in it by putting 1 to the pin bit (1 << pin)

Let's take the pioA on peripheral B whose value is 0xffc00c3b From the datasheet Table 10-2. Peripheral B PA0 MCDB0 PA1 MCCDB PA2 PA3 MCDB3 PA4 MCDB2 PA5 MCDB1 PA6 PA7 PA8 PA9 PA10 ETX2 PA11 ETX3 PA12 PA13 PA14 PA15 PA16 PA17 PA18 PA19 PA20 PA21 PA22 ETXER PA23 ETX2 PA24 ETX3 PA25 ERX2 PA26 ERX3 PA27 ERXCK PA28 ECRS PA29 ECOL PA30 RXD4 PA31 TXD4

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): pinctrl.yaml#

Required in this object (required): "compatible", "ranges", "#address-cells", "#size-cells", "atmel,mux-mask"

Properties matching a name pattern (patternProperties) #

gpio@[0-9a-f]+$ — name matches this regular expression #

Shared schema rule ($ref): /schemas/gpio/atmel,at91rm9200-gpio.yaml

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

Value type (type): "object"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

Value type (type): "object"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

atmel,pins — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-matrix

Each entry consists of 4 integers and represents the pins
mux and config setting.The format is
atmel,pins = <PIN_BANK PIN_BANK_NUM PERIPH CONFIG>.
Supported pin number and mux varies for different SoCs, and
are defined in <include/dt-bindings/pinctrl/at91.h>.
items:
  items:
    - description:
        Pin bank
    - description:
        Pin bank index
    - description:
        Peripheral function
    - description:
        Pad configuration

Examples (examples) #

#include <dt-bindings/clock/at91.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/at91.h>

pinctrl@fffff400 {
    #address-cells = <1>;
    #size-cells = <1>;
    compatible = "atmel,at91rm9200-pinctrl", "simple-mfd";
    ranges = <0xfffff400 0xfffff400 0x600>;

    atmel,mux-mask = <
      /*    A         B     */
      0xffffffff 0xffc00c3b  /* pioA */
      0xffffffff 0x7fff3ccf  /* pioB */
      0xffffffff 0x007fffff  /* pioC */
      >;

    dbgu {
        dbgu-0 {
            atmel,pins =
              <AT91_PIOB 14 AT91_PERIPH_A AT91_PINCTRL_PULL_UP
               AT91_PIOB 15 AT91_PERIPH_A AT91_PINCTRL_NONE>;
        };
    };

    gpio@fffff400 {
        compatible = "atmel,at91rm9200-gpio";
        reg = <0xfffff400 0x200>;
        interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
        #gpio-cells = <2>;
        gpio-controller;
        interrupt-controller;
        #interrupt-cells = <2>;
        clocks = <&pmc PMC_TYPE_PERIPHERAL 2>;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page