mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 14:14:01 +08:00
8de4651abe
from Dialog Semiconductor. Besides that driver we also have: - Device tree support for the s2mps11 driver - More devm_* conversion for the pm8921, max89xx, menelaus, tps65010, wl1273 and pcf50633-adc drivers. - A conversion to threaded IRQ and IRQ domain for the twl6030 driver. - A fairly big update for the rtsx driver: Better power saving support, better vendor settings handling, and a few fixes. - Support for a couple more boards (COMe-bHL6 and COMe-cTH6) for the Kontron driver. - A conversion to the dev_get_platdata() API for all MFD drivers. - A removal of non-DT (legacy) support for the twl6040 driver. - A few fixes and additions (Mic detect level) to the wm5110 register tables. - Regmap support for the davinci_voicecodec driver. - The usual bunch of minor cleanups and janitorial fixes. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJSKFnjAAoJEIqAPN1PVmxKU9AP/RAmSYux6c+cd7P7roXL+/lA qNKy8Op31J51N/n918o7zwbskmRIJJsbd+I6ClBlYdCUB+B8/Oj41uD4F+q35b/H F5Xm2XRPQAGHx37m5adJMrK/OR3zCTwhPjleJYOJWIFjDP/nDNJIPwTYb13Rqurh V39icmRtnNR0uDOmv3eELyV4FnWQTpA858dxuhSi+5jbbHFhCcYShEmE9109eexl RNuyF8d0KPGvnKhK+H1/k4ZYG2XAFFOZfZz9MB+l651nidqDvwJph0Zdj3w1r112 8OR5i7B3vw268nmyjOOUtYqL2vOaUW4lavmLTQiSdQWd1BHv9hEmD0RRR5bSrLeH 6DwCTh0+xWH08ogbMwi4dwZyRhjxMPMpkxeNz51TpRnXKDSZmBgrjovKNJpP8pW6 m7RsgUC9AiEQf/Ac0PBMrU8ABKeJnt3K3ZZp4YN7/H6rAMOhXjLqFD8JLoFvx08z itKKSzVaIA3pzxpnkWWiTsr+bChaSOrHHy1biWa4ve5pvrFc9ivPz1DhL3PTmXpp haeeylFG01r5NJIHeJewRsmUJk67aEyeAnnoLwqCRycWjdDmcCBC5bgDBkRRonoS 93tgKVzL9q/NwvT5Uatw3uYqTN0jOuH0t39gAzu9uwnWvivcZK5EBYh789YQL+on zih4qUICM08yWRDNNDgF =a7dU -----END PGP SIGNATURE----- Merge tag 'mfd-3.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next Pull MFD (multi-function device) updates from Samuel Ortiz: "For the 3.12 merge window we have one new driver for the DA9063 PMIC from Dialog Semiconductor. Besides that driver we also have: - Device tree support for the s2mps11 driver - More devm_* conversion for the pm8921, max89xx, menelaus, tps65010, wl1273 and pcf50633-adc drivers. - A conversion to threaded IRQ and IRQ domain for the twl6030 driver. - A fairly big update for the rtsx driver: Better power saving support, better vendor settings handling, and a few fixes. - Support for a couple more boards (COMe-bHL6 and COMe-cTH6) for the Kontron driver. - A conversion to the dev_get_platdata() API for all MFD drivers. - A removal of non-DT (legacy) support for the twl6040 driver. - A few fixes and additions (Mic detect level) to the wm5110 register tables. - Regmap support for the davinci_voicecodec driver. - The usual bunch of minor cleanups and janitorial fixes" * tag 'mfd-3.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (81 commits) mfd: ucb1x00-core: Rewrite ucb1x00_add_dev() mfd: ab8500-debugfs: Apply a check for -ENOMEM after allocating memory for event name mfd: ab8500-debugfs: Apply a check for -ENOMEM after allocating memory for sysfs mfd: timberdale: Use module_pci_driver mfd: timberdale: Remove redundant break mfd: timberdale: Staticize local variables mfd: ab8500-debugfs: Staticize local variables mfd: db8500-prcmu: Staticize clk_mgt mfd: db8500-prcmu: Use ANSI function declaration mfd: omap-usb-host: Staticize usbhs_driver_name mfd: 88pm805: Fix potential NULL pdata dereference mfd: 88pm800: Fix potential NULL pdata dereference mfd: twl6040: Use regmap for register cache mfd: davinci_voicecodec: Provide a regmap for register I/O mfd: davinci_voicecodec: Remove unused read and write functions mmc: memstick: rtsx: Modify copyright comments mmc: rtsx: Clear SD_CLK toggle enable bit if switching voltage fail mfd: mmc: rtsx: Change default tx phase mfd: pcf50633-adc: Use devm_*() functions mfd: rtsx: Copyright modifications ...
205 lines
4.4 KiB
C
205 lines
4.4 KiB
C
/*
|
|
* s2mps11.h
|
|
*
|
|
* Copyright (c) 2012 Samsung Electronics Co., Ltd
|
|
* http://www.samsung.com
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
|
* option) any later version.
|
|
*
|
|
*/
|
|
|
|
#ifndef __LINUX_MFD_S2MPS11_H
|
|
#define __LINUX_MFD_S2MPS11_H
|
|
|
|
/* S2MPS11 registers */
|
|
enum s2mps11_reg {
|
|
S2MPS11_REG_ID,
|
|
S2MPS11_REG_INT1,
|
|
S2MPS11_REG_INT2,
|
|
S2MPS11_REG_INT3,
|
|
S2MPS11_REG_INT1M,
|
|
S2MPS11_REG_INT2M,
|
|
S2MPS11_REG_INT3M,
|
|
S2MPS11_REG_ST1,
|
|
S2MPS11_REG_ST2,
|
|
S2MPS11_REG_OFFSRC,
|
|
S2MPS11_REG_PWRONSRC,
|
|
S2MPS11_REG_RTC_CTRL,
|
|
S2MPS11_REG_CTRL1,
|
|
S2MPS11_REG_ETC_TEST,
|
|
S2MPS11_REG_RSVD3,
|
|
S2MPS11_REG_BU_CHG,
|
|
S2MPS11_REG_RAMP,
|
|
S2MPS11_REG_RAMP_BUCK,
|
|
S2MPS11_REG_LDO1_8,
|
|
S2MPS11_REG_LDO9_16,
|
|
S2MPS11_REG_LDO17_24,
|
|
S2MPS11_REG_LDO25_32,
|
|
S2MPS11_REG_LDO33_38,
|
|
S2MPS11_REG_LDO1_8_1,
|
|
S2MPS11_REG_LDO9_16_1,
|
|
S2MPS11_REG_LDO17_24_1,
|
|
S2MPS11_REG_LDO25_32_1,
|
|
S2MPS11_REG_LDO33_38_1,
|
|
S2MPS11_REG_OTP_ADRL,
|
|
S2MPS11_REG_OTP_ADRH,
|
|
S2MPS11_REG_OTP_DATA,
|
|
S2MPS11_REG_MON1SEL,
|
|
S2MPS11_REG_MON2SEL,
|
|
S2MPS11_REG_LEE,
|
|
S2MPS11_REG_RSVD_NO,
|
|
S2MPS11_REG_UVLO,
|
|
S2MPS11_REG_LEE_NO,
|
|
S2MPS11_REG_B1CTRL1,
|
|
S2MPS11_REG_B1CTRL2,
|
|
S2MPS11_REG_B2CTRL1,
|
|
S2MPS11_REG_B2CTRL2,
|
|
S2MPS11_REG_B3CTRL1,
|
|
S2MPS11_REG_B3CTRL2,
|
|
S2MPS11_REG_B4CTRL1,
|
|
S2MPS11_REG_B4CTRL2,
|
|
S2MPS11_REG_B5CTRL1,
|
|
S2MPS11_REG_BUCK5_SW,
|
|
S2MPS11_REG_B5CTRL2,
|
|
S2MPS11_REG_B5CTRL3,
|
|
S2MPS11_REG_B5CTRL4,
|
|
S2MPS11_REG_B5CTRL5,
|
|
S2MPS11_REG_B6CTRL1,
|
|
S2MPS11_REG_B6CTRL2,
|
|
S2MPS11_REG_B7CTRL1,
|
|
S2MPS11_REG_B7CTRL2,
|
|
S2MPS11_REG_B8CTRL1,
|
|
S2MPS11_REG_B8CTRL2,
|
|
S2MPS11_REG_B9CTRL1,
|
|
S2MPS11_REG_B9CTRL2,
|
|
S2MPS11_REG_B10CTRL1,
|
|
S2MPS11_REG_B10CTRL2,
|
|
S2MPS11_REG_L1CTRL,
|
|
S2MPS11_REG_L2CTRL,
|
|
S2MPS11_REG_L3CTRL,
|
|
S2MPS11_REG_L4CTRL,
|
|
S2MPS11_REG_L5CTRL,
|
|
S2MPS11_REG_L6CTRL,
|
|
S2MPS11_REG_L7CTRL,
|
|
S2MPS11_REG_L8CTRL,
|
|
S2MPS11_REG_L9CTRL,
|
|
S2MPS11_REG_L10CTRL,
|
|
S2MPS11_REG_L11CTRL,
|
|
S2MPS11_REG_L12CTRL,
|
|
S2MPS11_REG_L13CTRL,
|
|
S2MPS11_REG_L14CTRL,
|
|
S2MPS11_REG_L15CTRL,
|
|
S2MPS11_REG_L16CTRL,
|
|
S2MPS11_REG_L17CTRL,
|
|
S2MPS11_REG_L18CTRL,
|
|
S2MPS11_REG_L19CTRL,
|
|
S2MPS11_REG_L20CTRL,
|
|
S2MPS11_REG_L21CTRL,
|
|
S2MPS11_REG_L22CTRL,
|
|
S2MPS11_REG_L23CTRL,
|
|
S2MPS11_REG_L24CTRL,
|
|
S2MPS11_REG_L25CTRL,
|
|
S2MPS11_REG_L26CTRL,
|
|
S2MPS11_REG_L27CTRL,
|
|
S2MPS11_REG_L28CTRL,
|
|
S2MPS11_REG_L29CTRL,
|
|
S2MPS11_REG_L30CTRL,
|
|
S2MPS11_REG_L31CTRL,
|
|
S2MPS11_REG_L32CTRL,
|
|
S2MPS11_REG_L33CTRL,
|
|
S2MPS11_REG_L34CTRL,
|
|
S2MPS11_REG_L35CTRL,
|
|
S2MPS11_REG_L36CTRL,
|
|
S2MPS11_REG_L37CTRL,
|
|
S2MPS11_REG_L38CTRL,
|
|
};
|
|
|
|
/* S2MPS11 regulator ids */
|
|
enum s2mps11_regulators {
|
|
S2MPS11_LDO1,
|
|
S2MPS11_LDO2,
|
|
S2MPS11_LDO3,
|
|
S2MPS11_LDO4,
|
|
S2MPS11_LDO5,
|
|
S2MPS11_LDO6,
|
|
S2MPS11_LDO7,
|
|
S2MPS11_LDO8,
|
|
S2MPS11_LDO9,
|
|
S2MPS11_LDO10,
|
|
S2MPS11_LDO11,
|
|
S2MPS11_LDO12,
|
|
S2MPS11_LDO13,
|
|
S2MPS11_LDO14,
|
|
S2MPS11_LDO15,
|
|
S2MPS11_LDO16,
|
|
S2MPS11_LDO17,
|
|
S2MPS11_LDO18,
|
|
S2MPS11_LDO19,
|
|
S2MPS11_LDO20,
|
|
S2MPS11_LDO21,
|
|
S2MPS11_LDO22,
|
|
S2MPS11_LDO23,
|
|
S2MPS11_LDO24,
|
|
S2MPS11_LDO25,
|
|
S2MPS11_LDO26,
|
|
S2MPS11_LDO27,
|
|
S2MPS11_LDO28,
|
|
S2MPS11_LDO29,
|
|
S2MPS11_LDO30,
|
|
S2MPS11_LDO31,
|
|
S2MPS11_LDO32,
|
|
S2MPS11_LDO33,
|
|
S2MPS11_LDO34,
|
|
S2MPS11_LDO35,
|
|
S2MPS11_LDO36,
|
|
S2MPS11_LDO37,
|
|
S2MPS11_LDO38,
|
|
S2MPS11_BUCK1,
|
|
S2MPS11_BUCK2,
|
|
S2MPS11_BUCK3,
|
|
S2MPS11_BUCK4,
|
|
S2MPS11_BUCK5,
|
|
S2MPS11_BUCK6,
|
|
S2MPS11_BUCK7,
|
|
S2MPS11_BUCK8,
|
|
S2MPS11_BUCK9,
|
|
S2MPS11_BUCK10,
|
|
|
|
S2MPS11_REGULATOR_MAX,
|
|
};
|
|
|
|
#define S2MPS11_BUCK_MIN1 600000
|
|
#define S2MPS11_BUCK_MIN2 750000
|
|
#define S2MPS11_BUCK_MIN3 3000000
|
|
#define S2MPS11_LDO_MIN 800000
|
|
#define S2MPS11_BUCK_STEP1 6250
|
|
#define S2MPS11_BUCK_STEP2 12500
|
|
#define S2MPS11_BUCK_STEP3 25000
|
|
#define S2MPS11_LDO_STEP1 50000
|
|
#define S2MPS11_LDO_STEP2 25000
|
|
#define S2MPS11_LDO_VSEL_MASK 0x3F
|
|
#define S2MPS11_BUCK_VSEL_MASK 0xFF
|
|
#define S2MPS11_ENABLE_MASK (0x03 << S2MPS11_ENABLE_SHIFT)
|
|
#define S2MPS11_ENABLE_SHIFT 0x06
|
|
#define S2MPS11_LDO_N_VOLTAGES (S2MPS11_LDO_VSEL_MASK + 1)
|
|
#define S2MPS11_BUCK_N_VOLTAGES (S2MPS11_BUCK_VSEL_MASK + 1)
|
|
#define S2MPS11_RAMP_DELAY 25000 /* uV/us */
|
|
|
|
|
|
#define S2MPS11_BUCK2_RAMP_SHIFT 6
|
|
#define S2MPS11_BUCK34_RAMP_SHIFT 4
|
|
#define S2MPS11_BUCK5_RAMP_SHIFT 6
|
|
#define S2MPS11_BUCK16_RAMP_SHIFT 4
|
|
#define S2MPS11_BUCK7810_RAMP_SHIFT 2
|
|
#define S2MPS11_BUCK9_RAMP_SHIFT 0
|
|
#define S2MPS11_BUCK2_RAMP_EN_SHIFT 3
|
|
#define S2MPS11_BUCK3_RAMP_EN_SHIFT 2
|
|
#define S2MPS11_BUCK4_RAMP_EN_SHIFT 1
|
|
#define S2MPS11_BUCK6_RAMP_EN_SHIFT 0
|
|
#define S2MPS11_PMIC_EN_SHIFT 6
|
|
|
|
#endif /* __LINUX_MFD_S2MPS11_H */
|