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