1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */ 2f7dc4ac3STom Warren /* 3f7dc4ac3STom Warren * (C) Copyright 2013 4f7dc4ac3STom Warren * NVIDIA Corporation <www.nvidia.com> 5f7dc4ac3STom Warren */ 6f7dc4ac3STom Warren 7f7dc4ac3STom Warren /* AS3722-PMIC-specific early init regs */ 8f7dc4ac3STom Warren 9f7dc4ac3STom Warren #define AS3722_I2C_ADDR 0x80 10f7dc4ac3STom Warren 11f7dc4ac3STom Warren #define AS3722_SD0VOLTAGE_REG 0x00 /* CPU */ 12f7dc4ac3STom Warren #define AS3722_SD1VOLTAGE_REG 0x01 /* CORE, already set by OTP */ 13f7dc4ac3STom Warren #define AS3722_SD6VOLTAGE_REG 0x06 /* GPU */ 14f7dc4ac3STom Warren #define AS3722_SDCONTROL_REG 0x4D 15f7dc4ac3STom Warren 16f7dc4ac3STom Warren #define AS3722_LDO2VOLTAGE_REG 0x12 /* VPP_FUSE */ 17f7dc4ac3STom Warren #define AS3722_LDO6VOLTAGE_REG 0x16 /* VDD_SDMMC */ 18f7dc4ac3STom Warren #define AS3722_LDCONTROL_REG 0x4E 19f7dc4ac3STom Warren 20b6152676SPeter Chubb #if defined(CONFIG_TARGET_VENICE2) 21f7dc4ac3STom Warren #define AS3722_SD0VOLTAGE_DATA (0x2800 | AS3722_SD0VOLTAGE_REG) 22b6152676SPeter Chubb #else /* TK1 or Nyan-Big */ 23b6152676SPeter Chubb #define AS3722_SD0VOLTAGE_DATA (0x3C00 | AS3722_SD0VOLTAGE_REG) 24e04bfdacSStephen Warren #endif 25f7dc4ac3STom Warren #define AS3722_SD0CONTROL_DATA (0x0100 | AS3722_SDCONTROL_REG) 26f7dc4ac3STom Warren 27b6152676SPeter Chubb #if defined(CONFIG_TARGET_JETSON_TK1) || defined(CONFIG_TARGET_CEI_TK1_SOM) 28b064c912SBibek Basu #define AS3722_SD1VOLTAGE_DATA (0x2800 | AS3722_SD1VOLTAGE_REG) 29f7dc4ac3STom Warren #define AS3722_SD1CONTROL_DATA (0x0200 | AS3722_SDCONTROL_REG) 30b064c912SBibek Basu #endif 31f7dc4ac3STom Warren 32f7dc4ac3STom Warren #define AS3722_SD6CONTROL_DATA (0x4000 | AS3722_SDCONTROL_REG) 33f7dc4ac3STom Warren #define AS3722_SD6VOLTAGE_DATA (0x2800 | AS3722_SD6VOLTAGE_REG) 34f7dc4ac3STom Warren 35f7dc4ac3STom Warren #define AS3722_LDO2CONTROL_DATA (0x0400 | AS3722_LDCONTROL_REG) 36f7dc4ac3STom Warren #define AS3722_LDO2VOLTAGE_DATA (0x1000 | AS3722_LDO2VOLTAGE_REG) 37f7dc4ac3STom Warren 38f7dc4ac3STom Warren #define AS3722_LDO6CONTROL_DATA (0x4000 | AS3722_LDCONTROL_REG) 39f7dc4ac3STom Warren #define AS3722_LDO6VOLTAGE_DATA (0x3F00 | AS3722_LDO6VOLTAGE_REG) 40f7dc4ac3STom Warren 41f7dc4ac3STom Warren #define I2C_SEND_2_BYTES 0x0A02 42f7dc4ac3STom Warren 43f7dc4ac3STom Warren void pmic_enable_cpu_vdd(void); 44