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] http://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 138- memory-region: A phandle to a reserved_memory region to be used for the LPC 139 to AHB mapping 140 141- flash: A phandle to the SPI flash controller containing the flash to 142 be exposed over the LPC to AHB mapping 143 144Example: 145 146lpc-host@80 { 147 lpc_ctrl: lpc-ctrl@0 { 148 compatible = "aspeed,ast2500-lpc-ctrl"; 149 reg = <0x0 0x80>; 150 clocks = <&syscon ASPEED_CLK_GATE_LCLK>; 151 memory-region = <&flash_memory>; 152 flash = <&spi>; 153 }; 154}; 155 156LPC Host Controller 157------------------- 158 159The Aspeed LPC Host Controller configures the Low Pin Count (LPC) bus behaviour 160between the host and the baseboard management controller. The registers exist 161in the "host" portion of the Aspeed LPC controller, which must be the parent of 162the LPC host controller node. 163 164Required properties: 165 166- compatible: One of: 167 "aspeed,ast2400-lhc"; 168 "aspeed,ast2500-lhc"; 169 170- reg: contains offset/length values of the LHC memory regions. In the 171 AST2400 and AST2500 there are two regions. 172 173Example: 174 175lhc: lhc@20 { 176 compatible = "aspeed,ast2500-lhc"; 177 reg = <0x20 0x24 0x48 0x8>; 178}; 179 180LPC reset control 181----------------- 182 183The UARTs present in the ASPEED SoC can have their resets tied to the reset 184state of the LPC bus. Some systems may chose to modify this configuration. 185 186Required properties: 187 188 - compatible: "aspeed,ast2500-lpc-reset" or 189 "aspeed,ast2400-lpc-reset" 190 - reg: offset and length of the IP in the LHC memory region 191 - #reset-controller indicates the number of reset cells expected 192 193Example: 194 195lpc_reset: reset-controller@18 { 196 compatible = "aspeed,ast2500-lpc-reset"; 197 reg = <0x18 0x4>; 198 #reset-cells = <1>; 199}; 200