- The ChromeOS embedded controller which provides keyboard, battery and power
management services. This controller is accessible through i2c or SPI.
- Silicon Laboratories 476x controller, providing access to their FM chipset
and their audio codec.
- Realtek's RTS5249, a memory stick, MMC and SD/SDIO PCI based reader.
- Nokia's Tahvo power button and watchdog device. This device is very similar
to Retu and is thus supported by the same code base.
- STMicroelectronics STMPE1801, a keyboard and GPIO controller supported by
the stmpe driver.
- ST-Ericsson AB8540 and AB8505 power management and voltage converter
controllers through the existing ab8500 code.
Some other drivers got cleaned up or improved. In particular:
- The Linaro/STE guys got the ab8500 driver in sync with their internal code
through a series of optimizations, fixes and improvements.
- The AS3711 and OMAP USB drivers now have DT support.
- The arizona clock and interrupt handling code got improved.
- The wm5102 register patch and boot mechanism also got improved.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJRhttxAAoJEIqAPN1PVmxKl6QP/ilyz2OnuZSJKAT+N3tt0EpR
6hFk0H6uSiHJ5aNyA22WGJq97R3jW9eGK9uD4AKCQ05l9UF/c5+YeXtmGHtxDLCb
jBrErfB6GmEn1H2TzVK+Rp1WPAB/yoYHJosgGNCwohvuffhMiogSVHlI09EY4mQh
2Eo0RTN1UXKXSOZN+E7hb+GbIFzU8eOlEFdc2jh4qtfsvMDANbEByrZM6s0QFB31
LPn03uBL0+iwE8KW2144LKsfzeOos4JWbumyG9Lh6BugUSy1e/Zvv7aWNVeMvY8C
0+ZUk0bzRm9g7e3X4iYLPSboZt7J6DLaBlWXnUaOsJb+YRkUGh094ySdKojP3EiK
8SWSfH4EDwIANKC4zyXMcyny8OewySyrTTd0BTlbgHFyDmvmHk213crsCcilHzRb
3wrX0ETrk96Dkla4/e7IAyME+AbrglStHVGGf2hexlPm2nZdLsE8lfyo9yqjPqzy
w49y7mpTA5PVE63szB1tI/58W2snZtXAEdQGjZmDQp29vDZaeR1t3W/IhKNG30JN
SZGiX3H/6YS4MDZ48N709H83hM4V93XrHKsN59NjQe8NZ7AnSIfns9IgMciGBv7r
aBE+Uwm9htK270Hvl5q8qDDnKaVGYOFlCq9qaeZ2k8NPyyRlQCRpJYjtSplYAnGr
iLI0JdM32u3qdf5IT+Cw
=Wq20
-----END PGP SIGNATURE-----
Merge tag 'mfd-3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next
Pull MFD update from Samuel Ortiz:
"For 3.10 we have a few new MFD drivers for:
- The ChromeOS embedded controller which provides keyboard, battery
and power management services. This controller is accessible
through i2c or SPI.
- Silicon Laboratories 476x controller, providing access to their FM
chipset and their audio codec.
- Realtek's RTS5249, a memory stick, MMC and SD/SDIO PCI based
reader.
- Nokia's Tahvo power button and watchdog device. This device is
very similar to Retu and is thus supported by the same code base.
- STMicroelectronics STMPE1801, a keyboard and GPIO controller
supported by the stmpe driver.
- ST-Ericsson AB8540 and AB8505 power management and voltage
converter controllers through the existing ab8500 code.
Some other drivers got cleaned up or improved. In particular:
- The Linaro/STE guys got the ab8500 driver in sync with their
internal code through a series of optimizations, fixes and
improvements.
- The AS3711 and OMAP USB drivers now have DT support.
- The arizona clock and interrupt handling code got improved.
- The wm5102 register patch and boot mechanism also got improved."
* tag 'mfd-3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-next: (104 commits)
mfd: si476x: Don't use 0bNNN
mfd: vexpress: Handle pending config transactions
mfd: ab8500: Export ab8500_gpadc_sw_hw_convert properly
mfd: si476x: Fix i2c warning
mfd: si476x: Add header files and Kbuild plumbing
mfd: si476x: Add chip properties handling code
mfd: si476x: Add the bulk of the core driver
mfd: si476x: Add commands abstraction layer
mfd: rtsx: Support RTS5249
mfd: retu: Add Tahvo support
mfd: ucb1400: Pass ucb1400-gpio data through ac97 bus
mfd: wm8994: Add some OF properties
mfd: wm8994: Add device ID data to WM8994 OF device IDs
input: Export matrix_keypad_parse_of_params()
mfd: tps65090: Add compatible string for charger subnode
mfd: db8500-prcmu: Support platform dependant device selection
mfd: syscon: Fix warnings when printing resource_size_t
of: Add stub of_get_parent for non-OF builds
mfd: omap-usb-tll: Convert to devm_ioremap_resource()
mfd: omap-usb-host: Convert to devm_ioremap_resource()
...
194 lines
5.9 KiB
C
194 lines
5.9 KiB
C
/*
|
|
* Platform data for Arizona devices
|
|
*
|
|
* Copyright 2012 Wolfson Microelectronics. PLC.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef _ARIZONA_PDATA_H
|
|
#define _ARIZONA_PDATA_H
|
|
|
|
#define ARIZONA_GPN_DIR 0x8000 /* GPN_DIR */
|
|
#define ARIZONA_GPN_DIR_MASK 0x8000 /* GPN_DIR */
|
|
#define ARIZONA_GPN_DIR_SHIFT 15 /* GPN_DIR */
|
|
#define ARIZONA_GPN_DIR_WIDTH 1 /* GPN_DIR */
|
|
#define ARIZONA_GPN_PU 0x4000 /* GPN_PU */
|
|
#define ARIZONA_GPN_PU_MASK 0x4000 /* GPN_PU */
|
|
#define ARIZONA_GPN_PU_SHIFT 14 /* GPN_PU */
|
|
#define ARIZONA_GPN_PU_WIDTH 1 /* GPN_PU */
|
|
#define ARIZONA_GPN_PD 0x2000 /* GPN_PD */
|
|
#define ARIZONA_GPN_PD_MASK 0x2000 /* GPN_PD */
|
|
#define ARIZONA_GPN_PD_SHIFT 13 /* GPN_PD */
|
|
#define ARIZONA_GPN_PD_WIDTH 1 /* GPN_PD */
|
|
#define ARIZONA_GPN_LVL 0x0800 /* GPN_LVL */
|
|
#define ARIZONA_GPN_LVL_MASK 0x0800 /* GPN_LVL */
|
|
#define ARIZONA_GPN_LVL_SHIFT 11 /* GPN_LVL */
|
|
#define ARIZONA_GPN_LVL_WIDTH 1 /* GPN_LVL */
|
|
#define ARIZONA_GPN_POL 0x0400 /* GPN_POL */
|
|
#define ARIZONA_GPN_POL_MASK 0x0400 /* GPN_POL */
|
|
#define ARIZONA_GPN_POL_SHIFT 10 /* GPN_POL */
|
|
#define ARIZONA_GPN_POL_WIDTH 1 /* GPN_POL */
|
|
#define ARIZONA_GPN_OP_CFG 0x0200 /* GPN_OP_CFG */
|
|
#define ARIZONA_GPN_OP_CFG_MASK 0x0200 /* GPN_OP_CFG */
|
|
#define ARIZONA_GPN_OP_CFG_SHIFT 9 /* GPN_OP_CFG */
|
|
#define ARIZONA_GPN_OP_CFG_WIDTH 1 /* GPN_OP_CFG */
|
|
#define ARIZONA_GPN_DB 0x0100 /* GPN_DB */
|
|
#define ARIZONA_GPN_DB_MASK 0x0100 /* GPN_DB */
|
|
#define ARIZONA_GPN_DB_SHIFT 8 /* GPN_DB */
|
|
#define ARIZONA_GPN_DB_WIDTH 1 /* GPN_DB */
|
|
#define ARIZONA_GPN_FN_MASK 0x007F /* GPN_FN - [6:0] */
|
|
#define ARIZONA_GPN_FN_SHIFT 0 /* GPN_FN - [6:0] */
|
|
#define ARIZONA_GPN_FN_WIDTH 7 /* GPN_FN - [6:0] */
|
|
|
|
#define ARIZONA_MAX_GPIO 5
|
|
|
|
#define ARIZONA_32KZ_MCLK1 1
|
|
#define ARIZONA_32KZ_MCLK2 2
|
|
#define ARIZONA_32KZ_NONE 3
|
|
|
|
#define ARIZONA_MAX_INPUT 4
|
|
|
|
#define ARIZONA_DMIC_MICVDD 0
|
|
#define ARIZONA_DMIC_MICBIAS1 1
|
|
#define ARIZONA_DMIC_MICBIAS2 2
|
|
#define ARIZONA_DMIC_MICBIAS3 3
|
|
|
|
#define ARIZONA_MAX_MICBIAS 3
|
|
|
|
#define ARIZONA_INMODE_DIFF 0
|
|
#define ARIZONA_INMODE_SE 1
|
|
#define ARIZONA_INMODE_DMIC 2
|
|
|
|
#define ARIZONA_MAX_OUTPUT 6
|
|
|
|
#define ARIZONA_MAX_AIF 3
|
|
|
|
#define ARIZONA_HAP_ACT_ERM 0
|
|
#define ARIZONA_HAP_ACT_LRA 2
|
|
|
|
#define ARIZONA_MAX_PDM_SPK 2
|
|
|
|
struct regulator_init_data;
|
|
|
|
struct arizona_micbias {
|
|
int mV; /** Regulated voltage */
|
|
unsigned int ext_cap:1; /** External capacitor fitted */
|
|
unsigned int discharge:1; /** Actively discharge */
|
|
unsigned int fast_start:1; /** Enable aggressive startup ramp rate */
|
|
unsigned int bypass:1; /** Use bypass mode */
|
|
};
|
|
|
|
struct arizona_micd_config {
|
|
unsigned int src;
|
|
unsigned int bias;
|
|
bool gpio;
|
|
};
|
|
|
|
struct arizona_micd_range {
|
|
int max; /** Ohms */
|
|
int key; /** Key to report to input layer */
|
|
};
|
|
|
|
struct arizona_pdata {
|
|
int reset; /** GPIO controlling /RESET, if any */
|
|
int ldoena; /** GPIO controlling LODENA, if any */
|
|
|
|
/** Regulator configuration for MICVDD */
|
|
struct regulator_init_data *micvdd;
|
|
|
|
/** Regulator configuration for LDO1 */
|
|
struct regulator_init_data *ldo1;
|
|
|
|
/** If a direct 32kHz clock is provided on an MCLK specify it here */
|
|
int clk32k_src;
|
|
|
|
/** Mode for primary IRQ (defaults to active low) */
|
|
unsigned int irq_flags;
|
|
|
|
/* Base GPIO */
|
|
int gpio_base;
|
|
|
|
/** Pin state for GPIO pins */
|
|
int gpio_defaults[ARIZONA_MAX_GPIO];
|
|
|
|
/**
|
|
* Maximum number of channels clocks will be generated for,
|
|
* useful for systems where and I2S bus with multiple data
|
|
* lines is mastered.
|
|
*/
|
|
int max_channels_clocked[ARIZONA_MAX_AIF];
|
|
|
|
/** GPIO5 is used for jack detection */
|
|
bool jd_gpio5;
|
|
|
|
/** Internal pull on GPIO5 is disabled when used for jack detection */
|
|
bool jd_gpio5_nopull;
|
|
|
|
/** Use the headphone detect circuit to identify the accessory */
|
|
bool hpdet_acc_id;
|
|
|
|
/** Check for line output with HPDET method */
|
|
bool hpdet_acc_id_line;
|
|
|
|
/** GPIO used for mic isolation with HPDET */
|
|
int hpdet_id_gpio;
|
|
|
|
/** Extra debounce timeout used during initial mic detection (ms) */
|
|
int micd_detect_debounce;
|
|
|
|
/** GPIO for mic detection polarity */
|
|
int micd_pol_gpio;
|
|
|
|
/** Mic detect ramp rate */
|
|
int micd_bias_start_time;
|
|
|
|
/** Mic detect sample rate */
|
|
int micd_rate;
|
|
|
|
/** Mic detect debounce level */
|
|
int micd_dbtime;
|
|
|
|
/** Mic detect timeout (ms) */
|
|
int micd_timeout;
|
|
|
|
/** Force MICBIAS on for mic detect */
|
|
bool micd_force_micbias;
|
|
|
|
/** Mic detect level parameters */
|
|
const struct arizona_micd_range *micd_ranges;
|
|
int num_micd_ranges;
|
|
|
|
/** Headset polarity configurations */
|
|
struct arizona_micd_config *micd_configs;
|
|
int num_micd_configs;
|
|
|
|
/** Reference voltage for DMIC inputs */
|
|
int dmic_ref[ARIZONA_MAX_INPUT];
|
|
|
|
/** MICBIAS configurations */
|
|
struct arizona_micbias micbias[ARIZONA_MAX_MICBIAS];
|
|
|
|
/** Mode of input structures */
|
|
int inmode[ARIZONA_MAX_INPUT];
|
|
|
|
/** Mode for outputs */
|
|
bool out_mono[ARIZONA_MAX_OUTPUT];
|
|
|
|
/** PDM speaker mute setting */
|
|
unsigned int spk_mute[ARIZONA_MAX_PDM_SPK];
|
|
|
|
/** PDM speaker format */
|
|
unsigned int spk_fmt[ARIZONA_MAX_PDM_SPK];
|
|
|
|
/** Haptic actuator type */
|
|
unsigned int hap_act;
|
|
|
|
/** GPIO for primary IRQ (used for edge triggered emulation) */
|
|
int irq_gpio;
|
|
};
|
|
|
|
#endif
|