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 23*b97ee269SEmmanuel Vadot "mediatek,mt6331" for PMIC MT6331 and MT6332 24c9ccf3a3SEmmanuel Vadot "mediatek,mt6358" for PMIC MT6358 and MT6366 255956d97fSEmmanuel Vadot "mediatek,mt6359" for PMIC MT6359 26c66ec88fSEmmanuel Vadot "mediatek,mt6397" for PMIC MT6397 27c66ec88fSEmmanuel Vadot 28c66ec88fSEmmanuel VadotOptional subnodes: 29c66ec88fSEmmanuel Vadot 30c66ec88fSEmmanuel Vadot- rtc 31c66ec88fSEmmanuel Vadot Required properties: Should be one of follows 32c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6323-rtc" 33*b97ee269SEmmanuel Vadot - compatible: "mediatek,mt6331-rtc" 34c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6358-rtc" 35c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6397-rtc" 36c66ec88fSEmmanuel Vadot For details, see ../rtc/rtc-mt6397.txt 37c66ec88fSEmmanuel Vadot- regulators 38c66ec88fSEmmanuel Vadot Required properties: 39c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6323-regulator" 40c66ec88fSEmmanuel Vadot see ../regulator/mt6323-regulator.txt 41c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6358-regulator" 42c66ec88fSEmmanuel Vadot see ../regulator/mt6358-regulator.txt 43c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6397-regulator" 44c66ec88fSEmmanuel Vadot see ../regulator/mt6397-regulator.txt 45c66ec88fSEmmanuel Vadot- codec 46c66ec88fSEmmanuel Vadot Required properties: 47c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6397-codec" or "mediatek,mt6358-sound" 48c66ec88fSEmmanuel Vadot- clk 49c66ec88fSEmmanuel Vadot Required properties: 50c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6397-clk" 51c66ec88fSEmmanuel Vadot- led 52c66ec88fSEmmanuel Vadot Required properties: 53c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6323-led" 54c66ec88fSEmmanuel Vadot see ../leds/leds-mt6323.txt 55c66ec88fSEmmanuel Vadot 56c66ec88fSEmmanuel Vadot- keys 57*b97ee269SEmmanuel Vadot Required properties: Should be one of the following 58*b97ee269SEmmanuel Vadot - compatible: "mediatek,mt6323-keys" 59*b97ee269SEmmanuel Vadot - compatible: "mediatek,mt6331-keys" 60*b97ee269SEmmanuel Vadot - compatible: "mediatek,mt6397-keys" 61c66ec88fSEmmanuel Vadot see ../input/mtk-pmic-keys.txt 62c66ec88fSEmmanuel Vadot 63c66ec88fSEmmanuel Vadot- power-controller 64c66ec88fSEmmanuel Vadot Required properties: 65c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6323-pwrc" 66c66ec88fSEmmanuel Vadot For details, see ../power/reset/mt6323-poweroff.txt 67c66ec88fSEmmanuel Vadot 68c66ec88fSEmmanuel Vadot- pin-controller 69c66ec88fSEmmanuel Vadot Required properties: 70c66ec88fSEmmanuel Vadot - compatible: "mediatek,mt6397-pinctrl" 71c66ec88fSEmmanuel Vadot For details, see ../pinctrl/pinctrl-mt65xx.txt 72c66ec88fSEmmanuel Vadot 73c66ec88fSEmmanuel VadotExample: 74c66ec88fSEmmanuel Vadot pwrap: pwrap@1000f000 { 75c66ec88fSEmmanuel Vadot compatible = "mediatek,mt8135-pwrap"; 76c66ec88fSEmmanuel Vadot 77c66ec88fSEmmanuel Vadot ... 78c66ec88fSEmmanuel Vadot 79c66ec88fSEmmanuel Vadot pmic { 80c66ec88fSEmmanuel Vadot compatible = "mediatek,mt6397"; 81c66ec88fSEmmanuel Vadot 82c66ec88fSEmmanuel Vadot codec: mt6397codec { 83c66ec88fSEmmanuel Vadot compatible = "mediatek,mt6397-codec"; 84c66ec88fSEmmanuel Vadot }; 85c66ec88fSEmmanuel Vadot 86c66ec88fSEmmanuel Vadot regulators { 87c66ec88fSEmmanuel Vadot compatible = "mediatek,mt6397-regulator"; 88c66ec88fSEmmanuel Vadot 89c66ec88fSEmmanuel Vadot mt6397_vpca15_reg: buck_vpca15 { 90c66ec88fSEmmanuel Vadot regulator-compatible = "buck_vpca15"; 91c66ec88fSEmmanuel Vadot regulator-name = "vpca15"; 92c66ec88fSEmmanuel Vadot regulator-min-microvolt = <850000>; 93c66ec88fSEmmanuel Vadot regulator-max-microvolt = <1400000>; 94c66ec88fSEmmanuel Vadot regulator-ramp-delay = <12500>; 95c66ec88fSEmmanuel Vadot regulator-always-on; 96c66ec88fSEmmanuel Vadot }; 97c66ec88fSEmmanuel Vadot 98c66ec88fSEmmanuel Vadot mt6397_vgp4_reg: ldo_vgp4 { 99c66ec88fSEmmanuel Vadot regulator-compatible = "ldo_vgp4"; 100c66ec88fSEmmanuel Vadot regulator-name = "vgp4"; 101c66ec88fSEmmanuel Vadot regulator-min-microvolt = <1200000>; 102c66ec88fSEmmanuel Vadot regulator-max-microvolt = <3300000>; 103c66ec88fSEmmanuel Vadot regulator-enable-ramp-delay = <218>; 104c66ec88fSEmmanuel Vadot }; 105c66ec88fSEmmanuel Vadot }; 106c66ec88fSEmmanuel Vadot }; 107c66ec88fSEmmanuel Vadot }; 108