[linux-sunxi] Re: [PATCH 3/9] clk: sunxi: Add prcm mod0 clock driver

2014-11-25 Thread Hans de Goede

Hi,

On 11/24/2014 11:03 PM, Maxime Ripard wrote:

On Fri, Nov 21, 2014 at 10:13:10AM +0100, Hans de Goede wrote:

Hi,

On 11/21/2014 09:49 AM, Maxime Ripard wrote:

Hi,

On Thu, Nov 20, 2014 at 04:55:22PM +0100, Hans de Goede wrote:

Add a driver for mod0 clocks found in the prcm. Currently there is only
one mod0 clocks in the prcm, the ir clock.

Signed-off-by: Hans de Goede hdego...@redhat.com
---
  Documentation/devicetree/bindings/clock/sunxi.txt |  1 +
  drivers/clk/sunxi/Makefile|  2 +-
  drivers/clk/sunxi/clk-sun6i-prcm-mod0.c   | 63 +++
  drivers/mfd/sun6i-prcm.c  | 14 +
  4 files changed, 79 insertions(+), 1 deletion(-)
  create mode 100644 drivers/clk/sunxi/clk-sun6i-prcm-mod0.c

diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt 
b/Documentation/devicetree/bindings/clock/sunxi.txt
index ed116df..342c75a 100644
--- a/Documentation/devicetree/bindings/clock/sunxi.txt
+++ b/Documentation/devicetree/bindings/clock/sunxi.txt
@@ -56,6 +56,7 @@ Required properties:
allwinner,sun4i-a10-usb-clk - for usb gates + resets on A10 / A20
allwinner,sun5i-a13-usb-clk - for usb gates + resets on A13
allwinner,sun6i-a31-usb-clk - for usb gates + resets on A31
+   allwinner,sun6i-a31-ir-clk - for the ir clock on A31

  Required properties for all clocks:
  - reg : shall be the control register address for the clock.
diff --git a/drivers/clk/sunxi/Makefile b/drivers/clk/sunxi/Makefile
index 7ddc2b5..daf8b1c 100644
--- a/drivers/clk/sunxi/Makefile
+++ b/drivers/clk/sunxi/Makefile
@@ -10,4 +10,4 @@ obj-y += clk-sun8i-mbus.o

  obj-$(CONFIG_MFD_SUN6I_PRCM) += \
clk-sun6i-ar100.o clk-sun6i-apb0.o clk-sun6i-apb0-gates.o \
-   clk-sun8i-apb0.o
+   clk-sun8i-apb0.o clk-sun6i-prcm-mod0.o
diff --git a/drivers/clk/sunxi/clk-sun6i-prcm-mod0.c 
b/drivers/clk/sunxi/clk-sun6i-prcm-mod0.c
new file mode 100644
index 000..e80f18e
--- /dev/null
+++ b/drivers/clk/sunxi/clk-sun6i-prcm-mod0.c
@@ -0,0 +1,63 @@
+/*
+ * Allwinner A31 PRCM mod0 clock driver
+ *
+ * Copyright (C) 2014 Hans de Goede hdego...@redhat.com
+ *
+ * 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.
+ *
+ * This program 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.
+ */
+
+#include linux/clk-provider.h
+#include linux/clkdev.h
+#include linux/module.h
+#include linux/of_address.h
+#include linux/platform_device.h
+
+#include clk-factors.h
+#include clk-mod0.h
+
+static const struct of_device_id sun6i_a31_prcm_mod0_clk_dt_ids[] = {
+   { .compatible = allwinner,sun6i-a31-ir-clk },
+   { /* sentinel */ }
+};
+
+static DEFINE_SPINLOCK(sun6i_prcm_mod0_lock);
+
+static int sun6i_a31_prcm_mod0_clk_probe(struct platform_device *pdev)
+{
+   struct device_node *np = pdev-dev.of_node;
+   struct resource *r;
+   void __iomem *reg;
+
+   if (!np)
+   return -ENODEV;
+
+   r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+   reg = devm_ioremap_resource(pdev-dev, r);
+   if (IS_ERR(reg))
+   return PTR_ERR(reg);
+
+   sunxi_factors_register(np, sun4i_a10_mod0_data,
+  sun6i_prcm_mod0_lock, reg);
+   return 0;
+}
+
+static struct platform_driver sun6i_a31_prcm_mod0_clk_driver = {
+   .driver = {
+   .name = sun6i-a31-prcm-mod0-clk,
+   .of_match_table = sun6i_a31_prcm_mod0_clk_dt_ids,
+   },
+   .probe = sun6i_a31_prcm_mod0_clk_probe,
+};
+module_platform_driver(sun6i_a31_prcm_mod0_clk_driver);
+
+MODULE_DESCRIPTION(Allwinner A31 PRCM mod0 clock driver);
+MODULE_AUTHOR(Hans de Goede hdego...@redhat.com);
+MODULE_LICENSE(GPL);


I don't think this is the right approach, mainly for two reasons: the
compatible shouldn't change, and you're basically duplicating code
there.

I understand that you need the new compatible in order to avoid a
double probing: one by CLK_OF_DECLARE, and one by the usual mechanism,
and that also implies the second reason.


Not only for that, we need a new compatible also because the mfd framework
needs a separate compatible per sub-node as that is how it finds nodes
to attach to the platform devices, so we need a new compatible anyways,
with your make the mod0 clock driver a platform driver solution we could
use:


We have a single mod0 clock in there, so no, not really.


We have a single mod0 clock there today, but who knows what tomorrow brings,
arguably the 1wire clock is a mod0 clock too, so we already have 2 today.


Plus, that seems like a bogus limitation from MFD, and it really
shouldn't work 

[linux-sunxi] Re: [PATCH 3/9] clk: sunxi: Add prcm mod0 clock driver

2014-11-25 Thread Hans de Goede

Hi,

On 11/25/2014 09:29 AM, Hans de Goede wrote:

snip


Well one reasons why clocks are instantiated the way they are is to have
them available as early as possible, which is really convenient and works
really well.

You are asking for a whole lot of stuff to be changed, arguably in a way
which makes it worse, just to save 47 lines of code...


Thinking more about this one alternative which should work is to just put the
clocks in the prcm in the clocks node, then they get their own reg property,
rather then being part of the prcm reg range, and the standard of_clk mod0
driver we have will just work.

Regards,

Hans

--
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 v3 2/2] dt-bindings: simplefb-sunxi: Add sunxi simplefb extensions

2014-11-25 Thread Tomi Valkeinen
On 18/11/14 13:10, Hans de Goede wrote:
 If pre-filled framebuffer nodes are used, the firmware may need extra
 properties to find the right node. This documents the properties to use
 for this on sunxi platforms.
 
 Signed-off-by: Hans de Goede hdego...@redhat.com
 Acked-by: Grant Likely grant.lik...@linaro.org
 ---
  .../bindings/video/simple-framebuffer-sunxi.txt| 33 
 ++
  1 file changed, 33 insertions(+)
  create mode 100644 
 Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt
 
 diff --git 
 a/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt 
 b/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt
 new file mode 100644
 index 000..c46ba64
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt
 @@ -0,0 +1,33 @@
 +Sunxi specific Simple Framebuffer bindings
 +
 +This binding documents sunxi specific extensions to the simple-framebuffer
 +bindings. The sunxi simplefb u-boot code relies on the devicetree containing
 +pre-populated simplefb nodes.
 +
 +These extensions are intended so that u-boot can select the right node based
 +on which pipeline is being used. As such they are solely intended for
 +firmware / bootloader use, and the OS should ignore them.
 +
 +Required properties:
 +- compatible: allwinner,simple-framebuffer
 +- allwinner,pipeline, one of:

Sorry my ignorance, but what's sunxi and what's allwinner? Both names
are mixed here.

 Tomi


-- 
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: OpenPGP digital signature


[linux-sunxi] Re: [PATCH v3 0/2] dt-bindings: simplefb: Drop the advice about using a specific path for nodes

2014-11-25 Thread Tomi Valkeinen
Hi,

On 18/11/14 13:10, Hans de Goede wrote:
 Hi Tomi,
 
 So it turns out we needed a v3, as I mistakenly went with sunxi, as vendor
 prefix for the allwinner specific properties, but the registered vendor prefix
 for allwinner is allwinnner,, this version fixes this.
 
 Changes in v3: Use proper allwinnner, for the compatible string and vendor
 specific properties.
 
 Changes in v2: Changed the simplefb-sunxi bindings to use a single
 sunxi,pipeline string property instead of a sunxi,pipeline int and a
 sunxi,output string property.
 
 This patch set is all acked up, and a fix to the binding changes you've
 already queued for 3.19, so please queue these 2 patches for 3.19.

The discussions about this have continued in the earlier version of this
series. Is this series still ok for everyone?

The series looks fine to me, and has Grant's acks, so I'll merge it
tomorrow to fbdev tree if no one objects (and my comment for the patch 2
about sunxi/allwinner was just my ignorance).

 Tomi


-- 
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: OpenPGP digital signature


Re: [linux-sunxi] [PATCH] fex: a10: Fix SPI0 pins function

2014-11-25 Thread Tomas Novotny
Hi,

On Thu, 13 Nov 2014 18:17:14 +0100, Tomas Novotny to...@novotny.cz wrote:
 SPI0 on A10 has pin function 2 according to the A10 Datasheet V1.70. So
 fix the wrong configuration even if the SPI is disabled. Boards
 Iteaduino Plus A10 and pcDuino are using SPI0 already and the
 configuration is correct.
 
 Fixed configuration was tested on A10-OLinuXino-LIME.
 
 Signed-off-by: Tomas Novotny to...@novotny.cz

Gentle ping, this simple fix should go to sunxi-boards.
Thanks,

Tomas

 ---
  sys_config/a10/a10-olinuxino-lime.fex |  8 
  sys_config/a10/a10_mid_1gb.fex|  8 
  sys_config/a10/ba10_tv_box.fex|  8 
  sys_config/a10/coby_mid7042.fex   | 10 +-
  sys_config/a10/coby_mid8042.fex   |  8 
  sys_config/a10/coby_mid9742.fex   |  8 
  sys_config/a10/cubieboard.fex |  8 
  sys_config/a10/cubieboard_512.fex |  8 
  sys_config/a10/dns_m82.fex| 10 +-
  sys_config/a10/eoma68_a10.fex |  8 
  sys_config/a10/gooseberry_a721.fex| 10 +-
  sys_config/a10/h6.fex | 10 +-
  sys_config/a10/hackberry.fex  |  8 
  sys_config/a10/hcore_hc860.fex|  8 
  sys_config/a10/hyundai_a7.fex | 10 +-
  sys_config/a10/hyundai_a7hd.fex   |  8 
  sys_config/a10/inet97f-ii.fex |  8 
  sys_config/a10/inet_3fbt.fex  | 10 +-
  sys_config/a10/jesurun-q5.fex |  8 
  sys_config/a10/marsboard_a10.fex  |  8 
  sys_config/a10/mele_a1000.fex |  8 
  sys_config/a10/mele_a1000g.fex|  8 
  sys_config/a10/mele_a3700.fex |  8 
  sys_config/a10/mini-x-1gb.fex |  8 
  sys_config/a10/mini-x.fex |  8 
  sys_config/a10/mk802-1gb.fex  | 10 +-
  sys_config/a10/mk802.fex  | 10 +-
  sys_config/a10/mk802ii.fex|  8 
  sys_config/a10/pov_protab2_ips9.fex   |  8 
  sys_config/a10/pov_protab2_ips_3g.fex |  8 
  sys_config/a10/sanei_n90.fex  | 10 +-
  sys_config/a10/t702a.fex  |  8 
  sys_config/a10/uhost_u1a.fex  |  8 
  sys_config/a10/yarvik_tab260.fex  | 10 +-
  sys_config/a10/zatab.fex  |  8 
  35 files changed, 150 insertions(+), 150 deletions(-)
 
 diff --git a/sys_config/a10/a10-olinuxino-lime.fex
 b/sys_config/a10/a10-olinuxino-lime.fex index 7f0c1b8..e478aec 100644
 --- a/sys_config/a10/a10-olinuxino-lime.fex
 +++ b/sys_config/a10/a10-olinuxino-lime.fex
 @@ -197,10 +197,10 @@ uart_rx = port:PA1541defaultdefault
  [spi0_para]
  spi_used = 0
  spi_cs_bitmap = 1
 -spi_cs0 = port:PI103defaultdefaultdefault
 -spi_sclk = port:PI113defaultdefaultdefault
 -spi_mosi = port:PI123defaultdefaultdefault
 -spi_miso = port:PI133defaultdefaultdefault
 +spi_cs0 = port:PI102defaultdefaultdefault
 +spi_sclk = port:PI112defaultdefaultdefault
 +spi_mosi = port:PI122defaultdefaultdefault
 +spi_miso = port:PI132defaultdefaultdefault
  
  [spi1_para]
  spi_used = 0
 diff --git a/sys_config/a10/a10_mid_1gb.fex b/sys_config/a10/a10_mid_1gb.fex
 index 03c246b..abb857b 100644
 --- a/sys_config/a10/a10_mid_1gb.fex
 +++ b/sys_config/a10/a10_mid_1gb.fex
 @@ -206,10 +206,10 @@ uart_rx = port:PA154defaultdefaultdefault
  [spi0_para]
  spi_used = 0
  spi_cs_bitmap = 1
 -spi_cs0 = port:PI103defaultdefaultdefault
 -spi_sclk = port:PI113defaultdefaultdefault
 -spi_mosi = port:PI123defaultdefaultdefault
 -spi_miso = port:PI133defaultdefaultdefault
 +spi_cs0 = port:PI102defaultdefaultdefault
 +spi_sclk = port:PI112defaultdefaultdefault
 +spi_mosi = port:PI122defaultdefaultdefault
 +spi_miso = port:PI132defaultdefaultdefault
  
  [spi1_para]
  spi_used = 0
 diff --git a/sys_config/a10/ba10_tv_box.fex b/sys_config/a10/ba10_tv_box.fex
 index 29fef43..941aee0 100644
 --- a/sys_config/a10/ba10_tv_box.fex
 +++ b/sys_config/a10/ba10_tv_box.fex
 @@ -199,10 +199,10 @@ uart_rx = port:PA1541defaultdefault
  [spi0_para]
  spi_used = 0
  spi_cs_bitmap = 1
 -spi_cs0 = port:PI103defaultdefaultdefault
 -spi_sclk = port:PI113defaultdefaultdefault
 -spi_mosi = port:PI123defaultdefaultdefault
 -spi_miso = port:PI133defaultdefaultdefault
 +spi_cs0 = port:PI102defaultdefaultdefault
 +spi_sclk = port:PI112defaultdefaultdefault
 +spi_mosi = port:PI122defaultdefaultdefault
 +spi_miso = port:PI132defaultdefaultdefault
  
  [spi1_para]
  spi_used = 0
 diff --git a/sys_config/a10/coby_mid7042.fex b/sys_config/a10/coby_mid7042.fex
 index 90bea27..f1383ff 100644
 --- a/sys_config/a10/coby_mid7042.fex
 +++ b/sys_config/a10/coby_mid7042.fex
 @@ -176,11 +176,11 @@ uart_tx = port:PA144defaultdefaultdefault
  uart_rx = port:PA154defaultdefaultdefault
  [spi0_para]
  spi_used = 0
 -spi_cs0 = port:PI103defaultdefaultdefault
 -spi_cs1 = port:PI143defaultdefaultdefault
 -spi_sclk = 

[linux-sunxi] Re: [PATCH v3 2/2] dt-bindings: simplefb-sunxi: Add sunxi simplefb extensions

2014-11-25 Thread Hans de Goede

Hi,

On 11/25/2014 01:32 PM, Tomi Valkeinen wrote:

On 18/11/14 13:10, Hans de Goede wrote:

If pre-filled framebuffer nodes are used, the firmware may need extra
properties to find the right node. This documents the properties to use
for this on sunxi platforms.

Signed-off-by: Hans de Goede hdego...@redhat.com
Acked-by: Grant Likely grant.lik...@linaro.org
---
  .../bindings/video/simple-framebuffer-sunxi.txt| 33 ++
  1 file changed, 33 insertions(+)
  create mode 100644 
Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt

diff --git 
a/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt 
b/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt
new file mode 100644
index 000..c46ba64
--- /dev/null
+++ b/Documentation/devicetree/bindings/video/simple-framebuffer-sunxi.txt
@@ -0,0 +1,33 @@
+Sunxi specific Simple Framebuffer bindings
+
+This binding documents sunxi specific extensions to the simple-framebuffer
+bindings. The sunxi simplefb u-boot code relies on the devicetree containing
+pre-populated simplefb nodes.
+
+These extensions are intended so that u-boot can select the right node based
+on which pipeline is being used. As such they are solely intended for
+firmware / bootloader use, and the OS should ignore them.
+
+Required properties:
+- compatible: allwinner,simple-framebuffer
+- allwinner,pipeline, one of:


Sorry my ignorance, but what's sunxi and what's allwinner? Both names
are mixed here.


sunxi is the sun#i SoCs from Allwinner, Allwinner is the manufacturer and the
SoC code names used everywhere in the kernel for their SoCs are sun4i, sun5i,
sun6i, etc. Most people refer to these SoCs as sunxi. This is also what the
linux-sunxi mailinglist in the Cc is about.

The official devicetree vendor prefix for Allwinner is allwinner, hence the
allwinner in the compatible name, see e.g. also

Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt

Which also uses sunxi / sun4i everywhere except in the compatible vendor prefix.

Regards,

Hans

--
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 v3 2/2] dt-bindings: simplefb-sunxi: Add sunxi simplefb extensions

2014-11-25 Thread Tomi Valkeinen
On 25/11/14 14:52, Hans de Goede wrote:

 +Required properties:
 +- compatible: allwinner,simple-framebuffer
 +- allwinner,pipeline, one of:

 Sorry my ignorance, but what's sunxi and what's allwinner? Both names
 are mixed here.
 
 sunxi is the sun#i SoCs from Allwinner, Allwinner is the manufacturer
 and the
 SoC code names used everywhere in the kernel for their SoCs are sun4i,
 sun5i,
 sun6i, etc. Most people refer to these SoCs as sunxi. This is also what the
 linux-sunxi mailinglist in the Cc is about.
 
 The official devicetree vendor prefix for Allwinner is allwinner, hence the
 allwinner in the compatible name, see e.g. also
 
 Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt
 
 Which also uses sunxi / sun4i everywhere except in the compatible vendor
 prefix.

Alright, thanks for explanation.

Shouldn't the compatible then be allwinner,sunxi-simple-framebuffer,
to differentiate from some other SoC Allwinner has or might create in
the future? That is, presuming you're confident enough that a single
compatible string covers all the current and forthcoming sunxi SoCs.

Perhaps simplefb is a bit special case, but I usually feel better if the
compatible string is defined in a more specific manner. In this case I'd
have:

allwinner,sun4i-simple-framebuffer
allwinner,sun5i-simple-framebuffer
allwinner,sun6i-simple-framebuffer

so that if sun7i has totally different display controller, there would
be no conflict.

 Tomi


-- 
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: OpenPGP digital signature


[linux-sunxi] Re: [PATCH v3 2/2] dt-bindings: simplefb-sunxi: Add sunxi simplefb extensions

2014-11-25 Thread Hans de Goede

Hi,

On 11/25/2014 02:02 PM, Tomi Valkeinen wrote:

On 25/11/14 14:52, Hans de Goede wrote:


+Required properties:
+- compatible: allwinner,simple-framebuffer
+- allwinner,pipeline, one of:


Sorry my ignorance, but what's sunxi and what's allwinner? Both names
are mixed here.


sunxi is the sun#i SoCs from Allwinner, Allwinner is the manufacturer
and the
SoC code names used everywhere in the kernel for their SoCs are sun4i,
sun5i,
sun6i, etc. Most people refer to these SoCs as sunxi. This is also what the
linux-sunxi mailinglist in the Cc is about.

The official devicetree vendor prefix for Allwinner is allwinner, hence the
allwinner in the compatible name, see e.g. also

Documentation/devicetree/bindings/input/sun4i-lradc-keys.txt

Which also uses sunxi / sun4i everywhere except in the compatible vendor
prefix.


Alright, thanks for explanation.

Shouldn't the compatible then be allwinner,sunxi-simple-framebuffer,
to differentiate from some other SoC Allwinner has or might create in
the future? That is, presuming you're confident enough that a single
compatible string covers all the current and forthcoming sunxi SoCs.


This was discussed in an earlier thread, we (Ian Campbell, Grant and me)
decided to settle on allwinner,simple-framebuffer to make it clear that
these are allwinner extensions to the standard simple-framebuffer bindings,
and that the node otherwise is simple-framebuffer compatible.

We were afraid that e.g. sun4i-simple-framebuffer would signal that it
is not a normal simple-framebuffer node, so we decided to go with just
the allwinner, prefix to indicate that it uses allwinner specific
extensions.

Regards,

Hans

--
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 v3 2/2] dt-bindings: simplefb-sunxi: Add sunxi simplefb extensions

2014-11-25 Thread Tomi Valkeinen
On 25/11/14 15:21, Hans de Goede wrote:

 Shouldn't the compatible then be allwinner,sunxi-simple-framebuffer,
 to differentiate from some other SoC Allwinner has or might create in
 the future? That is, presuming you're confident enough that a single
 compatible string covers all the current and forthcoming sunxi SoCs.
 
 This was discussed in an earlier thread, we (Ian Campbell, Grant and me)

Okay. Sorry for not having time at the moment to follow the discussions
properly. =)

 decided to settle on allwinner,simple-framebuffer to make it clear that
 these are allwinner extensions to the standard simple-framebuffer bindings,
 and that the node otherwise is simple-framebuffer compatible.
 
 We were afraid that e.g. sun4i-simple-framebuffer would signal that it
 is not a normal simple-framebuffer node, so we decided to go with just
 the allwinner, prefix to indicate that it uses allwinner specific
 extensions.

Wouldn't

compatible = allwinner,sun4i-simple-framebuffer, simple-framebuffer;

tell that it's a simple-framebuffer, with allwinner's sun4i extensions?

I guess you can have just allwinner,simple-framebuffer, and then if a
new Allwinner SoC has a totally different display controller, the
documentation would specify that this property is for that SoC, and this
another property is for that another SoC. But isn't the compatible
string what's supposed to use in cases like this?

And if the new SoC is not sunxi, but some totally other family, there's
need for a new compatible string anyway, as
simple-framebuffer-sunxi.txt is for sunxi only.

 Tomi


-- 
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: OpenPGP digital signature


[linux-sunxi] Re: [PATCH v3 2/2] dt-bindings: simplefb-sunxi: Add sunxi simplefb extensions

2014-11-25 Thread Hans de Goede

Hi,

On 11/25/2014 02:38 PM, Tomi Valkeinen wrote:

On 25/11/14 15:21, Hans de Goede wrote:


Shouldn't the compatible then be allwinner,sunxi-simple-framebuffer,
to differentiate from some other SoC Allwinner has or might create in
the future? That is, presuming you're confident enough that a single
compatible string covers all the current and forthcoming sunxi SoCs.


This was discussed in an earlier thread, we (Ian Campbell, Grant and me)


Okay. Sorry for not having time at the moment to follow the discussions
properly. =)


decided to settle on allwinner,simple-framebuffer to make it clear that
these are allwinner extensions to the standard simple-framebuffer bindings,
and that the node otherwise is simple-framebuffer compatible.

We were afraid that e.g. sun4i-simple-framebuffer would signal that it
is not a normal simple-framebuffer node, so we decided to go with just
the allwinner, prefix to indicate that it uses allwinner specific
extensions.


Wouldn't

compatible = allwinner,sun4i-simple-framebuffer, simple-framebuffer;

tell that it's a simple-framebuffer, with allwinner's sun4i extensions?

I guess you can have just allwinner,simple-framebuffer, and then if a
new Allwinner SoC has a totally different display controller, the
documentation would specify that this property is for that SoC, and this
another property is for that another SoC. But isn't the compatible
string what's supposed to use in cases like this?


The only soc specific thing in the binding is the pipeline property string
values, and we can always add new values to that, the rest is all generic,
as simplefb is generic.

As said Ian Campbell, Grant and me have decided on using this, and currently
patches are already queued up for both the dts files and u-boot to use this,
so unless there are really strong reasons to change it at this point I would
prefer to keep this as is.

Regards,

Hans

--
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 3/9] clk: sunxi: Add prcm mod0 clock driver

2014-11-25 Thread Lee Jones
On Sun, 23 Nov 2014, Hans de Goede wrote:

 Add a driver for mod0 clocks found in the prcm. Currently there is only
 one mod0 clocks in the prcm, the ir clock.
 
 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
  Documentation/devicetree/bindings/clock/sunxi.txt |  1 +
  drivers/clk/sunxi/Makefile|  2 +-
  drivers/clk/sunxi/clk-sun6i-prcm-mod0.c   | 63 
 +++
  drivers/mfd/sun6i-prcm.c  | 14 +
  4 files changed, 79 insertions(+), 1 deletion(-)
  create mode 100644 drivers/clk/sunxi/clk-sun6i-prcm-mod0.c

[...]

 diff --git a/drivers/mfd/sun6i-prcm.c b/drivers/mfd/sun6i-prcm.c
 index 283ab8d..ff1254f 100644
 --- a/drivers/mfd/sun6i-prcm.c
 +++ b/drivers/mfd/sun6i-prcm.c
 @@ -41,6 +41,14 @@ static const struct resource 
 sun6i_a31_apb0_gates_clk_res[] = {
   },
  };
  
 +static const struct resource sun6i_a31_ir_clk_res[] = {
 + {
 + .start = 0x54,
 + .end = 0x57,
 + .flags = IORESOURCE_MEM,
 + },
 +};

I'm not overly keen on these magic numbers (and yes, I'm well aware
that I SoB'ed the patch which started them off).

It's not a show stopper, although I'd prefer if they were fixed with a
subsequent patch.

Acked-by: Lee Jones lee.jo...@linaro.org

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


[linux-sunxi] Re: [PATCH 2/5] pinctrl: sun6i: Add A31s pinctrl support

2014-11-25 Thread Maxime Ripard
On Sun, Nov 23, 2014 at 01:54:40PM +0100, Hans de Goede wrote:
 The A31s is a stripped down version of the A31, as such it is missing some
 pins and some functions on some pins.
 
 The new pinctrl-sun6i-a31s.c this commit adds is a copy of 
 pinctrl-sun6i-a31s.c
 with the missing pins and functions removed.
 
 Note there is no a31s specific version of pinctrl-sun6i-a31-r.c, as the
 prcm pins are identical between the A31 and the A31s.
 
 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
  .../bindings/pinctrl/allwinner,sunxi-pinctrl.txt   |   1 +
  drivers/pinctrl/sunxi/Kconfig  |   4 +
  drivers/pinctrl/sunxi/Makefile |   1 +
  drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c | 814 
 +
  4 files changed, 820 insertions(+)
  create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c
 
 diff --git 
 a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt 
 b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
 index 93ce12e..fdd8046 100644
 --- a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
 +++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt
 @@ -11,6 +11,7 @@ Required properties:
allwinner,sun5i-a10s-pinctrl
allwinner,sun5i-a13-pinctrl
allwinner,sun6i-a31-pinctrl
 +  allwinner,sun6i-a31s-pinctrl
allwinner,sun6i-a31-r-pinctrl
allwinner,sun7i-a20-pinctrl
allwinner,sun8i-a23-pinctrl
 diff --git a/drivers/pinctrl/sunxi/Kconfig b/drivers/pinctrl/sunxi/Kconfig
 index a5e10f7..6cffe38 100644
 --- a/drivers/pinctrl/sunxi/Kconfig
 +++ b/drivers/pinctrl/sunxi/Kconfig
 @@ -21,6 +21,10 @@ config PINCTRL_SUN6I_A31
   def_bool MACH_SUN6I
   select PINCTRL_SUNXI_COMMON
  
 +config PINCTRL_SUN6I_A31S
 + def_bool MACH_SUN6I
 + select PINCTRL_SUNXI_COMMON
 +
  config PINCTRL_SUN6I_A31_R
   def_bool MACH_SUN6I
   depends on RESET_CONTROLLER
 diff --git a/drivers/pinctrl/sunxi/Makefile b/drivers/pinctrl/sunxi/Makefile
 index e797efb..2f82290 100644
 --- a/drivers/pinctrl/sunxi/Makefile
 +++ b/drivers/pinctrl/sunxi/Makefile
 @@ -6,6 +6,7 @@ obj-$(CONFIG_PINCTRL_SUN4I_A10)   += 
 pinctrl-sun4i-a10.o
  obj-$(CONFIG_PINCTRL_SUN5I_A10S) += pinctrl-sun5i-a10s.o
  obj-$(CONFIG_PINCTRL_SUN5I_A13)  += pinctrl-sun5i-a13.o
  obj-$(CONFIG_PINCTRL_SUN6I_A31)  += pinctrl-sun6i-a31.o
 +obj-$(CONFIG_PINCTRL_SUN6I_A31S) += pinctrl-sun6i-a31s.o
  obj-$(CONFIG_PINCTRL_SUN6I_A31_R)+= pinctrl-sun6i-a31-r.o
  obj-$(CONFIG_PINCTRL_SUN7I_A20)  += pinctrl-sun7i-a20.o
  obj-$(CONFIG_PINCTRL_SUN8I_A23)  += pinctrl-sun8i-a23.o
 diff --git a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c 
 b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c
 new file mode 100644
 index 000..42ee373
 --- /dev/null
 +++ b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31s.c
 @@ -0,0 +1,814 @@
 +/*
 + * Allwinner A31 SoCs pinctrl driver.

^ A31s

 + *
 + * Copyright (C) 2014 Maxime Ripard
 + *
 + * Maxime Ripard maxime.rip...@free-electrons.com

And I guess your copyright would be more appropriate here.

 + *
 + * This file is licensed under the terms of the GNU General Public
 + * License version 2.  This program is licensed as is without any
 + * warranty of any kind, whether express or implied.
 + */
 +
 +#include linux/module.h
 +#include linux/platform_device.h
 +#include linux/of.h
 +#include linux/of_device.h
 +#include linux/pinctrl/pinctrl.h
 +
 +#include pinctrl-sunxi.h
 +
 +static const struct sunxi_desc_pin sun6i_a31s_pins[] = {
 + SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 0),
 +   SUNXI_FUNCTION(0x0, gpio_in),
 +   SUNXI_FUNCTION(0x1, gpio_out),
 +   SUNXI_FUNCTION(0x2, gmac),  /* TXD0 */
 +   SUNXI_FUNCTION(0x4, uart1), /* DTR */
 +   SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 0)),  /* PA_EINT0 */
 + SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 1),
 +   SUNXI_FUNCTION(0x0, gpio_in),
 +   SUNXI_FUNCTION(0x1, gpio_out),
 +   SUNXI_FUNCTION(0x2, gmac),  /* TXD1 */
 +   SUNXI_FUNCTION(0x4, uart1), /* DSR */
 +   SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 1)),  /* PA_EINT1 */
 + SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 2),
 +   SUNXI_FUNCTION(0x0, gpio_in),
 +   SUNXI_FUNCTION(0x1, gpio_out),
 +   SUNXI_FUNCTION(0x2, gmac),  /* TXD2 */
 +   SUNXI_FUNCTION(0x4, uart1), /* DCD */
 +   SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 2)),  /* PA_EINT2 */
 + SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 3),
 +   SUNXI_FUNCTION(0x0, gpio_in),
 +   SUNXI_FUNCTION(0x1, gpio_out),
 +   SUNXI_FUNCTION(0x2, gmac),  /* TXD3 */
 +   SUNXI_FUNCTION(0x4, uart1), /* RING */
 +   SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 3)),  /* PA_EINT3 */
 + SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 4),
 +

[linux-sunxi] Re: [PATCH 4/5] ARM: dts: sun6i: Add sun6i-a31s.dtsi

2014-11-25 Thread Maxime Ripard
Hi,

On Sun, Nov 23, 2014 at 01:54:42PM +0100, Hans de Goede wrote:
 Add a dtsi file for A31s based boards. This is a copy of sun6i-a31.dtsi, with:
 
 -The main pinctrl compatible changed to allwinner,sun6i-a31s.dtsi
 -The ohci2 controller is present according to the data-sheet, but not routed
  to the outside, so remove it from the dtsi as having an always disabled node
  is not useful.
 
 All the other nodes present in the original sun6i-a31.dtsi are present in
 the A31s too, and are 100% compatible.

Then maybe duplicating the DT isn't worth it then.

Creating a sun6i.dtsi and including that from both the A31 and A31s
seems more like an appropriate solution.

 
 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
  arch/arm/boot/dts/sun6i-a31s.dtsi | 925 
 ++
  1 file changed, 925 insertions(+)
  create mode 100644 arch/arm/boot/dts/sun6i-a31s.dtsi
 
 diff --git a/arch/arm/boot/dts/sun6i-a31s.dtsi 
 b/arch/arm/boot/dts/sun6i-a31s.dtsi
 new file mode 100644
 index 000..b3b99a9
 --- /dev/null
 +++ b/arch/arm/boot/dts/sun6i-a31s.dtsi
 @@ -0,0 +1,925 @@
 +/*
 + * Copyright 2013 Maxime Ripard
 + *
 + * Maxime Ripard maxime.rip...@free-electrons.com

It should be your copyright here.

 + *
 + * 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 library 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 library 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.
 + *
 + * You should have received a copy of the GNU General Public
 + * License along with this library; if not, write to the Free
 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
 + * MA 02110-1301 USA

There was an issue with the wording of the license, s/library/file/

 + *
 + * 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/ skeleton.dtsi
 +
 +/ {
 + interrupt-parent = gic;
 +
 + aliases {
 + serial0 = uart0;
 + serial1 = uart1;
 + serial2 = uart2;
 + serial3 = uart3;
 + serial4 = uart4;
 + serial5 = uart5;
 + ethernet0 = gmac;
 + };
 +
 + chosen {
 + #address-cells = 1;
 + #size-cells = 1;
 + ranges;
 +
 + framebuffer@0 {
 + compatible = allwinner,simple-framebuffer, 
 simple-framebuffer;
 + allwinner,pipeline = de_be0-lcd0-hdmi;
 + clocks = pll6;

pll6 uses an argument now

 + status = disabled;
 + };
 + };
 +
 + cpus {
 + enable-method = allwinner,sun6i-a31;

allwinner,sun6i-a31s I guess?

 + #address-cells = 1;
 + #size-cells = 0;
 +
 + cpu@0 {
 + compatible = arm,cortex-a7;
 + device_type = cpu;
 + reg = 0;
 + };
 +
 + cpu@1 {
 + compatible = arm,cortex-a7;
 + device_type = cpu;
 + reg = 1;
 + };
 +
 + cpu@2 {
 + compatible = arm,cortex-a7;
 + device_type = cpu;
 + reg = 2;
 + };
 +
 

[linux-sunxi] Re: [PATCH 3/5] ARM: sunxi: Add allwinner,sun6i-a31s to mach-sunxi

2014-11-25 Thread Maxime Ripard
On Sun, Nov 23, 2014 at 01:54:41PM +0100, Hans de Goede wrote:
 So fat the A31s is 100% compatible with the A31, still lets do the same
 as what we've done for the A13 / A10s and give it its own compatible string,
 in case need to differentiate later.
 
 Signed-off-by: Hans de Goede hdego...@redhat.com

Thanks a lot for this. It's been a long awaited addition.

I don't have any comment on this patch, except that you should also
update Documentation/arm/sunxi/README to reflect this newly supported
SoC.

That can go through another patch though.

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: Digital signature


[linux-sunxi] Re: [PATCH 5/5] ARM: dts: sun6i: Add dts file for CSQ CS908 board

2014-11-25 Thread Maxime Ripard
On Sun, Nov 23, 2014 at 01:54:43PM +0100, Hans de Goede wrote:
 The CSQ CS908 is an A31s based top-set box, with 1G RAM, 8G NAND,
 rtl8188etv usb wifi, 2 USB A receptacles (1 connected through the OTG
 controller), ethernet, 3.5 mm jack with a/v out and hdmi out:
 
 http://www.geekbuying.com/item/CS908-Allwinner-A31S-Quad-Core-1-2GHz-Android-4-4-Mini-TV-Box-HDMI-HDD-Player-1G-8G-WIFI-Miracast---Black-95.html
 
 Note it has no sdcard slot and therefore can only be fel booted.

Thanks a lot for working on this!

I also bought another board with an A31s, but it ended up having
neither USB OTG or MMC, which rendered it pretty useless.

I wonder wether to put URL in the commit log is the right thing
though. It's most likely to be dead in a very near future. The cover
letter would be a better fit for that.

 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
  arch/arm/boot/dts/Makefile |   3 +-
  arch/arm/boot/dts/sun6i-a31s-cs908.dts | 109 
 +
  2 files changed, 111 insertions(+), 1 deletion(-)
  create mode 100644 arch/arm/boot/dts/sun6i-a31s-cs908.dts
 
 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
 index 8ebfa76..0c0201c 100644
 --- a/arch/arm/boot/dts/Makefile
 +++ b/arch/arm/boot/dts/Makefile
 @@ -434,7 +434,8 @@ dtb-$(CONFIG_MACH_SUN6I) += \
   sun6i-a31-app4-evb1.dtb \
   sun6i-a31-colombus.dtb \
   sun6i-a31-hummingbird.dtb \
 - sun6i-a31-m9.dtb
 + sun6i-a31-m9.dtb \
 + sun6i-a31s-cs908.dtb
  dtb-$(CONFIG_MACH_SUN7I) += \
   sun7i-a20-bananapi.dtb \
   sun7i-a20-cubieboard2.dtb \
 diff --git a/arch/arm/boot/dts/sun6i-a31s-cs908.dts 
 b/arch/arm/boot/dts/sun6i-a31s-cs908.dts
 new file mode 100644
 index 000..48d3a70
 --- /dev/null
 +++ b/arch/arm/boot/dts/sun6i-a31s-cs908.dts
 @@ -0,0 +1,109 @@
 +/*
 + * Copyright 2014 Hans de Goede hdego...@redhat.com
 + *
 + * 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 library 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 library 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.
 + *
 + * You should have received a copy of the GNU General Public
 + * License along with this library; if not, write to the Free
 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
 + * MA 02110-1301 USA

s/library/file/

 + *
 + * 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.
 + */
 +
 +/dts-v1/;
 +/include/ sun6i-a31s.dtsi
 +
 +/ {
 + model = CSQ CS908 top set box;

Shouldn't it be Set Top Box instead?

 + compatible = csq,cs908, allwinner,sun6i-a31s;
 +
 + chosen {
 + bootargs = earlyprintk console=ttyS0,115200;
 + };
 +
 + soc@01c0 {
 + usbphy: phy@01c19400 {
 + status = okay;
 + };
 +
 + ehci0: usb@01c1a000 {
 + status = okay;
 + };
 +
 + ehci1: usb@01c1b000 {
 + status = okay;
 + };
 +
 + ohci1: usb@01c1b400 {
 + status = okay;
 + };
 +
 + pio: pinctrl@01c20800 {
 + usb1_vbus_pin_csq908: usb1_vbus_pin@0 {
 + allwinner,pins = 

[linux-sunxi] Re: [PATCH 1/5] pinctrl: sun6i: Add some missing functions, fix i2c3 muxing

2014-11-25 Thread Maxime Ripard
Hi,

On Sun, Nov 23, 2014 at 01:54:39PM +0100, Hans de Goede wrote:
 While working on pinctrl for the A31s, I noticed that function 4 of
 PA15 - PA18 was missing, add these.
 
 I also noticed that i2c3 sck / sda got assigned to PB5  PB6, this should
 be PB4  PB5, fix this as well.
 
 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
  drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c | 9 +++--
  1 file changed, 7 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c 
 b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
 index a2b4b85..fb19e15 100644
 --- a/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
 +++ b/drivers/pinctrl/sunxi/pinctrl-sun6i-a31.c
 @@ -134,24 +134,28 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = {
 SUNXI_FUNCTION(0x1, gpio_out),
 SUNXI_FUNCTION(0x2, gmac),  /* RXD4 */
 SUNXI_FUNCTION(0x3, lcd1),  /* D15 */
 +   SUNXI_FUNCTION(0x4, clk_a_out),

It's called clk_out_a on the A20, I'd rather stick with the same
scheme here.

 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PA_EINT15 */
   SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 16),
 SUNXI_FUNCTION(0x0, gpio_in),
 SUNXI_FUNCTION(0x1, gpio_out),
 SUNXI_FUNCTION(0x2, gmac),  /* RXD5 */
 SUNXI_FUNCTION(0x3, lcd1),  /* D16 */
 +   SUNXI_FUNCTION(0x4, dmic),  /* CLK */
 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 16)), /* PA_EINT16 */
   SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 17),
 SUNXI_FUNCTION(0x0, gpio_in),
 SUNXI_FUNCTION(0x1, gpio_out),
 SUNXI_FUNCTION(0x2, gmac),  /* RXD6 */
 SUNXI_FUNCTION(0x3, lcd1),  /* D17 */
 +   SUNXI_FUNCTION(0x4, dmic),  /* DIN */
 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 17)), /* PA_EINT17 */
   SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 18),
 SUNXI_FUNCTION(0x0, gpio_in),
 SUNXI_FUNCTION(0x1, gpio_out),
 SUNXI_FUNCTION(0x2, gmac),  /* RXD7 */
 SUNXI_FUNCTION(0x3, lcd1),  /* D18 */
 +   SUNXI_FUNCTION(0x4, clk_b_out),
 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 18)), /* PA_EINT18 */
   SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 19),
 SUNXI_FUNCTION(0x0, gpio_in),
 @@ -207,6 +211,7 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = {
 SUNXI_FUNCTION(0x1, gpio_out),
 SUNXI_FUNCTION(0x2, gmac),  /* MDC */
 SUNXI_FUNCTION(0x3, lcd1),  /* HSYNC */
 +   SUNXI_FUNCTION(0x4, clk_c_out),
 SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 26)), /* PA_EINT26 */
   SUNXI_PIN(SUNXI_PINCTRL_PIN(A, 27),
 SUNXI_FUNCTION(0x0, gpio_in),
 @@ -242,20 +247,20 @@ static const struct sunxi_desc_pin sun6i_a31_pins[] = {
 SUNXI_FUNCTION(0x1, gpio_out),
 SUNXI_FUNCTION(0x2, i2s0),  /* DO1 */
 SUNXI_FUNCTION(0x3, uart3), /* RTS */
 +   SUNXI_FUNCTION(0x4, i2c3),  /* SCK */
 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 4)),  /* PB_EINT4 */
   SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 5),
 SUNXI_FUNCTION(0x0, gpio_in),
 SUNXI_FUNCTION(0x1, gpio_out),
 SUNXI_FUNCTION(0x2, i2s0),  /* DO2 */
 SUNXI_FUNCTION(0x3, uart3), /* TX */
 -   SUNXI_FUNCTION(0x4, i2c3),  /* SCK */
 +   SUNXI_FUNCTION(0x4, i2c3),  /* SDA */
 SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 5)),  /* PB_EINT5 */
   SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 6),
 SUNXI_FUNCTION(0x0, gpio_in),
 SUNXI_FUNCTION(0x1, gpio_out),
 SUNXI_FUNCTION(0x2, i2s0),  /* DO3 */
 SUNXI_FUNCTION(0x3, uart3), /* RX */
 -   SUNXI_FUNCTION(0x4, i2c3),  /* SDA */

Where did you get that info from? The datasheet still reports that
information.

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: Digital signature


Re: [linux-sunxi] Re: Kurio 7S and boot linux (Debian...) sdcard... how??

2014-11-25 Thread Piotr Kopeć


How to create a u-boot for nand??

-- 
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 4/5] ARM: dts: sun6i: Add sun6i-a31s.dtsi

2014-11-25 Thread Chen-Yu Tsai
On Wed, Nov 26, 2014 at 2:18 AM, Maxime Ripard
maxime.rip...@free-electrons.com wrote:
 Hi,

 On Sun, Nov 23, 2014 at 01:54:42PM +0100, Hans de Goede wrote:
 Add a dtsi file for A31s based boards. This is a copy of sun6i-a31.dtsi, 
 with:

 -The main pinctrl compatible changed to allwinner,sun6i-a31s.dtsi
 -The ohci2 controller is present according to the data-sheet, but not routed
  to the outside, so remove it from the dtsi as having an always disabled node
  is not useful.

 All the other nodes present in the original sun6i-a31.dtsi are present in
 the A31s too, and are 100% compatible.

 Then maybe duplicating the DT isn't worth it then.

 Creating a sun6i.dtsi and including that from both the A31 and A31s
 seems more like an appropriate solution.


 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
  arch/arm/boot/dts/sun6i-a31s.dtsi | 925 
 ++
  1 file changed, 925 insertions(+)
  create mode 100644 arch/arm/boot/dts/sun6i-a31s.dtsi

 diff --git a/arch/arm/boot/dts/sun6i-a31s.dtsi 
 b/arch/arm/boot/dts/sun6i-a31s.dtsi
 new file mode 100644
 index 000..b3b99a9
 --- /dev/null
 +++ b/arch/arm/boot/dts/sun6i-a31s.dtsi
 @@ -0,0 +1,925 @@
 +/*
 + * Copyright 2013 Maxime Ripard
 + *
 + * Maxime Ripard maxime.rip...@free-electrons.com

 It should be your copyright here.

 + *
 + * 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 library 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 library 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.
 + *
 + * You should have received a copy of the GNU General Public
 + * License along with this library; if not, write to the Free
 + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
 + * MA 02110-1301 USA

 There was an issue with the wording of the license, s/library/file/

 + *
 + * 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/ skeleton.dtsi
 +
 +/ {
 + interrupt-parent = gic;
 +
 + aliases {
 + serial0 = uart0;
 + serial1 = uart1;
 + serial2 = uart2;
 + serial3 = uart3;
 + serial4 = uart4;
 + serial5 = uart5;
 + ethernet0 = gmac;
 + };
 +
 + chosen {
 + #address-cells = 1;
 + #size-cells = 1;
 + ranges;
 +
 + framebuffer@0 {
 + compatible = allwinner,simple-framebuffer, 
 simple-framebuffer;
 + allwinner,pipeline = de_be0-lcd0-hdmi;
 + clocks = pll6;

 pll6 uses an argument now

 + status = disabled;
 + };
 + };
 +
 + cpus {
 + enable-method = allwinner,sun6i-a31;

 allwinner,sun6i-a31s I guess?

 + #address-cells = 1;
 + #size-cells = 0;
 +
 + cpu@0 {
 + compatible = arm,cortex-a7;
 + device_type = cpu;
 + reg = 0;
 + };
 +
 + cpu@1 {
 + compatible = arm,cortex-a7;
 + device_type = cpu;
 + reg = 1;
 + };
 +
 + cpu@2 {
 + compatible = arm,cortex-a7;
 + 

Re: Re: [linux-sunxi] Allwinner documentation (hardware datasheet, user manual) for A10, A10s, A13, A20, A31, A31s

2014-11-25 Thread Jhon Yi
Good.

2014-11-25 10:06 GMT+08:00 javqui wavetofind...@gmail.com:
 Thanks Kevin. Feeling more comfortable with AllWinner SoC, particularly the
 A80.
 2015 will be an excellent year for Allwinner, I will include AW on my
 products and Engineer recommendations.
 Javqui

 On Monday, November 24, 2014 1:13:22 AM UTC-5, RFat wrote:

 Alright, the manual of the A80 is OUT!

 (https://github.com/allwinner-zh/documents)

 Thanks a lot Kevin!


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

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