Merge commit '81fd23e2b3ccf71c807e671444e8accaba98ca53' of https://git.pengutronix...
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / soc / mediatek / pwrap.txt
1 MediaTek PMIC Wrapper Driver
2
3 This document describes the binding for the MediaTek PMIC wrapper.
4
5 On MediaTek SoCs the PMIC is connected via SPI. The SPI master interface
6 is not directly visible to the CPU, but only through the PMIC wrapper
7 inside the SoC. The communication between the SoC and the PMIC can
8 optionally be encrypted. Also a non standard Dual IO SPI mode can be
9 used to increase speed.
10
11 IP Pairing
12
13 on MT8135 the pins of some SoC internal peripherals can be on the PMIC.
14 The signals of these pins are routed over the SPI bus using the pwrap
15 bridge. In the binding description below the properties needed for bridging
16 are marked with "IP Pairing". These are optional on SoCs which do not support
17 IP Pairing
18
19 Required properties in pwrap device node.
20 - compatible:
21         "mediatek,mt2701-pwrap" for MT2701/7623 SoCs
22         "mediatek,mt6765-pwrap" for MT6765 SoCs
23         "mediatek,mt6779-pwrap" for MT6779 SoCs
24         "mediatek,mt6797-pwrap" for MT6797 SoCs
25         "mediatek,mt6873-pwrap" for MT6873/8192 SoCs
26         "mediatek,mt7622-pwrap" for MT7622 SoCs
27         "mediatek,mt8135-pwrap" for MT8135 SoCs
28         "mediatek,mt8173-pwrap" for MT8173 SoCs
29         "mediatek,mt8183-pwrap" for MT8183 SoCs
30         "mediatek,mt8195-pwrap" for MT8195 SoCs
31         "mediatek,mt8516-pwrap" for MT8516 SoCs
32 - interrupts: IRQ for pwrap in SOC
33 - reg-names: Must include the following entries:
34   "pwrap": Main registers base
35   "pwrap-bridge": bridge base (IP Pairing)
36 - reg: Must contain an entry for each entry in reg-names.
37 - reset-names: Must include the following entries:
38   "pwrap"
39   "pwrap-bridge" (IP Pairing)
40 - resets: Must contain an entry for each entry in reset-names.
41 - clock-names: Must include the following entries:
42   "spi": SPI bus clock
43   "wrap": Main module clock
44 - clocks: Must contain an entry for each entry in clock-names.
45
46 Optional properities:
47 - pmic: Using either MediaTek PMIC MFD as the child device of pwrap
48   See the following for child node definitions:
49   Documentation/devicetree/bindings/mfd/mt6397.txt
50   or the regulator-only device as the child device of pwrap, such as MT6380.
51   See the following definitions for such kinds of devices.
52   Documentation/devicetree/bindings/regulator/mt6380-regulator.txt
53
54 Example:
55         pwrap: pwrap@1000f000 {
56                 compatible = "mediatek,mt8135-pwrap";
57                 reg = <0 0x1000f000 0 0x1000>,
58                         <0 0x11017000 0 0x1000>;
59                 reg-names = "pwrap", "pwrap-bridge";
60                 interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
61                 resets = <&infracfg MT8135_INFRA_PMIC_WRAP_RST>,
62                                 <&pericfg MT8135_PERI_PWRAP_BRIDGE_SW_RST>;
63                 reset-names = "pwrap", "pwrap-bridge";
64                 clocks = <&clk26m>, <&clk26m>;
65                 clock-names = "spi", "wrap";
66
67                 pmic {
68                         compatible = "mediatek,mt6397";
69                 };
70         };