xref: /freebsd/sys/contrib/device-tree/Bindings/gpio/aspeed,sgpio.yaml (revision 354d7675fe12ace9cde344cb79c7ded792802f88)
1*354d7675SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*354d7675SEmmanuel Vadot%YAML 1.2
3*354d7675SEmmanuel Vadot---
4*354d7675SEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/aspeed,sgpio.yaml#
5*354d7675SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*354d7675SEmmanuel Vadot
7*354d7675SEmmanuel Vadottitle: Aspeed SGPIO controller
8*354d7675SEmmanuel Vadot
9*354d7675SEmmanuel Vadotmaintainers:
10*354d7675SEmmanuel Vadot  - Andrew Jeffery <andrew@aj.id.au>
11*354d7675SEmmanuel Vadot
12*354d7675SEmmanuel Vadotdescription:
13*354d7675SEmmanuel Vadot  This SGPIO controller is for ASPEED AST2400, AST2500 and AST2600 SoC,
14*354d7675SEmmanuel Vadot  AST2600 have two sgpio master one with 128 pins another one with 80 pins,
15*354d7675SEmmanuel Vadot  AST2500/AST2400 have one sgpio master with 80 pins. Each of the Serial
16*354d7675SEmmanuel Vadot  GPIO pins can be programmed to support the following options
17*354d7675SEmmanuel Vadot  - Support interrupt option for each input port and various interrupt
18*354d7675SEmmanuel Vadot    sensitivity option (level-high, level-low, edge-high, edge-low)
19*354d7675SEmmanuel Vadot  - Support reset tolerance option for each output port
20*354d7675SEmmanuel Vadot  - Directly connected to APB bus and its shift clock is from APB bus clock
21*354d7675SEmmanuel Vadot    divided by a programmable value.
22*354d7675SEmmanuel Vadot  - Co-work with external signal-chained TTL components (74LV165/74LV595)
23*354d7675SEmmanuel Vadot
24*354d7675SEmmanuel Vadotproperties:
25*354d7675SEmmanuel Vadot  compatible:
26*354d7675SEmmanuel Vadot    enum:
27*354d7675SEmmanuel Vadot      - aspeed,ast2400-sgpio
28*354d7675SEmmanuel Vadot      - aspeed,ast2500-sgpio
29*354d7675SEmmanuel Vadot      - aspeed,ast2600-sgpiom
30*354d7675SEmmanuel Vadot
31*354d7675SEmmanuel Vadot  reg:
32*354d7675SEmmanuel Vadot    maxItems: 1
33*354d7675SEmmanuel Vadot
34*354d7675SEmmanuel Vadot  gpio-controller: true
35*354d7675SEmmanuel Vadot
36*354d7675SEmmanuel Vadot  '#gpio-cells':
37*354d7675SEmmanuel Vadot    const: 2
38*354d7675SEmmanuel Vadot
39*354d7675SEmmanuel Vadot  interrupts:
40*354d7675SEmmanuel Vadot    maxItems: 1
41*354d7675SEmmanuel Vadot
42*354d7675SEmmanuel Vadot  interrupt-controller: true
43*354d7675SEmmanuel Vadot
44*354d7675SEmmanuel Vadot  clocks:
45*354d7675SEmmanuel Vadot    maxItems: 1
46*354d7675SEmmanuel Vadot
47*354d7675SEmmanuel Vadot  ngpios: true
48*354d7675SEmmanuel Vadot
49*354d7675SEmmanuel Vadot  bus-frequency: true
50*354d7675SEmmanuel Vadot
51*354d7675SEmmanuel Vadotrequired:
52*354d7675SEmmanuel Vadot  - compatible
53*354d7675SEmmanuel Vadot  - reg
54*354d7675SEmmanuel Vadot  - gpio-controller
55*354d7675SEmmanuel Vadot  - '#gpio-cells'
56*354d7675SEmmanuel Vadot  - interrupts
57*354d7675SEmmanuel Vadot  - interrupt-controller
58*354d7675SEmmanuel Vadot  - ngpios
59*354d7675SEmmanuel Vadot  - clocks
60*354d7675SEmmanuel Vadot  - bus-frequency
61*354d7675SEmmanuel Vadot
62*354d7675SEmmanuel VadotadditionalProperties: false
63*354d7675SEmmanuel Vadot
64*354d7675SEmmanuel Vadotexamples:
65*354d7675SEmmanuel Vadot  - |
66*354d7675SEmmanuel Vadot    #include <dt-bindings/clock/aspeed-clock.h>
67*354d7675SEmmanuel Vadot    sgpio: sgpio@1e780200 {
68*354d7675SEmmanuel Vadot        #gpio-cells = <2>;
69*354d7675SEmmanuel Vadot        compatible = "aspeed,ast2500-sgpio";
70*354d7675SEmmanuel Vadot        gpio-controller;
71*354d7675SEmmanuel Vadot        interrupts = <40>;
72*354d7675SEmmanuel Vadot        reg = <0x1e780200 0x0100>;
73*354d7675SEmmanuel Vadot        clocks = <&syscon ASPEED_CLK_APB>;
74*354d7675SEmmanuel Vadot        interrupt-controller;
75*354d7675SEmmanuel Vadot        ngpios = <80>;
76*354d7675SEmmanuel Vadot        bus-frequency = <12000000>;
77*354d7675SEmmanuel Vadot    };
78