1*8cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*8cc087a1SEmmanuel Vadot# # Copyright (c) 2021 Aspeed Tehchnology Inc. 3*8cc087a1SEmmanuel Vadot%YAML 1.2 4*8cc087a1SEmmanuel Vadot--- 5*8cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/aspeed-lpc.yaml# 6*8cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 7*8cc087a1SEmmanuel Vadot 8*8cc087a1SEmmanuel Vadottitle: Aspeed Low Pin Count (LPC) Bus Controller 9*8cc087a1SEmmanuel Vadot 10*8cc087a1SEmmanuel Vadotmaintainers: 11*8cc087a1SEmmanuel Vadot - Andrew Jeffery <andrew@aj.id.au> 12*8cc087a1SEmmanuel Vadot - Chia-Wei Wang <chiawei_wang@aspeedtech.com> 13*8cc087a1SEmmanuel Vadot 14*8cc087a1SEmmanuel Vadotdescription: 15*8cc087a1SEmmanuel Vadot The LPC bus is a means to bridge a host CPU to a number of low-bandwidth 16*8cc087a1SEmmanuel Vadot peripheral devices, replacing the use of the ISA bus in the age of PCI[0]. The 17*8cc087a1SEmmanuel Vadot primary use case of the Aspeed LPC controller is as a slave on the bus 18*8cc087a1SEmmanuel Vadot (typically in a Baseboard Management Controller SoC), but under certain 19*8cc087a1SEmmanuel Vadot conditions it can also take the role of bus master. 20*8cc087a1SEmmanuel Vadot 21*8cc087a1SEmmanuel Vadot The LPC controller is represented as a multi-function device to account for the 22*8cc087a1SEmmanuel Vadot mix of functionality, which includes, but is not limited to 23*8cc087a1SEmmanuel Vadot 24*8cc087a1SEmmanuel Vadot * An IPMI Block Transfer[2] Controller 25*8cc087a1SEmmanuel Vadot 26*8cc087a1SEmmanuel Vadot * An LPC Host Interface Controller manages functions exposed to the host such 27*8cc087a1SEmmanuel Vadot as LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART 28*8cc087a1SEmmanuel Vadot management and bus snoop configuration. 29*8cc087a1SEmmanuel Vadot 30*8cc087a1SEmmanuel Vadot * A set of SuperIO[3] scratch registers enableing implementation of e.g. custom 31*8cc087a1SEmmanuel Vadot hardware management protocols for handover between the host and baseboard 32*8cc087a1SEmmanuel Vadot management controller. 33*8cc087a1SEmmanuel Vadot 34*8cc087a1SEmmanuel Vadot Additionally the state of the LPC controller influences the pinmux 35*8cc087a1SEmmanuel Vadot configuration, therefore the host portion of the controller is exposed as a 36*8cc087a1SEmmanuel Vadot syscon as a means to arbitrate access. 37*8cc087a1SEmmanuel Vadot 38*8cc087a1SEmmanuel Vadotproperties: 39*8cc087a1SEmmanuel Vadot compatible: 40*8cc087a1SEmmanuel Vadot items: 41*8cc087a1SEmmanuel Vadot - enum: 42*8cc087a1SEmmanuel Vadot - aspeed,ast2400-lpc-v2 43*8cc087a1SEmmanuel Vadot - aspeed,ast2500-lpc-v2 44*8cc087a1SEmmanuel Vadot - aspeed,ast2600-lpc-v2 45*8cc087a1SEmmanuel Vadot - const: simple-mfd 46*8cc087a1SEmmanuel Vadot - const: syscon 47*8cc087a1SEmmanuel Vadot 48*8cc087a1SEmmanuel Vadot reg: 49*8cc087a1SEmmanuel Vadot maxItems: 1 50*8cc087a1SEmmanuel Vadot 51*8cc087a1SEmmanuel Vadot "#address-cells": 52*8cc087a1SEmmanuel Vadot const: 1 53*8cc087a1SEmmanuel Vadot 54*8cc087a1SEmmanuel Vadot "#size-cells": 55*8cc087a1SEmmanuel Vadot const: 1 56*8cc087a1SEmmanuel Vadot 57*8cc087a1SEmmanuel Vadot ranges: true 58*8cc087a1SEmmanuel Vadot 59*8cc087a1SEmmanuel VadotpatternProperties: 60*8cc087a1SEmmanuel Vadot "^lpc-ctrl@[0-9a-f]+$": 61*8cc087a1SEmmanuel Vadot type: object 62*8cc087a1SEmmanuel Vadot additionalProperties: false 63*8cc087a1SEmmanuel Vadot 64*8cc087a1SEmmanuel Vadot description: | 65*8cc087a1SEmmanuel Vadot The LPC Host Interface Controller manages functions exposed to the host such as 66*8cc087a1SEmmanuel Vadot LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART management 67*8cc087a1SEmmanuel Vadot and bus snoop configuration. 68*8cc087a1SEmmanuel Vadot 69*8cc087a1SEmmanuel Vadot properties: 70*8cc087a1SEmmanuel Vadot compatible: 71*8cc087a1SEmmanuel Vadot items: 72*8cc087a1SEmmanuel Vadot - enum: 73*8cc087a1SEmmanuel Vadot - aspeed,ast2400-lpc-ctrl 74*8cc087a1SEmmanuel Vadot - aspeed,ast2500-lpc-ctrl 75*8cc087a1SEmmanuel Vadot - aspeed,ast2600-lpc-ctrl 76*8cc087a1SEmmanuel Vadot 77*8cc087a1SEmmanuel Vadot reg: 78*8cc087a1SEmmanuel Vadot maxItems: 1 79*8cc087a1SEmmanuel Vadot 80*8cc087a1SEmmanuel Vadot clocks: 81*8cc087a1SEmmanuel Vadot maxItems: 1 82*8cc087a1SEmmanuel Vadot 83*8cc087a1SEmmanuel Vadot memory-region: 84*8cc087a1SEmmanuel Vadot maxItems: 1 85*8cc087a1SEmmanuel Vadot description: handle to memory reservation for the LPC to AHB mapping region 86*8cc087a1SEmmanuel Vadot 87*8cc087a1SEmmanuel Vadot flash: 88*8cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/phandle 89*8cc087a1SEmmanuel Vadot description: The SPI flash controller containing the flash to be exposed over the LPC to AHB mapping 90*8cc087a1SEmmanuel Vadot 91*8cc087a1SEmmanuel Vadot required: 92*8cc087a1SEmmanuel Vadot - compatible 93*8cc087a1SEmmanuel Vadot - clocks 94*8cc087a1SEmmanuel Vadot 95*8cc087a1SEmmanuel Vadot "^reset-controller@[0-9a-f]+$": 96*8cc087a1SEmmanuel Vadot type: object 97*8cc087a1SEmmanuel Vadot additionalProperties: false 98*8cc087a1SEmmanuel Vadot 99*8cc087a1SEmmanuel Vadot description: 100*8cc087a1SEmmanuel Vadot The UARTs present in the ASPEED SoC can have their resets tied to the reset 101*8cc087a1SEmmanuel Vadot state of the LPC bus. Some systems may chose to modify this configuration 102*8cc087a1SEmmanuel Vadot 103*8cc087a1SEmmanuel Vadot properties: 104*8cc087a1SEmmanuel Vadot compatible: 105*8cc087a1SEmmanuel Vadot items: 106*8cc087a1SEmmanuel Vadot - enum: 107*8cc087a1SEmmanuel Vadot - aspeed,ast2400-lpc-reset 108*8cc087a1SEmmanuel Vadot - aspeed,ast2500-lpc-reset 109*8cc087a1SEmmanuel Vadot - aspeed,ast2600-lpc-reset 110*8cc087a1SEmmanuel Vadot 111*8cc087a1SEmmanuel Vadot reg: 112*8cc087a1SEmmanuel Vadot maxItems: 1 113*8cc087a1SEmmanuel Vadot 114*8cc087a1SEmmanuel Vadot '#reset-cells': 115*8cc087a1SEmmanuel Vadot const: 1 116*8cc087a1SEmmanuel Vadot 117*8cc087a1SEmmanuel Vadot required: 118*8cc087a1SEmmanuel Vadot - compatible 119*8cc087a1SEmmanuel Vadot - '#reset-cells' 120*8cc087a1SEmmanuel Vadot 121*8cc087a1SEmmanuel Vadot "^lpc-snoop@[0-9a-f]+$": 122*8cc087a1SEmmanuel Vadot type: object 123*8cc087a1SEmmanuel Vadot additionalProperties: false 124*8cc087a1SEmmanuel Vadot 125*8cc087a1SEmmanuel Vadot description: 126*8cc087a1SEmmanuel Vadot The LPC snoop interface allows the BMC to listen on and record the data 127*8cc087a1SEmmanuel Vadot bytes written by the Host to the targeted LPC I/O pots. 128*8cc087a1SEmmanuel Vadot 129*8cc087a1SEmmanuel Vadot properties: 130*8cc087a1SEmmanuel Vadot compatible: 131*8cc087a1SEmmanuel Vadot items: 132*8cc087a1SEmmanuel Vadot - enum: 133*8cc087a1SEmmanuel Vadot - aspeed,ast2400-lpc-snoop 134*8cc087a1SEmmanuel Vadot - aspeed,ast2500-lpc-snoop 135*8cc087a1SEmmanuel Vadot - aspeed,ast2600-lpc-snoop 136*8cc087a1SEmmanuel Vadot 137*8cc087a1SEmmanuel Vadot reg: 138*8cc087a1SEmmanuel Vadot maxItems: 1 139*8cc087a1SEmmanuel Vadot 140*8cc087a1SEmmanuel Vadot interrupts: 141*8cc087a1SEmmanuel Vadot maxItems: 1 142*8cc087a1SEmmanuel Vadot 143*8cc087a1SEmmanuel Vadot snoop-ports: 144*8cc087a1SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 145*8cc087a1SEmmanuel Vadot description: The LPC I/O ports to snoop 146*8cc087a1SEmmanuel Vadot 147*8cc087a1SEmmanuel Vadot required: 148*8cc087a1SEmmanuel Vadot - compatible 149*8cc087a1SEmmanuel Vadot - interrupts 150*8cc087a1SEmmanuel Vadot - snoop-ports 151*8cc087a1SEmmanuel Vadot 152*8cc087a1SEmmanuel Vadot "^uart-routing@[0-9a-f]+$": 153*8cc087a1SEmmanuel Vadot $ref: /schemas/soc/aspeed/uart-routing.yaml# 154*8cc087a1SEmmanuel Vadot description: The UART routing control under LPC register space 155*8cc087a1SEmmanuel Vadot 156*8cc087a1SEmmanuel Vadotrequired: 157*8cc087a1SEmmanuel Vadot - compatible 158*8cc087a1SEmmanuel Vadot - reg 159*8cc087a1SEmmanuel Vadot - "#address-cells" 160*8cc087a1SEmmanuel Vadot - "#size-cells" 161*8cc087a1SEmmanuel Vadot - ranges 162*8cc087a1SEmmanuel Vadot 163*8cc087a1SEmmanuel VadotadditionalProperties: 164*8cc087a1SEmmanuel Vadot type: object 165*8cc087a1SEmmanuel Vadot 166*8cc087a1SEmmanuel Vadotexamples: 167*8cc087a1SEmmanuel Vadot - | 168*8cc087a1SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 169*8cc087a1SEmmanuel Vadot #include <dt-bindings/clock/ast2600-clock.h> 170*8cc087a1SEmmanuel Vadot 171*8cc087a1SEmmanuel Vadot lpc: lpc@1e789000 { 172*8cc087a1SEmmanuel Vadot compatible = "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon"; 173*8cc087a1SEmmanuel Vadot reg = <0x1e789000 0x1000>; 174*8cc087a1SEmmanuel Vadot 175*8cc087a1SEmmanuel Vadot #address-cells = <1>; 176*8cc087a1SEmmanuel Vadot #size-cells = <1>; 177*8cc087a1SEmmanuel Vadot ranges = <0x0 0x1e789000 0x1000>; 178*8cc087a1SEmmanuel Vadot 179*8cc087a1SEmmanuel Vadot lpc_ctrl: lpc-ctrl@80 { 180*8cc087a1SEmmanuel Vadot compatible = "aspeed,ast2600-lpc-ctrl"; 181*8cc087a1SEmmanuel Vadot reg = <0x80 0x80>; 182*8cc087a1SEmmanuel Vadot clocks = <&syscon ASPEED_CLK_GATE_LCLK>; 183*8cc087a1SEmmanuel Vadot memory-region = <&flash_memory>; 184*8cc087a1SEmmanuel Vadot flash = <&spi>; 185*8cc087a1SEmmanuel Vadot }; 186*8cc087a1SEmmanuel Vadot 187*8cc087a1SEmmanuel Vadot lpc_reset: reset-controller@98 { 188*8cc087a1SEmmanuel Vadot compatible = "aspeed,ast2600-lpc-reset"; 189*8cc087a1SEmmanuel Vadot reg = <0x98 0x4>; 190*8cc087a1SEmmanuel Vadot #reset-cells = <1>; 191*8cc087a1SEmmanuel Vadot }; 192*8cc087a1SEmmanuel Vadot 193*8cc087a1SEmmanuel Vadot lpc_snoop: lpc-snoop@90 { 194*8cc087a1SEmmanuel Vadot compatible = "aspeed,ast2600-lpc-snoop"; 195*8cc087a1SEmmanuel Vadot reg = <0x90 0x8>; 196*8cc087a1SEmmanuel Vadot interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>; 197*8cc087a1SEmmanuel Vadot snoop-ports = <0x80>; 198*8cc087a1SEmmanuel Vadot }; 199*8cc087a1SEmmanuel Vadot }; 200