Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: mfd: aspeed-lpc: Convert to YAML schema

Convert the bindings of Aspeed LPC from text file into YAML schema.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Link: https://lore.kernel.org/r/20210927023053.6728-3-chiawei_wang@aspeedtech.com
[robh: Add 'additionalProperties: false' in child nodes and #reset-cells]
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Chia-Wei Wang and committed by
Rob Herring
a2db23c1 9ae9c51b

+195 -157
-157
Documentation/devicetree/bindings/mfd/aspeed-lpc.txt
··· 1 - ====================================================================== 2 - Device tree bindings for the Aspeed Low Pin Count (LPC) Bus Controller 3 - ====================================================================== 4 - 5 - The LPC bus is a means to bridge a host CPU to a number of low-bandwidth 6 - peripheral devices, replacing the use of the ISA bus in the age of PCI[0]. The 7 - primary 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 9 - conditions it can also take the role of bus master. 10 - 11 - The LPC controller is represented as a multi-function device to account for the 12 - mix of functionality, which includes, but is not limited to: 13 - 14 - * An IPMI Block Transfer[2] Controller 15 - 16 - * An LPC Host Controller: Manages LPC functions such as host vs slave mode, the 17 - physical properties of some LPC pins, configuration of serial IRQs, and 18 - APB-to-LPC bridging amonst other functions. 19 - 20 - * An LPC Host Interface Controller: Manages functions exposed to the host such 21 - as LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART 22 - management and bus snoop configuration. 23 - 24 - * A set of SuperIO[3] scratch registers: Enables implementation of e.g. custom 25 - hardware management protocols for handover between the host and baseboard 26 - management controller. 27 - 28 - Additionally the state of the LPC controller influences the pinmux 29 - configuration, therefore the host portion of the controller is exposed as a 30 - syscon as a means to arbitrate access. 31 - 32 - [0] http://www.intel.com/design/chipsets/industry/25128901.pdf 33 - [1] https://www.renesas.com/en-sg/doc/products/mpumcu/001/rej09b0078_h8s2168.pdf?key=7c88837454702128622bee53acbda8f4 34 - [2] https://www.intel.com/content/dam/www/public/us/en/documents/product-briefs/ipmi-second-gen-interface-spec-v2-rev1-1.pdf 35 - [3] https://en.wikipedia.org/wiki/Super_I/O 36 - 37 - Required properties 38 - =================== 39 - 40 - - compatible: One of: 41 - "aspeed,ast2400-lpc-v2", "simple-mfd", "syscon" 42 - "aspeed,ast2500-lpc-v2", "simple-mfd", "syscon" 43 - "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon" 44 - 45 - - reg: contains the physical address and length values of the Aspeed 46 - LPC memory region. 47 - 48 - - #address-cells: <1> 49 - - #size-cells: <1> 50 - - ranges: Maps 0 to the physical address and length of the LPC memory 51 - region 52 - 53 - Example: 54 - 55 - lpc: lpc@1e789000 { 56 - compatible = "aspeed,ast2500-lpc-v2", "simple-mfd", "syscon"; 57 - reg = <0x1e789000 0x1000>; 58 - 59 - #address-cells = <1>; 60 - #size-cells = <1>; 61 - ranges = <0x0 0x1e789000 0x1000>; 62 - 63 - lpc_snoop: lpc-snoop@0 { 64 - compatible = "aspeed,ast2600-lpc-snoop"; 65 - reg = <0x0 0x80>; 66 - interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>; 67 - snoop-ports = <0x80>; 68 - }; 69 - }; 70 - 71 - 72 - LPC Host Interface Controller 73 - ------------------- 74 - 75 - The LPC Host Interface Controller manages functions exposed to the host such as 76 - LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART 77 - management and bus snoop configuration. 78 - 79 - Required properties: 80 - 81 - - compatible: One of: 82 - "aspeed,ast2400-lpc-ctrl"; 83 - "aspeed,ast2500-lpc-ctrl"; 84 - "aspeed,ast2600-lpc-ctrl"; 85 - 86 - - reg: contains offset/length values of the host interface controller 87 - memory regions 88 - 89 - - clocks: contains a phandle to the syscon node describing the clocks. 90 - There should then be one cell representing the clock to use 91 - 92 - Optional properties: 93 - 94 - - memory-region: A phandle to a reserved_memory region to be used for the LPC 95 - to AHB mapping 96 - 97 - - flash: A phandle to the SPI flash controller containing the flash to 98 - be exposed over the LPC to AHB mapping 99 - 100 - Example: 101 - 102 - lpc_ctrl: lpc-ctrl@80 { 103 - compatible = "aspeed,ast2500-lpc-ctrl"; 104 - reg = <0x80 0x80>; 105 - clocks = <&syscon ASPEED_CLK_GATE_LCLK>; 106 - memory-region = <&flash_memory>; 107 - flash = <&spi>; 108 - }; 109 - 110 - LPC Host Controller 111 - ------------------- 112 - 113 - The Aspeed LPC Host Controller configures the Low Pin Count (LPC) bus behaviour 114 - between the host and the baseboard management controller. The registers exist 115 - in the "host" portion of the Aspeed LPC controller, which must be the parent of 116 - the LPC host controller node. 117 - 118 - Required properties: 119 - 120 - - compatible: One of: 121 - "aspeed,ast2400-lhc"; 122 - "aspeed,ast2500-lhc"; 123 - "aspeed,ast2600-lhc"; 124 - 125 - - reg: contains offset/length values of the LHC memory regions. In the 126 - AST2400 and AST2500 there are two regions. 127 - 128 - Example: 129 - 130 - lhc: lhc@a0 { 131 - compatible = "aspeed,ast2500-lhc"; 132 - reg = <0xa0 0x24 0xc8 0x8>; 133 - }; 134 - 135 - LPC reset control 136 - ----------------- 137 - 138 - The UARTs present in the ASPEED SoC can have their resets tied to the reset 139 - state of the LPC bus. Some systems may chose to modify this configuration. 140 - 141 - Required properties: 142 - 143 - - compatible: One of: 144 - "aspeed,ast2600-lpc-reset"; 145 - "aspeed,ast2500-lpc-reset"; 146 - "aspeed,ast2400-lpc-reset"; 147 - 148 - - reg: offset and length of the IP in the LHC memory region 149 - - #reset-controller indicates the number of reset cells expected 150 - 151 - Example: 152 - 153 - lpc_reset: reset-controller@98 { 154 - compatible = "aspeed,ast2500-lpc-reset"; 155 - reg = <0x98 0x4>; 156 - #reset-cells = <1>; 157 - };
+195
Documentation/devicetree/bindings/mfd/aspeed-lpc.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + # # Copyright (c) 2021 Aspeed Tehchnology Inc. 3 + %YAML 1.2 4 + --- 5 + $id: http://devicetree.org/schemas/mfd/aspeed-lpc.yaml# 6 + $schema: http://devicetree.org/meta-schemas/core.yaml# 7 + 8 + title: Aspeed Low Pin Count (LPC) Bus Controller 9 + 10 + maintainers: 11 + - Andrew Jeffery <andrew@aj.id.au> 12 + - Chia-Wei Wang <chiawei_wang@aspeedtech.com> 13 + 14 + description: 15 + The LPC bus is a means to bridge a host CPU to a number of low-bandwidth 16 + peripheral devices, replacing the use of the ISA bus in the age of PCI[0]. The 17 + primary use case of the Aspeed LPC controller is as a slave on the bus 18 + (typically in a Baseboard Management Controller SoC), but under certain 19 + conditions it can also take the role of bus master. 20 + 21 + The LPC controller is represented as a multi-function device to account for the 22 + mix of functionality, which includes, but is not limited to 23 + 24 + * An IPMI Block Transfer[2] Controller 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 enableing implementation of e.g. custom 31 + hardware management protocols for handover between the host and baseboard 32 + management controller. 33 + 34 + Additionally the state of the LPC controller influences the pinmux 35 + configuration, therefore the host portion of the controller is exposed as a 36 + syscon as a means to arbitrate access. 37 + 38 + properties: 39 + compatible: 40 + items: 41 + - enum: 42 + - aspeed,ast2400-lpc-v2 43 + - aspeed,ast2500-lpc-v2 44 + - aspeed,ast2600-lpc-v2 45 + - const: simple-mfd 46 + - const: syscon 47 + 48 + reg: 49 + maxItems: 1 50 + 51 + "#address-cells": 52 + const: 1 53 + 54 + "#size-cells": 55 + const: 1 56 + 57 + ranges: true 58 + 59 + patternProperties: 60 + "^lpc-ctrl@[0-9a-f]+$": 61 + type: object 62 + additionalProperties: false 63 + 64 + description: | 65 + The LPC Host Interface Controller manages functions exposed to the host such as 66 + LPC firmware hub cycles, configuration of the LPC-to-AHB mapping, UART management 67 + and bus snoop configuration. 68 + 69 + properties: 70 + compatible: 71 + items: 72 + - enum: 73 + - aspeed,ast2400-lpc-ctrl 74 + - aspeed,ast2500-lpc-ctrl 75 + - aspeed,ast2600-lpc-ctrl 76 + 77 + reg: 78 + maxItems: 1 79 + 80 + clocks: 81 + maxItems: 1 82 + 83 + memory-region: 84 + maxItems: 1 85 + description: handle to memory reservation for the LPC to AHB mapping region 86 + 87 + flash: 88 + $ref: /schemas/types.yaml#/definitions/phandle 89 + description: The SPI flash controller containing the flash to be exposed over the LPC to AHB mapping 90 + 91 + required: 92 + - compatible 93 + - clocks 94 + 95 + "^reset-controller@[0-9a-f]+$": 96 + type: object 97 + additionalProperties: false 98 + 99 + description: 100 + The UARTs present in the ASPEED SoC can have their resets tied to the reset 101 + state of the LPC bus. Some systems may chose to modify this configuration 102 + 103 + properties: 104 + compatible: 105 + items: 106 + - enum: 107 + - aspeed,ast2400-lpc-reset 108 + - aspeed,ast2500-lpc-reset 109 + - aspeed,ast2600-lpc-reset 110 + 111 + reg: 112 + maxItems: 1 113 + 114 + '#reset-cells': 115 + const: 1 116 + 117 + required: 118 + - compatible 119 + - '#reset-cells' 120 + 121 + "^lpc-snoop@[0-9a-f]+$": 122 + type: object 123 + additionalProperties: false 124 + 125 + description: 126 + The LPC snoop interface allows the BMC to listen on and record the data 127 + bytes written by the Host to the targeted LPC I/O pots. 128 + 129 + properties: 130 + compatible: 131 + items: 132 + - enum: 133 + - aspeed,ast2400-lpc-snoop 134 + - aspeed,ast2500-lpc-snoop 135 + - aspeed,ast2600-lpc-snoop 136 + 137 + reg: 138 + maxItems: 1 139 + 140 + interrupts: 141 + maxItems: 1 142 + 143 + snoop-ports: 144 + $ref: /schemas/types.yaml#/definitions/uint32-array 145 + description: The LPC I/O ports to snoop 146 + 147 + required: 148 + - compatible 149 + - interrupts 150 + - snoop-ports 151 + 152 + required: 153 + - compatible 154 + - reg 155 + - "#address-cells" 156 + - "#size-cells" 157 + - ranges 158 + 159 + additionalProperties: 160 + type: object 161 + 162 + examples: 163 + - | 164 + #include <dt-bindings/interrupt-controller/arm-gic.h> 165 + #include <dt-bindings/clock/ast2600-clock.h> 166 + 167 + lpc: lpc@1e789000 { 168 + compatible = "aspeed,ast2600-lpc-v2", "simple-mfd", "syscon"; 169 + reg = <0x1e789000 0x1000>; 170 + 171 + #address-cells = <1>; 172 + #size-cells = <1>; 173 + ranges = <0x0 0x1e789000 0x1000>; 174 + 175 + lpc_ctrl: lpc-ctrl@80 { 176 + compatible = "aspeed,ast2600-lpc-ctrl"; 177 + reg = <0x80 0x80>; 178 + clocks = <&syscon ASPEED_CLK_GATE_LCLK>; 179 + memory-region = <&flash_memory>; 180 + flash = <&spi>; 181 + }; 182 + 183 + lpc_reset: reset-controller@98 { 184 + compatible = "aspeed,ast2600-lpc-reset"; 185 + reg = <0x98 0x4>; 186 + #reset-cells = <1>; 187 + }; 188 + 189 + lpc_snoop: lpc-snoop@90 { 190 + compatible = "aspeed,ast2600-lpc-snoop"; 191 + reg = <0x90 0x8>; 192 + interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>; 193 + snoop-ports = <0x80>; 194 + }; 195 + };