Back to home page

OSCL-LXR

 
 

    


0001 MediaTek PMIC Wrapper Driver
0002 
0003 This document describes the binding for the MediaTek PMIC wrapper.
0004 
0005 On MediaTek SoCs the PMIC is connected via SPI. The SPI master interface
0006 is not directly visible to the CPU, but only through the PMIC wrapper
0007 inside the SoC. The communication between the SoC and the PMIC can
0008 optionally be encrypted. Also a non standard Dual IO SPI mode can be
0009 used to increase speed.
0010 
0011 IP Pairing
0012 
0013 on MT8135 the pins of some SoC internal peripherals can be on the PMIC.
0014 The signals of these pins are routed over the SPI bus using the pwrap
0015 bridge. In the binding description below the properties needed for bridging
0016 are marked with "IP Pairing". These are optional on SoCs which do not support
0017 IP Pairing
0018 
0019 Required properties in pwrap device node.
0020 - compatible:
0021         "mediatek,mt2701-pwrap" for MT2701/7623 SoCs
0022         "mediatek,mt6765-pwrap" for MT6765 SoCs
0023         "mediatek,mt6779-pwrap" for MT6779 SoCs
0024         "mediatek,mt6797-pwrap" for MT6797 SoCs
0025         "mediatek,mt6873-pwrap" for MT6873/8192 SoCs
0026         "mediatek,mt7622-pwrap" for MT7622 SoCs
0027         "mediatek,mt8135-pwrap" for MT8135 SoCs
0028         "mediatek,mt8173-pwrap" for MT8173 SoCs
0029         "mediatek,mt8183-pwrap" for MT8183 SoCs
0030         "mediatek,mt8186-pwrap" for MT8186 SoCs
0031         "mediatek,mt8195-pwrap" for MT8195 SoCs
0032         "mediatek,mt8516-pwrap" for MT8516 SoCs
0033 - interrupts: IRQ for pwrap in SOC
0034 - reg-names: "pwrap" is required; "pwrap-bridge" is optional.
0035   "pwrap": Main registers base
0036   "pwrap-bridge": bridge base (IP Pairing)
0037 - reg: Must contain an entry for each entry in reg-names.
0038 - clock-names: Must include the following entries:
0039   "spi": SPI bus clock
0040   "wrap": Main module clock
0041 - clocks: Must contain an entry for each entry in clock-names.
0042 
0043 Optional properities:
0044 - reset-names: Some SoCs include the following entries:
0045   "pwrap"
0046   "pwrap-bridge" (IP Pairing)
0047 - resets: Must contain an entry for each entry in reset-names.
0048 - pmic: Using either MediaTek PMIC MFD as the child device of pwrap
0049   See the following for child node definitions:
0050   Documentation/devicetree/bindings/mfd/mt6397.txt
0051   or the regulator-only device as the child device of pwrap, such as MT6380.
0052   See the following definitions for such kinds of devices.
0053   Documentation/devicetree/bindings/regulator/mt6380-regulator.txt
0054 
0055 Example:
0056         pwrap: pwrap@1000f000 {
0057                 compatible = "mediatek,mt8135-pwrap";
0058                 reg = <0 0x1000f000 0 0x1000>,
0059                         <0 0x11017000 0 0x1000>;
0060                 reg-names = "pwrap", "pwrap-bridge";
0061                 interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
0062                 resets = <&infracfg MT8135_INFRA_PMIC_WRAP_RST>,
0063                                 <&pericfg MT8135_PERI_PWRAP_BRIDGE_SW_RST>;
0064                 reset-names = "pwrap", "pwrap-bridge";
0065                 clocks = <&clk26m>, <&clk26m>;
0066                 clock-names = "spi", "wrap";
0067 
0068                 pmic {
0069                         compatible = "mediatek,mt6397";
0070                 };
0071         };