summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/soc/mediatek/pwrap.txt
blob: 107700d00df4d2ac7331b6c9fc59baafa2805670 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
MediaTek PMIC Wrapper Driver

This document describes the binding for the MediaTek PMIC wrapper.

On MediaTek SoCs the PMIC is connected via SPI. The SPI master interface
is not directly visible to the CPU, but only through the PMIC wrapper
inside the SoC. The communication between the SoC and the PMIC can
optionally be encrypted. Also a non standard Dual IO SPI mode can be
used to increase speed.

IP Pairing

on MT8135 the pins of some SoC internal peripherals can be on the PMIC.
The signals of these pins are routed over the SPI bus using the pwrap
bridge. In the binding description below the properties needed for bridging
are marked with "IP Pairing". These are optional on SoCs which do not support
IP Pairing

Required properties in pwrap device node.
- compatible:
	"mediatek,mt2701-pwrap" for MT2701/7623 SoCs
	"mediatek,mt8135-pwrap" for MT8135 SoCs
	"mediatek,mt8173-pwrap" for MT8173 SoCs
- interrupts: IRQ for pwrap in SOC
- reg-names: Must include the following entries:
  "pwrap": Main registers base
  "pwrap-bridge": bridge base (IP Pairing)
- reg: Must contain an entry for each entry in reg-names.
- reset-names: Must include the following entries:
  "pwrap"
  "pwrap-bridge" (IP Pairing)
- resets: Must contain an entry for each entry in reset-names.
- clock-names: Must include the following entries:
  "spi": SPI bus clock
  "wrap": Main module clock
- clocks: Must contain an entry for each entry in clock-names.

Optional properities:
- pmic: Mediatek PMIC MFD is the child device of pwrap
  See the following for child node definitions:
  Documentation/devicetree/bindings/mfd/mt6397.txt

Example:
	pwrap: pwrap@1000f000 {
		compatible = "mediatek,mt8135-pwrap";
		reg = <0 0x1000f000 0 0x1000>,
			<0 0x11017000 0 0x1000>;
		reg-names = "pwrap", "pwrap-bridge";
		interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
		resets = <&infracfg MT8135_INFRA_PMIC_WRAP_RST>,
				<&pericfg MT8135_PERI_PWRAP_BRIDGE_SW_RST>;
		reset-names = "pwrap", "pwrap-bridge";
		clocks = <&clk26m>, <&clk26m>;
		clock-names = "spi", "wrap";

		pmic {
			compatible = "mediatek,mt6397";
		};
	};