1c66ec88fSEmmanuel VadotMediaTek MT6397/MT6323 Multifunction Device Driver 2c66ec88fSEmmanuel Vadot 3c66ec88fSEmmanuel VadotMT6397/MT6323 is a multifunction device with the following sub modules: 4c66ec88fSEmmanuel Vadot- Regulator 5c66ec88fSEmmanuel Vadot- RTC 6c66ec88fSEmmanuel Vadot- Audio codec 7c66ec88fSEmmanuel Vadot- GPIO 8c66ec88fSEmmanuel Vadot- Clock 9c66ec88fSEmmanuel Vadot- LED 10c66ec88fSEmmanuel Vadot- Keys 11c66ec88fSEmmanuel Vadot- Power controller 12c66ec88fSEmmanuel Vadot 13c66ec88fSEmmanuel VadotIt is interfaced to host controller using SPI interface by a proprietary hardware 14c66ec88fSEmmanuel Vadotcalled PMIC wrapper or pwrap. MT6397/MT6323 MFD is a child device of pwrap. 15c66ec88fSEmmanuel VadotSee the following for pwarp node definitions: 16c66ec88fSEmmanuel Vadot../soc/mediatek/pwrap.txt 17c66ec88fSEmmanuel Vadot 18c66ec88fSEmmanuel VadotThis document describes the binding for MFD device and its sub module. 19c66ec88fSEmmanuel Vadot 20c66ec88fSEmmanuel VadotRequired properties: 21c66ec88fSEmmanuel Vadotcompatible: 22c66ec88fSEmmanuel Vadot "mediatek,mt6323" for PMIC MT6323 23b97ee269SEmmanuel Vadot "mediatek,mt6331" for PMIC MT6331 and MT6332 24*8bab661aSEmmanuel Vadot "mediatek,mt6357" for PMIC MT6357 25c9ccf3a3SEmmanuel Vadot "mediatek,mt6358" for PMIC MT6358 and MT6366 265956d97fSEmmanuel Vadot "mediatek,mt6359" for PMIC MT6359 27c66ec88fSEmmanuel Vadot "mediatek,mt6397" for PMIC MT6397 28c66ec88fSEmmanuel Vadot 29c66ec88fSEmmanuel VadotOptional subnodes: 30c66ec88fSEmmanuel Vadot 31c66ec88fSEmmanuel Vadot- rtc 32c66ec88fSEmmanuel Vadot Required properties: Should be one of follows 33c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6323-rtc" 34b97ee269SEmmanuel Vadot - compatible: "mediatek,mt6331-rtc" 35c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6358-rtc" 36c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6397-rtc" 37c66ec88fSEmmanuel Vadot For details, see ../rtc/rtc-mt6397.txt 38c66ec88fSEmmanuel Vadot- regulators 39c66ec88fSEmmanuel Vadot Required properties: 40c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6323-regulator" 41c66ec88fSEmmanuel Vadot see ../regulator/mt6323-regulator.txt 42c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6358-regulator" 43c66ec88fSEmmanuel Vadot see ../regulator/mt6358-regulator.txt 44c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6397-regulator" 45c66ec88fSEmmanuel Vadot see ../regulator/mt6397-regulator.txt 46c66ec88fSEmmanuel Vadot- codec 47c66ec88fSEmmanuel Vadot Required properties: 48c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6397-codec" or "mediatek,mt6358-sound" 49c66ec88fSEmmanuel Vadot- clk 50c66ec88fSEmmanuel Vadot Required properties: 51c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6397-clk" 52c66ec88fSEmmanuel Vadot- led 53c66ec88fSEmmanuel Vadot Required properties: 54c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6323-led" 55c66ec88fSEmmanuel Vadot see ../leds/leds-mt6323.txt 56c66ec88fSEmmanuel Vadot 57c66ec88fSEmmanuel Vadot- keys 58b97ee269SEmmanuel Vadot Required properties: Should be one of the following 59b97ee269SEmmanuel Vadot - compatible: "mediatek,mt6323-keys" 60b97ee269SEmmanuel Vadot - compatible: "mediatek,mt6331-keys" 61b97ee269SEmmanuel Vadot - compatible: "mediatek,mt6397-keys" 62c66ec88fSEmmanuel Vadot see ../input/mtk-pmic-keys.txt 63c66ec88fSEmmanuel Vadot 64c66ec88fSEmmanuel Vadot- power-controller 65c66ec88fSEmmanuel Vadot Required properties: 66c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6323-pwrc" 67c66ec88fSEmmanuel Vadot For details, see ../power/reset/mt6323-poweroff.txt 68c66ec88fSEmmanuel Vadot 69c66ec88fSEmmanuel Vadot- pin-controller 70c66ec88fSEmmanuel Vadot Required properties: 71c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6397-pinctrl" 72c66ec88fSEmmanuel Vadot For details, see ../pinctrl/pinctrl-mt65xx.txt 73c66ec88fSEmmanuel Vadot 74c66ec88fSEmmanuel VadotExample: 75c66ec88fSEmmanuel Vadot pwrap: pwrap@1000f000 { 76c66ec88fSEmmanuel Vadot compatible = "mediatek,mt8135-pwrap"; 77c66ec88fSEmmanuel Vadot 78c66ec88fSEmmanuel Vadot ... 79c66ec88fSEmmanuel Vadot 80c66ec88fSEmmanuel Vadot pmic { 81c66ec88fSEmmanuel Vadot compatible = "mediatek,mt6397"; 82c66ec88fSEmmanuel Vadot 83c66ec88fSEmmanuel Vadot codec: mt6397codec { 84c66ec88fSEmmanuel Vadot compatible = "mediatek,mt6397-codec"; 85c66ec88fSEmmanuel Vadot }; 86c66ec88fSEmmanuel Vadot 87c66ec88fSEmmanuel Vadot regulators { 88c66ec88fSEmmanuel Vadot compatible = "mediatek,mt6397-regulator"; 89c66ec88fSEmmanuel Vadot 90c66ec88fSEmmanuel Vadot mt6397_vpca15_reg: buck_vpca15 { 91c66ec88fSEmmanuel Vadot regulator-compatible = "buck_vpca15"; 92c66ec88fSEmmanuel Vadot regulator-name = "vpca15"; 93c66ec88fSEmmanuel Vadot regulator-min-microvolt = <850000>; 94c66ec88fSEmmanuel Vadot regulator-max-microvolt = <1400000>; 95c66ec88fSEmmanuel Vadot regulator-ramp-delay = <12500>; 96c66ec88fSEmmanuel Vadot regulator-always-on; 97c66ec88fSEmmanuel Vadot }; 98c66ec88fSEmmanuel Vadot 99c66ec88fSEmmanuel Vadot mt6397_vgp4_reg: ldo_vgp4 { 100c66ec88fSEmmanuel Vadot regulator-compatible = "ldo_vgp4"; 101c66ec88fSEmmanuel Vadot regulator-name = "vgp4"; 102c66ec88fSEmmanuel Vadot regulator-min-microvolt = <1200000>; 103c66ec88fSEmmanuel Vadot regulator-max-microvolt = <3300000>; 104c66ec88fSEmmanuel Vadot regulator-enable-ramp-delay = <218>; 105c66ec88fSEmmanuel Vadot }; 106c66ec88fSEmmanuel Vadot }; 107c66ec88fSEmmanuel Vadot }; 108c66ec88fSEmmanuel Vadot }; 109