Re: [linux-sunxi] [PATCH 3.4] Revert usb:sunxi:Fix device not recognized problem during android boot (3.4)

2014-02-10 Thread Michal Suchanek
On 9 February 2014 22:07, Jari Helaakoski tekk...@gmail.com wrote:



 2014-02-09 Michal Suchanek hramr...@gmail.com:

 ping?

 On 27 January 2014 21:10, Michal Suchanek hramr...@gmail.com wrote:
  From c35e54a6500e3b99fa90544d123df306d11f Mon Sep 17 00:00:00 2001
 
  This reverts commit 44a6e1bfed98cd636b55a1191426ce2c373e15b2.
 
  Before this commit USB gadgets work if you boot with cable connected.
 
  eg. download kernel over FEL, mount NFS root over g_ether.
 
  After this commit gadgets only come up if cable is unplugged.
 
  eg. boot, load g_ether (nothing) unplug and replug cable - USB gadget is
  seen by the host on the other end of the cable. Only tested the FEL boot
  because I have no kernel installed on device.


 Without 44a6e1bfed98cd636b55a1191426ce2c373e15b2 you have to reconnect cable
 to get adb working. Revert causes regression on android side.

 Patch was originally cherry-picked from 3.0 side. If I remember correctly
 every gadget worked ok with 3.0.. Haven't checked this on 3.4 side in long
 time. Things might have been changed, so I think someone has to check this
 with android too.


Is there even an android tree that builds with 3.4?

I built android long ago and I can't tell if it had this patch or not
but I had no problems with adb. I had problems running anything other
than the boot animation, however. If there is no working android tree
for 3.4 kernel there is no point having android stuff in our kernel
tree.

Thanks

Michal

-- 
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/groups/opt_out.


[linux-sunxi] Re: Unable to play 720p video in Ubuntu

2014-02-10 Thread Puneet B
 http://linux-sunxi.org/Cedrus

Is this link will allow to play the hd video from Gui.

or this will also work in only command prompt.

Regards
Punith

-- 
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/groups/opt_out.


[linux-sunxi] [PATCH v4 4/8] ARM: dts: sun7i: Add pin muxing options for the GMAC

2014-02-10 Thread Chen-Yu Tsai
The A20 has EMAC and GMAC muxed on the same pins.
Add pin sets with gmac function for MII and RGMII mode to the DTSI.

Signed-off-by: Chen-Yu Tsai w...@csie.org
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 26 ++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 8eb4d54..68c889c 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -484,6 +484,32 @@
allwinner,drive = 0;
allwinner,pull = 0;
};
+
+   gmac_pins_mii_a: gmac_mii@0 {
+   allwinner,pins = PA0, PA1, PA2,
+   PA3, PA4, PA5, PA6,
+   PA7, PA8, PA9, PA10,
+   PA11, PA12, PA13, PA14,
+   PA15, PA16;
+   allwinner,function = gmac;
+   allwinner,drive = 0;
+   allwinner,pull = 0;
+   };
+
+   gmac_pins_rgmii_a: gmac_rgmii@0 {
+   allwinner,pins = PA0, PA1, PA2,
+   PA3, PA4, PA5, PA6,
+   PA7, PA8, PA10,
+   PA11, PA12, PA13,
+   PA15, PA16;
+   allwinner,function = gmac;
+   /*
+* data lines in RGMII mode use DDR mode
+* and need a higher signal drive strength
+*/
+   allwinner,drive = 3;
+   allwinner,pull = 0;
+   };
};
 
timer@01c20c00 {
-- 
1.9.rc1

-- 
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/groups/opt_out.


[linux-sunxi] [PATCH v4 8/8] ARM: dts: sun7i: Add ethernet alias for GMAC

2014-02-10 Thread Chen-Yu Tsai
All Allwinner A20 boards we support can only use either EMAC or GMAC,
as they share the same pins. As we have switched all supported to
GMAC, we should alias GMAC (the active controller) as ethernet0,
so u-boot will insert the MAC address for the correct controller.

Signed-off-by: Chen-Yu Tsai w...@csie.org
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 68c889c..1b5fb88 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -17,7 +17,7 @@
interrupt-parent = gic;
 
aliases {
-   ethernet0 = emac;
+   ethernet0 = gmac;
serial0 = uart0;
serial1 = uart1;
serial2 = uart2;
-- 
1.9.rc1

-- 
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/groups/opt_out.


[linux-sunxi] [PATCH v4 5/8] ARM: dts: sun7i: cubietruck: Enable the GMAC

2014-02-10 Thread Chen-Yu Tsai
The CubieTruck uses the GMAC with an RGMII phy.

Signed-off-by: Chen-Yu Tsai w...@csie.org
---
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 12 
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts 
b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index f9dcb61..025ce52 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -51,6 +51,18 @@
pinctrl-0 = i2c2_pins_a;
status = okay;
};
+
+   gmac: ethernet@01c5 {
+   pinctrl-names = default;
+   pinctrl-0 = gmac_pins_rgmii_a;
+   phy = phy1;
+   phy-mode = rgmii;
+   status = okay;
+
+   phy1: ethernet-phy@1 {
+   reg = 1;
+   };
+   };
};
 
leds {
-- 
1.9.rc1

-- 
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/groups/opt_out.


[linux-sunxi] [PATCH v4 6/8] ARM: dts: sun7i: cubieboard2: Enable GMAC instead of EMAC

2014-02-10 Thread Chen-Yu Tsai
GMAC has better performance and fewer hardware issues.
Use the GMAC in MII mode for ethernet instead of the EMAC.

Signed-off-by: Chen-Yu Tsai w...@csie.org
---
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 27 ---
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts 
b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
index 5c51cb8..7bf4935 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
@@ -19,21 +19,6 @@
compatible = cubietech,cubieboard2, allwinner,sun7i-a20;
 
soc@01c0 {
-   emac: ethernet@01c0b000 {
-   pinctrl-names = default;
-   pinctrl-0 = emac_pins_a;
-   phy = phy1;
-   status = okay;
-   };
-
-   mdio@01c0b080 {
-   status = okay;
-
-   phy1: ethernet-phy@1 {
-   reg = 1;
-   };
-   };
-
pinctrl@01c20800 {
led_pins_cubieboard2: led_pins@0 {
allwinner,pins = PH20, PH21;
@@ -60,6 +45,18 @@
pinctrl-0 = i2c1_pins_a;
status = okay;
};
+
+   gmac: ethernet@01c5 {
+   pinctrl-names = default;
+   pinctrl-0 = gmac_pins_mii_a;
+   phy = phy1;
+   phy-mode = mii;
+   status = okay;
+
+   phy1: ethernet-phy@1 {
+   reg = 1;
+   };
+   };
};
 
leds {
-- 
1.9.rc1

-- 
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/groups/opt_out.


[linux-sunxi] [PATCH v4 7/8] ARM: dts: sun7i: a20-olinuxino-micro: Enable GMAC instead of EMAC

2014-02-10 Thread Chen-Yu Tsai
GMAC has better performance and fewer hardware issues.
Use the GMAC in MII mode for ethernet instead of the EMAC.

Signed-off-by: Chen-Yu Tsai w...@csie.org
---
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts | 27 +++--
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts 
b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
index ead3013..b02a796 100644
--- a/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
+++ b/arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts
@@ -19,21 +19,6 @@
compatible = olimex,a20-olinuxino-micro, allwinner,sun7i-a20;
 
soc@01c0 {
-   emac: ethernet@01c0b000 {
-   pinctrl-names = default;
-   pinctrl-0 = emac_pins_a;
-   phy = phy1;
-   status = okay;
-   };
-
-   mdio@01c0b080 {
-   status = okay;
-
-   phy1: ethernet-phy@1 {
-   reg = 1;
-   };
-   };
-
pinctrl@01c20800 {
led_pins_olinuxino: led_pins@0 {
allwinner,pins = PH2;
@@ -78,6 +63,18 @@
pinctrl-0 = i2c2_pins_a;
status = okay;
};
+
+   gmac: ethernet@01c5 {
+   pinctrl-names = default;
+   pinctrl-0 = gmac_pins_mii_a;
+   phy = phy1;
+   phy-mode = mii;
+   status = okay;
+
+   phy1: ethernet-phy@1 {
+   reg = 1;
+   };
+   };
};
 
leds {
-- 
1.9.rc1

-- 
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/groups/opt_out.


[linux-sunxi] [PATCH v4 3/8] ARM: dts: sun7i: Add GMAC controller node to sun7i DTSI

2014-02-10 Thread Chen-Yu Tsai
Signed-off-by: Chen-Yu Tsai w...@csie.org
---
 arch/arm/boot/dts/sun7i-a20.dtsi | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index dd567ea..8eb4d54 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -645,6 +645,21 @@
status = disabled;
};
 
+   gmac: ethernet@01c5 {
+   compatible = allwinner,sun7i-a20-gmac;
+   reg = 0x01c5 0x1;
+   interrupts = 0 85 4;
+   interrupt-names = macirq;
+   clocks = ahb_gates 49, gmac_tx_clk;
+   clock-names = stmmaceth, allwinner_gmac_tx;
+   snps,pbl = 2;
+   snps,fixed-burst;
+   snps,force_sf_dma_mode;
+   status = disabled;
+   #address-cells = 1;
+   #size-cells = 0;
+   };
+
hstimer@01c6 {
compatible = allwinner,sun7i-a20-hstimer;
reg = 0x01c6 0x1000;
-- 
1.9.rc1

-- 
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/groups/opt_out.


[linux-sunxi] [PATCH v4 0/8] Add Allwinner A20 GMAC ethernet support

2014-02-10 Thread Chen-Yu Tsai
Hi,

This is the v4 of the remaining Allwinner A20 GMAC glue layer patches.
The stmmac driver changes have been merged through net-next. The
remaining bits are clock and DT patches. The patches should be applied
over my clock renaming patches.

The Allwinner A20 SoC integrates an early version of dwmac
IP from Synopsys. On top of that is a hardware glue layer.
This layer needs to be configured before the dwmac can be
used.

Part of the glue layer is a clock mux, which controls the
source and direction of the TX clock used by GMAC.

Changes since v3:

  * Rework error checking in GMAC clock driver
  * Clarify required parent clock order for GMAC clock in DT bindings
  * Rewrite commit log for ARM: dts: sun7i: Add ethernet alias for GMAC
  * Corrected a20-olinuxino-micro in commit message
  * Rewrite comments in sun7i dtsi to clarify purpose of dummy clocks
  * Rebase onto Maxime's sunxi-next branch

Changes since v2:

  * Added more comments on GMAC clock driver
  * Drop CLK_SET_PARENT_GATE in GMAC clock driver
  * Use macro for max clock parents
  * Line wrapping

Changes since v1:

  * Added optional reset control to stmmac driver core
  * Added non CONFIG_RESET_CONROLLER routines for the above change
  * Extended callback API, as discussed with Srinivas
  * Used new stmmac_of_data to pass features and callbacks,
instead of platform data, as discussed
  * Seperated clock module glue layer into clock driver

Cheers,
ChenYu


Chen-Yu Tsai (8):
  clk: sunxi: Add Allwinner A20/A31 GMAC clock unit
  ARM: dts: sun7i: Add GMAC clock node to sun7i DTSI
  ARM: dts: sun7i: Add GMAC controller node to sun7i DTSI
  ARM: dts: sun7i: Add pin muxing options for the GMAC
  ARM: dts: sun7i: cubietruck: Enable the GMAC
  ARM: dts: sun7i: cubieboard2: Enable GMAC instead of EMAC
  ARM: dts: sun7i: a20-olinuxino-micro: Enable GMAC instead of EMAC
  ARM: dts: sun7i: Add ethernet alias for GMAC

 Documentation/devicetree/bindings/clock/sunxi.txt | 30 +++
 arch/arm/boot/dts/sun7i-a20-cubieboard2.dts   | 27 +++
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts| 12 +++
 arch/arm/boot/dts/sun7i-a20-olinuxino-micro.dts   | 27 +++
 arch/arm/boot/dts/sun7i-a20.dtsi  | 71 -
 drivers/clk/sunxi/clk-sunxi.c | 97 +++
 6 files changed, 233 insertions(+), 31 deletions(-)

-- 
1.9.rc1

-- 
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/groups/opt_out.


[linux-sunxi] [PATCH v4 1/8] clk: sunxi: Add Allwinner A20/A31 GMAC clock unit

2014-02-10 Thread Chen-Yu Tsai
The Allwinner A20/A31 clock module controls the transmit clock source
and interface type of the GMAC ethernet controller. Model this as
a single clock for GMAC drivers to use.

Signed-off-by: Chen-Yu Tsai w...@csie.org
---
 Documentation/devicetree/bindings/clock/sunxi.txt | 30 +++
 drivers/clk/sunxi/clk-sunxi.c | 97 +++
 2 files changed, 127 insertions(+)

diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt 
b/Documentation/devicetree/bindings/clock/sunxi.txt
index 0cf679b..28421d2 100644
--- a/Documentation/devicetree/bindings/clock/sunxi.txt
+++ b/Documentation/devicetree/bindings/clock/sunxi.txt
@@ -37,6 +37,7 @@ Required properties:
allwinner,sun6i-a31-apb2-gates-clk - for the APB2 gates on A31
allwinner,sun4i-mod0-clk - for the module 0 family of clocks
allwinner,sun7i-a20-out-clk - for the external output clocks
+   allwinner,sun7i-a20-gmac-clk - for the GMAC clock module on A20/A31
 
 Required properties for all clocks:
 - reg : shall be the control register address for the clock.
@@ -50,6 +51,9 @@ Required properties for all clocks:
If the clock module only has one output, the name shall be the
module name.
 
+For allwinner,sun7i-a20-gmac-clk, the parent clocks shall be fixed rate
+dummy clocks at 25 MHz and 125 MHz, respectively. See example.
+
 Clock consumers should specify the desired clocks they use with a
 clocks phandle cell. Consumers that are using a gated clock should
 provide an additional ID in their clock property. This ID is the
@@ -96,3 +100,29 @@ mmc0_clk: clk@01c20088 {
clocks = osc24M, pll6 1, pll5 1;
clock-output-names = mmc0;
 };
+
+mii_phy_tx_clk: clk@2 {
+   #clock-cells = 0;
+   compatible = fixed-clock;
+   clock-frequency = 2500;
+   clock-output-names = mii_phy_tx;
+};
+
+gmac_int_tx_clk: clk@3 {
+   #clock-cells = 0;
+   compatible = fixed-clock;
+   clock-frequency = 12500;
+   clock-output-names = gmac_int_tx;
+};
+
+gmac_clk: clk@01c20164 {
+   #clock-cells = 0;
+   compatible = allwinner,sun7i-a20-gmac-clk;
+   reg = 0x01c20164 0x4;
+   /*
+* The first clock must be fixed at 25MHz;
+* the second clock must be fixed at 125MHz
+*/
+   clocks = mii_phy_tx_clk, gmac_int_tx_clk;
+   clock-output-names = gmac;
+};
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index 736fb60..da1d5cc 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -379,6 +379,103 @@ static void sun7i_a20_get_out_factors(u32 *freq, u32 
parent_rate,
 
 
 /**
+ * sun7i_a20_gmac_clk_setup - Setup function for A20/A31 GMAC clock module
+ *
+ * This clock looks something like this
+ *   
+ *  MII TX clock from PHY -|____| to GMAC core
+ *  GMAC Int. RGMII TX clk |___\__/__gate---| to PHY
+ *  Ext. 125MHz RGMII TX clk --|__divider__/|
+ *  ||
+ *
+ * The external 125 MHz reference is optional, i.e. GMAC can use its
+ * internal TX clock just fine. The A31 GMAC clock module does not have
+ * the divider controls for the external reference.
+ *
+ * To keep it simple, let the GMAC use either the MII TX clock for MII mode,
+ * and its internal TX clock for GMII and RGMII modes. The GMAC driver should
+ * select the appropriate source and gate/ungate the output to the PHY.
+ *
+ * Only the GMAC should use this clock. Altering the clock so that it doesn't
+ * match the GMAC's operation parameters will result in the GMAC not being
+ * able to send traffic out. The GMAC driver should set the clock rate and
+ * enable/disable this clock to configure the required state. The clock
+ * driver then responds by auto-reparenting the clock.
+ */
+
+#define SUN7I_A20_GMAC_GPIT2
+#define SUN7I_A20_GMAC_MASK0x3
+#define SUN7I_A20_GMAC_PARENTS 2
+
+static void __init sun7i_a20_gmac_clk_setup(struct device_node *node)
+{
+   struct clk *clk;
+   struct clk_mux *mux;
+   struct clk_gate *gate;
+   const char *clk_name = node-name;
+   const char *parents[SUN7I_A20_GMAC_PARENTS];
+   void *reg;
+   int i = 0;
+
+   if (of_property_read_string(node, clock-output-names, clk_name))
+   return;
+
+   /* allocate mux and gate clock structs */
+   mux = kzalloc(sizeof(struct clk_mux), GFP_KERNEL);
+   if (!mux)
+   return;
+
+   gate = kzalloc(sizeof(struct clk_gate), GFP_KERNEL);
+   if (!gate)
+   goto free_mux;
+
+   /* gmac clock requires exactly 2 parents */
+   parents[0] = of_clk_get_parent_name(node, 0);
+   parents[1] = of_clk_get_parent_name(node, 1);
+   if (!parents[0] || !parents[1])
+   goto free_gate;
+
+   reg = of_iomap(node, 0);
+   if (!reg)
+   goto free_gate;
+

Re: [linux-sunxi] [PATCH 0/3] uboot sata support

2014-02-10 Thread Ian Campbell
On Fri, 2014-02-07 at 17:36 +0100, Hans de Goede wrote:
 Hi,
 
 On 02/07/2014 05:14 PM, Ian Campbell wrote:
  This is the result of my afternoons hacking at the urlab hacklab in
  Brussels before FOSDEM, thanks for hosting us guys!
 
  This uses the existing ahci platform support in u-boot. Most of the
  siunxi specific code comes from the Linux platform patches.
 
  I've tested this only on cubietruck.
 
 Hmm, I notice that you unconditionally define CONFIG_SUNXI_AHCI for
 all sunxi boards. This is very wrong for sun5i since there never is
 an AHCI controller there, wrong for sun4i since you've not added
 any sata clock setup for sun4i, and somewhat wrong for sun7i since
 there enabling it only makes sense on boards which have a sata connector.

Damn, I knew there was something else I meant to go back and cleanup. 

 Can you please respin this patch-set and make the enabling of AHCI done
 something through boards.cfg ?

Sure!

Ian.

 With that fixed I think it looks good, and if there are no objections I'll
 happily merge a fixed version into u-boot-sunxi.
 
 Thanks,
 
 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/groups/opt_out.


Re: [linux-sunxi] [PATCH 2/3] ahci: wait longer for link.

2014-02-10 Thread Ian Campbell
On Sun, 2014-02-09 at 13:50 +0100, Oliver Schinagl wrote:
 On 02/07/14 17:15, Ian Campbell wrote:
  -#define WAIT_MS_LINKUP 4
  +#define WAIT_MS_LINKUP 40
 wont this affect every platform?

Yes. I figured that since this was a timeout it was pretty harmless to
increase it, the only downside seems to be that if the AHCI is actually
broken you wait a bit longer before figuring that out.

Although I didn't find a good reference 4ms did seem short compared with
what I think Linux was doing (but it's all a bit async as well as
abstracted into common infra there so I may not be following it
correctly) and what other google'd up bits and bobs showed -- they seems
to be more in the 100-150ms range.

  I don't know what u-boot's rules are 
 with regards to that, as it will come as 'a' patch in a big series when 
 we upstream it ...

I was a bit torn over what to do with this and the first patch (Provide
a weak scsi_init hook) since they are both essentially upstream fodder
already _except_ that they wouldn't be being presented at the same time
as a consumer of the change.

I have a feeling that for upstreaming these sorts of changes might need
to be cherry-picked into their own changeset, the massive patch approach
doesn't seem likely to succeed even if it only touches sunxi code, but
including random changes to the common code in that patch is sure to
fail IMHO. I was looking at the mainline vs sunxi diff and there are a
few other similar changes which would need pulling out too.

 oliver
 
 P.S. Awesome job :D and was nice to meet you! even though it was very 
 briefly.

Likewise!

 
static inline u32 ahci_port_base(u32 base, u32 port)
{
 
 


-- 
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/groups/opt_out.


[linux-sunxi] Re: [PATCH v4 4/7] ARM: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs

2014-02-10 Thread David Lanzendörfer
Hi
  +(cmd-opcode == 5 || cmd-opcode == 52))
 Aren't these the ones defined in linux/mmc/sdio.h:
 5  - SD_IO_SEND_OP_COND
 52 - SD_IO_RW_DIRECT
Yes. They are...
Changed that.
Also I removed the camel cases and the defines within the struct definition.

  +struct sunxi_mmc_clk_dly {
  +u32 mode;
  +u32 oclk_dly;
  +u32 sclk_dly;
 Do these members have to be u32? They all seem to be smaller than 10.
Yes. Because of situations where it gets used in bit operations, and shorter
types mess things up and prevent the driver from working ;-)

cheer
david

signature.asc
Description: This is a digitally signed message part.


[linux-sunxi] Re: Unable to play 720p video in Ubuntu

2014-02-10 Thread Puneet B
Hi 

I am not able to play hd videos smoothly from this link.

http://linux-sunxi.org/Cedrus

Here is my Procedure what i have done:
1setenv sunxi_ve_mem_reserve '128'
2git clone https://github.com/linux-sunxi/libvdpau-sunxi
3cd libvdpau-sunxi
4make
5make install
Then i have 
libvdpau_sunxi.so.1  
libvdpau_trace.so.1 
libvdpau_trace.so.1.0.0
libraries under /usr/lib/vdpau directory
4then i login as user in gnome-terminal and export fallowing path.
export VDPAU_DRIVER=sunxi
5sudo chmod -R 777 /dev/disp /dev/cedar_Dev
6apt-get install mplayer2.
6mplayer -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau, /media/9513-1851/aa.mp4

But once i play video , it is not playing smoothly.
Here is my video log:

MPlayer2 UNKNOWN (C) 2000-2011 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote 
control.

Playing /media/95E5-18AE/aga_naga.mp4.
Detected file format: QuickTime/MPEG-4/Motion JPEG 2000 format (libavformat)
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang eng
VIDEO:  [H264]  1264x536  24bpp  23.976 fps  3674.8 kbps (448.6 kbyte/s)
Clip info:
 major_brand: mp42
 minor_version: 0
 compatible_brands: mp42ndhdavc1isom
 creation_time: 2011-07-28 17:45:17
Load subtitles in /media/95E5-18AE/
[VDPAU SUNXI] VE version 0x1623 opened.
==
Forced video codec: ffmpeg12vdpau
Forced video codec: ffh264vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))
==
==
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 6 ch, s16le, 447.6 kbit/9.71% (ratio: 55947-576000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==
AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 2.36:1 - prescaling to correct movie aspect.
VO: [vdpau] 1264x536 = 1264x536 H.264 VDPAU acceleration 
[vdpau] Got display refresh rate 50.000 Hz.
[vdpau] If that value looks wrong give the -vo vdpau:fps=X suboption 
manually.
[VDPAU SUNXI] Presentation time not supported  0 ??% ??% ??,?% 0 0 
A:  12.2 V:  12.2 A-V: -0.000 ct: -0.000   0/  0 17%  0%  7.1% 0 0 

Exiting... (Quit)



I tried with smplayer also but has same issue.

Is i am missing anything else.

Kindly suggest me.

Regards
Punith

-- 
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/groups/opt_out.


Re: [linux-sunxi] Re: Unable to play 720p video in Ubuntu

2014-02-10 Thread Olliver Schinagl

Puneet,

On 10-02-14 13:28, Puneet B wrote:

Hi

I am not able to play hd videos smoothly from this link.

http://linux-sunxi.org/Cedrus

Here is my Procedure what i have done:
1setenv sunxi_ve_mem_reserve '128'
2git clone https://github.com/linux-sunxi/libvdpau-sunxi
3cd libvdpau-sunxi
4make
5make install
Then i have
libvdpau_sunxi.so.1
libvdpau_trace.so.1
libvdpau_trace.so.1.0.0
libraries under /usr/lib/vdpau directory
4then i login as user in gnome-terminal and export fallowing path.
export VDPAU_DRIVER=sunxi
5sudo chmod -R 777 /dev/disp /dev/cedar_Dev

ls -laF /dev/disp /dev/cedar*
and double check the permissions!! because _Dev sounds wrong, should be 
_dev.



6apt-get install mplayer2.
6mplayer -vo vdpau -vc ffmpeg12vdpau,ffh264vdpau, /media/9513-1851/aa.mp4

But once i play video , it is not playing smoothly.
Here is my video log:

MPlayer2 UNKNOWN (C) 2000-2011 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote
control.

Playing /media/95E5-18AE/aga_naga.mp4.
Detected file format: QuickTime/MPEG-4/Motion JPEG 2000 format (libavformat)
But puneet, this is not MPEG1, MPEG2 and definitely not h264. Sounds 
like motion jpeg in an mpeg4 container.


Try the big buck buney h264 or sintel h264 demo's.

Olliver

[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang eng
VIDEO:  [H264]  1264x536  24bpp  23.976 fps  3674.8 kbps (448.6 kbyte/s)
Clip info:
  major_brand: mp42
  minor_version: 0
  compatible_brands: mp42ndhdavc1isom
  creation_time: 2011-07-28 17:45:17
Load subtitles in /media/95E5-18AE/
[VDPAU SUNXI] VE version 0x1623 opened.
==
Forced video codec: ffmpeg12vdpau
Forced video codec: ffh264vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))
==
==
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 6 ch, s16le, 447.6 kbit/9.71% (ratio: 55947-576000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==
AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
Movie-Aspect is 2.36:1 - prescaling to correct movie aspect.
VO: [vdpau] 1264x536 = 1264x536 H.264 VDPAU acceleration
[vdpau] Got display refresh rate 50.000 Hz.
[vdpau] If that value looks wrong give the -vo vdpau:fps=X suboption
manually.
[VDPAU SUNXI] Presentation time not supported  0 ??% ??% ??,?% 0 0
A:  12.2 V:  12.2 A-V: -0.000 ct: -0.000   0/  0 17%  0%  7.1% 0 0

Exiting... (Quit)



I tried with smplayer also but has same issue.

Is i am missing anything else.

Kindly suggest me.

Regards
Punith

--
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/groups/opt_out.


--
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/groups/opt_out.


Re: [linux-sunxi] Re: Unable to play 720p video in Ubuntu

2014-02-10 Thread Puneet B
Hi Oliver.

sorry i changed permission to cedar_dev (typo error).


Try the big buck buney h264 or sintel h264 demo's. 

Can you explain this , as i am not getting.

Regards
Punith

-- 
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/groups/opt_out.


Re: [linux-sunxi] Re: Unable to play 720p video in Ubuntu

2014-02-10 Thread Olliver Schinagl

On 10-02-14 14:36, Puneet B wrote:

Hi Oliver.

sorry i changed permission to cedar_dev (typo error).


 Try the big buck buney h264 or sintel h264 demo's.

Can you explain this , as i am not getting.

http://samplemedia.linaro.org/H264/big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4

if that works, your decoder is setup properly.

OTher files not working simply means our driver or the decoder doesn't 
like your file and falls back to software decoding.




Regards
Punith

--
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/groups/opt_out.


--
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/groups/opt_out.


Re: [linux-sunxi] Re: Unable to play 720p video in Ubuntu

2014-02-10 Thread Puneet B
Hi Oliver,

As i played you video also , has the same issue.

Video is not playing smoothly.

Here is log:

MPlayer2 UNKNOWN (C) 2000-2011 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote 
control.

Playing /media/95E5-18AE/big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4
Detected file format: QuickTime/MPEG-4/Motion JPEG 2000 format (libavformat)
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [H264]  1280x720  24bpp  24.000 fps  1748.2 kbps (213.4 kbyte/s)
Clip info:
 major_brand: mp42
 minor_version: 0
 compatible_brands: isommp42
 creation_time: 2014-01-06 15:51:24
Load subtitles in /media/95E5-18AE/
[VDPAU SUNXI] VE version 0x1623 opened.
==
Forced video codec: ffmpeg12vdpau
Forced video codec: ffh264vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))
==
==
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000-176400)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 1280x720 = 1280x720 H.264 VDPAU acceleration 
[vdpau] Got display refresh rate 50.000 Hz.
[vdpau] If that value looks wrong give the -vo vdpau:fps=X suboption 
manually.
[VDPAU SUNXI] Presentation time not supported  0 ??% ??% ??,?% 0 0 
[VDPAU SUNXI] vdp_output_surface_put_bits_indexed called but unimplemented!
[VDPAU SUNXI] vdp_output_surface_render_output_surface called but 
unimplemented!
A:  34.2 V:  34.2 A-V: -0.000 ct:  0.000   0/  0 17%  0%  2.6% 0 0 


Exiting... (End of file)


Regards
Punith

-- 
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/groups/opt_out.


Re: [linux-sunxi] Re: Unable to play 720p video in Ubuntu

2014-02-10 Thread Olliver Schinagl

On 10-02-14 15:27, Puneet B wrote:

Hi Oliver,

As i played you video also , has the same issue.

Video is not playing smoothly.

Here is log:

MPlayer2 UNKNOWN (C) 2000-2011 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote
control.

Playing /media/95E5-18AE/big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4

that looks good

Detected file format: QuickTime/MPEG-4/Motion JPEG 2000 format (libavformat)

that looks wrong

[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [H264]  1280x720  24bpp  24.000 fps  1748.2 kbps (213.4 kbyte/s)
That looks wrong too, 1280x720 is weir, since the video is 1080p. Maybe 
you are still using the wrong file, even though the name seems right? 
Try a different USB stick to make sure your not using the old file.

Clip info:
  major_brand: mp42
  minor_version: 0
  compatible_brands: isommp42
  creation_time: 2014-01-06 15:51:24
Load subtitles in /media/95E5-18AE/
[VDPAU SUNXI] VE version 0x1623 opened.
==
Forced video codec: ffmpeg12vdpau
Forced video codec: ffh264vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))
==
==
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 192.0 kbit/13.61% (ratio: 24000-176400)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 1280x720 = 1280x720 H.264 VDPAU acceleration
[vdpau] Got display refresh rate 50.000 Hz.
[vdpau] If that value looks wrong give the -vo vdpau:fps=X suboption
manually.
[VDPAU SUNXI] Presentation time not supported  0 ??% ??% ??,?% 0 0
[VDPAU SUNXI] vdp_output_surface_put_bits_indexed called but unimplemented!
[VDPAU SUNXI] vdp_output_surface_render_output_surface called but
unimplemented!
A:  34.2 V:  34.2 A-V: -0.000 ct:  0.000   0/  0 17%  0%  2.6% 0 0


Exiting... (End of file)


Regards
Punith

--
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/groups/opt_out.


--
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/groups/opt_out.


Re: [linux-sunxi] [PATCH 3.4] Revert usb:sunxi:Fix device not recognized problem during android boot (3.4)

2014-02-10 Thread Jari Helaakoski



 Is there even an android tree that builds with 3.4?

 I have been using this: https://github.com/allwinner-dev-team

4months ago I got ICS working with 3.4 kernel and a13_mid board. I don't
know current status. Does it even build.

I built android long ago and I can't tell if it had this patch or not
 but I had no problems with adb. I had problems running anything other
 than the boot animation, however. If there is no working android tree
 for 3.4 kernel there is no point having android stuff in our kernel
 tree.

 Thanks

 Michal


-- 
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/groups/opt_out.


[linux-sunxi] Re: [PATCH v4 1/8] clk: sunxi: Add Allwinner A20/A31 GMAC clock unit

2014-02-10 Thread Maxime Ripard
On Mon, Feb 10, 2014 at 06:35:47PM +0800, Chen-Yu Tsai wrote:
 The Allwinner A20/A31 clock module controls the transmit clock source
 and interface type of the GMAC ethernet controller. Model this as
 a single clock for GMAC drivers to use.
 
 Signed-off-by: Chen-Yu Tsai w...@csie.org

Acked-by: Maxime Ripard maxime.rip...@free-electrons.com

Thanks!
Maxime

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


signature.asc
Description: Digital signature


[linux-sunxi] Re: [PATCH v4 0/8] Add Allwinner A20 GMAC ethernet support

2014-02-10 Thread Maxime Ripard
Hi Chen-Yu,

On Mon, Feb 10, 2014 at 06:35:46PM +0800, Chen-Yu Tsai wrote:
 Hi,
 
 This is the v4 of the remaining Allwinner A20 GMAC glue layer patches.
 The stmmac driver changes have been merged through net-next. The
 remaining bits are clock and DT patches. The patches should be applied
 over my clock renaming patches.
 
 The Allwinner A20 SoC integrates an early version of dwmac
 IP from Synopsys. On top of that is a hardware glue layer.
 This layer needs to be configured before the dwmac can be
 used.
 
 Part of the glue layer is a clock mux, which controls the
 source and direction of the TX clock used by GMAC.

Just merged patches 2-8.

Thanks!
Maxime

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


signature.asc
Description: Digital signature


[linux-sunxi] Re: [PATCH 2/3] mfd: axp20x: Add dtsi for axp20x

2014-02-10 Thread Maxime Ripard
Hi Carlo,

On Sat, Feb 08, 2014 at 05:03:47PM +0100, Carlo Caione wrote:
 This patch adds a new dtsi for supporting axp20x.
 
 Signed-off-by: Carlo Caione ca...@caione.org
 ---
  arch/arm/boot/dts/axp20x.dtsi | 9 +
  1 file changed, 9 insertions(+)
  create mode 100644 arch/arm/boot/dts/axp20x.dtsi
 
 diff --git a/arch/arm/boot/dts/axp20x.dtsi b/arch/arm/boot/dts/axp20x.dtsi
 new file mode 100644
 index 000..98d4c7c
 --- /dev/null
 +++ b/arch/arm/boot/dts/axp20x.dtsi
 @@ -0,0 +1,9 @@
 +/*
 +* Integrated Power Management Chip AXP209
 +*/
 +
 +axp {
 + compatible = x-powers,axp20x;
 + interrupt-controller;
 + #interrupt-cells = 1;
 +};

Hmmm, this refers to an undefined node, I can't see this DTSI used
anywhere, and why do you need a DTSI of its own in the first place?

Thanks,
Maxime

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


signature.asc
Description: Digital signature


[linux-sunxi] Re: [PATCH 3/3] mfd: axp20x: Add bindings documentation

2014-02-10 Thread Lee Jones
 Bindings documentation for the axp20x driver. In this file also two
 sub-nodes (PEK and regulators) are documented.
 
 Signed-off-by: Carlo Caione ca...@caione.org
 ---
  Documentation/devicetree/bindings/mfd/axp20x.txt | 87 
 

You need to CC the Device Tree guys.

-- 
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/groups/opt_out.


[linux-sunxi] Re: [PATCH 2/3] mfd: axp20x: Add dtsi for axp20x

2014-02-10 Thread Carlo Caione
On Mon, Feb 10, 2014 at 9:08 PM, Lee Jones lee.jo...@linaro.org wrote:
 On Sat, 08 Feb 2014, Carlo Caione wrote:

 This patch adds a new dtsi for supporting axp20x.

 Signed-off-by: Carlo Caione ca...@caione.org
 ---
  arch/arm/boot/dts/axp20x.dtsi | 9 +
  1 file changed, 9 insertions(+)
  create mode 100644 arch/arm/boot/dts/axp20x.dtsi

 diff --git a/arch/arm/boot/dts/axp20x.dtsi b/arch/arm/boot/dts/axp20x.dtsi
 new file mode 100644
 index 000..98d4c7c
 --- /dev/null
 +++ b/arch/arm/boot/dts/axp20x.dtsi
 @@ -0,0 +1,9 @@
 +/*
 +* Integrated Power Management Chip AXP209
 +*/
 +
 +axp {
 + compatible = x-powers,axp20x;
 + interrupt-controller;
 + #interrupt-cells = 1;
 +};

 I's suggest not doing it this way. Having a .dtsi file for every
 device is not the way Device Tree has been designed. This snippet
 should be copied directly into device's .dts(i) files.

Well, ok then :) I'll fix it in v2.

Thanks,

-- 
Carlo Caione

-- 
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/groups/opt_out.


Re: [linux-sunxi] Re: [PATCH 2/3] mfd: axp20x: Add dtsi for axp20x

2014-02-10 Thread Carlo Caione
On Mon, Feb 10, 2014 at 8:59 PM, Maxime Ripard
maxime.rip...@free-electrons.com wrote:
 Hi Carlo,

 On Sat, Feb 08, 2014 at 05:03:47PM +0100, Carlo Caione wrote:
 This patch adds a new dtsi for supporting axp20x.

 Signed-off-by: Carlo Caione ca...@caione.org
 ---
  arch/arm/boot/dts/axp20x.dtsi | 9 +
  1 file changed, 9 insertions(+)
  create mode 100644 arch/arm/boot/dts/axp20x.dtsi

 diff --git a/arch/arm/boot/dts/axp20x.dtsi b/arch/arm/boot/dts/axp20x.dtsi
 new file mode 100644
 index 000..98d4c7c
 --- /dev/null
 +++ b/arch/arm/boot/dts/axp20x.dtsi
 @@ -0,0 +1,9 @@
 +/*
 +* Integrated Power Management Chip AXP209
 +*/
 +
 +axp {
 + compatible = x-powers,axp20x;
 + interrupt-controller;
 + #interrupt-cells = 1;
 +};

 Hmmm, this refers to an undefined node, I can't see this DTSI used
 anywhere, and why do you need a DTSI of its own in the first place?

Since axp is an independent MFD this could be integrated in the DTS of
the SoC using it (multiple SoC could be using the same axp), that's
why I left it in a DTSI.
i.e. it will be integrated in sun7i-a20-cubieboard2.dts once the
problem with the NMI controller has been solved (and we have a NMI
controller to link the axp to).

Thanks,

-- 
Carlo Caione

-- 
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/groups/opt_out.


Re: [linux-sunxi] Re: [PATCH 1/3] mfd: axp20x: Add mfd driver for axp20x PMIC

2014-02-10 Thread Carlo Caione
On Mon, Feb 10, 2014 at 9:02 PM, Maxime Ripard
maxime.rip...@free-electrons.com wrote:
 +static struct resource axp20x_pek_resources[] = {
 + {
 + .name   = PEK_DBR,
 + .start  = AXP20X_IRQ_PEK_RIS_EDGE,
 + .end= AXP20X_IRQ_PEK_RIS_EDGE,
 + .flags  = IORESOURCE_IRQ,
 + },
 + {
 + .name   = PEK_DBF,
 + .start  = AXP20X_IRQ_PEK_FAL_EDGE,
 + .end= AXP20X_IRQ_PEK_FAL_EDGE,
 + .flags  = IORESOURCE_IRQ,
 + },
 +
 +};

 From your documentation, it seems like you want to declare them in the
 DT too. Why do you need to declare the resources in both locations?

It's not really a need, I thought it was a bit clearer also to have
them in DT.
But I agree it is redundant. I'll fix in v2.

Thank you,

-- 
Carlo Caione

-- 
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/groups/opt_out.


Re: [linux-sunxi] Transport stream controller usage at A20-olinuxino

2014-02-10 Thread thomas schorpp

Am 10.02.2014 15:57, schrieb vladimir.a.ers...@gmail.com:

Hello,

Could you please point me out how to utilize TSC subsystem at the 
A20-Olinuxino? What driver should I use? Is the any samples?
I'm using linux sunxi version 3.4.67+

Thanks in advance,
Vladimir.



Hi Vladimir,

search the list archive for my address, You should find my analysis doc, the 
patches for Olimex A20 fex and a port of AW's basic Android /dev driver
You could try to attach as module to Your own higher OSI- layer driver if not 
DVB/ATSC, don't know where in the sunxi repos yet and
the port should be out of sync with the sunxi-devel tree for months now. Last 
state was driver loading and basic init success.

The /dev ioctl() does not look like V4L or linux DVB API, maybe some AW testing 
driver, beware, license *possibly proprietary*.
If You want to have cleanroom design, better rewrite it from scratch for 
V4L/DVB ABI/API and license it for GPL or compatible.

You should find links to a preliminary A10 Transport Stream Controller manual 
in the sunxi, Olimex repo, wiki or cubiebord download section.
If You've questions or need more TSC/A20- programming info, maybe Ben @ 
cubieboard can help with contacts to AW staff.
For DMA (buffer) support (required) status in linux-sunxi search list, wiki, 
ask the developers in IRC.

You need the schematics of Your Olimex board with correct PCB revision from the 
Olimex git repo, too, if You want to attach
a TV receiver module to the GPIO PIN headers and the datasheet of the module 
*with* support by mainline dvb frontend drivers modified and attached
to the sunxi-twi/i2c drivers.

If Your project is an IPTV TS - CedarX (Cedrus) VE driver, surely of interest, 
too :-)

Patches and reports (to this list, CC linux-media list and sunxi wiki)  welcome, I'll 
show up on IRC as soon as my provider has cleared his EU issues,
good luck.

I'm still busy with other linux media homebrew stuff, migrations, and VDR 
people seem not to be interested in SoC platforms, yet, so low priority.

y
tom
P.S.: Just found the patches in local storage here, -attached-, but can't 
remember if complete and expect kernel build breakage and crashes on use :D


--
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/groups/opt_out.
diff --git a/sys_config/a20/a20-olinuxino_micro.fex b/sys_config/a20/a20-olinuxino_micro.fex
index dd2835a..e27bbcf 100644
--- a/sys_config/a20/a20-olinuxino_micro.fex
+++ b/sys_config/a20/a20-olinuxino_micro.fex
@@ -461,6 +461,21 @@ dac3_src = 0
 [hdmi_para]
 hdmi_used = 1
 
+[tsc_para]
+tsc_used = 1
+tsc_clk = port:PE002defaultdefaultdefault
+tsc_err = port:PE012defaultdefaultdefault
+tsc_sync = port:PE022defaultdefaultdefault
+tsc_dvld = port:PE032defaultdefaultdefault
+tsc_d0 = port:PE042defaultdefaultdefault
+tsc_d1 = port:PE052defaultdefaultdefault
+tsc_d2 = port:PE062defaultdefaultdefault
+tsc_d3 = port:PE072defaultdefaultdefault
+tsc_d4 = port:PE082defaultdefaultdefault
+tsc_d5 = port:PE092defaultdefaultdefault
+tsc_d6 = port:PE102defaultdefaultdefault
+tsc_d7 = port:PE112defaultdefaultdefault
+
 [camera_list_para]
 camera_list_para_used = 0
 ov7670 = 0
diff --git a/drivers/media/dvb/Kconfig b/drivers/media/dvb/Kconfig
index f6e40b3..19de663 100644
--- a/drivers/media/dvb/Kconfig
+++ b/drivers/media/dvb/Kconfig
@@ -84,6 +84,10 @@ comment Supported ddbridge ('Octopus') Adapters
 	depends on DVB_CORE  PCI  I2C
 	source drivers/media/dvb/ddbridge/Kconfig
 
+comment Supported SoC TS Capture Controllers
+	depends on DVB_CORE
+	source drivers/media/dvb/soc/Kconfig
+
 comment Supported DVB Frontends
 	depends on DVB_CORE
 source drivers/media/dvb/frontends/Kconfig
diff --git a/drivers/media/dvb/Makefile b/drivers/media/dvb/Makefile
index b2cefe6..053abd3 100644
--- a/drivers/media/dvb/Makefile
+++ b/drivers/media/dvb/Makefile
@@ -16,6 +16,7 @@ obj-y:= dvb-core/	\
 		pt1/		\
 		mantis/		\
 		ngene/		\
-		ddbridge/
+		ddbridge/   \
+		soc/
 
 obj-$(CONFIG_DVB_FIREDTV)	+= firewire/
diff --git a/drivers/media/dvb/soc/Kconfig b/drivers/media/dvb/soc/Kconfig
new file mode 100644
index 000..d795da3
--- /dev/null
+++ b/drivers/media/dvb/soc/Kconfig
@@ -0,0 +1,60 @@
+# TODO:
+# 1. Selective TS- Ports/Controller(s?) config, auto-disable CSI drivers in Kconfig.
+# 2. Auto- Select tuner pll/sec/lnb drivers, 
+#but there may be modules around with other/unsupported PLL- chips, 
+#so let user choose them.
+# 3. Support for DVB-S2/T2/C2/ATSC(?) receivers (Me not before SDTV gets off the air.)
+# 4. CI+ CA Support (In Your dreams).
+
+config DVB_TSC_SUNXI
+	bool TS Controller Driver for Allwinner A10/A20 TSC
+	default n
+	depends on DVB_CORE  PLAT_SUNXI
+
+if DVB_TSC_SUNXI
+
+config TS0_SUN4I
+	tristate TS0 TS capture  demux input for sun4i/5i/7i, A10/A13/A20
+	default n
+#	

Re: [linux-sunxi] Re: [PATCH 3/3] mfd: axp20x: Add bindings documentation

2014-02-10 Thread Carlo Caione
On Mon, Feb 10, 2014 at 9:12 PM, Maxime Ripard
maxime.rip...@free-electrons.com wrote:
 Hi Carlo,

 On Sat, Feb 08, 2014 at 05:03:48PM +0100, Carlo Caione wrote:
 Bindings documentation for the axp20x driver. In this file also two
 sub-nodes (PEK and regulators) are documented.

 Signed-off-by: Carlo Caione ca...@caione.org
 ---
  Documentation/devicetree/bindings/mfd/axp20x.txt | 87 
 
  1 file changed, 87 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/mfd/axp20x.txt

 diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt 
 b/Documentation/devicetree/bindings/mfd/axp20x.txt
 new file mode 100644
 index 000..ccea6b8
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/mfd/axp20x.txt
 @@ -0,0 +1,87 @@
 +* axp20x device tree bindings
 +
 +The axp20x family current members :-
 +axp202 (x-powers)
 +axp209 (x-powers)
 +
 +Required properties:
 +- compatible : Should be x-powers,axp20x (for axp202 and axp209)

 Generic compatibles are usually a bad thing, for several reasons,
 mostly because there's no way to actually differentiate the two
 without keeping adding DT properties (and hence, being unable to
 actually fix something or add a quirk for one single of these devices
 without having to modify the DT too.)

 Please use the real compatibles.

Ok

 +- interrupt-controller : axp20x has its own internal IRQs
 +- #interrupt-cells : should be set to 1
 +- interrupt-parent : The parent interrupt controller

 Is this really required? It was not in your DTSI.

It wasn't in my DTSI since it was supposed to be used by DTS importing
this DTSI.
I'll fix it in v2.

 +- interrupts : Specifies the list of interrupt lines which are handled by
 +the device in the parent controller's notation

 Hmmm, I'm not sure what you mean here.

It means that the notation used to indicate the interrupt for this
device has to follow the notation of the parent controller (i.e. in
terms of number of interrupt cells).
I'll rewrite the statement in v2.

 +- reg : Specifies base physical address and size of the registers

 Base physical address? Isn't it a I2C device?

Right. cutpaste error.

 +
 +Sub-nodes
 +* regulators : Contain the regulator nodes. The regulators are bound using
 +their name as listed here: dcdc2, dcdc3, ldo1, ldo2, ldo3,
 +ldo4, ldo5.
 +The bindings details of individual regulator device can be 
 found in:
 +Documentation/devicetree/bindings/regulator/regulator.txt with 
 the
 +exception of:

 I'm guessing this is where you differentiate between AXP202 and
 AXP209?

Not really. AXP202 and AXP209 have the same regulators (with the same
constrains)

 +
 + - dcdc-freq : defines the work frequency of DC-DC where
 +   F=(1+dcdc-freq*5%)*1.5MHz

 I'd very much prefer this DCDC frequency to be in Hz, or a similar
 unit, and let the driver do the conversion.

Ok. Fix in v2.

 +
 +* axp20x-pek : Power Enable Key
 + - compatible : should be x-powers,axp20x-pek
 + - interrupts : two interrupt numbers with order defined by 
 interrupt-names
 +(one irq number for rising transition of the power key, 
 the
 +other one for falling transition)
 + - interrupt-names : should be PEK_DBR and PEK_DBF

 Is this actually needed since you declare the resources in your driver?

Not needed.

 +
 +Example:
 +
 +axp {
 + compatible = x-powers,axp20x;
 + interrupt-controller;
 + #interrupt-cells = 1;

 No reg property ?

Also the reg property was supposed to be used in the DTS. I'll fix it.

 +
 + axp20x-pek {
 + compatible = x-powers,axp20x-pek;
 + interrupts = 33,  34;
 + interrupt-names = PEK_DBR, PEK_DBF;
 + };
 +
 + regulators {
 + dcdc-freq = 8;
 +
 + axp_dcdc2: dcdc2 {
 + regulator-min-microvolt = 70;
 + regulator-max-microvolt = 2275000;
 + dcdc-workmode = 0;

 And what is this dcdc-workmode property about?

Oh. I missed that, sorry.

 + };
 +
 + axp_dcdc3: dcdc3 {
 + regulator-min-microvolt = 70;
 + regulator-max-microvolt = 350;
 + dcdc-workmode = 0;
 + };
 +
 + axp_ldo1: ldo1 {
 + regulator-min-microvolt = 130;
 + regulator-max-microvolt = 130;
 + };
 +
 + axp_ldo2: ldo2 {
 + regulator-min-microvolt = 180;
 + regulator-max-microvolt = 330;
 + };
 +
 + axp_ldo3: ldo3 {
 + regulator-min-microvolt = 70;
 + regulator-max-microvolt = 350;
 + };
 +
 + axp_ldo4: ldo4 {
 + regulator-min-microvolt = 125;
 + regulator-max-microvolt = 

[linux-sunxi] Re: [PATCH v2] ARM: sunxi: Add driver for sunxi usb phy

2014-02-10 Thread Maxime Ripard
Hi,

On Sat, Feb 08, 2014 at 12:27:42AM +0100, Hans de Goede wrote:
 Hi,
 
 On 02/07/2014 11:36 PM, Maxime Ripard wrote:
 Hi Hans,
 
 It looks very nice, I just have a few comments below though.
 
 On Fri, Feb 07, 2014 at 05:33:21PM +0100, Hans de Goede wrote:
 The Allwinner A1x / A2x SoCs have 2 or 3 usb phys which are all accessed
 through a single set of registers. Besides this there are also some other
 phy related bits which need poking, which are per phy, but shared between 
 the
 ohci and ehci controllers, so these are also controlled from this new phy
 driver.
 
 Signed-off-by: Hans de Goede hdego...@redhat.com
 ---
   .../devicetree/bindings/phy/sun4i-usb-phy.txt  |  28 ++
   drivers/phy/Kconfig|  11 +
   drivers/phy/Makefile   |   1 +
   drivers/phy/phy-sun4i-usb.c| 326 
  +
   4 files changed, 366 insertions(+)
   create mode 100644 Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
   create mode 100644 drivers/phy/phy-sun4i-usb.c
 
 diff --git a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt 
 b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
 new file mode 100644
 index 000..f7eccb2
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt
 @@ -0,0 +1,28 @@
 +Allwinner sun4i USB PHY
 +---
 +
 +Required properties:
 +- compatible : should be one of allwinner,sun4i-a10-usb-phy,
 +  allwinner,sun5i-a13-usb-phy or allwinner,sun7i-a20-usb-phy
 +- reg : a list of offset + length pairs, the 1st list entry should point to
 +  the phy base regs, the 2nd entry to the pmu reg for phy1, and the 3th
 +  entry to the pmu reg of phy2 (for devices which have a phy2).
 
 I'm concerned about devices that would only have a phy2 for some
 reason.
 
 phy1 and phy2 are identical, so in that case we would just call the phy
 phy1 I guess, and specify its register where ever it lives and be done with
 it.
 
 Using reg-names would be much more robust, and is quite painless to
 use. Just use platform_get_resource_by_name instead of
 platform_get_resource, and that's pretty much it.
 
 The above argument does not really help to convince me to use
 register-names, I don't really see them as useful / necessary,
 adding support for them will just grow the driver-code, as well
 as the devicetree bindings docs, as well as the dts files.
 
 But if you really really want me to use register-names, just say so
 and I'll modify the patch.

Yep, overall, whenever there's several resources involved, I very much
prefer to differentiate them by name, rather than by index, which is
much more fragile.

And the overhead is of one single line in the DT, one single line in
the doc, and a few of them in the driver. It doesn't look like it
bloats the code that much...

 
 
 
 +- #phy-cells : from the generic phy bindings, must be 1
 +
 +Optional properties:
 +- clocks : phandle + clock specifier for the phy clock
 +- clock-names : usb_phy
 +- resets : a list of phandle + reset specifier pairs
 +- reset-names : usb0_reset, usb1_reset, and / or usb2_reset
 +
 +Example:
 +   usbphy: phy@0x01c13400 {
 +   #phy-cells = 1;
 +   compatible = allwinner,sun4i-a10-usb-phy;
 +   /* phy base regs, phy1 pmu reg, phy2 pmu reg */
 +   reg = 0x01c13400 0x10 0x01c14800 0x4 0x01c1c800 0x4;
 +   clocks = usb_clk 8;
 +   clock-names = usb_phy;
 +   resets = usb_clk 1, usb_clk 2;
 +   reset-names = usb1_reset, usb2_reset;
 +   };
 diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
 index afa2354..6070c99 100644
 --- a/drivers/phy/Kconfig
 +++ b/drivers/phy/Kconfig
 @@ -64,4 +64,15 @@ config BCM_KONA_USB2_PHY
 help
   Enable this to support the Broadcom Kona USB 2.0 PHY.
 
 +config PHY_SUN4I_USB
 +   tristate Allwinner sunxi SoC USB PHY driver
 +   depends on ARCH_SUNXI
 +   select GENERIC_PHY
 +   help
 + Enable this to support the transceiver that is part of Allwinner
 + sunxi SoCs.
 +
 + This driver controls the entire USB PHY block, both the USB OTG
 + parts, as well as the 2 regular USB 2 host PHYs.
 +
   endmenu
 diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile
 index b57c253..9d4f8bb 100644
 --- a/drivers/phy/Makefile
 +++ b/drivers/phy/Makefile
 @@ -9,3 +9,4 @@ obj-$(CONFIG_PHY_EXYNOS_MIPI_VIDEO) += 
 phy-exynos-mipi-video.o
   obj-$(CONFIG_PHY_MVEBU_SATA)  += phy-mvebu-sata.o
   obj-$(CONFIG_OMAP_USB2)   += phy-omap-usb2.o
   obj-$(CONFIG_TWL4030_USB) += phy-twl4030-usb.o
 +obj-$(CONFIG_PHY_SUN4I_USB)+= phy-sun4i-usb.o
 diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
 new file mode 100644
 index 000..bd9cb7fa
 --- /dev/null
 +++ b/drivers/phy/phy-sun4i-usb.c
 @@ -0,0 +1,326 @@
 +/*
 + * Allwinner sun4i USB phy driver
 + *
 + * Copyright (C) 2014 Hans de Goede hdego...@redhat.com
 + *
 + * Based on code 

[linux-sunxi] Re: [PATCH 1/3] mfd: axp20x: Add mfd driver for axp20x PMIC

2014-02-10 Thread Lee Jones
 This patch introduces the preliminary support for PMICs X-Powers AXP202
 and AXP209. The core contains support only for two sub-modules (PEK
 and regulators) that will be added with two different patch-sets.
 
 Signed-off-by: Carlo Caione ca...@caione.org
 ---
  drivers/mfd/Kconfig|  12 +++
  drivers/mfd/Makefile   |   1 +
  drivers/mfd/axp20x.c   | 251 
 +
  include/linux/mfd/axp20x.h | 178 
  4 files changed, 442 insertions(+)
  create mode 100644 drivers/mfd/axp20x.c
  create mode 100644 include/linux/mfd/axp20x.h
 
 diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
 index dd67158..33d38c4 100644
 --- a/drivers/mfd/Kconfig
 +++ b/drivers/mfd/Kconfig
 @@ -59,6 +59,18 @@ config MFD_AAT2870_CORE
 additional drivers must be enabled in order to use the
 functionality of the device.

snip

 diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
 new file mode 100644
 index 000..efd0cb3
 --- /dev/null
 +++ b/drivers/mfd/axp20x.c
 @@ -0,0 +1,251 @@
 +/*

A nice descriptive title here would be good.

 + * Author: Carlo Caione ca...@caione.org
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License version 2 as
 + * published by the Free Software Foundation.
 + */
 +
 +#include linux/err.h
 +#include linux/i2c.h
 +#include linux/interrupt.h
 +#include linux/kernel.h
 +#include linux/module.h
 +#include linux/pm_runtime.h
 +#include linux/regmap.h
 +#include linux/slab.h
 +#include linux/regulator/consumer.h
 +#include linux/mfd/axp20x.h
 +#include linux/mfd/core.h
 +#include linux/of_device.h
 +#include linux/of_irq.h
 +
 +static const struct regmap_range axp20x_writeable_ranges[] = {
 + {
 + .range_min = AXP20X_DATA(0),
 + .range_max = AXP20X_IRQ5_STATE,
 + }, {
 + .range_min = AXP20X_DCDC_MODE,
 + .range_max = AXP20X_FG_RES,
 + },
 +};
 +
 +static const struct regmap_range axp20x_volatile_ranges[] = {
 + {
 + .range_min = AXP20X_IRQ1_EN,
 + .range_max = AXP20X_IRQ5_STATE,
 + },
 +};
 +
 +static const struct regmap_access_table axp20x_writeable_table = {
 + .yes_ranges = axp20x_writeable_ranges,
 + .n_yes_ranges   = ARRAY_SIZE(axp20x_writeable_ranges),
 +};
 +
 +static const struct regmap_access_table axp20x_volatile_table = {
 + .yes_ranges = axp20x_volatile_ranges,
 + .n_yes_ranges   = ARRAY_SIZE(axp20x_volatile_ranges),
 +};
 +
 +static struct resource axp20x_pek_resources[] = {
 + {
 + .name   = PEK_DBR,
 + .start  = AXP20X_IRQ_PEK_RIS_EDGE,
 + .end= AXP20X_IRQ_PEK_RIS_EDGE,
 + .flags  = IORESOURCE_IRQ,
 + },
 + {
 + .name   = PEK_DBF,
 + .start  = AXP20X_IRQ_PEK_FAL_EDGE,
 + .end= AXP20X_IRQ_PEK_FAL_EDGE,
 + .flags  = IORESOURCE_IRQ,
 + },
 +

Superfluous new line.

 +};
 +
 +static const struct regmap_config axp20x_regmap_config = {
 + .reg_bits   = 8,
 + .val_bits   = 8,
 + .wr_table   = axp20x_writeable_table,
 + .volatile_table = axp20x_volatile_table,
 + .max_register   = AXP20X_FG_RES,
 + .cache_type = REGCACHE_RBTREE,
 +};
 +
 +#define AXP20X_IRQ(_irq, _off, _mask) \
 + [AXP20X_IRQ_##_irq] = { .reg_offset = (_off), .mask = BIT(_mask) }
 +
 +static const struct regmap_irq axp20x_regmap_irqs[] = {
 + AXP20X_IRQ(ACIN_OVER_V, 0, 7),
 + AXP20X_IRQ(ACIN_PLUGIN, 0, 6),
 + AXP20X_IRQ(ACIN_REMOVAL,0, 5),
 + AXP20X_IRQ(VBUS_OVER_V, 0, 4),
 + AXP20X_IRQ(VBUS_PLUGIN, 0, 3),
 + AXP20X_IRQ(VBUS_REMOVAL,0, 2),
 + AXP20X_IRQ(VBUS_V_LOW,  0, 1),
 + AXP20X_IRQ(BATT_PLUGIN, 1, 7),
 + AXP20X_IRQ(BATT_REMOVAL,1, 6),
 + AXP20X_IRQ(BATT_ENT_ACT_MODE,   1, 5),
 + AXP20X_IRQ(BATT_EXIT_ACT_MODE,  1, 4),
 + AXP20X_IRQ(CHARG,   1, 3),
 + AXP20X_IRQ(CHARG_DONE,  1, 2),
 + AXP20X_IRQ(BATT_TEMP_HIGH,  1, 1),
 + AXP20X_IRQ(BATT_TEMP_LOW,   1, 0),
 + AXP20X_IRQ(DIE_TEMP_HIGH,   2, 7),
 + AXP20X_IRQ(CHARG_I_LOW, 2, 6),
 + AXP20X_IRQ(DCDC1_V_LONG,2, 5),
 + AXP20X_IRQ(DCDC2_V_LONG,2, 4),
 + AXP20X_IRQ(DCDC3_V_LONG,2, 3),
 + AXP20X_IRQ(PEK_SHORT,   2, 1),
 + AXP20X_IRQ(PEK_LONG,2, 0),
 + AXP20X_IRQ(N_OE_PWR_ON, 3, 7),
 + AXP20X_IRQ(N_OE_PWR_OFF,3, 6),
 + AXP20X_IRQ(VBUS_VALID,  3, 5),
 + AXP20X_IRQ(VBUS_NOT_VALID,  3, 4),
 + AXP20X_IRQ(VBUS_SESS_VALID, 3, 3),
 + AXP20X_IRQ(VBUS_SESS_END,   3, 2),
 + AXP20X_IRQ(LOW_PWR_LVL1,3, 1),
 + AXP20X_IRQ(LOW_PWR_LVL2,3, 0),
 + AXP20X_IRQ(TIMER,   4, 7),
 + AXP20X_IRQ(PEK_RIS_EDGE,

Re: [linux-sunxi] Re: [PATCH 3/3] mfd: axp20x: Add bindings documentation

2014-02-10 Thread Maxime Ripard
On Mon, Feb 10, 2014 at 09:37:37PM +0100, Carlo Caione wrote:
  +Sub-nodes
  +* regulators : Contain the regulator nodes. The regulators are bound using
  +their name as listed here: dcdc2, dcdc3, ldo1, ldo2, ldo3,
  +ldo4, ldo5.
  +The bindings details of individual regulator device can be 
  found in:
  +Documentation/devicetree/bindings/regulator/regulator.txt 
  with the
  +exception of:
 
  I'm guessing this is where you differentiate between AXP202 and
  AXP209?
 
 Not really. AXP202 and AXP209 have the same regulators (with the same
 constrains)

Ok. What's the difference between the two then?

Thanks,

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


signature.asc
Description: Digital signature


Re: [linux-sunxi] Re: [PATCH 1/3] mfd: axp20x: Add mfd driver for axp20x PMIC

2014-02-10 Thread Carlo Caione
On Mon, Feb 10, 2014 at 10:19 PM, Lee Jones lee.jo...@linaro.org wrote:
 This patch introduces the preliminary support for PMICs X-Powers AXP202
 and AXP209. The core contains support only for two sub-modules (PEK
 and regulators) that will be added with two different patch-sets.

 Signed-off-by: Carlo Caione ca...@caione.org
 ---
  drivers/mfd/Kconfig|  12 +++
  drivers/mfd/Makefile   |   1 +
  drivers/mfd/axp20x.c   | 251 
 +
  include/linux/mfd/axp20x.h | 178 
  4 files changed, 442 insertions(+)
  create mode 100644 drivers/mfd/axp20x.c
  create mode 100644 include/linux/mfd/axp20x.h

 diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
 index dd67158..33d38c4 100644
 --- a/drivers/mfd/Kconfig
 +++ b/drivers/mfd/Kconfig
 @@ -59,6 +59,18 @@ config MFD_AAT2870_CORE
 additional drivers must be enabled in order to use the
 functionality of the device.

 snip

 diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c
 new file mode 100644
 index 000..efd0cb3
 --- /dev/null
 +++ b/drivers/mfd/axp20x.c
 @@ -0,0 +1,251 @@
 +/*

 A nice descriptive title here would be good.

Agree.

 + * Author: Carlo Caione ca...@caione.org
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License version 2 as
 + * published by the Free Software Foundation.
 + */
 +
 +#include linux/err.h
 +#include linux/i2c.h
 +#include linux/interrupt.h
 +#include linux/kernel.h
 +#include linux/module.h
 +#include linux/pm_runtime.h
 +#include linux/regmap.h
 +#include linux/slab.h
 +#include linux/regulator/consumer.h
 +#include linux/mfd/axp20x.h
 +#include linux/mfd/core.h
 +#include linux/of_device.h
 +#include linux/of_irq.h
 +
 +static const struct regmap_range axp20x_writeable_ranges[] = {
 + {
 + .range_min = AXP20X_DATA(0),
 + .range_max = AXP20X_IRQ5_STATE,
 + }, {
 + .range_min = AXP20X_DCDC_MODE,
 + .range_max = AXP20X_FG_RES,
 + },
 +};
 +
 +static const struct regmap_range axp20x_volatile_ranges[] = {
 + {
 + .range_min = AXP20X_IRQ1_EN,
 + .range_max = AXP20X_IRQ5_STATE,
 + },
 +};
 +
 +static const struct regmap_access_table axp20x_writeable_table = {
 + .yes_ranges = axp20x_writeable_ranges,
 + .n_yes_ranges   = ARRAY_SIZE(axp20x_writeable_ranges),
 +};
 +
 +static const struct regmap_access_table axp20x_volatile_table = {
 + .yes_ranges = axp20x_volatile_ranges,
 + .n_yes_ranges   = ARRAY_SIZE(axp20x_volatile_ranges),
 +};
 +
 +static struct resource axp20x_pek_resources[] = {
 + {
 + .name   = PEK_DBR,
 + .start  = AXP20X_IRQ_PEK_RIS_EDGE,
 + .end= AXP20X_IRQ_PEK_RIS_EDGE,
 + .flags  = IORESOURCE_IRQ,
 + },
 + {
 + .name   = PEK_DBF,
 + .start  = AXP20X_IRQ_PEK_FAL_EDGE,
 + .end= AXP20X_IRQ_PEK_FAL_EDGE,
 + .flags  = IORESOURCE_IRQ,
 + },
 +

 Superfluous new line.

 +};
 +
 +static const struct regmap_config axp20x_regmap_config = {
 + .reg_bits   = 8,
 + .val_bits   = 8,
 + .wr_table   = axp20x_writeable_table,
 + .volatile_table = axp20x_volatile_table,
 + .max_register   = AXP20X_FG_RES,
 + .cache_type = REGCACHE_RBTREE,
 +};
 +
 +#define AXP20X_IRQ(_irq, _off, _mask) \
 + [AXP20X_IRQ_##_irq] = { .reg_offset = (_off), .mask = BIT(_mask) }
 +
 +static const struct regmap_irq axp20x_regmap_irqs[] = {
 + AXP20X_IRQ(ACIN_OVER_V, 0, 7),
 + AXP20X_IRQ(ACIN_PLUGIN, 0, 6),
 + AXP20X_IRQ(ACIN_REMOVAL,0, 5),
 + AXP20X_IRQ(VBUS_OVER_V, 0, 4),
 + AXP20X_IRQ(VBUS_PLUGIN, 0, 3),
 + AXP20X_IRQ(VBUS_REMOVAL,0, 2),
 + AXP20X_IRQ(VBUS_V_LOW,  0, 1),
 + AXP20X_IRQ(BATT_PLUGIN, 1, 7),
 + AXP20X_IRQ(BATT_REMOVAL,1, 6),
 + AXP20X_IRQ(BATT_ENT_ACT_MODE,   1, 5),
 + AXP20X_IRQ(BATT_EXIT_ACT_MODE,  1, 4),
 + AXP20X_IRQ(CHARG,   1, 3),
 + AXP20X_IRQ(CHARG_DONE,  1, 2),
 + AXP20X_IRQ(BATT_TEMP_HIGH,  1, 1),
 + AXP20X_IRQ(BATT_TEMP_LOW,   1, 0),
 + AXP20X_IRQ(DIE_TEMP_HIGH,   2, 7),
 + AXP20X_IRQ(CHARG_I_LOW, 2, 6),
 + AXP20X_IRQ(DCDC1_V_LONG,2, 5),
 + AXP20X_IRQ(DCDC2_V_LONG,2, 4),
 + AXP20X_IRQ(DCDC3_V_LONG,2, 3),
 + AXP20X_IRQ(PEK_SHORT,   2, 1),
 + AXP20X_IRQ(PEK_LONG,2, 0),
 + AXP20X_IRQ(N_OE_PWR_ON, 3, 7),
 + AXP20X_IRQ(N_OE_PWR_OFF,3, 6),
 + AXP20X_IRQ(VBUS_VALID,  3, 5),
 + AXP20X_IRQ(VBUS_NOT_VALID,  3, 4),
 + AXP20X_IRQ(VBUS_SESS_VALID, 3, 3),
 + AXP20X_IRQ(VBUS_SESS_END,   3, 2),
 + AXP20X_IRQ(LOW_PWR_LVL1,3, 1),
 + AXP20X_IRQ(LOW_PWR_LVL2,3, 0),

Re: [linux-sunxi] Re: [PATCH 3/3] mfd: axp20x: Add bindings documentation

2014-02-10 Thread Carlo Caione
On Mon, Feb 10, 2014 at 11:01 PM, Maxime Ripard
maxime.rip...@free-electrons.com wrote:
 On Mon, Feb 10, 2014 at 09:37:37PM +0100, Carlo Caione wrote:
  +Sub-nodes
  +* regulators : Contain the regulator nodes. The regulators are bound 
  using
  +their name as listed here: dcdc2, dcdc3, ldo1, ldo2, ldo3,
  +ldo4, ldo5.
  +The bindings details of individual regulator device can be 
  found in:
  +Documentation/devicetree/bindings/regulator/regulator.txt 
  with the
  +exception of:
 
  I'm guessing this is where you differentiate between AXP202 and
  AXP209?

 Not really. AXP202 and AXP209 have the same regulators (with the same
 constrains)

 Ok. What's the difference between the two then?

Honestly I have no idea. For what I have seen (core, PEK and
regulators) AXP202 and AXP209 are identical.

-- 
Carlo Caione

-- 
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/groups/opt_out.


[linux-sunxi] Re: Uart 6 + 7 Not working

2014-02-10 Thread Rosimildo DaSilva
I have finally received my CT, and I was able to test the UARTs.  Remember 
this is really confusing. All devices are available, but you need to check 
the dmesg to really know what is what. For example,  for Uart7,  it is 
mapped as /dev/ttyS4. Hopefully this helps. Your FEX for UART7 is correct 
( for a CB3 or Cubietruck ).


root@linaro-ubuntu-desktop:/home/linaro# ls /dev/ttyS*
/dev/ttyS0  /dev/ttyS1  /dev/ttyS2  /dev/ttyS3  /dev/ttyS4  /dev/ttyS5 
 /dev/ttyS6  /dev/ttyS7


root@linaro-ubuntu-desktop:/home/linaro# dmesg | grep uart
[0.703682] [uart]: used uart info.: 0x9d
[0.708366] [uart]: serial probe 0 irq 33 mapbase 0x01c28000
[0.734798] sunxi-uart.0: ttyS0 at MMIO 0x1c28000 (irq = 33) is a 
U6_16550A
[1.576576] [uart]: serial probe 2 irq 35 mapbase 0x01c28800
[1.608431] sunxi-uart.2: ttyS1 at MMIO 0x1c28800 (irq = 35) is a 
U6_16550A
[1.620258] [uart]: serial probe 3 irq 36 mapbase 0x01c28c00
[1.652081] sunxi-uart.3: ttyS2 at MMIO 0x1c28c00 (irq = 36) is a 
U6_16550A
[1.663921] [uart]: serial probe 4 irq 49 mapbase 0x01c29000
[1.695736] sunxi-uart.4: ttyS3 at MMIO 0x1c29000 (irq = 49) is a 
U6_16550A
[1.707537] [uart]: serial probe 7 irq 52 mapbase 0x01c29c00
[1.739336] sunxi-uart.7: ttyS4 at MMIO 0x1c29c00 (irq = 52) is a 
U6_16550A

R


On Wednesday, January 29, 2014 5:39:51 PM UTC-6, almonito wrote:

 Im Trying to use Uart 6 and Uart7 on PI Ports 

 I see a valid ttl signal on the Input pin of the Uarts Read Pin but I can 
 not read anything in linux 
 On uart7 I can send out data 
 On uart 6 I can neither send nor receive data (measured the ttl signals 
 with scope, no data showing up on writ, valid ttl signal on read) 

 My UART Settings are: 

 [uart_para0] 
 uart_used = 1 
 uart_port = 0 
 uart_type = 2 
 uart_tx = port:PB2221defaultdefault 
 uart_rx = port:PB2321defaultdefault 

 [uart_para1] 
 uart_used = 0 
 uart_port = 1 
 uart_type = 8 
 uart_tx = port:PA1041defaultdefault 
 uart_rx = port:PA1141defaultdefault 
 uart_rts = port:PA1241defaultdefault 
 uart_cts = port:PA1341defaultdefault 
 uart_dtr = port:PA1441defaultdefault 
 uart_dsr = port:PA1541defaultdefault 
 uart_dcd = port:PA1641defaultdefault 
 uart_ring = port:PA1741defaultdefault 

 [uart_para2] 
 uart_used = 1 
 uart_port = 2 
 uart_type = 4 
 uart_tx = port:PI1831defaultdefault 
 uart_rx = port:PI1931defaultdefault 
 uart_rts = port:PI1631defaultdefault 
 uart_cts = port:PI1731defaultdefault 

 [uart_para3] 
 uart_used = 0 
 uart_port = 3 
 uart_type = 4 
 uart_tx = port:PH0041defaultdefault 
 uart_rx = port:PH0141defaultdefault 
 uart_rts = port:PH0241defaultdefault 
 uart_cts = port:PH0341defaultdefault 

 [uart_para4] 
 uart_used = 0 
 uart_port = 4 
 uart_type = 2 
 uart_tx = port:PH0441defaultdefault 
 uart_rx = port:PH0541defaultdefault 

 [uart_para5] 
 uart_used = 0 
 uart_port = 5 
 uart_type = 2 
 uart_tx = port:PH0641defaultdefault 
 uart_rx = port:PH0741defaultdefault 

 [uart_para6] 
 uart_used = 1 
 uart_port = 6 
 uart_type = 2 
 uart_tx = port:PI1231defaultdefault 
 uart_rx = port:PI1331defaultdefault 
   
 [uart_para7] 
 uart_used = 1 
 uart_port = 7 
 uart_type = 2 
 uart_tx = port:PI2031defaultdefault 
 uart_rx = port:PI2131defaultdefault 


 I verifies the Mux setting for the pins quite a few times (its function 
 3), also I verified that the PA pins are configured as network and the PI 
 pins are not used anywhere else 


 Can someone verify that UART 6 and UART 7 is working on A10 and thee 
 Pin/settings are correct? 

 Regards 



-- 
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/groups/opt_out.


Re: [linux-sunxi] Re: Unable to play 720p video in Ubuntu

2014-02-10 Thread Puneet B
 Hi Oliver,

Sorry for inconvenience , actually i  upload wrong log.

Because my logitech keyboard is not good.

still Video is not playing smoothly.

Here is actual log:

MPlayer2 UNKNOWN (C) 2000-2011 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote 
control.

Playing /media/95E5-18AE/big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4.
Detected file format: QuickTime/MPEG-4/Motion JPEG 2000 format (libavformat)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb5bd9590]max_analyze_duration reached
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0, -alang und
VIDEO:  [H264]  1920x1080  24bpp  25.000 fps  7254.9 kbps (885.6 kbyte/s)
Clip info:
 major_brand: mp42
 minor_version: 1
 compatible_brands: isommp423gp5
 creation_time: 2011-08-04 01:51:12
 title: big_buck_bunny_1080p_surround.avi_006.AVI.MP4
 artist: created with SUPER(C).v2011.bld.49
 encoder: eRightSoft
 comment: 09:51:32
Load subtitles in /media/95E5-18AE/
[VDPAU SUNXI] VE version 0x1623 opened.
==
Forced video codec: ffmpeg12vdpau
Forced video codec: ffh264vdpau
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264vdpau] vfm: ffmpeg (FFmpeg H.264 (VDPAU))
==
==
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 96.1 kbit/6.81% (ratio: 12009-176400)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [vdpau] 1920x1080 = 1920x1080 H.264 VDPAU acceleration 
[vdpau] Got display refresh rate 50.000 Hz.
[vdpau] If that value looks wrong give the -vo vdpau:fps=X suboption 
manually.
[VDPAU SUNXI] Presentation time not supported  0 ??% ??% ??,?% 0 0 
[VDPAU SUNXI] vdp_output_surface_put_bits_indexed called but unimplemented!
[VDPAU SUNXI] vdp_output_surface_render_output_surface called but 
unimplemented!
A:  44.9 V:  45.0 A-V: -0.045 ct: -0.000   0/  0 26%  0%  1.9% 0 0 


Exiting... (End of file)



Regards
Punith

-- 
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/groups/opt_out.


Re: [linux-sunxi] Re: [PATCH 1/3] mfd: axp20x: Add mfd driver for axp20x PMIC

2014-02-10 Thread Carlo Caione
On Mon, Feb 10, 2014 at 11:34 PM, Carlo Caione ca...@caione.org wrote:

 +static struct axp20x_dev *axp20x_pm_power_off;

 This looks pretty unconventional. What's the point of it?

 On a single board we can have multiple AXPs so I track which one is in
 charge of powering off the board (and to get the correct device in the
 axp20x_power_off())

snip

 +
 + if (!pm_power_off) {
 + axp20x_pm_power_off = axp20x;
 + pm_power_off = axp20x_power_off;
 + }

 Can you describe to me what you're using the pm_power_off call-back
 for please?

 It's meant to poweroff the board

Actually what is missing here is also a way to determine which device
is in charge of powering off when multiple AXPs are registered.
I'll fix it in v2.

Thanks,

-- 
Carlo Caione

-- 
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/groups/opt_out.