xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/gpio/sgpio-aspeed.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunAspeed SGPIO controller Device Tree Bindings
2*4882a593Smuzhiyun--------------------------------------------
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunThis SGPIO controller is for ASPEED AST2500 SoC, it supports up to 80 full
5*4882a593Smuzhiyunfeatured Serial GPIOs. Each of the Serial GPIO pins can be programmed to
6*4882a593Smuzhiyunsupport the following options:
7*4882a593Smuzhiyun- Support interrupt option for each input port and various interrupt
8*4882a593Smuzhiyun  sensitivity option (level-high, level-low, edge-high, edge-low)
9*4882a593Smuzhiyun- Support reset tolerance option for each output port
10*4882a593Smuzhiyun- Directly connected to APB bus and its shift clock is from APB bus clock
11*4882a593Smuzhiyun  divided by a programmable value.
12*4882a593Smuzhiyun- Co-work with external signal-chained TTL components (74LV165/74LV595)
13*4882a593Smuzhiyun
14*4882a593SmuzhiyunRequired properties:
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun- compatible : Should be one of
17*4882a593Smuzhiyun  "aspeed,ast2400-sgpio", "aspeed,ast2500-sgpio"
18*4882a593Smuzhiyun- #gpio-cells : Should be 2, see gpio.txt
19*4882a593Smuzhiyun- reg : Address and length of the register set for the device
20*4882a593Smuzhiyun- gpio-controller : Marks the device node as a GPIO controller
21*4882a593Smuzhiyun- interrupts : Interrupt specifier, see interrupt-controller/interrupts.txt
22*4882a593Smuzhiyun- interrupt-controller : Mark the GPIO controller as an interrupt-controller
23*4882a593Smuzhiyun- ngpios : number of *hardware* GPIO lines, see gpio.txt. This will expose
24*4882a593Smuzhiyun  2 software GPIOs per hardware GPIO: one for hardware input, one for hardware
25*4882a593Smuzhiyun  output. Up to 80 pins, must be a multiple of 8.
26*4882a593Smuzhiyun- clocks : A phandle to the APB clock for SGPM clock division
27*4882a593Smuzhiyun- bus-frequency : SGPM CLK frequency
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunThe sgpio and interrupt properties are further described in their respective
30*4882a593Smuzhiyunbindings documentation:
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun- Documentation/devicetree/bindings/gpio/gpio.txt
33*4882a593Smuzhiyun- Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun  Example:
36*4882a593Smuzhiyun	sgpio: sgpio@1e780200 {
37*4882a593Smuzhiyun		#gpio-cells = <2>;
38*4882a593Smuzhiyun		compatible = "aspeed,ast2500-sgpio";
39*4882a593Smuzhiyun		gpio-controller;
40*4882a593Smuzhiyun		interrupts = <40>;
41*4882a593Smuzhiyun		reg = <0x1e780200 0x0100>;
42*4882a593Smuzhiyun		clocks = <&syscon ASPEED_CLK_APB>;
43*4882a593Smuzhiyun		interrupt-controller;
44*4882a593Smuzhiyun		ngpios = <8>;
45*4882a593Smuzhiyun		bus-frequency = <12000000>;
46*4882a593Smuzhiyun	};
47