xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/aspeed-lpc.txt (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
1======================================================================
2Device tree bindings for the Aspeed Low Pin Count (LPC) Bus Controller
3======================================================================
4
5The LPC bus is a means to bridge a host CPU to a number of low-bandwidth
6peripheral devices, replacing the use of the ISA bus in the age of PCI[0]. The
7primary 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
9conditions it can also take the role of bus master.
10
11The LPC controller is represented as a multi-function device to account for the
12mix of functionality it provides. The principle split is between the register
13layout 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
15H8S/2168[1]", and everything else, where everything else is an eclectic
16collection of functions with a esoteric register layout. "Everything else",
17here labeled the "host" portion of the controller, includes, but is not limited
18to:
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
34Additionally the state of the LPC controller influences the pinmux
35configuration, therefore the host portion of the controller is exposed as a
36syscon 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
43Required properties
44===================
45
46- compatible:	One of:
47		"aspeed,ast2400-lpc", "simple-mfd"
48		"aspeed,ast2500-lpc", "simple-mfd"
49
50- reg:		contains the physical address and length values of the Aspeed
51                LPC memory region.
52
53- #address-cells: <1>
54- #size-cells:	<1>
55- ranges: 	Maps 0 to the physical address and length of the LPC memory
56                region
57
58Required LPC Child nodes
59========================
60
61BMC Node
62--------
63
64- compatible:	One of:
65		"aspeed,ast2400-lpc-bmc"
66		"aspeed,ast2500-lpc-bmc"
67
68- reg:		contains the physical address and length values of the
69                H8S/2168-compatible LPC controller memory region
70
71Host Node
72---------
73
74- compatible:   One of:
75		"aspeed,ast2400-lpc-host", "simple-mfd", "syscon"
76		"aspeed,ast2500-lpc-host", "simple-mfd", "syscon"
77
78- reg:		contains the address and length values of the host-related
79                register space for the Aspeed LPC controller
80
81- #address-cells: <1>
82- #size-cells:	<1>
83- ranges: 	Maps 0 to the address and length of the host-related LPC memory
84                region
85
86Example:
87
88lpc: lpc@1e789000 {
89	compatible = "aspeed,ast2500-lpc", "simple-mfd";
90	reg = <0x1e789000 0x1000>;
91
92	#address-cells = <1>;
93	#size-cells = <1>;
94	ranges = <0x0 0x1e789000 0x1000>;
95
96	lpc_bmc: lpc-bmc@0 {
97		compatible = "aspeed,ast2500-lpc-bmc";
98		reg = <0x0 0x80>;
99	};
100
101	lpc_host: lpc-host@80 {
102		compatible = "aspeed,ast2500-lpc-host", "simple-mfd", "syscon";
103		reg = <0x80 0x1e0>;
104		reg-io-width = <4>;
105
106		#address-cells = <1>;
107		#size-cells = <1>;
108		ranges = <0x0 0x80 0x1e0>;
109	};
110};
111
112BMC Node Children
113==================
114
115
116Host Node Children
117==================
118
119LPC Host Interface Controller
120-------------------
121
122The LPC Host Interface Controller manages functions exposed to the host such as
123LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART
124management and bus snoop configuration.
125
126Required properties:
127
128- compatible:	One of:
129		"aspeed,ast2400-lpc-ctrl";
130		"aspeed,ast2500-lpc-ctrl";
131
132- reg:		contains offset/length values of the host interface controller
133		memory regions
134
135- clocks:	contains a phandle to the syscon node describing the clocks.
136		There should then be one cell representing the clock to use
137
138Optional properties:
139
140- memory-region: A phandle to a reserved_memory region to be used for the LPC
141		to AHB mapping
142
143- flash:	A phandle to the SPI flash controller containing the flash to
144		be exposed over the LPC to AHB mapping
145
146Example:
147
148lpc-host@80 {
149	lpc_ctrl: lpc-ctrl@0 {
150		compatible = "aspeed,ast2500-lpc-ctrl";
151		reg = <0x0 0x80>;
152		clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
153		memory-region = <&flash_memory>;
154		flash = <&spi>;
155	};
156};
157
158LPC Host Controller
159-------------------
160
161The Aspeed LPC Host Controller configures the Low Pin Count (LPC) bus behaviour
162between the host and the baseboard management controller. The registers exist
163in the "host" portion of the Aspeed LPC controller, which must be the parent of
164the LPC host controller node.
165
166Required properties:
167
168- compatible:	One of:
169		"aspeed,ast2400-lhc";
170		"aspeed,ast2500-lhc";
171
172- reg:		contains offset/length values of the LHC memory regions. In the
173		AST2400 and AST2500 there are two regions.
174
175Example:
176
177lhc: lhc@20 {
178	compatible = "aspeed,ast2500-lhc";
179	reg = <0x20 0x24 0x48 0x8>;
180};
181
182LPC reset control
183-----------------
184
185The UARTs present in the ASPEED SoC can have their resets tied to the reset
186state of the LPC bus. Some systems may chose to modify this configuration.
187
188Required properties:
189
190 - compatible:		"aspeed,ast2500-lpc-reset" or
191			"aspeed,ast2400-lpc-reset"
192 - reg:			offset and length of the IP in the LHC memory region
193 - #reset-controller	indicates the number of reset cells expected
194
195Example:
196
197lpc_reset: reset-controller@18 {
198        compatible = "aspeed,ast2500-lpc-reset";
199        reg = <0x18 0x4>;
200        #reset-cells = <1>;
201};
202