xref: /freebsd/sys/contrib/device-tree/Bindings/gpio/gpio-stp-xway.yaml (revision 5956d97f4b3204318ceb6aa9c77bd0bc6ea87a41)
1*5956d97fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*5956d97fSEmmanuel Vadot%YAML 1.2
3*5956d97fSEmmanuel Vadot---
4*5956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/gpio-stp-xway.yaml#
5*5956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*5956d97fSEmmanuel Vadot
7*5956d97fSEmmanuel Vadottitle: Lantiq SoC Serial To Parallel (STP) GPIO controller
8*5956d97fSEmmanuel Vadot
9*5956d97fSEmmanuel Vadotdescription: |
10*5956d97fSEmmanuel Vadot  The Serial To Parallel (STP) is found on MIPS based Lantiq socs. It is a
11*5956d97fSEmmanuel Vadot  peripheral controller used to drive external shift register cascades. At most
12*5956d97fSEmmanuel Vadot  3 groups of 8 bits can be driven. The hardware is able to allow the DSL modem
13*5956d97fSEmmanuel Vadot  and Ethernet PHYs to drive some bytes of the cascade automatically.
14*5956d97fSEmmanuel Vadot
15*5956d97fSEmmanuel Vadotmaintainers:
16*5956d97fSEmmanuel Vadot  - John Crispin <john@phrozen.org>
17*5956d97fSEmmanuel Vadot
18*5956d97fSEmmanuel Vadotproperties:
19*5956d97fSEmmanuel Vadot  $nodename:
20*5956d97fSEmmanuel Vadot    pattern: "^gpio@[0-9a-f]+$"
21*5956d97fSEmmanuel Vadot
22*5956d97fSEmmanuel Vadot  compatible:
23*5956d97fSEmmanuel Vadot    const: lantiq,gpio-stp-xway
24*5956d97fSEmmanuel Vadot
25*5956d97fSEmmanuel Vadot  reg:
26*5956d97fSEmmanuel Vadot    maxItems: 1
27*5956d97fSEmmanuel Vadot
28*5956d97fSEmmanuel Vadot  gpio-controller: true
29*5956d97fSEmmanuel Vadot
30*5956d97fSEmmanuel Vadot  "#gpio-cells":
31*5956d97fSEmmanuel Vadot    description:
32*5956d97fSEmmanuel Vadot      The first cell is the pin number and the second cell is used to specify
33*5956d97fSEmmanuel Vadot      consumer flags.
34*5956d97fSEmmanuel Vadot    const: 2
35*5956d97fSEmmanuel Vadot
36*5956d97fSEmmanuel Vadot  lantiq,shadow:
37*5956d97fSEmmanuel Vadot    description:
38*5956d97fSEmmanuel Vadot      The default value that we shall assume as already set on the
39*5956d97fSEmmanuel Vadot      shift register cascade.
40*5956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
41*5956d97fSEmmanuel Vadot    minimum: 0x000000
42*5956d97fSEmmanuel Vadot    maximum: 0xffffff
43*5956d97fSEmmanuel Vadot
44*5956d97fSEmmanuel Vadot  lantiq,groups:
45*5956d97fSEmmanuel Vadot    description:
46*5956d97fSEmmanuel Vadot      Set the 3 bit mask to select which of the 3 groups are enabled
47*5956d97fSEmmanuel Vadot      in the shift register cascade.
48*5956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
49*5956d97fSEmmanuel Vadot    minimum: 0x0
50*5956d97fSEmmanuel Vadot    maximum: 0x7
51*5956d97fSEmmanuel Vadot
52*5956d97fSEmmanuel Vadot  lantiq,dsl:
53*5956d97fSEmmanuel Vadot    description:
54*5956d97fSEmmanuel Vadot      The dsl core can control the 2 LSBs of the gpio cascade. This 2 bit
55*5956d97fSEmmanuel Vadot      property can enable this feature.
56*5956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
57*5956d97fSEmmanuel Vadot    minimum: 0x0
58*5956d97fSEmmanuel Vadot    maximum: 0x3
59*5956d97fSEmmanuel Vadot
60*5956d97fSEmmanuel Vadot  lantiq,rising:
61*5956d97fSEmmanuel Vadot    description:
62*5956d97fSEmmanuel Vadot      Use rising instead of falling edge for the shift register.
63*5956d97fSEmmanuel Vadot    type: boolean
64*5956d97fSEmmanuel Vadot
65*5956d97fSEmmanuel VadotpatternProperties:
66*5956d97fSEmmanuel Vadot  "^lantiq,phy[1-4]$":
67*5956d97fSEmmanuel Vadot    description:
68*5956d97fSEmmanuel Vadot      The gphy core can control 3 bits of the gpio cascade. In the xRX200 family
69*5956d97fSEmmanuel Vadot      phy[1-2] are available, in xRX330 phy[1-3] and in XRX330 phy[1-4].
70*5956d97fSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
71*5956d97fSEmmanuel Vadot    minimum: 0x0
72*5956d97fSEmmanuel Vadot    maximum: 0x7
73*5956d97fSEmmanuel Vadot
74*5956d97fSEmmanuel Vadotrequired:
75*5956d97fSEmmanuel Vadot  - compatible
76*5956d97fSEmmanuel Vadot  - reg
77*5956d97fSEmmanuel Vadot  - gpio-controller
78*5956d97fSEmmanuel Vadot  - "#gpio-cells"
79*5956d97fSEmmanuel Vadot
80*5956d97fSEmmanuel VadotadditionalProperties: false
81*5956d97fSEmmanuel Vadot
82*5956d97fSEmmanuel Vadotexamples:
83*5956d97fSEmmanuel Vadot  - |
84*5956d97fSEmmanuel Vadot    gpio@e100bb0 {
85*5956d97fSEmmanuel Vadot        compatible = "lantiq,gpio-stp-xway";
86*5956d97fSEmmanuel Vadot        reg = <0xE100BB0 0x40>;
87*5956d97fSEmmanuel Vadot        #gpio-cells = <2>;
88*5956d97fSEmmanuel Vadot        gpio-controller;
89*5956d97fSEmmanuel Vadot
90*5956d97fSEmmanuel Vadot        pinctrl-0 = <&stp_pins>;
91*5956d97fSEmmanuel Vadot        pinctrl-names = "default";
92*5956d97fSEmmanuel Vadot
93*5956d97fSEmmanuel Vadot        lantiq,shadow = <0xffffff>;
94*5956d97fSEmmanuel Vadot        lantiq,groups = <0x7>;
95*5956d97fSEmmanuel Vadot        lantiq,dsl = <0x3>;
96*5956d97fSEmmanuel Vadot        lantiq,phy1 = <0x7>;
97*5956d97fSEmmanuel Vadot        lantiq,phy2 = <0x7>;
98*5956d97fSEmmanuel Vadot    };
99*5956d97fSEmmanuel Vadot...
100