18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Siemens SX1 board definitions 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright: Vovan888 at gmail com 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This package is free software; you can redistribute it and/or modify 78c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License version 2 as 88c2ecf20Sopenharmony_ci * published by the Free Software Foundation. 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 118c2ecf20Sopenharmony_ci * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 128c2ecf20Sopenharmony_ci * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 138c2ecf20Sopenharmony_ci */ 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#ifndef __ASM_ARCH_SX1_I2C_CHIPS_H 168c2ecf20Sopenharmony_ci#define __ASM_ARCH_SX1_I2C_CHIPS_H 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#define SOFIA_MAX_LIGHT_VAL 0x2B 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#define SOFIA_I2C_ADDR 0x32 218c2ecf20Sopenharmony_ci/* Sofia reg 3 bits masks */ 228c2ecf20Sopenharmony_ci#define SOFIA_POWER1_REG 0x03 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#define SOFIA_USB_POWER 0x01 258c2ecf20Sopenharmony_ci#define SOFIA_MMC_POWER 0x04 268c2ecf20Sopenharmony_ci#define SOFIA_BLUETOOTH_POWER 0x08 278c2ecf20Sopenharmony_ci#define SOFIA_MMILIGHT_POWER 0x20 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#define SOFIA_POWER2_REG 0x04 308c2ecf20Sopenharmony_ci#define SOFIA_BACKLIGHT_REG 0x06 318c2ecf20Sopenharmony_ci#define SOFIA_KEYLIGHT_REG 0x07 328c2ecf20Sopenharmony_ci#define SOFIA_DIMMING_REG 0x09 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci/* Function Prototypes for SX1 devices control on I2C bus */ 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ciint sx1_setbacklight(u8 backlight); 388c2ecf20Sopenharmony_ciint sx1_getbacklight(u8 *backlight); 398c2ecf20Sopenharmony_ciint sx1_setkeylight(u8 keylight); 408c2ecf20Sopenharmony_ciint sx1_getkeylight(u8 *keylight); 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ciint sx1_setmmipower(u8 onoff); 438c2ecf20Sopenharmony_ciint sx1_setusbpower(u8 onoff); 448c2ecf20Sopenharmony_ciint sx1_i2c_read_byte(u8 devaddr, u8 regoffset, u8 *value); 458c2ecf20Sopenharmony_ciint sx1_i2c_write_byte(u8 devaddr, u8 regoffset, u8 value); 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci/* MMC prototypes */ 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ciextern void sx1_mmc_init(void); 508c2ecf20Sopenharmony_ciextern void sx1_mmc_slot_cover_handler(void *arg, int state); 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci#endif /* __ASM_ARCH_SX1_I2C_CHIPS_H */ 53