+/* SPDX-License-Identifier: GPL-2.0+ */
/*
*
* Configuration settings for the TQ Systems TQMa6<Q,D,DL,S> module.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __CONFIG_H
#define __CONFIG_H
#include <linux/kconfig.h>
+#include <linux/stringify.h>
+
/* SPL */
/* #if defined(CONFIG_SPL_BUILD) */
/* common IMX6 SPL configuration */
/* #endif */
/* place code in last 4 MiB of RAM */
-#if defined(CONFIG_TQMA6S)
-#define CONFIG_SYS_TEXT_BASE 0x2fc00000
-#elif defined(CONFIG_TQMA6Q) || defined(CONFIG_TQMA6DL)
-#define CONFIG_SYS_TEXT_BASE 0x4fc00000
-#endif
#include "mx6_common.h"
#define PHYS_SDRAM_SIZE (SZ_1G)
#endif
-#define CONFIG_MXC_UART
-
-/* SPI */
-#define CONFIG_MXC_SPI
-
/* SPI Flash */
#define TQMA6_SPI_FLASH_SECTOR_SIZE SZ_64K
-#define CONFIG_SF_DEFAULT_BUS 0
-#define CONFIG_SF_DEFAULT_CS 0
-#define CONFIG_SF_DEFAULT_SPEED 50000000
-#define CONFIG_SF_DEFAULT_MODE (SPI_MODE_0)
-
/* I2C Configs */
-#define CONFIG_SYS_I2C
-#define CONFIG_SYS_I2C_MXC
-#define CONFIG_SYS_I2C_MXC_I2C1 /* enable I2C bus 1 */
-#define CONFIG_SYS_I2C_MXC_I2C2 /* enable I2C bus 2 */
-#define CONFIG_SYS_I2C_MXC_I2C3 /* enable I2C bus 3 */
#define CONFIG_I2C_MULTI_BUS
-#define CONFIG_SYS_I2C_SPEED 100000
/* I2C EEPROM (M24C64) */
-#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
#define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_BITS 5 /* 32 Bytes */
#define CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS 20
-#define CONFIG_POWER
-#define CONFIG_POWER_I2C
+#if !defined(CONFIG_DM_PMIC)
#define CONFIG_POWER_PFUZE100
#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
#define TQMA6_PFUZE100_I2C_BUS 2
+#endif
/* MMC Configs */
#define CONFIG_SYS_FSL_ESDHC_ADDR 0
/* USB Configs */
-#define CONFIG_USB_HOST_ETHER
-#define CONFIG_USB_ETHER_SMSC95XX
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
#define CONFIG_USB_MAX_CONTROLLER_COUNT 2
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */
#define CONFIG_FEC_MXC
#define IMX_FEC_BASE ENET_BASE_ADDR
-#define CONFIG_MII
#define CONFIG_ARP_TIMEOUT 200UL
-#define CONFIG_ENV_SIZE (SZ_8K)
-/* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 2 * SZ_1M)
-
#if defined(CONFIG_TQMA6X_MMC_BOOT)
#define TQMA6_UBOOT_OFFSET SZ_1K
#define TQMA6_UBOOT_SECTOR_START 0x2
#define TQMA6_UBOOT_SECTOR_COUNT 0x7fe
-#define CONFIG_ENV_OFFSET SZ_1M
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#define TQMA6_FDT_OFFSET (2 * SZ_1M)
#define TQMA6_FDT_SECTOR_START 0x1000
#define TQMA6_FDT_SECTOR_COUNT 0x800
#define TQMA6_UBOOT_SIZE (TQMA6_UBOOT_SECTOR_SIZE * \
TQMA6_UBOOT_SECTOR_COUNT)
-#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
-#define CONFIG_ENV_OFFSET (TQMA6_UBOOT_SIZE)
-#define CONFIG_ENV_SECT_SIZE TQMA6_SPI_FLASH_SECTOR_SIZE
-#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
- CONFIG_ENV_SECT_SIZE)
-
-#define CONFIG_ENV_SPI_BUS (CONFIG_SF_DEFAULT_BUS)
-#define CONFIG_ENV_SPI_CS (CONFIG_SF_DEFAULT_CS)
-#define CONFIG_ENV_SPI_MAX_HZ (CONFIG_SF_DEFAULT_SPEED)
-#define CONFIG_ENV_SPI_MODE (CONFIG_SF_DEFAULT_MODE)
-
#define TQMA6_FDT_OFFSET (CONFIG_ENV_OFFSET_REDUND + \
CONFIG_ENV_SECT_SIZE)
#define TQMA6_FDT_SECT_SIZE (TQMA6_SPI_FLASH_SECTOR_SIZE)
TQMA6_EXTRA_BOOTDEV_ENV_SETTINGS \
/* Physical Memory Map */
-#define CONFIG_NR_DRAM_BANKS 1
#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM