xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/brcm,ns-pinmux.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
15956d97fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
25956d97fSEmmanuel Vadot%YAML 1.2
35956d97fSEmmanuel Vadot---
45956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/brcm,ns-pinmux.yaml#
55956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65956d97fSEmmanuel Vadot
75956d97fSEmmanuel Vadottitle: Broadcom Northstar pins mux controller
85956d97fSEmmanuel Vadot
95956d97fSEmmanuel Vadotmaintainers:
105956d97fSEmmanuel Vadot  - Rafał Miłecki <rafal@milecki.pl>
115956d97fSEmmanuel Vadot
125956d97fSEmmanuel Vadotdescription:
135956d97fSEmmanuel Vadot  Some of Northstar SoCs's pins can be used for various purposes thanks to the
145956d97fSEmmanuel Vadot  mux controller. This binding allows describing mux controller and listing
155956d97fSEmmanuel Vadot  available functions. They can be referenced later by other bindings to let
165956d97fSEmmanuel Vadot  system configure controller correctly.
175956d97fSEmmanuel Vadot
185956d97fSEmmanuel Vadot  A list of pins varies across chipsets so few bindings are available.
195956d97fSEmmanuel Vadot
205956d97fSEmmanuel Vadotproperties:
215956d97fSEmmanuel Vadot  compatible:
225956d97fSEmmanuel Vadot    enum:
235956d97fSEmmanuel Vadot      - brcm,bcm4708-pinmux
245956d97fSEmmanuel Vadot      - brcm,bcm4709-pinmux
255956d97fSEmmanuel Vadot      - brcm,bcm53012-pinmux
265956d97fSEmmanuel Vadot
27354d7675SEmmanuel Vadot  reg:
285956d97fSEmmanuel Vadot    maxItems: 1
29354d7675SEmmanuel Vadot
30354d7675SEmmanuel Vadot  reg-names:
31354d7675SEmmanuel Vadot    const: cru_gpio_control
325956d97fSEmmanuel Vadot
335956d97fSEmmanuel VadotpatternProperties:
345956d97fSEmmanuel Vadot  '-pins$':
355956d97fSEmmanuel Vadot    type: object
365956d97fSEmmanuel Vadot    description: pin node
375956d97fSEmmanuel Vadot    $ref: pinmux-node.yaml#
385956d97fSEmmanuel Vadot
395956d97fSEmmanuel Vadot    properties:
405956d97fSEmmanuel Vadot      function:
415956d97fSEmmanuel Vadot        enum: [ spi, i2c, pwm, uart1, mdio, uart2, sdio ]
425956d97fSEmmanuel Vadot      groups:
435956d97fSEmmanuel Vadot        minItems: 1
445956d97fSEmmanuel Vadot        maxItems: 4
455956d97fSEmmanuel Vadot        items:
465956d97fSEmmanuel Vadot          enum: [ spi_grp, i2c_grp, pwm0_grp, pwm1_grp, pwm2_grp, pwm3_grp,
475956d97fSEmmanuel Vadot                  uart1_grp, mdio_grp, uart2_grp, sdio_pwr_grp, sdio_1p8v_grp ]
485956d97fSEmmanuel Vadot
495956d97fSEmmanuel Vadot    required:
505956d97fSEmmanuel Vadot      - function
515956d97fSEmmanuel Vadot      - groups
525956d97fSEmmanuel Vadot
535956d97fSEmmanuel Vadot    additionalProperties: false
545956d97fSEmmanuel Vadot
555956d97fSEmmanuel VadotallOf:
56*fac71e4eSEmmanuel Vadot  - $ref: pinctrl.yaml#
575956d97fSEmmanuel Vadot  - if:
585956d97fSEmmanuel Vadot      properties:
595956d97fSEmmanuel Vadot        compatible:
605956d97fSEmmanuel Vadot          contains:
615956d97fSEmmanuel Vadot            const: brcm,bcm4708-pinmux
625956d97fSEmmanuel Vadot    then:
635956d97fSEmmanuel Vadot      patternProperties:
645956d97fSEmmanuel Vadot        '-pins$':
655956d97fSEmmanuel Vadot          properties:
665956d97fSEmmanuel Vadot            function:
675956d97fSEmmanuel Vadot              enum: [ spi, i2c, pwm, uart1 ]
685956d97fSEmmanuel Vadot            groups:
695956d97fSEmmanuel Vadot              items:
705956d97fSEmmanuel Vadot                enum: [ spi_grp, i2c_grp, pwm0_grp, pwm1_grp, pwm2_grp, pwm3_grp,
715956d97fSEmmanuel Vadot                        uart1_grp ]
725956d97fSEmmanuel Vadot
735956d97fSEmmanuel Vadotrequired:
74354d7675SEmmanuel Vadot  - reg
75354d7675SEmmanuel Vadot  - reg-names
765956d97fSEmmanuel Vadot
775956d97fSEmmanuel VadotadditionalProperties: false
785956d97fSEmmanuel Vadot
795956d97fSEmmanuel Vadotexamples:
805956d97fSEmmanuel Vadot  - |
81e67e8565SEmmanuel Vadot    pinctrl@1800c1c0 {
825956d97fSEmmanuel Vadot        compatible = "brcm,bcm4708-pinmux";
83354d7675SEmmanuel Vadot        reg = <0x1800c1c0 0x24>;
84354d7675SEmmanuel Vadot        reg-names = "cru_gpio_control";
855956d97fSEmmanuel Vadot
865956d97fSEmmanuel Vadot        spi-pins {
875956d97fSEmmanuel Vadot            function = "spi";
885956d97fSEmmanuel Vadot            groups = "spi_grp";
895956d97fSEmmanuel Vadot        };
905956d97fSEmmanuel Vadot    };
91