Re: [linux-sunxi] Re: i2s audio codec support for sun7i

2014-06-21 Thread Yassin Jaffer
Hi Puneet
Have a look into some on some of the drivers handle the regulators power.
rtl8723bs sdio wifi for example.


On Sat, Jun 21, 2014 at 4:49 PM, Puneet B punit...@gmail.com wrote:


  Here i am attaching my schematics of A20 board , KIndly tell how can pass
 get t 4 regulators for IOVDD,DVDD,AVDD,and DRVDD.

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


Re: [linux-sunxi] Re: [PATCH v6 3/7] mfd: AXP20x: Add bindings documentation

2014-06-21 Thread Carlo Caione
On Wed, Jun 18, 2014 at 11:06 AM, Lee Jones lee.jo...@linaro.org wrote:
 On 19/05/2014 21:47, Carlo Caione wrote:
  Bindings documentation for the AXP20x driver. In this file also
  sub-nodes are documented.

 I think this patch has been forgotten (I didn't find it in linus' tree
 or linux-next tree).

 This patch-set became confusing.  Some of the patches were applied in
 v5 and were still submitted for v6.  I need Carlo to rebase on top of
 v3.16-rc1+ and re-submit with the Acks he's collected so far.

I'm confused too. At the time of the submission v6 was already the
patchset without the patches from v5 already applied and v6 already
contains all the ACKs I have collected (i.e. the input/misc driver has
been already ack-ed by Dmitry, yet it seems not merged).
So what exactly do you want me to resubmit? The whole v6 on top of v3.16-rc1+?

-- 
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/d/optout.


Re: [linux-sunxi] Re: i2s audio codec support for sun7i

2014-06-21 Thread Puneet B
Yes Yassin, but not get any idea.

if you see this link, here they are passing via ldo.

http://e2e.ti.com/support/arm/sitara_arm/f/791/p/345940/1224371.aspx

* Regulators */ 
AVDD-supply = ldo4_reg; 
IOVDD-supply = ldo4_reg; 
DRVDD-supply = ldo4_reg; 
DVDD-supply = ldo1_reg; 
HPVDD-supply = ldo4_reg; 
SPRVDD-supply = ldo4_reg; 
SPLVDD-supply = ldo4_reg; 

Is it possible in sunxi?.

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/d/optout.


[linux-sunxi] [PATCH v10 1/5] ARM: sunxi: Add documentation for sunxi consumer infrared devices

2014-06-21 Thread Alexander Bersenev
This patch adds documentation for Device-Tree bindings for sunxi IR
controller.

Signed-off-by: Alexander Bersenev b...@hackerdom.ru
Signed-off-by: Alexsey Shestacov wingr...@linux-sunxi.org
---
 .../devicetree/bindings/media/sunxi-ir.txt |   23 
 1 files changed, 23 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/sunxi-ir.txt

diff --git a/Documentation/devicetree/bindings/media/sunxi-ir.txt 
b/Documentation/devicetree/bindings/media/sunxi-ir.txt
new file mode 100644
index 000..014dd8b
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/sunxi-ir.txt
@@ -0,0 +1,23 @@
+Device-Tree bindings for SUNXI IR controller found in sunXi SoC family
+
+Required properties:
+- compatible   : should be allwinner,sun7i-a20-ir;
+- clocks   : list of clock specifiers, corresponding to
+ entries in clock-names property;
+- clock-names  : should contain apb and ir entries;
+- interrupts   : should contain IR IRQ number;
+- reg  : should contain IO map address for IR.
+
+Optional properties:
+- linux,rc-map-name : Remote control map name.
+
+Example:
+
+ir0: ir@01c21800 {
+   compatible = allwinner,sun7i-a20-ir;
+   clocks = apb0_gates 6, ir0_clk;
+   clock-names = apb, ir;
+   interrupts = 0 5 1;
+   reg = 0x01C21800 0x40;
+   linux,rc-map-name = rc-rc6-mce;
+};
-- 
1.7.1

-- 
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] [PATCH v10 2/5] [media] rc: add sunxi-ir driver

2014-06-21 Thread Alexander Bersenev
This patch adds driver for sunxi IR controller.
It is based on Alexsey Shestacov's work based on the original driver
supplied by Allwinner.

Signed-off-by: Alexander Bersenev b...@hackerdom.ru
Signed-off-by: Alexsey Shestacov wingr...@linux-sunxi.org
---
 drivers/media/rc/Kconfig |   10 ++
 drivers/media/rc/Makefile|1 +
 drivers/media/rc/sunxi-cir.c |  318 ++
 3 files changed, 329 insertions(+), 0 deletions(-)
 create mode 100644 drivers/media/rc/sunxi-cir.c

diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig
index 8fbd377..9427fad 100644
--- a/drivers/media/rc/Kconfig
+++ b/drivers/media/rc/Kconfig
@@ -343,4 +343,14 @@ config RC_ST
 
 If you're not sure, select N here.
 
+config IR_SUNXI
+tristate SUNXI IR remote control
+depends on RC_CORE
+depends on ARCH_SUNXI
+---help---
+  Say Y if you want to use sunXi internal IR Controller
+
+  To compile this driver as a module, choose M here: the module will
+  be called sunxi-ir.
+
 endif #RC_DEVICES
diff --git a/drivers/media/rc/Makefile b/drivers/media/rc/Makefile
index f8b54ff..9ee9ee7 100644
--- a/drivers/media/rc/Makefile
+++ b/drivers/media/rc/Makefile
@@ -32,4 +32,5 @@ obj-$(CONFIG_IR_GPIO_CIR) += gpio-ir-recv.o
 obj-$(CONFIG_IR_IGUANA) += iguanair.o
 obj-$(CONFIG_IR_TTUSBIR) += ttusbir.o
 obj-$(CONFIG_RC_ST) += st_rc.o
+obj-$(CONFIG_IR_SUNXI) += sunxi-cir.o
 obj-$(CONFIG_IR_IMG) += img-ir/
diff --git a/drivers/media/rc/sunxi-cir.c b/drivers/media/rc/sunxi-cir.c
new file mode 100644
index 000..5971b69
--- /dev/null
+++ b/drivers/media/rc/sunxi-cir.c
@@ -0,0 +1,318 @@
+/*
+ * Driver for Allwinner sunXi IR controller
+ *
+ * Copyright (C) 2014 Alexsey Shestacov wingr...@linux-sunxi.org
+ * Copyright (C) 2014 Alexander Bersenev b...@hackerdom.ru
+ *
+ * Based on sun5i-ir.c:
+ * Copyright (C) 2007-2012 Daniel Wang
+ * Allwinner Technology Co., Ltd. www.allwinnertech.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.h
+#include linux/interrupt.h
+#include linux/module.h
+#include linux/of_platform.h
+#include media/rc-core.h
+
+#define SUNXI_IR_DEV sunxi-ir
+
+/* Registers */
+/* IR Control */
+#define SUNXI_IR_CTL_REG  0x00
+/* Global Enable */
+#define REG_CTL_GENBIT(0)
+/* RX block enable */
+#define REG_CTL_RXEN   BIT(1)
+/* CIR mode */
+#define REG_CTL_MD (BIT(4) | BIT(5))
+
+/* Rx Config */
+#define SUNXI_IR_RXCTL_REG0x10
+/* Pulse Polarity Invert flag */
+#define REG_RXCTL_RPPI BIT(2)
+
+/* Rx Data */
+#define SUNXI_IR_RXFIFO_REG   0x20
+
+/* Rx Interrupt Enable */
+#define SUNXI_IR_RXINT_REG0x2C
+/* Rx FIFO Overflow */
+#define REG_RXINT_ROI_EN   BIT(0)
+/* Rx Packet End */
+#define REG_RXINT_RPEI_EN  BIT(1)
+/* Rx FIFO Data Available */
+#define REG_RXINT_RAI_EN   BIT(4)
+
+/* Rx FIFO available byte level */
+#define REG_RXINT_RAL(val)(((val)  8)  (GENMASK(11, 8)))
+
+/* Rx Interrupt Status */
+#define SUNXI_IR_RXSTA_REG0x30
+/* RX FIFO Get Available Counter */
+#define REG_RXSTA_GET_AC(val) (((val)  8)  (GENMASK(5, 0)))
+/* Clear all interrupt status value */
+#define REG_RXSTA_CLEARALL0xff
+
+/* IR Sample Config */
+#define SUNXI_IR_CIR_REG  0x34
+/* CIR_REG register noise threshold */
+#define REG_CIR_NTHR(val)(((val)  2)  (GENMASK(7, 2)))
+/* CIR_REG register idle threshold */
+#define REG_CIR_ITHR(val)(((val)  8)  (GENMASK(15, 8)))
+
+/* Hardware supported fifo size */
+#define SUNXI_IR_FIFO_SIZE16
+/* How many messages in FIFO trigger IRQ */
+#define TRIGGER_LEVEL 8
+/* Required frequency for IR0 or IR1 clock in CIR mode */
+#define SUNXI_IR_BASE_CLK 800
+/* Frequency after IR internal divider  */
+#define SUNXI_IR_CLK  (SUNXI_IR_BASE_CLK / 64)
+/* Sample period in ns */
+#define SUNXI_IR_SAMPLE   (10ul / SUNXI_IR_CLK)
+/* Noise threshold in samples  */
+#define SUNXI_IR_RXNOISE  1
+/* Idle Threshold in samples */
+#define SUNXI_IR_RXIDLE   20
+/* Time after which device stops sending data in ms */
+#define SUNXI_IR_TIMEOUT  120
+
+struct sunxi_ir {
+   spinlock_t  ir_lock;
+   struct rc_dev   *rc;
+   void __iomem*base;
+   int irq;
+   struct clk  *clk;
+   struct clk  *apb_clk;
+   const char  *map_name;
+};
+
+static irqreturn_t sunxi_ir_irq(int irqno, void *dev_id)
+{
+   unsigned long status;
+ 

[linux-sunxi] [PATCH v10 3/5] ARM: sunxi: Add pins for IR controller on A20 to dtsi

2014-06-21 Thread Alexander Bersenev
This patch adds pins for two IR controllers on A20

Signed-off-by: Alexander Bersenev b...@hackerdom.ru
Signed-off-by: Alexsey Shestacov wingr...@linux-sunxi.org
---
 arch/arm/boot/dts/sun7i-a20.dtsi |   14 ++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index 01e9466..656d7d3 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -738,6 +738,20 @@
allwinner,drive = 2;
allwinner,pull = 0;
};
+
+   ir0_pins_a: ir0@0 {
+   allwinner,pins = PB3,PB4;
+   allwinner,function = ir0;
+   allwinner,drive = 0;
+   allwinner,pull = 0;
+   };
+
+   ir1_pins_a: ir1@0 {
+   allwinner,pins = PB22,PB23;
+   allwinner,function = ir1;
+   allwinner,drive = 0;
+   allwinner,pull = 0;
+   };
};
 
timer@01c20c00 {
-- 
1.7.1

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