All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/6] trats: convert to driver model
       [not found] <CGME20170330123003epcas5p2558c23e6cf90bd0189d167e0e14665c9@epcas5p2.samsung.com>
@ 2017-03-30 12:29 ` Jaehoon Chung
       [not found]   ` <CGME20170330123003epcas5p282355c963b1c04b5deaba96f83def8f3@epcas5p2.samsung.com>
                     ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Jaehoon Chung @ 2017-03-30 12:29 UTC (permalink / raw)
  To: u-boot

This patchset is for converting to driver model.
This task is working in progress.
Some codes should be remained to legacy mode, it will be converted in future.

Jaehoon Chung (6):
  configs: trats: enable the CONFIG_DM_PMIC and PMIC_MAX8997
  board: samsung: trats: remove the unnecessary codes
  board: samsung: trats: convert to driver model for controlling phy
  arm: dts: trats: add i2c_fg node for fuelgauge
  board: samsung: trats: remove the i2c_init function
  configs: trats: enable the CONFIG_DM_I2C_GPIO

 arch/arm/dts/exynos4210-trats.dts |   9 ++
 board/samsung/trats/trats.c       | 249 ++++++++------------------------------
 configs/trats_defconfig           |   4 +
 3 files changed, 62 insertions(+), 200 deletions(-)

-- 
2.10.2

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/6] configs: trats: enable the CONFIG_DM_PMIC and PMIC_MAX8997
       [not found]   ` <CGME20170330123003epcas5p282355c963b1c04b5deaba96f83def8f3@epcas5p2.samsung.com>
@ 2017-03-30 12:29     ` Jaehoon Chung
  0 siblings, 0 replies; 12+ messages in thread
From: Jaehoon Chung @ 2017-03-30 12:29 UTC (permalink / raw)
  To: u-boot

Enable the CONFIG_DM_PMIC and PMIC_MAX8997.
Also use the CONFIG_SYS_I2C_S3C24X0 for using I2C.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 configs/trats_defconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configs/trats_defconfig b/configs/trats_defconfig
index 7fe6c3d..2be05ff 100644
--- a/configs/trats_defconfig
+++ b/configs/trats_defconfig
@@ -38,6 +38,9 @@ CONFIG_MMC_DW=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_S5P=y
+CONFIG_DM_PMIC=y
+CONFIG_PMIC_MAX8997=y
+CONFIG_SYS_I2C_S3C24X0=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
 CONFIG_USB_GADGET=y
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 2/6] board: samsung: trats: remove the unnecessary codes
       [not found]   ` <CGME20170330123003epcas5p49830cf6a7d8d50aa1f3d44992a23220d@epcas5p4.samsung.com>
@ 2017-03-30 12:29     ` Jaehoon Chung
  0 siblings, 0 replies; 12+ messages in thread
From: Jaehoon Chung @ 2017-03-30 12:29 UTC (permalink / raw)
  To: u-boot

These codes are unnecessary, because max8997 should be initialized with
dt-file.
Remove max8997_init() function.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 board/samsung/trats/trats.c | 161 +-------------------------------------------
 1 file changed, 1 insertion(+), 160 deletions(-)

diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index 7200c2e..fa297c3 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -56,13 +56,6 @@ void i2c_init_board(void)
 #ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */
 	int err;
 
-	/* I2C_5 -> PMIC */
-	err = exynos_pinmux_config(PERIPH_ID_I2C5, PINMUX_FLAG_NONE);
-	if (err) {
-		debug("I2C%d not configured\n", (I2C_5));
-		return;
-	}
-
 	/* I2C_8 -> FG */
 	gpio_request(EXYNOS4_GPIO_Y40, "i2c_clk");
 	gpio_request(EXYNOS4_GPIO_Y41, "i2c_data");
@@ -129,156 +122,6 @@ static void trats_low_power_mode(void)
 	writel(0x0, &clk->gate_ip_image);	/* IMAGE */
 	writel(0x0, &clk->gate_ip_gps);	/* GPS */
 }
-
-static int pmic_init_max8997(void)
-{
-	struct pmic *p = pmic_get("MAX8997_PMIC");
-	int i = 0, ret = 0;
-	u32 val;
-
-	if (pmic_probe(p))
-		return -1;
-
-	/* BUCK1 VARM: 1.2V */
-	val = (1200000 - 650000) / 25000;
-	ret |= pmic_reg_write(p, MAX8997_REG_BUCK1DVS1, val);
-	val = ENBUCK | ACTIVE_DISCHARGE;		/* DVS OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_BUCK1CTRL, val);
-
-	/* BUCK2 VINT: 1.1V */
-	val = (1100000 - 650000) / 25000;
-	ret |= pmic_reg_write(p, MAX8997_REG_BUCK2DVS1, val);
-	val = ENBUCK | ACTIVE_DISCHARGE;		/* DVS OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_BUCK2CTRL, val);
-
-
-	/* BUCK3 G3D: 1.1V - OFF */
-	ret |= pmic_reg_read(p, MAX8997_REG_BUCK3CTRL, &val);
-	val &= ~ENBUCK;
-	ret |= pmic_reg_write(p, MAX8997_REG_BUCK3CTRL, val);
-
-	val = (1100000 - 750000) / 50000;
-	ret |= pmic_reg_write(p, MAX8997_REG_BUCK3DVS, val);
-
-	/* BUCK4 CAMISP: 1.2V - OFF */
-	ret |= pmic_reg_read(p, MAX8997_REG_BUCK4CTRL, &val);
-	val &= ~ENBUCK;
-	ret |= pmic_reg_write(p, MAX8997_REG_BUCK4CTRL, val);
-
-	val = (1200000 - 650000) / 25000;
-	ret |= pmic_reg_write(p, MAX8997_REG_BUCK4DVS, val);
-
-	/* BUCK5 VMEM: 1.2V */
-	val = (1200000 - 650000) / 25000;
-	for (i = 0; i < 8; i++)
-		ret |= pmic_reg_write(p, MAX8997_REG_BUCK5DVS1 + i, val);
-
-	val = ENBUCK | ACTIVE_DISCHARGE;		/* DVS OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_BUCK5CTRL, val);
-
-	/* BUCK6 CAM AF: 2.8V */
-	/* No Voltage Setting Register */
-	/* GNSLCT 3.0X */
-	val = GNSLCT;
-	ret |= pmic_reg_write(p, MAX8997_REG_BUCK6CTRL, val);
-
-	/* BUCK7 VCC_SUB: 2.0V */
-	val = (2000000 - 750000) / 50000;
-	ret |= pmic_reg_write(p, MAX8997_REG_BUCK7DVS, val);
-
-	/* LDO1 VADC: 3.3V */
-	val = max8997_reg_ldo(3300000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO1CTRL, val);
-
-	/* LDO1 Disable active discharging */
-	ret |= pmic_reg_read(p, MAX8997_REG_LDO1CONFIG, &val);
-	val &= ~LDO_ADE;
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO1CONFIG, val);
-
-	/* LDO2 VALIVE: 1.1V */
-	val = max8997_reg_ldo(1100000) | EN_LDO;
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO2CTRL, val);
-
-	/* LDO3 VUSB/MIPI: 1.1V */
-	val = max8997_reg_ldo(1100000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO3CTRL, val);
-
-	/* LDO4 VMIPI: 1.8V */
-	val = max8997_reg_ldo(1800000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO4CTRL, val);
-
-	/* LDO5 VHSIC: 1.2V */
-	val = max8997_reg_ldo(1200000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO5CTRL, val);
-
-	/* LDO6 VCC_1.8V_PDA: 1.8V */
-	val = max8997_reg_ldo(1800000) | EN_LDO;
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO6CTRL, val);
-
-	/* LDO7 CAM_ISP: 1.8V */
-	val = max8997_reg_ldo(1800000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO7CTRL, val);
-
-	/* LDO8 VDAC/VUSB: 3.3V */
-	val = max8997_reg_ldo(3300000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO8CTRL, val);
-
-	/* LDO9 VCC_2.8V_PDA: 2.8V */
-	val = max8997_reg_ldo(2800000) | EN_LDO;
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO9CTRL, val);
-
-	/* LDO10 VPLL: 1.1V */
-	val = max8997_reg_ldo(1100000) | EN_LDO;
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO10CTRL, val);
-
-	/* LDO11 TOUCH: 2.8V */
-	val = max8997_reg_ldo(2800000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO11CTRL, val);
-
-	/* LDO12 VTCAM: 1.8V */
-	val = max8997_reg_ldo(1800000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO12CTRL, val);
-
-	/* LDO13 VCC_3.0_LCD: 3.0V */
-	val = max8997_reg_ldo(3000000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO13CTRL, val);
-
-	/* LDO14 MOTOR: 3.0V */
-	val = max8997_reg_ldo(3000000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO14CTRL, val);
-
-	/* LDO15 LED_A: 2.8V */
-	val = max8997_reg_ldo(2800000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO15CTRL, val);
-
-	/* LDO16 CAM_SENSOR: 1.8V */
-	val = max8997_reg_ldo(1800000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO16CTRL, val);
-
-	/* LDO17 VTF: 2.8V */
-	val = max8997_reg_ldo(2800000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO17CTRL, val);
-
-	/* LDO18 TOUCH_LED 3.3V */
-	val = max8997_reg_ldo(3300000) | DIS_LDO;	/* OFF */
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO18CTRL, val);
-
-	/* LDO21 VDDQ: 1.2V */
-	val = max8997_reg_ldo(1200000) | EN_LDO;
-	ret |= pmic_reg_write(p, MAX8997_REG_LDO21CTRL, val);
-
-	/* SAFEOUT for both 1 and 2: 4.9V, Active discharge, Enable */
-	val = (SAFEOUT_4_90V << 0) | (SAFEOUT_4_90V << 2) |
-		ACTDISSAFEO1 | ACTDISSAFEO2 | ENSAFEOUT1 | ENSAFEOUT2;
-	ret |= pmic_reg_write(p, MAX8997_REG_SAFEOUTCTRL, val);
-
-	if (ret) {
-		puts("MAX8997 PMIC setting error!\n");
-		return -1;
-	}
-
-	return 0;
-}
 #endif
 
 int exynos_power_init(void)
@@ -295,9 +138,7 @@ int exynos_power_init(void)
 	 * The FUEL_GAUGE is marked as I2C9 on the schematic, but connected
 	 * to logical I2C adapter 1
 	 */
-	ret = pmic_init(I2C_5);
-	ret |= pmic_init_max8997();
-	ret |= power_fg_init(I2C_9);
+	ret = power_fg_init(I2C_9);
 	ret |= power_muic_init(I2C_5);
 	ret |= power_bat_init(0);
 	if (ret)
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 3/6] board: samsung: trats: convert to driver model for controlling phy
       [not found]   ` <CGME20170330123003epcas5p2f301ccfd243c454b97f21694f2fd82a3@epcas5p2.samsung.com>
@ 2017-03-30 12:29     ` Jaehoon Chung
  2017-04-01  4:23       ` Simon Glass
  0 siblings, 1 reply; 12+ messages in thread
From: Jaehoon Chung @ 2017-03-30 12:29 UTC (permalink / raw)
  To: u-boot

Convert to driver model for controlling phy.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 board/samsung/trats/trats.c | 75 +++++++++++++++++++++++++++++----------------
 1 file changed, 48 insertions(+), 27 deletions(-)

diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index fa297c3..be5e2e2 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -23,6 +23,7 @@
 #include <power/max8997_muic.h>
 #include <power/battery.h>
 #include <power/max17042_fg.h>
+#include <power/pmic.h>
 #include <libtizen.h>
 #include <usb.h>
 #include <usb_mass_storage.h>
@@ -232,39 +233,59 @@ static void check_hw_revision(void)
 #ifdef CONFIG_USB_GADGET
 static int s5pc210_phy_control(int on)
 {
-#ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */
-	int ret = 0;
-	u32 val = 0;
-	struct pmic *p = pmic_get("MAX8997_PMIC");
-	if (!p)
-		return -ENODEV;
+	struct udevice *dev;
+	int reg, ret;
 
-	if (pmic_probe(p))
-		return -1;
+	ret = pmic_get("max8997-pmic", &dev);
+	if (ret)
+		return ret;
 
 	if (on) {
-		ret |= pmic_set_output(p, MAX8997_REG_SAFEOUTCTRL,
-				      ENSAFEOUT1, LDO_ON);
-		ret |= pmic_reg_read(p, MAX8997_REG_LDO3CTRL, &val);
-		ret |= pmic_reg_write(p, MAX8997_REG_LDO3CTRL, EN_LDO | val);
-
-		ret |= pmic_reg_read(p, MAX8997_REG_LDO8CTRL, &val);
-		ret |= pmic_reg_write(p, MAX8997_REG_LDO8CTRL, EN_LDO | val);
+		reg = pmic_reg_read(dev, MAX8997_REG_SAFEOUTCTRL);
+		reg |= ENSAFEOUT1;
+		ret = pmic_reg_write(dev, MAX8997_REG_SAFEOUTCTRL, reg);
+		if (ret) {
+			puts("MAX8997 setting error!\n");
+			return ret;
+		}
+		reg = pmic_reg_read(dev, MAX8997_REG_LDO3CTRL);
+		reg |= EN_LDO;
+		ret = pmic_reg_write(dev, MAX8997_REG_LDO3CTRL, reg);
+		if (ret) {
+			puts("MAX8997 setting error!\n");
+			return ret;
+		}
+		reg = pmic_reg_read(dev, MAX8997_REG_LDO8CTRL);
+		reg |= EN_LDO;
+		ret = pmic_reg_write(dev, MAX8997_REG_LDO8CTRL, reg);
+		if (ret) {
+			puts("MAX8997 setting error!\n");
+			return ret;
+		}
 	} else {
-		ret |= pmic_reg_read(p, MAX8997_REG_LDO8CTRL, &val);
-		ret |= pmic_reg_write(p, MAX8997_REG_LDO8CTRL, DIS_LDO | val);
-
-		ret |= pmic_reg_read(p, MAX8997_REG_LDO3CTRL, &val);
-		ret |= pmic_reg_write(p, MAX8997_REG_LDO3CTRL, DIS_LDO | val);
-		ret |= pmic_set_output(p, MAX8997_REG_SAFEOUTCTRL,
-				      ENSAFEOUT1, LDO_OFF);
-	}
+		reg = pmic_reg_read(dev, MAX8997_REG_LDO8CTRL);
+		reg &= DIS_LDO;
+		ret = pmic_reg_write(dev, MAX8997_REG_LDO8CTRL, reg);
+		if (ret) {
+			puts("MAX8997 setting error!\n");
+			return ret;
+		}
+		reg = pmic_reg_read(dev, MAX8997_REG_LDO3CTRL);
+		reg &= DIS_LDO;
+		ret = pmic_reg_write(dev, MAX8997_REG_LDO3CTRL, reg);
+		if (ret) {
+			puts("MAX8997 setting error!\n");
+			return ret;
+		}
+		reg = pmic_reg_read(dev, MAX8997_REG_SAFEOUTCTRL);
+		reg &= ~ENSAFEOUT1;
+		ret = pmic_reg_write(dev, MAX8997_REG_SAFEOUTCTRL, reg);
+		if (ret) {
+			puts("MAX8997 setting error!\n");
+			return ret;
+		}
 
-	if (ret) {
-		puts("MAX8997 LDO setting error!\n");
-		return -1;
 	}
-#endif
 
 	return 0;
 }
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 4/6] arm: dts: trats: add i2c_fg node for fuelgauge
       [not found]   ` <CGME20170330123003epcas5p29001037283e19fcdcdfaf99f96816bd7@epcas5p2.samsung.com>
@ 2017-03-30 12:30     ` Jaehoon Chung
  0 siblings, 0 replies; 12+ messages in thread
From: Jaehoon Chung @ 2017-03-30 12:30 UTC (permalink / raw)
  To: u-boot

Trats has the i2c gpio for fuel-gaugge.
This patch s for preparing to use the fuel-gauge.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 arch/arm/dts/exynos4210-trats.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/arm/dts/exynos4210-trats.dts b/arch/arm/dts/exynos4210-trats.dts
index 69c0605..ac422e4 100644
--- a/arch/arm/dts/exynos4210-trats.dts
+++ b/arch/arm/dts/exynos4210-trats.dts
@@ -23,6 +23,7 @@
 		console = "/serial at 13820000";
 		mmc0 = "/sdhci at 12510000";
 		mmc2 = "/sdhci at 12530000";
+		i2c8 = &i2c_fg;
 	};
 
 	fimd at 11c00000 {
@@ -113,6 +114,14 @@
 	dwmmc at 12550000 {
 		status = "disabled";
 	};
+
+	i2c_fg: fuel-gauge {
+		compatible = "i2c-gpio";
+		gpios = <&gpy4 1 0>,	/* sda */
+			<&gpy4 0 0>;	/* scl */
+		i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+		status = "okay";
+	};
 };
 
 &i2c_5 {
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 5/6] board: samsung: trats: remove the i2c_init function
       [not found]   ` <CGME20170330123003epcas5p4d59106adf0ca9ee6fd12a34f2581605c@epcas5p4.samsung.com>
@ 2017-03-30 12:30     ` Jaehoon Chung
  2017-04-01  4:23       ` Simon Glass
  0 siblings, 1 reply; 12+ messages in thread
From: Jaehoon Chung @ 2017-03-30 12:30 UTC (permalink / raw)
  To: u-boot

i2c should be initialized with device-tree.
This function doesn't need anymore.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 board/samsung/trats/trats.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index be5e2e2..00059a1 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -52,19 +52,6 @@ int exynos_init(void)
 	return 0;
 }
 
-void i2c_init_board(void)
-{
-#ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */
-	int err;
-
-	/* I2C_8 -> FG */
-	gpio_request(EXYNOS4_GPIO_Y40, "i2c_clk");
-	gpio_request(EXYNOS4_GPIO_Y41, "i2c_data");
-	gpio_direction_output(EXYNOS4_GPIO_Y40, 1);
-	gpio_direction_output(EXYNOS4_GPIO_Y41, 1);
-#endif
-}
-
 #ifndef CONFIG_DM_I2C /* TODO(maintainer): Convert to driver model */
 static void trats_low_power_mode(void)
 {
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 6/6] configs: trats: enable the CONFIG_DM_I2C_GPIO
       [not found]   ` <CGME20170330123003epcas5p2c6acfec92524c3600acf8c9dd8583f0c@epcas5p2.samsung.com>
@ 2017-03-30 12:30     ` Jaehoon Chung
  2017-04-01  4:23       ` Simon Glass
  0 siblings, 1 reply; 12+ messages in thread
From: Jaehoon Chung @ 2017-03-30 12:30 UTC (permalink / raw)
  To: u-boot

Enable the CONFIG_DM_I2C_GPIO for using i2c gpio

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 configs/trats_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configs/trats_defconfig b/configs/trats_defconfig
index 2be05ff..23024fd 100644
--- a/configs/trats_defconfig
+++ b/configs/trats_defconfig
@@ -34,6 +34,7 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_ISO_PARTITION=y
 CONFIG_OF_CONTROL=y
 CONFIG_DFU_MMC=y
+CONFIG_DM_I2C_GPIO=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 0/6] trats: convert to driver model
  2017-03-30 12:29 ` [U-Boot] [PATCH 0/6] trats: convert to driver model Jaehoon Chung
                     ` (5 preceding siblings ...)
       [not found]   ` <CGME20170330123003epcas5p2c6acfec92524c3600acf8c9dd8583f0c@epcas5p2.samsung.com>
@ 2017-03-30 13:09   ` Lukasz Majewski
  2017-04-03  7:25     ` Minkyu Kang
  6 siblings, 1 reply; 12+ messages in thread
From: Lukasz Majewski @ 2017-03-30 13:09 UTC (permalink / raw)
  To: u-boot

Hi Jaehoon,

> This patchset is for converting to driver model.
> This task is working in progress.
> Some codes should be remained to legacy mode, it will be converted in
> future.

Acked-by: Lukasz Majewski <lukma@denx.de>

> 
> Jaehoon Chung (6):
>   configs: trats: enable the CONFIG_DM_PMIC and PMIC_MAX8997
>   board: samsung: trats: remove the unnecessary codes
>   board: samsung: trats: convert to driver model for controlling phy
>   arm: dts: trats: add i2c_fg node for fuelgauge
>   board: samsung: trats: remove the i2c_init function
>   configs: trats: enable the CONFIG_DM_I2C_GPIO
> 
>  arch/arm/dts/exynos4210-trats.dts |   9 ++
>  board/samsung/trats/trats.c       | 249
> ++++++++------------------------------
> configs/trats_defconfig           |   4 + 3 files changed, 62
> insertions(+), 200 deletions(-)
> 


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 3/6] board: samsung: trats: convert to driver model for controlling phy
  2017-03-30 12:29     ` [U-Boot] [PATCH 3/6] board: samsung: trats: convert to driver model for controlling phy Jaehoon Chung
@ 2017-04-01  4:23       ` Simon Glass
  0 siblings, 0 replies; 12+ messages in thread
From: Simon Glass @ 2017-04-01  4:23 UTC (permalink / raw)
  To: u-boot

On 30 March 2017 at 06:29, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> Convert to driver model for controlling phy.
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  board/samsung/trats/trats.c | 75 +++++++++++++++++++++++++++++----------------
>  1 file changed, 48 insertions(+), 27 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

Also see pmic_clrsetbits().

Regards,
Simon

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 5/6] board: samsung: trats: remove the i2c_init function
  2017-03-30 12:30     ` [U-Boot] [PATCH 5/6] board: samsung: trats: remove the i2c_init function Jaehoon Chung
@ 2017-04-01  4:23       ` Simon Glass
  0 siblings, 0 replies; 12+ messages in thread
From: Simon Glass @ 2017-04-01  4:23 UTC (permalink / raw)
  To: u-boot

On 30 March 2017 at 06:30, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> i2c should be initialized with device-tree.
> This function doesn't need anymore.
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  board/samsung/trats/trats.c | 13 -------------
>  1 file changed, 13 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 6/6] configs: trats: enable the CONFIG_DM_I2C_GPIO
  2017-03-30 12:30     ` [U-Boot] [PATCH 6/6] configs: trats: enable the CONFIG_DM_I2C_GPIO Jaehoon Chung
@ 2017-04-01  4:23       ` Simon Glass
  0 siblings, 0 replies; 12+ messages in thread
From: Simon Glass @ 2017-04-01  4:23 UTC (permalink / raw)
  To: u-boot

On 30 March 2017 at 06:30, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> Enable the CONFIG_DM_I2C_GPIO for using i2c gpio
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  configs/trats_defconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/configs/trats_defconfig b/configs/trats_defconfig
> index 2be05ff..23024fd 100644
> --- a/configs/trats_defconfig
> +++ b/configs/trats_defconfig
> @@ -34,6 +34,7 @@ CONFIG_CMD_FS_GENERIC=y
>  CONFIG_ISO_PARTITION=y
>  CONFIG_OF_CONTROL=y
>  CONFIG_DFU_MMC=y
> +CONFIG_DM_I2C_GPIO=y
>  CONFIG_MMC_DW=y
>  CONFIG_MMC_SDHCI=y
>  CONFIG_MMC_SDHCI_SDMA=y
> --
> 2.10.2
>

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 0/6] trats: convert to driver model
  2017-03-30 13:09   ` [U-Boot] [PATCH 0/6] trats: convert to driver model Lukasz Majewski
@ 2017-04-03  7:25     ` Minkyu Kang
  0 siblings, 0 replies; 12+ messages in thread
From: Minkyu Kang @ 2017-04-03  7:25 UTC (permalink / raw)
  To: u-boot

Hi

2017년 3월 30일 (목) 22:09, Lukasz Majewski <lukma@denx.de>님이 작성:

> Hi Jaehoon,
>
> > This patchset is for converting to driver model.
> > This task is working in progress.
> > Some codes should be remained to legacy mode, it will be converted in
> > future.
>
> Acked-by: Lukasz Majewski <lukma@denx.de>
>
> >
> > Jaehoon Chung (6):
> >   configs: trats: enable the CONFIG_DM_PMIC and PMIC_MAX8997
> >   board: samsung: trats: remove the unnecessary codes
> >   board: samsung: trats: convert to driver model for controlling phy
> >   arm: dts: trats: add i2c_fg node for fuelgauge
> >   board: samsung: trats: remove the i2c_init function
> >   configs: trats: enable the CONFIG_DM_I2C_GPIO
> >
> >  arch/arm/dts/exynos4210-trats.dts |   9 ++
> >  board/samsung/trats/trats.c       | 249
> > ++++++++------------------------------
> > configs/trats_defconfig           |   4 + 3 files changed, 62
> > insertions(+), 200 deletions(-)
> >
>
>
> Best regards,
>
> Lukasz Majewski
>
> --
>
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot



applied to u-boot-samsung.

Thanks
-- 
Thanks. Minkyu Kang.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-04-03  7:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170330123003epcas5p2558c23e6cf90bd0189d167e0e14665c9@epcas5p2.samsung.com>
2017-03-30 12:29 ` [U-Boot] [PATCH 0/6] trats: convert to driver model Jaehoon Chung
     [not found]   ` <CGME20170330123003epcas5p282355c963b1c04b5deaba96f83def8f3@epcas5p2.samsung.com>
2017-03-30 12:29     ` [U-Boot] [PATCH 1/6] configs: trats: enable the CONFIG_DM_PMIC and PMIC_MAX8997 Jaehoon Chung
     [not found]   ` <CGME20170330123003epcas5p49830cf6a7d8d50aa1f3d44992a23220d@epcas5p4.samsung.com>
2017-03-30 12:29     ` [U-Boot] [PATCH 2/6] board: samsung: trats: remove the unnecessary codes Jaehoon Chung
     [not found]   ` <CGME20170330123003epcas5p2f301ccfd243c454b97f21694f2fd82a3@epcas5p2.samsung.com>
2017-03-30 12:29     ` [U-Boot] [PATCH 3/6] board: samsung: trats: convert to driver model for controlling phy Jaehoon Chung
2017-04-01  4:23       ` Simon Glass
     [not found]   ` <CGME20170330123003epcas5p29001037283e19fcdcdfaf99f96816bd7@epcas5p2.samsung.com>
2017-03-30 12:30     ` [U-Boot] [PATCH 4/6] arm: dts: trats: add i2c_fg node for fuelgauge Jaehoon Chung
     [not found]   ` <CGME20170330123003epcas5p4d59106adf0ca9ee6fd12a34f2581605c@epcas5p4.samsung.com>
2017-03-30 12:30     ` [U-Boot] [PATCH 5/6] board: samsung: trats: remove the i2c_init function Jaehoon Chung
2017-04-01  4:23       ` Simon Glass
     [not found]   ` <CGME20170330123003epcas5p2c6acfec92524c3600acf8c9dd8583f0c@epcas5p2.samsung.com>
2017-03-30 12:30     ` [U-Boot] [PATCH 6/6] configs: trats: enable the CONFIG_DM_I2C_GPIO Jaehoon Chung
2017-04-01  4:23       ` Simon Glass
2017-03-30 13:09   ` [U-Boot] [PATCH 0/6] trats: convert to driver model Lukasz Majewski
2017-04-03  7:25     ` Minkyu Kang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.