From 3b7ad216e26567342162722fca7b2e142e694d0f Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Tue, 9 Jun 2015 06:40:22 -0700 Subject: thermal:imx_thermal: enter busywait cooling loop when over max CPU temp Remove the check for temperature being within the min/max range and enter the busywait cooling loop whenever the CPU temperature is over the critical temp. This fixes the issue where if a board was booted at a temp greater than the CPU temperature max, it would skip the loop and never indicate or try to address the overtemp issue. Cc: Ye Li Cc: Jason Liu Signed-off-by: Tim Harvey --- drivers/thermal/imx_thermal.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'drivers') diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 0d893c9d067..42ca8d0b6b3 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -130,16 +130,12 @@ int imx_thermal_get_temp(struct udevice *dev, int *temp) int cpu_tmp = 0; cpu_tmp = read_cpu_temperature(dev); - while (cpu_tmp > priv->minc && cpu_tmp < priv->maxc) { - if (cpu_tmp >= priv->critical) { - printf("CPU Temperature (%dC) too close to max (%dC)", - cpu_tmp, priv->maxc); - puts(" waiting...\n"); - udelay(5000000); - cpu_tmp = read_cpu_temperature(dev); - } else { - break; - } + while (cpu_tmp >= priv->critical) { + printf("CPU Temperature (%dC) too close to max (%dC)", + cpu_tmp, priv->maxc); + puts(" waiting...\n"); + udelay(5000000); + cpu_tmp = read_cpu_temperature(dev); } *temp = cpu_tmp; -- cgit v1.2.3 From b189584bbb8b8857d9e202e14ddc94a48e3efaec Mon Sep 17 00:00:00 2001 From: Albert ARIBAUD \(3ADEV\) Date: Fri, 19 Jun 2015 14:18:27 +0200 Subject: net: fec_mxc: remove useless struct nbuf This locally defined struct is actually only used once and as an opaque type. Remove it for clarity. Signed-off-by: Albert ARIBAUD (3ADEV) Acked-by: Joe Hershberger --- drivers/net/fec_mxc.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'drivers') diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 9225d37285f..c5dcbbbcede 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -67,13 +67,6 @@ DECLARE_GLOBAL_DATA_PTR; #undef DEBUG -struct nbuf { - uint8_t data[1500]; /**< actual data */ - int length; /**< actual length */ - int used; /**< buffer in use or not */ - uint8_t head[16]; /**< MAC header(6 + 6 + 2) + 2(aligned) */ -}; - #ifdef CONFIG_FEC_MXC_SWAP_PACKET static void swap_packet(uint32_t *packet, int length) { @@ -775,7 +768,6 @@ static int fec_recv(struct eth_device *dev) struct fec_bd *rbd = &fec->rbd_base[fec->rbd_index]; unsigned long ievent; int frame_length, len = 0; - struct nbuf *frame; uint16_t bd_status; uint32_t addr, size, end; int i; @@ -835,12 +827,11 @@ static int fec_recv(struct eth_device *dev) /* * Get buffer address and size */ - frame = (struct nbuf *)readl(&rbd->data_pointer); + addr = readl(&rbd->data_pointer); frame_length = readw(&rbd->data_length) - 4; /* * Invalidate data cache over the buffer */ - addr = (uint32_t)frame; end = roundup(addr + frame_length, ARCH_DMA_MINALIGN); addr &= ~(ARCH_DMA_MINALIGN - 1); invalidate_dcache_range(addr, end); @@ -849,16 +840,15 @@ static int fec_recv(struct eth_device *dev) * Fill the buffer and pass it to upper layers */ #ifdef CONFIG_FEC_MXC_SWAP_PACKET - swap_packet((uint32_t *)frame->data, frame_length); + swap_packet((uint32_t *)addr, frame_length); #endif - memcpy(buff, frame->data, frame_length); + memcpy(buff, (char *)addr, frame_length); net_process_received_packet(buff, frame_length); len = frame_length; } else { if (bd_status & FEC_RBD_ERR) - printf("error frame: 0x%08lx 0x%08x\n", - (ulong)rbd->data_pointer, - bd_status); + printf("error frame: 0x%08x 0x%08x\n", + addr, bd_status); } /* -- cgit v1.2.3 From b44e60ac0422cda092993b2f58d35a39c5bf2f35 Mon Sep 17 00:00:00 2001 From: Albert ARIBAUD \(3ADEV\) Date: Fri, 19 Jun 2015 14:18:29 +0200 Subject: i2c: fix vf610 support Add support in mxc_i2c driver, iomux_v3 and vf610 architecture for the four I2C instances available in VF610. Signed-off-by: Albert ARIBAUD (3ADEV) --- arch/arm/include/asm/arch-vf610/crm_regs.h | 3 +++ arch/arm/include/asm/arch-vf610/imx-regs.h | 3 +++ arch/arm/include/asm/arch-vf610/iomux-vf610.h | 11 +++++++---- arch/arm/include/asm/imx-common/iomux-v3.h | 2 ++ drivers/i2c/mxc_i2c.c | 3 ++- 5 files changed, 17 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/arch/arm/include/asm/arch-vf610/crm_regs.h b/arch/arm/include/asm/arch-vf610/crm_regs.h index fdb45e9954c..a46e396f1d9 100644 --- a/arch/arm/include/asm/arch-vf610/crm_regs.h +++ b/arch/arm/include/asm/arch-vf610/crm_regs.h @@ -207,6 +207,7 @@ struct anadig_reg { #define CCM_CCGR4_CCM_CTRL_MASK (0x3 << 22) #define CCM_CCGR4_GPC_CTRL_MASK (0x3 << 24) #define CCM_CCGR4_I2C0_CTRL_MASK (0x3 << 12) +#define CCM_CCGR4_I2C1_CTRL_MASK (0x3 << 14) #define CCM_CCGR6_OCOTP_CTRL_MASK (0x3 << 10) #define CCM_CCGR6_DSPI2_CTRL_MASK (0x3 << 24) #define CCM_CCGR6_DSPI3_CTRL_MASK (0x3 << 26) @@ -216,6 +217,8 @@ struct anadig_reg { #define CCM_CCGR9_FEC0_CTRL_MASK 0x3 #define CCM_CCGR9_FEC1_CTRL_MASK (0x3 << 2) #define CCM_CCGR10_NFC_CTRL_MASK 0x3 +#define CCM_CCGR10_I2C2_CTRL_MASK (0x3 << 12) +#define CCM_CCGR10_I2C3_CTRL_MASK (0x3 << 14) #define ANADIG_PLL7_CTRL_BYPASS (1 << 16) #define ANADIG_PLL7_CTRL_ENABLE (1 << 13) diff --git a/arch/arm/include/asm/arch-vf610/imx-regs.h b/arch/arm/include/asm/arch-vf610/imx-regs.h index 7df3b1e3921..436698588c2 100644 --- a/arch/arm/include/asm/arch-vf610/imx-regs.h +++ b/arch/arm/include/asm/arch-vf610/imx-regs.h @@ -75,6 +75,9 @@ #define ESAI_FIFO_BASE_ADDR (AIPS0_BASE_ADDR + 0x00063000) #define WDOG_BASE_ADDR (AIPS0_BASE_ADDR + 0x00065000) #define I2C1_BASE_ADDR (AIPS0_BASE_ADDR + 0x00066000) +#define I2C2_BASE_ADDR (AIPS0_BASE_ADDR + 0x00067000) +#define I2C3_BASE_ADDR (AIPS0_BASE_ADDR + 0x000E6000) +#define I2C4_BASE_ADDR (AIPS0_BASE_ADDR + 0x000E7000) #define WKUP_BASE_ADDR (AIPS0_BASE_ADDR + 0x0006A000) #define CCM_BASE_ADDR (AIPS0_BASE_ADDR + 0x0006B000) #define GPC_BASE_ADDR (AIPS0_BASE_ADDR + 0x0006C000) diff --git a/arch/arm/include/asm/arch-vf610/iomux-vf610.h b/arch/arm/include/asm/arch-vf610/iomux-vf610.h index 019307b2f9e..0e2bd5366ca 100644 --- a/arch/arm/include/asm/arch-vf610/iomux-vf610.h +++ b/arch/arm/include/asm/arch-vf610/iomux-vf610.h @@ -20,7 +20,8 @@ #define VF610_DDR_PAD_CTRL_1 (PAD_CTL_DSE_25ohm | \ PAD_CTL_INPUT_DIFFERENTIAL) #define VF610_I2C_PAD_CTRL (PAD_CTL_PUS_47K_UP | PAD_CTL_DSE_50ohm | \ - PAD_CTL_SPEED_HIGH | PAD_CTL_OBE_IBE_ENABLE) + PAD_CTL_SPEED_HIGH | PAD_CTL_ODE | \ + PAD_CTL_OBE_IBE_ENABLE) #define VF610_NFC_IO_PAD_CTRL (PAD_CTL_SPEED_MED | PAD_CTL_SRE | \ PAD_CTL_DSE_50ohm | PAD_CTL_PUS_47K_UP | \ PAD_CTL_OBE_IBE_ENABLE) @@ -110,6 +111,8 @@ enum { VF610_PAD_PTA29__ESDHC1_DAT3 = IOMUX_PAD(0x004c, 0x004c, 5, __NA_, 0, VF610_SDHC_PAD_CTRL), VF610_PAD_PTB14__I2C0_SCL = IOMUX_PAD(0x0090, 0x0090, 2, 0x033c, 1, VF610_I2C_PAD_CTRL), VF610_PAD_PTB15__I2C0_SDA = IOMUX_PAD(0x0094, 0x0094, 2, 0x0340, 1, VF610_I2C_PAD_CTRL), + VF610_PAD_PTA22__I2C2_SCL = IOMUX_PAD(0x0030, 0x0030, 6, 0x034c, 0, VF610_I2C_PAD_CTRL), + VF610_PAD_PTA23__I2C2_SDA = IOMUX_PAD(0x0034, 0x0034, 6, 0x0350, 0, VF610_I2C_PAD_CTRL), VF610_PAD_PTD31__NF_IO15 = IOMUX_PAD(0x00fc, 0x00fc, 2, __NA_, 0, VF610_NFC_IO_PAD_CTRL), VF610_PAD_PTD31__GPIO_63 = IOMUX_PAD(0x00fc, 0x00fc, 0, __NA_, 0, VF610_GPIO_PAD_CTRL), VF610_PAD_PTD30__NF_IO14 = IOMUX_PAD(0x0100, 0x0100, 2, __NA_, 0, VF610_NFC_IO_PAD_CTRL), @@ -146,10 +149,10 @@ enum { VF610_PAD_PTD12__GPIO_91 = IOMUX_PAD(0x016c, 0x016c, 0, __NA_, 0, VF610_GPIO_PAD_CTRL), VF610_PAD_PTD13__GPIO_92 = IOMUX_PAD(0x0170, 0x0170, 0, __NA_, 0, VF610_GPIO_PAD_CTRL), VF610_PAD_PTD22__NF_IO6 = IOMUX_PAD(0x0120, 0x0120, 2, __NA_, 0, VF610_NFC_IO_PAD_CTRL), - VF610_PAD_PTD21__NF_IO5 = IOMUX_PAD(0x0124, 0x0124, 2, __NA_, 0, VF610_NFC_IO_PAD_CTRL), - VF610_PAD_PTD20__NF_IO4 = IOMUX_PAD(0x0128, 0x0128, 2, __NA_, 0, VF610_NFC_IO_PAD_CTRL), + VF610_PAD_PTD21__NF_IO5 = IOMUX_PAD(0x0124, 0x0124, 2, __NA_, 0, VF610_NFC_IO_PAD_CTRL), + VF610_PAD_PTD20__NF_IO4 = IOMUX_PAD(0x0128, 0x0128, 2, __NA_, 0, VF610_NFC_IO_PAD_CTRL), VF610_PAD_PTD19__NF_IO3 = IOMUX_PAD(0x012c, 0x012c, 2, __NA_, 0, VF610_NFC_IO_PAD_CTRL), - VF610_PAD_PTD18__NF_IO2 = IOMUX_PAD(0x0130, 0x0130, 2, __NA_, 0, VF610_NFC_IO_PAD_CTRL), + VF610_PAD_PTD18__NF_IO2 = IOMUX_PAD(0x0130, 0x0130, 2, __NA_, 0, VF610_NFC_IO_PAD_CTRL), VF610_PAD_PTD17__NF_IO1 = IOMUX_PAD(0x0134, 0x0134, 2, __NA_, 0, VF610_NFC_IO_PAD_CTRL), VF610_PAD_PTD16__NF_IO0 = IOMUX_PAD(0x0138, 0x0138, 2, __NA_, 0, VF610_NFC_IO_PAD_CTRL), VF610_PAD_PTB24__NF_WE_B = IOMUX_PAD(0x0178, 0x0178, 5, __NA_, 0, VF610_NFC_CN_PAD_CTRL), diff --git a/arch/arm/include/asm/imx-common/iomux-v3.h b/arch/arm/include/asm/imx-common/iomux-v3.h index 258101949a6..5cde90f7ad6 100644 --- a/arch/arm/include/asm/imx-common/iomux-v3.h +++ b/arch/arm/include/asm/imx-common/iomux-v3.h @@ -127,6 +127,8 @@ typedef u64 iomux_v3_cfg_t; #define PAD_CTL_SRE (1 << 11) +#define PAD_CTL_ODE (1 << 10) + #define PAD_CTL_DSE_150ohm (1 << 6) #define PAD_CTL_DSE_50ohm (3 << 6) #define PAD_CTL_DSE_25ohm (6 << 6) diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index b3c50aaf309..f1056e21a2c 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -523,7 +523,8 @@ static int bus_i2c_write(struct mxc_i2c_bus *i2c_bus, u8 chip, u32 addr, #endif static struct mxc_i2c_bus mxc_i2c_buses[] = { -#if defined(CONFIG_LS102XA) || defined(CONFIG_FSL_LSCH3) +#if defined(CONFIG_LS102XA) || defined(CONFIG_FSL_LSCH3) || \ + defined(CONFIG_VF610) { 0, I2C1_BASE_ADDR, I2C_QUIRK_FLAG }, { 1, I2C2_BASE_ADDR, I2C_QUIRK_FLAG }, { 2, I2C3_BASE_ADDR, I2C_QUIRK_FLAG }, -- cgit v1.2.3 From 425640256a7c5e9259f7583ee4eca1f3b70f8032 Mon Sep 17 00:00:00 2001 From: Tim Harvey Date: Wed, 8 Jul 2015 15:49:43 -0700 Subject: thermal: imx_thermal: fix busywait if IMX6 temp <0C The temperature calculation must be typecasted to keep the compiler from sign extending a negative value prior to division. This fixes an issue where if the CPU temperature is <0C it will get stuck in the busywait loop until the CPU heats up to 0C. Cc: Ye Li Cc: Jason Liu Signed-off-by: Tim Harvey --- drivers/thermal/imx_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index 42ca8d0b6b3..3c6c9679f97 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -115,7 +115,7 @@ static int read_cpu_temperature(struct udevice *dev) writel(TEMPSENSE0_FINISHED, &anatop->tempsense0_clr); /* milli_Tmeas = c2 - Nmeas * c1 */ - temperature = (c2 - n_meas * c1)/1000; + temperature = (long)(c2 - n_meas * c1)/1000; /* power down anatop thermal sensor */ writel(TEMPSENSE0_POWER_DOWN, &anatop->tempsense0_set); -- cgit v1.2.3 From a643acd44c342afbbe14eb073f86a6d0a355c121 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 21 Jul 2015 19:48:40 -0300 Subject: power: pmic: Add support for MAX77696 PMIC Add support for MAX77696 PMIC. Signed-off-by: Fabio Estevam --- drivers/power/pmic/Makefile | 1 + drivers/power/pmic/pmic_max77696.c | 32 ++++++++++++++++++++ include/power/max77696_pmic.h | 60 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 drivers/power/pmic/pmic_max77696.c create mode 100644 include/power/max77696_pmic.h (limited to 'drivers') diff --git a/drivers/power/pmic/Makefile b/drivers/power/pmic/Makefile index ae86f041f34..4ad6df36c2d 100644 --- a/drivers/power/pmic/Makefile +++ b/drivers/power/pmic/Makefile @@ -9,6 +9,7 @@ obj-$(CONFIG_DM_PMIC) += pmic-uclass.o obj-$(CONFIG_DM_PMIC_MAX77686) += max77686.o obj-$(CONFIG_DM_PMIC_SANDBOX) += sandbox.o i2c_pmic_emul.o obj-$(CONFIG_POWER_LTC3676) += pmic_ltc3676.o +obj-$(CONFIG_POWER_MAX77696) += pmic_max77696.o obj-$(CONFIG_POWER_MAX8998) += pmic_max8998.o obj-$(CONFIG_POWER_MAX8997) += pmic_max8997.o obj-$(CONFIG_POWER_MUIC_MAX8997) += muic_max8997.o diff --git a/drivers/power/pmic/pmic_max77696.c b/drivers/power/pmic/pmic_max77696.c new file mode 100644 index 00000000000..93d92f57948 --- /dev/null +++ b/drivers/power/pmic/pmic_max77696.c @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2015 Freescale Semiconductor, Inc. + * Fabio Estevam + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include +#include + +int power_max77696_init(unsigned char bus) +{ + static const char name[] = "MAX77696"; + struct pmic *p = pmic_alloc(); + + if (!p) { + printf("%s: POWER allocation error!\n", __func__); + return -ENOMEM; + } + + p->name = name; + p->interface = PMIC_I2C; + p->number_of_regs = PMIC_NUM_OF_REGS; + p->hw.i2c.addr = CONFIG_POWER_MAX77696_I2C_ADDR; + p->hw.i2c.tx_num = 1; + p->bus = bus; + + return 0; +} diff --git a/include/power/max77696_pmic.h b/include/power/max77696_pmic.h new file mode 100644 index 00000000000..71cdf880548 --- /dev/null +++ b/include/power/max77696_pmic.h @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2015 Freescale Semiconductor, Inc. + * Fabio Estevam + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __MAX77696_PMIC_H__ +#define __MAX77696_PMIC_H__ + +#define CONFIG_POWER_MAX77696_I2C_ADDR 0x3C + +enum { + L01_CNFG1 = 0x43, + L01_CNFG2, + L02_CNFG1, + L02_CNFG2, + L03_CNFG1, + L03_CNFG2, + L04_CNFG1, + L04_CNFG2, + L05_CNFG1, + L05_CNFG2, + L06_CNFG1, + L06_CNFG2, + L07_CNFG1, + L07_CNFG2, + L08_CNFG1, + L08_CNFG2, + L09_CNFG1, + L09_CNFG2, + L10_CNFG1, + L10_CNFG2, + LDO_INT1, + LDO_INT2, + LDO_INT1M, + LDO_INT2M, + LDO_CNFG3, + SW1_CNTRL, + SW2_CNTRL, + SW3_CNTRL, + SW4_CNTRL, + EPDCNFG, + EPDINTS, + EPDINT, + EPDINTM, + EPDVCOM, + EPDVEE, + EPDVNEG, + EPDVPOS, + EPDVDDH, + EPDSEQ, + EPDOKINTS, + CID = 0x9c, + PMIC_NUM_OF_REGS, +}; + +int power_max77696_init(unsigned char bus); + +#endif -- cgit v1.2.3 From 4683b220655937e8f3c360f4aa25274abed76e0d Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Thu, 25 Jun 2015 10:32:26 +0800 Subject: mmc:fsl_esdhc invalidate dcache before read DCIMVAC is upgraded to DCCIMVAC for the individual processor (Cortex-A7) that the DCIMVAC is executed on. We should follow the linux dma follow. Before DMA read, first invalidate dcache then after DMA read, invalidate dcache again. With the DMA direction DMA_FROM_DEVICE, the dcache need be invalidated again after the DMA completion. The reason is that we need explicity make sure the dcache been invalidated thus to get the DMA'ed memory correctly from the physical memory. Any cache-line fill during the DMA operations such as the pre-fetching can cause the DMA coherency issue, thus CPU get the stale data. Signed-off-by: Peng Fan Signed-off-by: Ye.Li Signed-off-by: Nitin Garg Signed-off-by: Jason Liu Reviewed-by: Stefano Babic --- drivers/mmc/fsl_esdhc.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers') diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c index c4719e6f363..0510bf02f41 100644 --- a/drivers/mmc/fsl_esdhc.c +++ b/drivers/mmc/fsl_esdhc.c @@ -341,6 +341,9 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) err = esdhc_setup_data(mmc, data); if(err) return err; + + if (data->flags & MMC_DATA_READ) + check_and_invalidate_dcache_range(cmd, data); } /* Figure out the transfer arguments */ @@ -437,6 +440,11 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) } } while ((irqstat & DATA_COMPLETE) != DATA_COMPLETE); + /* + * Need invalidate the dcache here again to avoid any + * cache-fill during the DMA operations such as the + * speculative pre-fetching etc. + */ if (data->flags & MMC_DATA_READ) check_and_invalidate_dcache_range(cmd, data); #endif -- cgit v1.2.3 From 919e802c867543cd9e7577b92c9a1753a305185d Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Thu, 23 Jul 2015 17:19:35 +0300 Subject: arm: mx6: usb: kconfig: add USB_EHCI_MX6 kconfig option Add USB_EHCI_MX6 option to menuconfig and use it when migrating cm-fx6 usb config to defconfig. Cc: Masahiro Yamada Cc: Marek Vasut Cc: Stefano Babic Cc: Igor Grinberg Signed-off-by: Nikita Kiryanov Acked-by: Igor Grinberg --- configs/cm_fx6_defconfig | 4 ++++ drivers/usb/host/Kconfig | 7 +++++++ include/configs/cm_fx6.h | 3 --- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig index 7ad5c217834..07a84bbc3e3 100644 --- a/configs/cm_fx6_defconfig +++ b/configs/cm_fx6_defconfig @@ -15,4 +15,8 @@ CONFIG_CMD_PING=y CONFIG_SPI_FLASH=y CONFIG_CMD_SF=y CONFIG_CMD_I2C=y +CONFIG_USB=y CONFIG_CMD_USB=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_MX6=y +CONFIG_USB_STORAGE=y diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 8705c7c44c2..b30b43da3b5 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -52,6 +52,13 @@ config USB_EHCI if USB_EHCI_HCD +config USB_EHCI_MX6 + bool "Support for i.MX6 on-chip EHCI USB controller" + depends on ARCH_MX6 + default y + ---help--- + Enables support for the on-chip EHCI controller on i.MX6 SoCs. + config USB_EHCI_UNIPHIER bool "Support for UniPhier on-chip EHCI USB controller" depends on ARCH_UNIPHIER && OF_CONTROL diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 9b00c0d2f26..9f69322f08e 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -198,9 +198,6 @@ #define CONFIG_NET_RETRY_COUNT 5 /* USB */ -#define CONFIG_USB_EHCI -#define CONFIG_USB_EHCI_MX6 -#define CONFIG_USB_STORAGE #define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 -- cgit v1.2.3 From b2f2eea0a7accb758c457e0bd6b15b46a543ecd0 Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Thu, 23 Jul 2015 17:19:36 +0300 Subject: usb: kconfig: usb keyboard kconfig Add Kconfig options for USB keyboard and use them for cm-fx6. Cc: Marek Vasut Cc: Stefano Babic Cc: Igor Grinberg Signed-off-by: Nikita Kiryanov Acked-by: Igor Grinberg --- configs/cm_fx6_defconfig | 2 ++ drivers/usb/Kconfig | 27 +++++++++++++++++++++++++++ include/configs/cm_fx6.h | 2 -- 3 files changed, 29 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig index 07a84bbc3e3..f0fd48cdc18 100644 --- a/configs/cm_fx6_defconfig +++ b/configs/cm_fx6_defconfig @@ -20,3 +20,5 @@ CONFIG_CMD_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_MX6=y CONFIG_USB_STORAGE=y +CONFIG_USB_KEYBOARD=y +CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 637ef3d567e..04289f2e613 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -59,4 +59,31 @@ config USB_STORAGE Say Y here if you want to connect USB mass storage devices to your board's USB port. +config USB_KEYBOARD + bool "USB Keyboard support" + ---help--- + Say Y here if you want to use a USB keyboard for U-Boot command line + input. + +if USB_KEYBOARD + +choice + prompt "USB keyboard polling" + optional + ---help--- + Enable a polling mechanism for USB keyboard. + + config SYS_USB_EVENT_POLL + bool "Interrupt polling" + + config SYS_USB_EVENT_POLL_VIA_INT_QUEUE + bool "Poll via interrupt queue" + + config SYS_USB_EVENT_POLL_VIA_CONTROL_EP + bool "Poll via control EP" + +endchoice + +endif + endif diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 9f69322f08e..059004c7ea0 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -202,8 +202,6 @@ #define CONFIG_MXC_USB_FLAGS 0 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET /* For OTG port */ -#define CONFIG_USB_KEYBOARD -#define CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP #define CONFIG_SYS_STDIO_DEREGISTER /* I2C */ -- cgit v1.2.3 From ff8baf81136094d274d9c7a36125a164ac711425 Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Thu, 23 Jul 2015 17:19:37 +0300 Subject: usb: kconfig: create a menu for usb With recent additions to USB Kconfig the number of USB options had grown large enough to warrant a separate menu for USB. Add a Kconfig menu for USB. Cc: Marek Vasut Signed-off-by: Nikita Kiryanov --- drivers/usb/Kconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 04289f2e613..f13a088498d 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -1,3 +1,4 @@ +menu USB config USB_ARCH_HAS_HCD def_bool y @@ -87,3 +88,4 @@ endchoice endif endif +endmenu -- cgit v1.2.3 From d5af92315bb48740f16bf8817f38e227d3076905 Mon Sep 17 00:00:00 2001 From: Nikita Kiryanov Date: Thu, 23 Jul 2015 17:19:38 +0300 Subject: sf: kconfig: add kconfig options for spi flashes Add kconfig options for various SPI flashes and use them in cm-fx6 defconfig. Cc: Jagan Teki Cc: Stefano Babic Cc: Igor Grinberg Signed-off-by: Nikita Kiryanov Acked-by: Igor Grinberg --- configs/cm_fx6_defconfig | 8 ++++++++ drivers/mtd/spi/Kconfig | 44 ++++++++++++++++++++++++++++++++++++++++++++ include/configs/cm_fx6.h | 8 -------- 3 files changed, 52 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig index f0fd48cdc18..2aba3594ea7 100644 --- a/configs/cm_fx6_defconfig +++ b/configs/cm_fx6_defconfig @@ -13,6 +13,14 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL,SPL" CONFIG_CMD_DHCP=y CONFIG_CMD_PING=y CONFIG_SPI_FLASH=y +CONFIG_SPI_FLASH_ATMEL=y +CONFIG_SPI_FLASH_EON=y +CONFIG_SPI_FLASH_GIGADEVICE=y +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_SST=y +CONFIG_SPI_FLASH_WINBOND=y CONFIG_CMD_SF=y CONFIG_CMD_I2C=y CONFIG_USB=y diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig index 4f0c0402143..8b730ff3c55 100644 --- a/drivers/mtd/spi/Kconfig +++ b/drivers/mtd/spi/Kconfig @@ -42,6 +42,50 @@ config SPI_FLASH_BAR Bank/Extended address registers are used to access the flash which has size > 16MiB in 3-byte addressing. +if SPI_FLASH + +config SPI_FLASH_ATMEL + bool "Atmel SPI flash support" + help + Add support for various Atmel SPI flash chips (AT45xxx and AT25xxx) + +config SPI_FLASH_EON + bool "EON SPI flash support" + help + Add support for various EON SPI flash chips (EN25xxx) + +config SPI_FLASH_GIGADEVICE + bool "GigaDevice SPI flash support" + help + Add support for various GigaDevice SPI flash chips (GD25xxx) + +config SPI_FLASH_MACRONIX + bool "Macronix SPI flash support" + help + Add support for various Macronix SPI flash chips (MX25Lxxx) + +config SPI_FLASH_SPANSION + bool "Spansion SPI flash support" + help + Add support for various Spansion SPI flash chips (S25FLxxx) + +config SPI_FLASH_STMICRO + bool "STMicro SPI flash support" + help + Add support for various STMicro SPI flash chips (M25Pxxx and N25Qxxx) + +config SPI_FLASH_SST + bool "SST SPI flash support" + help + Add support for various SST SPI flash chips (SST25xxx) + +config SPI_FLASH_WINBOND + bool "Winbond SPI flash support" + help + Add support for various Winbond SPI flash chips (W25xxx) + +endif + config SPI_FLASH_DATAFLASH bool "AT45xxx DataFlash support" depends on SPI_FLASH && DM_SPI_FLASH diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 059004c7ea0..bbd9f387495 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -162,14 +162,6 @@ /* SPI */ #define CONFIG_SPI #define CONFIG_MXC_SPI -#define CONFIG_SPI_FLASH_ATMEL -#define CONFIG_SPI_FLASH_EON -#define CONFIG_SPI_FLASH_GIGADEVICE -#define CONFIG_SPI_FLASH_MACRONIX -#define CONFIG_SPI_FLASH_SPANSION -#define CONFIG_SPI_FLASH_STMICRO -#define CONFIG_SPI_FLASH_SST -#define CONFIG_SPI_FLASH_WINBOND /* NAND */ #ifndef CONFIG_SPL_BUILD -- cgit v1.2.3 From f2753b06813f1debdb9d13c895d4f15acb8f2769 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Mon, 20 Jul 2015 19:28:31 +0800 Subject: mxc: gpio add i.MX6UL support i.MX6UL does not have GPIO6/7, so do not include them for i.MX6UL. Signed-off-by: Peng Fan --- drivers/gpio/mxc_gpio.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c index 2012f994c8c..57a650f7507 100644 --- a/drivers/gpio/mxc_gpio.c +++ b/drivers/gpio/mxc_gpio.c @@ -45,11 +45,15 @@ static unsigned long gpio_ports[] = { #endif #if defined(CONFIG_MX27) || defined(CONFIG_MX53) || defined(CONFIG_MX6) [4] = GPIO5_BASE_ADDR, +#ifndef CONFIG_MX6UL [5] = GPIO6_BASE_ADDR, #endif +#endif #if defined(CONFIG_MX53) || defined(CONFIG_MX6) +#ifndef CONFIG_MX6UL [6] = GPIO7_BASE_ADDR, #endif +#endif }; static int mxc_gpio_direction(unsigned int gpio, -- cgit v1.2.3