xref: /freebsd/sys/contrib/device-tree/Bindings/soc/mediatek/pwrap.txt (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1MediaTek PMIC Wrapper Driver
2
3This document describes the binding for the MediaTek PMIC wrapper.
4
5On MediaTek SoCs the PMIC is connected via SPI. The SPI master interface
6is not directly visible to the CPU, but only through the PMIC wrapper
7inside the SoC. The communication between the SoC and the PMIC can
8optionally be encrypted. Also a non standard Dual IO SPI mode can be
9used to increase speed.
10
11IP Pairing
12
13on MT8135 the pins of some SoC internal peripherals can be on the PMIC.
14The signals of these pins are routed over the SPI bus using the pwrap
15bridge. In the binding description below the properties needed for bridging
16are marked with "IP Pairing". These are optional on SoCs which do not support
17IP Pairing
18
19Required 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,mt8186-pwrap" for MT8186 SoCs
31	"mediatek,mt8188-pwrap", "mediatek,mt8195-pwrap" for MT8188 SoCs
32	"mediatek,mt8195-pwrap" for MT8195 SoCs
33	"mediatek,mt8516-pwrap" for MT8516 SoCs
34- interrupts: IRQ for pwrap in SOC
35- reg-names: "pwrap" is required; "pwrap-bridge" is optional.
36  "pwrap": Main registers base
37  "pwrap-bridge": bridge base (IP Pairing)
38- reg: Must contain an entry for each entry in reg-names.
39- clock-names: Must include the following entries:
40  "spi": SPI bus clock
41  "wrap": Main module clock
42- clocks: Must contain an entry for each entry in clock-names.
43
44Optional properities:
45- reset-names: Some SoCs include the following entries:
46  "pwrap"
47  "pwrap-bridge" (IP Pairing)
48- resets: Must contain an entry for each entry in reset-names.
49- pmic: Using either MediaTek PMIC MFD as the child device of pwrap
50  See the following for child node definitions:
51  Documentation/devicetree/bindings/mfd/mt6397.txt
52  or the regulator-only device as the child device of pwrap, such as MT6380.
53  See the following definitions for such kinds of devices.
54  Documentation/devicetree/bindings/regulator/mt6380-regulator.txt
55
56Example:
57	pwrap: pwrap@1000f000 {
58		compatible = "mediatek,mt8135-pwrap";
59		reg = <0 0x1000f000 0 0x1000>,
60			<0 0x11017000 0 0x1000>;
61		reg-names = "pwrap", "pwrap-bridge";
62		interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
63		resets = <&infracfg MT8135_INFRA_PMIC_WRAP_RST>,
64				<&pericfg MT8135_PERI_PWRAP_BRIDGE_SW_RST>;
65		reset-names = "pwrap", "pwrap-bridge";
66		clocks = <&clk26m>, <&clk26m>;
67		clock-names = "spi", "wrap";
68
69		pmic {
70			compatible = "mediatek,mt6397";
71		};
72	};
73