Re: [PATCH v9] ARM: omap: edma: add suspend resume hook

2014-11-06 Thread Sekhar Nori
On Wednesday 05 November 2014 11:40 PM, Dave Gerlach wrote:
 Sekhar,
 On 11/05/2014 10:04 AM, Sekhar Nori wrote:
 On Wednesday 05 November 2014 09:27 PM, Dave Gerlach wrote:
 On 08/26/2014 03:52 AM, Daniel Mack wrote:
 This patch makes the edma driver resume correctly after suspend. Tested
 on an AM33xx platform with cyclic audio streams and omap_hsmmc.

 All information can be reconstructed by already known runtime
 information.

 As we now use some functions that were previously only used from __init
 context, annotations had to be dropped.

 [n...@ti.com: added error handling for runtime + suspend_late/early_resume]
 Signed-off-by: Nishanth Menon n...@ti.com
 Signed-off-by: Daniel Mack zon...@gmail.com
 Tested-by: Joel Fernandes jo...@ti.com
 Acked-by: Joel Fernandes jo...@ti.com
 ---
 Changes from v8:

* Drop the edma_suspend hook altogether. Even though back then
  when I wrote the code I was sure disabling the interrupts
  during suspend is necessary, tests now show it in fact isn't.
  My test setup still works if that code is omitted.
* Use SET_LATE_SYSTEM_SLEEP_PM_OPS in the dev_pm_ops
  declaration.

Thanks to Sekhar for pointing out the above.

  arch/arm/common/edma.c | 60 
 --
  1 file changed, 58 insertions(+), 2 deletions(-)

 Doesn't seem to be any comments here, any chance this can be picked up? This
 patch always seems to get missed but will be needed for suspend/resume on 
 both
 AM335x and AM437x.

 Dave, do you have a branch against mainline with suspend working on any
 of these SoCs using which I can test this patch?
 
 Yes, here is WIP of next version with all required patches + this one.
 https://github.com/dgerlach/linux-pm/tree/pm-ds0-v3.18-rc3-WIP
 
 For suspend to work you need to select:
 
 CONFIG_WKUP_M3_IPC=y
 CONFIG_WKUP_M3_RPROC=y

I get this:

arch/arm/mach-omap2/pm33xx.c:28:31: fatal error: linux/wkup_m3_ipc.h: No such 
file or directory
 #include linux/wkup_m3_ipc.h
   ^
compilation terminated.
make[1]: *** [arch/arm/mach-omap2/pm33xx.o] Error 1

Forgot to commit wkup_m3_ipc.h?

Thanks,
Sekhar
 

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/13 v10] omap 8250 based UART + DMA

2014-11-06 Thread Sebastian Andrzej Siewior
On 11/06/2014 04:14 AM, Greg KH wrote:
 I've now applied the patches here that I could, if I have missed any,
 please let me know and resend.

Thank you Greg. I pulled your tty-testing and it seems to work on
am335x-evm/dra7-evm.

Tony, if you could please take the two .dts files then the series would
be complete (that one dma patch was applied by Vinod during the merge
window).

 
 thanks,
 
 greg k-h
 
Sebastian
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/3] ARM: dts: AM43x: Fix DCDC3 regulator voltage

2014-11-06 Thread Keerthy
Fix DCDC3 volatge to 1.5V which is the right value to be supplied by
DCDC3 for all the boards.

Keerthy (3):
  ARM: dts: AM43x-EPOS-EVM: Fix DCDC3 voltage
  ARM: dts: AM437x-GP-EVM: Fix DCDC3 voltage
  ARM: dts: AM437x-SK-EVM: Fix DCDC3 voltage

 arch/arm/boot/dts/am437x-gp-evm.dts  |4 ++--
 arch/arm/boot/dts/am437x-sk-evm.dts  |4 ++--
 arch/arm/boot/dts/am43x-epos-evm.dts |4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] ARM: dts: AM437x-GP-EVM: Fix DCDC3 voltage

2014-11-06 Thread Keerthy
DCDC3 supplies voltage to DDR. Fix DCDC3 volatge to 1.5V which is the reset 
value. Programming to a non-reset value while executing from DDR will result
in random hangs.

Signed-off-by: Keerthy j-keer...@ti.com
---
 arch/arm/boot/dts/am437x-gp-evm.dts |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts 
b/arch/arm/boot/dts/am437x-gp-evm.dts
index e7ac47f..a521ac0 100644
--- a/arch/arm/boot/dts/am437x-gp-evm.dts
+++ b/arch/arm/boot/dts/am437x-gp-evm.dts
@@ -291,8 +291,8 @@
dcdc3: regulator-dcdc3 {
compatible = ti,tps65218-dcdc3;
regulator-name = vdcdc3;
-   regulator-min-microvolt = 135;
-   regulator-max-microvolt = 135;
+   regulator-min-microvolt = 150;
+   regulator-max-microvolt = 150;
regulator-boot-on;
regulator-always-on;
};
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] ARM: dts: AM437x-SK-EVM: Fix DCDC3 voltage

2014-11-06 Thread Keerthy
DCDC3 supplies voltage to DDR. Fix DCDC3 volatge to 1.5V which is the reset 
value. Programming to a non-reset value while executing from DDR will result
in random hangs.

Signed-off-by: Keerthy j-keer...@ti.com
---
 arch/arm/boot/dts/am437x-sk-evm.dts |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/am437x-sk-evm.dts 
b/arch/arm/boot/dts/am437x-sk-evm.dts
index 859ff3d..87aa4f3 100644
--- a/arch/arm/boot/dts/am437x-sk-evm.dts
+++ b/arch/arm/boot/dts/am437x-sk-evm.dts
@@ -363,8 +363,8 @@
dcdc3: regulator-dcdc3 {
compatible = ti,tps65218-dcdc3;
regulator-name = vdds_ddr;
-   regulator-min-microvolt = 135;
-   regulator-max-microvolt = 135;
+   regulator-min-microvolt = 150;
+   regulator-max-microvolt = 150;
regulator-boot-on;
regulator-always-on;
};
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] ARM: dts: AM43x-EPOS-EVM: Fix DCDC3 voltage

2014-11-06 Thread Keerthy
DCDC3 supplies voltage to DDR. Fix DCDC3 volatge to 1.5V which is the reset
value. Programming to a non-reset value while executing from DDR will result
in random hangs.

Signed-off-by: Keerthy j-keer...@ti.com
---
 arch/arm/boot/dts/am43x-epos-evm.dts |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/am43x-epos-evm.dts 
b/arch/arm/boot/dts/am43x-epos-evm.dts
index ac3e485..f7e9bba 100644
--- a/arch/arm/boot/dts/am43x-epos-evm.dts
+++ b/arch/arm/boot/dts/am43x-epos-evm.dts
@@ -358,8 +358,8 @@
dcdc3: regulator-dcdc3 {
compatible = ti,tps65218-dcdc3;
regulator-name = vdcdc3;
-   regulator-min-microvolt = 135;
-   regulator-max-microvolt = 135;
+   regulator-min-microvolt = 150;
+   regulator-max-microvolt = 150;
regulator-boot-on;
regulator-always-on;
};
-- 
1.7.9.5

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 02/11] ARM: dts: omap3-igep00x0: Move NAND configuration to a common place.

2014-11-06 Thread Enric Balletbo i Serra
At this moment all supported boards use same NAND chip, so has more sense
move the GPMC and NAND configuration to the omap3-igep.dtsi common place.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/omap3-igep.dtsi| 49 ++
 arch/arm/boot/dts/omap3-igep0020.dts | 47 -
 arch/arm/boot/dts/omap3-igep0030.dts | 51 
 3 files changed, 49 insertions(+), 98 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-igep.dtsi 
b/arch/arm/boot/dts/omap3-igep.dtsi
index fb1040d..04a58ab 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -128,6 +128,55 @@
};
 };
 
+gpmc {
+   nand@0,0 {
+   linux,mtd-name= micron,mt29c4g96maz;
+   reg = 0 0 4;  /* CS0, offset 0, IO size 4 */
+   nand-bus-width = 16;
+   gpmc,device-width = 2;
+   ti,nand-ecc-opt = bch8;
+
+   gpmc,sync-clk-ps = 0;
+   gpmc,cs-on-ns = 0;
+   gpmc,cs-rd-off-ns = 44;
+   gpmc,cs-wr-off-ns = 44;
+   gpmc,adv-on-ns = 6;
+   gpmc,adv-rd-off-ns = 34;
+   gpmc,adv-wr-off-ns = 44;
+   gpmc,we-off-ns = 40;
+   gpmc,oe-off-ns = 54;
+   gpmc,access-ns = 64;
+   gpmc,rd-cycle-ns = 82;
+   gpmc,wr-cycle-ns = 82;
+   gpmc,wr-access-ns = 40;
+   gpmc,wr-data-mux-bus-ns = 0;
+
+   #address-cells = 1;
+   #size-cells = 1;
+
+   partition@0 {
+   label = SPL;
+   reg = 0 0x10;
+   };
+   partition@8 {
+   label = U-Boot;
+   reg = 0x10 0x18;
+   };
+   partition@1c {
+   label = Environment;
+   reg = 0x28 0x10;
+   };
+   partition@28 {
+   label = Kernel;
+   reg = 0x38 0x30;
+   };
+   partition@78 {
+   label = Filesystem;
+   reg = 0x68 0x1f98;
+   };
+   };
+};
+
 i2c1 {
pinctrl-names = default;
pinctrl-0 = i2c1_pins;
diff --git a/arch/arm/boot/dts/omap3-igep0020.dts 
b/arch/arm/boot/dts/omap3-igep0020.dts
index 87d77e4..731ab8f 100644
--- a/arch/arm/boot/dts/omap3-igep0020.dts
+++ b/arch/arm/boot/dts/omap3-igep0020.dts
@@ -209,53 +209,6 @@
ranges = 0 0 0x 0x100,/* CS0: 16MB for NAND */
 5 0 0x2c00 0x0100;
 
-   nand@0,0 {
-   linux,mtd-name= micron,mt29c4g96maz;
-   reg = 0 0 4;  /* CS0, offset 0, IO size 4 */
-   nand-bus-width = 16;
-   gpmc,device-width = 2;
-   ti,nand-ecc-opt = bch8;
-
-   gpmc,sync-clk-ps = 0;
-   gpmc,cs-on-ns = 0;
-   gpmc,cs-rd-off-ns = 44;
-   gpmc,cs-wr-off-ns = 44;
-   gpmc,adv-on-ns = 6;
-   gpmc,adv-rd-off-ns = 34;
-   gpmc,adv-wr-off-ns = 44;
-   gpmc,we-off-ns = 40;
-   gpmc,oe-off-ns = 54;
-   gpmc,access-ns = 64;
-   gpmc,rd-cycle-ns = 82;
-   gpmc,wr-cycle-ns = 82;
-   gpmc,wr-access-ns = 40;
-   gpmc,wr-data-mux-bus-ns = 0;
-
-   #address-cells = 1;
-   #size-cells = 1;
-
-   partition@0 {
-   label = SPL;
-   reg = 0 0x10;
-   };
-   partition@8 {
-   label = U-Boot;
-   reg = 0x10 0x18;
-   };
-   partition@1c {
-   label = Environment;
-   reg = 0x28 0x10;
-   };
-   partition@28 {
-   label = Kernel;
-   reg = 0x38 0x30;
-   };
-   partition@78 {
-   label = Filesystem;
-   reg = 0x68 0x1f98;
-   };
-   };
-
ethernet@gpmc {
pinctrl-names = default;
pinctrl-0 = smsc9221_pins;
diff --git a/arch/arm/boot/dts/omap3-igep0030.dts 
b/arch/arm/boot/dts/omap3-igep0030.dts
index 2df1396..5862380 100644
--- a/arch/arm/boot/dts/omap3-igep0030.dts
+++ b/arch/arm/boot/dts/omap3-igep0030.dts
@@ -65,57 +65,6 @@
};
 };
 
-gpmc {
-   ranges = 0 0 0x 0x100;/* CS0: 16MB for NAND */
-
-   nand@0,0 {
-   linux,mtd-name= micron,mt29c4g96maz;
-   reg = 0 0 4;  /* CS0, offset 0, IO size 4 */
-   nand-bus-width = 16;
-   gpmc,device-width = 2;
- 

[PATCH 08/11] ARM: dts: omap3-igep0020-common: Introduce igep0020 common dtsi file.

2014-11-06 Thread Enric Balletbo i Serra
Use the omap3-igep0020-common.dtsi file and remove repeated parts leaving
the nodes that are not common between IGEPv2 hardware revisions.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/omap3-igep0020-common.dtsi | 246 +++
 arch/arm/boot/dts/omap3-igep0020.dts | 222 +---
 2 files changed, 247 insertions(+), 221 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap3-igep0020-common.dtsi

diff --git a/arch/arm/boot/dts/omap3-igep0020-common.dtsi 
b/arch/arm/boot/dts/omap3-igep0020-common.dtsi
new file mode 100644
index 000..e458c21
--- /dev/null
+++ b/arch/arm/boot/dts/omap3-igep0020-common.dtsi
@@ -0,0 +1,246 @@
+/*
+ * Common Device Tree Source for IGEPv2
+ *
+ * Copyright (C) 2014 Javier Martinez Canillas jav...@collabora.co.uk
+ * Copyright (C) 2014 Enric Balletbo i Serra eballe...@gmail.com
+ *
+ * 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 omap3-igep.dtsi
+#include omap-gpmc-smsc9221.dtsi
+
+/ {
+
+   leds {
+   pinctrl-names = default;
+   pinctrl-0 = leds_pins;
+   compatible = gpio-leds;
+
+   boot {
+label = omap3:green:boot;
+gpios = gpio1 26 GPIO_ACTIVE_HIGH;
+default-state = on;
+   };
+
+   user0 {
+label = omap3:red:user0;
+gpios = gpio1 27 GPIO_ACTIVE_HIGH;
+default-state = off;
+   };
+
+   user1 {
+label = omap3:red:user1;
+gpios = gpio1 28 GPIO_ACTIVE_HIGH;
+default-state = off;
+   };
+
+   user2 {
+   label = omap3:green:user1;
+   gpios = twl_gpio 19 GPIO_ACTIVE_LOW;
+   };
+   };
+
+   /* HS USB Port 1 Power */
+   hsusb1_power: hsusb1_power_reg {
+   compatible = regulator-fixed;
+   regulator-name = hsusb1_vbus;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   gpio = twl_gpio 18 GPIO_ACTIVE_LOW;  /* GPIO LEDA */
+   startup-delay-us = 7;
+   };
+
+   /* HS USB Host PHY on PORT 1 */
+   hsusb1_phy: hsusb1_phy {
+   compatible = usb-nop-xceiv;
+   reset-gpios = gpio1 24 GPIO_ACTIVE_LOW; /* gpio_24 */
+   vcc-supply = hsusb1_power;
+   };
+
+   tfp410: encoder@0 {
+   compatible = ti,tfp410;
+   powerdown-gpios = gpio6 10 GPIO_ACTIVE_LOW; /* gpio_170 */
+
+   ports {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   port@0 {
+   reg = 0;
+
+   tfp410_in: endpoint@0 {
+   remote-endpoint = dpi_out;
+   };
+   };
+
+   port@1 {
+   reg = 1;
+
+   tfp410_out: endpoint@0 {
+   remote-endpoint = dvi_connector_in;
+   };
+   };
+   };
+   };
+
+   dvi0: connector@0 {
+   compatible = dvi-connector;
+   label = dvi;
+
+   digital;
+
+   ddc-i2c-bus = i2c3;
+
+   port {
+   dvi_connector_in: endpoint {
+   remote-endpoint = tfp410_out;
+   };
+   };
+   };
+};
+
+omap3_pmx_core {
+   pinctrl-names = default;
+   pinctrl-0 = 
+   tfp410_pins
+   dss_dpi_pins
+   ;
+
+   tfp410_pins: pinmux_tfp410_pins {
+   pinctrl-single,pins = 
+   0x196 (PIN_OUTPUT | MUX_MODE4)   /* hdq_sio.gpio_170 */
+   ;
+   };
+
+   dss_dpi_pins: pinmux_dss_dpi_pins {
+   pinctrl-single,pins = 
+   0x0a4 (PIN_OUTPUT | MUX_MODE0)   /* dss_pclk.dss_pclk */
+   0x0a6 (PIN_OUTPUT | MUX_MODE0)   /* dss_hsync.dss_hsync 
*/
+   0x0a8 (PIN_OUTPUT | MUX_MODE0)   /* dss_vsync.dss_vsync 
*/
+   0x0aa (PIN_OUTPUT | MUX_MODE0)   /* 
dss_acbias.dss_acbias */
+   0x0ac (PIN_OUTPUT | MUX_MODE0)   /* dss_data0.dss_data0 
*/
+   0x0ae (PIN_OUTPUT | MUX_MODE0)   /* dss_data1.dss_data1 
*/
+   0x0b0 (PIN_OUTPUT | MUX_MODE0)   /* dss_data2.dss_data2 
*/
+   0x0b2 (PIN_OUTPUT | MUX_MODE0)   /* dss_data3.dss_data3 
*/
+   

[PATCH 03/11] ARM: dts: omap3-igep0030: Specify IGEP COM revision in device tree.

2014-11-06 Thread Enric Balletbo i Serra
We'll introduce new hardware revisions soon. This patch is only to
indicate which board revision supports this device tree file in order
to avoid confusions.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/omap3-igep0030.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-igep0030.dts 
b/arch/arm/boot/dts/omap3-igep0030.dts
index 5862380..d7527b6 100644
--- a/arch/arm/boot/dts/omap3-igep0030.dts
+++ b/arch/arm/boot/dts/omap3-igep0030.dts
@@ -1,5 +1,5 @@
 /*
- * Device Tree Source for IGEP COM MODULE (TI OMAP AM/DM37x)
+ * Device Tree Source for IGEP COM MODULE Rev. E (TI OMAP AM/DM37x)
  *
  * Copyright (C) 2012 Javier Martinez Canillas jav...@collabora.co.uk
  * Copyright (C) 2012 Enric Balletbo i Serra eballe...@gmail.com
@@ -12,7 +12,7 @@
 #include omap3-igep.dtsi
 
 / {
-   model = IGEP COM MODULE (TI OMAP AM/DM37x);
+   model = IGEP COM MODULE Rev. E (TI OMAP AM/DM37x);
compatible = isee,omap3-igep0030, ti,omap36xx, ti,omap3;
 
leds {
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 10/11] ARM: dts: omap3-igep00x0: Remove i2c2 node.

2014-11-06 Thread Enric Balletbo i Serra
We can't suppose that the i2c2 pins are configured as I2C bus, these pins are
connected to expansion connectors.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/omap3-igep.dtsi | 13 -
 1 file changed, 13 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-igep.dtsi 
b/arch/arm/boot/dts/omap3-igep.dtsi
index 6118e7f..8a63ad2 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -92,13 +92,6 @@
;
};
 
-   i2c2_pins: pinmux_i2c2_pins {
-   pinctrl-single,pins = 
-   0x18e (PIN_INPUT | MUX_MODE0)   /* i2c2_scl.i2c2_scl */
-   0x190 (PIN_INPUT | MUX_MODE0)   /* i2c2_sda.i2c2_sda */
-   ;
-   };
-
i2c3_pins: pinmux_i2c3_pins {
pinctrl-single,pins = 
0x192 (PIN_INPUT | MUX_MODE0)   /* i2c3_scl.i2c3_scl */
@@ -177,12 +170,6 @@
 #include twl4030.dtsi
 #include twl4030_omap3.dtsi
 
-i2c2 {
-   pinctrl-names = default;
-   pinctrl-0 = i2c2_pins;
-   clock-frequency = 40;
-};
-
 i2c3 {
pinctrl-names = default;
pinctrl-0 = i2c3_pins;
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 09/11] ARM: dts: omap3-igep0020-rev-f: Support IGEPv2 Rev. F

2014-11-06 Thread Enric Balletbo i Serra
Add support for the new hardware revision of the IGEPv2. Basically, the new
revision F replaces the old Wifi module for a Wilink8 based module.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/Makefile |  1 +
 arch/arm/boot/dts/omap3-igep0020-rev-f.dts | 45 ++
 2 files changed, 46 insertions(+)
 create mode 100644 arch/arm/boot/dts/omap3-igep0020-rev-f.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 454feb61..fb19271 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -302,6 +302,7 @@ dtb-$(CONFIG_ARCH_OMAP3) += am3517-craneboard.dtb \
omap3-ha.dtb \
omap3-ha-lcd.dtb \
omap3-igep0020.dtb \
+   omap3-igep0020-rev-f.dtb \
omap3-igep0030.dtb \
omap3-igep0030-rev-g.dtb \
omap3-ldp.dtb \
diff --git a/arch/arm/boot/dts/omap3-igep0020-rev-f.dts 
b/arch/arm/boot/dts/omap3-igep0020-rev-f.dts
new file mode 100644
index 000..cc8bd0c
--- /dev/null
+++ b/arch/arm/boot/dts/omap3-igep0020-rev-f.dts
@@ -0,0 +1,45 @@
+/*
+ * Device Tree Source for IGEPv2 Rev. F (TI OMAP AM/DM37x)
+ *
+ * Copyright (C) 2012 Javier Martinez Canillas jav...@collabora.co.uk
+ * Copyright (C) 2012 Enric Balletbo i Serra eballe...@gmail.com
+ *
+ * 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 omap3-igep0020-common.dtsi
+
+/ {
+   model = IGEPv2 Rev. F (TI OMAP AM/DM37x);
+   compatible = isee,omap3-igep0020-rev-f, ti,omap36xx, ti,omap3;
+
+   /* Regulator to trigger the WL_EN signal of the Wifi module */
+   lbep5clwmc_wlen: regulator-lbep5clwmc-wlen {
+   compatible = regulator-fixed;
+   regulator-name = regulator-lbep5clwmc-wlen;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   gpio = gpio5 11 GPIO_ACTIVE_HIGH;/* gpio_139 - 
WL_EN */
+   enable-active-high;
+   };
+};
+
+omap3_pmx_core {
+   lbep5clwmc_pins: pinmux_lbep5clwmc_pins {
+   pinctrl-single,pins = 
+   OMAP3_CORE1_IOPAD(0x21d4, PIN_INPUT | MUX_MODE4)
/* mcspi1_cs3.gpio_177 - W_IRQ */
+   OMAP3_CORE1_IOPAD(0x2166, PIN_OUTPUT | MUX_MODE4)   
/* sdmmc2_dat5.gpio_137 - BT_EN */
+   OMAP3_CORE1_IOPAD(0x216a, PIN_OUTPUT | MUX_MODE4)   
/* sdmmc2_dat7.gpio_139 - WL_EN */
+   ;
+   };
+};
+
+mmc2 {
+   pinctrl-names = default;
+   pinctrl-0 = mmc2_pins lbep5clwmc_pins;
+   vmmc-supply = lbep5clwmc_wlen;
+   bus-width = 4;
+   non-removable;
+};
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 06/11] ARM: dts: omap3-igep0030-common: Introduce igep0030 common dtsi file.

2014-11-06 Thread Enric Balletbo i Serra
Use the omap3-igep0030-common.dtsi file and remove repeated parts leaving
the nodes that are not common between IGEP COM MODULE hardware revisions.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/omap3-igep0030-common.dtsi | 60 
 arch/arm/boot/dts/omap3-igep0030.dts | 58 +--
 2 files changed, 69 insertions(+), 49 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap3-igep0030-common.dtsi

diff --git a/arch/arm/boot/dts/omap3-igep0030-common.dtsi 
b/arch/arm/boot/dts/omap3-igep0030-common.dtsi
new file mode 100644
index 000..0cb1527
--- /dev/null
+++ b/arch/arm/boot/dts/omap3-igep0030-common.dtsi
@@ -0,0 +1,60 @@
+/*
+ * Common Device Tree Source for IGEP COM MODULE
+ *
+ * Copyright (C) 2014 Javier Martinez Canillas jav...@collabora.co.uk
+ * Copyright (C) 2014 Enric Balletbo i Serra eballe...@gmail.com
+ *
+ * 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 omap3-igep.dtsi
+
+/ {
+   leds: gpio_leds {
+   compatible = gpio-leds;
+
+   user0 {
+label = omap3:red:user0;
+gpios = twl_gpio 18 GPIO_ACTIVE_LOW;/* LEDA 
*/
+default-state = off;
+   };
+
+   user1 {
+label = omap3:green:user1;
+gpios = twl_gpio 19 GPIO_ACTIVE_LOW;/* LEDB 
*/
+default-state = off;
+   };
+
+   user2 {
+label = omap3:red:user1;
+gpios = gpio1 16 GPIO_ACTIVE_LOW;   /* 
gpio_16 */
+default-state = off;
+   };
+   };
+};
+
+omap3_pmx_core {
+   uart2_pins: pinmux_uart2_pins {
+   pinctrl-single,pins = 
+   OMAP3_CORE1_IOPAD(0x216c, PIN_INPUT | MUX_MODE1)
/* mcbsp3_dx.uart2_cts */
+   OMAP3_CORE1_IOPAD(0x216e, PIN_OUTPUT | MUX_MODE1)   
/* mcbsp3_dr.uart2_rts */
+   OMAP3_CORE1_IOPAD(0x2170, PIN_OUTPUT | MUX_MODE1)   
/* mcbsp3_clk.uart2_tx */
+   OMAP3_CORE1_IOPAD(0x2172, PIN_INPUT | MUX_MODE1)
/* mcbsp3_fsx.uart2_rx */
+   ;
+   };
+};
+
+omap3_pmx_core2 {
+   leds_core2_pins: pinmux_leds_core2_pins {
+   pinctrl-single,pins = 
+   OMAP3630_CORE2_IOPAD(0x25e0, PIN_OUTPUT | MUX_MODE4)
/* etk_d2.gpio_16 */
+   ;
+   };
+};
+
+uart2 {
+   pinctrl-names = default;
+   pinctrl-0 = uart2_pins;
+};
diff --git a/arch/arm/boot/dts/omap3-igep0030.dts 
b/arch/arm/boot/dts/omap3-igep0030.dts
index cc2a374..8150f47 100644
--- a/arch/arm/boot/dts/omap3-igep0030.dts
+++ b/arch/arm/boot/dts/omap3-igep0030.dts
@@ -9,42 +9,12 @@
  * published by the Free Software Foundation.
  */
 
-#include omap3-igep.dtsi
+#include omap3-igep0030-common.dtsi
 
 / {
model = IGEP COM MODULE Rev. E (TI OMAP AM/DM37x);
compatible = isee,omap3-igep0030, ti,omap36xx, ti,omap3;
 
-   leds {
-   pinctrl-names = default;
-   pinctrl-0 = leds_pins;
-   compatible = gpio-leds;
-
-   boot {
-label = omap3:green:boot;
-gpios = twl_gpio 13 GPIO_ACTIVE_LOW;
-default-state = on;
-   };
-
-   user0 {
-label = omap3:red:user0;
-gpios = twl_gpio 18 GPIO_ACTIVE_LOW; /* LEDA */
-default-state = off;
-   };
-
-   user1 {
-label = omap3:green:user1;
-gpios = twl_gpio 19 GPIO_ACTIVE_LOW; /* LEDB */
-default-state = off;
-   };
-
-   user2 {
-label = omap3:red:user1;
-gpios = gpio1 16 GPIO_ACTIVE_LOW;
-default-state = off;
-   };
-   };
-
/* Regulator to trigger the WIFI_PDN signal of the Wifi module */
lbee1usjyc_pdn: lbee1usjyc_pdn {
compatible = regulator-fixed;
@@ -75,22 +45,16 @@
OMAP3_CORE1_IOPAD(0x216a, PIN_OUTPUT | MUX_MODE4)   
/* sdmmc2_dat7.gpio_139 - RST_N_B */
;
};
-
-   uart2_pins: pinmux_uart2_pins {
-   pinctrl-single,pins = 
-   OMAP3_CORE1_IOPAD(0x216c, PIN_INPUT | MUX_MODE1)
/* mcbsp3_dx.uart2_cts */
-   OMAP3_CORE1_IOPAD(0x216e, PIN_OUTPUT | MUX_MODE1)   
/* mcbsp3_dr.uart2_rts */
-   OMAP3_CORE1_IOPAD(0x2170, PIN_OUTPUT | MUX_MODE1)   
/* mcbsp3_clk.uart2_tx */
-   

[PATCH 07/11] ARM: dts: omap3-igep0030-rev-g: Support IGEP COM MODULE Rev. G

2014-11-06 Thread Enric Balletbo i Serra
Add support for the new hardware revision of the IGEP COM MODULE. Basically,
the new revision G replaces the old Wifi module for a Wilink8 based module.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/Makefile |  1 +
 arch/arm/boot/dts/omap3-igep0030-rev-g.dts | 67 ++
 2 files changed, 68 insertions(+)
 create mode 100644 arch/arm/boot/dts/omap3-igep0030-rev-g.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 38c89ca..454feb61 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -303,6 +303,7 @@ dtb-$(CONFIG_ARCH_OMAP3) += am3517-craneboard.dtb \
omap3-ha-lcd.dtb \
omap3-igep0020.dtb \
omap3-igep0030.dtb \
+   omap3-igep0030-rev-g.dtb \
omap3-ldp.dtb \
omap3-lilly-dbb056.dtb \
omap3-n900.dtb \
diff --git a/arch/arm/boot/dts/omap3-igep0030-rev-g.dts 
b/arch/arm/boot/dts/omap3-igep0030-rev-g.dts
new file mode 100644
index 000..9326b28
--- /dev/null
+++ b/arch/arm/boot/dts/omap3-igep0030-rev-g.dts
@@ -0,0 +1,67 @@
+/*
+ * Device Tree Source for IGEP COM MODULE Rev. G (TI OMAP AM/DM37x)
+ *
+ * Copyright (C) 2014 Javier Martinez Canillas jav...@collabora.co.uk
+ * Copyright (C) 2014 Enric Balletbo i Serra eballe...@gmail.com
+ *
+ * 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 omap3-igep0030-common.dtsi
+
+/ {
+   model = IGEP COM MODULE Rev. G (TI OMAP AM/DM37x);
+   compatible = isee,omap3-igep0030-rev-g, ti,omap36xx, ti,omap3;
+
+   /* Regulator to trigger the WL_EN signal of the Wifi module */
+   lbep5clwmc_wlen: regulator-lbep5clwmc-wlen {
+   compatible = regulator-fixed;
+   regulator-name = regulator-lbep5clwmc-wlen;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   gpio = gpio5 11 GPIO_ACTIVE_HIGH;/* gpio_139 - 
WL_EN */
+   enable-active-high;
+   };
+};
+
+omap3_pmx_core {
+   lbep5clwmc_pins: pinmux_lbep5clwmc_pins {
+   pinctrl-single,pins = 
+   OMAP3_CORE1_IOPAD(0x2164, PIN_INPUT | MUX_MODE4)
/* sdmmc2_dat4.gpio_136 - W_IRQ */
+   OMAP3_CORE1_IOPAD(0x2166, PIN_OUTPUT | MUX_MODE4)   
/* sdmmc2_dat5.gpio_137 - BT_EN */
+   OMAP3_CORE1_IOPAD(0x216a, PIN_OUTPUT | MUX_MODE4)   
/* sdmmc2_dat7.gpio_139 - WL_EN */
+   ;
+   };
+
+   leds_pins: pinmux_leds_pins {
+   pinctrl-single,pins = 
+   OMAP3_CORE1_IOPAD(0x21be, PIN_OUTPUT | MUX_MODE4)   
/* i2c2_scl.gpio_168 */
+   ;
+   };
+
+};
+
+i2c2 {
+   status = disabled;
+};
+
+leds {
+   pinctrl-names = default;
+   pinctrl-0 = leds_pins leds_core2_pins;
+
+   boot {
+   label = omap3:green:boot;
+   gpios = gpio6 8 GPIO_ACTIVE_HIGH;
+   default-state = on;
+   };
+};
+
+mmc2 {
+   pinctrl-names = default;
+   pinctrl-0 = mmc2_pins lbep5clwmc_pins;
+   vmmc-supply = lbep5clwmc_wlen;
+   bus-width = 4;
+   non-removable;
+};
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 05/11] ARM: dts: omap3-igep00x0: Move outside common file the on board Wifi module.

2014-11-06 Thread Enric Balletbo i Serra
New IGEP boards revisions will use another Wifi module, so this patch moves
the DT nodes outside the common omap3-igep.dtsi file to specific DT for every
board.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/omap3-igep.dtsi| 29 ---
 arch/arm/boot/dts/omap3-igep0020.dts | 39 
 arch/arm/boot/dts/omap3-igep0030.dts | 39 
 3 files changed, 78 insertions(+), 29 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-igep.dtsi 
b/arch/arm/boot/dts/omap3-igep.dtsi
index 04a58ab..6118e7f 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -31,18 +31,6 @@
regulator-always-on;
};
 
-   lbee1usjyc_vmmc: lbee1usjyc_vmmc {
-   pinctrl-names = default;
-   pinctrl-0 = lbee1usjyc_pins;
-   compatible = regulator-fixed;
-   regulator-name = regulator-lbee1usjyc;
-   regulator-min-microvolt = 330;
-   regulator-max-microvolt = 330;
-   gpio = gpio5 10 GPIO_ACTIVE_HIGH;/* gpio_138 WIFI_PDN */
-   startup-delay-us = 1;
-   enable-active-high;
-   vin-supply = vdd33;
-   };
 };
 
 omap3_pmx_core {
@@ -60,15 +48,6 @@
;
};
 
-   /* WiFi/BT combo */
-   lbee1usjyc_pins: pinmux_lbee1usjyc_pins {
-   pinctrl-single,pins = 
-   0x136 (PIN_OUTPUT | MUX_MODE4)  /* sdmmc2_dat5.gpio_137 
*/
-   0x138 (PIN_OUTPUT | MUX_MODE4)  /* sdmmc2_dat6.gpio_138 
*/
-   0x13a (PIN_OUTPUT | MUX_MODE4)  /* sdmmc2_dat7.gpio_139 
*/
-   ;
-   };
-
mcbsp2_pins: pinmux_mcbsp2_pins {
pinctrl-single,pins = 
0x10c (PIN_INPUT | MUX_MODE0)   /* 
mcbsp2_fsx.mcbsp2_fsx */
@@ -223,14 +202,6 @@
   bus-width = 4;
 };
 
-mmc2 {
-   pinctrl-names = default;
-   pinctrl-0 = mmc2_pins;
-   vmmc-supply = lbee1usjyc_vmmc;
-   bus-width = 4;
-   non-removable;
-};
-
 mmc3 {
status = disabled;
 };
diff --git a/arch/arm/boot/dts/omap3-igep0020.dts 
b/arch/arm/boot/dts/omap3-igep0020.dts
index 75a3ac3..0d82f09 100644
--- a/arch/arm/boot/dts/omap3-igep0020.dts
+++ b/arch/arm/boot/dts/omap3-igep0020.dts
@@ -45,6 +45,27 @@
};
};
 
+   /* Regulator to trigger the WIFI_PDN signal of the Wifi module */
+   lbee1usjyc_pdn: lbee1usjyc_pdn {
+   compatible = regulator-fixed;
+   regulator-name = regulator-lbee1usjyc-pdn;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   gpio = gpio5 10 GPIO_ACTIVE_HIGH;/* gpio_138 - WIFI_PDN 
*/
+   startup-delay-us = 1;
+   enable-active-high;
+   };
+
+   /* Regulator to trigger the RESET_N_W signal of the Wifi module */
+   lbee1usjyc_reset_n_w: lbee1usjyc_reset_n_w {
+   compatible = regulator-fixed;
+   regulator-name = regulator-lbee1usjyc-reset-n-w;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   gpio = gpio5 11 GPIO_ACTIVE_HIGH;/* gpio_139 - RESET_N_W 
*/
+   enable-active-high;
+   };
+
/* HS USB Port 1 Power */
hsusb1_power: hsusb1_power_reg {
compatible = regulator-fixed;
@@ -150,6 +171,14 @@
;
};
 
+   lbee1usjyc_pins: pinmux_lbee1usjyc_pins {
+   pinctrl-single,pins = 
+   OMAP3_CORE1_IOPAD(0x2166, PIN_OUTPUT | MUX_MODE4)   
/* sdmmc2_dat5.gpio_137 - RESET_N_W */
+   OMAP3_CORE1_IOPAD(0x2168, PIN_OUTPUT | MUX_MODE4)   
/* sdmmc2_dat6.gpio_138 - WIFI_PDN */
+   OMAP3_CORE1_IOPAD(0x216a, PIN_OUTPUT | MUX_MODE4)   
/* sdmmc2_dat7.gpio_139 - RST_N_B */
+   ;
+   };
+
uart2_pins: pinmux_uart2_pins {
pinctrl-single,pins = 
OMAP3_CORE1_IOPAD(0x2174, PIN_INPUT | MUX_MODE0)
/* uart2_cts.uart2_cts */
@@ -218,6 +247,16 @@
};
 };
 
+/* On board Wifi module */
+mmc2 {
+   pinctrl-names = default;
+   pinctrl-0 = mmc2_pins lbee1usjyc_pins;
+   vmmc-supply = lbee1usjyc_pdn;
+   vmmc_aux-supply = lbee1usjyc_reset_n_w;
+   bus-width = 4;
+   non-removable;
+};
+
 uart2 {
pinctrl-names = default;
pinctrl-0 = uart2_pins;
diff --git a/arch/arm/boot/dts/omap3-igep0030.dts 
b/arch/arm/boot/dts/omap3-igep0030.dts
index d7527b6..cc2a374 100644
--- a/arch/arm/boot/dts/omap3-igep0030.dts
+++ b/arch/arm/boot/dts/omap3-igep0030.dts
@@ -44,9 +44,38 @@
 default-state = off;
};
};
+
+   /* Regulator to trigger the WIFI_PDN signal of the Wifi 

[PATCH 11/11] ARM: OMAP2+: igep00x0: Add pdata-quirks for the btwilink device.

2014-11-06 Thread Enric Balletbo i Serra
Add btwilink device for IGEPv2 Rev. F and IGEP COM MODULE Rev. G.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/mach-omap2/pdata-quirks.c | 36 ++--
 1 file changed, 34 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/pdata-quirks.c 
b/arch/arm/mach-omap2/pdata-quirks.c
index c95346c..e72f0fc 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -13,6 +13,7 @@
 #include linux/init.h
 #include linux/kernel.h
 #include linux/of_platform.h
+#include linux/ti_wilink_st.h
 #include linux/wl12xx.h
 
 #include linux/platform_data/pinctrl-single.h
@@ -139,8 +140,38 @@ static void __init omap3_sbc_t3530_legacy_init(void)
omap_ads7846_init(1, 57, 0, NULL);
 }
 
-static void __init omap3_igep0020_legacy_init(void)
+struct ti_st_plat_data wilink_pdata = {
+   .nshutdown_gpio = 137,
+   .dev_name = /dev/ttyO1,
+   .flow_cntrl = 1,
+   .baud_rate = 30,
+};
+
+static struct platform_device wl18xx_device = {
+   .name   = kim,
+   .id = -1,
+   .dev= {
+   .platform_data = wilink_pdata,
+   }
+};
+
+static struct platform_device btwilink_device = {
+   .name   = btwilink,
+   .id = -1,
+};
+
+static void __init omap3_igep0020_rev_f_legacy_init(void)
+{
+   legacy_init_wl12xx(0, 0, 177);
+   platform_device_register(wl18xx_device);
+   platform_device_register(btwilink_device);
+}
+
+static void __init omap3_igep0030_rev_g_legacy_init(void)
 {
+   legacy_init_wl12xx(0, 0, 136);
+   platform_device_register(wl18xx_device);
+   platform_device_register(btwilink_device);
 }
 
 static void __init omap3_evm_legacy_init(void)
@@ -393,7 +424,8 @@ static struct pdata_init pdata_quirks[] __initdata = {
{ nokia,omap3-n900, nokia_n900_legacy_init, },
{ nokia,omap3-n9, hsmmc2_internal_input_clk, },
{ nokia,omap3-n950, hsmmc2_internal_input_clk, },
-   { isee,omap3-igep0020, omap3_igep0020_legacy_init, },
+   { isee,omap3-igep0020-rev-f, omap3_igep0020_rev_f_legacy_init, },
+   { isee,omap3-igep0030-rev-g, omap3_igep0030_rev_g_legacy_init, },
{ ti,omap3-evm-37xx, omap3_evm_legacy_init, },
{ ti,omap3-zoom3, omap3_zoom_legacy_init, },
{ ti,am3517-evm, am3517_evm_legacy_init, },
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 04/11] ARM: dts: omap3-igep0020: Specify IGEPv2 revision in device tree.

2014-11-06 Thread Enric Balletbo i Serra
We'll introduce new hardware revisions soon. This patch is only to
indicate which board revision supports this device tree file in order
to avoid confusions.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/omap3-igep0020.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-igep0020.dts 
b/arch/arm/boot/dts/omap3-igep0020.dts
index 731ab8f..75a3ac3 100644
--- a/arch/arm/boot/dts/omap3-igep0020.dts
+++ b/arch/arm/boot/dts/omap3-igep0020.dts
@@ -1,5 +1,5 @@
 /*
- * Device Tree Source for IGEPv2 Rev. (TI OMAP AM/DM37x)
+ * Device Tree Source for IGEPv2 Rev. C (TI OMAP AM/DM37x)
  *
  * Copyright (C) 2012 Javier Martinez Canillas jav...@collabora.co.uk
  * Copyright (C) 2012 Enric Balletbo i Serra eballe...@gmail.com
@@ -13,7 +13,7 @@
 #include omap-gpmc-smsc9221.dtsi
 
 / {
-   model = IGEPv2 (TI OMAP AM/DM37x);
+   model = IGEPv2 Rev. C (TI OMAP AM/DM37x);
compatible = isee,omap3-igep0020, ti,omap36xx, ti,omap3;
 
leds {
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 01/11] ARM: dts: omap3-igep00x0: Fix UART2 pins that aren't common.

2014-11-06 Thread Enric Balletbo i Serra
UART2 is used to connect the processor with the bluetooth chip, these pins
are not common between IGEPv2 boards and IGEP COM MODULE boards. This patch
muxes the correct pins for every board and removes UART2 configuration from
common omap3-igep.dtsi file.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/omap3-igep.dtsi| 12 
 arch/arm/boot/dts/omap3-igep0020.dts | 14 ++
 arch/arm/boot/dts/omap3-igep0030.dts | 16 
 3 files changed, 30 insertions(+), 12 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-igep.dtsi 
b/arch/arm/boot/dts/omap3-igep.dtsi
index e2d163b..fb1040d 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -53,13 +53,6 @@
;
};
 
-   uart2_pins: pinmux_uart2_pins {
-   pinctrl-single,pins = 
-   0x14a (PIN_INPUT | MUX_MODE0)   /* 
uart2_rx.uart2_rx */
-   0x148 (PIN_OUTPUT | MUX_MODE0)  /* 
uart2_tx.uart2_tx */
-   ;
-   };
-
uart3_pins: pinmux_uart3_pins {
pinctrl-single,pins = 
0x16e (PIN_INPUT | MUX_MODE0)   /* 
uart3_rx.uart3_rx */
@@ -198,11 +191,6 @@
pinctrl-0 = uart1_pins;
 };
 
-uart2 {
-   pinctrl-names = default;
-   pinctrl-0 = uart2_pins;
-};
-
 uart3 {
pinctrl-names = default;
pinctrl-0 = uart3_pins;
diff --git a/arch/arm/boot/dts/omap3-igep0020.dts 
b/arch/arm/boot/dts/omap3-igep0020.dts
index cc9343e..87d77e4 100644
--- a/arch/arm/boot/dts/omap3-igep0020.dts
+++ b/arch/arm/boot/dts/omap3-igep0020.dts
@@ -149,6 +149,15 @@
0x0da (PIN_OUTPUT | MUX_MODE0)   /* 
dss_data23.dss_data23 */
;
};
+
+   uart2_pins: pinmux_uart2_pins {
+   pinctrl-single,pins = 
+   OMAP3_CORE1_IOPAD(0x2174, PIN_INPUT | MUX_MODE0)
/* uart2_cts.uart2_cts */
+   OMAP3_CORE1_IOPAD(0x2176, PIN_OUTPUT | MUX_MODE0)   
/* uart2_rts .uart2_rts*/
+   OMAP3_CORE1_IOPAD(0x2178, PIN_OUTPUT | MUX_MODE0)   
/* uart2_tx.uart2_tx */
+   OMAP3_CORE1_IOPAD(0x217a, PIN_INPUT | MUX_MODE0)
/* uart2_rx.uart2_rx */
+   ;
+   };
 };
 
 omap3_pmx_core2 {
@@ -256,6 +265,11 @@
};
 };
 
+uart2 {
+   pinctrl-names = default;
+   pinctrl-0 = uart2_pins;
+};
+
 usbhshost {
port1-mode = ehci-phy;
 };
diff --git a/arch/arm/boot/dts/omap3-igep0030.dts 
b/arch/arm/boot/dts/omap3-igep0030.dts
index 84b7452..2df1396 100644
--- a/arch/arm/boot/dts/omap3-igep0030.dts
+++ b/arch/arm/boot/dts/omap3-igep0030.dts
@@ -46,6 +46,17 @@
};
 };
 
+omap3_pmx_core {
+   uart2_pins: pinmux_uart2_pins {
+   pinctrl-single,pins = 
+   OMAP3_CORE1_IOPAD(0x216c, PIN_INPUT | MUX_MODE1)
/* mcbsp3_dx.uart2_cts */
+   OMAP3_CORE1_IOPAD(0x216e, PIN_OUTPUT | MUX_MODE1)   
/* mcbsp3_dr.uart2_rts */
+   OMAP3_CORE1_IOPAD(0x2170, PIN_OUTPUT | MUX_MODE1)   
/* mcbsp3_clk.uart2_tx */
+   OMAP3_CORE1_IOPAD(0x2172, PIN_INPUT | MUX_MODE1)
/* mcbsp3_fsx.uart2_rx */
+   ;
+   };
+};
+
 omap3_pmx_core2 {
leds_pins: pinmux_leds_pins {
pinctrl-single,pins = 
@@ -104,3 +115,8 @@
};
};
 };
+
+uart2 {
+   pinctrl-names = default;
+   pinctrl-0 = uart2_pins;
+};
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 00/11] ARM: dts: igep00x0: Add support for new hardware revisions.

2014-11-06 Thread Enric Balletbo i Serra
Hi,

This series is based on omap-for-v3.19/dt from tmlind repository and adds
device tree support for two new hardware revisions of IGEPv2 and IGEP COM
MODULE.

Please could these patches be queued for 3.19 considering that these are not
fixes, might be nice to get them merged for 3.19 series.

Best regards,

Enric Balletbo i Serra (11):
  ARM: dts: omap3-igep00x0: Fix UART2 pins that aren't common.
  ARM: dts: omap3-igep00x0: Move NAND configuration to a common place.
  ARM: dts: omap3-igep0030: Specify IGEP COM revision in device tree.
  ARM: dts: omap3-igep0020: Specify IGEPv2 revision in device tree.
  ARM: dts: omap3-igep00x0: Move outside common file the on board Wifi module.
  ARM: dts: omap3-igep0030-common: Introduce igep0030 common dtsi file.
  ARM: dts: omap3-igep0030-rev-g: Support IGEP COM MODULE Rev. G
  ARM: dts: omap3-igep0020-common: Introduce igep0020 common dtsi file.
  ARM: dts: omap3-igep0020-rev-f: Support IGEPv2 Rev. F
  ARM: dts: omap3-igep00x0: Remove i2c2 node.
  ARM: OAMP2+: igep00x0: Add pdata-quirks for the btwilink device.

 arch/arm/boot/dts/Makefile   |   2 +
 arch/arm/boot/dts/omap3-igep.dtsi| 103 +-
 arch/arm/boot/dts/omap3-igep0020-common.dtsi | 246 +++
 arch/arm/boot/dts/omap3-igep0020-rev-f.dts   |  46 +
 arch/arm/boot/dts/omap3-igep0020.dts | 285 ---
 arch/arm/boot/dts/omap3-igep0030-common.dtsi |  60 ++
 arch/arm/boot/dts/omap3-igep0030-rev-g.dts   |  68 +++
 arch/arm/boot/dts/omap3-igep0030.dts | 124 +---
 arch/arm/mach-omap2/pdata-quirks.c   |  36 +++-
 9 files changed, 585 insertions(+), 385 deletions(-)
 create mode 100644 arch/arm/boot/dts/omap3-igep0020-common.dtsi
 create mode 100644 arch/arm/boot/dts/omap3-igep0020-rev-f.dts
 create mode 100644 arch/arm/boot/dts/omap3-igep0030-common.dtsi
 create mode 100644 arch/arm/boot/dts/omap3-igep0030-rev-g.dts

-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: N900 modem support in 3.18-rc1

2014-11-06 Thread Pavel Machek
Hi!

 On Wed, Nov 05, 2014 at 11:03:59PM +0100, Pavel Machek wrote:
   Maybe you need to enable modem?
   
   This is n900 init sequence from script: nokia-n900-configs.sh
  
  From the dts, it looks like this should somehow work without this.
 
 Right :) The n900-modem driver will take care of this if the pm
 parameter is set to 1 (which should be the default).

I actually had pm=0 on the command line, but I removed it now, and no
change:

root@n900:~# find /sys/bus/hsi/devices/n900-modem/
/sys/bus/hsi/devices/n900-modem/
/sys/bus/hsi/devices/n900-modem/power
/sys/bus/hsi/devices/n900-modem/power/control
/sys/bus/hsi/devices/n900-modem/power/runtime_active_time
/sys/bus/hsi/devices/n900-modem/power/autosuspend_delay_ms
/sys/bus/hsi/devices/n900-modem/power/runtime_status
/sys/bus/hsi/devices/n900-modem/power/runtime_suspended_time
/sys/bus/hsi/devices/n900-modem/modalias
/sys/bus/hsi/devices/n900-modem/driver
/sys/bus/hsi/devices/n900-modem/subsystem
/sys/bus/hsi/devices/n900-modem/uevent
root@n900:~# cat /proc/cmdline 
root=/dev/nfs nfsroot=192.168.1.6:/srv/nfs/n900 rw
ip=192.168.1.8::192.168.1.6:255.255.255.192::usb0:  no-omap-wd
no-ext-wd console=tty0
root@n900:~# 

Let me try with explicit =1. .. aha, that helps. Thanks!

Do you have an example client that can talk to ofonod?

What is needed to get voice calls to work?

Best regards,
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/3] ARM: dts: AM43x: Fix DCDC3 regulator voltage

2014-11-06 Thread Nishanth Menon
On 11/06/2014 04:50 AM, Keerthy wrote:
 Fix DCDC3 volatge to 1.5V which is the right value to be supplied by
 DCDC3 for all the boards.
 
 Keerthy (3):
   ARM: dts: AM43x-EPOS-EVM: Fix DCDC3 voltage
   ARM: dts: AM437x-GP-EVM: Fix DCDC3 voltage
   ARM: dts: AM437x-SK-EVM: Fix DCDC3 voltage
 
  arch/arm/boot/dts/am437x-gp-evm.dts  |4 ++--
  arch/arm/boot/dts/am437x-sk-evm.dts  |4 ++--
  arch/arm/boot/dts/am43x-epos-evm.dts |4 ++--
  3 files changed, 6 insertions(+), 6 deletions(-)
 
If Tony suggests, we might want to squash these to a single patch
since it hits every AM437x evm platform... but anyways..

Acked-by: Nishanth Menon n...@ti.com

-- 
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] input: touchscreen: ti_am335x_tsc Interchange touchscreen and ADC steps

2014-11-06 Thread Richard Cochran
On Mon, Oct 27, 2014 at 04:38:28PM +0530, Vignesh R wrote:

...

 @@ -209,6 +214,7 @@ static void titsc_read_coordinates(struct titsc *ts_dev,
   unsigned int read, diff;
   unsigned int i, channel;
   unsigned int creads = ts_dev-coordinate_readouts;
 + unsigned int first_step = TOTAL_STEPS - (creads * 2 + 2);
  
   *z1 = *z2 = 0;
   if (fifocount % (creads * 2 + 2))
 @@ -226,7 +232,7 @@ static void titsc_read_coordinates(struct titsc *ts_dev,
  
   channel = (read  0xf)  16;
   read = 0xfff;
 - if (channel  creads) {
 + if (channel  first_step + creads + 2) {
   diff = abs(read - prev_val_x);
   if (diff  prev_diff_x) {
   prev_diff_x = diff;
 @@ -234,19 +240,19 @@ static void titsc_read_coordinates(struct titsc *ts_dev,
   }
   prev_val_x = read;
  
 - } else if (channel  creads * 2) {
 + } else if (channel == first_step + creads + 1) {
 + *z1 = read;
 +
 + } else if (channel == first_step + creads + 2) {
 + *z2 = read;
 +
 + } else if (channel  first_step) {
   diff = abs(read - prev_val_y);
   if (diff  prev_diff_y) {
   prev_diff_y = diff;
   *y = read;

While you are at it, please get rid of the this delta filter
nonsense.

Thanks,
Richard

   }
   prev_val_y = read;
 -
 - } else if (channel  creads * 2 + 1) {
 - *z1 = read;
 -
 - } else if (channel  creads * 2 + 2) {
 - *z2 = read;
   }
   }
  }
 -- 
 1.9.1
 
 
 ___
 linux-arm-kernel mailing list
 linux-arm-ker...@lists.infradead.org
 http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9] ARM: omap: edma: add suspend resume hook

2014-11-06 Thread Dave Gerlach
Sekhar,
On 11/06/2014 02:33 AM, Sekhar Nori wrote:
 On Wednesday 05 November 2014 11:40 PM, Dave Gerlach wrote:
 Sekhar,
 On 11/05/2014 10:04 AM, Sekhar Nori wrote:
 On Wednesday 05 November 2014 09:27 PM, Dave Gerlach wrote:
 On 08/26/2014 03:52 AM, Daniel Mack wrote:
 This patch makes the edma driver resume correctly after suspend. Tested
 on an AM33xx platform with cyclic audio streams and omap_hsmmc.

 All information can be reconstructed by already known runtime
 information.

 As we now use some functions that were previously only used from __init
 context, annotations had to be dropped.

 [n...@ti.com: added error handling for runtime + 
 suspend_late/early_resume]
 Signed-off-by: Nishanth Menon n...@ti.com
 Signed-off-by: Daniel Mack zon...@gmail.com
 Tested-by: Joel Fernandes jo...@ti.com
 Acked-by: Joel Fernandes jo...@ti.com
 ---
 Changes from v8:

   * Drop the edma_suspend hook altogether. Even though back then
 when I wrote the code I was sure disabling the interrupts
 during suspend is necessary, tests now show it in fact isn't.
 My test setup still works if that code is omitted.
   * Use SET_LATE_SYSTEM_SLEEP_PM_OPS in the dev_pm_ops
 declaration.

   Thanks to Sekhar for pointing out the above.

  arch/arm/common/edma.c | 60 
 --
  1 file changed, 58 insertions(+), 2 deletions(-)

 Doesn't seem to be any comments here, any chance this can be picked up? 
 This
 patch always seems to get missed but will be needed for suspend/resume on 
 both
 AM335x and AM437x.

 Dave, do you have a branch against mainline with suspend working on any
 of these SoCs using which I can test this patch?

 Yes, here is WIP of next version with all required patches + this one.
 https://github.com/dgerlach/linux-pm/tree/pm-ds0-v3.18-rc3-WIP

 For suspend to work you need to select:

 CONFIG_WKUP_M3_IPC=y
 CONFIG_WKUP_M3_RPROC=y
 
 I get this:
 
 arch/arm/mach-omap2/pm33xx.c:28:31: fatal error: linux/wkup_m3_ipc.h: No such 
 file or directory
  #include linux/wkup_m3_ipc.h
^
 compilation terminated.
 make[1]: *** [arch/arm/mach-omap2/pm33xx.o] Error 1
 
 Forgot to commit wkup_m3_ipc.h?
 

Ahhh sorry about that, looks like I dropped it during a rebase. Added it in a
patch and pushed that on top of the tree from yesterday. Sorry again!.

Regards,
Dave


 Thanks,
 Sekhar
  
 

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] MAINTAINERS: add more files under OMAP SUPPORT

2014-11-06 Thread Felipe Balbi
These files are very important to the healt
of the OMAP architecture, specially when it
comes to PM support which currently we have
working for at least OMAP3 and we'd like
to know about any changes being made to our
PMICs and IRQ controllers.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 MAINTAINERS | 17 +
 1 file changed, 17 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 3c64271..ceab240 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6594,6 +6594,23 @@ T:   git 
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap.git
 S: Maintained
 F: arch/arm/*omap*/
 F: drivers/i2c/busses/i2c-omap.c
+F: drivers/irqchip/irq-omap-intc.c
+F: drivers/mfd/*omap*.c
+F: drivers/mfd/menelaus.c
+F: drivers/mfd/palmas.c
+F: drivers/mfd/tps65217.c
+F: drivers/mfd/tps65218.c
+F: drivers/mfd/tps65910.c
+F: drivers/mfd/twl-core.[ch]
+F: drivers/mfd/twl4030*.c
+F: drivers/mfd/twl6030*.c
+F: drivers/mfd/twl6040*.c
+F: drivers/regulator/palmas-regulator*.c
+F: drivers/regulator/pbias-regulator.c
+F: drivers/regulator/tps65217-regulator.c
+F: drivers/regulator/tps65218-regulator.c
+F: drivers/regulator/tps65910-regulator.c
+F: drivers/regulator/twl-regulator.c
 F: include/linux/i2c-omap.h
 
 OMAP DEVICE TREE SUPPORT
-- 
2.1.0.GIT

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: dts: Add am57xx-beagle-x15

2014-11-06 Thread Nishanth Menon
BeagleBoard-X15 is the next generation Open Source Hardware
BeagleBoard based on TI's AM5728 SoC featuring dual core 1.5GHZ A15
processor. The platform features 2GB DDR3L (w/dual 32bit busses),
eSATA, 3 USB3.0 ports, integrated HDMI (1920x108@60), separate LCD
port, video In port, 4GB eMMC, uSD, Analog audio in/out, dual 1G
Ethernet.

For more information, refer to:
BeagleBoard-X15 Wiki:
http://www.elinux.org/Beagleboard:BeagleBoard-X15

AM5728 is part of the Sitara product family whose additional details
will be available: http://www.ti.com/lsds/ti/arm/overview.page

Technical Reference Manual for AM5728 is public domain at:
http://www.ti.com/lit/spruhz6

Just add basic support for the moment, the following updates are needed:
  i)Ethernet - depends on SoC dts fixes
  ii)   USB Client (USB2) - depends on GPIO extcon
  ii)   HDMI - additional driver fixes pending
  iii)  Audio - additional driver fixes pending

Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Nishanth Menon n...@ti.com
---

Tested with omap2plus_defconfig modified as: http://slexy.org/view/s2DRTzUwjj
boot log: http://slexy.org/raw/s25Grf1uoo
based on 3.18-rc1 tag.

Support for u-boot has been posted as well: (series ending
http://patchwork.ozlabs.org/patch/407552/ )

Side note: this patch generates a few unrelated checkpatch warning for
compatible which probably is part of appropriate driver documentation
fixes (functionality is already present).

 arch/arm/boot/dts/Makefile  |1 +
 arch/arm/boot/dts/am57xx-beagle-x15.dts |  405 +++
 2 files changed, 406 insertions(+)
 create mode 100644 arch/arm/boot/dts/am57xx-beagle-x15.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 38c89ca..eee1e4f 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -347,6 +347,7 @@ dtb-$(CONFIG_SOC_OMAP5) += omap5-cm-t54.dtb \
omap5-sbc-t54.dtb \
omap5-uevm.dtb
 dtb-$(CONFIG_SOC_DRA7XX) += dra7-evm.dtb \
+   am57xx-beagle-x15.dtb \
dra72-evm.dtb
 dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-d2-network.dtb \
orion5x-lacie-ethernet-disk-mini-v2.dtb \
diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts 
b/arch/arm/boot/dts/am57xx-beagle-x15.dts
new file mode 100644
index 000..1f1875b
--- /dev/null
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -0,0 +1,405 @@
+/*
+ * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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.
+ */
+/dts-v1/;
+
+#include dra74x.dtsi
+#include dt-bindings/clk/ti-dra7-atl.h
+#include dt-bindings/gpio/gpio.h
+#include dt-bindings/interrupt-controller/irq.h
+
+/ {
+   model = TI AM5728 BeagleBoard-X15;
+   compatible = ti,am572x-beagle-x15, ti,am5728, ti,dra742, 
ti,dra74, ti,dra7;
+
+   aliases {
+   rtc0 = mcp_rtc;
+   rtc1 = tps659038_rtc;
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x8000 0x4000; /* 1GB to start. Target 2GB */
+   };
+
+   vdd_3v3: fixedregulator-vdd_3v3 {
+   compatible = regulator-fixed;
+   regulator-name = vdd_3v3;
+   vin-supply = regen1;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   };
+
+   vtt_fixed: fixedregulator-vtt {
+   /* TPS51200 */
+   compatible = regulator-fixed;
+   regulator-name = vtt_fixed;
+   vin-supply = smps3_reg;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   regulator-always-on;
+   regulator-boot-on;
+   enable-active-high;
+   gpio = gpio7 11 GPIO_ACTIVE_HIGH;
+   };
+
+   leds {
+   compatible = gpio-leds;
+   pinctrl-names = default;
+   pinctrl-0 = leds_pins_default;
+
+   led@0 {
+   label = beagle-x15:usr0;
+   gpios = gpio7 9 GPIO_ACTIVE_HIGH;
+   linux,default-trigger = heartbeat;
+   default-state = off;
+   };
+
+   led@1 {
+   label = beagle-x15:usr1;
+   gpios = gpio7 8 GPIO_ACTIVE_HIGH;
+   linux,default-trigger = cpu0;
+   default-state = off;
+   };
+
+   led@2 {
+   label = beagle-x15:usr2;
+   gpios = gpio7 14 GPIO_ACTIVE_HIGH;
+   linux,default-trigger = mmc0;
+   default-state = off;
+   };
+
+   led@3 {
+   label = beagle-x15:usr3;
+   gpios = gpio7 15 GPIO_ACTIVE_HIGH;
+  

Re: [PATCH] arm: omap: hwmod: drop unnecessary list initialization

2014-11-06 Thread Felipe Balbi
On Mon, Nov 03, 2014 at 11:39:52PM -0600, Felipe Balbi wrote:
 Hi,
 
 On Mon, Jul 28, 2014 at 05:24:34AM +, Paul Walmsley wrote:
  On Tue, 15 Jul 2014, Felipe Balbi wrote:
  
   ml-node and sl-node are currently initialized
   by means of INIT_LIST_HEAD(). That initialiation
   is followed by a list_add() call.
   
   Looking at what both these functions do we will have:
   
 ml-node.next = ml-node;
 ml-node.prev = ml-node;
 oi-master-master_ports.next.prev = ml-node;
 ml-node.next = oi-master-master_ports.next;
 ml-node.prev = oi-master-master_ports;
 oi-master-master_ports.next = ml-node;
   
   from this, it's clear that both INIT_LIST_HEAD() calls
   are unnecessary and can be safely removed.
   
   Signed-off-by: Felipe Balbi ba...@ti.com
   ---
   
   found by code inspection, boot tested on am437x SK on today's
   linux-next + pending patches.
  
  Thanks, queued for v3.18.
 
 This is not on v3.18, what happened ?
 
 $ git log --author=ba...@ti.com linus/master ^v3.17 -- 
 arch/arm/mach-omap2/omap_hwmod.c
 $

ping

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH] ARM: dts: Add am57xx-beagle-x15

2014-11-06 Thread Felipe Balbi
On Thu, Nov 06, 2014 at 10:18:22AM -0600, Nishanth Menon wrote:
 BeagleBoard-X15 is the next generation Open Source Hardware
 BeagleBoard based on TI's AM5728 SoC featuring dual core 1.5GHZ A15
 processor. The platform features 2GB DDR3L (w/dual 32bit busses),
 eSATA, 3 USB3.0 ports, integrated HDMI (1920x108@60), separate LCD
 port, video In port, 4GB eMMC, uSD, Analog audio in/out, dual 1G
 Ethernet.
 
 For more information, refer to:
 BeagleBoard-X15 Wiki:
 http://www.elinux.org/Beagleboard:BeagleBoard-X15
 
 AM5728 is part of the Sitara product family whose additional details
 will be available: http://www.ti.com/lsds/ti/arm/overview.page
 
 Technical Reference Manual for AM5728 is public domain at:
 http://www.ti.com/lit/spruhz6
 
 Just add basic support for the moment, the following updates are needed:
   i)  Ethernet - depends on SoC dts fixes
   ii) USB Client (USB2) - depends on GPIO extcon
   ii) HDMI - additional driver fixes pending
   iii)Audio - additional driver fixes pending
 
 Signed-off-by: Felipe Balbi ba...@ti.com
 Signed-off-by: Nishanth Menon n...@ti.com
 ---
 
 Tested with omap2plus_defconfig modified as: http://slexy.org/view/s2DRTzUwjj
 boot log: http://slexy.org/raw/s25Grf1uoo
 based on 3.18-rc1 tag.
 
 Support for u-boot has been posted as well: (series ending
 http://patchwork.ozlabs.org/patch/407552/ )
 
 Side note: this patch generates a few unrelated checkpatch warning for
 compatible which probably is part of appropriate driver documentation
 fixes (functionality is already present).
 
  arch/arm/boot/dts/Makefile  |1 +
  arch/arm/boot/dts/am57xx-beagle-x15.dts |  405 
 +++
  2 files changed, 406 insertions(+)
  create mode 100644 arch/arm/boot/dts/am57xx-beagle-x15.dts
 
 diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
 index 38c89ca..eee1e4f 100644
 --- a/arch/arm/boot/dts/Makefile
 +++ b/arch/arm/boot/dts/Makefile
 @@ -347,6 +347,7 @@ dtb-$(CONFIG_SOC_OMAP5) += omap5-cm-t54.dtb \
   omap5-sbc-t54.dtb \
   omap5-uevm.dtb
  dtb-$(CONFIG_SOC_DRA7XX) += dra7-evm.dtb \
 + am57xx-beagle-x15.dtb \
   dra72-evm.dtb
  dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-d2-network.dtb \
   orion5x-lacie-ethernet-disk-mini-v2.dtb \
 diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts 
 b/arch/arm/boot/dts/am57xx-beagle-x15.dts
 new file mode 100644
 index 000..1f1875b
 --- /dev/null
 +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
 @@ -0,0 +1,405 @@
 +/*
 + * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
 + *
 + * 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.
 + */
 +/dts-v1/;
 +
 +#include dra74x.dtsi
 +#include dt-bindings/clk/ti-dra7-atl.h
 +#include dt-bindings/gpio/gpio.h
 +#include dt-bindings/interrupt-controller/irq.h
 +
 +/ {
 + model = TI AM5728 BeagleBoard-X15;
 + compatible = ti,am572x-beagle-x15, ti,am5728, ti,dra742, 
 ti,dra74, ti,dra7;
 +
 + aliases {
 + rtc0 = mcp_rtc;
 + rtc1 = tps659038_rtc;
 + };
 +
 + memory {
 + device_type = memory;
 + reg = 0x8000 0x4000; /* 1GB to start. Target 2GB */

1GiB ? Why would you put this here btw ? u-boot fills this one up.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH] ARM: dts: Add am57xx-beagle-x15

2014-11-06 Thread Tom Rini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11/06/2014 11:32 AM, Felipe Balbi wrote:
 On Thu, Nov 06, 2014 at 10:18:22AM -0600, Nishanth Menon wrote:
 BeagleBoard-X15 is the next generation Open Source Hardware 
 BeagleBoard based on TI's AM5728 SoC featuring dual core 1.5GHZ
 A15 processor. The platform features 2GB DDR3L (w/dual 32bit
 busses), eSATA, 3 USB3.0 ports, integrated HDMI (1920x108@60),
 separate LCD port, video In port, 4GB eMMC, uSD, Analog audio
 in/out, dual 1G Ethernet.
 
 For more information, refer to: BeagleBoard-X15 Wiki: 
 http://www.elinux.org/Beagleboard:BeagleBoard-X15
 
 AM5728 is part of the Sitara product family whose additional
 details will be available:
 http://www.ti.com/lsds/ti/arm/overview.page
 
 Technical Reference Manual for AM5728 is public domain at: 
 http://www.ti.com/lit/spruhz6
 
 Just add basic support for the moment, the following updates are
 needed: i)   Ethernet - depends on SoC dts fixes ii) USB Client
 (USB2) - depends on GPIO extcon ii)  HDMI - additional driver
 fixes pending iii)   Audio - additional driver fixes pending
 
 Signed-off-by: Felipe Balbi ba...@ti.com Signed-off-by:
 Nishanth Menon n...@ti.com ---
 
 Tested with omap2plus_defconfig modified as:
 http://slexy.org/view/s2DRTzUwjj boot log:
 http://slexy.org/raw/s25Grf1uoo based on 3.18-rc1 tag.
 
 Support for u-boot has been posted as well: (series ending 
 http://patchwork.ozlabs.org/patch/407552/ )
 
 Side note: this patch generates a few unrelated checkpatch
 warning for compatible which probably is part of appropriate
 driver documentation fixes (functionality is already present).
 
 arch/arm/boot/dts/Makefile  |1 + 
 arch/arm/boot/dts/am57xx-beagle-x15.dts |  405
 +++ 2 files changed, 406
 insertions(+) create mode 100644
 arch/arm/boot/dts/am57xx-beagle-x15.dts
 
 diff --git a/arch/arm/boot/dts/Makefile
 b/arch/arm/boot/dts/Makefile index 38c89ca..eee1e4f 100644 ---
 a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@
 -347,6 +347,7 @@ dtb-$(CONFIG_SOC_OMAP5) += omap5-cm-t54.dtb \ 
 omap5-sbc-t54.dtb \ omap5-uevm.dtb dtb-$(CONFIG_SOC_DRA7XX) +=
 dra7-evm.dtb \ + am57xx-beagle-x15.dtb \ dra72-evm.dtb 
 dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-d2-network.dtb \ 
 orion5x-lacie-ethernet-disk-mini-v2.dtb \ diff --git
 a/arch/arm/boot/dts/am57xx-beagle-x15.dts
 b/arch/arm/boot/dts/am57xx-beagle-x15.dts new file mode 100644 
 index 000..1f1875b --- /dev/null +++
 b/arch/arm/boot/dts/am57xx-beagle-x15.dts @@ -0,0 +1,405 @@ +/* +
 * Copyright (C) 2014 Texas Instruments Incorporated -
 http://www.ti.com/ + * + * 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. + */ +/dts-v1/; + +#include dra74x.dtsi 
 +#include dt-bindings/clk/ti-dra7-atl.h +#include
 dt-bindings/gpio/gpio.h +#include
 dt-bindings/interrupt-controller/irq.h + +/ { +model = TI
 AM5728 BeagleBoard-X15; +   compatible = ti,am572x-beagle-x15,
 ti,am5728, ti,dra742, ti,dra74, ti,dra7; + + aliases { +
 rtc0 = mcp_rtc; +   rtc1 = tps659038_rtc; +}; + +  memory 
 { +
 device_type = memory; +reg = 0x8000 0x4000; /* 1GB
 to start. Target 2GB */
 
 1GiB ? Why would you put this here btw ? u-boot fills this one up.

Yes, it should either be the full and correct value or 0x0 (like a
number of PowerPC platforms do) so it's clear something else gives us
the right value here.

- -- 
Tom
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJUW6PmAAoJENk4IS6UOR1WV2kQAI7JY0DFR+XsWMAZ2shiGcF6
+ZotxE4m030EQgfi8FnKe+i5u5pvHhJFqazRGX2cpYvj5X0fOnO730cyGLvunuQA
npVDTcu/4RASxOUtEAW88u/wxUqL1BvYTHlcFTOnaeYJbgvt/C+QIO/wK+izAPso
2ckS23d43DCAW2aVRo2Eq/L3CehjZz3dpQSzTyjWdYbQ0gROE4IWQ5J2qnSFYzhO
VO5CQb4gqP0iAVk96Z6RJWtQxaYGfNta9QDCaEkZ6OOo4z+MHvdfk5a5HiJzfzlr
VkRUaRql4UmvFFwUFoeYcsde1Mno8Ka3jXq94soNvnq0LiIYPjdLBI/7ca9exdbV
CnY3TxtZOfYqRsGiSF1mac8wqCF7kBC+u7nGGK1sTdNzhN5dFrIfL0tkfl8/avfH
YYyu/WeZEEZ8MJVk0KruXUgG1kge3FJc2v79AdDaiZtp6xcl5p+pVtCkx8QrCfGg
ofPjEtmGKSatIW/PmnOt0L/qmMQNnzwSbT+zgeUfgUXYLiH3NFK7wAdW5hWS4T3n
v5h1O8t3THZLnmc1Fdv4pfI3ozcoWjSLROlnWhtO1E9JEtVon8XfpyPObJzKV5GA
9CT+5Ivrirz/4TEUJ1kCKBQcxyZUFEmEVKYu9KiMPux2Doz4MI4TZOZ/TcWTJiCJ
hCXCtU398UOpnwVyy//D
=N9bA
-END PGP SIGNATURE-
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add am57xx-beagle-x15

2014-11-06 Thread Lennart Sorensen
On Thu, Nov 06, 2014 at 10:18:22AM -0600, Nishanth Menon wrote:
 BeagleBoard-X15 is the next generation Open Source Hardware
 BeagleBoard based on TI's AM5728 SoC featuring dual core 1.5GHZ A15
 processor. The platform features 2GB DDR3L (w/dual 32bit busses),
 eSATA, 3 USB3.0 ports, integrated HDMI (1920x108@60), separate LCD
 port, video In port, 4GB eMMC, uSD, Analog audio in/out, dual 1G
 Ethernet.

Oh neat, you put a USB3 hub on the board?

I really should cleanup and submit my patch to make the system time not
run 576ppm too fast on the AM57xx.

This will sure be a nice board when you get it released.  I will have
to get one.

-- 
Len Sorensen
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add am57xx-beagle-x15

2014-11-06 Thread Nishanth Menon
On 11/06/2014 10:37 AM, Tom Rini wrote:

 device_type = memory; +   reg = 0x8000 0x4000; /* 1GB
 to start. Target 2GB */

 1GiB ? Why would you put this here btw ? u-boot fills this one up.
 
 Yes, it should either be the full and correct value or 0x0 (like a
 number of PowerPC platforms do) so it's clear something else gives us
 the right value here.

Honest mistake, my bad.. I thought I cleaned up the patch! Sigh!!! i
will repost with proper 2GB. it is better that way in case being used
with other bootloaders which are not exactly too good like u-boot.


-- 
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v5 09/48] mfd: palmas: Register with kernel power-off handler

2014-11-06 Thread Guenter Roeck
Register with kernel power-off handler instead of setting pm_power_off
directly. Register with low priority to reflect that the original code
only sets pm_power_off if it was not already set.

Cc: Samuel Ortiz sa...@linux.intel.com
Cc: Lee Jones lee.jo...@linaro.org
Cc: linux-omap@vger.kernel.org
Acked-by: Lee Jones lee.jo...@linaro.org
Signed-off-by: Guenter Roeck li...@roeck-us.net
---
v5:
- Rebase to v3.18-rc3
v4:
- Do not use notifiers but internal functions and data structures to manage
  the list of power-off handlers. Drop unused parameters from callbacks, and
  make the power-off function type void
v3:
- Replace poweroff in all newly introduced variables and in text
  with power_off or power-off as appropriate
- Replace POWEROFF_PRIORITY_xxx with POWER_OFF_PRIORITY_xxx
v2:
- Use define to specify poweroff handler priority
- Use devm_register_power_off_handler
- Use dev_warn instead of dev_err

 drivers/mfd/palmas.c   | 28 ++--
 include/linux/mfd/palmas.h |  3 +++
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/drivers/mfd/palmas.c b/drivers/mfd/palmas.c
index 28cb048..60f81ed 100644
--- a/drivers/mfd/palmas.c
+++ b/drivers/mfd/palmas.c
@@ -19,6 +19,7 @@
 #include linux/i2c.h
 #include linux/interrupt.h
 #include linux/irq.h
+#include linux/pm.h
 #include linux/regmap.h
 #include linux/err.h
 #include linux/mfd/core.h
@@ -425,20 +426,17 @@ static void palmas_dt_to_pdata(struct i2c_client *i2c,
ti,system-power-controller);
 }
 
-static struct palmas *palmas_dev;
-static void palmas_power_off(void)
+static void palmas_power_off(struct power_off_handler_block *this)
 {
+   struct palmas *palmas = container_of(this, struct palmas, power_off_hb);
unsigned int addr;
int ret, slave;
 
-   if (!palmas_dev)
-   return;
-
slave = PALMAS_BASE_TO_SLAVE(PALMAS_PMU_CONTROL_BASE);
addr = PALMAS_BASE_TO_REG(PALMAS_PMU_CONTROL_BASE, PALMAS_DEV_CTRL);
 
ret = regmap_update_bits(
-   palmas_dev-regmap[slave],
+   palmas-regmap[slave],
addr,
PALMAS_DEV_CTRL_DEV_ON,
0);
@@ -668,9 +666,16 @@ no_irq:
ret = of_platform_populate(node, NULL, NULL, i2c-dev);
if (ret  0) {
goto err_irq;
-   } else if (pdata-pm_off  !pm_power_off) {
-   palmas_dev = palmas;
-   pm_power_off = palmas_power_off;
+   } else if (pdata-pm_off) {
+   int ret2;
+
+   palmas-power_off_hb.handler = palmas_power_off;
+   palmas-power_off_hb.priority = POWER_OFF_PRIORITY_LOW;
+   ret2 = devm_register_power_off_handler(palmas-dev,
+   palmas-power_off_hb);
+   if (ret2)
+   dev_warn(palmas-dev,
+Failed to register power-off 
handler);
}
}
 
@@ -698,11 +703,6 @@ static int palmas_i2c_remove(struct i2c_client *i2c)
i2c_unregister_device(palmas-i2c_clients[i]);
}
 
-   if (palmas == palmas_dev) {
-   pm_power_off = NULL;
-   palmas_dev = NULL;
-   }
-
return 0;
 }
 
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index fb0390a..7a43f7b 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -18,6 +18,7 @@
 
 #include linux/usb/otg.h
 #include linux/leds.h
+#include linux/pm.h
 #include linux/regmap.h
 #include linux/regulator/driver.h
 #include linux/extcon.h
@@ -68,6 +69,8 @@ struct palmas {
struct i2c_client *i2c_clients[PALMAS_NUM_CLIENTS];
struct regmap *regmap[PALMAS_NUM_CLIENTS];
 
+   struct power_off_handler_block power_off_hb;
+
/* Stored chip id */
int id;
 
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v5 35/48] arm: Register with kernel power-off handler

2014-11-06 Thread Guenter Roeck
Register with kernel power-off handler instead of setting pm_power_off
directly. Always use register_power_off_handler_simple as there is no
indication that more than one power-off handler is registered.

If the power-off handler only resets the system or puts the CPU in sleep mode,
select the fallback priority to indicate that the power-off handler is one
of last resort. If the power-off handler powers off the system, select the
default priority.

Cc: Russell King li...@arm.linux.org.uk
Signed-off-by: Guenter Roeck li...@roeck-us.net
---
v5:
- Rebase to v3.18-rc3
v4:
- No change
v3:
- Replace poweroff in all newly introduced variables and in text
  with power_off or power-off as appropriate
- Replace POWEROFF_PRIORITY_xxx with POWER_OFF_PRIORITY_xxx
v2:
- Use defines to specify poweroff handler priorities
- Drop changes in arch/arm/mach-at91/setup.c (file removed upstream)

 arch/arm/kernel/psci.c | 3 ++-
 arch/arm/mach-at91/board-gsia18s.c | 3 ++-
 arch/arm/mach-bcm/board_bcm2835.c  | 3 ++-
 arch/arm/mach-cns3xxx/cns3420vb.c  | 3 ++-
 arch/arm/mach-cns3xxx/core.c   | 3 ++-
 arch/arm/mach-highbank/highbank.c  | 3 ++-
 arch/arm/mach-imx/mach-mx31moboard.c   | 3 ++-
 arch/arm/mach-iop32x/em7210.c  | 3 ++-
 arch/arm/mach-iop32x/glantank.c| 3 ++-
 arch/arm/mach-iop32x/iq31244.c | 3 ++-
 arch/arm/mach-iop32x/n2100.c   | 3 ++-
 arch/arm/mach-ixp4xx/dsmg600-setup.c   | 3 ++-
 arch/arm/mach-ixp4xx/nas100d-setup.c   | 3 ++-
 arch/arm/mach-ixp4xx/nslu2-setup.c | 3 ++-
 arch/arm/mach-omap2/board-omap3touchbook.c | 3 ++-
 arch/arm/mach-orion5x/board-mss2.c | 3 ++-
 arch/arm/mach-orion5x/dns323-setup.c   | 9 ++---
 arch/arm/mach-orion5x/kurobox_pro-setup.c  | 3 ++-
 arch/arm/mach-orion5x/ls-chl-setup.c   | 3 ++-
 arch/arm/mach-orion5x/ls_hgl-setup.c   | 3 ++-
 arch/arm/mach-orion5x/lsmini-setup.c   | 3 ++-
 arch/arm/mach-orion5x/mv2120-setup.c   | 3 ++-
 arch/arm/mach-orion5x/net2big-setup.c  | 3 ++-
 arch/arm/mach-orion5x/terastation_pro2-setup.c | 3 ++-
 arch/arm/mach-orion5x/ts209-setup.c| 3 ++-
 arch/arm/mach-orion5x/ts409-setup.c| 3 ++-
 arch/arm/mach-pxa/corgi.c  | 3 ++-
 arch/arm/mach-pxa/mioa701.c| 3 ++-
 arch/arm/mach-pxa/poodle.c | 3 ++-
 arch/arm/mach-pxa/spitz.c  | 3 ++-
 arch/arm/mach-pxa/tosa.c   | 3 ++-
 arch/arm/mach-pxa/viper.c  | 3 ++-
 arch/arm/mach-pxa/z2.c | 7 ---
 arch/arm/mach-pxa/zeus.c   | 7 ---
 arch/arm/mach-s3c24xx/mach-gta02.c | 3 ++-
 arch/arm/mach-s3c24xx/mach-jive.c  | 3 ++-
 arch/arm/mach-s3c24xx/mach-vr1000.c| 3 ++-
 arch/arm/mach-s3c64xx/mach-smartq.c| 3 ++-
 arch/arm/mach-sa1100/generic.c | 3 ++-
 arch/arm/mach-sa1100/simpad.c  | 3 ++-
 arch/arm/mach-u300/regulator.c | 3 ++-
 arch/arm/mach-vt8500/vt8500.c  | 3 ++-
 arch/arm/xen/enlighten.c   | 3 ++-
 43 files changed, 94 insertions(+), 49 deletions(-)

diff --git a/arch/arm/kernel/psci.c b/arch/arm/kernel/psci.c
index f73891b..a7a2b4a 100644
--- a/arch/arm/kernel/psci.c
+++ b/arch/arm/kernel/psci.c
@@ -264,7 +264,8 @@ static int psci_0_2_init(struct device_node *np)
 
arm_pm_restart = psci_sys_reset;
 
-   pm_power_off = psci_sys_poweroff;
+   register_power_off_handler_simple(psci_sys_poweroff,
+ POWER_OFF_PRIORITY_DEFAULT);
 
 out_put_node:
of_node_put(np);
diff --git a/arch/arm/mach-at91/board-gsia18s.c 
b/arch/arm/mach-at91/board-gsia18s.c
index bf5cc55..e628c4a 100644
--- a/arch/arm/mach-at91/board-gsia18s.c
+++ b/arch/arm/mach-at91/board-gsia18s.c
@@ -521,7 +521,8 @@ static void gsia18s_power_off(void)
 
 static int __init gsia18s_power_off_init(void)
 {
-   pm_power_off = gsia18s_power_off;
+   register_power_off_handler_simple(gsia18s_power_off,
+ POWER_OFF_PRIORITY_DEFAULT);
return 0;
 }
 
diff --git a/arch/arm/mach-bcm/board_bcm2835.c 
b/arch/arm/mach-bcm/board_bcm2835.c
index 70f2f39..1d75c76 100644
--- a/arch/arm/mach-bcm/board_bcm2835.c
+++ b/arch/arm/mach-bcm/board_bcm2835.c
@@ -111,7 +111,8 @@ static void __init bcm2835_init(void)
 
bcm2835_setup_restart();
if (wdt_regs)
-   pm_power_off = bcm2835_power_off;
+   register_power_off_handler_simple(bcm2835_power_off,
+ POWER_OFF_PRIORITY_FALLBACK);
 
bcm2835_init_clocks();
 
diff --git a/arch/arm/mach-cns3xxx/cns3420vb.c 
b/arch/arm/mach-cns3xxx/cns3420vb.c
index 6428bcc7..5c50461 

RE: [PATCH] ARM: dts: Add am57xx-beagle-x15

2014-11-06 Thread Gerald Coley
Yes. We have three USB 3.0 ports.

Gerald


-Original Message-
From: Lennart Sorensen [mailto:lsore...@csclub.uwaterloo.ca] 
Sent: Thursday, November 6, 2014 10:42 AM
To: Nishanth Menon
Cc: Tony Lindgren; linux-ker...@vger.kernel.org;
linux-arm-ker...@lists.infradead.org; devicet...@vger.kernel.org;
linux-omap@vger.kernel.org; ba...@ti.com; ger...@granddesignsgroup.com;
fcoo...@ti.com; beaglebo...@googlegroups.com
Subject: Re: [PATCH] ARM: dts: Add am57xx-beagle-x15

On Thu, Nov 06, 2014 at 10:18:22AM -0600, Nishanth Menon wrote:
 BeagleBoard-X15 is the next generation Open Source Hardware 
 BeagleBoard based on TI's AM5728 SoC featuring dual core 1.5GHZ A15 
 processor. The platform features 2GB DDR3L (w/dual 32bit busses), 
 eSATA, 3 USB3.0 ports, integrated HDMI (1920x108@60), separate LCD 
 port, video In port, 4GB eMMC, uSD, Analog audio in/out, dual 1G 
 Ethernet.

Oh neat, you put a USB3 hub on the board?

I really should cleanup and submit my patch to make the system time not run
576ppm too fast on the AM57xx.

This will sure be a nice board when you get it released.  I will have to get
one.

--
Len Sorensen

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add am57xx-beagle-x15

2014-11-06 Thread Tony Lindgren
* Nishanth Menon n...@ti.com [141106 08:44]:
 On 11/06/2014 10:37 AM, Tom Rini wrote:
 
  device_type = memory; + reg = 0x8000 0x4000; /* 1GB
  to start. Target 2GB */
 
  1GiB ? Why would you put this here btw ? u-boot fills this one up.
  
  Yes, it should either be the full and correct value or 0x0 (like a
  number of PowerPC platforms do) so it's clear something else gives us
  the right value here.
 
 Honest mistake, my bad.. I thought I cleaned up the patch! Sigh!!! i
 will repost with proper 2GB. it is better that way in case being used
 with other bootloaders which are not exactly too good like u-boot.

Can you also describe why all the always-on regulators are needed?

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] ARM: dts: Add am57xx-beagle-x15

2014-11-06 Thread Gerald Coley
Convert 12V to 5V and 3.3V. 5V supplies are too expensive at the required
wattage level.

Gerald


-Original Message-
From: Tony Lindgren [mailto:t...@atomide.com] 
Sent: Thursday, November 6, 2014 10:49 AM
To: Nishanth Menon
Cc: Tom Rini; ba...@ti.com; devicet...@vger.kernel.org;
beaglebo...@googlegroups.com; linux-ker...@vger.kernel.org;
ger...@granddesignsgroup.com; fcoo...@ti.com; linux-omap@vger.kernel.org;
linux-arm-ker...@lists.infradead.org
Subject: Re: [PATCH] ARM: dts: Add am57xx-beagle-x15

* Nishanth Menon n...@ti.com [141106 08:44]:
 On 11/06/2014 10:37 AM, Tom Rini wrote:
 
  device_type = memory; + reg = 0x8000 0x4000; /*
1GB
  to start. Target 2GB */
 
  1GiB ? Why would you put this here btw ? u-boot fills this one up.
  
  Yes, it should either be the full and correct value or 0x0 (like a 
  number of PowerPC platforms do) so it's clear something else gives 
  us the right value here.
 
 Honest mistake, my bad.. I thought I cleaned up the patch! Sigh!!! i 
 will repost with proper 2GB. it is better that way in case being used 
 with other bootloaders which are not exactly too good like u-boot.

Can you also describe why all the always-on regulators are needed?

Regards,

Tony

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add am57xx-beagle-x15

2014-11-06 Thread Nishanth Menon
On 11/06/2014 10:48 AM, Tony Lindgren wrote:
 * Nishanth Menon n...@ti.com [141106 08:44]:
 On 11/06/2014 10:37 AM, Tom Rini wrote:

 device_type = memory; + reg = 0x8000 0x4000; /* 1GB
 to start. Target 2GB */

 1GiB ? Why would you put this here btw ? u-boot fills this one up.

 Yes, it should either be the full and correct value or 0x0 (like a
 number of PowerPC platforms do) so it's clear something else gives us
 the right value here.

 Honest mistake, my bad.. I thought I cleaned up the patch! Sigh!!! i
 will repost with proper 2GB. it is better that way in case being used
 with other bootloaders which are not exactly too good like u-boot.
 
 Can you also describe why all the always-on regulators are needed?
yep - will do that similar to
https://patchwork.kernel.org/patch/5125431/ - same rationale unless
there is any specific voltage rail that you are explicitly interested
in that needs additional explanation. Is there additional rails of
interest?



-- 
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v5 18/48] mfd: twl4030-power: Register with kernel power-off handler

2014-11-06 Thread Guenter Roeck
Register with kernel power-off handler instead of setting pm_power_off
directly. Register with low priority to reflect that the original code
only sets pm_power_off if it was not already set.

Make twl4030_power_off static as it is only called from the twl4030-power
driver. Drop remove function as it is no longer needed.

Cc: Samuel Ortiz sa...@linux.intel.com
Cc: Lee Jones lee.jo...@linaro.org
Cc: linux-omap@vger.kernel.org
Acked-by: Lee Jones lee.jo...@linaro.org
Signed-off-by: Guenter Roeck li...@roeck-us.net
---
v5:
- Rebase to v3.18-rc3
v4:
- Do not use notifiers but internal functions and data structures to manage
  the list of power-off handlers. Drop unused parameters from callbacks, and
  make the power-off function type void
v3:
- Replace poweroff in all newly introduced variables and in text
  with power_off or power-off as appropriate
- Replace POWEROFF_PRIORITY_xxx with POWER_OFF_PRIORITY_xxx
v2:
- Use define to specify poweroff handler priority
- Use dev_warn instead of dev_err
- Use devm_register_power_off_handler
- Drop remove function as it is no longer needed.

 drivers/mfd/twl4030-power.c | 25 +++--
 include/linux/i2c/twl.h |  1 -
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index cf92a6d..88fd33c 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -25,9 +25,9 @@
  */
 
 #include linux/module.h
-#include linux/pm.h
 #include linux/i2c/twl.h
 #include linux/platform_device.h
+#include linux/pm.h
 #include linux/of.h
 #include linux/of_device.h
 
@@ -611,7 +611,7 @@ twl4030_power_configure_resources(const struct 
twl4030_power_data *pdata)
  * After a successful execution, TWL shuts down the power to the SoC
  * and all peripherals connected to it.
  */
-void twl4030_power_off(void)
+static void twl4030_power_off(struct power_off_handler_block *this)
 {
int err;
 
@@ -621,6 +621,11 @@ void twl4030_power_off(void)
pr_err(TWL4030 Unable to power off\n);
 }
 
+static struct power_off_handler_block twl4030_power_off_hb = {
+   .handler = twl4030_power_off,
+   .priority = POWER_OFF_PRIORITY_LOW,
+};
+
 static bool twl4030_power_use_poweroff(const struct twl4030_power_data *pdata,
struct device_node *node)
 {
@@ -839,7 +844,9 @@ static int twl4030_power_probe(struct platform_device *pdev)
}
 
/* Board has to be wired properly to use this feature */
-   if (twl4030_power_use_poweroff(pdata, node)  !pm_power_off) {
+   if (twl4030_power_use_poweroff(pdata, node)) {
+   int ret;
+
/* Default for SEQ_OFFSYNC is set, lets ensure this */
err = twl_i2c_read_u8(TWL_MODULE_PM_MASTER, val,
  TWL4030_PM_MASTER_CFG_P123_TRANSITION);
@@ -856,7 +863,11 @@ static int twl4030_power_probe(struct platform_device 
*pdev)
}
}
 
-   pm_power_off = twl4030_power_off;
+   ret = devm_register_power_off_handler(pdev-dev,
+ twl4030_power_off_hb);
+   if (ret)
+   dev_warn(pdev-dev,
+Failed to register power-off handler\n);
}
 
 relock:
@@ -870,11 +881,6 @@ relock:
return err;
 }
 
-static int twl4030_power_remove(struct platform_device *pdev)
-{
-   return 0;
-}
-
 static struct platform_driver twl4030_power_driver = {
.driver = {
.name   = twl4030_power,
@@ -882,7 +888,6 @@ static struct platform_driver twl4030_power_driver = {
.of_match_table = of_match_ptr(twl4030_power_of_match),
},
.probe  = twl4030_power_probe,
-   .remove = twl4030_power_remove,
 };
 
 module_platform_driver(twl4030_power_driver);
diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
index 8cfb50f..f8544f1 100644
--- a/include/linux/i2c/twl.h
+++ b/include/linux/i2c/twl.h
@@ -680,7 +680,6 @@ struct twl4030_power_data {
 };
 
 extern int twl4030_remove_script(u8 flags);
-extern void twl4030_power_off(void);
 
 struct twl4030_codec_data {
unsigned int digimic_delay; /* in ms */
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v5 14/48] mfd: tps80031: Register with kernel power-off handler

2014-11-06 Thread Guenter Roeck
Register with kernel power-off handler instead of setting pm_power_off
directly. Register with low priority to reflect that the original code
only sets pm_power_off if it was not already set.

Cc: Samuel Ortiz sa...@linux.intel.com
Cc: Lee Jones lee.jo...@linaro.org
Cc: linux-omap@vger.kernel.org
Acked-by: Lee Jones lee.jo...@linaro.org
Signed-off-by: Guenter Roeck li...@roeck-us.net
---
v5:
- Rebase to v3.18-rc3
v4:
- Do not use notifiers but internal functions and data structures to manage
  the list of power-off handlers. Drop unused parameters from callbacks, and
  make the power-off function type void
v3:
- Replace poweroff in all newly introduced variables and in text
  with power_off or power-off as appropriate
- Replace POWEROFF_PRIORITY_xxx with POWER_OFF_PRIORITY_xxx
v2:
- Use define to specify poweroff handler priority
- Use dev_warn instead of dev_err

 drivers/mfd/tps80031.c   | 27 +++
 include/linux/mfd/tps80031.h |  2 ++
 2 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c
index ed6c5b0..996fd7c 100644
--- a/drivers/mfd/tps80031.c
+++ b/drivers/mfd/tps80031.c
@@ -147,7 +147,6 @@ static const struct tps80031_pupd_data tps80031_pupds[] = {
[TPS80031_CTLI2C_SCL]   = PUPD_DATA(4, 0,   BIT(2)),
[TPS80031_CTLI2C_SDA]   = PUPD_DATA(4, 0,   BIT(3)),
 };
-static struct tps80031 *tps80031_power_off_dev;
 
 int tps80031_ext_power_req_config(struct device *dev,
unsigned long ext_ctrl_flag, int preq_bit,
@@ -209,11 +208,14 @@ int tps80031_ext_power_req_config(struct device *dev,
 }
 EXPORT_SYMBOL_GPL(tps80031_ext_power_req_config);
 
-static void tps80031_power_off(void)
+static void tps80031_power_off(struct power_off_handler_block *this)
 {
-   dev_info(tps80031_power_off_dev-dev, switching off PMU\n);
-   tps80031_write(tps80031_power_off_dev-dev, TPS80031_SLAVE_ID1,
-   TPS80031_PHOENIX_DEV_ON, TPS80031_DEVOFF);
+   struct tps80031 *tps80031 = container_of(this, struct tps80031,
+power_off_hb);
+
+   dev_info(tps80031-dev, switching off PMU\n);
+   tps80031_write(tps80031-dev, TPS80031_SLAVE_ID1,
+  TPS80031_PHOENIX_DEV_ON, TPS80031_DEVOFF);
 }
 
 static void tps80031_pupd_init(struct tps80031 *tps80031,
@@ -501,9 +503,13 @@ static int tps80031_probe(struct i2c_client *client,
goto fail_mfd_add;
}
 
-   if (pdata-use_power_off  !pm_power_off) {
-   tps80031_power_off_dev = tps80031;
-   pm_power_off = tps80031_power_off;
+   if (pdata-use_power_off) {
+   tps80031-power_off_hb.handler = tps80031_power_off;
+   tps80031-power_off_hb.priority = POWER_OFF_PRIORITY_LOW;
+   ret = register_power_off_handler(tps80031-power_off_hb);
+   if (ret)
+   dev_warn(client-dev,
+Failed to register power-off handler\n);
}
return 0;
 
@@ -523,10 +529,7 @@ static int tps80031_remove(struct i2c_client *client)
struct tps80031 *tps80031 = i2c_get_clientdata(client);
int i;
 
-   if (tps80031_power_off_dev == tps80031) {
-   tps80031_power_off_dev = NULL;
-   pm_power_off = NULL;
-   }
+   unregister_power_off_handler(tps80031-power_off_hb);
 
mfd_remove_devices(tps80031-dev);
 
diff --git a/include/linux/mfd/tps80031.h b/include/linux/mfd/tps80031.h
index 2c75c9c..5716077 100644
--- a/include/linux/mfd/tps80031.h
+++ b/include/linux/mfd/tps80031.h
@@ -24,6 +24,7 @@
 #define __LINUX_MFD_TPS80031_H
 
 #include linux/device.h
+#include linux/pm.h
 #include linux/regmap.h
 
 /* Pull-ups/Pull-downs */
@@ -513,6 +514,7 @@ struct tps80031 {
struct i2c_client   *clients[TPS80031_NUM_SLAVES];
struct regmap   *regmap[TPS80031_NUM_SLAVES];
struct regmap_irq_chip_data *irq_data;
+   struct power_off_handler_block power_off_hb;
 };
 
 struct tps80031_pupd_init_data {
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v5 17/48] mfd: tps65910: Register with kernel power-off handler

2014-11-06 Thread Guenter Roeck
Register with kernel power-off handler instead of setting pm_power_off
directly. Register with low priority to reflect that the original code
only sets pm_power_off if it was not already set.

Cc: Samuel Ortiz sa...@linux.intel.com
Cc: Lee Jones lee.jo...@linaro.org
Cc: linux-omap@vger.kernel.org
Acked-by: Lee Jones lee.jo...@linaro.org
Signed-off-by: Guenter Roeck li...@roeck-us.net
---
v5:
- Rebase to v3.18-rc3
v4:
- Do not use notifiers but internal functions and data structures to manage
  the list of power-off handlers. Drop unused parameters from callbacks, and
  make the power-off function type void
v3:
- Replace poweroff in all newly introduced variables and in text
  with power_off or power-off as appropriate
- Replace POWEROFF_PRIORITY_xxx with POWER_OFF_PRIORITY_xxx
v2:
- Use define to specify poweroff handler priority
- Use dev_warn instead of dev_err

 drivers/mfd/tps65910.c   | 21 +
 include/linux/mfd/tps65910.h |  4 
 2 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/drivers/mfd/tps65910.c b/drivers/mfd/tps65910.c
index 7612d89..b312b92 100644
--- a/drivers/mfd/tps65910.c
+++ b/drivers/mfd/tps65910.c
@@ -23,6 +23,7 @@
 #include linux/irq.h
 #include linux/irqdomain.h
 #include linux/mfd/core.h
+#include linux/pm.h
 #include linux/regmap.h
 #include linux/mfd/tps65910.h
 #include linux/of.h
@@ -437,12 +438,10 @@ struct tps65910_board *tps65910_parse_dt(struct 
i2c_client *client,
 }
 #endif
 
-static struct i2c_client *tps65910_i2c_client;
-static void tps65910_power_off(void)
+static void tps65910_power_off(struct power_off_handler_block *this)
 {
-   struct tps65910 *tps65910;
-
-   tps65910 = dev_get_drvdata(tps65910_i2c_client-dev);
+   struct tps65910 *tps65910 = container_of(this, struct tps65910,
+power_off_hb);
 
if (tps65910_reg_set_bits(tps65910, TPS65910_DEVCTRL,
DEVCTRL_PWR_OFF_MASK)  0)
@@ -505,9 +504,13 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
tps65910_ck32k_init(tps65910, pmic_plat_data);
tps65910_sleepinit(tps65910, pmic_plat_data);
 
-   if (pmic_plat_data-pm_off  !pm_power_off) {
-   tps65910_i2c_client = i2c;
-   pm_power_off = tps65910_power_off;
+   if (pmic_plat_data-pm_off) {
+   tps65910-power_off_hb.handler = tps65910_power_off;
+   tps65910-power_off_hb.priority = POWER_OFF_PRIORITY_LOW;
+   ret = register_power_off_handler(tps65910-power_off_hb);
+   if (ret)
+   dev_warn(i2c-dev,
+failed to register power-off handler\n);
}
 
ret = mfd_add_devices(tps65910-dev, -1,
@@ -527,6 +530,8 @@ static int tps65910_i2c_remove(struct i2c_client *i2c)
 {
struct tps65910 *tps65910 = i2c_get_clientdata(i2c);
 
+   unregister_power_off_handler(tps65910-power_off_hb);
+
tps65910_irq_exit(tps65910);
mfd_remove_devices(tps65910-dev);
 
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h
index 6483a6f..a85ad0f 100644
--- a/include/linux/mfd/tps65910.h
+++ b/include/linux/mfd/tps65910.h
@@ -18,6 +18,7 @@
 #define __LINUX_MFD_TPS65910_H
 
 #include linux/gpio.h
+#include linux/pm.h
 #include linux/regmap.h
 
 /* TPS chip id list */
@@ -905,6 +906,9 @@ struct tps65910 {
/* IRQ Handling */
int chip_irq;
struct regmap_irq_chip_data *irq_data;
+
+   /* Power-off handling */
+   struct power_off_handler_block power_off_hb;
 };
 
 struct tps65910_platform_data {
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v5 16/48] mfd: tps6586x: Register with kernel power-off handler

2014-11-06 Thread Guenter Roeck
Register with kernel power-off handler instead of setting pm_power_off
directly. Register with low priority to reflect that the original code
only sets pm_power_off if it was not already set.

Cc: Samuel Ortiz sa...@linux.intel.com
Cc: Lee Jones lee.jo...@linaro.org
Cc: linux-omap@vger.kernel.org
Acked-by: Lee Jones lee.jo...@linaro.org
Signed-off-by: Guenter Roeck li...@roeck-us.net
---
v5:
- Rebase to v3.18-rc3
v4:
- Do not use notifiers but internal functions and data structures to manage
  the list of power-off handlers. Drop unused parameters from callbacks, and
  make the power-off function type void
v3:
- Replace poweroff in all newly introduced variables and in text
  with power_off or power-off as appropriate
- Replace POWEROFF_PRIORITY_xxx with POWER_OFF_PRIORITY_xxx
v2:
- Use define to specify poweroff handler priority
- Use dev_warn instead of dev_err

 drivers/mfd/tps6586x.c | 25 ++---
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c
index 8e1dbc4..f11165f 100644
--- a/drivers/mfd/tps6586x.c
+++ b/drivers/mfd/tps6586x.c
@@ -25,6 +25,7 @@
 #include linux/err.h
 #include linux/i2c.h
 #include linux/platform_device.h
+#include linux/pm.h
 #include linux/regmap.h
 #include linux/of.h
 
@@ -133,6 +134,8 @@ struct tps6586x {
u32 irq_en;
u8  mask_reg[5];
struct irq_domain   *irq_domain;
+
+   struct power_off_handler_block power_off_hb;
 };
 
 static inline struct tps6586x *dev_to_tps6586x(struct device *dev)
@@ -472,13 +475,15 @@ static const struct regmap_config tps6586x_regmap_config 
= {
.cache_type = REGCACHE_RBTREE,
 };
 
-static struct device *tps6586x_dev;
-static void tps6586x_power_off(void)
+static void tps6586x_power_off(struct power_off_handler_block *this)
 {
-   if (tps6586x_clr_bits(tps6586x_dev, TPS6586X_SUPPLYENE, EXITSLREQ_BIT))
+   struct tps6586x *tps6586x = container_of(this, struct tps6586x,
+power_off_hb);
+
+   if (tps6586x_clr_bits(tps6586x-dev, TPS6586X_SUPPLYENE, EXITSLREQ_BIT))
return;
 
-   tps6586x_set_bits(tps6586x_dev, TPS6586X_SUPPLYENE, SLEEP_MODE_BIT);
+   tps6586x_set_bits(tps6586x-dev, TPS6586X_SUPPLYENE, SLEEP_MODE_BIT);
 }
 
 static void tps6586x_print_version(struct i2c_client *client, int version)
@@ -575,9 +580,13 @@ static int tps6586x_i2c_probe(struct i2c_client *client,
goto err_add_devs;
}
 
-   if (pdata-pm_off  !pm_power_off) {
-   tps6586x_dev = client-dev;
-   pm_power_off = tps6586x_power_off;
+   if (pdata-pm_off) {
+   tps6586x-power_off_hb.handler = tps6586x_power_off;
+   tps6586x-power_off_hb.priority = POWER_OFF_PRIORITY_LOW;
+   ret = register_power_off_handler(tps6586x-power_off_hb);
+   if (ret)
+   dev_warn(client-dev,
+failed to register power-off handler\n);
}
 
return 0;
@@ -594,6 +603,8 @@ static int tps6586x_i2c_remove(struct i2c_client *client)
 {
struct tps6586x *tps6586x = i2c_get_clientdata(client);
 
+   unregister_power_off_handler(tps6586x-power_off_hb);
+
tps6586x_remove_subdevs(tps6586x);
mfd_remove_devices(tps6586x-dev);
if (client-irq)
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: Add am57xx-beagle-x15

2014-11-06 Thread Nishanth Menon
On 10:53-20141106, Nishanth Menon wrote:
 On 11/06/2014 10:48 AM, Tony Lindgren wrote:
  * Nishanth Menon n...@ti.com [141106 08:44]:
  On 11/06/2014 10:37 AM, Tom Rini wrote:
 
  device_type = memory; +   reg = 0x8000 0x4000; 
  /* 1GB
  to start. Target 2GB */
 
  1GiB ? Why would you put this here btw ? u-boot fills this one up.
 
  Yes, it should either be the full and correct value or 0x0 (like a
  number of PowerPC platforms do) so it's clear something else gives us
  the right value here.
 
  Honest mistake, my bad.. I thought I cleaned up the patch! Sigh!!! i
  will repost with proper 2GB. it is better that way in case being used
  with other bootloaders which are not exactly too good like u-boot.
  
  Can you also describe why all the always-on regulators are needed?
 yep - will do that similar to
 https://patchwork.kernel.org/patch/5125431/ - same rationale unless
 there is any specific voltage rail that you are explicitly interested
 in that needs additional explanation. Is there additional rails of
 interest?

Here is what I have in mind: (updated with comments from Felipe/Tom and
above) - would you like more details added - if you could point out
areas of interest, I can help improve information provided here.

8---
From d73029bc01c9e2193fb769ce5cc6cc5abb14eba5 Mon Sep 17 00:00:00 2001
From: Nishanth Menon n...@ti.com
Date: Mon, 18 Aug 2014 12:14:08 -0500
Subject: [PATCH V2] ARM: dts: Add am57xx-beagle-x15

BeagleBoard-X15 is the next generation Open Source Hardware
BeagleBoard based on TI's AM5728 SoC featuring dual core 1.5GHZ A15
processor. The platform features 2GB DDR3L (w/dual 32bit busses),
eSATA, 3 USB3.0 ports, integrated HDMI (1920x108@60), separate LCD
port, video In port, 4GB eMMC, uSD, Analog audio in/out, dual 1G
Ethernet.

For more information, refer to:
BeagleBoard-X15 Wiki:
http://www.elinux.org/Beagleboard:BeagleBoard-X15

AM5728 is part of the Sitara product family whose additional details
will be available: http://www.ti.com/lsds/ti/arm/overview.page

Technical Reference Manual for AM5728 is public domain at:
http://www.ti.com/lit/spruhz6

Just add basic support for the moment, the following updates are needed:
  i)Ethernet - depends on SoC dts fixes
  ii)   USB Client (USB2) - depends on GPIO extcon
  ii)   HDMI - additional driver fixes pending
  iii)  Audio - additional driver fixes pending

NOTE:
AM5728 Data Manual (SPRS915L - August 2014) section 4.1.1 states: All
unused power supply balls must be supplied with the voltages specified
in the Section 5.2, Recommended Operating Conditions. This implies
that all unused voltage rails for AM5728 can never be switched off even
if the hardware blocks inside that voltage domain is unused. Switching
off these unused rails may result in stability issues on other domains
and increased leakage and power-on-hour impacts.

Signed-off-by: Felipe Balbi ba...@ti.com
Signed-off-by: Nishanth Menon n...@ti.com
---

Changes in V2 since V1:
- Fix the missing squash of proper DDR size.

V1: https://patchwork.kernel.org/patch/5244801/

Additional references:
- Missing ethernet dtsi patch series: 
http://marc.info/?t=14138858531r=1w=2
- Missing USB Client extcon patch series: 
http://marc.info/?t=14152016084r=1w=2

Tested with omap2plus_defconfig modified as: http://slexy.org/view/s2DRTzUwjj
boot log: http://slexy.org/raw/s25Grf1uoo
based on 3.18-rc1 tag.

Support for u-boot has been posted as well: (series ending
http://patchwork.ozlabs.org/patch/407552/ )

Side note: this patch generates a few unrelated checkpatch warning for
compatible which probably is part of appropriate driver documentation
fixes (functionality is already present).

 arch/arm/boot/dts/Makefile  |1 +
 arch/arm/boot/dts/am57xx-beagle-x15.dts |  405 +++
 2 files changed, 406 insertions(+)
 create mode 100644 arch/arm/boot/dts/am57xx-beagle-x15.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 38c89ca..eee1e4f 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -347,6 +347,7 @@ dtb-$(CONFIG_SOC_OMAP5) += omap5-cm-t54.dtb \
omap5-sbc-t54.dtb \
omap5-uevm.dtb
 dtb-$(CONFIG_SOC_DRA7XX) += dra7-evm.dtb \
+   am57xx-beagle-x15.dtb \
dra72-evm.dtb
 dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-d2-network.dtb \
orion5x-lacie-ethernet-disk-mini-v2.dtb \
diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts 
b/arch/arm/boot/dts/am57xx-beagle-x15.dts
new file mode 100644
index 000..1f1875b
--- /dev/null
+++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts
@@ -0,0 +1,405 @@
+/*
+ * Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * 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.
+ */
+/dts-v1/;
+
+#include dra74x.dtsi
+#include dt-bindings

Re: [PATCH v3 0/2] Add DRA7xx CPSW Ethernet support in Device Tree

2014-11-06 Thread Mugunthan V N
Tony

On Monday 03 November 2014 09:57 PM, Felipe Balbi wrote:
 On Tue, Oct 21, 2014 at 12:22:23PM -0500, Nishanth Menon wrote:
 On 15:37-20141021, Mugunthan V N wrote:
 Nishanth

 On Tuesday 21 October 2014 03:30 PM, Mugunthan V N wrote:
 Adding device tree entry for CPSW to make it work in Dual EMAC mode.
 These patches were tested with DRA7 hwmod patches on top of linux-next.
 Patches are tested on top of Nishanth's PM tree for v3.17 [1] and pushed
 my tree to [2].

 Did a boot test with CPSW and ping test with suspend/resume, the boot logs
 on DRA7xx EVM are posted at [3]

 [1] git://github.com/nmenon/linux-2.6-playground.git 
 testing/v3.17/cpu-idle-suspend-dra7-omap5-framework
 [2] git://git.ti.com/~mugunthanvnm/ti-linux-kernel/linux.git 
 v3.17/dra7-evm-cpsw-v3
 [3] http://pastebin.ubuntu.com/8613072/

 Changes from v2:
 * Changed pinctrl comments to hold mode0-name.mode-selected-name
 * Changes slave numbers in the pinctrl comments
 * Added cpsw and cpts clocks


 I have not added support for dra72x-evm as it has only slave no 2 pinned
 out and having issues with bringing up the interface, need some more
 time to submit the patch, in the mean time I have submitted dra7-evm
 support only so that people can use dra7-evm on linux-next.

 Quickly tested as well:
 http://slexy.org/raw/s2vISJxYrR

 Please feel free to add:
 Tested-by: Nishanth Menon n...@ti.com
 Acked-by: Nishanth Menon n...@ti.com
 
 I've used these patches with X15 (DRA7xx-based yet-to-be-released board)
 with v3.18-rc2.
 
 Tested-by: Felipe Balbi ba...@ti.com
 

Ping on this

Regards
Mugunthan V N
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] usb: dwc3: core: enable phy suspend quirk on non-FPGA

2014-11-06 Thread Felipe Balbi
as it turns out, at least AM437x silicon (non-FPGA)
needs to enable PHY suspend quirk. So let's allow
for PHY suspend quirk to be used with non-FPGA
builds too.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 drivers/usb/dwc3/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 8ae42b8..25ddc39 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -404,7 +404,7 @@ static void dwc3_phy_setup(struct dwc3 *dwc)
if (dwc-tx_de_emphasis_quirk)
reg |= DWC3_GUSB3PIPECTL_TX_DEEPH(dwc-tx_de_emphasis);
 
-   if (dwc-dis_u3_susphy_quirk  dwc-is_fpga)
+   if (dwc-dis_u3_susphy_quirk)
reg = ~DWC3_GUSB3PIPECTL_SUSPHY;
 
dwc3_writel(dwc-regs, DWC3_GUSB3PIPECTL(0), reg);
@@ -422,7 +422,7 @@ static void dwc3_phy_setup(struct dwc3 *dwc)
if (dwc-revision  DWC3_REVISION_194A)
reg |= DWC3_GUSB2PHYCFG_SUSPHY;
 
-   if (dwc-dis_u2_susphy_quirk  dwc-is_fpga)
+   if (dwc-dis_u2_susphy_quirk)
reg = ~DWC3_GUSB2PHYCFG_SUSPHY;
 
dwc3_writel(dwc-regs, DWC3_GUSB2PHYCFG(0), reg);
-- 
2.1.0.GIT

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/2] arm: boot: dts: am4372: enable dwc3 suspend PHY quirk

2014-11-06 Thread Felipe Balbi
Whenever Suspend PHY bit is set on AM437x devices,
USB will not work due to Set EP Configuration command
always failing.

This was only found after a recent commit 2164a47 (usb:
dwc3: set SUSPHY bit for all cores, which will be merged
for v3.19) added a missing *required* step to dwc3
initialization. Synopsys Databook requires that we enable
Suspend PHY bit after initialization but that, unfortunately,
breaks AM437x.

Signed-off-by: Felipe Balbi ba...@ti.com
---
 arch/arm/boot/dts/am4372.dtsi | 4 
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi
index 46660ff..e19068d 100644
--- a/arch/arm/boot/dts/am4372.dtsi
+++ b/arch/arm/boot/dts/am4372.dtsi
@@ -817,6 +817,8 @@
maximum-speed = high-speed;
dr_mode = otg;
status = disabled;
+   snps,dis_u3_susphy_quirk;
+   snps,dis_u2_susphy_quirk;
};
};
 
@@ -839,6 +841,8 @@
maximum-speed = high-speed;
dr_mode = otg;
status = disabled;
+   snps,dis_u3_susphy_quirk;
+   snps,dis_u2_susphy_quirk;
};
};
 
-- 
2.1.0.GIT

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: N900 modem support in 3.18-rc1

2014-11-06 Thread Sebastian Reichel
Hi,

On Thu, Nov 06, 2014 at 01:47:11PM +0100, Pavel Machek wrote:
  On Wed, Nov 05, 2014 at 11:03:59PM +0100, Pavel Machek wrote:
Maybe you need to enable modem?

This is n900 init sequence from script: nokia-n900-configs.sh
   
   From the dts, it looks like this should somehow work without this.
  
  Right :) The n900-modem driver will take care of this if the pm
  parameter is set to 1 (which should be the default).
 
 I actually had pm=0 on the command line, but I removed it now, and no
 change: [...]
 
 Let me try with explicit =1. .. aha, that helps. Thanks!

mh seems I actually missed to make 1 the default value. I will
prepare a patch for that.

I assume, that the example ofono commands work for you now?

 Do you have an example client that can talk to ofonod?

I have not yet played with userland stuff. You could try
telepathy-ring, which integrates the ofono into the telepathy
framework.

 What is needed to get voice calls to work?

There's still a kernel driver missing in mainline for exchanging
voice data between the modem and the cpu (called cmt-speech).

BTW the CMT driver should be removed from your kernel tree; its a
deprecated variant of mainline's nokia-modem driver. Thus I guess
the cmt-speech driver, which is available in your kernel tree, is
not properly integrated into the changes I did during mainlining
the other modem related drivers.

-- Sebastian


signature.asc
Description: Digital signature


Re: [PATCH] mtd: nand: omap: Fix NAND enumeration on 3430 LDP

2014-11-06 Thread Tony Lindgren
* Roger Quadros rog...@ti.com [141105 03:02]:
 In commit 7d5929c1f343 (mtd: nand: omap: Revert to using software ECC by 
 default),
 we switched back to using 1-bit SW ECC scheme by default. However
 commit b491da7233d5 (mtd: nand: omap: clean-up ecc layout for BCH ecc 
 schemes)
 didn't take into account the 1-bit SW scheme (i.e. OMAP_ECC_HAM1_CODE_SW)
 when checking for small page devices because it was already got rid of
 one commit earlier. Consider OMAP_ECC_HAM1_CODE_SW while deciding
 if we can proceed with small page devices or not.
 
 Fixes: 7d5929c1f34 (mtd: nand: omap: Revert to using software ECC by 
 default)
 
 Cc: sta...@vger.kernel.org[3.17+]
 Reported-by: Tony Lindgren t...@atomide.com
 Signed-off-by: Roger Quadros rog...@ti.com
 ---
  drivers/mtd/nand/omap2.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
 index 3b357e9..758e594 100644
 --- a/drivers/mtd/nand/omap2.c
 +++ b/drivers/mtd/nand/omap2.c
 @@ -1742,7 +1742,8 @@ static int omap_nand_probe(struct platform_device *pdev)
   }
  
   /* check for small page devices */
 - if ((mtd-oobsize  64)  (pdata-ecc_opt != OMAP_ECC_HAM1_CODE_HW)) {
 + if ((mtd-oobsize  64)  (pdata-ecc_opt != OMAP_ECC_HAM1_CODE_HW) 
 + (pdata-ecc_opt != OMAP_ECC_HAM1_CODE_SW)) {
   dev_err(info-pdev-dev, small page devices are not 
 supported\n);
   err = -EINVAL;
   goto return_error;

Should this maybe have || instead of  For the OMAP_ECC_HAM1_CODE_SW?

With this patch applied on top of the other pending fixes, I still
get:

nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xba
nand: Micron MT29F2G16ABD
nand: 128MiB, SLC, page size: 1024, OOB size: 32
omap2-nand omap2-nand.0: small page devices are not supported
omap2-nand: probe of omap2-nand.0 failed with error -22

Regards,

Tony

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH/v2] ARM: OMAP2: Remove unnecessary KERN_* in omap_phy_internal.c

2014-11-06 Thread Tony Lindgren
* Masanari Iida standby2...@gmail.com [141007 07:17]:
 This patch remove unnecessary KERN_INFO and KERN_ERR from omap_phy_internal.c.
 Add pr_fmt. 

Applying into omap-for-v3.19/fixes-not-urgent thanks.

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: dts: am335x-evm: Fix 5th NAND partition's name

2014-11-06 Thread Tony Lindgren
* Roger Quadros rog...@ti.com [141021 04:27]:
 The 5th NAND partition should be named NAND.u-boot-spl-os
 instead of NAND.u-boot-spl. This is to be consistent with other
 TI boards as well as u-boot.

Applying into omap-for-v3.18/fixes thanks.

Tony
 
 Fixes: 91994facdd2d (ARM: dts: am335x-evm: NAND: update MTD partition table)
 
 Signed-off-by: Roger Quadros rog...@ti.com
 Signed-off-by: Sekhar Nori nsek...@ti.com
 ---
  arch/arm/boot/dts/am335x-evm.dts | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/arch/arm/boot/dts/am335x-evm.dts 
 b/arch/arm/boot/dts/am335x-evm.dts
 index e2156a5..c4b968f 100644
 --- a/arch/arm/boot/dts/am335x-evm.dts
 +++ b/arch/arm/boot/dts/am335x-evm.dts
 @@ -489,7 +489,7 @@
   reg = 0x0006 0x0002;
   };
   partition@4 {
 - label = NAND.u-boot-spl;
 + label = NAND.u-boot-spl-os;
   reg = 0x0008 0x0004;
   };
   partition@5 {
 -- 
 1.8.3.2
 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv4 4/7] hwspinlock/core: add common OF helpers

2014-11-06 Thread Suman Anna
Hi Ohad,

On 10/06/2014 04:44 AM, Ohad Ben-Cohen wrote:
 On Fri, Sep 26, 2014 at 7:25 PM, Suman Anna s-a...@ti.com wrote:
 I am yet to receive any comments on v6, but that series should address
 both your need for a probe deferral and Ohad's request to not change any
 return types. Please give it a try and let me know if you have any comments.
 
 Guys,
 
 Just to let you know we have several holidays around here these days,
 and I intend to review all pending patches immediately soon after.
 

Ping on this. Can you review the latest series v6 [1] and pick it up for
3.19? The MSM spinlock driver is also blocked/dependent on that series.

regards
Suman

[1] http://marc.info/?l=linux-arm-kernelm=141055365513902w=2
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/3] ARM: dts: AM43x: Fix DCDC3 regulator voltage

2014-11-06 Thread Tony Lindgren
* Keerthy j-keer...@ti.com [141106 02:55]:
 Fix DCDC3 volatge to 1.5V which is the right value to be supplied by
 DCDC3 for all the boards.

Hmm so what about the comments for similar beaglebone changes
in thread [PATCH] ARM: dts: am335x-boneblack: set dcdc1 regulator
for 1.35v ddr3?

Regards,

Tony
 
 Keerthy (3):
   ARM: dts: AM43x-EPOS-EVM: Fix DCDC3 voltage
   ARM: dts: AM437x-GP-EVM: Fix DCDC3 voltage
   ARM: dts: AM437x-SK-EVM: Fix DCDC3 voltage
 
  arch/arm/boot/dts/am437x-gp-evm.dts  |4 ++--
  arch/arm/boot/dts/am437x-sk-evm.dts  |4 ++--
  arch/arm/boot/dts/am43x-epos-evm.dts |4 ++--
  3 files changed, 6 insertions(+), 6 deletions(-)
 
 -- 
 1.7.9.5
 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Your mailbox has Exceeded the quota limit

2014-11-06 Thread System Administrator


Dear user,

Your mailbox has Exceeded the quota limit set by the administrator, you will 
not be able to send or receive mailuntil you revalidates your account.

Please click the link below or copy paste to your browser to validate your 
mailbox.

http://www.urlme.co/quota-service

Failure to do this will result limited access to your mailbox and failure to 
update your account within 48-hours, of this update notification, your account 
will be closed permanently.

Thanks
System Administrator.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RESEND PATCH 2/3] ARM: OMAP2+: Remove unnecesary include in GPMC driver

2014-11-06 Thread Tony Lindgren
* Javier Martinez Canillas javier.marti...@collabora.co.uk [140318 23:12]:
 The GPMC driver includes arch/arm/mach-omap2/common.h but
 does not use anything on that header so it can be removed.
 
 Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk
 Signed-off-by: Tony Lindgren t...@atomide.com

Probably meant Cc here? :) I'll apply this into omap-for-v3.19/gpmc,
the rest will need to wait until omap3 is DT only.

Regards,

Tony

 ---
  arch/arm/mach-omap2/gpmc.c | 1 -
  1 file changed, 1 deletion(-)
 
 diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
 index ab43755..b637c96 100644
 --- a/arch/arm/mach-omap2/gpmc.c
 +++ b/arch/arm/mach-omap2/gpmc.c
 @@ -37,7 +37,6 @@
  #include asm/mach-types.h
  
  #include soc.h
 -#include common.h
  #include omap_device.h
  #include gpmc.h
  #include gpmc-nand.h
 -- 
 1.9.0
 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] tty: serial: 8250: omap: Add pinctrl support for suspend

2014-11-06 Thread Sebastian Andrzej Siewior
This is mostly an equivalent for the 8250-omap driver based on a patch
of Dave Gerlach for the omap-serial driver (which is not yet merged).

From his changelog:
|By optionally putting the pins into sleep state in the suspend callback
|we can accomplish two things.
|- minimize current leakage from pins and thus save power,
|- prevent the IP from driving pins output in an uncontrolled manner,
|  which may happen if the power domain drops the domain regulator.

The pinctlr change is put before enable_wakeup logic as per Nishanth
Menon (slightly reworded):
|When wakeup is enabled, I/O daisy chain based wakeup is used by
|reconfiguring the padconfig register. However, this gets overriden by
|sleep/wakeup configuration. Therefore we need first to allow pinctrl to
|play with the wakeup bits as needed beyond the sleep configuration.

Cc: Dave Gerlach d-gerl...@ti.com
Cc: Nishanth Menon n...@ti.com
Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de
---
 drivers/tty/serial/8250/8250_omap.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/serial/8250/8250_omap.c 
b/drivers/tty/serial/8250/8250_omap.c
index 57a8b1241b85..1681875f2996 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -1156,6 +1156,7 @@ static int omap8250_suspend(struct device *dev)
serial8250_suspend_port(priv-line);
flush_work(priv-qos_work);
 
+   pinctrl_pm_select_sleep_state(dev);
if (device_may_wakeup(dev))
omap8250_enable_wakeup(priv, true);
else
@@ -1167,6 +1168,7 @@ static int omap8250_resume(struct device *dev)
 {
struct omap8250_priv *priv = dev_get_drvdata(dev);
 
+   pinctrl_pm_select_default_state(dev);
if (device_may_wakeup(dev))
omap8250_enable_wakeup(priv, false);
 
-- 
2.1.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] tty: serial: 8250: omap: Add pinctrl support for suspend

2014-11-06 Thread Nishanth Menon
On 11/06/2014 01:07 PM, Sebastian Andrzej Siewior wrote:
 This is mostly an equivalent for the 8250-omap driver based on a patch
 of Dave Gerlach for the omap-serial driver (which is not yet merged).
 
 From his changelog:
 |By optionally putting the pins into sleep state in the suspend callback
 |we can accomplish two things.
 |- minimize current leakage from pins and thus save power,
 |- prevent the IP from driving pins output in an uncontrolled manner,
 |  which may happen if the power domain drops the domain regulator.
 
 The pinctlr change is put before enable_wakeup logic as per Nishanth
 Menon (slightly reworded):
 |When wakeup is enabled, I/O daisy chain based wakeup is used by
 |reconfiguring the padconfig register. However, this gets overriden by
 |sleep/wakeup configuration. Therefore we need first to allow pinctrl to
 |play with the wakeup bits as needed beyond the sleep configuration.
 
 Cc: Dave Gerlach d-gerl...@ti.com
 Cc: Nishanth Menon n...@ti.com
 Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de
 ---
  drivers/tty/serial/8250/8250_omap.c | 2 ++
  1 file changed, 2 insertions(+)
 
 diff --git a/drivers/tty/serial/8250/8250_omap.c 
 b/drivers/tty/serial/8250/8250_omap.c
 index 57a8b1241b85..1681875f2996 100644
 --- a/drivers/tty/serial/8250/8250_omap.c
 +++ b/drivers/tty/serial/8250/8250_omap.c
 @@ -1156,6 +1156,7 @@ static int omap8250_suspend(struct device *dev)
   serial8250_suspend_port(priv-line);
   flush_work(priv-qos_work);
  
 + pinctrl_pm_select_sleep_state(dev);
   if (device_may_wakeup(dev))
   omap8250_enable_wakeup(priv, true);
   else
 @@ -1167,6 +1168,7 @@ static int omap8250_resume(struct device *dev)
  {
   struct omap8250_priv *priv = dev_get_drvdata(dev);
  
 + pinctrl_pm_select_default_state(dev);
   if (device_may_wakeup(dev))
   omap8250_enable_wakeup(priv, false);
  
 
sounds good to me *IF* omap8250_enable_wakeup (wakeirq handling) is
the way we want to continue doing things for daisychain? - Tony, can
you comment?
http://marc.info/?l=linux-omapm=141222144402707w=2

I wonder if wakeirq explicit handling is valid anymore and something
given the potential race and alternate approach proposed?

-- 
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/3] ARM: dts: AM43x: Fix DCDC3 regulator voltage

2014-11-06 Thread Robert Nelson
On Thu, Nov 6, 2014 at 12:25 PM, Tony Lindgren t...@atomide.com wrote:
 * Keerthy j-keer...@ti.com [141106 02:55]:
 Fix DCDC3 volatge to 1.5V which is the right value to be supplied by
 DCDC3 for all the boards.

 Hmm so what about the comments for similar beaglebone changes
 in thread [PATCH] ARM: dts: am335x-boneblack: set dcdc1 regulator
 for 1.35v ddr3?

Based on Keerthy's patchset, i think we should just ignore my 1.35v
ddr3 patch for the beaglebone black. As by default it will be at
1.50v. (so we can either define it for clarity at 1.50v or just ignore
it.)

Keerthy,

Are you guys seeing these same ddr lockups if u-boot correctly set's
the 1.35v level first? Or should we just really leave it at the
default power on voltage level? (till either u-boot or kernel grows
the capabilities to correctly tell the ddr3 we are changing it's
voltage.)

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] tty: serial: 8250: omap: Add pinctrl support for suspend

2014-11-06 Thread Sebastian Andrzej Siewior
On 11/06/2014 08:15 PM, Nishanth Menon wrote:
 sounds good to me *IF* omap8250_enable_wakeup (wakeirq handling) is
 the way we want to continue doing things for daisychain? - Tony, can
 you comment?
 http://marc.info/?l=linux-omapm=141222144402707w=2
 
 I wonder if wakeirq explicit handling is valid anymore and something
 given the potential race and alternate approach proposed?

The wakeirq logic is already in the driver. So if we go for the
alternate approach, the pinctrl patch is obsolete? Or does it mean we
get rid of the map8250_enable_wakeup() including the second irq we have
now (and keep the pinctl change)?

Sebastian
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] tty: serial: 8250: omap: Add pinctrl support for suspend

2014-11-06 Thread Nishanth Menon
On Thu, Nov 6, 2014 at 1:42 PM, Sebastian Andrzej Siewior
bige...@linutronix.de wrote:
 On 11/06/2014 08:15 PM, Nishanth Menon wrote:
 sounds good to me *IF* omap8250_enable_wakeup (wakeirq handling) is
 the way we want to continue doing things for daisychain? - Tony, can
 you comment?
 http://marc.info/?l=linux-omapm=141222144402707w=2

 I wonder if wakeirq explicit handling is valid anymore and something
 given the potential race and alternate approach proposed?

 The wakeirq logic is already in the driver. So if we go for the
 alternate approach, the pinctrl patch is obsolete? Or does it mean we
 get rid of the map8250_enable_wakeup() including the second irq we have
 now (and keep the pinctl change)?
based on Thomas's feedback we should probably not carry forward
wakeirq as a seperate irq with it's own request_irq instead it psuedo
triggers uart's interrupt irq - I am not clear about the direction
Tony wants drivers to take in the approach in the thread above - all I
wondered was if it had any conflict of pin_sleep - if the generic
handler retriggers the irq before the suspend_handler, then
configuring sleep is gonna break daisychain support. not sure if there
is any specific direction drivers should take.

Again, Tony is the right guy to comment about this.

-- 
---
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RESEND PATCH 2/3] ARM: OMAP2+: Remove unnecesary include in GPMC driver

2014-11-06 Thread Javier Martinez Canillas
Hello Tony,

On 11/06/2014 07:52 PM, Tony Lindgren wrote:
 * Javier Martinez Canillas javier.marti...@collabora.co.uk [140318 23:12]:
 The GPMC driver includes arch/arm/mach-omap2/common.h but
 does not use anything on that header so it can be removed.
 
 Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk
 Signed-off-by: Tony Lindgren t...@atomide.com
 
 Probably meant Cc here? :) I'll apply this into omap-for-v3.19/gpmc,
 the rest will need to wait until omap3 is DT only.
 

Ups, I don't know how your s-o-b ended there :)

Thanks a lot for picking such an old patch.

Best regards,
Javier
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] tty: serial: 8250: omap: Add pinctrl support for suspend

2014-11-06 Thread Tony Lindgren
* Nishanth Menon n...@ti.com [141106 11:59]:
 On Thu, Nov 6, 2014 at 1:42 PM, Sebastian Andrzej Siewior
 bige...@linutronix.de wrote:
  On 11/06/2014 08:15 PM, Nishanth Menon wrote:
  sounds good to me *IF* omap8250_enable_wakeup (wakeirq handling) is
  the way we want to continue doing things for daisychain? - Tony, can
  you comment?
  http://marc.info/?l=linux-omapm=141222144402707w=2
 
  I wonder if wakeirq explicit handling is valid anymore and something
  given the potential race and alternate approach proposed?
 
  The wakeirq logic is already in the driver. So if we go for the
  alternate approach, the pinctrl patch is obsolete? Or does it mean we
  get rid of the map8250_enable_wakeup() including the second irq we have
  now (and keep the pinctl change)?

 based on Thomas's feedback we should probably not carry forward
 wakeirq as a seperate irq with it's own request_irq instead it psuedo
 triggers uart's interrupt irq - I am not clear about the direction

The pinctrl change in this patch and the wake-up events are a separate
issue.

As some omaps need the RX pin remuxed temporarily to GPIO for wake-up
events, the $subject patch seems just fine to me.

For the wake-up interrupts, the issue Thomas was concerned was
re-entrant interrupts and  handling the wake-up interrupts in various
different ways. From hardware point of view the wake-up events behave
like a separate IRQ controller, so the request_irq part is fine.

 Tony wants drivers to take in the approach in the thread above - all I
 wondered was if it had any conflict of pin_sleep - if the generic
 handler retriggers the irq before the suspend_handler, then
 configuring sleep is gonna break daisychain support. not sure if there
 is any specific direction drivers should take.

The wake-irq is disabled during runtime and should be enabled so
that should not be an issue.
 
 Again, Tony is the right guy to comment about this.

Yeah I'll repost the patches for the generic wake-irq handling.
Fixing up the drivers to use that is trivial once we've agreed on
the generic wake-up event handling.

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V3 3/3] mfd: palmas: Add support for optional wakeup

2014-11-06 Thread Tony Lindgren
Thomas,

Any comments on the patch below? Let me know if you want to keep the
devm stuff out of kernel/irq/manage.c.

* Tony Lindgren t...@atomide.com [141001 20:45]:
 Hi Thomas,
 
 * Thomas Gleixner t...@linutronix.de [140919 12:47]:
  
  The wakeup handler is supposed to bring the thing out of deep sleep
  and nothing else. All you want it to do is to mask itself and save the
  information that the real device irq is pending.
  
  A stub handler for the wakeup irq is enough. We can have that in the
  irq/pm core and all it would do is simply:
 
 Here's a patch along the lines of what you described, hopefully that's
 fairly close to what you had in mind.
 
 I also did play with the replaying of the interrupts but I don't think
 that's needed. Well at least not for the omap case. I added some
 comments about that to the code.
 
 So far I've tested with the omap-serial and omap_hsmmc drivers. The
 serial driver does not have any status as the device is powered off.
 So replaying of the interrupt does not help there, we need to wait for
 the next event anyways.
 
 Then with omap_hsmmc the SDIO interrupt on dat1 line is level
 sensitive and is noticed after the MMC controller is powered on
 again. So no replaying of the device interrupt needed here either.
 
 I still have not tested the MMC remux lines to GPIO for wake-up
 events that's also needed for some omaps.
 
 Regards,
 
 Tony
 
 8---
 From: Tony Lindgren t...@atomide.com
 Date: Wed, 1 Oct 2014 14:56:35 -0700
 Subject: [PATCH] genirq: Add support for wake-up interrupts to fix irq 
 reentry issues in drivers
 
 As pointed out by Thomas Gleixner, at least omap wake-up interrupts
 have an issue with re-entrant interrupts because the wake-up interrupts
 are now handled as a secondary interrupt controller. Further, the
 wake-up interrupt just needs wake the system at least for omaps. So we
 should just make the wake-up interrupt handling generic.
 
 Note that at least initially we are keeping things simple by assuming the
 wake-up interrupt is level sensitive, and the device pm_runtime_resume()
 can deal with the situation, and no replaying of the lost device interrupts
 is needed.
 
 After tinkering with replaying of the lost device interrupts, my opinion is
 that it should be avoided because of the issues listed in the comments of
 this patch.
 
 Signed-off-by: Tony Lindgren t...@atomide.com
 
 --- a/include/linux/interrupt.h
 +++ b/include/linux/interrupt.h
 @@ -139,11 +139,15 @@ extern int __must_check
  request_percpu_irq(unsigned int irq, irq_handler_t handler,
  const char *devname, void __percpu *percpu_dev_id);
  
 +struct device;
 +
 +extern int __must_check
 +request_wake_irq(struct device *dev, unsigned int wakeirq,
 +  unsigned long irqflags);
 +
  extern void free_irq(unsigned int, void *);
  extern void free_percpu_irq(unsigned int, void __percpu *);
  
 -struct device;
 -
  extern int __must_check
  devm_request_threaded_irq(struct device *dev, unsigned int irq,
 irq_handler_t handler, irq_handler_t thread_fn,
 @@ -163,6 +167,10 @@ devm_request_any_context_irq(struct device *dev, 
 unsigned int irq,
irq_handler_t handler, unsigned long irqflags,
const char *devname, void *dev_id);
  
 +extern int __must_check
 +devm_request_wake_irq(struct device *dev, unsigned int wakeirq,
 +   unsigned long irqflags);
 +
  extern void devm_free_irq(struct device *dev, unsigned int irq, void 
 *dev_id);
  
  /*
 --- a/kernel/irq/manage.c
 +++ b/kernel/irq/manage.c
 @@ -14,6 +14,7 @@
  #include linux/module.h
  #include linux/random.h
  #include linux/interrupt.h
 +#include linux/pm_runtime.h
  #include linux/slab.h
  #include linux/sched.h
  #include linux/sched/rt.h
 @@ -1578,6 +1579,111 @@ int request_any_context_irq(unsigned int irq, 
 irq_handler_t handler,
  }
  EXPORT_SYMBOL_GPL(request_any_context_irq);
  
 +/**
 + *   handle_wakeirq_thread - call device runtime pm calls on wake-up 
 interrupt
 + *   @wakeirq: device specific wake-up interrupt
 + *   @dev_id: struct device entry
 + */
 +static irqreturn_t handle_wakeirq_thread(int wakeirq, void *dev_id)
 +{
 + struct device *dev = dev_id;
 + irqreturn_t ret = IRQ_NONE;
 +
 + if (pm_runtime_suspended(dev)) {
 + pm_runtime_mark_last_busy(dev);
 + pm_request_resume(dev);
 + ret = IRQ_HANDLED;
 + }
 +
 + return ret;
 +}
 +
 +/**
 + *   setup_wakeirq - allocate a wake-up interrupt for a device
 + *   @dev: device to wake up
 + *   @wakeirq: interrupt that wakes up the device
 + *   @wakeflags: flags to pass to the interrupt handler
 + *   @devm: use devm
 + *
 + *   Note that the wake-up interrupt starts disabled. The wake-up interrupt
 + *   is typically enabled from the device pm_runtime_suspend() and disabled
 + *   again in the device pm_runtime_resume(). For runtime PM, the wake-up
 + *   interrupt should be always enabled, and for device 

Re: N900 modem support in 3.18-rc1

2014-11-06 Thread Pavel Machek
Hi!

  I actually had pm=0 on the command line, but I removed it now, and no
  change: [...]
  
  Let me try with explicit =1. .. aha, that helps. Thanks!
 
 mh seems I actually missed to make 1 the default value. I will
 prepare a patch for that.
 
 I assume, that the example ofono commands work for you now?

Yes. I was able to get list of networks. It stops working after a
while, for unknown reasons.

BTW... I'm using Debian-7.7 and did

XKBMODEL=nokiarx51
XKBLAYOUT=us

(from https://wiki.debian.org/MaemoAndSqueeze). Keyboard works well
-- except p key. arrow-P (0) works ok. Do you see that, too?

  Do you have an example client that can talk to ofonod?
 
 I have not yet played with userland stuff. You could try
 telepathy-ring, which integrates the ofono into the telepathy
 framework.

Thanks for the pointer.

  What is needed to get voice calls to work?
 
 There's still a kernel driver missing in mainline for exchanging
 voice data between the modem and the cpu (called cmt-speech).
 
 BTW the CMT driver should be removed from your kernel tree; its a
 deprecated variant of mainline's nokia-modem driver. Thus I guess
 the cmt-speech driver, which is available in your kernel tree, is
 not properly integrated into the changes I did during mainlining
 the other modem related drivers.

Aha, so CONFIG_CMT is the same thing as CONFIG_NOKIA_NODEM? Ok, will
disable that. Speech... if you'd have version I could test, I'll
happily do that.

Thanks,
Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: N900 modem support in 3.18-rc1

2014-11-06 Thread Pali Rohár
On Thursday 06 November 2014 23:50:05 Pavel Machek wrote:
   What is needed to get voice calls to work?
  
  There's still a kernel driver missing in mainline for
  exchanging voice data between the modem and the cpu (called
  cmt-speech).
  
  BTW the CMT driver should be removed from your kernel tree;
  its a deprecated variant of mainline's nokia-modem driver.
  Thus I guess the cmt-speech driver, which is available in
  your kernel tree, is not properly integrated into the
  changes I did during mainlining the other modem related
  drivers.
 
 Aha, so CONFIG_CMT is the same thing as CONFIG_NOKIA_NODEM?
 Ok, will disable that. Speech... if you'd have version I
 could test, I'll happily do that.
 
 Thanks,
   Pavel

For voice calls you need:
* kernel driver cmt-speech (or it has some new name)
* cmt-speech userspace library (communication with kernel)
* pulseaudio modules which are using that library

Freemangordon (Ivaylo Dimitrov, CCed) should know more about it, 
specially about pulseaudio modules...

-- 
Pali Rohár
pali.ro...@gmail.com


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


Re: [PATCH 0/3] ARM: dts: AM43x: Fix DCDC3 regulator voltage

2014-11-06 Thread Keerthy

On Thursday 06 November 2014 11:55 PM, Tony Lindgren wrote:

* Keerthy j-keer...@ti.com [141106 02:55]:

Fix DCDC3 volatge to 1.5V which is the right value to be supplied by
DCDC3 for all the boards.

Hmm so what about the comments for similar beaglebone changes
in thread [PATCH] ARM: dts: am335x-boneblack: set dcdc1 regulator
for 1.35v ddr3?

Hi Tony,

am335x uses TPS65917 PMIC and am43x* use TPS65218 PMIC.
The latest TPS65218 defaults to 1.5V. We see boot hangs when
there is a voltage change from 1.5V to 1.35V in case of AM43x
boards. Hence keeping it at 1.5V.

Regards,
Keerthy


Regards,

Tony
  

Keerthy (3):
   ARM: dts: AM43x-EPOS-EVM: Fix DCDC3 voltage
   ARM: dts: AM437x-GP-EVM: Fix DCDC3 voltage
   ARM: dts: AM437x-SK-EVM: Fix DCDC3 voltage

  arch/arm/boot/dts/am437x-gp-evm.dts  |4 ++--
  arch/arm/boot/dts/am437x-sk-evm.dts  |4 ++--
  arch/arm/boot/dts/am43x-epos-evm.dts |4 ++--
  3 files changed, 6 insertions(+), 6 deletions(-)

--
1.7.9.5



--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv4 4/7] hwspinlock/core: add common OF helpers

2014-11-06 Thread Ohad Ben-Cohen
Hi Suman,

On Thu, Nov 6, 2014 at 8:24 PM, Suman Anna s-a...@ti.com wrote:
 Ping on this. Can you review the latest series v6 [1] and pick it up for
 3.19? The MSM spinlock driver is also blocked/dependent on that series.

Sure, it's on my mind, I hope I'll get to it next week.

Thanks,
Ohad.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/3] ARM: dts: AM43x: Fix DCDC3 regulator voltage

2014-11-06 Thread Keerthy

On Friday 07 November 2014 10:56 AM, Keerthy wrote:

On Friday 07 November 2014 12:59 AM, Robert Nelson wrote:

On Thu, Nov 6, 2014 at 12:25 PM, Tony Lindgren t...@atomide.com wrote:

* Keerthy j-keer...@ti.com [141106 02:55]:

Fix DCDC3 volatge to 1.5V which is the right value to be supplied by
DCDC3 for all the boards.

Hmm so what about the comments for similar beaglebone changes
in thread [PATCH] ARM: dts: am335x-boneblack: set dcdc1 regulator
for 1.35v ddr3?

Based on Keerthy's patchset, i think we should just ignore my 1.35v
ddr3 patch for the beaglebone black. As by default it will be at
1.50v. (so we can either define it for clarity at 1.50v or just ignore
it.)

Keerthy,

Are you guys seeing these same ddr lockups if u-boot correctly set's
the 1.35v level first? Or should we just really leave it at the
default power on voltage level? (till either u-boot or kernel grows
the capabilities to correctly tell the ddr3 we are changing it's
voltage.)


Robert,

In our case even u-boot lets it to be at 1.5V. The problem is
when the regulators are registered we try to set it 1.35V since
that is what we are passing from device tree. I see lock up
on the latest boards we have.


The issue is seen when we are executing from DDR and the voltage is changed
(in our case lowered) on the fly.



Regards,
Keerthy




Regards,





--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/3] ARM: dts: AM43x: Fix DCDC3 regulator voltage

2014-11-06 Thread Keerthy

On Friday 07 November 2014 12:59 AM, Robert Nelson wrote:

On Thu, Nov 6, 2014 at 12:25 PM, Tony Lindgren t...@atomide.com wrote:

* Keerthy j-keer...@ti.com [141106 02:55]:

Fix DCDC3 volatge to 1.5V which is the right value to be supplied by
DCDC3 for all the boards.

Hmm so what about the comments for similar beaglebone changes
in thread [PATCH] ARM: dts: am335x-boneblack: set dcdc1 regulator
for 1.35v ddr3?

Based on Keerthy's patchset, i think we should just ignore my 1.35v
ddr3 patch for the beaglebone black. As by default it will be at
1.50v. (so we can either define it for clarity at 1.50v or just ignore
it.)

Keerthy,

Are you guys seeing these same ddr lockups if u-boot correctly set's
the 1.35v level first? Or should we just really leave it at the
default power on voltage level? (till either u-boot or kernel grows
the capabilities to correctly tell the ddr3 we are changing it's
voltage.)


Robert,

In our case even u-boot lets it to be at 1.5V. The problem is
when the regulators are registered we try to set it 1.35V since
that is what we are passing from device tree. I see lock up
on the latest boards we have.

Regards,
Keerthy




Regards,



--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] input: touchscreen: ti_am335x_tsc Interchange touchscreen and ADC steps

2014-11-06 Thread Vignesh R


On Thursday 06 November 2014 07:49 PM, Richard Cochran wrote:
 On Mon, Oct 27, 2014 at 04:38:28PM +0530, Vignesh R wrote:
 
 ...
 
 @@ -209,6 +214,7 @@ static void titsc_read_coordinates(struct titsc *ts_dev,
  unsigned int read, diff;
  unsigned int i, channel;
  unsigned int creads = ts_dev-coordinate_readouts;
 +unsigned int first_step = TOTAL_STEPS - (creads * 2 + 2);
  
  *z1 = *z2 = 0;
  if (fifocount % (creads * 2 + 2))
 @@ -226,7 +232,7 @@ static void titsc_read_coordinates(struct titsc *ts_dev,
  
  channel = (read  0xf)  16;
  read = 0xfff;
 -if (channel  creads) {
 +if (channel  first_step + creads + 2) {
  diff = abs(read - prev_val_x);
  if (diff  prev_diff_x) {
  prev_diff_x = diff;
 @@ -234,19 +240,19 @@ static void titsc_read_coordinates(struct titsc 
 *ts_dev,
  }
  prev_val_x = read;
  
 -} else if (channel  creads * 2) {
 +} else if (channel == first_step + creads + 1) {
 +*z1 = read;
 +
 +} else if (channel == first_step + creads + 2) {
 +*z2 = read;
 +
 +} else if (channel  first_step) {
  diff = abs(read - prev_val_y);
  if (diff  prev_diff_y) {
  prev_diff_y = diff;
  *y = read;
 
 While you are at it, please get rid of the this delta filter
 nonsense.

Currently, there is too much noise in the TSC hardware that is being
removed by delta filtering. I tested TSC unit by removing filtering
logic, the performance was not at all satisfactory. The cursor jumps
wayward and smooth circles cannot be drawn. Looks like delta filtering
cannot be removed as of now. May be I will try and address it in future.

Regards
Vignesh

 
 Thanks,
 Richard
 
  }
  prev_val_y = read;
 -
 -} else if (channel  creads * 2 + 1) {
 -*z1 = read;
 -
 -} else if (channel  creads * 2 + 2) {
 -*z2 = read;
  }
  }
  }
 -- 
 1.9.1


 ___
 linux-arm-kernel mailing list
 linux-arm-ker...@lists.infradead.org
 http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/4] input: touchscreen: ti_am335x_tsc: Remove udelay in interrupt handler

2014-11-06 Thread Vignesh R


On Monday 03 November 2014 08:35 PM, Lee Jones wrote:
 On Mon, 27 Oct 2014, Vignesh R wrote:
 From: Brad Griffis bgrif...@ti.com

 TSC interrupt handler had udelay to avoid reporting of false pen-up
 interrupt to user space. This patch implements workaround suggesting in
 Advisory 1.0.31 of silicon errata for am335x, thus eliminating udelay
 and touchscreen lag. This also improves performance of touchscreen and
 eliminates sudden jump of cursor at touch release.

 IDLECONFIG and CHARGECONFIG registers are to be configured
 with same values in order to eliminate false pen-up events. This
 workaround may result in false pen-down to be detected, hence considerable
 charge step delay needs to be added. The charge delay is set to 0xB000
 (in terms of ADC clock cycles) by default.

 TSC steps are disabled at the end of every sampling cycle and EOS bit is
 set. Once the EOS bit is set, the TSC steps need to be re-enabled to begin
 next sampling cycle.

 In one shot mode, sequencer automatically disables all enabled steps at
 the end of each cycle. (both ADC steps and TSC steps) Hence these steps
 need not be saved in reg_se_cache for clearing these steps at a later
 stage.

 Signed-off-by: Brad Griffis bgrif...@ti.com
 [vigne...@ti.com: Ported patch from v3.12 to v3.18rc2]
 Signed-off-by: Vignesh R vigne...@ti.com
 ---
  drivers/input/touchscreen/ti_am335x_tsc.c | 56 
 ---
  drivers/mfd/ti_am335x_tscadc.c|  7 ++--
  include/linux/mfd/ti_am335x_tscadc.h  |  4 ++-
  3 files changed, 30 insertions(+), 37 deletions(-)
 
 [...]
 
 diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
 index d877e777cce6..94ef8992f46b 100644
 --- a/drivers/mfd/ti_am335x_tscadc.c
 +++ b/drivers/mfd/ti_am335x_tscadc.c
 @@ -86,8 +86,12 @@ static void am335x_tscadc_need_adc(struct ti_tscadc_dev 
 *tsadc)
  spin_lock_irq(tsadc-reg_lock);
  finish_wait(tsadc-reg_se_wait, wait);
  
 +/*
 + * Sequencer should either be idle or
 + * busy applying the charge step.
 + */
  reg = tscadc_readl(tsadc, REG_ADCFSM);
 -WARN_ON(reg  SEQ_STATUS);
 +WARN_ON(reg  SEQ_STATUS  (!CHARGE_STEP));
  tsadc-adc_waiting = false;
  }
  tsadc-adc_in_use = true;
 @@ -96,7 +100,6 @@ static void am335x_tscadc_need_adc(struct ti_tscadc_dev 
 *tsadc)
  void am335x_tsc_se_set_once(struct ti_tscadc_dev *tsadc, u32 val)
  {
  spin_lock_irq(tsadc-reg_lock);
 -tsadc-reg_se_cache |= val;
  am335x_tscadc_need_adc(tsadc);
  
  tscadc_writel(tsadc, REG_SE, val);
 
 I believe all of these changes can, and therefor should live in a
 separate patch.

I will split this patch accordingly.

 
 diff --git a/include/linux/mfd/ti_am335x_tscadc.h 
 b/include/linux/mfd/ti_am335x_tscadc.h
 index e2e70053470e..fcce182e4a35 100644
 --- a/include/linux/mfd/ti_am335x_tscadc.h
 +++ b/include/linux/mfd/ti_am335x_tscadc.h
 @@ -52,6 +52,7 @@
  
  /* IRQ enable */
  #define IRQENB_HW_PEN   BIT(0)
 +#define IRQENB_EOS  BIT(1)
  #define IRQENB_FIFO0THRES   BIT(2)
  #define IRQENB_FIFO0OVRRUN  BIT(3)
  #define IRQENB_FIFO0UNDRFLW BIT(4)
 @@ -107,7 +108,7 @@
  /* Charge delay */
  #define CHARGEDLY_OPEN_MASK (0x3  0)
  #define CHARGEDLY_OPEN(val) ((val)  0)
 -#define CHARGEDLY_OPENDLY   CHARGEDLY_OPEN(1)
 +#define CHARGEDLY_OPENDLY   CHARGEDLY_OPEN(0xB000)
  
  /* Control register */
  #define CNTRLREG_TSCSSENB   BIT(0)
 @@ -127,6 +128,7 @@
  
  /* Sequencer Status */
  #define SEQ_STATUS BIT(5)
 +#define CHARGE_STEP 0x11
  
  #define ADC_CLK 300
  #define TOTAL_STEPS 16
 
 The header changes should be split between the two Input and MFD
 patches.
 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/5] input: touchscreen: ti_am335x_tsc Interchange touchscreen and ADC steps

2014-11-06 Thread Vignesh R
From: Brad Griffis bgrif...@ti.com

This patch makes the initial changes required to workaround TSC-false
pen-up interrupts. It is required to implement these changes in order to
remove udelay in the TSC interrupt handler and false pen-up events.
The charge step is to be executed immediately after sampling X+. Hence
TSC is made to use higher numbered steps (steps 5 to 16 for 5 co-ordinate
readouts, 4 wire TSC configuration) and ADC to use lower ones. Further
X co-ordinate readouts must be the last to be sampled, thus co-ordinates
are sampled in the order Y-Z-X.

Signed-off-by: Brad Griffis bgrif...@ti.com
[vigne...@ti.com: Ported the patch from v3.12 to v3.18rc2]

Signed-off-by: Vignesh R vigne...@ti.com
---
 drivers/iio/adc/ti_am335x_adc.c   |  5 ++--
 drivers/input/touchscreen/ti_am335x_tsc.c | 42 ++-
 2 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
index b730864731e8..adba23246474 100644
--- a/drivers/iio/adc/ti_am335x_adc.c
+++ b/drivers/iio/adc/ti_am335x_adc.c
@@ -86,19 +86,18 @@ static void tiadc_step_config(struct iio_dev *indio_dev)
 {
struct tiadc_device *adc_dev = iio_priv(indio_dev);
unsigned int stepconfig;
-   int i, steps;
+   int i, steps = 0;
 
/*
 * There are 16 configurable steps and 8 analog input
 * lines available which are shared between Touchscreen and ADC.
 *
-* Steps backwards i.e. from 16 towards 0 are used by ADC
+* Steps forwards i.e. from 0 towards 16 are used by ADC
 * depending on number of input lines needed.
 * Channel would represent which analog input
 * needs to be given to ADC to digitalize data.
 */
 
-   steps = TOTAL_STEPS - adc_dev-channels;
if (iio_buffer_enabled(indio_dev))
stepconfig = STEPCONFIG_AVG_16 | STEPCONFIG_FIFO1
| STEPCONFIG_MODE_SWCNT;
diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c 
b/drivers/input/touchscreen/ti_am335x_tsc.c
index 2ce649520fe0..1aeac9675fe7 100644
--- a/drivers/input/touchscreen/ti_am335x_tsc.c
+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
@@ -121,7 +121,7 @@ static void titsc_step_config(struct titsc *ts_dev)
 {
unsigned intconfig;
int i;
-   int end_step;
+   int end_step, first_step, tsc_steps;
u32 stepenable;
 
config = STEPCONFIG_MODE_HWSYNC |
@@ -140,9 +140,11 @@ static void titsc_step_config(struct titsc *ts_dev)
break;
}
 
-   /* 1 … coordinate_readouts is for X */
-   end_step = ts_dev-coordinate_readouts;
-   for (i = 0; i  end_step; i++) {
+   tsc_steps = ts_dev-coordinate_readouts * 2 + 2;
+   first_step = TOTAL_STEPS - tsc_steps;
+   /* Steps 16 to 16-coordinate_readouts is for X */
+   end_step = first_step + tsc_steps;
+   for (i = end_step - ts_dev-coordinate_readouts; i  end_step; i++) {
titsc_writel(ts_dev, REG_STEPCONFIG(i), config);
titsc_writel(ts_dev, REG_STEPDELAY(i), STEPCONFIG_OPENDLY);
}
@@ -164,9 +166,9 @@ static void titsc_step_config(struct titsc *ts_dev)
break;
}
 
-   /* coordinate_readouts … coordinate_readouts * 2 is for Y */
-   end_step = ts_dev-coordinate_readouts * 2;
-   for (i = ts_dev-coordinate_readouts; i  end_step; i++) {
+   /* 1 ... coordinate_readouts is for Y */
+   end_step = first_step + ts_dev-coordinate_readouts;
+   for (i = first_step; i  end_step; i++) {
titsc_writel(ts_dev, REG_STEPCONFIG(i), config);
titsc_writel(ts_dev, REG_STEPDELAY(i), STEPCONFIG_OPENDLY);
}
@@ -179,7 +181,7 @@ static void titsc_step_config(struct titsc *ts_dev)
titsc_writel(ts_dev, REG_CHARGECONFIG, config);
titsc_writel(ts_dev, REG_CHARGEDELAY, CHARGEDLY_OPENDLY);
 
-   /* coordinate_readouts * 2 … coordinate_readouts * 2 + 2 is for Z */
+   /* coordinate_readouts + 1 ... coordinate_readouts + 2 is for Z */
config = STEPCONFIG_MODE_HWSYNC |
STEPCONFIG_AVG_16 | ts_dev-bit_yp |
ts_dev-bit_xn | STEPCONFIG_INM_ADCREFM |
@@ -194,8 +196,11 @@ static void titsc_step_config(struct titsc *ts_dev)
titsc_writel(ts_dev, REG_STEPDELAY(end_step),
STEPCONFIG_OPENDLY);
 
-   /* The steps1 … end and bit 0 for TS_Charge */
-   stepenable = (1  (end_step + 2)) - 1;
+   /* The steps end ... end - readouts * 2 + 2 and bit 0 for TS_Charge */
+   stepenable = 1;
+   for (i = 0; i  tsc_steps; i++)
+   stepenable |= 1  (first_step + i + 1);
+
ts_dev-step_mask = stepenable;
am335x_tsc_se_set_cache(ts_dev-mfd_tscadc, ts_dev-step_mask);
 }
@@ -209,6 +214,7 @@ static void titsc_read_coordinates(struct titsc *ts_dev,
unsigned int read, diff;

Re: [PATCH 3/4] arm: boot: dts: am335x-evm: Make charge delay a DT parameter for tsc

2014-11-06 Thread Vignesh R


On Saturday 01 November 2014 02:39 AM, Hartmut Knaack wrote:
 Vignesh R schrieb am 27.10.2014 12:08:
 The charge delay value is by default 0xB000. But it can be set to lower
 values on some boards as long as false pen-ups are avoided. Lowering the
 value increases the sampling rate (though current sampling rate is
 sufficient for tsc operation). Hence charge delay has been made a DT
 parameter.

 I would recommend to use a few colons to separate some thoughts. Also, limit 
 to 80 chars per line would be beneficial. See inline.

I will address this in v2

 Signed-off-by: Vignesh R vigne...@ti.com
 ---
  .../devicetree/bindings/input/touchscreen/ti-tsc-adc.txt| 13 
 +
  arch/arm/boot/dts/am335x-evm.dts|  1 +
  2 files changed, 14 insertions(+)

 diff --git 
 a/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt 
 b/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
 index 878549ba814d..ac62769e70e4 100644
 --- a/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
 +++ b/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
 @@ -28,6 +28,18 @@ Required properties:
  ti,adc-channels: List of analog inputs available for ADC.
   AIN0 = 0, AIN1 = 1 and so on till AIN7 = 7.
  
 +Optional properties:
 +- child tsc
 +ti,charge-delay: Length of touch screen charge delay step in terms of
 + ADC clock cycles. Charge delay value should be large 
 in order
 + to avoid false pen-up events. This value affects the 
 overall
 + sampling speed hence need to be kept as low as 
 possible while
 ... speed, hence needs to be ...
 + avoiding false pen-up event. Start from a lower value 
 say 0x400
 ... pen-up events. Start from a lower value, like 0x400, and increase ...
 + and increase value until false pen-up events are 
 avoided. The
 + pen-up detection happens immediately after the charge 
 step
 ... charge step, so this ...
 + so this does in fact function as a hardware knob for 
 adjusting
 + the amount of settling time.
 +
  Example:
  tscadc: tscadc@44e0d000 {
  compatible = ti,am3359-tscadc;
 @@ -36,6 +48,7 @@ Example:
  ti,x-plate-resistance = 200;
  ti,coordiante-readouts = 5;
  ti,wire-config = 0x00 0x11 0x22 0x33;
 +ti,charge-delay = 0xB000;
  };
  
  adc {
 diff --git a/arch/arm/boot/dts/am335x-evm.dts 
 b/arch/arm/boot/dts/am335x-evm.dts
 index e2156a583de7..80be0462298b 100644
 --- a/arch/arm/boot/dts/am335x-evm.dts
 +++ b/arch/arm/boot/dts/am335x-evm.dts
 @@ -641,6 +641,7 @@
  ti,x-plate-resistance = 200;
  ti,coordinate-readouts = 5;
  ti,wire-config = 0x00 0x11 0x22 0x33;
 +ti,charge-delay = 0xB000;
  };
  
  adc {

 
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/4] input: touchscreen: ti_am335x_tsc Interchange touchscreen and ADC steps

2014-11-06 Thread Vignesh R


On Saturday 01 November 2014 02:33 AM, Hartmut Knaack wrote:
 Vignesh R schrieb am 27.10.2014 12:08:
 From: Brad Griffis bgrif...@ti.com

 This patch makes the initial changes required to workaround TSC-false
 pen-up interrupts. It is required to implement these changes in order to
 remove udelay in the TSC interrupt handler and false pen-up events.
 The charge step is to be executed immediately after sampling X+. Hence
 TSC is made to use higher numbered steps (steps 5 to 16 for 5 co-ordinate
 readouts, 4 wire TSC configuration) and ADC to use lower ones. Further
 X co-ordinate readouts must be the last to be sampled, thus co-ordinates
 are sampled in the order Y-Z-X.

 Signed-off-by: Brad Griffis bgrif...@ti.com
 [vigne...@ti.com: Ported the patch from v3.12 to v3.18rc2]
 Signed-off-by: Vignesh R vigne...@ti.com
 ---
  drivers/iio/adc/ti_am335x_adc.c   |  2 +-
  drivers/input/touchscreen/ti_am335x_tsc.c | 42 
 ++-
  2 files changed, 25 insertions(+), 19 deletions(-)

 diff --git a/drivers/iio/adc/ti_am335x_adc.c 
 b/drivers/iio/adc/ti_am335x_adc.c
 index b730864731e8..3f530ed6bd80 100644
 --- a/drivers/iio/adc/ti_am335x_adc.c
 +++ b/drivers/iio/adc/ti_am335x_adc.c
 @@ -98,7 +98,7 @@ static void tiadc_step_config(struct iio_dev *indio_dev)
   * needs to be given to ADC to digitalize data.
   */
  
 -steps = TOTAL_STEPS - adc_dev-channels;
 +steps = 0;
 You could even initialize it with zero during variable definition. And I 
 think the above comment could need an update now.

Ok, Will update the comment and initialization

  if (iio_buffer_enabled(indio_dev))
  stepconfig = STEPCONFIG_AVG_16 | STEPCONFIG_FIFO1
  | STEPCONFIG_MODE_SWCNT;
 diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c 
 b/drivers/input/touchscreen/ti_am335x_tsc.c
 index 2ce649520fe0..1aeac9675fe7 100644
 --- a/drivers/input/touchscreen/ti_am335x_tsc.c
 +++ b/drivers/input/touchscreen/ti_am335x_tsc.c
 @@ -121,7 +121,7 @@ static void titsc_step_config(struct titsc *ts_dev)
  {
  unsigned intconfig;
  int i;
 -int end_step;
 +int end_step, first_step, tsc_steps;
  u32 stepenable;
  
  config = STEPCONFIG_MODE_HWSYNC |
 @@ -140,9 +140,11 @@ static void titsc_step_config(struct titsc *ts_dev)
  break;
  }
  
 -/* 1 … coordinate_readouts is for X */
 -end_step = ts_dev-coordinate_readouts;
 -for (i = 0; i  end_step; i++) {
 +tsc_steps = ts_dev-coordinate_readouts * 2 + 2;
 +first_step = TOTAL_STEPS - tsc_steps;
 +/* Steps 16 to 16-coordinate_readouts is for X */
 +end_step = first_step + tsc_steps;
 +for (i = end_step - ts_dev-coordinate_readouts; i  end_step; i++) {
  titsc_writel(ts_dev, REG_STEPCONFIG(i), config);
  titsc_writel(ts_dev, REG_STEPDELAY(i), STEPCONFIG_OPENDLY);
  }
 @@ -164,9 +166,9 @@ static void titsc_step_config(struct titsc *ts_dev)
  break;
  }
  
 -/* coordinate_readouts … coordinate_readouts * 2 is for Y */
 -end_step = ts_dev-coordinate_readouts * 2;
 -for (i = ts_dev-coordinate_readouts; i  end_step; i++) {
 +/* 1 ... coordinate_readouts is for Y */
 +end_step = first_step + ts_dev-coordinate_readouts;
 +for (i = first_step; i  end_step; i++) {
  titsc_writel(ts_dev, REG_STEPCONFIG(i), config);
  titsc_writel(ts_dev, REG_STEPDELAY(i), STEPCONFIG_OPENDLY);
  }
 @@ -179,7 +181,7 @@ static void titsc_step_config(struct titsc *ts_dev)
  titsc_writel(ts_dev, REG_CHARGECONFIG, config);
  titsc_writel(ts_dev, REG_CHARGEDELAY, CHARGEDLY_OPENDLY);
  
 -/* coordinate_readouts * 2 … coordinate_readouts * 2 + 2 is for Z */
 +/* coordinate_readouts + 1 ... coordinate_readouts + 2 is for Z */
  config = STEPCONFIG_MODE_HWSYNC |
  STEPCONFIG_AVG_16 | ts_dev-bit_yp |
  ts_dev-bit_xn | STEPCONFIG_INM_ADCREFM |
 @@ -194,8 +196,11 @@ static void titsc_step_config(struct titsc *ts_dev)
  titsc_writel(ts_dev, REG_STEPDELAY(end_step),
  STEPCONFIG_OPENDLY);
  
 -/* The steps1 … end and bit 0 for TS_Charge */
 -stepenable = (1  (end_step + 2)) - 1;
 +/* The steps end ... end - readouts * 2 + 2 and bit 0 for TS_Charge */
 +stepenable = 1;
 +for (i = 0; i  tsc_steps; i++)
 +stepenable |= 1  (first_step + i + 1);
 +
  ts_dev-step_mask = stepenable;
  am335x_tsc_se_set_cache(ts_dev-mfd_tscadc, ts_dev-step_mask);
  }
 @@ -209,6 +214,7 @@ static void titsc_read_coordinates(struct titsc *ts_dev,
  unsigned int read, diff;
  unsigned int i, channel;
  unsigned int creads = ts_dev-coordinate_readouts;
 +unsigned int first_step = TOTAL_STEPS - (creads * 2 + 2);
  
  *z1 = *z2 = 0;
  if (fifocount % (creads * 2 + 2))
 @@ -226,7 +232,7 @@ static void titsc_read_coordinates(struct titsc *ts_dev,
  
  channel = (read  

[PATCH 5/5] input: touchscreen: ti_am335x_tsc: Use charge delay DT parameter

2014-11-06 Thread Vignesh R
This patch reads charge delay from tsc DT node and writes to
REG_CHARGEDELAY register. If the charge delay is not specified in DT
then default value of 0xB000(CHARGEDLY_OPENDLY) is used.

Signed-off-by: Vignesh R vigne...@ti.com
---
 drivers/input/touchscreen/ti_am335x_tsc.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c 
b/drivers/input/touchscreen/ti_am335x_tsc.c
index 483fd97c0e0c..20ce76b1b6e7 100644
--- a/drivers/input/touchscreen/ti_am335x_tsc.c
+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
@@ -52,6 +52,7 @@ struct titsc {
u32 bit_xp, bit_xn, bit_yp, bit_yn;
u32 inp_xp, inp_xn, inp_yp, inp_yn;
u32 step_mask;
+   u32 charge_delay;
 };
 
 static unsigned int titsc_readl(struct titsc *ts, unsigned int reg)
@@ -177,7 +178,7 @@ static void titsc_step_config(struct titsc *ts_dev)
 
config = titsc_readl(ts_dev, REG_IDLECONFIG);
titsc_writel(ts_dev, REG_CHARGECONFIG, config);
-   titsc_writel(ts_dev, REG_CHARGEDELAY, CHARGEDLY_OPENDLY);
+   titsc_writel(ts_dev, REG_CHARGEDELAY, ts_dev-charge_delay);
 
/* coordinate_readouts + 1 ... coordinate_readouts + 2 is for Z */
config = STEPCONFIG_MODE_HWSYNC |
@@ -361,6 +362,11 @@ static int titsc_parse_dt(struct platform_device *pdev,
if (err  0)
return err;
 
+   err = of_property_read_u32(node, ti,charge-delay,
+  ts_dev-charge_delay);
+   if (err  0)
+   ts_dev-charge_delay = CHARGEDLY_OPENDLY;
+
return of_property_read_u32_array(node, ti,wire-config,
ts_dev-config_inp, ARRAY_SIZE(ts_dev-config_inp));
 }
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/5] mfd: ti_am335x_tscadc: Remove unwanted reg_se_cache save

2014-11-06 Thread Vignesh R
In one shot mode, sequencer automatically disables all enabled steps at
the end of each cycle. (both ADC steps and TSC steps) Hence these steps
need not be saved in reg_se_cache for clearing these steps at a later
stage.
Also, when ADC wakes up Sequencer should not be busy executing any of the
config steps except for the charge step. Previously charge step was 1 ADC
clock cycle and hence it was ignored.

Signed-off-by: Vignesh R vigne...@ti.com
---
 drivers/mfd/ti_am335x_tscadc.c   | 7 +--
 include/linux/mfd/ti_am335x_tscadc.h | 1 +
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
index d877e777cce6..94ef8992f46b 100644
--- a/drivers/mfd/ti_am335x_tscadc.c
+++ b/drivers/mfd/ti_am335x_tscadc.c
@@ -86,8 +86,12 @@ static void am335x_tscadc_need_adc(struct ti_tscadc_dev 
*tsadc)
spin_lock_irq(tsadc-reg_lock);
finish_wait(tsadc-reg_se_wait, wait);
 
+   /*
+* Sequencer should either be idle or
+* busy applying the charge step.
+*/
reg = tscadc_readl(tsadc, REG_ADCFSM);
-   WARN_ON(reg  SEQ_STATUS);
+   WARN_ON(reg  SEQ_STATUS  (!CHARGE_STEP));
tsadc-adc_waiting = false;
}
tsadc-adc_in_use = true;
@@ -96,7 +100,6 @@ static void am335x_tscadc_need_adc(struct ti_tscadc_dev 
*tsadc)
 void am335x_tsc_se_set_once(struct ti_tscadc_dev *tsadc, u32 val)
 {
spin_lock_irq(tsadc-reg_lock);
-   tsadc-reg_se_cache |= val;
am335x_tscadc_need_adc(tsadc);
 
tscadc_writel(tsadc, REG_SE, val);
diff --git a/include/linux/mfd/ti_am335x_tscadc.h 
b/include/linux/mfd/ti_am335x_tscadc.h
index c99be5dc0f5c..fcce182e4a35 100644
--- a/include/linux/mfd/ti_am335x_tscadc.h
+++ b/include/linux/mfd/ti_am335x_tscadc.h
@@ -128,6 +128,7 @@
 
 /* Sequencer Status */
 #define SEQ_STATUS BIT(5)
+#define CHARGE_STEP0x11
 
 #define ADC_CLK300
 #define TOTAL_STEPS16
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/5] ARM: dts: AM335x: Make charge delay a DT parameter for tsc

2014-11-06 Thread Vignesh R
The charge delay value is by default 0xB000. But it can be set to lower
values on some boards as long as false pen-ups are avoided. Lowering the
value increases the sampling rate (though current sampling rate is
sufficient for tsc operation). Hence charge delay has been made a DT
parameter.

Signed-off-by: Vignesh R vigne...@ti.com
---
 .../devicetree/bindings/input/touchscreen/ti-tsc-adc.txt  | 15 +++
 arch/arm/boot/dts/am335x-evm.dts  |  1 +
 2 files changed, 16 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt 
b/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
index 878549ba814d..b87574bae009 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/ti-tsc-adc.txt
@@ -28,6 +28,20 @@ Required properties:
ti,adc-channels: List of analog inputs available for ADC.
 AIN0 = 0, AIN1 = 1 and so on till AIN7 = 7.
 
+Optional properties:
+- child tsc
+   ti,charge-delay: Length of touch screen charge delay step in terms of
+ADC clock cycles. Charge delay value should be large
+in order to avoid false pen-up events. This value
+affects the overall sampling speed, hence need to be
+kept as low as possible, while avoiding false pen-up
+event. Start from a lower value, say 0x400, and
+increase value until false pen-up events are avoided.
+The pen-up detection happens immediately after the
+charge step, so this does in fact function as a
+hardware knob for adjusting the amount of settling
+time.
+
 Example:
tscadc: tscadc@44e0d000 {
compatible = ti,am3359-tscadc;
@@ -36,6 +50,7 @@ Example:
ti,x-plate-resistance = 200;
ti,coordiante-readouts = 5;
ti,wire-config = 0x00 0x11 0x22 0x33;
+   ti,charge-delay = 0xB000;
};
 
adc {
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index e2156a583de7..80be0462298b 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -641,6 +641,7 @@
ti,x-plate-resistance = 200;
ti,coordinate-readouts = 5;
ti,wire-config = 0x00 0x11 0x22 0x33;
+   ti,charge-delay = 0xB000;
};
 
adc {
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/5] input: touchscreen: ti_am335x_tsc: Remove udelay in interrupt handler

2014-11-06 Thread Vignesh R
From: Brad Griffis bgrif...@ti.com

TSC interrupt handler had udelay to avoid reporting of false pen-up
interrupt to user space. This patch implements workaround suggesting in
Advisory 1.0.31 of silicon errata for am335x, thus eliminating udelay
and touchscreen lag. This also improves performance of touchscreen and
eliminates sudden jump of cursor at touch release.

IDLECONFIG and CHARGECONFIG registers are to be configured
with same values in order to eliminate false pen-up events. This
workaround may result in false pen-down to be detected, hence considerable
charge step delay needs to be added. The charge delay is set to 0xB000
(in terms of ADC clock cycles) by default.

TSC steps are disabled at the end of every sampling cycle and EOS bit is
set. Once the EOS bit is set, the TSC steps need to be re-enabled to begin
next sampling cycle.

Signed-off-by: Brad Griffis bgrif...@ti.com
[vigne...@ti.com: Ported the patch from v3.12 to v3.18rc2]

Signed-off-by: Vignesh R vigne...@ti.com
---
 drivers/input/touchscreen/ti_am335x_tsc.c | 56 ---
 include/linux/mfd/ti_am335x_tscadc.h  |  3 +-
 2 files changed, 24 insertions(+), 35 deletions(-)

diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c 
b/drivers/input/touchscreen/ti_am335x_tsc.c
index 1aeac9675fe7..483fd97c0e0c 100644
--- a/drivers/input/touchscreen/ti_am335x_tsc.c
+++ b/drivers/input/touchscreen/ti_am335x_tsc.c
@@ -173,11 +173,9 @@ static void titsc_step_config(struct titsc *ts_dev)
titsc_writel(ts_dev, REG_STEPDELAY(i), STEPCONFIG_OPENDLY);
}
 
-   /* Charge step configuration */
-   config = ts_dev-bit_xp | ts_dev-bit_yn |
-   STEPCHARGE_RFP_XPUL | STEPCHARGE_RFM_XNUR |
-   STEPCHARGE_INM_AN1 | STEPCHARGE_INP(ts_dev-inp_yp);
+   /* Make CHARGECONFIG same as IDLECONFIG */
 
+   config = titsc_readl(ts_dev, REG_IDLECONFIG);
titsc_writel(ts_dev, REG_CHARGECONFIG, config);
titsc_writel(ts_dev, REG_CHARGEDELAY, CHARGEDLY_OPENDLY);
 
@@ -264,9 +262,26 @@ static irqreturn_t titsc_irq(int irq, void *dev)
unsigned int status, irqclr = 0;
unsigned int x = 0, y = 0;
unsigned int z1, z2, z;
-   unsigned int fsm;
 
-   status = titsc_readl(ts_dev, REG_IRQSTATUS);
+   status = titsc_readl(ts_dev, REG_RAWIRQSTATUS);
+   if (status  IRQENB_HW_PEN) {
+   ts_dev-pen_down = true;
+   titsc_writel(ts_dev, REG_IRQWAKEUP, 0x00);
+   titsc_writel(ts_dev, REG_IRQCLR, IRQENB_HW_PEN);
+   irqclr |= IRQENB_HW_PEN;
+   }
+
+   if (status  IRQENB_PENUP) {
+   ts_dev-pen_down = false;
+   input_report_key(input_dev, BTN_TOUCH, 0);
+   input_report_abs(input_dev, ABS_PRESSURE, 0);
+   input_sync(input_dev);
+   irqclr |= IRQENB_PENUP;
+   }
+
+   if (status  IRQENB_EOS)
+   irqclr |= IRQENB_EOS;
+
/*
 * ADC and touchscreen share the IRQ line.
 * FIFO1 interrupts are used by ADC. Handle FIFO0 IRQs here only
@@ -297,34 +312,6 @@ static irqreturn_t titsc_irq(int irq, void *dev)
}
irqclr |= IRQENB_FIFO0THRES;
}
-
-   /*
-* Time for sequencer to settle, to read
-* correct state of the sequencer.
-*/
-   udelay(SEQ_SETTLE);
-
-   status = titsc_readl(ts_dev, REG_RAWIRQSTATUS);
-   if (status  IRQENB_PENUP) {
-   /* Pen up event */
-   fsm = titsc_readl(ts_dev, REG_ADCFSM);
-   if (fsm == ADCFSM_STEPID) {
-   ts_dev-pen_down = false;
-   input_report_key(input_dev, BTN_TOUCH, 0);
-   input_report_abs(input_dev, ABS_PRESSURE, 0);
-   input_sync(input_dev);
-   } else {
-   ts_dev-pen_down = true;
-   }
-   irqclr |= IRQENB_PENUP;
-   }
-
-   if (status  IRQENB_HW_PEN) {
-
-   titsc_writel(ts_dev, REG_IRQWAKEUP, 0x00);
-   titsc_writel(ts_dev, REG_IRQCLR, IRQENB_HW_PEN);
-   }
-
if (irqclr) {
titsc_writel(ts_dev, REG_IRQSTATUS, irqclr);
am335x_tsc_se_set_cache(ts_dev-mfd_tscadc, ts_dev-step_mask);
@@ -417,6 +404,7 @@ static int titsc_probe(struct platform_device *pdev)
}
 
titsc_writel(ts_dev, REG_IRQENABLE, IRQENB_FIFO0THRES);
+   titsc_writel(ts_dev, REG_IRQENABLE, IRQENB_EOS);
err = titsc_config_wires(ts_dev);
if (err) {
dev_err(pdev-dev, wrong i/p wire configuration\n);
diff --git a/include/linux/mfd/ti_am335x_tscadc.h 
b/include/linux/mfd/ti_am335x_tscadc.h
index e2e70053470e..c99be5dc0f5c 100644
--- a/include/linux/mfd/ti_am335x_tscadc.h
+++ b/include/linux/mfd/ti_am335x_tscadc.h
@@ -52,6 +52,7 @@
 
 /* IRQ enable */
 #define IRQENB_HW_PEN  BIT(0)
+#define IRQENB_EOS 

[PATCH v2 0/5] Touchscreen performance related fixes

2014-11-06 Thread Vignesh R
This series of patches fix TSC defects related to lag in touchscreen
performance and cursor jump at touch release. The lag was result of
udelay in TSC interrupt handler. Cursor jump due to false pen-up event.
The patches implement Advisory 1.0.31 in silicon errata of am335x-evm
to avoid false pen-up events and remove udelay. The advisory says to use
steps 1 to 4 for ADC and 5 to 16 for TSC (assuming 4 wire TSC and 4 channel
ADC). Further the X co-ordinate must be the last one to be sampled just
before charge step. The first two patches implement the required changes.

A DT parameter to configure the duration of tsc charge step. It represents
number of ADC clock cycles to wait between applying the step configuration
registers and going back to the IDLE state. The charge delay value can vary
across boards. Configuring correct value of charge delay is important to avoid
false pen-up events. Hence it is necessary to expose charge-delay value as
DT parameter. The pen-up detection happens immediately after the charge step
so this does in fact function as a hardware knob for adjusting the amount of
settling time.

After applying these changes false pen-up events have not be observed and
smooth circles can be drawn on touch screen. The performance is much better
in recognizing quick movement across the screen. No lag or cursor jump is
observed.

Change log:

v2:
 - Addressed comments by Hartmut Knaack
 - patch 2 was split into two as per Lee Jones comment

Brad Griffis (2):
  input: touchscreen: ti_am335x_tsc Interchange touchscreen and ADC
steps
  input: touchscreen: ti_am335x_tsc: Remove udelay in interrupt handler

Vignesh R (3):
  mfd: ti_am335x_tscadc: Remove unwanted reg_se_cache save
  ARM: dts: AM335x: Make charge delay a DT parameter for tsc
  input: touchscreen: ti_am335x_tsc: Use charge delay DT parameter

 .../bindings/input/touchscreen/ti-tsc-adc.txt  |  15 +++
 arch/arm/boot/dts/am335x-evm.dts   |   1 +
 drivers/iio/adc/ti_am335x_adc.c|   5 +-
 drivers/input/touchscreen/ti_am335x_tsc.c  | 106 ++---
 drivers/mfd/ti_am335x_tscadc.c |   7 +-
 include/linux/mfd/ti_am335x_tscadc.h   |   4 +-
 6 files changed, 79 insertions(+), 59 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: N900 modem support in 3.18-rc1

2014-11-06 Thread Ivaylo Dimitrov



On  7.11.2014 01:01, Pali Rohár wrote:



For voice calls you need:
* kernel driver cmt-speech (or it has some new name)
* cmt-speech userspace library (communication with kernel)
* pulseaudio modules which are using that library

Freemangordon (Ivaylo Dimitrov, CCed) should know more about it,
specially about pulseaudio modules...



I have a patch for cmt-speech on top of nokia-modem driver living 
somewhere on my HDD, but I guess it is better Sebastian to make such a 
patch (Sebastian, no?).


About the pulseaudio stuff - we're still in process of REing it, so far 
there are 2 out of 3 closed Nokia modules ready 
(https://gitorious.org/pulseaudio-nokia), but the last one, which is the 
one used for voice calls is still not ready and will take it a while :).


Regards,
Ivo

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html