[linux-sunxi] Re: [PATCH v4 01/11] clk: sunxi: Add display and TCON0 clocks driver

2016-05-09 Thread Stephen Boyd
On 05/09, Stephen Boyd wrote:
> 
> Ok I applied this one to clk-next.
> 

And I squashed this in to silence the following checker warning.

drivers/clk/sunxi/clk-sun4i-display.c:110:33: warning: Variable
length array is used.

---8<---
diff --git a/drivers/clk/sunxi/clk-sun4i-display.c 
b/drivers/clk/sunxi/clk-sun4i-display.c
index f02e250e64ed..f8ff6c4a5633 100644
--- a/drivers/clk/sunxi/clk-sun4i-display.c
+++ b/drivers/clk/sunxi/clk-sun4i-display.c
@@ -107,7 +107,7 @@ static int sun4i_a10_display_reset_xlate(struct 
reset_controller_dev *rcdev,
 static void __init sun4i_a10_display_init(struct device_node *node,
  const struct 
sun4i_a10_display_clk_data *data)
 {
-   const char *parents[data->parents];
+   const char *parents[4];
const char *clk_name = node->name;
struct reset_data *reset_data;
struct clk_divider *div = NULL;
@@ -126,8 +126,8 @@ static void __init sun4i_a10_display_init(struct 
device_node *node,
return;
}
 
-   ret = of_clk_parent_fill(node, parents, data->parents);
-   if (ret != data->parents) {
+   ret = of_clk_parent_fill(node, parents, ARRAY_SIZE(parents));
+   if (ret != ARRAY_SIZE(parents)) {
pr_err("%s: Could not retrieve the parents\n", clk_name);
goto unmap;
}
-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH v4 01/11] clk: sunxi: Add display and TCON0 clocks driver

2016-05-09 Thread Stephen Boyd
On 05/08, Maxime Ripard wrote:
> Hi Stephen,
> 
> On Fri, May 06, 2016 at 03:30:02PM -0700, Stephen Boyd wrote:
> > On 04/25, Maxime Ripard wrote:
> > > The A10 SoCs and its relatives has a special clock controller to drive the
> > > display engines (both frontend and backend), that have a lot in common 
> > > with
> > > the clock to drive the first TCON channel.
> > > 
> > > Add a driver to support both.
> > > 
> > > Signed-off-by: Maxime Ripard 
> > > Acked-by: Rob Herring 
> > > ---
> > 
> > Acked-by: Stephen Boyd 
> > 
> > Unless I can merge this into clk-next? Wasn't clear to me.
> 
> Yes, please do, I already sent you the bunch of patches I gathered for
> 4.7, and I don't have any others but this one.
> 

Ok I applied this one to clk-next.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH 1/1] ARM: dts: sunxi: Add a olinuxino-lime2-emmc

2016-05-09 Thread Christo Radev
Hi to All,

On Wednesday, May 4, 2016 at 10:40:37 PM UTC+3, Christo Radev wrote:
>
> Hi Oliver,
>
> I start performance tests for eMMC, SD/MMC, USB, SATA SSD devices and will 
> post the result when ready.
>
>
Some results from the performance tests done by me can be found on the 
following  post:
http://forum.armbian.com/index.php/topic/853-armbian-customization/page-4#entry8846

Best regards
Chris

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH v4 1/4] power: Add an axp20x-ac-power driver

2016-05-09 Thread Chen-Yu Tsai
On Fri, May 6, 2016 at 1:19 PM, Michael Haas  wrote:
> This adds a driver for the ac power_supply bits of the axp20x
> PMICs.
>
> This submission is taken directly from Bruno Prémonts 2015 RFC [0].
> The original RFC contains drivers for AC, battery and backup
> battery. This commit only adds the AC driver for now.
>
> [0] http://permalink.gmane.org/gmane.comp.hardware.netbook.arm.sunxi/17980
>
> Signed-off-by: Michael Haas 
> ---
>  drivers/power/Makefile  |   2 +-
>  drivers/power/axp20x_ac_power.c | 181 
> 
>  2 files changed, 182 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/power/axp20x_ac_power.c
>
> diff --git a/drivers/power/Makefile b/drivers/power/Makefile
> index e46b75d..3a785cc 100644
> --- a/drivers/power/Makefile
> +++ b/drivers/power/Makefile
> @@ -9,7 +9,7 @@ obj-$(CONFIG_GENERIC_ADC_BATTERY)   += 
> generic-adc-battery.o
>
>  obj-$(CONFIG_PDA_POWER)+= pda_power.o
>  obj-$(CONFIG_APM_POWER)+= apm_power.o
> -obj-$(CONFIG_AXP20X_POWER) += axp20x_usb_power.o
> +obj-$(CONFIG_AXP20X_POWER) += axp20x_usb_power.o axp20x_ac_power.o

Sort the file names please.

>  obj-$(CONFIG_MAX8925_POWER)+= max8925_power.o
>  obj-$(CONFIG_WM831X_BACKUP)+= wm831x_backup.o
>  obj-$(CONFIG_WM831X_POWER) += wm831x_power.o
> diff --git a/drivers/power/axp20x_ac_power.c b/drivers/power/axp20x_ac_power.c
> new file mode 100644
> index 000..0d1ca0e
> --- /dev/null
> +++ b/drivers/power/axp20x_ac_power.c
> @@ -0,0 +1,181 @@
> +/*
> + * AXP20x PMIC AC power driver
> + *
> + * Copyright 2014-2015 Bruno Prémont 
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under  the terms of the GNU General  Public License as published by the
> + * Free Software Foundation;  either version 2 of the License, or (at your
> + * option) any later version.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define DRVNAME "axp20x-ac-power"
> +
> +
> +/* Fields of AXP20X_PWR_INPUT_STATUS */
> +#define AXP20X_PWR_STATUS_AC_PRESENT BIT(7)
> +#define AXP20X_PWR_STATUS_AC_AVAILABLE   BIT(6)

> +#define AXP20X_PWR_STATUS_AC_VBUS_SHORT  BIT(1)
> +#define AXP20X_PWR_STATUS_AC_VBUS_SELBIT(0)

These 2 aren't used anymore. Please remove them.

> +
> +/* Fields of AXP20X_ADC_EN1 */
> +#define AXP20X_ADC_EN1_ACIN_VOLT BIT(5)
> +#define AXP20X_ADC_EN1_ACIN_CURR BIT(4)
> +
> +
> +struct axp20x_ac_power {
> +   struct regmap *regmap;
> +   struct power_supply *supply;
> +};
> +
> +static int axp20x_ac_power_get_property(struct power_supply *psy,
> +   enum power_supply_property psp,
> +   union power_supply_propval *val)
> +{
> +   struct axp20x_ac_power *power = power_supply_get_drvdata(psy);
> +   unsigned int input;
> +   int r;
> +
> +   switch (psp) {
> +   case POWER_SUPPLY_PROP_VOLTAGE_NOW:
> +   r = axp20x_read_variable_width(power->regmap,
> +  AXP20X_ACIN_V_ADC_H, 12);
> +   if (r < 0)
> +   return r;
> +
> +   val->intval = r * 1700; /* 1 step = 1.7 mV */
> +   return 0;
> +   case POWER_SUPPLY_PROP_CURRENT_NOW:
> +   r = axp20x_read_variable_width(power->regmap,
> +  AXP20X_ACIN_I_ADC_H, 12);
> +   if (r < 0)
> +   return r;
> +
> +   val->intval = r * 375; /* 1 step = 0.375 mA */

The step for ACIN is 0.625 mA. 0.375 is for VBUS.

> +   return 0;
> +   default:
> +   break;
> +   }
> +
> +   /* All the properties below need the input-status reg value */
> +   r = regmap_read(power->regmap, AXP20X_PWR_INPUT_STATUS, );
> +   if (r)
> +   return r;
> +
> +   switch (psp) {
> +   case POWER_SUPPLY_PROP_PRESENT:
> +   val->intval = !!(input & AXP20X_PWR_STATUS_AC_PRESENT);
> +   break;
> +   case POWER_SUPPLY_PROP_ONLINE:
> +   val->intval = !!(input & AXP20X_PWR_STATUS_AC_AVAILABLE);
> +   break;
> +   default:
> +   return -EINVAL;
> +   }
> +
> +   return 0;
> +}
> +
> +static enum power_supply_property axp20x_ac_power_properties[] = {
> +   POWER_SUPPLY_PROP_PRESENT,
> +   POWER_SUPPLY_PROP_ONLINE,
> +   POWER_SUPPLY_PROP_VOLTAGE_NOW,
> +   POWER_SUPPLY_PROP_CURRENT_NOW,
> +};
> +
> +static const struct power_supply_desc axp20x_ac_power_desc = {
> +   .name = "axp20x-ac",
> +   .type = POWER_SUPPLY_TYPE_MAINS,
> +   .properties = axp20x_ac_power_properties,
> +   .num_properties = ARRAY_SIZE(axp20x_ac_power_properties),
> 

[linux-sunxi] Re: [PATCH 1/1] ARM: dts: sunxi: Add a olinuxino-lime2-emmc

2016-05-09 Thread Christo Radev
Hi Olliver,

Sorry for the delay but I was on a place without Internet access.

Is there something wrong with the logs?

On Thursday, May 5, 2016 at 11:43:49 AM UTC+3, Olliver Schinagl wrote:
>
> Hey Christo,
>
> On 04-05-16 21:40, Christo Radev wrote:
>
> Hi Oliver,
>
> I start performance tests for eMMC, SD/MMC, USB, SATA SSD devices and will 
> post the result when ready.
>
> As a beginning I can say that eMMC is accessed via 4-bit bus without 
> matter of the patch used.
> There you are the content of /sys/kernel/debug/mmcX/ios (where X is number 
> of eMMC or SD/MMC device).
> Booted from SD card with 8-bit patched kernel
> root@egpr:~# dmesg | grep mmc
> [3.599625] sunxi-mmc 1c0f000.mmc: Got CD GPIO
> [3.631883] sunxi-mmc 1c0f000.mmc: base:0xf08da000 irq:26
> [3.669058] mmc0: host does not support reading read-only switch, 
> assuming write-enable
> [3.671674] sunxi-mmc 1c11000.mmc: base:0xf08de000 irq:27
> [3.672064] mmc0: new high speed SDHC card at address 0007
> [3.673068] mmcblk0: mmc0:0007 SD04G 3.71 GiB
> [3.674785]  mmcblk0: p1
> [3.682261] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 8, RTO !!
> [3.689280] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
> [3.690146] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
> [3.690977] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
> [3.691808] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
> [3.745505] mmc1: MAN_BKOPS_EN bit is not set
> [3.749187] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 8, RD EBE !!
> [3.749229] sunxi-mmc 1c11000.mmc: data error, sending stop command
> [3.749247] sunxi-mmc 1c11000.mmc: send stop command failed
> [3.749268] mmc1: switch to bus width 2 failed
> [3.753586] mmc1: new high speed MMC card at address 0001
> [3.754479] mmcblk1: mmc1:0001 P1 3.60 GiB
> [3.754961] mmcblk1boot0: mmc1:0001 P1 partition 1 16.0 MiB
> [3.755604] mmcblk1boot1: mmc1:0001 P1 partition 2 16.0 MiB
> [3.757045]  mmcblk1: p1
> [4.216879] EXT4-fs (mmcblk0p1): mounted filesystem with writeback 
> data mode. Opts: (null)
> [7.907002] EXT4-fs (mmcblk0p1): re-mounted. Opts: commit=600,errors=
> remount-ro
>
> root@egpr:~# cat /sys/kernel/debug/mmc0/ios
> clock:  5000 Hz
> vdd:21 (3.3 ~ 3.4 V)
> bus mode:   2 (push-pull)
> chip select:0 (don't care)
> power mode: 2 (on)
> bus width:  2 (4 bits)
> timing spec:2 (sd high-speed)
> signal voltage: 0 (3.30 V)
> driver type:0 (driver type B)
> root@egpr:~# cat /sys/kernel/debug/mmc1/ios
> clock:  5000 Hz
> vdd:21 (3.3 ~ 3.4 V)
> bus mode:   2 (push-pull)
> chip select:0 (don't care)
> power mode: 2 (on)
> bus width:  2 (4 bits)
> timing spec:1 (mmc high-speed)
> signal voltage: 0 (3.30
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCHv4] ARM: dts: sunxi: Add a olinuxino-lime2-emmc

2016-05-09 Thread Olliver Schinagl

Hey Maxime,

On 08-05-16 20:09, Maxime Ripard wrote:

On Thu, May 05, 2016 at 11:08:52AM +0200, Olliver Schinagl wrote:

There are 3 kinds of OLinuXino Lime2 boards.
One without any on board storage, one with NAND storage and one with
eMMC storage. This patch adds the eMMC variant of boards.

eMMC storage is different from a regular SD card in that it is soldered
on the board and cannot be changed. Additionally, it shares pins with
the NAND module and with the second SPI port.

Changeslog:

v4:
   Add board compatibles

v3:
   Add pwr-seq-emmc with the reset gpio

v2:
   Remove unsupported no-1.8-v property, add vqmmc property

v1:
   Initial bare bone version

This is not something we want in the commit log. This should go below
the --- so that it's dropped when applied.
Sorry about that, I didn't know the --- trick. ChenYu reminded of it 
however, so that'll go into my toolblox.


Removed and applied.

Thanks for fixing it, much appreciated :)


Thanks,
Maxime



--
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: sun7i_tvd and cubietruck A20

2016-05-09 Thread milosladicorbic
On Sunday, May 8, 2016 at 9:29:28 AM UTC+2, marti...@googlemail.com wrote:
> Hi,
> 
> did someone tested it with armbian and a 3.4.112 kernel?

Hi,
I tested it with kernel 3.4.75 and it works after patch.
You need to patch your version with this patch 
https://github.com/meantone/sunxi-tvin
And it should work..:)

Good luck!
Milos,

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH v4 2/4] mfd: axp20x: Add a cell for the ac power_supply part of the axp20x PMICs

2016-05-09 Thread Lee Jones
On Fri, 06 May 2016, Michael Haas wrote:

> As a counterpart to the usb power_supply cell, this commit adds an AC
> power_supply cell to the axp20x driver.
> 
> Still missing are the RTC backup battery and the main battery charger
> cells.
> 
> Signed-off-by: Michael Haas 
> Acked-by: Chen-Yu Tsai 
> ---
>  drivers/mfd/axp20x.c | 11 +++
>  1 file changed, 11 insertions(+)

Applied, thanks.

> diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
> index a57d6e9..aa6ef08 100644
> --- a/drivers/mfd/axp20x.c
> +++ b/drivers/mfd/axp20x.c
> @@ -128,6 +128,12 @@ static struct resource axp152_pek_resources[] = {
>   DEFINE_RES_IRQ_NAMED(AXP152_IRQ_PEK_FAL_EDGE, "PEK_DBF"),
>  };
>  
> +static struct resource axp20x_ac_power_supply_resources[] = {
> + DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_ACIN_PLUGIN, "ACIN_PLUGIN"),
> + DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_ACIN_REMOVAL, "ACIN_REMOVAL"),
> + DEFINE_RES_IRQ_NAMED(AXP20X_IRQ_ACIN_OVER_V, "ACIN_OVER_V"),
> +};
> +
>  static struct resource axp20x_pek_resources[] = {
>   {
>   .name   = "PEK_DBR",
> @@ -436,6 +442,11 @@ static struct mfd_cell axp20x_cells[] = {
>   }, {
>   .name   = "axp20x-regulator",
>   }, {
> + .name   = "axp20x-ac-power-supply",
> + .of_compatible  = "x-powers,axp202-ac-power-supply",
> + .num_resources  = ARRAY_SIZE(axp20x_ac_power_supply_resources),
> + .resources  = axp20x_ac_power_supply_resources,
> + }, {
>   .name   = "axp20x-usb-power-supply",
>   .of_compatible  = "x-powers,axp202-usb-power-supply",
>   .num_resources  = ARRAY_SIZE(axp20x_usb_power_supply_resources),

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.