From patchwork Fri Nov 30 17:02:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Meenakshi Aggarwal X-Patchwork-Id: 1005890 X-Patchwork-Delegate: prabhakar@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nxp.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 435sKY2xRGz9s3Z for ; Fri, 30 Nov 2018 22:16:49 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id E72B1C22456; Fri, 30 Nov 2018 11:16:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: ** X-Spam-Status: No, score=2.4 required=5.0 tests=DATE_IN_FUTURE_03_06 autolearn=no autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A72BEC223FA; Fri, 30 Nov 2018 11:16:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 37D1EC21EC8; Fri, 30 Nov 2018 11:16:06 +0000 (UTC) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by lists.denx.de (Postfix) with ESMTPS id B33E1C21EC8 for ; Fri, 30 Nov 2018 11:16:05 +0000 (UTC) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 5BA571A04D9; Fri, 30 Nov 2018 12:16:05 +0100 (CET) Received: from inv0113.in-blr01.nxp.com (inv0113.in-blr01.nxp.com [165.114.116.118]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2C1001A04C9; Fri, 30 Nov 2018 12:16:05 +0100 (CET) Received: from uefi-OptiPlex-790.ap.freescale.net (uefi-OptiPlex-790.ap.freescale.net [10.232.132.78]) by inv0113.in-blr01.nxp.com (Postfix) with ESMTP id 5706635F; Fri, 30 Nov 2018 16:46:04 +0530 (IST) From: Meenakshi Aggarwal To: u-boot@lists.denx.de, york.sun@nxp.com Date: Fri, 30 Nov 2018 22:32:12 +0530 Message-Id: <1543597332-27719-2-git-send-email-meenakshi.aggarwal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1543597332-27719-1-git-send-email-meenakshi.aggarwal@nxp.com> References: <1543597332-27719-1-git-send-email-meenakshi.aggarwal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [U-Boot] [PATCH 2/2] lx2160: Enable support of EMC2305 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Enable support for FAN controller EMC2305 for LX2160A RDB board. Signed-off-by: Sriram Dash Signed-off-by: Meenakshi Aggarwal --- board/freescale/lx2160a/lx2160a.c | 11 +++++++++++ include/configs/lx2160ardb.h | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/board/freescale/lx2160a/lx2160a.c b/board/freescale/lx2160a/lx2160a.c index 530f658..07ca58e 100644 --- a/board/freescale/lx2160a/lx2160a.c +++ b/board/freescale/lx2160a/lx2160a.c @@ -26,6 +26,10 @@ #include "../common/vid.h" #include +#ifdef CONFIG_EMC2305 +#include "../common/emc2305.h" +#endif + #ifdef CONFIG_TARGET_LX2160AQDS #define CFG_MUX_I2C_SDHC(reg, value) ((reg & 0x3f) | value) #define SET_CFG_MUX1_SDHC1_SDHC(reg) (reg & 0x3f) @@ -93,6 +97,13 @@ int board_early_init_f(void) /* get required clock for UART IP */ uart_get_clock(); +#ifdef CONFIG_EMC2305 + select_i2c_ch_pca9547(I2C_MUX_CH_EMC2305); + emc2305_init(); + set_fan_speed(I2C_EMC2305_PWM); + select_i2c_ch_pca9547(I2C_MUX_CH_DEFAULT); +#endif + fsl_lsch3_early_init_f(); return 0; } diff --git a/include/configs/lx2160ardb.h b/include/configs/lx2160ardb.h index 67d214d..818aa38 100644 --- a/include/configs/lx2160ardb.h +++ b/include/configs/lx2160ardb.h @@ -70,6 +70,12 @@ #endif +/* EMC2305 */ +#define I2C_MUX_CH_EMC2305 0x09 +#define I2C_EMC2305_ADDR 0x4D +#define I2C_EMC2305_CMD 0x40 +#define I2C_EMC2305_PWM 0x80 + /* EEPROM */ #define CONFIG_ID_EEPROM #define CONFIG_SYS_I2C_EEPROM_NXID