1c66ec88fSEmmanuel Vadot====================================================================== 2c66ec88fSEmmanuel VadotDevice tree bindings for the Aspeed Low Pin Count (LPC) Bus Controller 3c66ec88fSEmmanuel Vadot====================================================================== 4c66ec88fSEmmanuel Vadot 5c66ec88fSEmmanuel VadotThe LPC bus is a means to bridge a host CPU to a number of low-bandwidth 6c66ec88fSEmmanuel Vadotperipheral devices, replacing the use of the ISA bus in the age of PCI[0]. The 7c66ec88fSEmmanuel Vadotprimary use case of the Aspeed LPC controller is as a slave on the bus 8c66ec88fSEmmanuel Vadot(typically in a Baseboard Management Controller SoC), but under certain 9c66ec88fSEmmanuel Vadotconditions it can also take the role of bus master. 10c66ec88fSEmmanuel Vadot 11c66ec88fSEmmanuel VadotThe LPC controller is represented as a multi-function device to account for the 12*2eb4d8dcSEmmanuel Vadotmix of functionality, which includes, but is not limited to: 13c66ec88fSEmmanuel Vadot 14c66ec88fSEmmanuel Vadot* An IPMI Block Transfer[2] Controller 15c66ec88fSEmmanuel Vadot 16c66ec88fSEmmanuel Vadot* An LPC Host Controller: Manages LPC functions such as host vs slave mode, the 17c66ec88fSEmmanuel Vadot physical properties of some LPC pins, configuration of serial IRQs, and 18c66ec88fSEmmanuel Vadot APB-to-LPC bridging amonst other functions. 19c66ec88fSEmmanuel Vadot 20c66ec88fSEmmanuel Vadot* An LPC Host Interface Controller: Manages functions exposed to the host such 21c66ec88fSEmmanuel Vadot as LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART 22c66ec88fSEmmanuel Vadot management and bus snoop configuration. 23c66ec88fSEmmanuel Vadot 24c66ec88fSEmmanuel Vadot* A set of SuperIO[3] scratch registers: Enables implementation of e.g. custom 25c66ec88fSEmmanuel Vadot hardware management protocols for handover between the host and baseboard 26c66ec88fSEmmanuel Vadot management controller. 27c66ec88fSEmmanuel Vadot 28c66ec88fSEmmanuel VadotAdditionally the state of the LPC controller influences the pinmux 29c66ec88fSEmmanuel Vadotconfiguration, therefore the host portion of the controller is exposed as a 30c66ec88fSEmmanuel Vadotsyscon as a means to arbitrate access. 31c66ec88fSEmmanuel Vadot 32c66ec88fSEmmanuel Vadot[0] http://www.intel.com/design/chipsets/industry/25128901.pdf 33c66ec88fSEmmanuel Vadot[1] https://www.renesas.com/en-sg/doc/products/mpumcu/001/rej09b0078_h8s2168.pdf?key=7c88837454702128622bee53acbda8f4 34c66ec88fSEmmanuel Vadot[2] https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmi-second-gen-interface-spec-v2-rev1-1.pdf 35c66ec88fSEmmanuel Vadot[3] https://en.wikipedia.org/wiki/Super_I/O 36c66ec88fSEmmanuel Vadot 37c66ec88fSEmmanuel VadotRequired properties 38c66ec88fSEmmanuel Vadot=================== 39c66ec88fSEmmanuel Vadot 40c66ec88fSEmmanuel Vadot- compatible: One of: 41*2eb4d8dcSEmmanuel Vadot "aspeed,ast2400-lpc-v2", "simple-mfd", "syscon" 42*2eb4d8dcSEmmanuel Vadot "aspeed,ast2500-lpc-v2", "simple-mfd", "syscon" 43*2eb4d8dcSEmmanuel Vadot "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon" 44c66ec88fSEmmanuel Vadot 45c66ec88fSEmmanuel Vadot- reg: contains the physical address and length values of the Aspeed 46c66ec88fSEmmanuel Vadot LPC memory region. 47c66ec88fSEmmanuel Vadot 48c66ec88fSEmmanuel Vadot- #address-cells: <1> 49c66ec88fSEmmanuel Vadot- #size-cells: <1> 50c66ec88fSEmmanuel Vadot- ranges: Maps 0 to the physical address and length of the LPC memory 51c66ec88fSEmmanuel Vadot region 52c66ec88fSEmmanuel Vadot 53c66ec88fSEmmanuel VadotExample: 54c66ec88fSEmmanuel Vadot 55c66ec88fSEmmanuel Vadotlpc: lpc@1e789000 { 56*2eb4d8dcSEmmanuel Vadot compatible = "aspeed,ast2500-lpc-v2", "simple-mfd", "syscon"; 57c66ec88fSEmmanuel Vadot reg = <0x1e789000 0x1000>; 58c66ec88fSEmmanuel Vadot 59c66ec88fSEmmanuel Vadot #address-cells = <1>; 60c66ec88fSEmmanuel Vadot #size-cells = <1>; 61c66ec88fSEmmanuel Vadot ranges = <0x0 0x1e789000 0x1000>; 62c66ec88fSEmmanuel Vadot 63*2eb4d8dcSEmmanuel Vadot lpc_snoop: lpc-snoop@0 { 64*2eb4d8dcSEmmanuel Vadot compatible = "aspeed,ast2600-lpc-snoop"; 65c66ec88fSEmmanuel Vadot reg = <0x0 0x80>; 66*2eb4d8dcSEmmanuel Vadot interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>; 67*2eb4d8dcSEmmanuel Vadot snoop-ports = <0x80>; 68c66ec88fSEmmanuel Vadot }; 69c66ec88fSEmmanuel Vadot}; 70c66ec88fSEmmanuel Vadot 71c66ec88fSEmmanuel Vadot 72c66ec88fSEmmanuel VadotLPC Host Interface Controller 73c66ec88fSEmmanuel Vadot------------------- 74c66ec88fSEmmanuel Vadot 75c66ec88fSEmmanuel VadotThe LPC Host Interface Controller manages functions exposed to the host such as 76c66ec88fSEmmanuel VadotLPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART 77c66ec88fSEmmanuel Vadotmanagement and bus snoop configuration. 78c66ec88fSEmmanuel Vadot 79c66ec88fSEmmanuel VadotRequired properties: 80c66ec88fSEmmanuel Vadot 81c66ec88fSEmmanuel Vadot- compatible: One of: 82c66ec88fSEmmanuel Vadot "aspeed,ast2400-lpc-ctrl"; 83c66ec88fSEmmanuel Vadot "aspeed,ast2500-lpc-ctrl"; 845def4c47SEmmanuel Vadot "aspeed,ast2600-lpc-ctrl"; 85c66ec88fSEmmanuel Vadot 86c66ec88fSEmmanuel Vadot- reg: contains offset/length values of the host interface controller 87c66ec88fSEmmanuel Vadot memory regions 88c66ec88fSEmmanuel Vadot 89c66ec88fSEmmanuel Vadot- clocks: contains a phandle to the syscon node describing the clocks. 90c66ec88fSEmmanuel Vadot There should then be one cell representing the clock to use 91c66ec88fSEmmanuel Vadot 92c66ec88fSEmmanuel VadotOptional properties: 93c66ec88fSEmmanuel Vadot 94c66ec88fSEmmanuel Vadot- memory-region: A phandle to a reserved_memory region to be used for the LPC 95c66ec88fSEmmanuel Vadot to AHB mapping 96c66ec88fSEmmanuel Vadot 97c66ec88fSEmmanuel Vadot- flash: A phandle to the SPI flash controller containing the flash to 98c66ec88fSEmmanuel Vadot be exposed over the LPC to AHB mapping 99c66ec88fSEmmanuel Vadot 100c66ec88fSEmmanuel VadotExample: 101c66ec88fSEmmanuel Vadot 102*2eb4d8dcSEmmanuel Vadotlpc_ctrl: lpc-ctrl@80 { 103c66ec88fSEmmanuel Vadot compatible = "aspeed,ast2500-lpc-ctrl"; 104*2eb4d8dcSEmmanuel Vadot reg = <0x80 0x80>; 105c66ec88fSEmmanuel Vadot clocks = <&syscon ASPEED_CLK_GATE_LCLK>; 106c66ec88fSEmmanuel Vadot memory-region = <&flash_memory>; 107c66ec88fSEmmanuel Vadot flash = <&spi>; 108c66ec88fSEmmanuel Vadot}; 109c66ec88fSEmmanuel Vadot 110c66ec88fSEmmanuel VadotLPC Host Controller 111c66ec88fSEmmanuel Vadot------------------- 112c66ec88fSEmmanuel Vadot 113c66ec88fSEmmanuel VadotThe Aspeed LPC Host Controller configures the Low Pin Count (LPC) bus behaviour 114c66ec88fSEmmanuel Vadotbetween the host and the baseboard management controller. The registers exist 115c66ec88fSEmmanuel Vadotin the "host" portion of the Aspeed LPC controller, which must be the parent of 116c66ec88fSEmmanuel Vadotthe LPC host controller node. 117c66ec88fSEmmanuel Vadot 118c66ec88fSEmmanuel VadotRequired properties: 119c66ec88fSEmmanuel Vadot 120c66ec88fSEmmanuel Vadot- compatible: One of: 121c66ec88fSEmmanuel Vadot "aspeed,ast2400-lhc"; 122c66ec88fSEmmanuel Vadot "aspeed,ast2500-lhc"; 1235def4c47SEmmanuel Vadot "aspeed,ast2600-lhc"; 124c66ec88fSEmmanuel Vadot 125c66ec88fSEmmanuel Vadot- reg: contains offset/length values of the LHC memory regions. In the 126c66ec88fSEmmanuel Vadot AST2400 and AST2500 there are two regions. 127c66ec88fSEmmanuel Vadot 128c66ec88fSEmmanuel VadotExample: 129c66ec88fSEmmanuel Vadot 130*2eb4d8dcSEmmanuel Vadotlhc: lhc@a0 { 131c66ec88fSEmmanuel Vadot compatible = "aspeed,ast2500-lhc"; 132*2eb4d8dcSEmmanuel Vadot reg = <0xa0 0x24 0xc8 0x8>; 133c66ec88fSEmmanuel Vadot}; 134c66ec88fSEmmanuel Vadot 135c66ec88fSEmmanuel VadotLPC reset control 136c66ec88fSEmmanuel Vadot----------------- 137c66ec88fSEmmanuel Vadot 138c66ec88fSEmmanuel VadotThe UARTs present in the ASPEED SoC can have their resets tied to the reset 139c66ec88fSEmmanuel Vadotstate of the LPC bus. Some systems may chose to modify this configuration. 140c66ec88fSEmmanuel Vadot 141c66ec88fSEmmanuel VadotRequired properties: 142c66ec88fSEmmanuel Vadot 143*2eb4d8dcSEmmanuel Vadot - compatible: One of: 144*2eb4d8dcSEmmanuel Vadot "aspeed,ast2600-lpc-reset"; 145*2eb4d8dcSEmmanuel Vadot "aspeed,ast2500-lpc-reset"; 146*2eb4d8dcSEmmanuel Vadot "aspeed,ast2400-lpc-reset"; 147*2eb4d8dcSEmmanuel Vadot 148c66ec88fSEmmanuel Vadot - reg: offset and length of the IP in the LHC memory region 149c66ec88fSEmmanuel Vadot - #reset-controller indicates the number of reset cells expected 150c66ec88fSEmmanuel Vadot 151c66ec88fSEmmanuel VadotExample: 152c66ec88fSEmmanuel Vadot 153*2eb4d8dcSEmmanuel Vadotlpc_reset: reset-controller@98 { 154c66ec88fSEmmanuel Vadot compatible = "aspeed,ast2500-lpc-reset"; 155*2eb4d8dcSEmmanuel Vadot reg = <0x98 0x4>; 156c66ec88fSEmmanuel Vadot #reset-cells = <1>; 157c66ec88fSEmmanuel Vadot}; 158