karo: tx6: remove obsolete TX6Q-1020
authorLothar Waßmann <LW@KARO-electronics.de>
Mon, 11 Jul 2016 08:40:30 +0000 (10:40 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 11 Jul 2016 08:40:30 +0000 (10:40 +0200)
board/karo/tx6/Kconfig
board/karo/tx6/Makefile
board/karo/tx6/pmic.c
board/karo/tx6/rn5t618.c [deleted file]
board/karo/tx6/tx6qdl.c
configs/tx6q-1020_defconfig [deleted file]
configs/tx6q-1020_mfg_defconfig [deleted file]
configs/tx6q-1020_noenv_defconfig [deleted file]
configs/tx6q-1020_sec_defconfig [deleted file]
include/configs/tx6.h

index 1121891..be2cfd8 100644 (file)
@@ -86,7 +86,7 @@ config TARGET_TX6Q_NAND
        select SYS_I2C_MXC
 
 config TARGET_TX6Q_EMMC
-       bool "TX6Q modules with eMMC (TX6Q-1020/TX6Q-1036)"
+       bool "TX6Q modules with eMMC (TX6Q-1036)"
        select SOC_MX6Q
        select SYS_I2C
        select SYS_I2C_MXC
index 801773b..435ef2a 100644 (file)
@@ -14,6 +14,5 @@ else
        obj-$(CONFIG_LTC3676)   += ltc3676.o
 endif
 obj-$(CONFIG_RN5T567)          += rn5t567.o
-obj-$(CONFIG_RN5T618)          += rn5t618.o
 
 obj-$(CONFIG_CMD_ROMUPDATE)    += flash.o
index e670b6a..462a095 100644 (file)
@@ -29,9 +29,6 @@ static struct {
 #ifdef CONFIG_LTC3676
        { 0x3c, ltc3676_pmic_setup, "LTC3676", },
 #endif
-#ifdef CONFIG_RN5T618
-       { 0x32, rn5t618_pmic_setup, "RN5T618", },
-#endif
 #ifdef CONFIG_RN5T567
        { 0x33, rn5t567_pmic_setup, "RN5T567", },
 #endif
diff --git a/board/karo/tx6/rn5t618.c b/board/karo/tx6/rn5t618.c
deleted file mode 100644 (file)
index f5bcb4f..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright (C) 2014 Lothar Waßmann <LW@KARO-electronics.de>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#include <common.h>
-#include <i2c.h>
-
-#include "../common/karo.h"
-#include "pmic.h"
-
-#define RN5T618_NOETIMSET      0x11
-#define RN5T618_LDORTC1_SLOT   0x2a
-#define RN5T618_DC1CTL         0x2c
-#define RN5T618_DC1CTL2                0x2d
-#define RN5T618_DC2CTL         0x2e
-#define RN5T618_DC2CTL2                0x2f
-#define RN5T618_DC3CTL         0x30
-#define RN5T618_DC3CTL2                0x31
-#define RN5T618_DC1DAC         0x36 /* CORE */
-#define RN5T618_DC2DAC         0x37 /* SOC */
-#define RN5T618_DC3DAC         0x38 /* DDR */
-#define RN5T618_DC1DAC_SLP     0x3b
-#define RN5T618_DC2DAC_SLP     0x3c
-#define RN5T618_DC3DAC_SLP     0x3d
-#define RN5T618_LDOEN1         0x44
-#define RN5T618_LDOEN2         0x45
-#define RN5T618_LDODIS         0x46
-#define RN5T618_LDO3DAC                0x4e /* IO */
-#define RN5T618_LDORTCDAC      0x56 /* VBACKUP */
-
-#define VDD_RTC_VAL            mV_to_regval_rtc(3000)
-#define VDD_HIGH_VAL           mV_to_regval3(3000)
-#define VDD_HIGH_VAL_LP                mV_to_regval3(3000)
-#define VDD_CORE_VAL           mV_to_regval(1425)              /* DCDC1 */
-#define VDD_CORE_VAL_LP                mV_to_regval(900)
-#define VDD_SOC_VAL            mV_to_regval(1425)              /* DCDC2 */
-#define VDD_SOC_VAL_LP         mV_to_regval(900)
-#define VDD_DDR_VAL            mV_to_regval(1500)              /* DCDC3 */
-#define VDD_DDR_VAL_LP         mV_to_regval(1500)
-
-/* calculate voltages in 10mV */
-#define v2r(v,n,m)             DIV_ROUND(((((v) < (n)) ? (n) : (v)) - (n)), (m))
-#define r2v(r,n,m)             (((r) * (m) + (n)) / 10)
-
-/* DCDC1-3 */
-#define mV_to_regval(mV)       v2r((mV) * 10, 6000, 125)
-#define regval_to_mV(r)                r2v(r, 6000, 125)
-
-/* LDO1-2 */
-#define mV_to_regval2(mV)      v2r((mV) * 10, 9000, 250)
-#define regval2_to_mV(r)       r2v(r, 9000, 250)
-
-/* LDO3 */
-#define mV_to_regval3(mV)      v2r((mV) * 10, 6000, 250)
-#define regval3_to_mV(r)       r2v(r, 6000, 250)
-
-/* LDORTC */
-#define mV_to_regval_rtc(mV)   v2r((mV) * 10, 17000, 250)
-#define regval_rtc_to_mV(r)    r2v(r, 17000, 250)
-
-static struct pmic_regs rn5t618_regs[] = {
-       { RN5T618_NOETIMSET, 0, },
-       { RN5T618_DC1DAC, VDD_CORE_VAL, },
-       { RN5T618_DC2DAC, VDD_SOC_VAL, },
-       { RN5T618_DC3DAC, VDD_DDR_VAL, },
-       { RN5T618_DC1DAC_SLP, VDD_CORE_VAL_LP, },
-       { RN5T618_DC2DAC_SLP, VDD_SOC_VAL_LP, },
-       { RN5T618_DC3DAC_SLP, VDD_DDR_VAL_LP, },
-       { RN5T618_LDOEN1, 0x01f, ~0x1f, },
-       { RN5T618_LDOEN2, 0x10, ~0x30, },
-       { RN5T618_LDODIS, 0x00, },
-       { RN5T618_LDO3DAC, VDD_HIGH_VAL, },
-       { RN5T618_LDORTCDAC, VDD_RTC_VAL, },
-       { RN5T618_LDORTC1_SLOT, 0x0f, ~0x3f, },
-};
-
-static int rn5t618_setup_regs(uchar slave_addr, struct pmic_regs *r,
-                       size_t count)
-{
-       int ret;
-       int i;
-
-       for (i = 0; i < count; i++, r++) {
-#ifdef DEBUG
-               unsigned char value;
-
-               ret = i2c_read(slave_addr, r->addr, 1, &value, 1);
-               if (ret) {
-                       printf("%s: failed to read PMIC register %02x: %d\n",
-                               __func__, r->addr, ret);
-                       return ret;
-               }
-               if ((value & ~r->mask) != r->val) {
-                       printf("Changing PMIC reg %02x from %02x to %02x\n",
-                               r->addr, value, r->val);
-               }
-#endif
-               ret = i2c_write(slave_addr, r->addr, 1, &r->val, 1);
-               if (ret) {
-                       printf("%s: failed to write PMIC register %02x: %d\n",
-                               __func__, r->addr, ret);
-                       return ret;
-               }
-#ifdef DEBUG
-               ret = i2c_read(slave_addr, r->addr, 1, &value, 1);
-               if (ret) {
-                       printf("%s: failed to read PMIC register %02x: %d\n",
-                               __func__, r->addr, ret);
-                       return ret;
-               }
-               if (value != r->val) {
-                       printf("Failed to set PMIC reg %02x to %02x; actual value: %02x\n",
-                               r->addr, r->val, value);
-               }
-#endif
-       }
-       return 0;
-}
-
-int rn5t618_pmic_setup(uchar slave_addr, struct pmic_regs *regs,
-               size_t count)
-{
-       int ret;
-       unsigned char value;
-
-       ret = i2c_read(slave_addr, 0x11, 1, &value, 1);
-       if (ret) {
-               printf("%s: i2c_read error: %d\n", __func__, ret);
-               return ret;
-       }
-
-       ret = rn5t618_setup_regs(slave_addr, rn5t618_regs,
-                               ARRAY_SIZE(rn5t618_regs));
-       if (ret)
-               return ret;
-
-       ret = i2c_read(slave_addr, RN5T618_DC1DAC, 1, &value, 1);
-       if (ret == 0) {
-               printf("VDDCORE set to %umV\n", regval_to_mV(value));
-       } else {
-               printf("Failed to read VDDCORE register setting\n");
-       }
-
-       ret = i2c_read(slave_addr, RN5T618_DC2DAC, 1, &value, 1);
-       if (ret == 0) {
-               printf("VDDSOC  set to %umV\n", regval_to_mV(value));
-       } else {
-               printf("Failed to read VDDSOC register setting\n");
-       }
-
-       return ret;
-}
index d183db6..d899b7d 100644 (file)
@@ -430,11 +430,7 @@ static char tx6_mem_table[] = {
        '3', /* TX6U-8033 1GiB SDRAM 64bit; 4GiB eMMC */
        '?', /* N/A 256MiB SDRAM 16bit; 8GiB eMMC */
        '?', /* N/A 512MiB SDRAM 32bit; 8GiB eMMC */
-#if defined(CONFIG_TX6_REV) && CONFIG_TX6_REV == 2
-       '0', /* TX6Q-1020 (legacy) 1GiB SDRAM 64bit; 8GiB eMMC */
-#else
        '6', /* TX6Q-1036 1GiB SDRAM 64bit; 8GiB eMMC */
-#endif
 };
 
 static struct {
diff --git a/configs/tx6q-1020_defconfig b/configs/tx6q-1020_defconfig
deleted file mode 100644 (file)
index a3684da..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-CONFIG_SYS_EXTRA_OPTIONS="MMC_BOOT_SIZE=4096,TX6_REV=0x2"
-CONFIG_ARM=y
-CONFIG_ARCH_MX6=y
-CONFIG_TARGET_TX6=y
-CONFIG_TARGET_TX6Q_EMMC=y
-CONFIG_TX6_UBOOT=y
-CONFIG_BOOTP_DNS=y
-CONFIG_BOOTP_GATEWAY=y
-CONFIG_BOOTP_SUBNETMASK=y
-CONFIG_CMD_BMP=y
-CONFIG_CMD_BOOTCE=y
-CONFIG_CMD_BOOTZ=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_FUSE=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_MEMTEST=y
-CONFIG_CMD_MEMINFO=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_TIME=y
-CONFIG_DOS_PARTITION=y
-CONFIG_ENV_IS_IN_MMC=y
-CONFIG_FEC_MXC=y
-CONFIG_FEC_MXC_PHYADDR=0
-CONFIG_IMX_WATCHDOG=y
-CONFIG_LCD=y
-CONFIG_NET=y
-CONFIG_NETDEVICES=y
-CONFIG_PHY_SMSC=y
-CONFIG_SYS_PROMPT="TX6Q U-Boot > "
-CONFIG_SYS_SDRAM_CHIP_SIZE=512
diff --git a/configs/tx6q-1020_mfg_defconfig b/configs/tx6q-1020_mfg_defconfig
deleted file mode 100644 (file)
index eab82df..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-CONFIG_SYS_EXTRA_OPTIONS="MMC_BOOT_SIZE=4096,TX6_REV=0x2"
-CONFIG_ARM=y
-CONFIG_ARCH_MX6=y
-CONFIG_TARGET_TX6=y
-CONFIG_TARGET_TX6Q_EMMC=y
-CONFIG_TX6_UBOOT_MFG=y
-CONFIG_BOOTP_DNS=y
-CONFIG_BOOTP_GATEWAY=y
-CONFIG_BOOTP_SUBNETMASK=y
-CONFIG_CMD_BMP=y
-CONFIG_CMD_BOOTCE=y
-CONFIG_CMD_BOOTZ=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_FUSE=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_MEMTEST=y
-CONFIG_CMD_MEMINFO=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_TIME=y
-CONFIG_DOS_PARTITION=y
-CONFIG_ENV_IS_IN_MMC=y
-CONFIG_FEC_MXC=y
-CONFIG_FEC_MXC_PHYADDR=0
-CONFIG_IMX_WATCHDOG=y
-CONFIG_NET=y
-CONFIG_NETDEVICES=y
-CONFIG_PHY_SMSC=y
-CONFIG_SYS_PROMPT="TX6Q U-Boot > "
-CONFIG_SYS_SDRAM_CHIP_SIZE=512
diff --git a/configs/tx6q-1020_noenv_defconfig b/configs/tx6q-1020_noenv_defconfig
deleted file mode 100644 (file)
index c8a841a..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-CONFIG_SYS_EXTRA_OPTIONS="MMC_BOOT_SIZE=4096,TX6_REV=0x2"
-CONFIG_ARM=y
-CONFIG_ARCH_MX6=y
-CONFIG_TARGET_TX6=y
-CONFIG_TARGET_TX6Q_EMMC=y
-CONFIG_TX6_UBOOT_NOENV=y
-CONFIG_BOOTP_DNS=y
-CONFIG_BOOTP_GATEWAY=y
-CONFIG_BOOTP_SUBNETMASK=y
-CONFIG_CMD_BMP=y
-CONFIG_CMD_BOOTCE=y
-CONFIG_CMD_BOOTZ=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_FUSE=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_MEMTEST=y
-CONFIG_CMD_MEMINFO=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_TIME=y
-CONFIG_DOS_PARTITION=y
-CONFIG_ENV_IS_IN_MMC=y
-CONFIG_FEC_MXC=y
-CONFIG_FEC_MXC_PHYADDR=0
-CONFIG_IMX_WATCHDOG=y
-CONFIG_NET=y
-CONFIG_NETDEVICES=y
-CONFIG_PHY_SMSC=y
-CONFIG_SYS_PROMPT="TX6Q U-Boot > "
-CONFIG_SYS_SDRAM_CHIP_SIZE=512
diff --git a/configs/tx6q-1020_sec_defconfig b/configs/tx6q-1020_sec_defconfig
deleted file mode 100644 (file)
index e35c396..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-CONFIG_SYS_EXTRA_OPTIONS="MMC_BOOT_SIZE=4096,SECURE_BOOT,TX6_REV=0x2"
-CONFIG_ARM=y
-CONFIG_ARCH_MX6=y
-CONFIG_TARGET_TX6=y
-CONFIG_TARGET_TX6Q_EMMC=y
-CONFIG_TX6_UBOOT=y
-CONFIG_BOOTP_DNS=y
-CONFIG_BOOTP_GATEWAY=y
-CONFIG_BOOTP_SUBNETMASK=y
-CONFIG_CMD_BMP=y
-CONFIG_CMD_BOOTCE=y
-CONFIG_CMD_BOOTZ=y
-CONFIG_CMD_CACHE=y
-CONFIG_CMD_DHCP=y
-CONFIG_CMD_FUSE=y
-CONFIG_CMD_I2C=y
-CONFIG_CMD_MEMTEST=y
-CONFIG_CMD_MEMINFO=y
-CONFIG_CMD_MII=y
-CONFIG_CMD_MMC=y
-CONFIG_CMD_PING=y
-CONFIG_CMD_TIME=y
-CONFIG_DOS_PARTITION=y
-CONFIG_ENV_IS_IN_MMC=y
-CONFIG_FEC_MXC=y
-CONFIG_FEC_MXC_PHYADDR=0
-CONFIG_IMX_WATCHDOG=y
-CONFIG_LCD=y
-CONFIG_NET=y
-CONFIG_NETDEVICES=y
-CONFIG_PHY_SMSC=y
-CONFIG_SYS_PROMPT="TX6Q U-Boot > "
-CONFIG_SYS_SDRAM_CHIP_SIZE=512
index dcd36de..e64eebb 100644 (file)
 #if defined(CONFIG_TX6_REV)
 #if CONFIG_TX6_REV == 0x1
 #define CONFIG_LTC3676
-#elif CONFIG_TX6_REV == 0x2
-#define CONFIG_RN5T618
 #elif CONFIG_TX6_REV == 0x3
 #define CONFIG_RN5T567
 #else