Re: [U-Boot] [PATCH 2/2] lx2160: Enable support of EMC2305

2019-02-19 Thread Prabhakar Kushwaha

> -Original Message-
> From: U-Boot  On Behalf Of Meenakshi
> Aggarwal
> Sent: Friday, November 30, 2018 10:32 PM
> To: u-boot@lists.denx.de; York Sun 
> Subject: [U-Boot] [PATCH 2/2] lx2160: Enable support of EMC2305
> 
> Enable support for FAN controller EMC2305 for LX2160A RDB board.
> 
> Signed-off-by: Sriram Dash 
> Signed-off-by: Meenakshi Aggarwal 
> ---


This patch been applied to fsl-qoriq master, awaiting upstream.

--pk

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 2/2] lx2160: Enable support of EMC2305

2018-11-30 Thread Meenakshi Aggarwal
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_CMD0x40
+#define I2C_EMC2305_PWM0x80
+
 /* EEPROM */
 #define CONFIG_ID_EEPROM
 #define CONFIG_SYS_I2C_EEPROM_NXID
-- 
1.9.1

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot