All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399
@ 2017-07-19 11:54 Kever Yang
  2017-07-19 11:54 ` [U-Boot] [PATCH 2/4] power: pwm_regulator: fix the pwm_set_config parameter order Kever Yang
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: Kever Yang @ 2017-07-19 11:54 UTC (permalink / raw)
  To: u-boot

Add regulator-init-microvolt for driver to init the regulator,
and the min output value is not 800000mV for the PWM2 io domain has
changed to VCC3V0 instead of VCC1V8 in rockchip evb, we need to
correct it with the value measured when PWM2 output HIGH.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 arch/arm/dts/rk3399-firefly.dts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/rk3399-firefly.dts b/arch/arm/dts/rk3399-firefly.dts
index a3e9ddf..3d3f507 100644
--- a/arch/arm/dts/rk3399-firefly.dts
+++ b/arch/arm/dts/rk3399-firefly.dts
@@ -157,8 +157,9 @@
 		regulator-name = "vdd_log";
 		regulator-always-on;
 		regulator-boot-on;
-		regulator-min-microvolt = <800000>;
+		regulator-min-microvolt = <430000>;
 		regulator-max-microvolt = <1400000>;
+		regulator-init-microvolt = <950000>;
 	};
 
 	vccadc_ref: vccadc-ref {
-- 
1.9.1

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

* [U-Boot] [PATCH 2/4] power: pwm_regulator: fix the pwm_set_config parameter order
  2017-07-19 11:54 [U-Boot] [PATCH 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399 Kever Yang
@ 2017-07-19 11:54 ` Kever Yang
  2017-07-19 12:42   ` [U-Boot] [U-Boot, " Philipp Tomsich
                     ` (3 more replies)
  2017-07-19 11:54 ` [U-Boot] [PATCH 3/4] power: pwm_regulator: remove redundance code Kever Yang
                   ` (5 subsequent siblings)
  6 siblings, 4 replies; 20+ messages in thread
From: Kever Yang @ 2017-07-19 11:54 UTC (permalink / raw)
  To: u-boot

The rkpwm reg order has fixed by below patch:
e3ef41d rockchip: pwm: fix the register layout for the PWM controller

We need to correct the parameter order for pwm_set_config() to make
the pwm regulator works correctly.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 drivers/power/regulator/pwm_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c
index 00a7cca..fcf5e00 100644
--- a/drivers/power/regulator/pwm_regulator.c
+++ b/drivers/power/regulator/pwm_regulator.c
@@ -80,7 +80,7 @@ static int pwm_regulator_set_voltage(struct udevice *dev, int uvolt)
 	}
 
 	ret = pwm_set_config(priv->pwm, priv->pwm_id,
-			(priv->period_ns / 100) * duty_cycle, priv->period_ns);
+			priv->period_ns, (priv->period_ns / 100) * duty_cycle);
 	if (ret) {
 		dev_err(dev, "Failed to configure PWM\n");
 		return ret;
-- 
1.9.1

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

* [U-Boot] [PATCH 3/4] power: pwm_regulator: remove redundance code
  2017-07-19 11:54 [U-Boot] [PATCH 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399 Kever Yang
  2017-07-19 11:54 ` [U-Boot] [PATCH 2/4] power: pwm_regulator: fix the pwm_set_config parameter order Kever Yang
@ 2017-07-19 11:54 ` Kever Yang
  2017-07-19 12:42   ` [U-Boot] [U-Boot, " Philipp Tomsich
                     ` (3 more replies)
  2017-07-19 11:54 ` [U-Boot] [PATCH 4/4] rockchip: pwm: add mask for config setting Kever Yang
                   ` (4 subsequent siblings)
  6 siblings, 4 replies; 20+ messages in thread
From: Kever Yang @ 2017-07-19 11:54 UTC (permalink / raw)
  To: u-boot

The regulator_enable() should be called from upper layer like
regulators_enable_boot_on(), remove it from pwm regulator driver.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 drivers/power/regulator/pwm_regulator.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/power/regulator/pwm_regulator.c b/drivers/power/regulator/pwm_regulator.c
index fcf5e00..b63f941 100644
--- a/drivers/power/regulator/pwm_regulator.c
+++ b/drivers/power/regulator/pwm_regulator.c
@@ -86,12 +86,8 @@ static int pwm_regulator_set_voltage(struct udevice *dev, int uvolt)
 		return ret;
 	}
 
-	ret = pwm_set_enable(priv->pwm, priv->pwm_id, true);
-	if (ret) {
-		dev_err(dev, "Failed to enable PWM\n");
-		return ret;
-	}
 	priv->volt_uV = uvolt;
+
 	return ret;
 }
 
@@ -144,8 +140,6 @@ static int pwm_regulator_probe(struct udevice *dev)
 	if (priv->init_voltage)
 		pwm_regulator_set_voltage(dev, priv->init_voltage);
 
-	pwm_regulator_enable(dev, 1);
-
 	return 0;
 }
 
-- 
1.9.1

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

* [U-Boot] [PATCH 4/4] rockchip: pwm: add mask for config setting
  2017-07-19 11:54 [U-Boot] [PATCH 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399 Kever Yang
  2017-07-19 11:54 ` [U-Boot] [PATCH 2/4] power: pwm_regulator: fix the pwm_set_config parameter order Kever Yang
  2017-07-19 11:54 ` [U-Boot] [PATCH 3/4] power: pwm_regulator: remove redundance code Kever Yang
@ 2017-07-19 11:54 ` Kever Yang
  2017-07-19 12:42   ` [U-Boot] [U-Boot, " Philipp Tomsich
                     ` (3 more replies)
  2017-07-19 12:42 ` [U-Boot] [U-Boot, 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399 Philipp Tomsich
                   ` (3 subsequent siblings)
  6 siblings, 4 replies; 20+ messages in thread
From: Kever Yang @ 2017-07-19 11:54 UTC (permalink / raw)
  To: u-boot

Use mask to clear old setting before direct set the new config,
or else there it will mess up the config when it's not the same
with default value.
Fixs: 3851059 rockchip: Setup default PWM flags

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 arch/arm/include/asm/arch-rockchip/pwm.h | 2 ++
 drivers/pwm/rk_pwm.c                     | 1 +
 2 files changed, 3 insertions(+)

diff --git a/arch/arm/include/asm/arch-rockchip/pwm.h b/arch/arm/include/asm/arch-rockchip/pwm.h
index 08ff945..b1d8047 100644
--- a/arch/arm/include/asm/arch-rockchip/pwm.h
+++ b/arch/arm/include/asm/arch-rockchip/pwm.h
@@ -25,9 +25,11 @@ check_member(rk3288_pwm, ctrl, 0xc);
 
 #define PWM_DUTY_POSTIVE                (1 << 3)
 #define PWM_DUTY_NEGATIVE               (0 << 3)
+#define PWM_DUTY_MASK			(1 << 3)
 
 #define PWM_INACTIVE_POSTIVE            (1 << 4)
 #define PWM_INACTIVE_NEGATIVE           (0 << 4)
+#define PWM_INACTIVE_MASK		(1 << 4)
 
 #define PWM_OUTPUT_LEFT                 (0 << 5)
 #define PWM_OUTPUT_CENTER               (1 << 5)
diff --git a/drivers/pwm/rk_pwm.c b/drivers/pwm/rk_pwm.c
index 28de62d..2364c2d 100644
--- a/drivers/pwm/rk_pwm.c
+++ b/drivers/pwm/rk_pwm.c
@@ -29,6 +29,7 @@ static int rk_pwm_set_invert(struct udevice *dev, uint channel, bool polarity)
 	struct rk_pwm_priv *priv = dev_get_priv(dev);
 
 	debug("%s: polarity=%u\n", __func__, polarity);
+	priv->enable_conf &= ~(PWM_DUTY_MASK | PWM_INACTIVE_MASK);
 	if (polarity)
 		priv->enable_conf |= PWM_DUTY_NEGATIVE | PWM_INACTIVE_POSTIVE;
 	else
-- 
1.9.1

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

* [U-Boot] [U-Boot, 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399
  2017-07-19 11:54 [U-Boot] [PATCH 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399 Kever Yang
                   ` (2 preceding siblings ...)
  2017-07-19 11:54 ` [U-Boot] [PATCH 4/4] rockchip: pwm: add mask for config setting Kever Yang
@ 2017-07-19 12:42 ` Philipp Tomsich
  2017-07-26 16:52 ` Philipp Tomsich
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: Philipp Tomsich @ 2017-07-19 12:42 UTC (permalink / raw)
  To: u-boot

> Add regulator-init-microvolt for driver to init the regulator,
> and the min output value is not 800000mV for the PWM2 io domain has
> changed to VCC3V0 instead of VCC1V8 in rockchip evb, we need to
> correct it with the value measured when PWM2 output HIGH.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
>  arch/arm/dts/rk3399-firefly.dts | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

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

* [U-Boot] [U-Boot, 2/4] power: pwm_regulator: fix the pwm_set_config parameter order
  2017-07-19 11:54 ` [U-Boot] [PATCH 2/4] power: pwm_regulator: fix the pwm_set_config parameter order Kever Yang
@ 2017-07-19 12:42   ` Philipp Tomsich
  2017-07-26 16:52   ` Philipp Tomsich
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 20+ messages in thread
From: Philipp Tomsich @ 2017-07-19 12:42 UTC (permalink / raw)
  To: u-boot

> The rkpwm reg order has fixed by below patch:
> e3ef41d rockchip: pwm: fix the register layout for the PWM controller
> 
> We need to correct the parameter order for pwm_set_config() to make
> the pwm regulator works correctly.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
>  drivers/power/regulator/pwm_regulator.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

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

* [U-Boot] [U-Boot, 4/4] rockchip: pwm: add mask for config setting
  2017-07-19 11:54 ` [U-Boot] [PATCH 4/4] rockchip: pwm: add mask for config setting Kever Yang
@ 2017-07-19 12:42   ` Philipp Tomsich
  2017-07-26 16:52   ` Philipp Tomsich
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 20+ messages in thread
From: Philipp Tomsich @ 2017-07-19 12:42 UTC (permalink / raw)
  To: u-boot

> Use mask to clear old setting before direct set the new config,
> or else there it will mess up the config when it's not the same
> with default value.
> Fixs: 3851059 rockchip: Setup default PWM flags
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
>  arch/arm/include/asm/arch-rockchip/pwm.h | 2 ++
>  drivers/pwm/rk_pwm.c                     | 1 +
>  2 files changed, 3 insertions(+)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

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

* [U-Boot] [U-Boot, 3/4] power: pwm_regulator: remove redundance code
  2017-07-19 11:54 ` [U-Boot] [PATCH 3/4] power: pwm_regulator: remove redundance code Kever Yang
@ 2017-07-19 12:42   ` Philipp Tomsich
  2017-07-26 16:52   ` Philipp Tomsich
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 20+ messages in thread
From: Philipp Tomsich @ 2017-07-19 12:42 UTC (permalink / raw)
  To: u-boot

> The regulator_enable() should be called from upper layer like
> regulators_enable_boot_on(), remove it from pwm regulator driver.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
>  drivers/power/regulator/pwm_regulator.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

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

* [U-Boot] [U-Boot, 2/4] power: pwm_regulator: fix the pwm_set_config parameter order
  2017-07-19 11:54 ` [U-Boot] [PATCH 2/4] power: pwm_regulator: fix the pwm_set_config parameter order Kever Yang
  2017-07-19 12:42   ` [U-Boot] [U-Boot, " Philipp Tomsich
@ 2017-07-26 16:52   ` Philipp Tomsich
  2017-07-27  8:32   ` Philipp Tomsich
  2017-07-27 15:13   ` [U-Boot] [PATCH " Simon Glass
  3 siblings, 0 replies; 20+ messages in thread
From: Philipp Tomsich @ 2017-07-26 16:52 UTC (permalink / raw)
  To: u-boot

> The rkpwm reg order has fixed by below patch:
> e3ef41d rockchip: pwm: fix the register layout for the PWM controller
> 
> We need to correct the parameter order for pwm_set_config() to make
> the pwm regulator works correctly.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  drivers/power/regulator/pwm_regulator.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

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

* [U-Boot] [U-Boot, 3/4] power: pwm_regulator: remove redundance code
  2017-07-19 11:54 ` [U-Boot] [PATCH 3/4] power: pwm_regulator: remove redundance code Kever Yang
  2017-07-19 12:42   ` [U-Boot] [U-Boot, " Philipp Tomsich
@ 2017-07-26 16:52   ` Philipp Tomsich
  2017-07-27  8:32   ` Philipp Tomsich
  2017-07-27 15:13   ` [U-Boot] [PATCH " Simon Glass
  3 siblings, 0 replies; 20+ messages in thread
From: Philipp Tomsich @ 2017-07-26 16:52 UTC (permalink / raw)
  To: u-boot

> The regulator_enable() should be called from upper layer like
> regulators_enable_boot_on(), remove it from pwm regulator driver.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  drivers/power/regulator/pwm_regulator.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

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

* [U-Boot] [U-Boot, 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399
  2017-07-19 11:54 [U-Boot] [PATCH 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399 Kever Yang
                   ` (3 preceding siblings ...)
  2017-07-19 12:42 ` [U-Boot] [U-Boot, 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399 Philipp Tomsich
@ 2017-07-26 16:52 ` Philipp Tomsich
  2017-07-27  8:32 ` Philipp Tomsich
  2017-07-27 15:13 ` [U-Boot] [PATCH " Simon Glass
  6 siblings, 0 replies; 20+ messages in thread
From: Philipp Tomsich @ 2017-07-26 16:52 UTC (permalink / raw)
  To: u-boot

> Add regulator-init-microvolt for driver to init the regulator,
> and the min output value is not 800000mV for the PWM2 io domain has
> changed to VCC3V0 instead of VCC1V8 in rockchip evb, we need to
> correct it with the value measured when PWM2 output HIGH.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  arch/arm/dts/rk3399-firefly.dts | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

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

* [U-Boot] [U-Boot, 4/4] rockchip: pwm: add mask for config setting
  2017-07-19 11:54 ` [U-Boot] [PATCH 4/4] rockchip: pwm: add mask for config setting Kever Yang
  2017-07-19 12:42   ` [U-Boot] [U-Boot, " Philipp Tomsich
@ 2017-07-26 16:52   ` Philipp Tomsich
  2017-07-27  8:32   ` Philipp Tomsich
  2017-07-27 15:14   ` [U-Boot] [PATCH " Simon Glass
  3 siblings, 0 replies; 20+ messages in thread
From: Philipp Tomsich @ 2017-07-26 16:52 UTC (permalink / raw)
  To: u-boot

> Use mask to clear old setting before direct set the new config,
> or else there it will mess up the config when it's not the same
> with default value.
> Fixs: 3851059 rockchip: Setup default PWM flags
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  arch/arm/include/asm/arch-rockchip/pwm.h | 2 ++
>  drivers/pwm/rk_pwm.c                     | 1 +
>  2 files changed, 3 insertions(+)
> 

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

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

* [U-Boot] [U-Boot, 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399
  2017-07-19 11:54 [U-Boot] [PATCH 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399 Kever Yang
                   ` (4 preceding siblings ...)
  2017-07-26 16:52 ` Philipp Tomsich
@ 2017-07-27  8:32 ` Philipp Tomsich
  2017-07-27 15:13 ` [U-Boot] [PATCH " Simon Glass
  6 siblings, 0 replies; 20+ messages in thread
From: Philipp Tomsich @ 2017-07-27  8:32 UTC (permalink / raw)
  To: u-boot

> Add regulator-init-microvolt for driver to init the regulator,
> and the min output value is not 800000mV for the PWM2 io domain has
> changed to VCC3V0 instead of VCC1V8 in rockchip evb, we need to
> correct it with the value measured when PWM2 output HIGH.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  arch/arm/dts/rk3399-firefly.dts | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Applied to u-boot-rockchip, thanks!

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

* [U-Boot] [U-Boot, 2/4] power: pwm_regulator: fix the pwm_set_config parameter order
  2017-07-19 11:54 ` [U-Boot] [PATCH 2/4] power: pwm_regulator: fix the pwm_set_config parameter order Kever Yang
  2017-07-19 12:42   ` [U-Boot] [U-Boot, " Philipp Tomsich
  2017-07-26 16:52   ` Philipp Tomsich
@ 2017-07-27  8:32   ` Philipp Tomsich
  2017-07-27 15:13   ` [U-Boot] [PATCH " Simon Glass
  3 siblings, 0 replies; 20+ messages in thread
From: Philipp Tomsich @ 2017-07-27  8:32 UTC (permalink / raw)
  To: u-boot

> The rkpwm reg order has fixed by below patch:
> e3ef41d rockchip: pwm: fix the register layout for the PWM controller
> 
> We need to correct the parameter order for pwm_set_config() to make
> the pwm regulator works correctly.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  drivers/power/regulator/pwm_regulator.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to u-boot-rockchip, thanks!

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

* [U-Boot] [U-Boot, 3/4] power: pwm_regulator: remove redundance code
  2017-07-19 11:54 ` [U-Boot] [PATCH 3/4] power: pwm_regulator: remove redundance code Kever Yang
  2017-07-19 12:42   ` [U-Boot] [U-Boot, " Philipp Tomsich
  2017-07-26 16:52   ` Philipp Tomsich
@ 2017-07-27  8:32   ` Philipp Tomsich
  2017-07-27 15:13   ` [U-Boot] [PATCH " Simon Glass
  3 siblings, 0 replies; 20+ messages in thread
From: Philipp Tomsich @ 2017-07-27  8:32 UTC (permalink / raw)
  To: u-boot

> The regulator_enable() should be called from upper layer like
> regulators_enable_boot_on(), remove it from pwm regulator driver.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  drivers/power/regulator/pwm_regulator.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 

Applied to u-boot-rockchip, thanks!

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

* [U-Boot] [U-Boot, 4/4] rockchip: pwm: add mask for config setting
  2017-07-19 11:54 ` [U-Boot] [PATCH 4/4] rockchip: pwm: add mask for config setting Kever Yang
  2017-07-19 12:42   ` [U-Boot] [U-Boot, " Philipp Tomsich
  2017-07-26 16:52   ` Philipp Tomsich
@ 2017-07-27  8:32   ` Philipp Tomsich
  2017-07-27 15:14   ` [U-Boot] [PATCH " Simon Glass
  3 siblings, 0 replies; 20+ messages in thread
From: Philipp Tomsich @ 2017-07-27  8:32 UTC (permalink / raw)
  To: u-boot

> Use mask to clear old setting before direct set the new config,
> or else there it will mess up the config when it's not the same
> with default value.
> Fixs: 3851059 rockchip: Setup default PWM flags
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  arch/arm/include/asm/arch-rockchip/pwm.h | 2 ++
>  drivers/pwm/rk_pwm.c                     | 1 +
>  2 files changed, 3 insertions(+)
> 

Applied to u-boot-rockchip, thanks!

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

* [U-Boot] [PATCH 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399
  2017-07-19 11:54 [U-Boot] [PATCH 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399 Kever Yang
                   ` (5 preceding siblings ...)
  2017-07-27  8:32 ` Philipp Tomsich
@ 2017-07-27 15:13 ` Simon Glass
  6 siblings, 0 replies; 20+ messages in thread
From: Simon Glass @ 2017-07-27 15:13 UTC (permalink / raw)
  To: u-boot

On 19 July 2017 at 05:54, Kever Yang <kever.yang@rock-chips.com> wrote:
> Add regulator-init-microvolt for driver to init the regulator,
> and the min output value is not 800000mV for the PWM2 io domain has
> changed to VCC3V0 instead of VCC1V8 in rockchip evb, we need to
> correct it with the value measured when PWM2 output HIGH.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
>  arch/arm/dts/rk3399-firefly.dts | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

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

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

* [U-Boot] [PATCH 2/4] power: pwm_regulator: fix the pwm_set_config parameter order
  2017-07-19 11:54 ` [U-Boot] [PATCH 2/4] power: pwm_regulator: fix the pwm_set_config parameter order Kever Yang
                     ` (2 preceding siblings ...)
  2017-07-27  8:32   ` Philipp Tomsich
@ 2017-07-27 15:13   ` Simon Glass
  3 siblings, 0 replies; 20+ messages in thread
From: Simon Glass @ 2017-07-27 15:13 UTC (permalink / raw)
  To: u-boot

On 19 July 2017 at 05:54, Kever Yang <kever.yang@rock-chips.com> wrote:
> The rkpwm reg order has fixed by below patch:
> e3ef41d rockchip: pwm: fix the register layout for the PWM controller
>
> We need to correct the parameter order for pwm_set_config() to make
> the pwm regulator works correctly.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
>  drivers/power/regulator/pwm_regulator.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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

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

* [U-Boot] [PATCH 3/4] power: pwm_regulator: remove redundance code
  2017-07-19 11:54 ` [U-Boot] [PATCH 3/4] power: pwm_regulator: remove redundance code Kever Yang
                     ` (2 preceding siblings ...)
  2017-07-27  8:32   ` Philipp Tomsich
@ 2017-07-27 15:13   ` Simon Glass
  3 siblings, 0 replies; 20+ messages in thread
From: Simon Glass @ 2017-07-27 15:13 UTC (permalink / raw)
  To: u-boot

On 19 July 2017 at 05:54, Kever Yang <kever.yang@rock-chips.com> wrote:
> The regulator_enable() should be called from upper layer like
> regulators_enable_boot_on(), remove it from pwm regulator driver.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
>  drivers/power/regulator/pwm_regulator.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)

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

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

* [U-Boot] [PATCH 4/4] rockchip: pwm: add mask for config setting
  2017-07-19 11:54 ` [U-Boot] [PATCH 4/4] rockchip: pwm: add mask for config setting Kever Yang
                     ` (2 preceding siblings ...)
  2017-07-27  8:32   ` Philipp Tomsich
@ 2017-07-27 15:14   ` Simon Glass
  3 siblings, 0 replies; 20+ messages in thread
From: Simon Glass @ 2017-07-27 15:14 UTC (permalink / raw)
  To: u-boot

On 19 July 2017 at 05:54, Kever Yang <kever.yang@rock-chips.com> wrote:
> Use mask to clear old setting before direct set the new config,
> or else there it will mess up the config when it's not the same
> with default value.
> Fixs: 3851059 rockchip: Setup default PWM flags
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
>  arch/arm/include/asm/arch-rockchip/pwm.h | 2 ++
>  drivers/pwm/rk_pwm.c                     | 1 +
>  2 files changed, 3 insertions(+)

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

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

end of thread, other threads:[~2017-07-27 15:14 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-19 11:54 [U-Boot] [PATCH 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399 Kever Yang
2017-07-19 11:54 ` [U-Boot] [PATCH 2/4] power: pwm_regulator: fix the pwm_set_config parameter order Kever Yang
2017-07-19 12:42   ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-07-26 16:52   ` Philipp Tomsich
2017-07-27  8:32   ` Philipp Tomsich
2017-07-27 15:13   ` [U-Boot] [PATCH " Simon Glass
2017-07-19 11:54 ` [U-Boot] [PATCH 3/4] power: pwm_regulator: remove redundance code Kever Yang
2017-07-19 12:42   ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-07-26 16:52   ` Philipp Tomsich
2017-07-27  8:32   ` Philipp Tomsich
2017-07-27 15:13   ` [U-Boot] [PATCH " Simon Glass
2017-07-19 11:54 ` [U-Boot] [PATCH 4/4] rockchip: pwm: add mask for config setting Kever Yang
2017-07-19 12:42   ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-07-26 16:52   ` Philipp Tomsich
2017-07-27  8:32   ` Philipp Tomsich
2017-07-27 15:14   ` [U-Boot] [PATCH " Simon Glass
2017-07-19 12:42 ` [U-Boot] [U-Boot, 1/4] rockchip: dts: correct vdd_log setting for firefly-rk3399 Philipp Tomsich
2017-07-26 16:52 ` Philipp Tomsich
2017-07-27  8:32 ` Philipp Tomsich
2017-07-27 15:13 ` [U-Boot] [PATCH " Simon Glass

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.