Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / mfd / aspeed-lpc.txt
1 ======================================================================
2 Device tree bindings for the Aspeed Low Pin Count (LPC) Bus Controller
3 ======================================================================
4
5 The LPC bus is a means to bridge a host CPU to a number of low-bandwidth
6 peripheral devices, replacing the use of the ISA bus in the age of PCI[0]. The
7 primary use case of the Aspeed LPC controller is as a slave on the bus
8 (typically in a Baseboard Management Controller SoC), but under certain
9 conditions it can also take the role of bus master.
10
11 The LPC controller is represented as a multi-function device to account for the
12 mix of functionality it provides. The principle split is between the register
13 layout at the start of the I/O space which is, to quote the Aspeed datasheet,
14 "basically compatible with the [LPC registers from the] popular BMC controller
15 H8S/2168[1]", and everything else, where everything else is an eclectic
16 collection of functions with a esoteric register layout. "Everything else",
17 here labeled the "host" portion of the controller, includes, but is not limited
18 to:
19
20 * An IPMI Block Transfer[2] Controller
21
22 * An LPC Host Controller: Manages LPC functions such as host vs slave mode, the
23   physical properties of some LPC pins, configuration of serial IRQs, and
24   APB-to-LPC bridging amonst other functions.
25
26 * An LPC Host Interface Controller: Manages functions exposed to the host such
27   as LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART
28   management and bus snoop configuration.
29
30 * A set of SuperIO[3] scratch registers: Enables implementation of e.g. custom
31   hardware management protocols for handover between the host and baseboard
32   management controller.
33
34 Additionally the state of the LPC controller influences the pinmux
35 configuration, therefore the host portion of the controller is exposed as a
36 syscon as a means to arbitrate access.
37
38 [0] http://www.intel.com/design/chipsets/industry/25128901.pdf
39 [1] https://www.renesas.com/en-sg/doc/products/mpumcu/001/rej09b0078_h8s2168.pdf?key=7c88837454702128622bee53acbda8f4
40 [2] https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmi-second-gen-interface-spec-v2-rev1-1.pdf
41 [3] https://en.wikipedia.org/wiki/Super_I/O
42
43 Required properties
44 ===================
45
46 - compatible:   One of:
47                 "aspeed,ast2400-lpc", "simple-mfd"
48                 "aspeed,ast2500-lpc", "simple-mfd"
49                 "aspeed,ast2600-lpc", "simple-mfd"
50
51 - reg:          contains the physical address and length values of the Aspeed
52                 LPC memory region.
53
54 - #address-cells: <1>
55 - #size-cells:  <1>
56 - ranges:       Maps 0 to the physical address and length of the LPC memory
57                 region
58
59 Required LPC Child nodes
60 ========================
61
62 BMC Node
63 --------
64
65 - compatible:   One of:
66                 "aspeed,ast2400-lpc-bmc"
67                 "aspeed,ast2500-lpc-bmc"
68                 "aspeed,ast2600-lpc-bmc"
69
70 - reg:          contains the physical address and length values of the
71                 H8S/2168-compatible LPC controller memory region
72
73 Host Node
74 ---------
75
76 - compatible:   One of:
77                 "aspeed,ast2400-lpc-host", "simple-mfd", "syscon"
78                 "aspeed,ast2500-lpc-host", "simple-mfd", "syscon"
79                 "aspeed,ast2600-lpc-host", "simple-mfd", "syscon"
80
81 - reg:          contains the address and length values of the host-related
82                 register space for the Aspeed LPC controller
83
84 - #address-cells: <1>
85 - #size-cells:  <1>
86 - ranges:       Maps 0 to the address and length of the host-related LPC memory
87                 region
88
89 Example:
90
91 lpc: lpc@1e789000 {
92         compatible = "aspeed,ast2500-lpc", "simple-mfd";
93         reg = <0x1e789000 0x1000>;
94
95         #address-cells = <1>;
96         #size-cells = <1>;
97         ranges = <0x0 0x1e789000 0x1000>;
98
99         lpc_bmc: lpc-bmc@0 {
100                 compatible = "aspeed,ast2500-lpc-bmc";
101                 reg = <0x0 0x80>;
102         };
103
104         lpc_host: lpc-host@80 {
105                 compatible = "aspeed,ast2500-lpc-host", "simple-mfd", "syscon";
106                 reg = <0x80 0x1e0>;
107                 reg-io-width = <4>;
108
109                 #address-cells = <1>;
110                 #size-cells = <1>;
111                 ranges = <0x0 0x80 0x1e0>;
112         };
113 };
114
115 BMC Node Children
116 ==================
117
118
119 Host Node Children
120 ==================
121
122 LPC Host Interface Controller
123 -------------------
124
125 The LPC Host Interface Controller manages functions exposed to the host such as
126 LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART
127 management and bus snoop configuration.
128
129 Required properties:
130
131 - compatible:   One of:
132                 "aspeed,ast2400-lpc-ctrl";
133                 "aspeed,ast2500-lpc-ctrl";
134                 "aspeed,ast2600-lpc-ctrl";
135
136 - reg:          contains offset/length values of the host interface controller
137                 memory regions
138
139 - clocks:       contains a phandle to the syscon node describing the clocks.
140                 There should then be one cell representing the clock to use
141
142 Optional properties:
143
144 - memory-region: A phandle to a reserved_memory region to be used for the LPC
145                 to AHB mapping
146
147 - flash:        A phandle to the SPI flash controller containing the flash to
148                 be exposed over the LPC to AHB mapping
149
150 Example:
151
152 lpc-host@80 {
153         lpc_ctrl: lpc-ctrl@0 {
154                 compatible = "aspeed,ast2500-lpc-ctrl";
155                 reg = <0x0 0x80>;
156                 clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
157                 memory-region = <&flash_memory>;
158                 flash = <&spi>;
159         };
160 };
161
162 LPC Host Controller
163 -------------------
164
165 The Aspeed LPC Host Controller configures the Low Pin Count (LPC) bus behaviour
166 between the host and the baseboard management controller. The registers exist
167 in the "host" portion of the Aspeed LPC controller, which must be the parent of
168 the LPC host controller node.
169
170 Required properties:
171
172 - compatible:   One of:
173                 "aspeed,ast2400-lhc";
174                 "aspeed,ast2500-lhc";
175                 "aspeed,ast2600-lhc";
176
177 - reg:          contains offset/length values of the LHC memory regions. In the
178                 AST2400 and AST2500 there are two regions.
179
180 Example:
181
182 lhc: lhc@20 {
183         compatible = "aspeed,ast2500-lhc";
184         reg = <0x20 0x24 0x48 0x8>;
185 };
186
187 LPC reset control
188 -----------------
189
190 The UARTs present in the ASPEED SoC can have their resets tied to the reset
191 state of the LPC bus. Some systems may chose to modify this configuration.
192
193 Required properties:
194
195  - compatible:          "aspeed,ast2600-lpc-reset" or
196                         "aspeed,ast2500-lpc-reset"
197                         "aspeed,ast2400-lpc-reset"
198  - reg:                 offset and length of the IP in the LHC memory region
199  - #reset-controller    indicates the number of reset cells expected
200
201 Example:
202
203 lpc_reset: reset-controller@18 {
204         compatible = "aspeed,ast2500-lpc-reset";
205         reg = <0x18 0x4>;
206         #reset-cells = <1>;
207 };