xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/aspeed-lpc.yaml (revision aa1a8ff2d6dbc51ef058f46f3db5a8bb77967145)
18cc087a1SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28cc087a1SEmmanuel Vadot# # Copyright (c) 2021 Aspeed Tehchnology Inc.
38cc087a1SEmmanuel Vadot%YAML 1.2
48cc087a1SEmmanuel Vadot---
58cc087a1SEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/aspeed-lpc.yaml#
68cc087a1SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
78cc087a1SEmmanuel Vadot
88cc087a1SEmmanuel Vadottitle: Aspeed Low Pin Count (LPC) Bus Controller
98cc087a1SEmmanuel Vadot
108cc087a1SEmmanuel Vadotmaintainers:
118cc087a1SEmmanuel Vadot  - Andrew Jeffery <andrew@aj.id.au>
128cc087a1SEmmanuel Vadot  - Chia-Wei Wang <chiawei_wang@aspeedtech.com>
138cc087a1SEmmanuel Vadot
148cc087a1SEmmanuel Vadotdescription:
158cc087a1SEmmanuel Vadot  The LPC bus is a means to bridge a host CPU to a number of low-bandwidth
168cc087a1SEmmanuel Vadot  peripheral devices, replacing the use of the ISA bus in the age of PCI[0]. The
178cc087a1SEmmanuel Vadot  primary use case of the Aspeed LPC controller is as a slave on the bus
188cc087a1SEmmanuel Vadot  (typically in a Baseboard Management Controller SoC), but under certain
198cc087a1SEmmanuel Vadot  conditions it can also take the role of bus master.
208cc087a1SEmmanuel Vadot
218cc087a1SEmmanuel Vadot  The LPC controller is represented as a multi-function device to account for the
228cc087a1SEmmanuel Vadot  mix of functionality, which includes, but is not limited to
238cc087a1SEmmanuel Vadot
248cc087a1SEmmanuel Vadot  * An IPMI Block Transfer[2] Controller
258cc087a1SEmmanuel Vadot
268cc087a1SEmmanuel Vadot  * An LPC Host Interface Controller manages functions exposed to the host such
278cc087a1SEmmanuel Vadot    as LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART
288cc087a1SEmmanuel Vadot    management and bus snoop configuration.
298cc087a1SEmmanuel Vadot
30*aa1a8ff2SEmmanuel Vadot  * A set of SuperIO[3] scratch registers enabling implementation of e.g. custom
318cc087a1SEmmanuel Vadot    hardware management protocols for handover between the host and baseboard
328cc087a1SEmmanuel Vadot    management controller.
338cc087a1SEmmanuel Vadot
348cc087a1SEmmanuel Vadot  Additionally the state of the LPC controller influences the pinmux
358cc087a1SEmmanuel Vadot  configuration, therefore the host portion of the controller is exposed as a
368cc087a1SEmmanuel Vadot  syscon as a means to arbitrate access.
378cc087a1SEmmanuel Vadot
388cc087a1SEmmanuel Vadotproperties:
398cc087a1SEmmanuel Vadot  compatible:
408cc087a1SEmmanuel Vadot    items:
418cc087a1SEmmanuel Vadot      - enum:
428cc087a1SEmmanuel Vadot          - aspeed,ast2400-lpc-v2
438cc087a1SEmmanuel Vadot          - aspeed,ast2500-lpc-v2
448cc087a1SEmmanuel Vadot          - aspeed,ast2600-lpc-v2
458cc087a1SEmmanuel Vadot      - const: simple-mfd
468cc087a1SEmmanuel Vadot      - const: syscon
478cc087a1SEmmanuel Vadot
488cc087a1SEmmanuel Vadot  reg:
498cc087a1SEmmanuel Vadot    maxItems: 1
508cc087a1SEmmanuel Vadot
518cc087a1SEmmanuel Vadot  "#address-cells":
528cc087a1SEmmanuel Vadot    const: 1
538cc087a1SEmmanuel Vadot
548cc087a1SEmmanuel Vadot  "#size-cells":
558cc087a1SEmmanuel Vadot    const: 1
568cc087a1SEmmanuel Vadot
578cc087a1SEmmanuel Vadot  ranges: true
588cc087a1SEmmanuel Vadot
598cc087a1SEmmanuel VadotpatternProperties:
608cc087a1SEmmanuel Vadot  "^lpc-ctrl@[0-9a-f]+$":
618cc087a1SEmmanuel Vadot    type: object
628cc087a1SEmmanuel Vadot    additionalProperties: false
638cc087a1SEmmanuel Vadot
648cc087a1SEmmanuel Vadot    description: |
658cc087a1SEmmanuel Vadot      The LPC Host Interface Controller manages functions exposed to the host such as
668cc087a1SEmmanuel Vadot      LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART management
678cc087a1SEmmanuel Vadot      and bus snoop configuration.
688cc087a1SEmmanuel Vadot
698cc087a1SEmmanuel Vadot    properties:
708cc087a1SEmmanuel Vadot      compatible:
718cc087a1SEmmanuel Vadot        items:
728cc087a1SEmmanuel Vadot          - enum:
738cc087a1SEmmanuel Vadot              - aspeed,ast2400-lpc-ctrl
748cc087a1SEmmanuel Vadot              - aspeed,ast2500-lpc-ctrl
758cc087a1SEmmanuel Vadot              - aspeed,ast2600-lpc-ctrl
768cc087a1SEmmanuel Vadot
778cc087a1SEmmanuel Vadot      reg:
788cc087a1SEmmanuel Vadot        maxItems: 1
798cc087a1SEmmanuel Vadot
808cc087a1SEmmanuel Vadot      clocks:
818cc087a1SEmmanuel Vadot        maxItems: 1
828cc087a1SEmmanuel Vadot
838cc087a1SEmmanuel Vadot      memory-region:
848cc087a1SEmmanuel Vadot        maxItems: 1
858cc087a1SEmmanuel Vadot        description: handle to memory reservation for the LPC to AHB mapping region
868cc087a1SEmmanuel Vadot
878cc087a1SEmmanuel Vadot      flash:
888cc087a1SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/phandle
898cc087a1SEmmanuel Vadot        description: The SPI flash controller containing the flash to be exposed over the LPC to AHB mapping
908cc087a1SEmmanuel Vadot
918cc087a1SEmmanuel Vadot    required:
928cc087a1SEmmanuel Vadot      - compatible
938cc087a1SEmmanuel Vadot      - clocks
948cc087a1SEmmanuel Vadot
958cc087a1SEmmanuel Vadot  "^reset-controller@[0-9a-f]+$":
968cc087a1SEmmanuel Vadot    type: object
978cc087a1SEmmanuel Vadot    additionalProperties: false
988cc087a1SEmmanuel Vadot
998cc087a1SEmmanuel Vadot    description:
1008cc087a1SEmmanuel Vadot      The UARTs present in the ASPEED SoC can have their resets tied to the reset
1018cc087a1SEmmanuel Vadot      state of the LPC bus. Some systems may chose to modify this configuration
1028cc087a1SEmmanuel Vadot
1038cc087a1SEmmanuel Vadot    properties:
1048cc087a1SEmmanuel Vadot      compatible:
1058cc087a1SEmmanuel Vadot        items:
1068cc087a1SEmmanuel Vadot          - enum:
1078cc087a1SEmmanuel Vadot              - aspeed,ast2400-lpc-reset
1088cc087a1SEmmanuel Vadot              - aspeed,ast2500-lpc-reset
1098cc087a1SEmmanuel Vadot              - aspeed,ast2600-lpc-reset
1108cc087a1SEmmanuel Vadot
1118cc087a1SEmmanuel Vadot      reg:
1128cc087a1SEmmanuel Vadot        maxItems: 1
1138cc087a1SEmmanuel Vadot
1148cc087a1SEmmanuel Vadot      '#reset-cells':
1158cc087a1SEmmanuel Vadot        const: 1
1168cc087a1SEmmanuel Vadot
1178cc087a1SEmmanuel Vadot    required:
1188cc087a1SEmmanuel Vadot      - compatible
1198cc087a1SEmmanuel Vadot      - '#reset-cells'
1208cc087a1SEmmanuel Vadot
1218cc087a1SEmmanuel Vadot  "^lpc-snoop@[0-9a-f]+$":
1228cc087a1SEmmanuel Vadot    type: object
1238cc087a1SEmmanuel Vadot    additionalProperties: false
1248cc087a1SEmmanuel Vadot
1258cc087a1SEmmanuel Vadot    description:
1268cc087a1SEmmanuel Vadot      The LPC snoop interface allows the BMC to listen on and record the data
1278cc087a1SEmmanuel Vadot      bytes written by the Host to the targeted LPC I/O pots.
1288cc087a1SEmmanuel Vadot
1298cc087a1SEmmanuel Vadot    properties:
1308cc087a1SEmmanuel Vadot      compatible:
1318cc087a1SEmmanuel Vadot        items:
1328cc087a1SEmmanuel Vadot          - enum:
1338cc087a1SEmmanuel Vadot              - aspeed,ast2400-lpc-snoop
1348cc087a1SEmmanuel Vadot              - aspeed,ast2500-lpc-snoop
1358cc087a1SEmmanuel Vadot              - aspeed,ast2600-lpc-snoop
1368cc087a1SEmmanuel Vadot
1378cc087a1SEmmanuel Vadot      reg:
1388cc087a1SEmmanuel Vadot        maxItems: 1
1398cc087a1SEmmanuel Vadot
1408cc087a1SEmmanuel Vadot      interrupts:
1418cc087a1SEmmanuel Vadot        maxItems: 1
1428cc087a1SEmmanuel Vadot
1438cc087a1SEmmanuel Vadot      snoop-ports:
1448cc087a1SEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32-array
1458cc087a1SEmmanuel Vadot        description: The LPC I/O ports to snoop
1468cc087a1SEmmanuel Vadot
1478cc087a1SEmmanuel Vadot    required:
1488cc087a1SEmmanuel Vadot      - compatible
1498cc087a1SEmmanuel Vadot      - interrupts
1508cc087a1SEmmanuel Vadot      - snoop-ports
1518cc087a1SEmmanuel Vadot
1528cc087a1SEmmanuel Vadot  "^uart-routing@[0-9a-f]+$":
1538cc087a1SEmmanuel Vadot    $ref: /schemas/soc/aspeed/uart-routing.yaml#
1548cc087a1SEmmanuel Vadot    description: The UART routing control under LPC register space
1558cc087a1SEmmanuel Vadot
1568cc087a1SEmmanuel Vadotrequired:
1578cc087a1SEmmanuel Vadot  - compatible
1588cc087a1SEmmanuel Vadot  - reg
1598cc087a1SEmmanuel Vadot  - "#address-cells"
1608cc087a1SEmmanuel Vadot  - "#size-cells"
1618cc087a1SEmmanuel Vadot  - ranges
1628cc087a1SEmmanuel Vadot
1638cc087a1SEmmanuel VadotadditionalProperties:
1648cc087a1SEmmanuel Vadot  type: object
1658cc087a1SEmmanuel Vadot
1668cc087a1SEmmanuel Vadotexamples:
1678cc087a1SEmmanuel Vadot  - |
1688cc087a1SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
1698cc087a1SEmmanuel Vadot    #include <dt-bindings/clock/ast2600-clock.h>
1708cc087a1SEmmanuel Vadot
1718cc087a1SEmmanuel Vadot    lpc: lpc@1e789000 {
1728cc087a1SEmmanuel Vadot        compatible = "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon";
1738cc087a1SEmmanuel Vadot        reg = <0x1e789000 0x1000>;
1748cc087a1SEmmanuel Vadot
1758cc087a1SEmmanuel Vadot        #address-cells = <1>;
1768cc087a1SEmmanuel Vadot        #size-cells = <1>;
1778cc087a1SEmmanuel Vadot        ranges = <0x0 0x1e789000 0x1000>;
1788cc087a1SEmmanuel Vadot
1798cc087a1SEmmanuel Vadot        lpc_ctrl: lpc-ctrl@80 {
1808cc087a1SEmmanuel Vadot            compatible = "aspeed,ast2600-lpc-ctrl";
1818cc087a1SEmmanuel Vadot            reg = <0x80 0x80>;
1828cc087a1SEmmanuel Vadot            clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
1838cc087a1SEmmanuel Vadot            memory-region = <&flash_memory>;
1848cc087a1SEmmanuel Vadot            flash = <&spi>;
1858cc087a1SEmmanuel Vadot        };
1868cc087a1SEmmanuel Vadot
1878cc087a1SEmmanuel Vadot        lpc_reset: reset-controller@98 {
1888cc087a1SEmmanuel Vadot            compatible = "aspeed,ast2600-lpc-reset";
1898cc087a1SEmmanuel Vadot            reg = <0x98 0x4>;
1908cc087a1SEmmanuel Vadot            #reset-cells = <1>;
1918cc087a1SEmmanuel Vadot        };
1928cc087a1SEmmanuel Vadot
1938cc087a1SEmmanuel Vadot        lpc_snoop: lpc-snoop@90 {
1948cc087a1SEmmanuel Vadot            compatible = "aspeed,ast2600-lpc-snoop";
1958cc087a1SEmmanuel Vadot            reg = <0x90 0x8>;
1968cc087a1SEmmanuel Vadot            interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
1978cc087a1SEmmanuel Vadot            snoop-ports = <0x80>;
1988cc087a1SEmmanuel Vadot        };
1998cc087a1SEmmanuel Vadot    };
200