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

2016-05-02 Thread Chen-Yu Tsai
Hi,

On Thu, Apr 28, 2016 at 3:19 PM, 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.
>
> Signed-off-by: Olliver Schinagl 
> ---
>  .../boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts| 64 
> ++
>  1 file changed, 64 insertions(+)
>  create mode 100644 arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
>
> diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts 
> b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
> new file mode 100644
> index 000..689da36
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-lime2-emmc.dts
> @@ -0,0 +1,64 @@
> + /*
> + * Copyright 2015 - Ultimaker B.V.
> + * Author Olliver Schinagl 
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPL or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This file 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.
> + *
> + * This file is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + * obtaining a copy of this software and associated documentation
> + * files (the "Software"), to deal in the Software without
> + * restriction, including without limitation the rights to use,
> + * copy, modify, merge, publish, distribute, sublicense, and/or
> + * sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following
> + * conditions:
> + *
> + * The above copyright notice and this permission notice shall be
> + * included in all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +#include "sun7i-a20-olinuxino-lime2.dts"
> +
> +/ {
> +   model = "Olimex A20-OLinuXino-LIME2-eMMC";
> +};
> +
> + {
> +   pinctrl-names = "default";
> +   pinctrl-0 = <_pins_a>;
> +   vmmc-supply = <_vcc3v3>;
> +   bus-width = <4>;

Only 4 bits? We normally see eMMC with 8 bits. 4 bits are some kind of
embedded SD card.

> +   non-removable;
> +   no-1-8-v;

This flag is not supported on sunxi.

Instead, use the vqmmc-supply with the correct regulator and constraints.

ChenYu

> +   status = "okay";
> +
> +   emmc: emmc@0 {
> +   reg = <0>;
> +   compatible = "mmc-card";
> +   broken-hpi;
> +   };
> +};
> --
> 2.8.0.rc3
>

-- 
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 v2] clk: sunxi: predivider handling for factors clock

2016-05-02 Thread Maxime Ripard
Hi,

On Wed, Apr 20, 2016 at 12:47:46AM +0800, Vishnu Patekar wrote:
> For A31 ahb1 and a83t ahb1 clocks have predivider for certain parent.
> To handle this, this patch adds predivider table with parent index,
> prediv shift and width, parents with predivider will have nonzero width.
> 
> Rate adjustment is moved from clock specific recalc function to generic
> factors recalc. Also, adds prediv table for a31.
> 
> Signed-off-by: Vishnu Patekar 
> ---
>  drivers/clk/sunxi/clk-factors.c | 31 +++
>  drivers/clk/sunxi/clk-factors.h | 10 +-
>  drivers/clk/sunxi/clk-sunxi.c   | 31 +--
>  3 files changed, 33 insertions(+), 39 deletions(-)
> 
> diff --git a/drivers/clk/sunxi/clk-factors.c b/drivers/clk/sunxi/clk-factors.c
> index ddefe96..8f3b637 100644
> --- a/drivers/clk/sunxi/clk-factors.c
> +++ b/drivers/clk/sunxi/clk-factors.c
> @@ -45,10 +45,12 @@ static unsigned long clk_factors_recalc_rate(struct 
> clk_hw *hw,
>unsigned long parent_rate)
>  {
>   u8 n = 1, k = 0, p = 0, m = 0;
> + u8 par_index = 0;
>   u32 reg;
>   unsigned long rate;
>   struct clk_factors *factors = to_clk_factors(hw);
>   const struct clk_factors_config *config = factors->config;
> + const struct clk_factors_prediv *prediv = factors->prediv_config;
>  
>   /* Fetch the register value */
>   reg = readl(factors->reg);
> @@ -63,24 +65,16 @@ static unsigned long clk_factors_recalc_rate(struct 
> clk_hw *hw,
>   if (config->pwidth != SUNXI_FACTORS_NOT_APPLICABLE)
>   p = FACTOR_GET(config->pshift, config->pwidth, reg);
>  
> - if (factors->recalc) {
> - struct factors_request factors_req = {
> - .parent_rate = parent_rate,
> - .n = n,
> - .k = k,
> - .m = m,
> - .p = p,
> - };
> -
> + if (prediv) {
>   /* get mux details from mux clk structure */
>   if (factors->mux)
> - factors_req.parent_index =
> - (reg >> factors->mux->shift) &
> - factors->mux->mask;
> -
> - factors->recalc(_req);
> + par_index = (reg >> factors->mux->shift) &
> + factors->mux->mask;
>  
> - return factors_req.rate;
> + if (prediv[par_index].width != SUNXI_FACTORS_NOT_APPLICABLE) {
> + m = FACTOR_GET(prediv[par_index].shift,
> + prediv[par_index].width, reg);
> + }
>   }
>  
>   /* Calculate the rate */
> @@ -102,8 +96,12 @@ static int clk_factors_determine_rate(struct clk_hw *hw,
>   for (i = 0; i < num_parents; i++) {
>   struct factors_request factors_req = {
>   .rate = req->rate,
> - .parent_index = i,
>   };
> +
> + if (factors->prediv_config)
> + factors_req.prediv_width =
> + factors->prediv_config[i].width;
> +
>   parent = clk_hw_get_parent_by_index(hw, i);
>   if (!parent)
>   continue;
> @@ -211,6 +209,7 @@ struct clk *sunxi_factors_register(struct device_node 
> *node,
>   /* set up factors properties */
>   factors->reg = reg;
>   factors->config = data->table;
> + factors->prediv_config = data->prediv_table;
>   factors->get_factors = data->getter;
>   factors->recalc = data->recalc;
>   factors->lock = lock;
> diff --git a/drivers/clk/sunxi/clk-factors.h b/drivers/clk/sunxi/clk-factors.h
> index 1e63c5b..b1b7745 100644
> --- a/drivers/clk/sunxi/clk-factors.h
> +++ b/drivers/clk/sunxi/clk-factors.h
> @@ -18,10 +18,16 @@ struct clk_factors_config {
>   u8 n_start;
>  };
>  
> +struct clk_factors_prediv {
> + u8 parent_index;
> + u8 shift;
> + u8 width;
> +};
> +
>  struct factors_request {
>   unsigned long rate;
>   unsigned long parent_rate;
> - u8 parent_index;
> + u8 prediv_width;
>   u8 n;
>   u8 k;
>   u8 m;
> @@ -33,6 +39,7 @@ struct factors_data {
>   int mux;
>   int muxmask;
>   const struct clk_factors_config *table;
> + const struct clk_factors_prediv *prediv_table;
>   void (*getter)(struct factors_request *req);
>   void (*recalc)(struct factors_request *req);
>   const char *name;
> @@ -42,6 +49,7 @@ struct clk_factors {
>   struct clk_hw hw;
>   void __iomem *reg;
>   const struct clk_factors_config *config;
> + const struct clk_factors_prediv *prediv_config;
>   void (*get_factors)(struct factors_request *req);
>   void (*recalc)(struct factors_request *req);
>   spinlock_t *lock;
> diff --git a/drivers/clk/sunxi/clk-sunxi.c 

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

2016-05-02 Thread Maxime Ripard
Hi,

On Thu, Apr 28, 2016 at 09:19:58AM +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.
> 
> Signed-off-by: Olliver Schinagl 

Is it a publicly available board, or is it a private hack you made
yourself?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
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.


signature.asc
Description: PGP signature


[linux-sunxi] Re: [PATCH v6 0/3] dmaengine: sun6i: Upgrade for audio transfers

2016-05-02 Thread Vinod Koul
On Thu, Apr 28, 2016 at 05:19:11PM +0200, Jean-Francois Moine wrote:
> This patch series contains most of the remaining changes to
> the sun6i DMA driver for audio streaming (tested in
> a Allwinner H3 - Orange PI 2).
> The lacking patch (Add 4 as a possible burst value for H3) will be
> submitted when a consensus with Maxime Ripard will be found.
> This series is based on the previous patches applied by Vinod Koul.

Applied, thanks

-- 
~Vinod

-- 
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 v2 1/1] add missing UARTs pins and I2C entriesfor AllWinner H3 DTSI

2016-05-02 Thread Maxime Ripard
Hi,

On Tue, Apr 19, 2016 at 03:50:39PM -0400, Martin Ayotte wrote:
> Hi everyone,
> 
> This patch is submit to provide endusers access to additional UARTs on
> AllWinner H3 SoC along with I2C ports.

Unfortunately, your patch cannot be applied in its current form, both
because of process and technical reasons:

  * Every commits should have a commit title and log. While you do
have a title, you used the log to store your cover letter. This is
an issue, because that will be kept in the git history, which is
obviously something we don't want.
If you want to make a cover letter, you can either send it as a
separate mail, or after the "---" below that will be ignored when
applying the mails.
On the other hand, the commit log should be used to say why ýour
doing this patch and why it was needed.

  * You do not have a Signed-off-by tag in your commit log. This and
the point above is documented in Documentation/SubmittingPatches,
please make sure to read that first.

  * Your mailer completely corrupted the patch when you sent it,
replacing all tabs by spaces, and wrapping the longer lines. That
means that the patch cannot be applied anymore. Please fix your
mailer, or use one that just works, like git send-email.

  * Finally, like Chen-Yu already told you, you're doing several
different things here in a single patch, while you should have
done separate patches. From what I can see, you're adding pinctrl
groups for the uart and i2c pins, and adding the i2c controller
nodes. That should have been ideally 3 patches: 1 for the uart
pinctrl groups, 1 for the i2c pinctrl groups, 1 for the i2c
controller nodes. We also don't take pinctrl groups that are not
enabled on any boards to keep the DT size as small as possible.

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

-- 
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.


signature.asc
Description: PGP signature