[PATCHv2 2/2] power_supply: Add support for tps65217-charger.

2015-09-24 Thread Enric Balletbo i Serra
This patch adds support for the tps65217 charger driver. This driver is
responsible for controlling the charger aspect of the tps65217 mfd.
Currently, this mainly consists of turning on and off the charger, but
some other features of the charger can be supported through this driver.

Signed-off-by: Enric Balletbo i Serra <enric.balle...@collabora.com>
---
 drivers/power/Kconfig|   7 +
 drivers/power/Makefile   |   1 +
 drivers/power/tps65217_charger.c | 267 +++
 3 files changed, 275 insertions(+)
 create mode 100644 drivers/power/tps65217_charger.c

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index f8758d6..57fdc80 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -434,6 +434,13 @@ config CHARGER_TPS65090
 Say Y here to enable support for battery charging with TPS65090
 PMIC chips.
 
+config CHARGER_TPS65217
+   tristate "TPS65217 battery charger driver"
+   depends on MFD_TPS65217
+   help
+Say Y here to enable support for battery charging with TPS65217
+PMIC chips.
+
 config BATTERY_GAUGE_LTC2941
tristate "LTC2941/LTC2943 Battery Gauge Driver"
depends on I2C
diff --git a/drivers/power/Makefile b/drivers/power/Makefile
index 5752ce8..c1409b3 100644
--- a/drivers/power/Makefile
+++ b/drivers/power/Makefile
@@ -65,6 +65,7 @@ obj-$(CONFIG_CHARGER_BQ25890) += bq25890_charger.o
 obj-$(CONFIG_POWER_AVS)+= avs/
 obj-$(CONFIG_CHARGER_SMB347)   += smb347-charger.o
 obj-$(CONFIG_CHARGER_TPS65090) += tps65090-charger.o
+obj-$(CONFIG_CHARGER_TPS65217) += tps65217_charger.o
 obj-$(CONFIG_POWER_RESET)  += reset/
 obj-$(CONFIG_AXP288_FUEL_GAUGE) += axp288_fuel_gauge.o
 obj-$(CONFIG_AXP288_CHARGER)   += axp288_charger.o
diff --git a/drivers/power/tps65217_charger.c b/drivers/power/tps65217_charger.c
new file mode 100644
index 000..569463f
--- /dev/null
+++ b/drivers/power/tps65217_charger.c
@@ -0,0 +1,267 @@
+/*
+ * Battery charger driver for TI's tps65217
+ *
+ * Copyright (c) 2015, Collabora Ltd.
+
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Battery charger driver for TI's tps65217
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#define POLL_INTERVAL  (HZ * 2)
+
+struct tps65217_charger {
+   struct tps65217 *tps;
+   struct device *dev;
+   struct power_supply *ac;
+
+   int ac_online;
+   int prev_ac_online;
+
+   struct task_struct  *poll_task;
+};
+
+static enum power_supply_property tps65217_ac_props[] = {
+   POWER_SUPPLY_PROP_ONLINE,
+};
+
+static int tps65217_config_charger(struct tps65217_charger *charger)
+{
+   int ret;
+
+   dev_dbg(charger->dev, "%s\n", __func__);
+
+   /*
+* tps65217 rev. G, p. 31 (see p. 32 for NTC schematic)
+*
+* The device can be configured to support a 100k NTC (B = 3960) by
+* setting the the NTC_TYPE bit in register CHGCONFIG1 to 1. However it
+* is not recommended to do so. In sleep mode, the charger continues
+* charging the battery, but all register values are reset to default
+* values. Therefore, the charger would get the wrong temperature
+* information. If 100k NTC setting is required, please contact the
+* factory.
+*
+* ATTENTION, conflicting information, from p. 46
+*
+* NTC TYPE (for battery temperature measurement)
+*   0 – 100k (curve 1, B = 3960)
+*   1 – 10k  (curve 2, B = 3480) (default on reset)
+*
+*/
+   ret = tps65217_clear_bits(charger->tps, TPS65217_REG_CHGCONFIG1,
+ TPS65217_CHGCONFIG1_NTC_TYPE,
+ TPS65217_PROTECT_NONE);
+   if (ret) {
+   dev_err(charger->dev,
+   "failed to set 100k NTC setting: %d\n", ret);
+   return ret;
+   }
+
+   return 0;
+}
+
+static int tps65217_enable_charging(struct tps65217_charger *charger)
+{
+   int ret;
+
+   /* charger already enabled */
+   if (charger->ac_online)
+   return 0;
+
+   dev_dbg(charger->dev, "%s: enable charging\n", __f

[PATCHv2 0/2] Add support for tps65217 charger

2015-09-24 Thread Enric Balletbo i Serra
Hi all,

The following series add initial support for tps65217 battery charger.

Changes since v1:
  - Requested by Sebastian Reichel
- Set prev_ac_online at the beginning of the tps56217_charger_irq()
- Use devm_power_supply_register call.
  - Fix style problems reported by checkpatch.pl --strict

Best regards,

Enric Balletbo i Serra (2):
  devicetree: Add TPS65217 charger binding.
  power_supply: Add support for tps65217-charger.

 .../bindings/power_supply/tps65217_charger.txt |  12 +
 drivers/power/Kconfig  |   7 +
 drivers/power/Makefile |   1 +
 drivers/power/tps65217_charger.c   | 267 +
 4 files changed, 287 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/power_supply/tps65217_charger.txt
 create mode 100644 drivers/power/tps65217_charger.c

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


[PATCHv2 1/2] devicetree: Add TPS65217 charger binding.

2015-09-24 Thread Enric Balletbo i Serra
The TPS65217 charger is a subnode of the TPS65217 MFD.

Signed-off-by: Enric Balletbo i Serra <enric.balle...@collabora.com>
---
 .../devicetree/bindings/power_supply/tps65217_charger.txt| 12 
 1 file changed, 12 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/power_supply/tps65217_charger.txt

diff --git 
a/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt 
b/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt
new file mode 100644
index 000..98d131a
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt
@@ -0,0 +1,12 @@
+TPS65217 Charger
+
+Required Properties:
+-compatible: "ti,tps65217-charger"
+
+This node is a subnode of the tps65217 PMIC.
+
+Example:
+
+   tps65217-charger {
+   compatible = "ti,tps65090-charger";
+   };
-- 
2.1.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


[PATCHv3 0/2] Add support for tps65217 charger

2015-09-24 Thread Enric Balletbo i Serra
Hi all,

The following series add initial support for tps65217 battery charger.

Changes since v2:
  - Requested by Sebastian Reichel
- Assign prev_ac_online to ac_online is no longer needed at this place.
- Remove power_supply_unregistersince it wouldb be called by managed 
resources.

Changes since v1:
  - Requested by Sebastian Reichel
- Set prev_ac_online at the beginning of the tps56217_charger_irq()
- Use devm_power_supply_register call.
  - Fix style problems reported by checkpatch.pl --strict

Best regards,

Enric Balletbo i Serra (2):
  devicetree: Add TPS65217 charger binding.
  power_supply: Add support for tps65217-charger.

 .../bindings/power_supply/tps65217_charger.txt |  12 +
 drivers/power/Kconfig  |   7 +
 drivers/power/Makefile |   1 +
 drivers/power/tps65217_charger.c   | 264 +
 4 files changed, 284 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/power_supply/tps65217_charger.txt
 create mode 100644 drivers/power/tps65217_charger.c

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


[PATCHv3 2/2] power_supply: Add support for tps65217-charger.

2015-09-24 Thread Enric Balletbo i Serra
This patch adds support for the tps65217 charger driver. This driver is
responsible for controlling the charger aspect of the tps65217 mfd.
Currently, this mainly consists of turning on and off the charger, but
some other features of the charger can be supported through this driver.

Signed-off-by: Enric Balletbo i Serra <enric.balle...@collabora.com>
---
 drivers/power/Kconfig|   7 ++
 drivers/power/Makefile   |   1 +
 drivers/power/tps65217_charger.c | 264 +++
 3 files changed, 272 insertions(+)
 create mode 100644 drivers/power/tps65217_charger.c

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index f8758d6..57fdc80 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -434,6 +434,13 @@ config CHARGER_TPS65090
 Say Y here to enable support for battery charging with TPS65090
 PMIC chips.
 
+config CHARGER_TPS65217
+   tristate "TPS65217 battery charger driver"
+   depends on MFD_TPS65217
+   help
+Say Y here to enable support for battery charging with TPS65217
+PMIC chips.
+
 config BATTERY_GAUGE_LTC2941
tristate "LTC2941/LTC2943 Battery Gauge Driver"
depends on I2C
diff --git a/drivers/power/Makefile b/drivers/power/Makefile
index 5752ce8..c1409b3 100644
--- a/drivers/power/Makefile
+++ b/drivers/power/Makefile
@@ -65,6 +65,7 @@ obj-$(CONFIG_CHARGER_BQ25890) += bq25890_charger.o
 obj-$(CONFIG_POWER_AVS)+= avs/
 obj-$(CONFIG_CHARGER_SMB347)   += smb347-charger.o
 obj-$(CONFIG_CHARGER_TPS65090) += tps65090-charger.o
+obj-$(CONFIG_CHARGER_TPS65217) += tps65217_charger.o
 obj-$(CONFIG_POWER_RESET)  += reset/
 obj-$(CONFIG_AXP288_FUEL_GAUGE) += axp288_fuel_gauge.o
 obj-$(CONFIG_AXP288_CHARGER)   += axp288_charger.o
diff --git a/drivers/power/tps65217_charger.c b/drivers/power/tps65217_charger.c
new file mode 100644
index 000..d9f5673
--- /dev/null
+++ b/drivers/power/tps65217_charger.c
@@ -0,0 +1,264 @@
+/*
+ * Battery charger driver for TI's tps65217
+ *
+ * Copyright (c) 2015, Collabora Ltd.
+
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Battery charger driver for TI's tps65217
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#define POLL_INTERVAL  (HZ * 2)
+
+struct tps65217_charger {
+   struct tps65217 *tps;
+   struct device *dev;
+   struct power_supply *ac;
+
+   int ac_online;
+   int prev_ac_online;
+
+   struct task_struct  *poll_task;
+};
+
+static enum power_supply_property tps65217_ac_props[] = {
+   POWER_SUPPLY_PROP_ONLINE,
+};
+
+static int tps65217_config_charger(struct tps65217_charger *charger)
+{
+   int ret;
+
+   dev_dbg(charger->dev, "%s\n", __func__);
+
+   /*
+* tps65217 rev. G, p. 31 (see p. 32 for NTC schematic)
+*
+* The device can be configured to support a 100k NTC (B = 3960) by
+* setting the the NTC_TYPE bit in register CHGCONFIG1 to 1. However it
+* is not recommended to do so. In sleep mode, the charger continues
+* charging the battery, but all register values are reset to default
+* values. Therefore, the charger would get the wrong temperature
+* information. If 100k NTC setting is required, please contact the
+* factory.
+*
+* ATTENTION, conflicting information, from p. 46
+*
+* NTC TYPE (for battery temperature measurement)
+*   0 – 100k (curve 1, B = 3960)
+*   1 – 10k  (curve 2, B = 3480) (default on reset)
+*
+*/
+   ret = tps65217_clear_bits(charger->tps, TPS65217_REG_CHGCONFIG1,
+ TPS65217_CHGCONFIG1_NTC_TYPE,
+ TPS65217_PROTECT_NONE);
+   if (ret) {
+   dev_err(charger->dev,
+   "failed to set 100k NTC setting: %d\n", ret);
+   return ret;
+   }
+
+   return 0;
+}
+
+static int tps65217_enable_charging(struct tps65217_charger *charger)
+{
+   int ret;
+
+   /* charger already enabled */
+   if (charger->ac_online)
+   return 0;
+
+   dev_dbg(charger->dev, "%s: enable charging\n", __f

[PATCHv3 1/2] devicetree: Add TPS65217 charger binding.

2015-09-24 Thread Enric Balletbo i Serra
The TPS65217 charger is a subnode of the TPS65217 MFD.

Signed-off-by: Enric Balletbo i Serra <enric.balle...@collabora.com>
---
 .../devicetree/bindings/power_supply/tps65217_charger.txt| 12 
 1 file changed, 12 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/power_supply/tps65217_charger.txt

diff --git 
a/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt 
b/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt
new file mode 100644
index 000..98d131a
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt
@@ -0,0 +1,12 @@
+TPS65217 Charger
+
+Required Properties:
+-compatible: "ti,tps65217-charger"
+
+This node is a subnode of the tps65217 PMIC.
+
+Example:
+
+   tps65217-charger {
+   compatible = "ti,tps65090-charger";
+   };
-- 
2.1.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 2/3] power_supply: Add support for tps65217-charger.

2015-09-08 Thread Enric Balletbo i Serra
This patch adds support for the tps65217 charger driver. This driver is
responsible for controlling the charger aspect of the tps65217 mfd.
Currently, this mainly consists of turning on and off the charger, but
some other features of the charger can be supported through this driver.

Signed-off-by: Enric Balletbo i Serra <enric.balle...@collabora.com>
---
 drivers/power/Kconfig|   7 +
 drivers/power/Makefile   |   1 +
 drivers/power/tps65217_charger.c | 269 +++
 3 files changed, 277 insertions(+)
 create mode 100644 drivers/power/tps65217_charger.c

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index f8758d6..57fdc80 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -434,6 +434,13 @@ config CHARGER_TPS65090
 Say Y here to enable support for battery charging with TPS65090
 PMIC chips.
 
+config CHARGER_TPS65217
+   tristate "TPS65217 battery charger driver"
+   depends on MFD_TPS65217
+   help
+Say Y here to enable support for battery charging with TPS65217
+PMIC chips.
+
 config BATTERY_GAUGE_LTC2941
tristate "LTC2941/LTC2943 Battery Gauge Driver"
depends on I2C
diff --git a/drivers/power/Makefile b/drivers/power/Makefile
index 5752ce8..c1409b3 100644
--- a/drivers/power/Makefile
+++ b/drivers/power/Makefile
@@ -65,6 +65,7 @@ obj-$(CONFIG_CHARGER_BQ25890) += bq25890_charger.o
 obj-$(CONFIG_POWER_AVS)+= avs/
 obj-$(CONFIG_CHARGER_SMB347)   += smb347-charger.o
 obj-$(CONFIG_CHARGER_TPS65090) += tps65090-charger.o
+obj-$(CONFIG_CHARGER_TPS65217) += tps65217_charger.o
 obj-$(CONFIG_POWER_RESET)  += reset/
 obj-$(CONFIG_AXP288_FUEL_GAUGE) += axp288_fuel_gauge.o
 obj-$(CONFIG_AXP288_CHARGER)   += axp288_charger.o
diff --git a/drivers/power/tps65217_charger.c b/drivers/power/tps65217_charger.c
new file mode 100644
index 000..0b6a30d
--- /dev/null
+++ b/drivers/power/tps65217_charger.c
@@ -0,0 +1,269 @@
+/*
+ * Battery charger driver for TI's tps65217
+ *
+ * Copyright (c) 2015, Collabora Ltd.
+
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Battery charger driver for TI's tps65217
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#define POLL_INTERVAL  (HZ * 2)
+
+struct tps65217_charger {
+   struct tps65217 *tps;
+   struct device *dev;
+   struct power_supply *ac;
+
+   int ac_online;
+   int prev_ac_online;
+
+   struct task_struct  *poll_task;
+};
+
+static enum power_supply_property tps65217_ac_props[] = {
+   POWER_SUPPLY_PROP_ONLINE,
+};
+
+static int tps65217_config_charger(struct tps65217_charger *charger)
+{
+   int ret;
+
+   dev_dbg(charger->dev, "%s\n", __func__);
+
+   /*
+* tps65217 rev. G, p. 31 (see p. 32 for NTC schematic)
+*
+* The device can be configured to support a 100k NTC (B = 3960) by
+* setting the the NTC_TYPE bit in register CHGCONFIG1 to 1. However it
+* is not recommended to do so. In sleep mode, the charger continues
+* charging the battery, but all register values are reset to default
+* values. Therefore, the charger would get the wrong temperature
+* information. If 100k NTC setting is required, please contact the
+* factory.
+*
+* ATTENTION, conflicting information, from p. 46
+*
+* NTC TYPE (for battery temperature measurement)
+*   0 – 100k (curve 1, B = 3960)
+*   1 – 10k  (curve 2, B = 3480) (default on reset)
+*
+*/
+   ret = tps65217_clear_bits(charger->tps, TPS65217_REG_CHGCONFIG1,
+   TPS65217_CHGCONFIG1_NTC_TYPE,
+   TPS65217_PROTECT_NONE);
+   if (ret) {
+   dev_err(charger->dev,
+   "failed to set 100k NTC setting: %d\n", ret);
+   return ret;
+   }
+
+   return 0;
+}
+
+static int tps65217_enable_charging(struct tps65217_charger *charger)
+{
+   int ret;
+
+   /* charger already enabled */
+   if (charger->ac_online)
+   return 0;
+
+   dev_dbg(charger->dev, "%s: enable charging\n", __f

[PATCH 0/3] Add support for tps65217 charger

2015-09-08 Thread Enric Balletbo i Serra
Hi all,

The following series add initial support for tps65217 battery charger. This
series is a first attempt and will have mistake so all comments and
suggestions are welcomed.

Best regards,

Enric Balletbo i Serra (3):
  devicetree: Add TPS65217 charger binding.
  power_supply: Add support for tps65217-charger.
  mfd: Add battery charger as subdevice to the tps65217.

 .../bindings/power_supply/tps65217_charger.txt |  12 +
 drivers/mfd/tps65217.c |   4 +
 drivers/power/Kconfig  |   7 +
 drivers/power/Makefile |   1 +
 drivers/power/tps65217_charger.c   | 269 +
 5 files changed, 293 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/power_supply/tps65217_charger.txt
 create mode 100644 drivers/power/tps65217_charger.c

-- 
2.1.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 1/3] devicetree: Add TPS65217 charger binding.

2015-09-08 Thread Enric Balletbo i Serra
The TPS65217 charger is a subnode of the TPS65217 MFD.

Signed-off-by: Enric Balletbo i Serra <enric.balle...@collabora.com>
---
 .../devicetree/bindings/power_supply/tps65217_charger.txt| 12 
 1 file changed, 12 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/power_supply/tps65217_charger.txt

diff --git 
a/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt 
b/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt
new file mode 100644
index 000..98d131a
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/tps65217_charger.txt
@@ -0,0 +1,12 @@
+TPS65217 Charger
+
+Required Properties:
+-compatible: "ti,tps65217-charger"
+
+This node is a subnode of the tps65217 PMIC.
+
+Example:
+
+   tps65217-charger {
+   compatible = "ti,tps65090-charger";
+   };
-- 
2.1.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 3/3] mfd: Add battery charger as subdevice to the tps65217.

2015-09-08 Thread Enric Balletbo i Serra
Add tps65217 battery charger subdevice.

Signed-off-by: Enric Balletbo i Serra <enric.balle...@collabora.com>
---
 drivers/mfd/tps65217.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
index 55add04..d32b5442 100644
--- a/drivers/mfd/tps65217.c
+++ b/drivers/mfd/tps65217.c
@@ -39,6 +39,10 @@ static const struct mfd_cell tps65217s[] = {
.name = "tps65217-bl",
.of_compatible = "ti,tps65217-bl",
},
+   {
+   .name = "tps65217-charger",
+   .of_compatible = "ti,tps65217-charger",
+   },
 };
 
 /**
-- 
2.1.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 1/2] of: Add vendor prefix for Toby Churchill Ltd.

2015-05-26 Thread Enric Balletbo i Serra
Toby Churchill Ltd is a global provider of assistive technology.

Signed-off-by: Enric Balletbo i Serra enric.balle...@collabora.com
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt 
b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 8033919..86e842a 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -189,6 +189,7 @@ ste ST-Ericsson
 stericsson ST-Ericsson
 synology   Synology, Inc.
 tbsTBS Technologies
+tclToby Churchill Ltd.
 thine  THine Electronics, Inc.
 ti Texas Instruments
 tlmTrusted Logic Mobility
-- 
2.1.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 0/2] Add support for Toby Churchill SL50 board.

2015-05-26 Thread Enric Balletbo i Serra
Hi Tony,

These patches add support for a new board based on AM335x processor. If it
is ok, take in consideration to include in next DT merge window, please.

Best regards,

Enric Balletbo i Serra (2):
  of: Add vendor prefix for Toby Churchill Ltd.
  ARM: dts: am335x-sl50: Add Toby-Churchill SL50 board support.

 .../devicetree/bindings/vendor-prefixes.txt|   1 +
 arch/arm/boot/dts/Makefile |   1 +
 arch/arm/boot/dts/am335x-sl50.dts  | 482 +
 3 files changed, 484 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-sl50.dts

-- 
2.1.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 2/2] ARM: dts: am335x-sl50: Add Toby-Churchill SL50 board support.

2015-05-26 Thread Enric Balletbo i Serra
Add support for Lightwriter SL50 series board, a small, robust and portable
Voice Output Communication Aids (VOCA) designed to meet the particular and
changing needs of people with speech loss resulting from a wide range of
acquired, progressive and congenital conditions.

Signed-off-by: Enric Balletbo i Serra enric.balle...@collabora.com
Reviewed-by: Javier Martinez Canillas javier.marti...@collabora.co.uk
Reviewed-by: Andy Simpkins andy.simpk...@toby-churchill.com
---
 arch/arm/boot/dts/Makefile|   1 +
 arch/arm/boot/dts/am335x-sl50.dts | 482 ++
 2 files changed, 483 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-sl50.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 86217db..b1c1373 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -409,6 +409,7 @@ dtb-$(CONFIG_SOC_AM33XX) += \
am335x-base0033.dtb \
am335x-bone.dtb \
am335x-boneblack.dtb \
+   am335x-sl50.dtb \
am335x-evm.dtb \
am335x-evmsk.dtb \
am335x-nano.dtb \
diff --git a/arch/arm/boot/dts/am335x-sl50.dts 
b/arch/arm/boot/dts/am335x-sl50.dts
new file mode 100644
index 000..1ee2ddf
--- /dev/null
+++ b/arch/arm/boot/dts/am335x-sl50.dts
@@ -0,0 +1,482 @@
+/*
+ * Copyright (C) 2015 Toby Churchill - http://www.toby-churchill.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 am33xx.dtsi
+
+/ {
+   model = Toby Churchill SL50 Series;
+   compatible = tcl,am335x-sl50, ti,am33xx;
+
+   cpus {
+   cpu@0 {
+   cpu0-supply = dcdc2_reg;
+   };
+   };
+
+   leds {
+   compatible = gpio-leds;
+   pinctrl-names = default;
+   pinctrl-0 = led_pins;
+
+   led@0 {
+   label = sl50:green:usr0;
+   gpios = gpio1 21 GPIO_ACTIVE_LOW;
+   default-state = off;
+   };
+
+   led@1 {
+   label = sl50:red:usr1;
+   gpios = gpio1 22 GPIO_ACTIVE_LOW;
+   default-state = off;
+   };
+
+   led@2 {
+   label = sl50:green:usr2;
+   gpios = gpio1 23 GPIO_ACTIVE_LOW;
+   default-state = off;
+   };
+
+   led@3 {
+   label = sl50:red:usr3;
+   gpios = gpio1 24 GPIO_ACTIVE_LOW;
+   default-state = off;
+   };
+   };
+
+   backlight0: disp0 {
+   compatible = pwm-backlight;
+   pwms = ehrpwm1 0 50 0;
+   brightness-levels = 0 10 20 30 40 50 60 70 80 90 99;
+   default-brightness-level = 6;
+   };
+
+   backlight1: disp1 {
+   compatible = pwm-backlight;
+   pwms = ehrpwm1 1 50 0;
+   brightness-levels = 0 10 20 30 40 50 60 70 80 90 99;
+   default-brightness-level = 6;
+   };
+
+   sound {
+   compatible = ti,da830-evm-audio;
+   ti,model = AM335x-SL50;
+   ti,audio-codec = audio_codec;
+   ti,mcasp-controller = mcasp0;
+   ti,codec-clock-rate = 1200;
+   ti,audio-routing =
+   Headphone Jack,   HPLOUT,
+   Headphone Jack,   HPROUT,
+   LINE1R,   Line In,
+   LINE1L,   Line In;
+   };
+
+   emmc_pwrseq: pwrseq@0 {
+   compatible = mmc-pwrseq-emmc;
+   pinctrl-names = default;
+   pinctrl-0 = emmc_pwrseq_pins;
+   reset-gpios = gpio1 20 GPIO_ACTIVE_LOW;
+   };
+
+   vmmcsd_fixed: fixedregulator@0 {
+   compatible = regulator-fixed;
+   regulator-name = vmmcsd_fixed;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   };
+};
+
+am33xx_pinmux {
+   pinctrl-names = default;
+   pinctrl-0 = lwb_pins;
+
+   led_pins: pinmux_led_pins {
+   pinctrl-single,pins = 
+   AM33XX_IOPAD(0x854, PIN_OUTPUT | MUX_MODE7) /* 
gpmc_a5.gpio1_21 */
+   AM33XX_IOPAD(0x858, PIN_OUTPUT | MUX_MODE7) /* 
gpmc_a6.gpio1_22 */
+   AM33XX_IOPAD(0x85c, PIN_OUTPUT | MUX_MODE7) /* 
gpmc_a7.gpio1_23 */
+   AM33XX_IOPAD(0x860, PIN_OUTPUT | MUX_MODE7) /* 
gpmc_a8.gpio1_24 */
+   ;
+   };
+
+   uart0_pins: pinmux_uart0_pins {
+   pinctrl-single,pins = 
+   AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)   
/* uart0_rxd.uart0_rxd

[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


[PATCH] drivers/misc/ti-st: Load firmware from ti-connectivity directory.

2014-07-22 Thread Enric Balletbo i Serra
Looks like the default location for TI firmware is inside the ti-connectivity
directory, to be coherent with other firmware request used by TI drivers, load
the TIInit firmware from this directory instead of /lib/firmware directly.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 drivers/misc/ti-st/st_kim.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c
index 9d3dbb2..fa6a900 100644
--- a/drivers/misc/ti-st/st_kim.c
+++ b/drivers/misc/ti-st/st_kim.c
@@ -244,7 +244,8 @@ static long read_local_version(struct kim_data_s 
*kim_gdata, char *bts_scr_name)
if (version  0x8000)
maj_ver |= 0x0008;
 
-   sprintf(bts_scr_name, TIInit_%d.%d.%d.bts, chip, maj_ver, min_ver);
+   sprintf(bts_scr_name, ti-connectivity/TIInit_%d.%d.%d.bts,
+   chip, maj_ver, min_ver);
 
/* to be accessed later via sysfs entry */
kim_gdata-version.full = version;
@@ -287,7 +288,7 @@ static long download_firmware(struct kim_data_s *kim_gdata)
long len = 0;
unsigned char *ptr = NULL;
unsigned char *action_ptr = NULL;
-   unsigned char bts_scr_name[30] = { 0 }; /* 30 char long bts scr name? */
+   unsigned char bts_scr_name[40] = { 0 }; /* 40 char long bts scr name? */
int wr_room_space;
int cmd_size;
unsigned long timeout;
-- 
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] ARM: dts: Fix TI CPSW Phy mode selection on IGEP COM AQUILA.

2014-06-25 Thread Enric Balletbo i Serra
As this board use external clock for RMII interface we should specify 'rmii'
phy mode and 'rmii-clock-ext' to make ethernet working.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/am335x-igep0033.dtsi | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-igep0033.dtsi 
b/arch/arm/boot/dts/am335x-igep0033.dtsi
index 8a0a72d..a1a0cc5 100644
--- a/arch/arm/boot/dts/am335x-igep0033.dtsi
+++ b/arch/arm/boot/dts/am335x-igep0033.dtsi
@@ -105,10 +105,16 @@
 
 cpsw_emac0 {
phy_id = davinci_mdio, 0;
+   phy-mode = rmii;
 };
 
 cpsw_emac1 {
phy_id = davinci_mdio, 1;
+   phy-mode = rmii;
+};
+
+phy_sel {
+   rmii-clock-ext;
 };
 
 elm {
-- 
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] ARM: dts: omap3-igep00x0: Fix nand ECC to maintain backward compatibility.

2013-12-01 Thread Enric Balletbo i Serra
Legacy board files for IGEP Processor Boards used 1-bit Hamming ECC layout but
new DT uses BCH8 software layout. This breaks the backward compatibility for
people that used board files before and switch to DT and have the problem that
they can't flash the rootfs using the bootloader.

This patch sets the ECC layout to 1-bit Hamming ECC in order to maintain this
compatibility.

Reported-by: Thomas Petazzoni thomas.petazz...@free-electrons.com
Reported-by: Ezequiel Garcia ezequiel.gar...@free-electrons.com
Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/boot/dts/omap3-igep0020.dts | 2 +-
 arch/arm/boot/dts/omap3-igep0030.dts | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-igep0020.dts 
b/arch/arm/boot/dts/omap3-igep0020.dts
index d5cc792..4229e94 100644
--- a/arch/arm/boot/dts/omap3-igep0020.dts
+++ b/arch/arm/boot/dts/omap3-igep0020.dts
@@ -116,7 +116,7 @@
linux,mtd-name= micron,mt29c4g96maz;
reg = 0 0 0;
nand-bus-width = 16;
-   ti,nand-ecc-opt = bch8;
+   ti,nand-ecc-opt = ham1;
 
gpmc,sync-clk-ps = 0;
gpmc,cs-on-ns = 0;
diff --git a/arch/arm/boot/dts/omap3-igep0030.dts 
b/arch/arm/boot/dts/omap3-igep0030.dts
index 525e6d9..9043e97 100644
--- a/arch/arm/boot/dts/omap3-igep0030.dts
+++ b/arch/arm/boot/dts/omap3-igep0030.dts
@@ -59,7 +59,7 @@
linux,mtd-name= micron,mt29c4g96maz;
reg = 0 0 0;
nand-bus-width = 16;
-   ti,nand-ecc-opt = bch8;
+   ti,nand-ecc-opt = ham1;
 
gpmc,sync-clk-ps = 0;
gpmc,cs-on-ns = 0;
-- 
1.8.1.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


[PATCH 3/3] ARM: dts: omap3-igep*: Update to use the TI AM/DM37x processor.

2013-10-19 Thread Enric Balletbo i Serra
Most of the boards are using the TI AM/DM37x processor, there is only a small
quantity of IGEP Processor Boards based on TI OMAP3530. So it's better use the
omap36xx.dtsi include instead of omap34xx.dtsi include.

To avoid confusion we have added to the model the (TI AM/DM37x) comment.

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

diff --git a/arch/arm/boot/dts/omap3-igep.dtsi 
b/arch/arm/boot/dts/omap3-igep.dtsi
index 882e318..04b83ce 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -1,5 +1,5 @@
 /*
- * Device Tree Source for IGEP Technology devices
+ * Common device tree for IGEP boards based on AM/DM37x
  *
  * Copyright (C) 2012 Javier Martinez Canillas jav...@collabora.co.uk
  * Copyright (C) 2012 Enric Balletbo i Serra eballe...@gmail.com
@@ -10,7 +10,7 @@
  */
 /dts-v1/;
 
-#include omap34xx.dtsi
+#include omap36xx.dtsi
 
 / {
memory {
diff --git a/arch/arm/boot/dts/omap3-igep0020.dts 
b/arch/arm/boot/dts/omap3-igep0020.dts
index 750ce84..495ef0c 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 board
+ * Device Tree Source for IGEPv2 Rev. (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 = IGEPv2;
+   model = IGEPv2 (TI OMAP AM/DM37x);
compatible = isee,omap3-igep0020, ti,omap3;
 
leds {
diff --git a/arch/arm/boot/dts/omap3-igep0030.dts 
b/arch/arm/boot/dts/omap3-igep0030.dts
index 525e6d9..02a23f8 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
+ * Device Tree Source for IGEP COM MODULE (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;
+   model = IGEP COM MODULE (TI OMAP AM/DM37x);
compatible = isee,omap3-igep0030, ti,omap3;
 
leds {
-- 
1.8.1.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


[PATCH 1/3] ARM: dts: omap3-igep: Fix bus-width for mmc1.

2013-10-19 Thread Enric Balletbo i Serra
Both, IGEPv2 and IGEP COM MODULE have a bus-width of 4 not 8, so fix this and
do not mux data pins from mmc1_data5 to mmc1_data7.

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

diff --git a/arch/arm/boot/dts/omap3-igep.dtsi 
b/arch/arm/boot/dts/omap3-igep.dtsi
index ba1e58b..d4fecce 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -65,10 +65,6 @@
0x11a (PIN_INPUT_PULLUP | MUX_MODE0)/* 
sdmmc1_dat1.sdmmc1_dat1 */
0x11c (PIN_INPUT_PULLUP | MUX_MODE0)/* 
sdmmc1_dat2.sdmmc1_dat2 */
0x11e (PIN_INPUT_PULLUP | MUX_MODE0)/* 
sdmmc1_dat3.sdmmc1_dat3 */
-   0x120 (PIN_INPUT | MUX_MODE0)   /* 
sdmmc1_dat4.sdmmc1_dat4 */
-   0x122 (PIN_INPUT | MUX_MODE0)   /* 
sdmmc1_dat5.sdmmc1_dat5 */
-   0x124 (PIN_INPUT | MUX_MODE0)   /* 
sdmmc1_dat6.sdmmc1_dat6 */
-   0x126 (PIN_INPUT | MUX_MODE0)   /* 
sdmmc1_dat7.sdmmc1_dat7 */
;
};
 
@@ -114,7 +110,7 @@
   pinctrl-0 = mmc1_pins;
   vmmc-supply = vmmc1;
   vmmc_aux-supply = vsim;
-  bus-width = 8;
+  bus-width = 4;
 };
 
 mmc2 {
-- 
1.8.1.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


[PATCH 0/3] ARM: dts: omap3-igep MMC updates for v3.13

2013-10-19 Thread Enric Balletbo i Serra
Hi Benoit,

This series are some updates for IGEP boards that would be great if can make
it for v3.13 (not sure if merge window is already closed as I saw your last
pull request).

The first patch is fix for mmc1 that should be configured for 4 bits not 8,
the second patch add support for the WiFi module connected to MMC2 SDIO
interface, and the third patch, updates the default processor to AM/DM37x
as most of the boards uses this processor instead of the old OMAP353x.

Best regards,

Enric Balletbo i Serra (3):
  ARM: dts: omap3-igep: Fix bus-width for mmc1.
  ARM: dts: omap3-igep: Add support for LBEE1USJYC WiFi connected to
SDIO.
  ARM: dts: omap3-igep*: Update to use the TI AM/DM37x processor.

 arch/arm/boot/dts/omap3-igep.dtsi| 55 ++--
 arch/arm/boot/dts/omap3-igep0020.dts |  4 +--
 arch/arm/boot/dts/omap3-igep0030.dts |  4 +--
 3 files changed, 51 insertions(+), 12 deletions(-)

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


[PATCH 2/3] ARM: dts: omap3-igep: Add support for LBEE1USJYC WiFi connected to SDIO.

2013-10-19 Thread Enric Balletbo i Serra
The LBEE1USJYC is a WiFi/BT combo module used on OMAP3-based IGEP boards. In
both cases, IGEPv2 Rev. C and IGEP COM MODULE, the module is connected using
the same MMC interface and uses the same GPIOs.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/boot/dts/omap3-igep.dtsi | 45 ++-
 1 file changed, 44 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/omap3-igep.dtsi 
b/arch/arm/boot/dts/omap3-igep.dtsi
index d4fecce..882e318 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -24,6 +24,25 @@
ti,mcbsp = mcbsp2;
ti,codec = twl_audio;
};
+
+   vdd33: regulator-vdd33 {
+   compatible = regulator-fixed;
+   regulator-name = vdd33;
+   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 0;   /* gpio_138 WIFI_PDN */
+   startup-delay-us = 1;
+   enable-active-high;
+   vin-supply = vdd33;
+   };
 };
 
 omap3_pmx_core {
@@ -48,6 +67,15 @@
;
};
 
+   /* 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 */
@@ -68,6 +96,17 @@
;
};
 
+   mmc2_pins: pinmux_mmc2_pins {
+   pinctrl-single,pins = 
+   0x128 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
sdmmc2_clk.sdmmc2_clk */
+   0x12a (PIN_INPUT_PULLUP | MUX_MODE0)/* 
sdmmc2_cmd.sdmmc2_cmd */
+   0x12c (PIN_INPUT_PULLUP | MUX_MODE0)/* 
sdmmc2_dat0.sdmmc2_dat0 */
+   0x12e (PIN_INPUT_PULLUP | MUX_MODE0)/* 
sdmmc2_dat1.sdmmc2_dat1 */
+   0x130 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
sdmmc2_dat2.sdmmc2_dat2 */
+   0x132 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
sdmmc2_dat3.sdmmc2_dat3 */
+   ;
+   };
+
smsc911x_pins: pinmux_smsc911x_pins {
pinctrl-single,pins = 
0x1a2 (PIN_INPUT | MUX_MODE4)   /* 
mcspi1_cs2.gpio_176 */
@@ -114,7 +153,11 @@
 };
 
 mmc2 {
-   status = disabled;
+   pinctrl-names = default;
+   pinctrl-0 = mmc2_pins;
+   vmmc-supply = lbee1usjyc_vmmc;
+   bus-width = 4;
+   non-removable;
 };
 
 mmc3 {
-- 
1.8.1.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


[PATCH] ARM: dts: igep0033: Add mmc1 node for SDCARD support.

2013-10-19 Thread Enric Balletbo i Serra
Add mmc1 dt node to IGEP COM AQUILA board.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/boot/dts/am335x-igep0033.dtsi | 13 +
 1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-igep0033.dtsi 
b/arch/arm/boot/dts/am335x-igep0033.dtsi
index 06eba07..6196244 100644
--- a/arch/arm/boot/dts/am335x-igep0033.dtsi
+++ b/arch/arm/boot/dts/am335x-igep0033.dtsi
@@ -44,6 +44,13 @@
regulator-max-microvolt = 500;
regulator-boot-on;
};
+
+   vmmc: fixedregulator@0 {
+   compatible = regulator-fixed;
+   regulator-name = vmmc;
+   regulator-min-microvolt = 330;
+   regulator-max-microvolt = 330;
+   };
 };
 
 am33xx_pinmux {
@@ -180,6 +187,12 @@
};
 };
 
+mmc1 {
+   status = okay;
+   vmmc-supply = vmmc;
+   bus-width = 4;
+};
+
 uart0 {
status = okay;
pinctrl-names = default;
-- 
1.8.1.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


[PATCH 2/2] ARM: dts: AM33XX: Add support for IGEP AQUILA EXPANSION board.

2013-09-10 Thread Enric Balletbo i Serra
The IGEP AQUILA EXPANSION board is a development platform for the IGEP COM
AQUILA AM335x boards.

The board adds the following connectivity:

o USB OTG
o USB HOST
o HDMI
o Ethernet
o Serial Debug (3.3V)
o 2x46 pin headers
o EEPROM

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
Reviewed-by: Javier Martinez Canillas javier.marti...@collabora.co.uk
---
 arch/arm/boot/dts/Makefile|  1 +
 arch/arm/boot/dts/am335x-base0033.dts | 16 
 2 files changed, 17 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-base0033.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 641b3c9..12c2949 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -171,6 +171,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
am335x-evm.dtb \
am335x-evmsk.dtb \
am335x-bone.dtb \
+   am335x-base0033.dtb \
am3517-evm.dtb \
am3517_mt_ventoux.dtb \
am43x-epos-evm.dtb
diff --git a/arch/arm/boot/dts/am335x-base0033.dts 
b/arch/arm/boot/dts/am335x-base0033.dts
new file mode 100644
index 000..7a079db
--- /dev/null
+++ b/arch/arm/boot/dts/am335x-base0033.dts
@@ -0,0 +1,16 @@
+/*
+ * am335x-base0033.dtsi - Device Tree file for IGEP AQUILA EXPANSION
+ *
+ * Copyright (C) 2013 ISEE 2007 SL - http://www.isee.biz
+ *
+ * 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 am335x-igep0033.dtsi
+
+/ {
+   model = IGEP COM AM335x on AQUILA Expansion;
+   compatible = isee,am335x-base0033, isee,am335x-igep0033, 
ti,am33xx;
+};
-- 
1.8.1.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


[PATCH 1/2] ARM: dts: AM33XX: Add support for IGEP COM AQUILA

2013-09-10 Thread Enric Balletbo i Serra
The IGEP COM AQUILA is industrial processors SODIMM module with
following highlights:

   o AM3352/AM3354/AM3358/AM3359 Texas Instruments processor
   o Cortex-A8 ARM CPU
   o 3.3 volts Inputs / Outputs use industrial
   o 256 MB DDR3 SDRAM / 128 Megabytes FLASH
   o MicroSD card reader on-board
   o Ethernet controller on-board
   o JTAG debug connector available
   o Designed for industrial range purposes

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
Reviewed-by: Javier Martinez Canillas javier.marti...@collabora.co.uk
---
 arch/arm/boot/dts/am335x-igep0033.dtsi | 265 +
 1 file changed, 265 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-igep0033.dtsi

diff --git a/arch/arm/boot/dts/am335x-igep0033.dtsi 
b/arch/arm/boot/dts/am335x-igep0033.dtsi
new file mode 100644
index 000..06eba07
--- /dev/null
+++ b/arch/arm/boot/dts/am335x-igep0033.dtsi
@@ -0,0 +1,265 @@
+/*
+ * am335x-igep0033.dtsi - Device Tree file for IGEP COM AQUILA AM335x
+ *
+ * Copyright (C) 2013 ISEE 2007 SL - http://www.isee.biz
+ *
+ * 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 am33xx.dtsi
+
+/ {
+   cpus {
+   cpu@0 {
+   cpu0-supply = vdd1_reg;
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x8000 0x1000; /* 256 MB */
+   };
+
+   leds {
+   pinctrl-names = default;
+   pinctrl-0 = leds_pins;
+
+   compatible = gpio-leds;
+
+   led@0 {
+   label = com:green:user;
+   gpios = gpio1 23 GPIO_ACTIVE_HIGH;
+   default-state = on;
+   };
+   };
+
+   vbat: fixedregulator@0 {
+   compatible = regulator-fixed;
+   regulator-name = vbat;
+   regulator-min-microvolt = 500;
+   regulator-max-microvolt = 500;
+   regulator-boot-on;
+   };
+};
+
+am33xx_pinmux {
+   i2c0_pins: pinmux_i2c0_pins {
+   pinctrl-single,pins = 
+   0x188 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
i2c0_sda.i2c0_sda */
+   0x18c (PIN_INPUT_PULLUP | MUX_MODE0)/* 
i2c0_scl.i2c0_scl */
+   ;
+   };
+
+   nandflash_pins: pinmux_nandflash_pins {
+   pinctrl-single,pins = 
+   0x0 (PIN_INPUT_PULLUP | MUX_MODE0)  /* 
gpmc_ad0.gpmc_ad0 */
+   0x4 (PIN_INPUT_PULLUP | MUX_MODE0)  /* 
gpmc_ad1.gpmc_ad1 */
+   0x8 (PIN_INPUT_PULLUP | MUX_MODE0)  /* 
gpmc_ad2.gpmc_ad2 */
+   0xc (PIN_INPUT_PULLUP | MUX_MODE0)  /* 
gpmc_ad3.gpmc_ad3 */
+   0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_ad4.gpmc_ad4 */
+   0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_ad5.gpmc_ad5 */
+   0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_ad6.gpmc_ad6 */
+   0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_ad7.gpmc_ad7 */
+   0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_wait0.gpmc_wait0 */
+   0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* 
gpmc_wpn.gpio0_30 */
+   0x7c (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_csn0.gpmc_csn0 */
+   0x90 (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_advn_ale.gpmc_advn_ale */
+   0x94 (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_oen_ren.gpmc_oen_ren */
+   0x98 (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_wen.gpmc_wen */
+   0x9c (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_be0n_cle.gpmc_be0n_cle */
+   ;
+   };
+
+   uart0_pins: pinmux_uart0_pins {
+   pinctrl-single,pins = 
+   0x170 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
uart0_rxd.uart0_rxd */
+   0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* 
uart0_txd.uart0_txd */
+   ;
+   };
+
+   leds_pins: pinmux_leds_pins {
+   pinctrl-single,pins = 
+   0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* 
gpmc_a7.gpio1_23 */
+   ;
+   };
+};
+
+cpsw_emac0 {
+   phy_id = davinci_mdio, 0;
+};
+
+cpsw_emac1 {
+   phy_id = davinci_mdio, 1;
+};
+
+elm {
+   status = okay;
+};
+
+gpmc {
+   status = okay;
+   pinctrl-names = default;
+   pinctrl-0 = nandflash_pins;
+
+   ranges = 0 0 0x0800 0x1000;   /* CS0: NAND */
+
+   nand@0,0 {
+   reg = 0 0 0; /* CS0, offset 0 */
+   nand-bus-width = 8;
+   ti,nand-ecc-opt = bch8;
+   gpmc,device-nand = true;
+   gpmc,device-width = 1

[PATCHv3 0/2] ARM: dts: Add initial support for IGEP AQUILA

2013-09-10 Thread Enric Balletbo i Serra
From: Enric Balletbo i Serra eballe...@iseebcn.com

Hi all,

These two patches introduces initial support for the IGEP AM335x-based
platforms. The first patch add support for IGEP COM AQUILA products, and the
second patch add support for the development board.

These patches apply on top of bcousson/for_3.12/dts repository.

Changes since v2:
  * Make it compatible with isee,am335x-base0033, isee,am335x-igep0033,
ti,am33xx since these boards are manufactured by ISEE not TI. (Javier)
Changes since v1:
  * Use node to reference the nodes already defined in dtsi files. (Javier)

Best regards,

Enric Balletbo i Serra (2):
  ARM: dts: AM33XX: Add support for IGEP COM AQUILA
  ARM: dts: AM33XX: Add support for IGEP AQUILA EXPANSION board.

 arch/arm/boot/dts/Makefile |   1 +
 arch/arm/boot/dts/am335x-base0033.dts  |  16 ++
 arch/arm/boot/dts/am335x-igep0033.dtsi | 265 +
 3 files changed, 282 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-base0033.dts
 create mode 100644 arch/arm/boot/dts/am335x-igep0033.dtsi

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


[PATCH] ARM: dts: igep00x0: Add pinmux configuration for MCBSP2.

2013-09-10 Thread Enric Balletbo i Serra
Add pinmux configuration for MCBSP2 connected to the TDM interface. With
this configuration the Headset modules works as expected.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
Acked-by: Javier Martinez Canillas jav...@dowhile0.org
---
 arch/arm/boot/dts/omap3-igep.dtsi | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-igep.dtsi 
b/arch/arm/boot/dts/omap3-igep.dtsi
index bc48b11..2326d11 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -48,6 +48,15 @@
;
};
 
+   mcbsp2_pins: pinmux_mcbsp2_pins {
+   pinctrl-single,pins = 
+   0x10c (PIN_INPUT | MUX_MODE0)   /* 
mcbsp2_fsx.mcbsp2_fsx */
+   0x10e (PIN_INPUT | MUX_MODE0)   /* 
mcbsp2_clkx.mcbsp2_clkx */
+   0x110 (PIN_INPUT | MUX_MODE0)   /* 
mcbsp2_dr.mcbsp2.dr */
+   0x112 (PIN_OUTPUT | MUX_MODE0)  /* 
mcbsp2_dx.mcbsp2_dx */
+   ;
+   };
+
mmc1_pins: pinmux_mmc1_pins {
pinctrl-single,pins = 
0x114 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
sdmmc1_clk.sdmmc1_clk */
@@ -93,6 +102,11 @@
clock-frequency = 40;
 };
 
+mcbsp2 {
+   pinctrl-names = default;
+   pinctrl-0 = mcbsp2_pins;
+};
+
 mmc1 {
   pinctrl-names = default;
   pinctrl-0 = mmc1_pins;
-- 
1.8.1.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


[PATCH] ARM: dts: igep00x0: Add pinmux configuration for MCBSP2.

2013-07-05 Thread Enric Balletbo i Serra
IGEP Processor Boards based on OMAP3 have the MCBSP2 connected to the TDM
interface. The kernel should configure the pinmux for these pins in order
to get TWL4030 codec working. Without this, for example, playing a wav file
doesn't work.

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

diff --git a/arch/arm/boot/dts/omap3-igep.dtsi 
b/arch/arm/boot/dts/omap3-igep.dtsi
index bc48b11..2326d11 100644
--- a/arch/arm/boot/dts/omap3-igep.dtsi
+++ b/arch/arm/boot/dts/omap3-igep.dtsi
@@ -48,6 +48,15 @@
;
};
 
+   mcbsp2_pins: pinmux_mcbsp2_pins {
+   pinctrl-single,pins = 
+   0x10c (PIN_INPUT | MUX_MODE0)   /* 
mcbsp2_fsx.mcbsp2_fsx */
+   0x10e (PIN_INPUT | MUX_MODE0)   /* 
mcbsp2_clkx.mcbsp2_clkx */
+   0x110 (PIN_INPUT | MUX_MODE0)   /* 
mcbsp2_dr.mcbsp2.dr */
+   0x112 (PIN_OUTPUT | MUX_MODE0)  /* 
mcbsp2_dx.mcbsp2_dx */
+   ;
+   };
+
mmc1_pins: pinmux_mmc1_pins {
pinctrl-single,pins = 
0x114 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
sdmmc1_clk.sdmmc1_clk */
@@ -93,6 +102,11 @@
clock-frequency = 40;
 };
 
+mcbsp2 {
+   pinctrl-names = default;
+   pinctrl-0 = mcbsp2_pins;
+};
+
 mmc1 {
   pinctrl-names = default;
   pinctrl-0 = mmc1_pins;
-- 
1.8.1.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


[PATCHv2 0/2] ARM: dts: Add initial support for IGEP AQUILA

2013-06-20 Thread Enric Balletbo i Serra
Hi all,

These two patches introduces initial support for the IGEP AM335x-based
platforms. The first patch add support for IGEP COM AQUILA products, and the
second patch add support for the development board.

These patches apply on top of bcousson/for_3.11/dts repository.

Changes since v1:
  * Use node to reference the nodes already defined in dtsi files. (Javier)

Best regards,

Enric Balletbo i Serra (2):
  ARM: dts: AM33XX: Add support for IGEP COM AQUILA
  ARM: dts: AM33XX: Add support for IGEP AQUILA EXPANSION board.

 arch/arm/boot/dts/Makefile |   3 +-
 arch/arm/boot/dts/am335x-base0033.dts  |  17 +++
 arch/arm/boot/dts/am335x-igep0033.dtsi | 269 +
 3 files changed, 288 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/am335x-base0033.dts
 create mode 100644 arch/arm/boot/dts/am335x-igep0033.dtsi

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


[PATCHv2 1/2] ARM: dts: AM33XX: Add support for IGEP COM AQUILA

2013-06-20 Thread Enric Balletbo i Serra
The IGEP COM AQUILA is industrial processors SODIMM module with
following highlights:

   o AM3352/AM3354/AM3358/AM3359 Texas Instruments processor
   o Cortex-A8 ARM CPU
   o 3.3 volts Inputs / Outputs use industrial
   o 256 MB DDR3 SDRAM / 128 Megabytes FLASH
   o MicroSD card reader on-board
   o Ethernet controller on-board
   o JTAG debug connector available
   o Designed for industrial range purposes

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/am335x-igep0033.dtsi | 265 +
 1 file changed, 265 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-igep0033.dtsi

diff --git a/arch/arm/boot/dts/am335x-igep0033.dtsi 
b/arch/arm/boot/dts/am335x-igep0033.dtsi
new file mode 100644
index 000..06eba07
--- /dev/null
+++ b/arch/arm/boot/dts/am335x-igep0033.dtsi
@@ -0,0 +1,265 @@
+/*
+ * am335x-igep0033.dtsi - Device Tree file for IGEP COM AQUILA AM335x
+ *
+ * Copyright (C) 2013 ISEE 2007 SL - http://www.isee.biz
+ *
+ * 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 am33xx.dtsi
+
+/ {
+   cpus {
+   cpu@0 {
+   cpu0-supply = vdd1_reg;
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x8000 0x1000; /* 256 MB */
+   };
+
+   leds {
+   pinctrl-names = default;
+   pinctrl-0 = leds_pins;
+
+   compatible = gpio-leds;
+
+   led@0 {
+   label = com:green:user;
+   gpios = gpio1 23 GPIO_ACTIVE_HIGH;
+   default-state = on;
+   };
+   };
+
+   vbat: fixedregulator@0 {
+   compatible = regulator-fixed;
+   regulator-name = vbat;
+   regulator-min-microvolt = 500;
+   regulator-max-microvolt = 500;
+   regulator-boot-on;
+   };
+};
+
+am33xx_pinmux {
+   i2c0_pins: pinmux_i2c0_pins {
+   pinctrl-single,pins = 
+   0x188 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
i2c0_sda.i2c0_sda */
+   0x18c (PIN_INPUT_PULLUP | MUX_MODE0)/* 
i2c0_scl.i2c0_scl */
+   ;
+   };
+
+   nandflash_pins: pinmux_nandflash_pins {
+   pinctrl-single,pins = 
+   0x0 (PIN_INPUT_PULLUP | MUX_MODE0)  /* 
gpmc_ad0.gpmc_ad0 */
+   0x4 (PIN_INPUT_PULLUP | MUX_MODE0)  /* 
gpmc_ad1.gpmc_ad1 */
+   0x8 (PIN_INPUT_PULLUP | MUX_MODE0)  /* 
gpmc_ad2.gpmc_ad2 */
+   0xc (PIN_INPUT_PULLUP | MUX_MODE0)  /* 
gpmc_ad3.gpmc_ad3 */
+   0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_ad4.gpmc_ad4 */
+   0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_ad5.gpmc_ad5 */
+   0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_ad6.gpmc_ad6 */
+   0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_ad7.gpmc_ad7 */
+   0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_wait0.gpmc_wait0 */
+   0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* 
gpmc_wpn.gpio0_30 */
+   0x7c (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_csn0.gpmc_csn0 */
+   0x90 (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_advn_ale.gpmc_advn_ale */
+   0x94 (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_oen_ren.gpmc_oen_ren */
+   0x98 (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_wen.gpmc_wen */
+   0x9c (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_be0n_cle.gpmc_be0n_cle */
+   ;
+   };
+
+   uart0_pins: pinmux_uart0_pins {
+   pinctrl-single,pins = 
+   0x170 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
uart0_rxd.uart0_rxd */
+   0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* 
uart0_txd.uart0_txd */
+   ;
+   };
+
+   leds_pins: pinmux_leds_pins {
+   pinctrl-single,pins = 
+   0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* 
gpmc_a7.gpio1_23 */
+   ;
+   };
+};
+
+cpsw_emac0 {
+   phy_id = davinci_mdio, 0;
+};
+
+cpsw_emac1 {
+   phy_id = davinci_mdio, 1;
+};
+
+elm {
+   status = okay;
+};
+
+gpmc {
+   status = okay;
+   pinctrl-names = default;
+   pinctrl-0 = nandflash_pins;
+
+   ranges = 0 0 0x0800 0x1000;   /* CS0: NAND */
+
+   nand@0,0 {
+   reg = 0 0 0; /* CS0, offset 0 */
+   nand-bus-width = 8;
+   ti,nand-ecc-opt = bch8;
+   gpmc,device-nand = true;
+   gpmc,device-width = 1;
+   gpmc,sync-clk-ps = 0;
+   gpmc,cs-on-ns = 0

[PATCHv2 2/2] ARM: dts: AM33XX: Add support for IGEP AQUILA EXPANSION board.

2013-06-20 Thread Enric Balletbo i Serra
The IGEP AQUILA EXPANSION board is a development platform for the IGEP COM
AQUILA AM335x boards.

The board adds the following connectivity:

o USB OTG
o USB HOST
o HDMI
o Ethernet
o Serial Debug (3.3V)
o 2x46 pin headers
o EEPROM

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/Makefile|  1 +
 arch/arm/boot/dts/am335x-base0033.dts | 16 
 2 files changed, 17 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-base0033.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 8e50761..cb675d2 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -154,6 +154,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
am335x-evm.dtb \
am335x-evmsk.dtb \
am335x-bone.dtb \
+   am335x-base0033.dtb \
am3517-evm.dtb \
am3517_mt_ventoux.dtb
 dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
diff --git a/arch/arm/boot/dts/am335x-base0033.dts 
b/arch/arm/boot/dts/am335x-base0033.dts
new file mode 100644
index 000..d6bb791
--- /dev/null
+++ b/arch/arm/boot/dts/am335x-base0033.dts
@@ -0,0 +1,16 @@
+/*
+ * am335x-base0033.dtsi - Device Tree file for IGEP AQUILA EXPANSION
+ *
+ * Copyright (C) 2013 ISEE 2007 SL - http://www.isee.biz
+ *
+ * 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 am335x-igep0033.dtsi
+
+/ {
+   model = IGEP COM AM335x on AQUILA Expansion;
+   compatible = ti,am335x-base0033, ti,am335x-igep0033, ti,am33xx;
+};
-- 
1.8.1.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


[PATCH 0/2] ARM: dts: Add initial support for IGEP AQUILA

2013-06-19 Thread Enric Balletbo i Serra
Hi all,

These two patches introduces initial support for the IGEP AM335x-based
platforms. The first patch add support for IGEP COM AQUILA products, and the
second patch add support for the development board.

These patches apply on top of bcousson/for_3.11/dts repository.

Best regards,

Enric Balletbo i Serra (2):
  ARM: dts: AM33XX: Add support for IGEP COM AQUILA
  ARM: dts: AM33XX: Add support for IGEP AQUILA EXPANSION board.

 arch/arm/boot/dts/Makefile |   3 +-
 arch/arm/boot/dts/am335x-base0033.dts  |  17 +++
 arch/arm/boot/dts/am335x-igep0033.dtsi | 269 +
 3 files changed, 288 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/boot/dts/am335x-base0033.dts
 create mode 100644 arch/arm/boot/dts/am335x-igep0033.dtsi

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


[PATCH 2/2] ARM: dts: AM33XX: Add support for IGEP AQUILA EXPANSION board.

2013-06-19 Thread Enric Balletbo i Serra
The IGEP AQUILA EXPANSION board is a development platform for the IGEP COM
AQUILA AM335x boards.

The board adds the following connectivity:

o USB OTG
o USB HOST
o HDMI
o Ethernet
o Serial Debug (3.3V)
o 2x46 pin headers
o EEPROM

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/Makefile|  1 +
 arch/arm/boot/dts/am335x-base0033.dts | 17 +
 2 files changed, 18 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-base0033.dts

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 8e50761..cb675d2 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -154,6 +154,7 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \
am335x-evm.dtb \
am335x-evmsk.dtb \
am335x-bone.dtb \
+   am335x-base0033.dtb \
am3517-evm.dtb \
am3517_mt_ventoux.dtb
 dtb-$(CONFIG_ARCH_ORION5X) += orion5x-lacie-ethernet-disk-mini-v2.dtb
diff --git a/arch/arm/boot/dts/am335x-base0033.dts 
b/arch/arm/boot/dts/am335x-base0033.dts
new file mode 100644
index 000..a365f11
--- /dev/null
+++ b/arch/arm/boot/dts/am335x-base0033.dts
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2013 ISEE 2007 SL - http://www.isee.biz/
+ *
+ * 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.
+ *
+ * IGEP AQUILA Expansion Board.
+ * 
+ */
+
+#include am335x-igep0033.dtsi
+
+/ {
+   model = IGEP COM AM335x on AQUILA Expansion;
+   compatible = ti,am335x-base0033, ti,am335x-igep0033, ti,am33xx;
+};
-- 
1.8.1.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


[PATCH 1/2] ARM: dts: AM33XX: Add support for IGEP COM AQUILA

2013-06-19 Thread Enric Balletbo i Serra
The IGEP COM AQUILA is industrial processors SODIMM module with
following highlights:

   o AM3352/AM3354/AM3358/AM3359 Texas Instruments processor
   o Cortex-A8 ARM CPU
   o 3.3 volts Inputs / Outputs use industrial
   o 256 MB DDR3 SDRAM / 128 Megabytes FLASH
   o MicroSD card reader on-board
   o Ethernet controller on-board
   o JTAG debug connector available
   o Designed for industrial range purposes

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 arch/arm/boot/dts/am335x-igep0033.dtsi | 269 +
 1 file changed, 269 insertions(+)
 create mode 100644 arch/arm/boot/dts/am335x-igep0033.dtsi

diff --git a/arch/arm/boot/dts/am335x-igep0033.dtsi 
b/arch/arm/boot/dts/am335x-igep0033.dtsi
new file mode 100644
index 000..1d70141
--- /dev/null
+++ b/arch/arm/boot/dts/am335x-igep0033.dtsi
@@ -0,0 +1,269 @@
+/*
+ * Copyright (C) 2013 ISEE 2007 SL - http://www.isee.biz/
+ *
+ * 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 am33xx.dtsi
+
+/ {
+   cpus {
+   cpu@0 {
+   cpu0-supply = vdd1_reg;
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x8000 0x1000; /* 256 MB */
+   };
+
+   am33xx_pinmux: pinmux@44e10800 {
+   pinctrl-names = default;
+
+   i2c0_pins: pinmux_i2c0_pins {
+   pinctrl-single,pins = 
+   0x188 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
i2c0_sda.i2c0_sda */
+   0x18c (PIN_INPUT_PULLUP | MUX_MODE0)/* 
i2c0_scl.i2c0_scl */
+   ;
+   };
+
+   nandflash_pins: pinmux_nandflash_pins {
+   pinctrl-single,pins = 
+   0x0 (PIN_INPUT_PULLUP | MUX_MODE0)  /* 
gpmc_ad0.gpmc_ad0 */
+   0x4 (PIN_INPUT_PULLUP | MUX_MODE0)  /* 
gpmc_ad1.gpmc_ad1 */
+   0x8 (PIN_INPUT_PULLUP | MUX_MODE0)  /* 
gpmc_ad2.gpmc_ad2 */
+   0xc (PIN_INPUT_PULLUP | MUX_MODE0)  /* 
gpmc_ad3.gpmc_ad3 */
+   0x10 (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_ad4.gpmc_ad4 */
+   0x14 (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_ad5.gpmc_ad5 */
+   0x18 (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_ad6.gpmc_ad6 */
+   0x1c (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_ad7.gpmc_ad7 */
+   0x70 (PIN_INPUT_PULLUP | MUX_MODE0) /* 
gpmc_wait0.gpmc_wait0 */
+   0x74 (PIN_INPUT_PULLUP | MUX_MODE7) /* 
gpmc_wpn.gpio0_30 */
+   0x7c (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_csn0.gpmc_csn0  */
+   0x90 (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_advn_ale.gpmc_advn_ale */
+   0x94 (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_oen_ren.gpmc_oen_ren */
+   0x98 (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_wen.gpmc_wen */
+   0x9c (PIN_OUTPUT | MUX_MODE0)   /* 
gpmc_be0n_cle.gpmc_be0n_cle */
+   ;
+   };
+
+   uart0_pins: pinmux_uart0_pins {
+   pinctrl-single,pins = 
+   0x170 (PIN_INPUT_PULLUP | MUX_MODE0)/* 
uart0_rxd.uart0_rxd */
+   0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* 
uart0_txd.uart0_txd */
+   ;
+   };
+
+   user_leds: pinmux_user_leds_pins {
+   pinctrl-single,pins = 
+   0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* 
gpmc_a7.gpio1_23 */
+   ;
+   };
+ 
+   };
+
+   ocp {
+   uart0: serial@44e09000 {
+   pinctrl-names = default;
+   pinctrl-0 = uart0_pins;
+   status = okay;
+   };
+
+   i2c0: i2c@44e0b000 {
+   pinctrl-names = default;
+   pinctrl-0 = i2c0_pins;
+
+   status = okay;
+   clock-frequency = 40;
+
+   tps: tps@2d {
+   reg = 0x2d;
+   };
+   };
+
+   elm: elm@4808 {
+   status = okay;
+   };
+
+   gpmc: gpmc@5000 {
+   pinctrl-names = default;
+   pinctrl-0 = nandflash_pins;
+
+   status = okay;
+   ranges = 0 0 0x0800 0x1000;   /* CS0: NAND

[PATCH] serial: omap: add the functionality of a 9-bit UART with userspaces CMSPAR

2012-12-06 Thread Enric Balletbo i Serra
From: Enric Balletbo i Serra eballe...@iseebcn.com

Some systems require the additional communication functionality of a
9-bit UART. For that we could use the stick (mark/space) parity
bit supported on omap serial device. When is set, if PARODD is set the
parity bit is always 1; if PARODD is not set, then the parity bit is
always 0.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 drivers/tty/serial/omap-serial.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 6d3d26a..197fb71 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -756,6 +756,8 @@ serial_omap_set_termios(struct uart_port *port, struct 
ktermios *termios,
cval |= UART_LCR_PARITY;
if (!(termios-c_cflag  PARODD))
cval |= UART_LCR_EPAR;
+   if (termios-c_cflag  CMSPAR)
+   cval |= UART_LCR_SPAR;
 
/*
 * Ask the core to calculate the divisor for us.
-- 
1.7.10.4

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


[PATCHv2 0/2] OMAP: DSS: Support new dpi panels

2011-05-03 Thread Enric Balletbo i Serra
Hi all,

These patches add support for two new panels to the generic-dpi-panel.

The first patch adds support for the Seiko 70WVW1TZ3 LCD panel, and the second
adds support for the Powertip PH480272T LCD panel.

Tested with an IGEP v2 board.

Changes since v1:
  - Change the names of both panels in the panel_config struct to
include the name of the manufacturer.
  - Mention the board which uses those panels.

Please consider to add in next merge window, thanks,

Enric Balletbo i Serra (2):
  OMAP: DSS2: Support for Seiko 70WVW1TZ3
  OMAP: DSS2: Support for Powertip PH480272T

 drivers/video/omap2/displays/panel-generic-dpi.c |   50 ++
 1 files changed, 50 insertions(+), 0 deletions(-)

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


[PATCHv2 1/2] OMAP: DSS2: Support for Seiko 70WVW1TZ3

2011-05-03 Thread Enric Balletbo i Serra
Add support for Seiko 70WVW1TZ3, a LCD 7.0inch WVGA (800x480) display
type with 24-bit RGB interface and Touch-Panel, to panel-generic-dpi

Tested with IGEP v2 board.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 drivers/video/omap2/displays/panel-generic-dpi.c |   25 ++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c 
b/drivers/video/omap2/displays/panel-generic-dpi.c
index 4a9b9ff..644d370 100644
--- a/drivers/video/omap2/displays/panel-generic-dpi.c
+++ b/drivers/video/omap2/displays/panel-generic-dpi.c
@@ -181,6 +181,31 @@ static struct panel_config generic_dpi_panels[] = {
.power_off_delay= 0,
.name   = samsung_lte430wq_f0c,
},
+
+   /* Seiko 70WVW1TZ3Z3 */
+   {
+   {
+   .x_res  = 800,
+   .y_res  = 480,
+
+   .pixel_clock= 33000,
+
+   .hsw= 128,
+   .hfp= 10,
+   .hbp= 10,
+
+   .vsw= 2,
+   .vfp= 4,
+   .vbp= 11,
+   },
+   .acbi   = 0x0,
+   .acb= 0x0,
+   .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
+   OMAP_DSS_LCD_IHS,
+   .power_on_delay = 0,
+   .power_off_delay= 0,
+   .name   = seiko_70wvw1tz3,
+   },
 };
 
 struct panel_drv_data {
-- 
1.7.0.4

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


[PATCHv2 2/2] OMAP: DSS2: Support for Powertip PH480272T

2011-05-03 Thread Enric Balletbo i Serra
Add support for Powertip PH480242T, a LCD 4.3inch (480x242) display
type with 24-bit RGB interface, to panel-generic-dpi.

Tested with IGEP v2 board.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 drivers/video/omap2/displays/panel-generic-dpi.c |   25 ++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c 
b/drivers/video/omap2/displays/panel-generic-dpi.c
index 644d370..416e645 100644
--- a/drivers/video/omap2/displays/panel-generic-dpi.c
+++ b/drivers/video/omap2/displays/panel-generic-dpi.c
@@ -206,6 +206,31 @@ static struct panel_config generic_dpi_panels[] = {
.power_off_delay= 0,
.name   = seiko_70wvw1tz3,
},
+
+   /* Powertip PH480272T */
+   {
+   {
+   .x_res  = 480,
+   .y_res  = 272,
+
+   .pixel_clock= 9000,
+
+   .hsw= 40,
+   .hfp= 2,
+   .hbp= 2,
+
+   .vsw= 10,
+   .vfp= 2,
+   .vbp= 2,
+   },
+   .acbi   = 0x0,
+   .acb= 0x0,
+   .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
+ OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO,
+   .power_on_delay = 0,
+   .power_off_delay= 0,
+   .name   = powertip_ph480272t,
+   },
 };
 
 struct panel_drv_data {
-- 
1.7.0.4

--
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/2] OMAP: DSS: Support new dpi panels

2011-05-02 Thread Enric Balletbo i Serra
Hi all,

These patches add support for two new panels to the generic-dpi-panel.

The first patch adds support for the Seiko 70WVW1TZ3 LCD panel, and the second
adds support for the Powertip PH480272T LCD panel.

Tested with an IGEP v2 board.

Please consider to add in next merge window, thanks,

Enric Balletbo i Serra (2):
  OMAP: DSS2: Support for Seiko 70WVW1TZ3
  OMAP: DSS2: Support for Powertip PH480272T

 drivers/video/omap2/displays/panel-generic-dpi.c |   50 ++
 1 files changed, 50 insertions(+), 0 deletions(-)

--
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] OMAP: DSS2: Support for Seiko 70WVW1TZ3

2011-05-02 Thread Enric Balletbo i Serra
Add support for Seiko 70WVW1TZ3, a LCD 7.0inch WVGA (800x480) display
type with 24-bit RGB interface and Touch-Panel, to panel-generic-dpi.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 drivers/video/omap2/displays/panel-generic-dpi.c |   25 ++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c 
b/drivers/video/omap2/displays/panel-generic-dpi.c
index 4a9b9ff..e8819ee 100644
--- a/drivers/video/omap2/displays/panel-generic-dpi.c
+++ b/drivers/video/omap2/displays/panel-generic-dpi.c
@@ -181,6 +181,31 @@ static struct panel_config generic_dpi_panels[] = {
.power_off_delay= 0,
.name   = samsung_lte430wq_f0c,
},
+
+   /* Seiko 70WVW1TZ3Z3 */
+   {
+   {
+   .x_res  = 800,
+   .y_res  = 480,
+
+   .pixel_clock= 33000,
+
+   .hsw= 128,
+   .hfp= 10,
+   .hbp= 10,
+
+   .vsw= 2,
+   .vfp= 4,
+   .vbp= 11,
+   },
+   .acbi   = 0x0,
+   .acb= 0x0,
+   .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
+   OMAP_DSS_LCD_IHS,
+   .power_on_delay = 0,
+   .power_off_delay= 0,
+   .name   = 70wvw1tz3,
+   },
 };
 
 struct panel_drv_data {
-- 
1.7.0.4

--
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] OMAP: DSS2: Support for Powertip PH480272T

2011-05-02 Thread Enric Balletbo i Serra
Add support for Powertip PH480242T, a LCD 4.3inch (480x242) display
type with 24-bit RGB interface, to panel-generic-dpi.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 drivers/video/omap2/displays/panel-generic-dpi.c |   25 ++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c 
b/drivers/video/omap2/displays/panel-generic-dpi.c
index e8819ee..3250a85 100644
--- a/drivers/video/omap2/displays/panel-generic-dpi.c
+++ b/drivers/video/omap2/displays/panel-generic-dpi.c
@@ -206,6 +206,31 @@ static struct panel_config generic_dpi_panels[] = {
.power_off_delay= 0,
.name   = 70wvw1tz3,
},
+
+   /* Powertip PH480272T */
+   {
+   {
+   .x_res  = 480,
+   .y_res  = 272,
+
+   .pixel_clock= 9000,
+
+   .hsw= 40,
+   .hfp= 2,
+   .hbp= 2,
+
+   .vsw= 10,
+   .vfp= 2,
+   .vbp= 2,
+   },
+   .acbi   = 0x0,
+   .acb= 0x0,
+   .config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
+ OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO,
+   .power_on_delay = 0,
+   .power_off_delay= 0,
+   .name   = ph480272t,
+   },
 };
 
 struct panel_drv_data {
-- 
1.7.0.4

--
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] omap3: igep3: Add omap_reserve functionality

2011-01-11 Thread Enric Balletbo i Serra
This patch adds omap_reserve functionality to board-igep0030.c.

This patch is in similar lines to commit id 71ee7dad9b6991, from
Russell king

Cc: Russell King rmk+ker...@arm.linux.org.uk
Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0030.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0030.c 
b/arch/arm/mach-omap2/board-igep0030.c
index 11b944f..4dc62a9 100644
--- a/arch/arm/mach-omap2/board-igep0030.c
+++ b/arch/arm/mach-omap2/board-igep0030.c
@@ -450,6 +450,7 @@ static void __init igep3_init(void)
 
 MACHINE_START(IGEP0030, IGEP OMAP3 module)
.boot_params= 0x8100,
+   .reserve= omap_reserve,
.map_io = omap3_map_io,
.init_irq   = igep3_init_irq,
.init_machine   = igep3_init,
-- 
1.7.0.4

--
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] IGEP board changes for .38 merge window

2011-01-10 Thread Enric Balletbo i Serra
Hi Tony,

Here's a new patches for IGEP boards. These patches are rebased on top of your 
for-next tree. Please consider adding for .38 merge window. Thanks.

Cheers,

Enric Balletbo i Serra (3):
  omap3: igep3: Add USB EHCI support for IGEP module.
  omap3: igep3: Fix IGEP module second MMC channel power supply.
  omap3: igep2: Add keypad support.

 arch/arm/mach-omap2/board-igep0020.c |   33 ++
 arch/arm/mach-omap2/board-igep0030.c |   80 +-
 2 files changed, 102 insertions(+), 11 deletions(-)

--
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] omap3: igep3: Add USB EHCI support for IGEP module.

2011-01-10 Thread Enric Balletbo i Serra
The OMAP3 IGEP module has one EHCI interface on board using
USB2HS port. GPIO183 is used as PHY reset.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0030.c |   15 ++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0030.c 
b/arch/arm/mach-omap2/board-igep0030.c
index c88e8f7..f0a85c1 100644
--- a/arch/arm/mach-omap2/board-igep0030.c
+++ b/arch/arm/mach-omap2/board-igep0030.c
@@ -43,7 +43,7 @@
 #define IGEP3_GPIO_WIFI_NRESET 139
 #define IGEP3_GPIO_BT_NRESET   137
 
-#define IGEP3_GPIO_USBH_NRESET  115
+#define IGEP3_GPIO_USBH_NRESET  183
 
 
 #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
@@ -363,8 +363,20 @@ static void __init igep3_wifi_bt_init(void)
 void __init igep3_wifi_bt_init(void) {}
 #endif
 
+static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
+   .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+   .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
+   .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
+
+   .phy_reset = true,
+   .reset_gpio_port[0] = -EINVAL,
+   .reset_gpio_port[1] = IGEP3_GPIO_USBH_NRESET,
+   .reset_gpio_port[2] = -EINVAL,
+};
+
 #ifdef CONFIG_OMAP_MUX
 static struct omap_board_mux board_mux[] __initdata = {
+   OMAP3_MUX(I2C2_SDA, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
{ .reg_offset = OMAP_MUX_TERMINATOR },
 };
 #endif
@@ -378,6 +390,7 @@ static void __init igep3_init(void)
 
omap_serial_init();
usb_musb_init(musb_board_data);
+   usb_ehci_init(ehci_pdata);
 
igep3_flash_init();
igep3_leds_init();
-- 
1.7.0.4

--
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] omap3: igep3: Fix IGEP module second MMC channel power supply.

2011-01-10 Thread Enric Balletbo i Serra
The second MMC channel (used by the WLAN/BT module) is not linked to
power regulator. This causes the WLAN/BT module to fail being detected if
CONFIG_REGULATOR_DUMMY is not set.

This patch adds the two regulators that actually feed the WLAN/BT module
(1v8 from the TWL4030 VIO LDO, and a fixed 3v3). With that patch, the
second channel is properly detected.

Also change vmmc1 to use symbolic names instead of direct device
reference.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0030.c |   65 -
 1 files changed, 55 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0030.c 
b/arch/arm/mach-omap2/board-igep0030.c
index f0a85c1..8ddd45c 100644
--- a/arch/arm/mach-omap2/board-igep0030.c
+++ b/arch/arm/mach-omap2/board-igep0030.c
@@ -19,6 +19,7 @@
 #include linux/interrupt.h
 
 #include linux/regulator/machine.h
+#include linux/regulator/fixed.h
 #include linux/i2c/twl.h
 #include linux/mmc/host.h
 
@@ -140,9 +141,8 @@ static void __init igep3_flash_init(void)
 static void __init igep3_flash_init(void) {}
 #endif
 
-static struct regulator_consumer_supply igep3_vmmc1_supply = {
-   .supply = vmmc,
-};
+static struct regulator_consumer_supply igep3_vmmc1_supply =
+   REGULATOR_SUPPLY(vmmc, mmci-omap-hs.0);
 
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
 static struct regulator_init_data igep3_vmmc1 = {
@@ -159,6 +159,52 @@ static struct regulator_init_data igep3_vmmc1 = {
.consumer_supplies  = igep3_vmmc1_supply,
 };
 
+static struct regulator_consumer_supply igep3_vio_supply =
+   REGULATOR_SUPPLY(vmmc_aux, mmci-omap-hs.1);
+
+static struct regulator_init_data igep3_vio = {
+   .constraints = {
+   .min_uV = 180,
+   .max_uV = 180,
+   .apply_uV   = 1,
+   .valid_modes_mask   = REGULATOR_MODE_NORMAL
+   | REGULATOR_MODE_STANDBY,
+   .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
+   | REGULATOR_CHANGE_MODE
+   | REGULATOR_CHANGE_STATUS,
+   },
+   .num_consumer_supplies  = 1,
+   .consumer_supplies  = igep3_vio_supply,
+};
+
+static struct regulator_consumer_supply igep3_vmmc2_supply =
+   REGULATOR_SUPPLY(vmmc, mmci-omap-hs.1);
+
+static struct regulator_init_data igep3_vmmc2 = {
+   .constraints= {
+   .valid_modes_mask   = REGULATOR_MODE_NORMAL,
+   .always_on  = 1,
+   },
+   .num_consumer_supplies  = 1,
+   .consumer_supplies  = igep3_vmmc2_supply,
+};
+
+static struct fixed_voltage_config igep3_vwlan = {
+   .supply_name= vwlan,
+   .microvolts = 330,
+   .gpio   = -EINVAL,
+   .enabled_at_boot= 1,
+   .init_data  = igep3_vmmc2,
+};
+
+static struct platform_device igep3_vwlan_device = {
+   .name   = reg-fixed-voltage,
+   .id = 0,
+   .dev= {
+   .platform_data = igep3_vwlan,
+   },
+};
+
 static struct omap2_hsmmc_info mmc[] = {
[0] = {
.mmc= 1,
@@ -254,12 +300,6 @@ static int igep3_twl4030_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc);
 
-   /*
-* link regulators to MMC adapters ... we know the
-* regulators will be set up only *after* we return.
-*/
-   igep3_vmmc1_supply.dev = mmc[0].dev;
-
/* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
 #if !defined(CONFIG_LEDS_GPIO)  !defined(CONFIG_LEDS_GPIO_MODULE)
if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, gpio-led:green:d1) == 0)
@@ -287,6 +327,10 @@ static struct twl4030_usb_data igep3_twl4030_usb_data = {
.usb_mode   = T2_USB_MODE_ULPI,
 };
 
+static struct platform_device *igep3_devices[] __initdata = {
+   igep3_vwlan_device,
+};
+
 static void __init igep3_init_irq(void)
 {
omap2_init_common_infrastructure();
@@ -303,6 +347,7 @@ static struct twl4030_platform_data igep3_twl4030_pdata = {
.usb= igep3_twl4030_usb_data,
.gpio   = igep3_twl4030_gpio_pdata,
.vmmc1  = igep3_vmmc1,
+   .vio= igep3_vio,
 };
 
 static struct i2c_board_info __initdata igep3_i2c_boardinfo[] = {
@@ -387,7 +432,7 @@ static void __init igep3_init(void)
 
/* Register I2C busses and drivers */
igep3_i2c_init();
-
+   platform_add_devices(igep3_devices, ARRAY_SIZE(igep3_devices));
omap_serial_init();
usb_musb_init(musb_board_data);
usb_ehci_init(ehci_pdata);
-- 
1.7.0.4

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

[PATCH 3/3] omap3: igep2: Add keypad support.

2011-01-10 Thread Enric Balletbo i Serra
Support twl4030 keypad and gpio keys on IGEP v2.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   33 +
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 0afa301..3a6cce5 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -17,6 +17,7 @@
 #include linux/io.h
 #include linux/gpio.h
 #include linux/interrupt.h
+#include linux/input.h
 
 #include linux/regulator/machine.h
 #include linux/regulator/fixed.h
@@ -535,6 +536,37 @@ static struct twl4030_codec_data igep2_codec_data = {
.audio = igep2_audio_data,
 };
 
+static int igep2_keymap[] = {
+   KEY(0, 0, KEY_LEFT),
+   KEY(0, 1, KEY_RIGHT),
+   KEY(0, 2, KEY_A),
+   KEY(0, 3, KEY_B),
+   KEY(1, 0, KEY_DOWN),
+   KEY(1, 1, KEY_UP),
+   KEY(1, 2, KEY_E),
+   KEY(1, 3, KEY_F),
+   KEY(2, 0, KEY_ENTER),
+   KEY(2, 1, KEY_I),
+   KEY(2, 2, KEY_J),
+   KEY(2, 3, KEY_K),
+   KEY(3, 0, KEY_M),
+   KEY(3, 1, KEY_N),
+   KEY(3, 2, KEY_O),
+   KEY(3, 3, KEY_P)
+};
+
+static struct matrix_keymap_data igep2_keymap_data = {
+   .keymap = igep2_keymap,
+   .keymap_size= ARRAY_SIZE(igep2_keymap),
+};
+
+static struct twl4030_keypad_data igep2_keypad_pdata = {
+   .keymap_data= igep2_keymap_data,
+   .rows   = 4,
+   .cols   = 4,
+   .rep= 1,
+};
+
 static struct twl4030_platform_data igep2_twldata = {
.irq_base   = TWL4030_IRQ_BASE,
.irq_end= TWL4030_IRQ_END,
@@ -543,6 +575,7 @@ static struct twl4030_platform_data igep2_twldata = {
.usb= igep2_usb_data,
.codec  = igep2_codec_data,
.gpio   = igep2_twl4030_gpio_pdata,
+   .keypad = igep2_keypad_pdata,
.vmmc1  = igep2_vmmc1,
.vpll2  = igep2_vpll2,
.vio= igep2_vio,
-- 
1.7.0.4

--
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/2] OMAP: DSS2: Add new display panel

2010-10-28 Thread Enric Balletbo i Serra
Hi,

Next patches adds support for the two new LCD panel display used
on IGEP boards.

 Powertip PH480272T LCD 4.3inch (480x242) display
 Seiko 70WVW1TZ3 LCD 7.0inch WVGA (800x480) display

Please, consider adding in next merge window.

Cheers,

Enric Balletbo i Serra (2):
  OMAP: DSS2: Add Powertip PH480272T display panel
  OMAP: DSS2: Add Seiko 70WVW1TZ3 display panel

 drivers/video/omap2/displays/Kconfig   |   14 ++
 drivers/video/omap2/displays/Makefile  |2 +
 .../omap2/displays/panel-powertip-ph480272t.c  |  155 +++
 .../video/omap2/displays/panel-seiko-70wvw1tz3.c   |  157 
 4 files changed, 328 insertions(+), 0 deletions(-)
 create mode 100644 drivers/video/omap2/displays/panel-powertip-ph480272t.c
 create mode 100644 drivers/video/omap2/displays/panel-seiko-70wvw1tz3.c

--
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] OMAP: DSS2: Add Powertip PH480272T display panel

2010-10-28 Thread Enric Balletbo i Serra
From: Enric Balletbo i Serra eballe...@iseebcn.com

Add new Powertip PH480242T panel, a LCD 4.3inch (480x242) display
type with 24-bit RGB interface.

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 drivers/video/omap2/displays/Kconfig   |7 +
 drivers/video/omap2/displays/Makefile  |1 +
 .../omap2/displays/panel-powertip-ph480272t.c  |  155 
 3 files changed, 163 insertions(+), 0 deletions(-)
 create mode 100644 drivers/video/omap2/displays/panel-powertip-ph480272t.c

diff --git a/drivers/video/omap2/displays/Kconfig 
b/drivers/video/omap2/displays/Kconfig
index 12327bb..c3aa478 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -44,4 +44,11 @@ config PANEL_ACX565AKM
select BACKLIGHT_CLASS_DEVICE
help
  This is the LCD panel used on Nokia N900
+
+config PANEL_POWERTIP_PH480272T
+   tristate Powertip PH480272T LCD Panel
+   depends on OMAP2_DSS
+   select BACKLIGHT_CLASS_DEVICE
+help
+  LCD Panel used in IGEP boards.
 endmenu
diff --git a/drivers/video/omap2/displays/Makefile 
b/drivers/video/omap2/displays/Makefile
index aa38609..3967dbc 100644
--- a/drivers/video/omap2/displays/Makefile
+++ b/drivers/video/omap2/displays/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_PANEL_TAAL) += panel-taal.o
 obj-$(CONFIG_PANEL_TOPPOLY_TDO35S) += panel-toppoly-tdo35s.o
 obj-$(CONFIG_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o
 obj-$(CONFIG_PANEL_ACX565AKM) += panel-acx565akm.o
+obj-$(CONFIG_PANEL_POWERTIP_PH480272T) += panel-powertip-ph480272t.o
diff --git a/drivers/video/omap2/displays/panel-powertip-ph480272t.c 
b/drivers/video/omap2/displays/panel-powertip-ph480272t.c
new file mode 100644
index 000..d303180
--- /dev/null
+++ b/drivers/video/omap2/displays/panel-powertip-ph480272t.c
@@ -0,0 +1,155 @@
+/*
+ * LCD panel driver for Powertip PH480272T
+ *
+ * Copyright (C) 2010, ISEE 2007 SL
+ * Author: Enric Balletbo i Serra eballe...@iseebcn.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.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see http://www.gnu.org/licenses/.
+ */
+
+#include linux/module.h
+#include linux/delay.h
+#include linux/device.h
+#include linux/err.h
+
+#include plat/display.h
+
+static struct omap_video_timings ph480272t_timings = {
+   .x_res  = 480,
+   .y_res  = 272,
+   .pixel_clock= 9000,
+   .hsw= 40,
+   .hfp= 2,
+   .hbp= 2,
+   .vsw= 10,
+   .vfp= 2,
+   .vbp= 2,
+};
+
+static int ph480272t_power_on(struct omap_dss_device *dssdev)
+{
+   int r;
+
+   r = omapdss_dpi_display_enable(dssdev);
+   if (r)
+   goto err0;
+
+   /* wait couple of vsyncs until enabling the LCD */
+   msleep(50);
+
+   if (dssdev-platform_enable) {
+   r = dssdev-platform_enable(dssdev);
+   if (r)
+   goto err1;
+   }
+
+   return 0;
+err1:
+   omapdss_dpi_display_disable(dssdev);
+err0:
+   return r;
+}
+
+static void ph480272t_power_off(struct omap_dss_device *dssdev)
+{
+   if (dssdev-platform_disable)
+   dssdev-platform_disable(dssdev);
+
+   /* wait at least 5 vsyncs after disabling the LCD */
+   msleep(100);
+
+   omapdss_dpi_display_disable(dssdev);
+}
+
+static int ph480272t_probe(struct omap_dss_device *dssdev)
+{
+
+   dssdev-panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
+   OMAP_DSS_LCD_IHS | OMAP_DSS_LCD_IEO;
+
+   dssdev-panel.acb = 0x0;
+   dssdev-panel.timings = ph480272t_timings;
+
+   return 0;
+}
+
+static void ph480272t_remove(struct omap_dss_device *dssdev)
+{
+}
+
+static int ph480272t_enable(struct omap_dss_device *dssdev)
+{
+   int r = 0;
+
+   r = ph480272t_power_on(dssdev);
+   if (r)
+   return r;
+
+   dssdev-state = OMAP_DSS_DISPLAY_ACTIVE;
+
+   return 0;
+}
+
+static void ph480272t_disable(struct omap_dss_device *dssdev)
+{
+   ph480272t_power_off(dssdev);
+
+   dssdev-state = OMAP_DSS_DISPLAY_DISABLED;
+}
+
+static int ph480272t_suspend(struct omap_dss_device *dssdev)
+{
+   ph480272t_power_off(dssdev);
+   dssdev-state = OMAP_DSS_DISPLAY_SUSPENDED;
+   return 0;
+}
+
+static int ph480272t_resume(struct omap_dss_device *dssdev)
+{
+   int r = 0;
+
+   r = ph480272t_power_on(dssdev);
+   if (r

[PATCH 2/2] OMAP: DSS2: Add Seiko 70WVW1TZ3 display panel

2010-10-28 Thread Enric Balletbo i Serra
From: Enric Balletbo i Serra eballe...@iseebcn.com

Add new Seiko 70WVW1TZ3, a LCD 7.0inch WVGA (800x480) display
type with 24-bit RGB interface and Touch-Panel

Signed-off-by: Enric Balletbo i Serra eballe...@iseebcn.com
---
 drivers/video/omap2/displays/Kconfig   |7 +
 drivers/video/omap2/displays/Makefile  |1 +
 .../video/omap2/displays/panel-seiko-70wvw1tz3.c   |  157 
 3 files changed, 165 insertions(+), 0 deletions(-)
 create mode 100644 drivers/video/omap2/displays/panel-seiko-70wvw1tz3.c

diff --git a/drivers/video/omap2/displays/Kconfig 
b/drivers/video/omap2/displays/Kconfig
index c3aa478..d8e580b 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -51,4 +51,11 @@ config PANEL_POWERTIP_PH480272T
select BACKLIGHT_CLASS_DEVICE
 help
   LCD Panel used in IGEP boards.
+
+config PANEL_SEIKO_70WVW1TZ3
+   tristate Seiko 70WVW1TZ3 LCD Panel
+   depends on OMAP2_DSS
+   select BACKLIGHT_CLASS_DEVICE
+help
+  7.0 inch LCD Panel used in IGEP boards.
 endmenu
diff --git a/drivers/video/omap2/displays/Makefile 
b/drivers/video/omap2/displays/Makefile
index 3967dbc..75e888e 100644
--- a/drivers/video/omap2/displays/Makefile
+++ b/drivers/video/omap2/displays/Makefile
@@ -7,3 +7,4 @@ obj-$(CONFIG_PANEL_TOPPOLY_TDO35S) += panel-toppoly-tdo35s.o
 obj-$(CONFIG_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o
 obj-$(CONFIG_PANEL_ACX565AKM) += panel-acx565akm.o
 obj-$(CONFIG_PANEL_POWERTIP_PH480272T) += panel-powertip-ph480272t.o
+obj-$(CONFIG_PANEL_SEIKO_70WVW1TZ3) += panel-seiko-70wvw1tz3.o
diff --git a/drivers/video/omap2/displays/panel-seiko-70wvw1tz3.c 
b/drivers/video/omap2/displays/panel-seiko-70wvw1tz3.c
new file mode 100644
index 000..0083d54
--- /dev/null
+++ b/drivers/video/omap2/displays/panel-seiko-70wvw1tz3.c
@@ -0,0 +1,157 @@
+/*
+ * LCD panel driver for Seiko 70wvw1tz3Z3
+ *
+ * Copyright (C) 2010, ISEE 2007 SL
+ * Author: Enric Balletbo i Serra eballe...@iseebcn.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.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see http://www.gnu.org/licenses/.
+ */
+
+#include linux/module.h
+#include linux/delay.h
+#include linux/device.h
+#include linux/err.h
+
+#include plat/display.h
+
+static struct omap_video_timings s70wvw1tz3_timings = {
+   .x_res = 800,
+   .y_res = 480,
+   .pixel_clock= 33000,
+   .hsw= 128,
+   .hfp= 10,
+   .hbp= 10,
+   .vsw= 2,
+   .vfp= 4,
+   .vbp= 11,
+};
+
+static int s70wvw1tz3_panel_power_on(struct omap_dss_device *dssdev)
+{
+   int r;
+
+   r = omapdss_dpi_display_enable(dssdev);
+   if (r)
+   goto err0;
+
+   /* wait couple of vsyncs until enabling the LCD */
+   msleep(50);
+
+   if (dssdev-platform_enable) {
+   r = dssdev-platform_enable(dssdev);
+   if (r)
+   goto err1;
+   }
+
+   return 0;
+err1:
+   omapdss_dpi_display_disable(dssdev);
+err0:
+   return r;
+}
+
+static void s70wvw1tz3_panel_power_off(struct omap_dss_device *dssdev)
+{
+   if (dssdev-platform_disable)
+   dssdev-platform_disable(dssdev);
+
+   /* wait at least 5 vsyncs after disabling the LCD */
+   msleep(100);
+
+   omapdss_dpi_display_disable(dssdev);
+}
+
+static int s70wvw1tz3_panel_probe(struct omap_dss_device *dssdev)
+{
+   dssdev-panel.config = OMAP_DSS_LCD_TFT | OMAP_DSS_LCD_IVS |
+   OMAP_DSS_LCD_IHS;
+
+   dssdev-panel.acb = 0x0;
+   dssdev-panel.timings = s70wvw1tz3_timings;
+
+   return 0;
+}
+
+static void s70wvw1tz3_panel_remove(struct omap_dss_device *dssdev)
+{
+}
+
+static int s70wvw1tz3_panel_enable(struct omap_dss_device *dssdev)
+{
+   int r = 0;
+
+   r = s70wvw1tz3_panel_power_on(dssdev);
+   if (r)
+   return r;
+
+   dssdev-state = OMAP_DSS_DISPLAY_ACTIVE;
+
+   return 0;
+}
+
+static void s70wvw1tz3_panel_disable(struct omap_dss_device *dssdev)
+{
+   s70wvw1tz3_panel_power_off(dssdev);
+
+   dssdev-state = OMAP_DSS_DISPLAY_DISABLED;
+}
+
+static int s70wvw1tz3_panel_suspend(struct omap_dss_device *dssdev)
+{
+   s70wvw1tz3_panel_power_off(dssdev);
+   dssdev-state = OMAP_DSS_DISPLAY_SUSPENDED;
+
+   return 0;
+}
+
+static int s70wvw1tz3_panel_resume(struct omap_dss_device *dssdev)
+{
+   int r = 0

[PATCH 0/1] mtd: OneNAND: fix bufferram management.

2010-10-23 Thread Enric Balletbo i Serra

Hello,

Have a look at this patch, I've some problems with latest kernel from mainline
and a JFFS2 filesystem, the kernel reports various errors like

Header CRC failed on REF_PRISTINE node at 0x1e81315c: Read 0x00e0, 
calculated 0x564fc9e8

Applying this patch solves the issue, but I  only have tested on IGEP v2 board 
with
a OneNAND from Numonyx. Please test with other OneNAND devices and point me if 
I'm
in the correct way to solve this issue. Thanks.

Cheers,
  Enric

$ git diff --stat origin/master
 drivers/mtd/onenand/onenand_base.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)
--
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/1] mtd: OneNAND: fix bufferram management when chip has 2-planes.

2010-10-23 Thread Enric Balletbo i Serra
This patch adds code that I think was lost when it was applied the commit
  5988af2319781bc8e0ce418affec4e09cfa77907 - mtd: Flex-OneNAND support

Test case:
 1. Stress a jffs2 filesystem using
bonnie++ -u 0:0 -s 32 -m 16 -r 16
 2. dmesg shows various 'Header CRC failed' errors like:
Header CRC failed on REF_PRISTINE node at 0x1e81315c: Read 0x00e0,
calculated 0x564fc9e8

Tested on IGEP v2 board with a Muxed OneNAND(DDP) 512MB 1.8V 16-bit (0x58)
with 2 planes from Numonyx and CONFIG_MTD_ONENAND_2X_PROGRAM set to y

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 drivers/mtd/onenand/onenand_base.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c 
b/drivers/mtd/onenand/onenand_base.c
index a2bb520..53aa13e 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -1964,6 +1964,10 @@ static int onenand_write_ops_nolock(struct mtd_info 
*mtd, loff_t to,
 
/* In partial page write we don't update bufferram */
onenand_update_bufferram(mtd, to, !ret  !subpage);
+   ONENAND_SET_BUFFERRAM1(this);
+   onenand_update_bufferram(mtd, to + this-writesize,
+   !ret  !subpage);
+
if (ret) {
printk(KERN_ERR %s: write failed %d\n,
__func__, ret);
-- 
1.7.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


[PATCHv2 0/3] Various code improvements for IGEP v2 board.

2010-10-23 Thread Enric Balletbo i Serra

Hello,

The comments of this post also apply to IGEP v2 board (thanks Laurent)

  http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36402.html

Changes since v1:
 - Split patch in a serie.
 - [1/3] onenand_setup = NULL, is a static variable, removed from code.

This patch apply on top of tmlind/omap-for-linux branch.

$ git diff --stat tmlind/omap-for-linus 
 arch/arm/mach-omap2/board-igep0020.c |   35 ++---
 1 files changed, 11 insertions(+), 24 deletions(-)

Cheers,
  Enric
--
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


[PATCHv2 1/3] omap3: IGEP v2: Remove onenand_setup no-op function.

2010-10-23 Thread Enric Balletbo i Serra
Set onenand_setup to NULL instead of adding a no-op function.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |7 ---
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 5e035a5..20b199f 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -136,16 +136,9 @@ static struct mtd_partition igep2_onenand_partitions[] = {
},
 };
 
-static int igep2_onenand_setup(void __iomem *onenand_base, int freq)
-{
-   /* nothing is required to be setup for onenand as of now */
-   return 0;
-}
-
 static struct omap_onenand_platform_data igep2_onenand_data = {
.parts = igep2_onenand_partitions,
.nr_parts = ARRAY_SIZE(igep2_onenand_partitions),
-   .onenand_setup = igep2_onenand_setup,
.dma_channel= -1,   /* disable DMA in OMAP OneNAND driver */
 };
 
-- 
1.7.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


[PATCHv3 3/3] omap3: IGEP v2: Improve igep2_flash_init() function.

2010-10-23 Thread Enric Balletbo i Serra
The changes are:
  - Use 'for' loop instead 'while' loop.
  - No need to initialize ret to 0, we're assigning it right after.
  - No need to check for onenandcs  GPMC_CS_NUM here, it will always be true.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   23 +++
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 42dcbf4..fe76b59 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -152,35 +152,34 @@ static struct platform_device igep2_onenand_device = {
 
 static void __init igep2_flash_init(void)
 {
-   u8  cs = 0;
-   u8  onenandcs = GPMC_CS_NUM + 1;
+   u8 cs = 0;
+   u8 onenandcs = GPMC_CS_NUM + 1;
 
-   while (cs  GPMC_CS_NUM) {
-   u32 ret = 0;
+   for (cs = 0; cs  GPMC_CS_NUM; cs++) {
+   u32 ret;
ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
 
/* Check if NAND/oneNAND is configured */
if ((ret  0xC00) == 0x800)
/* NAND found */
-   pr_err(IGEP v2: Unsupported NAND found\n);
+   pr_err(IGEP2: Unsupported NAND found\n);
else {
ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7);
if ((ret  0x3F) == (ONENAND_MAP  24))
/* ONENAND found */
onenandcs = cs;
}
-   cs++;
}
+
if (onenandcs  GPMC_CS_NUM) {
-   pr_err(IGEP v2: Unable to find configuration in GPMC\n);
+   pr_err(IGEP2: Unable to find configuration in GPMC\n);
return;
}
 
-   if (onenandcs  GPMC_CS_NUM) {
-   igep2_onenand_data.cs = onenandcs;
-   if (platform_device_register(igep2_onenand_device)  0)
-   pr_err(IGEP v2: Unable to register OneNAND device\n);
-   }
+   igep2_onenand_data.cs = onenandcs;
+
+   if (platform_device_register(igep2_onenand_device)  0)
+   pr_err(IGEP2: Unable to register OneNAND device\n);
 }
 
 #else
-- 
1.7.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] omap3: various code improvements for IGEP v2 board.

2010-10-12 Thread Enric Balletbo i Serra
The comments of this post also apply to IGEP v2 board (thanks Laurent)

  http://www.mail-archive.com/linux-omap@vger.kernel.org/msg36402.html

Changes are:

  - Set onenand_setup to NULL instead of adding a no-op function.
  - On igep2_flash_init() function:
- Use 'for' loop instead 'while' loop.
- No need to initialize ret to 0, we're assigning it right after.
- No need to check for onenandcs  GPMC_CS_NUM here, it will always be true.
  - omap_board_config_size is implicitly initialized to 0 in
plat-omap/common.c, get_config() won't dereference omap_board_config,
so we can remove the empty igep2_config array.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   39 -
 1 files changed, 14 insertions(+), 25 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 152f757..ddcfd06 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -136,16 +136,10 @@ static struct mtd_partition igep2_onenand_partitions[] = {
},
 };
 
-static int igep2_onenand_setup(void __iomem *onenand_base, int freq)
-{
-   /* nothing is required to be setup for onenand as of now */
-   return 0;
-}
-
 static struct omap_onenand_platform_data igep2_onenand_data = {
.parts = igep2_onenand_partitions,
.nr_parts = ARRAY_SIZE(igep2_onenand_partitions),
-   .onenand_setup = igep2_onenand_setup,
+   .onenand_setup = NULL,
.dma_channel= -1,   /* disable DMA in OMAP OneNAND driver */
 };
 
@@ -159,35 +153,35 @@ static struct platform_device igep2_onenand_device = {
 
 static void __init igep2_flash_init(void)
 {
-   u8  cs = 0;
-   u8  onenandcs = GPMC_CS_NUM + 1;
+   u8 cs = 0;
+   u8 onenandcs = GPMC_CS_NUM + 1;
 
-   while (cs  GPMC_CS_NUM) {
-   u32 ret = 0;
+   for (cs = 0; cs  GPMC_CS_NUM; cs++) {
+   u32 ret;
ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
 
/* Check if NAND/oneNAND is configured */
if ((ret  0xC00) == 0x800)
/* NAND found */
-   pr_err(IGEP v2: Unsupported NAND found\n);
+   pr_err(IGEP2: Unsupported NAND found\n);
else {
ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7);
+
if ((ret  0x3F) == (ONENAND_MAP  24))
-   /* ONENAND found */
+   /* OneNAND found */
onenandcs = cs;
}
-   cs++;
}
+
if (onenandcs  GPMC_CS_NUM) {
-   pr_err(IGEP v2: Unable to find configuration in GPMC\n);
+   pr_err(IGEP2: Unable to find configuration in GPMC\n);
return;
}
 
-   if (onenandcs  GPMC_CS_NUM) {
-   igep2_onenand_data.cs = onenandcs;
-   if (platform_device_register(igep2_onenand_device)  0)
-   pr_err(IGEP v2: Unable to register OneNAND device\n);
-   }
+   igep2_onenand_data.cs = onenandcs;
+
+   if (platform_device_register(igep2_onenand_device)  0)
+   pr_err(IGEP2: Unable to register OneNAND device\n);
 }
 
 #else
@@ -254,9 +248,6 @@ static inline void __init igep2_init_smsc911x(void)
 static inline void __init igep2_init_smsc911x(void) { }
 #endif
 
-static struct omap_board_config_kernel igep2_config[] __initdata = {
-};
-
 static struct regulator_consumer_supply igep2_vmmc1_supply = {
.supply = vmmc,
 };
@@ -493,8 +484,6 @@ static struct platform_device *igep2_devices[] __initdata = 
{
 
 static void __init igep2_init_irq(void)
 {
-   omap_board_config = igep2_config;
-   omap_board_config_size = ARRAY_SIZE(igep2_config);
omap2_init_common_hw(m65kam_sdrc_params, m65kam_sdrc_params);
omap_init_irq();
omap_gpio_init();
-- 
1.7.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


[PATCHv4 0/6] omap3: Various fixes and improvements for IGEP v2 board.

2010-10-05 Thread Enric Balletbo i Serra

Hello,

This is the version 4 of patch series to fix and improve the IGEP v2 board 
support.

Thanks for all your comments.

CHANGES
 - since v3:
   - [3/6] fix igep2_get_revision function
   - [3/6] fix typo - Unknow
   - [5/6] check for return value omap_register_i2c_bus 
 - since v2:
   - [1/6] check the result value of gpio_request and gpio_direction_*
   - [2/6] align the igep2_gpio_leds with tabs.
   - cc linux-arm-kernel

Kind regards,

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


[PATCHv4 1/6] omap3: Add external VBUS power switch and overcurrent detect on IGEP v2 board.

2010-10-05 Thread Enric Balletbo i Serra
GPIO for various devices are missing from the board initialization.
This patch adds support for the VBUS and over current gpios.  Without this
patch, input/outputs from these two sources are ignored.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   16 
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 175f043..07dbdb7 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -274,6 +274,22 @@ static int igep2_twl_gpio_setup(struct device *dev,
igep2_vmmc1_supply.dev = mmc[0].dev;
igep2_vmmc2_supply.dev = mmc[1].dev;
 
+   /*
+* REVISIT: need ehci-omap hooks for external VBUS
+* power switch and overcurrent detect
+*/
+   if ((gpio_request(gpio + 1, GPIO_EHCI_NOC)  0) ||
+   (gpio_direction_input(gpio + 1)  0))
+   pr_err(IGEP2: Could not obtain gpio for EHCI NOC);
+
+   /*
+* TWL4030_GPIO_MAX + 0 == ledA, GPIO_USBH_CPEN
+* (out, active low)
+*/
+   if ((gpio_request(gpio + TWL4030_GPIO_MAX, GPIO_USBH_CPEN)  0) ||
+   (gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0)  0))
+   pr_err(IGEP2: Could not obtain gpio for USBH_CPEN);
+
return 0;
 };
 
-- 
1.7.0.4

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


[PATCHv4 2/6] omap3: fix and improve the LED handling on IGEP v2 board.

2010-10-05 Thread Enric Balletbo i Serra
The IGEP v2 board has four leds, this patch allows control all
of these LEDs using the LED class if CONFIG_LEDS_GPIO is selected
or using the General Purpose Input/Output (GPIO) interface if
CONFIG_LEDS_GPIO is not selected.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |  156 +++---
 1 files changed, 87 insertions(+), 69 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 07dbdb7..83a30ce 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -261,6 +261,77 @@ static struct omap2_hsmmc_info mmc[] = {
{}  /* Terminator */
 };
 
+#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
+#include linux/leds.h
+
+static struct gpio_led igep2_gpio_leds[] = {
+   [0] = {
+   .name   = gpio-led:red:d0,
+   .gpio   = IGEP2_GPIO_LED0_RED,
+   .default_trigger= default-off
+   },
+   [1] = {
+   .name   = gpio-led:green:d0,
+   .gpio   = IGEP2_GPIO_LED0_GREEN,
+   .default_trigger= default-off,
+   },
+   [2] = {
+   .name   = gpio-led:red:d1,
+   .gpio   = IGEP2_GPIO_LED1_RED,
+   .default_trigger= default-off,
+   },
+   [3] = {
+   .name   = gpio-led:green:d1,
+   .default_trigger= heartbeat,
+   .gpio   = -EINVAL, /* gets replaced */
+   },
+};
+
+static struct gpio_led_platform_data igep2_led_pdata = {
+   .leds   = igep2_gpio_leds,
+   .num_leds   = ARRAY_SIZE(igep2_gpio_leds),
+};
+
+static struct platform_device igep2_led_device = {
+.name   = leds-gpio,
+.id = -1,
+.dev= {
+.platform_data  =  igep2_led_pdata,
+   },
+};
+
+static void __init igep2_leds_init(void)
+{
+   platform_device_register(igep2_led_device);
+}
+
+#else
+static inline void igep2_leds_init(void)
+{
+   if ((gpio_request(IGEP2_GPIO_LED0_RED, gpio-led:red:d0) == 0) 
+   (gpio_direction_output(IGEP2_GPIO_LED0_RED, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED0_RED, 0);
+   gpio_set_value(IGEP2_GPIO_LED0_RED, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED0_RED\n);
+
+   if ((gpio_request(IGEP2_GPIO_LED0_GREEN, gpio-led:green:d0) == 0) 
+   (gpio_direction_output(IGEP2_GPIO_LED0_GREEN, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED0_GREEN, 0);
+   gpio_set_value(IGEP2_GPIO_LED0_GREEN, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED0_GREEN\n);
+
+   if ((gpio_request(IGEP2_GPIO_LED1_RED, gpio-led:red:d1) == 0) 
+   (gpio_direction_output(IGEP2_GPIO_LED1_RED, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED1_RED, 0);
+   gpio_set_value(IGEP2_GPIO_LED1_RED, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED1_RED\n);
+
+}
+#endif
+
 static int igep2_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
 {
@@ -290,14 +361,26 @@ static int igep2_twl_gpio_setup(struct device *dev,
(gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0)  0))
pr_err(IGEP2: Could not obtain gpio for USBH_CPEN);
 
+   /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
+#if !defined(CONFIG_LEDS_GPIO)  !defined(CONFIG_LEDS_GPIO_MODULE)
+   if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, gpio-led:green:d1) == 0)
+(gpio_direction_output(gpio + TWL4030_GPIO_MAX + 1, 1) == 0)) {
+   gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);
+   gpio_set_value(gpio + TWL4030_GPIO_MAX + 1, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED1_GREEN\n);
+#else
+   igep2_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
+#endif
+
return 0;
 };
 
-static struct twl4030_gpio_platform_data igep2_gpio_data = {
+static struct twl4030_gpio_platform_data igep2_twl4030_gpio_pdata = {
.gpio_base  = OMAP_MAX_GPIO_LINES,
.irq_base   = TWL4030_GPIO_IRQ_BASE,
.irq_end= TWL4030_GPIO_IRQ_END,
-   .use_leds   = false,
+   .use_leds   = true,
.setup  = igep2_twl_gpio_setup,
 };
 
@@ -371,47 +454,6 @@ static void __init igep2_display_init(void)
pr_err(IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n);
 }
 
-#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-#include linux/leds.h
-
-static struct gpio_led igep2_gpio_leds[] = {
-   {
-   .name = led0:red,
-   .gpio = IGEP2_GPIO_LED0_RED,
-   },
-   {
-   .name = led0

[PATCHv4 3/6] omap3: Introduce function to detect the IGEP v2 hardware revision.

2010-10-05 Thread Enric Balletbo i Serra
There are currently two versions of IGEP v2 board, this patch introduces a
function to detect the hardware revision of IGEP board.

  --
 | Id. | Hw Rev. | GPIO 28  |
  --
 |  0  |   B/C   |   high   |
 |  1  |   C |   low|
  --

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   47 ++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 83a30ce..5510f95 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -45,6 +45,49 @@
 #define IGEP2_GPIO_WIFI_NPD94
 #define IGEP2_GPIO_WIFI_NRESET 95
 
+/*
+ * IGEP2 Hardware Revision Table
+ *
+ *  --
+ * | Id. | Hw Rev. | HW0 (28) |
+ *  --
+ * |  0  |   B/C   |   high   |
+ * |  1  |   C |   low|
+ *  --
+ */
+
+#define IGEP2_BOARD_HWREV_B0
+#define IGEP2_BOARD_HWREV_C1
+
+static u8 hwrev;
+
+static void __init igep2_get_revision(void)
+{
+   u8 ret;
+
+   omap_mux_init_gpio(IGEP2_GPIO_LED1_RED, OMAP_PIN_INPUT);
+
+   if ((gpio_request(IGEP2_GPIO_LED1_RED, GPIO_HW0_REV) == 0) 
+   (gpio_direction_input(IGEP2_GPIO_LED1_RED) == 0)) {
+   ret = gpio_get_value(IGEP2_GPIO_LED1_RED);
+   if (ret == 0) {
+   pr_info(IGEP2: Hardware Revision C (B-NON 
compatible)\n);
+   hwrev = IGEP2_BOARD_HWREV_C;
+   } else if (ret ==  1) {
+   pr_info(IGEP2: Hardware Revision B/C (B 
compatible)\n);
+   hwrev = IGEP2_BOARD_HWREV_B;
+   } else {
+   pr_err(IGEP2: Unknown Hardware Revision\n);
+   hwrev = -1;
+   }
+   } else {
+   pr_warning(IGEP2: Could not obtain gpio GPIO_HW0_REV\n);
+   pr_err(IGEP2: Unknown Hardware Revision\n);
+   }
+
+   gpio_free(IGEP2_GPIO_LED1_RED);
+}
+
 #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
 
@@ -537,6 +580,10 @@ static struct omap_board_mux board_mux[] __initdata = {
 static void __init igep2_init(void)
 {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+
+   /* Get IGEP2 hardware revision */
+   igep2_get_revision();
+
igep2_i2c_init();
platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
omap_serial_init();
-- 
1.7.0.4

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


[PATCHv4 4/6] omap3: Fix handling some GPIO's for WLAN-BT combo on IGEP v2.

2010-10-05 Thread Enric Balletbo i Serra
Some GPIO's used by WLAN-BT combo on IGEP v2 depends on hardware
revision. This patch handles these GPIO's.

  --
 |   Hw Rev.   | WIFI_NPD | WIFI_NRESET | BT_NRESET |
  --
 |  B  | gpio94  |   gpio95| -  |
 |  B/C (B-compatible) | gpio94  |   gpio95|  gpio137   |
 |  C  | gpio138 |   gpio139   |  gpio137   |
  --

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   96 --
 1 files changed, 69 insertions(+), 27 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 5510f95..ddc740a 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -38,22 +38,28 @@
 #define IGEP2_SMSC911X_CS   5
 #define IGEP2_SMSC911X_GPIO 176
 #define IGEP2_GPIO_USBH_NRESET  24
-#define IGEP2_GPIO_LED0_GREEN  26
-#define IGEP2_GPIO_LED0_RED27
-#define IGEP2_GPIO_LED1_RED28
-#define IGEP2_GPIO_DVI_PUP 170
-#define IGEP2_GPIO_WIFI_NPD94
-#define IGEP2_GPIO_WIFI_NRESET 95
+#define IGEP2_GPIO_LED0_GREEN   26
+#define IGEP2_GPIO_LED0_RED 27
+#define IGEP2_GPIO_LED1_RED 28
+#define IGEP2_GPIO_DVI_PUP  170
+
+#define IGEP2_RB_GPIO_WIFI_NPD 94
+#define IGEP2_RB_GPIO_WIFI_NRESET  95
+#define IGEP2_RB_GPIO_BT_NRESET137
+#define IGEP2_RC_GPIO_WIFI_NPD 138
+#define IGEP2_RC_GPIO_WIFI_NRESET  139
+#define IGEP2_RC_GPIO_BT_NRESET137
 
 /*
  * IGEP2 Hardware Revision Table
  *
- *  --
- * | Id. | Hw Rev. | HW0 (28) |
- *  --
- * |  0  |   B/C   |   high   |
- * |  1  |   C |   low|
- *  --
+ *  --
+ * | Id. | Hw Rev.| HW0 (28) | WIFI_NPD | WIFI_NRESET | BT_NRESET |
+ *  --
+ * |  0  | B  |   high   |  gpio94  |   gpio95| - |
+ * |  0  | B/C (B-compatible) |   high   |  gpio94  |   gpio95|  gpio137  |
+ * |  1  | C  |   low|  gpio138 |   gpio139   |  gpio137  |
+ *  --
  */
 
 #define IGEP2_BOARD_HWREV_B0
@@ -295,12 +301,14 @@ static struct omap2_hsmmc_info mmc[] = {
.gpio_cd= -EINVAL,
.gpio_wp= -EINVAL,
},
+#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
{
.mmc= 2,
.wires  = 4,
.gpio_cd= -EINVAL,
.gpio_wp= -EINVAL,
},
+#endif
{}  /* Terminator */
 };
 
@@ -577,6 +585,50 @@ static struct omap_board_mux board_mux[] __initdata = {
 #define board_mux  NULL
 #endif
 
+#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
+
+static void __init igep2_wlan_bt_init(void)
+{
+   unsigned npd, wreset, btreset;
+
+   /* GPIO's for WLAN-BT combo depends on hardware revision */
+   if (hwrev == IGEP2_BOARD_HWREV_B) {
+   npd = IGEP2_RB_GPIO_WIFI_NPD;
+   wreset = IGEP2_RB_GPIO_WIFI_NRESET;
+   btreset = IGEP2_RB_GPIO_BT_NRESET;
+   } else if (hwrev == IGEP2_BOARD_HWREV_C) {
+   npd = IGEP2_RC_GPIO_WIFI_NPD;
+   wreset = IGEP2_RC_GPIO_WIFI_NRESET;
+   btreset = IGEP2_RC_GPIO_BT_NRESET;
+   } else
+   return;
+
+   /* Set GPIO's for  WLAN-BT combo module */
+   if ((gpio_request(npd, GPIO_WIFI_NPD) == 0) 
+   (gpio_direction_output(npd, 1) == 0)) {
+   gpio_export(npd, 0);
+   } else
+   pr_warning(IGEP2: Could not obtain gpio GPIO_WIFI_NPD\n);
+
+   if ((gpio_request(wreset, GPIO_WIFI_NRESET) == 0) 
+   (gpio_direction_output(wreset, 1) == 0)) {
+   gpio_export(wreset, 0);
+   gpio_set_value(wreset, 0);
+   udelay(10);
+   gpio_set_value(wreset, 1);
+   } else
+   pr_warning(IGEP2: Could not obtain gpio GPIO_WIFI_NRESET\n);
+
+   if ((gpio_request(btreset, GPIO_BT_NRESET) == 0) 
+   (gpio_direction_output(btreset, 1) == 0)) {
+   gpio_export(btreset, 0);
+   } else
+   pr_warning(IGEP2: Could not obtain gpio GPIO_BT_NRESET\n);
+}
+#else
+static inline void __init igep2_wlan_bt_init(void) { }
+#endif
+
 static void __init igep2_init(void)
 {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -595,22 +647,12 @@ static void __init igep2_init(void)
igep2_display_init();
igep2_init_smsc911x();
 
-   /* GPIO W-LAN + Bluetooth combo module

[PATCHv4 6/6] omap3: Remove VMMC2 regulator on IGEP v2.

2010-10-05 Thread Enric Balletbo i Serra
VMMC2 regulator is configured but it's not used for the IGEP v2, so
remove this regulator from board.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   26 +++---
 1 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index aa7b8bd..2774265 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -260,10 +260,6 @@ static struct regulator_consumer_supply igep2_vmmc1_supply 
= {
.supply = vmmc,
 };
 
-static struct regulator_consumer_supply igep2_vmmc2_supply = {
-   .supply = vmmc,
-};
-
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
 static struct regulator_init_data igep2_vmmc1 = {
.constraints = {
@@ -279,21 +275,6 @@ static struct regulator_init_data igep2_vmmc1 = {
.consumer_supplies  = igep2_vmmc1_supply,
 };
 
-/* VMMC2 for OMAP VDD_MMC2 (i/o) and MMC2 WIFI */
-static struct regulator_init_data igep2_vmmc2 = {
-   .constraints = {
-   .min_uV = 185,
-   .max_uV = 315,
-   .valid_modes_mask   = REGULATOR_MODE_NORMAL
-   | REGULATOR_MODE_STANDBY,
-   .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
-   | REGULATOR_CHANGE_MODE
-   | REGULATOR_CHANGE_STATUS,
-   },
-   .num_consumer_supplies  = 1,
-   .consumer_supplies  = igep2_vmmc2_supply,
-};
-
 static struct omap2_hsmmc_info mmc[] = {
{
.mmc= 1,
@@ -390,11 +371,11 @@ static int igep2_twl_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc);
 
-   /* link regulators to MMC adapters ... we know the
+   /*
+* link regulators to MMC adapters ... we know the
 * regulators will be set up only *after* we return.
-   */
+*/
igep2_vmmc1_supply.dev = mmc[0].dev;
-   igep2_vmmc2_supply.dev = mmc[1].dev;
 
/*
 * REVISIT: need ehci-omap hooks for external VBUS
@@ -536,7 +517,6 @@ static struct twl4030_platform_data igep2_twldata = {
.codec  = igep2_codec_data,
.gpio   = igep2_twl4030_gpio_pdata,
.vmmc1  = igep2_vmmc1,
-   .vmmc2  = igep2_vmmc2,
.vpll2  = igep2_vpll2,
 
 };
-- 
1.7.0.4

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


[PATCHv2 0/1] Add initial support for OMAP3 IGEP module

2010-10-02 Thread Enric Balletbo i Serra

Hello,

This is the version 2 of patch series to introduce the OMAP3
IGEP module support. Thanks for your comments.

Changes since v1:
 - add DEBUG_LL/EARLY_PRINTK entry

arch/arm/mach-omap2/Kconfig  |5 +
arch/arm/mach-omap2/Makefile |2 +
arch/arm/mach-omap2/board-igep0030.c |  412 ++
arch/arm/plat-omap/include/plat/uncompress.h |1 +
4 files changed, 420 insertions(+), 0 deletions(-)

Kind regards,
  Enric


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


[PATCHv2] omap3: Add minimal OMAP3 IGEP module support.

2010-10-02 Thread Enric Balletbo i Serra
The OMAP3 IGEP module is a low-power, high performance production-ready
system-on-module (SOM) based on TI's OMAP3 family. More about this
board at www.igep.es.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/Kconfig  |5 +
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/board-igep0030.c |  412 ++
 arch/arm/plat-omap/include/plat/uncompress.h |1 +
 4 files changed, 420 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-igep0030.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index b48bacf..233bfbe 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -220,6 +220,11 @@ config MACH_IGEP0020
default y
select OMAP_PACKAGE_CBB
 
+config MACH_IGEP0030
+   bool IGEP OMAP3 module
+   depends on ARCH_OMAP3
+   select OMAP_PACKAGE_CBB
+
 config MACH_SBC3530
bool OMAP3 SBC STALKER board
depends on ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 88d3a1e..71386d4 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -148,6 +148,8 @@ obj-$(CONFIG_MACH_CM_T35)   += board-cm-t35.o \
   hsmmc.o
 obj-$(CONFIG_MACH_IGEP0020)+= board-igep0020.o \
   hsmmc.o
+obj-$(CONFIG_MACH_IGEP0030)+= board-igep0030.o \
+  hsmmc.o
 obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
   hsmmc.o
 obj-$(CONFIG_MACH_OMAP_4430SDP)+= board-4430sdp.o \
diff --git a/arch/arm/mach-omap2/board-igep0030.c 
b/arch/arm/mach-omap2/board-igep0030.c
new file mode 100644
index 000..7313ef5
--- /dev/null
+++ b/arch/arm/mach-omap2/board-igep0030.c
@@ -0,0 +1,412 @@
+/*
+ * Copyright (C) 2010 - ISEE 2007 SL
+ *
+ * Modified from mach-omap2/board-generic.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/delay.h
+#include linux/err.h
+#include linux/clk.h
+#include linux/io.h
+#include linux/gpio.h
+#include linux/interrupt.h
+
+#include linux/regulator/machine.h
+#include linux/i2c/twl.h
+
+#include asm/mach-types.h
+#include asm/mach/arch.h
+
+#include plat/board.h
+#include plat/common.h
+#include plat/gpmc.h
+#include plat/usb.h
+#include plat/onenand.h
+
+#include mux.h
+#include hsmmc.h
+#include sdram-numonyx-m65kam.h
+
+#define IGEP3_GPIO_LED0_GREEN  54
+#define IGEP3_GPIO_LED0_RED53
+#define IGEP3_GPIO_LED1_RED16
+
+#define IGEP3_GPIO_WIFI_NPD138
+#define IGEP3_GPIO_WIFI_NRESET 139
+#define IGEP3_GPIO_BT_NRESET   137
+
+#define IGEP3_GPIO_USBH_NRESET  115
+
+
+#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
+   defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
+
+#define ONENAND_MAP 0x2000
+
+/*
+ * x2 Flash built-in COMBO POP MEMORY
+ * Since the device is equipped with two DataRAMs, and two-plane NAND
+ * Flash memory array, these two component enables simultaneous program
+ * of 4KiB. Plane1 has only even blocks such as block0, block2, block4
+ * while Plane2 has only odd blocks such as block1, block3, block5.
+ * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048)
+ */
+
+static struct mtd_partition igep3_onenand_partitions[] = {
+   {
+   .name   = X-Loader,
+   .offset = 0,
+   .size   = 2 * (64*(2*2048))
+   },
+   {
+   .name   = U-Boot,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 6 * (64*(2*2048)),
+   },
+   {
+   .name   = Environment,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 2 * (64*(2*2048)),
+   },
+   {
+   .name   = Kernel,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 12 * (64*(2*2048)),
+   },
+   {
+   .name   = File System,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = MTDPART_SIZ_FULL,
+   },
+};
+
+static int igep3_onenand_setup(void __iomem *onenand_base, int freq)
+{
+   /* nothing is required to be setup for onenand as of now */
+   return 0;
+}
+
+static struct omap_onenand_platform_data igep3_onenand_pdata = {
+   .parts = igep3_onenand_partitions,
+   .nr_parts = ARRAY_SIZE(igep3_onenand_partitions),
+   .onenand_setup = igep3_onenand_setup,
+   .dma_channel= -1,   /* disable DMA in OMAP OneNAND driver */
+};
+
+static struct

[PATCHv3 0/1] Add initial support for OMAP3 IGEP module

2010-10-02 Thread Enric Balletbo i Serra

Hello,

This is the version 3 of patch series to introduce the OMAP3
IGEP module support.

Changes since v2 (thanks Laurent):
- Set onenand_setup to NULL instead of adding a no-op function.
  - On igep3_flash_init() function:
- Use 'for' loop instead 'while' loop.
- No need to initialize ret to 0, we're assigning it right after.
- No need to check for onenandcs  GPMC_CS_NUM, it will always be true.
  - omap_board_config_size is implicitly initialized to 0 in
plat-omap/common.c, get_config() won't dereference omap_board_config,
so we can remove the empty igep2_config array.
 
Changes since v1:
 - add DEBUG_LL/EARLY_PRINTK entry

 arch/arm/mach-omap2/Kconfig  |5 +
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/board-igep0030.c |  401 ++
 arch/arm/plat-omap/include/plat/uncompress.h |1 +
 4 files changed, 409 insertions(+), 0 deletions(-)
--
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


[PATCHv3 1/1] omap3: Add minimal OMAP3 IGEP module support.

2010-10-02 Thread Enric Balletbo i Serra
The OMAP3 IGEP module is a low-power, high performance production-ready
system-on-module (SOM) based on TI's OMAP3 family. More about this
board at www.igep.es.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/Kconfig  |5 +
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/board-igep0030.c |  401 ++
 arch/arm/plat-omap/include/plat/uncompress.h |1 +
 4 files changed, 409 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-igep0030.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index b48bacf..233bfbe 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -220,6 +220,11 @@ config MACH_IGEP0020
default y
select OMAP_PACKAGE_CBB
 
+config MACH_IGEP0030
+   bool IGEP OMAP3 module
+   depends on ARCH_OMAP3
+   select OMAP_PACKAGE_CBB
+
 config MACH_SBC3530
bool OMAP3 SBC STALKER board
depends on ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 88d3a1e..71386d4 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -148,6 +148,8 @@ obj-$(CONFIG_MACH_CM_T35)   += board-cm-t35.o \
   hsmmc.o
 obj-$(CONFIG_MACH_IGEP0020)+= board-igep0020.o \
   hsmmc.o
+obj-$(CONFIG_MACH_IGEP0030)+= board-igep0030.o \
+  hsmmc.o
 obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
   hsmmc.o
 obj-$(CONFIG_MACH_OMAP_4430SDP)+= board-4430sdp.o \
diff --git a/arch/arm/mach-omap2/board-igep0030.c 
b/arch/arm/mach-omap2/board-igep0030.c
new file mode 100644
index 000..55c7806
--- /dev/null
+++ b/arch/arm/mach-omap2/board-igep0030.c
@@ -0,0 +1,401 @@
+/*
+ * Copyright (C) 2010 - ISEE 2007 SL
+ *
+ * Modified from mach-omap2/board-generic.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/delay.h
+#include linux/err.h
+#include linux/clk.h
+#include linux/io.h
+#include linux/gpio.h
+#include linux/interrupt.h
+
+#include linux/regulator/machine.h
+#include linux/i2c/twl.h
+
+#include asm/mach-types.h
+#include asm/mach/arch.h
+
+#include plat/board.h
+#include plat/common.h
+#include plat/gpmc.h
+#include plat/usb.h
+#include plat/onenand.h
+
+#include mux.h
+#include hsmmc.h
+#include sdram-numonyx-m65kam.h
+
+#define IGEP3_GPIO_LED0_GREEN  54
+#define IGEP3_GPIO_LED0_RED53
+#define IGEP3_GPIO_LED1_RED16
+
+#define IGEP3_GPIO_WIFI_NPD138
+#define IGEP3_GPIO_WIFI_NRESET 139
+#define IGEP3_GPIO_BT_NRESET   137
+
+#define IGEP3_GPIO_USBH_NRESET  115
+
+
+#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
+   defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
+
+#define ONENAND_MAP 0x2000
+
+/*
+ * x2 Flash built-in COMBO POP MEMORY
+ * Since the device is equipped with two DataRAMs, and two-plane NAND
+ * Flash memory array, these two component enables simultaneous program
+ * of 4KiB. Plane1 has only even blocks such as block0, block2, block4
+ * while Plane2 has only odd blocks such as block1, block3, block5.
+ * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048)
+ */
+
+static struct mtd_partition igep3_onenand_partitions[] = {
+   {
+   .name   = X-Loader,
+   .offset = 0,
+   .size   = 2 * (64*(2*2048))
+   },
+   {
+   .name   = U-Boot,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 6 * (64*(2*2048)),
+   },
+   {
+   .name   = Environment,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 2 * (64*(2*2048)),
+   },
+   {
+   .name   = Kernel,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 12 * (64*(2*2048)),
+   },
+   {
+   .name   = File System,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = MTDPART_SIZ_FULL,
+   },
+};
+
+static struct omap_onenand_platform_data igep3_onenand_pdata = {
+   .parts = igep3_onenand_partitions,
+   .nr_parts = ARRAY_SIZE(igep3_onenand_partitions),
+   .onenand_setup = NULL,
+   .dma_channel= -1,   /* disable DMA in OMAP OneNAND driver */
+};
+
+static struct platform_device igep3_onenand_device = {
+   .name   = omap2-onenand,
+   .id = -1,
+   .dev = {
+   .platform_data = igep3_onenand_pdata

[PATCHv2 1/6] omap3: Add external VBUS power switch and overcurrent detect on IGEP v2 board.

2010-10-01 Thread Enric Balletbo i Serra
GPIO for various devices are missing from the board initialization.
This patch adds support for the VBUS and over current gpios.  Without this
patch, input/outputs from these two sources are ignored.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   14 ++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 175f043..1052a63 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -274,6 +274,20 @@ static int igep2_twl_gpio_setup(struct device *dev,
igep2_vmmc1_supply.dev = mmc[0].dev;
igep2_vmmc2_supply.dev = mmc[1].dev;
 
+   /*
+* REVISIT: need ehci-omap hooks for external VBUS
+* power switch and overcurrent detect
+*/
+   gpio_request(gpio + 1, GPIO_EHCI_NOC);
+   gpio_direction_input(gpio + 1);
+
+   /*
+* TWL4030_GPIO_MAX + 0 == ledA, GPIO_USBH_CPEN
+* (out, active low)
+*/
+   gpio_request(gpio + TWL4030_GPIO_MAX, 0);
+   gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+
return 0;
 };
 
-- 
1.7.0.4

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


[PATCHv2 2/6] omap3: fix and improve the LED handling on IGEP v2 board.

2010-10-01 Thread Enric Balletbo i Serra
The IGEP v2 board has four leds, this patch allows control all
of these LEDs using the LED class if CONFIG_LEDS_GPIO is selected
or using the General Purpose Input/Output (GPIO) interface if
CONFIG_LEDS_GPIO is not selected.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |  156 +++---
 1 files changed, 87 insertions(+), 69 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 1052a63..9f25d0d 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -261,6 +261,77 @@ static struct omap2_hsmmc_info mmc[] = {
{}  /* Terminator */
 };
 
+#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
+#include linux/leds.h
+
+static struct gpio_led igep2_gpio_leds[] = {
+   [0] = {
+   .name = gpio-led:red:d0,
+   .gpio = IGEP2_GPIO_LED0_RED,
+   .default_trigger = default-off
+   },
+   [1] = {
+   .name = gpio-led:green:d0,
+   .gpio = IGEP2_GPIO_LED0_GREEN,
+   .default_trigger = default-off,
+   },
+   [2] = {
+   .name = gpio-led:red:d1,
+   .gpio = IGEP2_GPIO_LED1_RED,
+   .default_trigger = default-off,
+   },
+   [3] = {
+   .name = gpio-led:green:d1,
+   .default_trigger = heartbeat,
+   .gpio = -EINVAL, /* gets replaced */
+   },
+};
+
+static struct gpio_led_platform_data igep2_led_pdata = {
+   .leds   = igep2_gpio_leds,
+   .num_leds   = ARRAY_SIZE(igep2_gpio_leds),
+};
+
+static struct platform_device igep2_led_device = {
+.name   = leds-gpio,
+.id = -1,
+.dev= {
+.platform_data  =  igep2_led_pdata,
+   },
+};
+
+static void __init igep2_leds_init(void)
+{
+   platform_device_register(igep2_led_device);
+}
+
+#else
+static inline void igep2_leds_init(void)
+{
+   if ((gpio_request(IGEP2_GPIO_LED0_RED, gpio-led:red:d0) == 0) 
+   (gpio_direction_output(IGEP2_GPIO_LED0_RED, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED0_RED, 0);
+   gpio_set_value(IGEP2_GPIO_LED0_RED, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED0_RED\n);
+
+   if ((gpio_request(IGEP2_GPIO_LED0_GREEN, gpio-led:green:d0) == 0) 
+   (gpio_direction_output(IGEP2_GPIO_LED0_GREEN, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED0_GREEN, 0);
+   gpio_set_value(IGEP2_GPIO_LED0_GREEN, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED0_GREEN\n);
+
+   if ((gpio_request(IGEP2_GPIO_LED1_RED, gpio-led:red:d1) == 0) 
+   (gpio_direction_output(IGEP2_GPIO_LED1_RED, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED1_RED, 0);
+   gpio_set_value(IGEP2_GPIO_LED1_RED, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED1_RED\n);
+
+}
+#endif
+
 static int igep2_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
 {
@@ -288,14 +359,26 @@ static int igep2_twl_gpio_setup(struct device *dev,
gpio_request(gpio + TWL4030_GPIO_MAX, 0);
gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
 
+   /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
+#if !defined(CONFIG_LEDS_GPIO)  !defined(CONFIG_LEDS_GPIO_MODULE)
+   if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, gpio-led:green:d1) == 0)
+(gpio_direction_output(gpio + TWL4030_GPIO_MAX + 1, 1) == 0)) {
+   gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);
+   gpio_set_value(gpio + TWL4030_GPIO_MAX + 1, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED1_GREEN\n);
+#else
+   igep2_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
+#endif
+
return 0;
 };
 
-static struct twl4030_gpio_platform_data igep2_gpio_data = {
+static struct twl4030_gpio_platform_data igep2_twl4030_gpio_pdata = {
.gpio_base  = OMAP_MAX_GPIO_LINES,
.irq_base   = TWL4030_GPIO_IRQ_BASE,
.irq_end= TWL4030_GPIO_IRQ_END,
-   .use_leds   = false,
+   .use_leds   = true,
.setup  = igep2_twl_gpio_setup,
 };
 
@@ -369,47 +452,6 @@ static void __init igep2_display_init(void)
pr_err(IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n);
 }
 
-#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-#include linux/leds.h
-
-static struct gpio_led igep2_gpio_leds[] = {
-   {
-   .name = led0:red,
-   .gpio = IGEP2_GPIO_LED0_RED,
-   },
-   {
-   .name = led0:green,
-   .default_trigger = heartbeat,
-   .gpio = IGEP2_GPIO_LED0_GREEN,
-   },
-   {
-   .name = led1:red,
-   .gpio = IGEP2_GPIO_LED1_RED

[PATCHv2 3/6] omap3: Introduce function to detect the IGEP v2 hardware revision.

2010-10-01 Thread Enric Balletbo i Serra
There are currently two versions of IGEP v2 board, this patch introduces a
function to detect the hardware revision of IGEP board.

  --
 | Id. | Hw Rev. | GPIO 28  |
  --
 |  0  |   B/C   |   high   |
 |  1  |   C |   low|
  --

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   47 ++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 9f25d0d..a386425 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -45,6 +45,49 @@
 #define IGEP2_GPIO_WIFI_NPD94
 #define IGEP2_GPIO_WIFI_NRESET 95
 
+/*
+ * IGEP2 Hardware Revision Table
+ *
+ *  --
+ * | Id. | Hw Rev. | HW0 (28) |
+ *  --
+ * |  0  |   B/C   |   high   |
+ * |  1  |   C |   low|
+ *  --
+ */
+
+#define IGEP2_BOARD_HWREV_B0
+#define IGEP2_BOARD_HWREV_C1
+
+static u8 hwrev;
+
+static void __init igep2_get_revision(void)
+{
+   u8 ret;
+
+   omap_mux_init_gpio(IGEP2_GPIO_LED1_RED, OMAP_PIN_INPUT);
+
+   if ((gpio_request(IGEP2_GPIO_LED1_RED, GPIO_HW0_REV) == 0) 
+   (gpio_direction_input(IGEP2_GPIO_LED1_RED) == 0)) {
+   ret = gpio_get_value(IGEP2_GPIO_LED1_RED);
+   if (hwrev == 0) {
+   pr_info(IGEP2: Hardware Revision C (B-NON 
compatible)\n);
+   hwrev = IGEP2_BOARD_HWREV_C;
+   } else if (hwrev ==  1) {
+   pr_info(IGEP2: Hardware Revision B/C (B 
compatible)\n);
+   hwrev = IGEP2_BOARD_HWREV_B;
+   } else {
+   pr_err(IGEP2: Unknow Hardware Revision\n);
+   hwrev = -1;
+   }
+   } else {
+   pr_warning(IGEP2: Could not obtain gpio GPIO_HW0_REV\n);
+   pr_err(IGEP2: Unknow Hardware Revision\n);
+   }
+
+   gpio_free(IGEP2_GPIO_LED1_RED);
+}
+
 #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
 
@@ -535,6 +578,10 @@ static struct omap_board_mux board_mux[] __initdata = {
 static void __init igep2_init(void)
 {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+
+   /* Get IGEP2 hardware revision */
+   igep2_get_revision();
+
igep2_i2c_init();
platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
omap_serial_init();
-- 
1.7.0.4

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


[PATCHv2 4/6] omap3: Fix handling some GPIO's for WLAN-BT combo on IGEP v2.

2010-10-01 Thread Enric Balletbo i Serra
Some GPIO's used by WLAN-BT combo on IGEP v2 depends on hardware
revision. This patch handles these GPIO's.

  --
 |   Hw Rev.   | WIFI_NPD | WIFI_NRESET | BT_NRESET |
  --
 |  B  | gpio94  |   gpio95| -  |
 |  B/C (B-compatible) | gpio94  |   gpio95|  gpio137   |
 |  C  | gpio138 |   gpio139   |  gpio137   |
  --

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   94 --
 1 files changed, 67 insertions(+), 27 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index a386425..ec7da7f 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -38,22 +38,28 @@
 #define IGEP2_SMSC911X_CS   5
 #define IGEP2_SMSC911X_GPIO 176
 #define IGEP2_GPIO_USBH_NRESET  24
-#define IGEP2_GPIO_LED0_GREEN  26
-#define IGEP2_GPIO_LED0_RED27
-#define IGEP2_GPIO_LED1_RED28
-#define IGEP2_GPIO_DVI_PUP 170
-#define IGEP2_GPIO_WIFI_NPD94
-#define IGEP2_GPIO_WIFI_NRESET 95
+#define IGEP2_GPIO_LED0_GREEN   26
+#define IGEP2_GPIO_LED0_RED 27
+#define IGEP2_GPIO_LED1_RED 28
+#define IGEP2_GPIO_DVI_PUP  170
+
+#define IGEP2_RB_GPIO_WIFI_NPD 94
+#define IGEP2_RB_GPIO_WIFI_NRESET  95
+#define IGEP2_RB_GPIO_BT_NRESET137
+#define IGEP2_RC_GPIO_WIFI_NPD 138
+#define IGEP2_RC_GPIO_WIFI_NRESET  139
+#define IGEP2_RC_GPIO_BT_NRESET137
 
 /*
  * IGEP2 Hardware Revision Table
  *
- *  --
- * | Id. | Hw Rev. | HW0 (28) |
- *  --
- * |  0  |   B/C   |   high   |
- * |  1  |   C |   low|
- *  --
+ *  --
+ * | Id. | Hw Rev.| HW0 (28) | WIFI_NPD | WIFI_NRESET | BT_NRESET |
+ *  --
+ * |  0  | B  |   high   |  gpio94  |   gpio95| - |
+ * |  0  | B/C (B-compatible) |   high   |  gpio94  |   gpio95|  gpio137  |
+ * |  1  | C  |   low|  gpio138 |   gpio139   |  gpio137  |
+ *  --
  */
 
 #define IGEP2_BOARD_HWREV_B0
@@ -295,12 +301,14 @@ static struct omap2_hsmmc_info mmc[] = {
.gpio_cd= -EINVAL,
.gpio_wp= -EINVAL,
},
+#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
{
.mmc= 2,
.wires  = 4,
.gpio_cd= -EINVAL,
.gpio_wp= -EINVAL,
},
+#endif
{}  /* Terminator */
 };
 
@@ -575,6 +583,48 @@ static struct omap_board_mux board_mux[] __initdata = {
 #define board_mux  NULL
 #endif
 
+#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
+
+static void __init igep2_wlan_bt_init(void)
+{
+   unsigned npd, wreset, btreset;
+
+   /* GPIO's for WLAN-BT combo depends on hardware revision */
+   if (hwrev == IGEP2_BOARD_HWREV_B) {
+   npd = IGEP2_RB_GPIO_WIFI_NPD;
+   wreset = IGEP2_RB_GPIO_WIFI_NRESET;
+   btreset = IGEP2_RB_GPIO_BT_NRESET;
+   } else if (hwrev == IGEP2_BOARD_HWREV_B) {
+   npd = IGEP2_RC_GPIO_WIFI_NPD;
+   wreset = IGEP2_RC_GPIO_WIFI_NRESET;
+   btreset = IGEP2_RC_GPIO_BT_NRESET;
+   } else
+   return;
+
+   /* Set GPIO's for  WLAN-BT combo module */
+   if ((gpio_request(npd, GPIO_WIFI_NPD) == 0) 
+   (gpio_direction_output(npd, 1) == 0)) {
+   gpio_export(npd, 0);
+   } else
+   pr_warning(IGEP2: Could not obtain gpio GPIO_WIFI_NPD\n);
+
+   if ((gpio_request(wreset, GPIO_WIFI_NRESET) == 0) 
+   (gpio_direction_output(wreset, 1) == 0)) {
+   gpio_export(wreset, 0);
+   gpio_set_value(wreset, 0);
+   udelay(10);
+   gpio_set_value(wreset, 1);
+   } else
+   pr_warning(IGEP2: Could not obtain gpio GPIO_WIFI_NRESET\n);
+
+   if ((gpio_request(btreset, GPIO_BT_NRESET) == 0) 
+   (gpio_direction_output(btreset, 1) == 0)) {
+   gpio_export(btreset, 0);
+   } else
+   pr_warning(IGEP2: Could not obtain gpio GPIO_BT_NRESET\n);
+}
+#endif
+
 static void __init igep2_init(void)
 {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -593,22 +643,12 @@ static void __init igep2_init(void)
igep2_display_init();
igep2_init_smsc911x();
 
-   /* GPIO W-LAN + Bluetooth combo module */
-   if ((gpio_request(IGEP2_GPIO_WIFI_NPD, GPIO_WIFI_NPD

[PATCHv2 5/6] omap3: Add i2c eeprom driver to read EDID on IGEP v2.

2010-10-01 Thread Enric Balletbo i Serra
Add i2c eeprom driver to access monitor EDID binary information
from user space, something that is required by 'decode-edid' and
'parse-edid'.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   24 +---
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index ec7da7f..c5eaa43 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -539,7 +539,7 @@ static struct twl4030_platform_data igep2_twldata = {
 
 };
 
-static struct i2c_board_info __initdata igep2_i2c_boardinfo[] = {
+static struct i2c_board_info __initdata igep2_i2c1_boardinfo[] = {
{
I2C_BOARD_INFO(twl4030, 0x48),
.flags  = I2C_CLIENT_WAKE,
@@ -548,13 +548,23 @@ static struct i2c_board_info __initdata 
igep2_i2c_boardinfo[] = {
},
 };
 
+static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {
+   {
+   I2C_BOARD_INFO(eeprom, 0x50),
+   },
+};
+
 static int __init igep2_i2c_init(void)
 {
-   omap_register_i2c_bus(1, 2600, igep2_i2c_boardinfo,
-   ARRAY_SIZE(igep2_i2c_boardinfo));
-   /* Bus 3 is attached to the DVI port where devices like the pico DLP
-* projector don't work reliably with 400kHz */
-   omap_register_i2c_bus(3, 100, NULL, 0);
+   omap_register_i2c_bus(1, 2600, igep2_i2c1_boardinfo,
+   ARRAY_SIZE(igep2_i2c1_boardinfo));
+   /*
+* Bus 3 is attached to the DVI port where devices like the pico DLP
+* projector don't work reliably with 400kHz
+*/
+   omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo,
+ARRAY_SIZE(igep2_i2c3_boardinfo));
+
return 0;
 }
 
@@ -631,7 +641,7 @@ static void __init igep2_init(void)
 
/* Get IGEP2 hardware revision */
igep2_get_revision();
-
+   /* Register I2C busses and drivers */
igep2_i2c_init();
platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
omap_serial_init();
-- 
1.7.0.4

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


[PATCHv2 6/6] omap3: Remove VMMC2 regulator on IGEP v2.

2010-10-01 Thread Enric Balletbo i Serra
VMMC2 regulator is configured but it's not used for the IGEP v2, so
remove this regulator from board.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   26 +++---
 1 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index c5eaa43..fa450b1 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -260,10 +260,6 @@ static struct regulator_consumer_supply igep2_vmmc1_supply 
= {
.supply = vmmc,
 };
 
-static struct regulator_consumer_supply igep2_vmmc2_supply = {
-   .supply = vmmc,
-};
-
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
 static struct regulator_init_data igep2_vmmc1 = {
.constraints = {
@@ -279,21 +275,6 @@ static struct regulator_init_data igep2_vmmc1 = {
.consumer_supplies  = igep2_vmmc1_supply,
 };
 
-/* VMMC2 for OMAP VDD_MMC2 (i/o) and MMC2 WIFI */
-static struct regulator_init_data igep2_vmmc2 = {
-   .constraints = {
-   .min_uV = 185,
-   .max_uV = 315,
-   .valid_modes_mask   = REGULATOR_MODE_NORMAL
-   | REGULATOR_MODE_STANDBY,
-   .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
-   | REGULATOR_CHANGE_MODE
-   | REGULATOR_CHANGE_STATUS,
-   },
-   .num_consumer_supplies  = 1,
-   .consumer_supplies  = igep2_vmmc2_supply,
-};
-
 static struct omap2_hsmmc_info mmc[] = {
{
.mmc= 1,
@@ -390,11 +371,11 @@ static int igep2_twl_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc);
 
-   /* link regulators to MMC adapters ... we know the
+   /*
+* link regulators to MMC adapters ... we know the
 * regulators will be set up only *after* we return.
-   */
+*/
igep2_vmmc1_supply.dev = mmc[0].dev;
-   igep2_vmmc2_supply.dev = mmc[1].dev;
 
/*
 * REVISIT: need ehci-omap hooks for external VBUS
@@ -534,7 +515,6 @@ static struct twl4030_platform_data igep2_twldata = {
.codec  = igep2_codec_data,
.gpio   = igep2_twl4030_gpio_pdata,
.vmmc1  = igep2_vmmc1,
-   .vmmc2  = igep2_vmmc2,
.vpll2  = igep2_vpll2,
 
 };
-- 
1.7.0.4

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


[PATCHv3 1/6] omap3: Add external VBUS power switch and overcurrent detect on IGEP v2 board.

2010-10-01 Thread Enric Balletbo i Serra
GPIO for various devices are missing from the board initialization.
This patch adds support for the VBUS and over current gpios.  Without this
patch, input/outputs from these two sources are ignored.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   16 
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 175f043..07dbdb7 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -274,6 +274,22 @@ static int igep2_twl_gpio_setup(struct device *dev,
igep2_vmmc1_supply.dev = mmc[0].dev;
igep2_vmmc2_supply.dev = mmc[1].dev;
 
+   /*
+* REVISIT: need ehci-omap hooks for external VBUS
+* power switch and overcurrent detect
+*/
+   if ((gpio_request(gpio + 1, GPIO_EHCI_NOC)  0) ||
+   (gpio_direction_input(gpio + 1)  0))
+   pr_err(IGEP2: Could not obtain gpio for EHCI NOC);
+
+   /*
+* TWL4030_GPIO_MAX + 0 == ledA, GPIO_USBH_CPEN
+* (out, active low)
+*/
+   if ((gpio_request(gpio + TWL4030_GPIO_MAX, GPIO_USBH_CPEN)  0) ||
+   (gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0)  0))
+   pr_err(IGEP2: Could not obtain gpio for USBH_CPEN);
+
return 0;
 };
 
-- 
1.7.0.4

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


[PATCHv3 2/6] omap3: fix and improve the LED handling on IGEP v2 board.

2010-10-01 Thread Enric Balletbo i Serra
The IGEP v2 board has four leds, this patch allows control all
of these LEDs using the LED class if CONFIG_LEDS_GPIO is selected
or using the General Purpose Input/Output (GPIO) interface if
CONFIG_LEDS_GPIO is not selected.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |  156 +++---
 1 files changed, 87 insertions(+), 69 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 07dbdb7..83a30ce 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -261,6 +261,77 @@ static struct omap2_hsmmc_info mmc[] = {
{}  /* Terminator */
 };
 
+#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
+#include linux/leds.h
+
+static struct gpio_led igep2_gpio_leds[] = {
+   [0] = {
+   .name   = gpio-led:red:d0,
+   .gpio   = IGEP2_GPIO_LED0_RED,
+   .default_trigger= default-off
+   },
+   [1] = {
+   .name   = gpio-led:green:d0,
+   .gpio   = IGEP2_GPIO_LED0_GREEN,
+   .default_trigger= default-off,
+   },
+   [2] = {
+   .name   = gpio-led:red:d1,
+   .gpio   = IGEP2_GPIO_LED1_RED,
+   .default_trigger= default-off,
+   },
+   [3] = {
+   .name   = gpio-led:green:d1,
+   .default_trigger= heartbeat,
+   .gpio   = -EINVAL, /* gets replaced */
+   },
+};
+
+static struct gpio_led_platform_data igep2_led_pdata = {
+   .leds   = igep2_gpio_leds,
+   .num_leds   = ARRAY_SIZE(igep2_gpio_leds),
+};
+
+static struct platform_device igep2_led_device = {
+.name   = leds-gpio,
+.id = -1,
+.dev= {
+.platform_data  =  igep2_led_pdata,
+   },
+};
+
+static void __init igep2_leds_init(void)
+{
+   platform_device_register(igep2_led_device);
+}
+
+#else
+static inline void igep2_leds_init(void)
+{
+   if ((gpio_request(IGEP2_GPIO_LED0_RED, gpio-led:red:d0) == 0) 
+   (gpio_direction_output(IGEP2_GPIO_LED0_RED, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED0_RED, 0);
+   gpio_set_value(IGEP2_GPIO_LED0_RED, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED0_RED\n);
+
+   if ((gpio_request(IGEP2_GPIO_LED0_GREEN, gpio-led:green:d0) == 0) 
+   (gpio_direction_output(IGEP2_GPIO_LED0_GREEN, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED0_GREEN, 0);
+   gpio_set_value(IGEP2_GPIO_LED0_GREEN, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED0_GREEN\n);
+
+   if ((gpio_request(IGEP2_GPIO_LED1_RED, gpio-led:red:d1) == 0) 
+   (gpio_direction_output(IGEP2_GPIO_LED1_RED, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED1_RED, 0);
+   gpio_set_value(IGEP2_GPIO_LED1_RED, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED1_RED\n);
+
+}
+#endif
+
 static int igep2_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
 {
@@ -290,14 +361,26 @@ static int igep2_twl_gpio_setup(struct device *dev,
(gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0)  0))
pr_err(IGEP2: Could not obtain gpio for USBH_CPEN);
 
+   /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
+#if !defined(CONFIG_LEDS_GPIO)  !defined(CONFIG_LEDS_GPIO_MODULE)
+   if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, gpio-led:green:d1) == 0)
+(gpio_direction_output(gpio + TWL4030_GPIO_MAX + 1, 1) == 0)) {
+   gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);
+   gpio_set_value(gpio + TWL4030_GPIO_MAX + 1, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED1_GREEN\n);
+#else
+   igep2_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
+#endif
+
return 0;
 };
 
-static struct twl4030_gpio_platform_data igep2_gpio_data = {
+static struct twl4030_gpio_platform_data igep2_twl4030_gpio_pdata = {
.gpio_base  = OMAP_MAX_GPIO_LINES,
.irq_base   = TWL4030_GPIO_IRQ_BASE,
.irq_end= TWL4030_GPIO_IRQ_END,
-   .use_leds   = false,
+   .use_leds   = true,
.setup  = igep2_twl_gpio_setup,
 };
 
@@ -371,47 +454,6 @@ static void __init igep2_display_init(void)
pr_err(IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n);
 }
 
-#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-#include linux/leds.h
-
-static struct gpio_led igep2_gpio_leds[] = {
-   {
-   .name = led0:red,
-   .gpio = IGEP2_GPIO_LED0_RED,
-   },
-   {
-   .name = led0

[PATCHv3 3/6] omap3: Introduce function to detect the IGEP v2 hardware revision.

2010-10-01 Thread Enric Balletbo i Serra
There are currently two versions of IGEP v2 board, this patch introduces a
function to detect the hardware revision of IGEP board.

  --
 | Id. | Hw Rev. | GPIO 28  |
  --
 |  0  |   B/C   |   high   |
 |  1  |   C |   low|
  --

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   47 ++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 83a30ce..ddb46a3 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -45,6 +45,49 @@
 #define IGEP2_GPIO_WIFI_NPD94
 #define IGEP2_GPIO_WIFI_NRESET 95
 
+/*
+ * IGEP2 Hardware Revision Table
+ *
+ *  --
+ * | Id. | Hw Rev. | HW0 (28) |
+ *  --
+ * |  0  |   B/C   |   high   |
+ * |  1  |   C |   low|
+ *  --
+ */
+
+#define IGEP2_BOARD_HWREV_B0
+#define IGEP2_BOARD_HWREV_C1
+
+static u8 hwrev;
+
+static void __init igep2_get_revision(void)
+{
+   u8 ret;
+
+   omap_mux_init_gpio(IGEP2_GPIO_LED1_RED, OMAP_PIN_INPUT);
+
+   if ((gpio_request(IGEP2_GPIO_LED1_RED, GPIO_HW0_REV) == 0) 
+   (gpio_direction_input(IGEP2_GPIO_LED1_RED) == 0)) {
+   ret = gpio_get_value(IGEP2_GPIO_LED1_RED);
+   if (hwrev == 0) {
+   pr_info(IGEP2: Hardware Revision C (B-NON 
compatible)\n);
+   hwrev = IGEP2_BOARD_HWREV_C;
+   } else if (hwrev ==  1) {
+   pr_info(IGEP2: Hardware Revision B/C (B 
compatible)\n);
+   hwrev = IGEP2_BOARD_HWREV_B;
+   } else {
+   pr_err(IGEP2: Unknow Hardware Revision\n);
+   hwrev = -1;
+   }
+   } else {
+   pr_warning(IGEP2: Could not obtain gpio GPIO_HW0_REV\n);
+   pr_err(IGEP2: Unknow Hardware Revision\n);
+   }
+
+   gpio_free(IGEP2_GPIO_LED1_RED);
+}
+
 #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
 
@@ -537,6 +580,10 @@ static struct omap_board_mux board_mux[] __initdata = {
 static void __init igep2_init(void)
 {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+
+   /* Get IGEP2 hardware revision */
+   igep2_get_revision();
+
igep2_i2c_init();
platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
omap_serial_init();
-- 
1.7.0.4

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


[PATCHv3 5/6] omap3: Add i2c eeprom driver to read EDID on IGEP v2.

2010-10-01 Thread Enric Balletbo i Serra
Add i2c eeprom driver to access monitor EDID binary information
from user space, something that is required by 'decode-edid' and
'parse-edid'.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   24 +---
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index ad4bcb1..e253ebc 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -541,7 +541,7 @@ static struct twl4030_platform_data igep2_twldata = {
 
 };
 
-static struct i2c_board_info __initdata igep2_i2c_boardinfo[] = {
+static struct i2c_board_info __initdata igep2_i2c1_boardinfo[] = {
{
I2C_BOARD_INFO(twl4030, 0x48),
.flags  = I2C_CLIENT_WAKE,
@@ -550,13 +550,23 @@ static struct i2c_board_info __initdata 
igep2_i2c_boardinfo[] = {
},
 };
 
+static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {
+   {
+   I2C_BOARD_INFO(eeprom, 0x50),
+   },
+};
+
 static int __init igep2_i2c_init(void)
 {
-   omap_register_i2c_bus(1, 2600, igep2_i2c_boardinfo,
-   ARRAY_SIZE(igep2_i2c_boardinfo));
-   /* Bus 3 is attached to the DVI port where devices like the pico DLP
-* projector don't work reliably with 400kHz */
-   omap_register_i2c_bus(3, 100, NULL, 0);
+   omap_register_i2c_bus(1, 2600, igep2_i2c1_boardinfo,
+   ARRAY_SIZE(igep2_i2c1_boardinfo));
+   /*
+* Bus 3 is attached to the DVI port where devices like the pico DLP
+* projector don't work reliably with 400kHz
+*/
+   omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo,
+ARRAY_SIZE(igep2_i2c3_boardinfo));
+
return 0;
 }
 
@@ -633,7 +643,7 @@ static void __init igep2_init(void)
 
/* Get IGEP2 hardware revision */
igep2_get_revision();
-
+   /* Register I2C busses and drivers */
igep2_i2c_init();
platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
omap_serial_init();
-- 
1.7.0.4

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


[PATCHv3 6/6] omap3: Remove VMMC2 regulator on IGEP v2.

2010-10-01 Thread Enric Balletbo i Serra
VMMC2 regulator is configured but it's not used for the IGEP v2, so
remove this regulator from board.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   26 +++---
 1 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index e253ebc..19187ae 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -260,10 +260,6 @@ static struct regulator_consumer_supply igep2_vmmc1_supply 
= {
.supply = vmmc,
 };
 
-static struct regulator_consumer_supply igep2_vmmc2_supply = {
-   .supply = vmmc,
-};
-
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
 static struct regulator_init_data igep2_vmmc1 = {
.constraints = {
@@ -279,21 +275,6 @@ static struct regulator_init_data igep2_vmmc1 = {
.consumer_supplies  = igep2_vmmc1_supply,
 };
 
-/* VMMC2 for OMAP VDD_MMC2 (i/o) and MMC2 WIFI */
-static struct regulator_init_data igep2_vmmc2 = {
-   .constraints = {
-   .min_uV = 185,
-   .max_uV = 315,
-   .valid_modes_mask   = REGULATOR_MODE_NORMAL
-   | REGULATOR_MODE_STANDBY,
-   .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
-   | REGULATOR_CHANGE_MODE
-   | REGULATOR_CHANGE_STATUS,
-   },
-   .num_consumer_supplies  = 1,
-   .consumer_supplies  = igep2_vmmc2_supply,
-};
-
 static struct omap2_hsmmc_info mmc[] = {
{
.mmc= 1,
@@ -390,11 +371,11 @@ static int igep2_twl_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc);
 
-   /* link regulators to MMC adapters ... we know the
+   /*
+* link regulators to MMC adapters ... we know the
 * regulators will be set up only *after* we return.
-   */
+*/
igep2_vmmc1_supply.dev = mmc[0].dev;
-   igep2_vmmc2_supply.dev = mmc[1].dev;
 
/*
 * REVISIT: need ehci-omap hooks for external VBUS
@@ -536,7 +517,6 @@ static struct twl4030_platform_data igep2_twldata = {
.codec  = igep2_codec_data,
.gpio   = igep2_twl4030_gpio_pdata,
.vmmc1  = igep2_vmmc1,
-   .vmmc2  = igep2_vmmc2,
.vpll2  = igep2_vpll2,
 
 };
-- 
1.7.0.4

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


[PATCHv3 4/6] omap3: Fix handling some GPIO's for WLAN-BT combo on IGEP v2.

2010-10-01 Thread Enric Balletbo i Serra
Some GPIO's used by WLAN-BT combo on IGEP v2 depends on hardware
revision. This patch handles these GPIO's.

  --
 |   Hw Rev.   | WIFI_NPD | WIFI_NRESET | BT_NRESET |
  --
 |  B  | gpio94  |   gpio95| -  |
 |  B/C (B-compatible) | gpio94  |   gpio95|  gpio137   |
 |  C  | gpio138 |   gpio139   |  gpio137   |
  --

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   94 --
 1 files changed, 67 insertions(+), 27 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index ddb46a3..ad4bcb1 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -38,22 +38,28 @@
 #define IGEP2_SMSC911X_CS   5
 #define IGEP2_SMSC911X_GPIO 176
 #define IGEP2_GPIO_USBH_NRESET  24
-#define IGEP2_GPIO_LED0_GREEN  26
-#define IGEP2_GPIO_LED0_RED27
-#define IGEP2_GPIO_LED1_RED28
-#define IGEP2_GPIO_DVI_PUP 170
-#define IGEP2_GPIO_WIFI_NPD94
-#define IGEP2_GPIO_WIFI_NRESET 95
+#define IGEP2_GPIO_LED0_GREEN   26
+#define IGEP2_GPIO_LED0_RED 27
+#define IGEP2_GPIO_LED1_RED 28
+#define IGEP2_GPIO_DVI_PUP  170
+
+#define IGEP2_RB_GPIO_WIFI_NPD 94
+#define IGEP2_RB_GPIO_WIFI_NRESET  95
+#define IGEP2_RB_GPIO_BT_NRESET137
+#define IGEP2_RC_GPIO_WIFI_NPD 138
+#define IGEP2_RC_GPIO_WIFI_NRESET  139
+#define IGEP2_RC_GPIO_BT_NRESET137
 
 /*
  * IGEP2 Hardware Revision Table
  *
- *  --
- * | Id. | Hw Rev. | HW0 (28) |
- *  --
- * |  0  |   B/C   |   high   |
- * |  1  |   C |   low|
- *  --
+ *  --
+ * | Id. | Hw Rev.| HW0 (28) | WIFI_NPD | WIFI_NRESET | BT_NRESET |
+ *  --
+ * |  0  | B  |   high   |  gpio94  |   gpio95| - |
+ * |  0  | B/C (B-compatible) |   high   |  gpio94  |   gpio95|  gpio137  |
+ * |  1  | C  |   low|  gpio138 |   gpio139   |  gpio137  |
+ *  --
  */
 
 #define IGEP2_BOARD_HWREV_B0
@@ -295,12 +301,14 @@ static struct omap2_hsmmc_info mmc[] = {
.gpio_cd= -EINVAL,
.gpio_wp= -EINVAL,
},
+#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
{
.mmc= 2,
.wires  = 4,
.gpio_cd= -EINVAL,
.gpio_wp= -EINVAL,
},
+#endif
{}  /* Terminator */
 };
 
@@ -577,6 +585,48 @@ static struct omap_board_mux board_mux[] __initdata = {
 #define board_mux  NULL
 #endif
 
+#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
+
+static void __init igep2_wlan_bt_init(void)
+{
+   unsigned npd, wreset, btreset;
+
+   /* GPIO's for WLAN-BT combo depends on hardware revision */
+   if (hwrev == IGEP2_BOARD_HWREV_B) {
+   npd = IGEP2_RB_GPIO_WIFI_NPD;
+   wreset = IGEP2_RB_GPIO_WIFI_NRESET;
+   btreset = IGEP2_RB_GPIO_BT_NRESET;
+   } else if (hwrev == IGEP2_BOARD_HWREV_B) {
+   npd = IGEP2_RC_GPIO_WIFI_NPD;
+   wreset = IGEP2_RC_GPIO_WIFI_NRESET;
+   btreset = IGEP2_RC_GPIO_BT_NRESET;
+   } else
+   return;
+
+   /* Set GPIO's for  WLAN-BT combo module */
+   if ((gpio_request(npd, GPIO_WIFI_NPD) == 0) 
+   (gpio_direction_output(npd, 1) == 0)) {
+   gpio_export(npd, 0);
+   } else
+   pr_warning(IGEP2: Could not obtain gpio GPIO_WIFI_NPD\n);
+
+   if ((gpio_request(wreset, GPIO_WIFI_NRESET) == 0) 
+   (gpio_direction_output(wreset, 1) == 0)) {
+   gpio_export(wreset, 0);
+   gpio_set_value(wreset, 0);
+   udelay(10);
+   gpio_set_value(wreset, 1);
+   } else
+   pr_warning(IGEP2: Could not obtain gpio GPIO_WIFI_NRESET\n);
+
+   if ((gpio_request(btreset, GPIO_BT_NRESET) == 0) 
+   (gpio_direction_output(btreset, 1) == 0)) {
+   gpio_export(btreset, 0);
+   } else
+   pr_warning(IGEP2: Could not obtain gpio GPIO_BT_NRESET\n);
+}
+#endif
+
 static void __init igep2_init(void)
 {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -595,22 +645,12 @@ static void __init igep2_init(void)
igep2_display_init();
igep2_init_smsc911x();
 
-   /* GPIO W-LAN + Bluetooth combo module */
-   if ((gpio_request(IGEP2_GPIO_WIFI_NPD, GPIO_WIFI_NPD

[PATCH] omap3: Add minimal OMAP3 IGEP module support.

2010-10-01 Thread Enric Balletbo i Serra
The OMAP3 IGEP module is a low-power, high performance production-ready
system-on-module (SOM) based on TI's OMAP3 family.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/Kconfig  |5 +
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/board-igep0030.c |  412 ++
 3 files changed, 419 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-igep0030.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index b48bacf..233bfbe 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -220,6 +220,11 @@ config MACH_IGEP0020
default y
select OMAP_PACKAGE_CBB
 
+config MACH_IGEP0030
+   bool IGEP OMAP3 module
+   depends on ARCH_OMAP3
+   select OMAP_PACKAGE_CBB
+
 config MACH_SBC3530
bool OMAP3 SBC STALKER board
depends on ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 88d3a1e..71386d4 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -148,6 +148,8 @@ obj-$(CONFIG_MACH_CM_T35)   += board-cm-t35.o \
   hsmmc.o
 obj-$(CONFIG_MACH_IGEP0020)+= board-igep0020.o \
   hsmmc.o
+obj-$(CONFIG_MACH_IGEP0030)+= board-igep0030.o \
+  hsmmc.o
 obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
   hsmmc.o
 obj-$(CONFIG_MACH_OMAP_4430SDP)+= board-4430sdp.o \
diff --git a/arch/arm/mach-omap2/board-igep0030.c 
b/arch/arm/mach-omap2/board-igep0030.c
new file mode 100644
index 000..7313ef5
--- /dev/null
+++ b/arch/arm/mach-omap2/board-igep0030.c
@@ -0,0 +1,412 @@
+/*
+ * Copyright (C) 2010 - ISEE 2007 SL
+ *
+ * Modified from mach-omap2/board-generic.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/delay.h
+#include linux/err.h
+#include linux/clk.h
+#include linux/io.h
+#include linux/gpio.h
+#include linux/interrupt.h
+
+#include linux/regulator/machine.h
+#include linux/i2c/twl.h
+
+#include asm/mach-types.h
+#include asm/mach/arch.h
+
+#include plat/board.h
+#include plat/common.h
+#include plat/gpmc.h
+#include plat/usb.h
+#include plat/onenand.h
+
+#include mux.h
+#include hsmmc.h
+#include sdram-numonyx-m65kam.h
+
+#define IGEP3_GPIO_LED0_GREEN  54
+#define IGEP3_GPIO_LED0_RED53
+#define IGEP3_GPIO_LED1_RED16
+
+#define IGEP3_GPIO_WIFI_NPD138
+#define IGEP3_GPIO_WIFI_NRESET 139
+#define IGEP3_GPIO_BT_NRESET   137
+
+#define IGEP3_GPIO_USBH_NRESET  115
+
+
+#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
+   defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
+
+#define ONENAND_MAP 0x2000
+
+/*
+ * x2 Flash built-in COMBO POP MEMORY
+ * Since the device is equipped with two DataRAMs, and two-plane NAND
+ * Flash memory array, these two component enables simultaneous program
+ * of 4KiB. Plane1 has only even blocks such as block0, block2, block4
+ * while Plane2 has only odd blocks such as block1, block3, block5.
+ * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048)
+ */
+
+static struct mtd_partition igep3_onenand_partitions[] = {
+   {
+   .name   = X-Loader,
+   .offset = 0,
+   .size   = 2 * (64*(2*2048))
+   },
+   {
+   .name   = U-Boot,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 6 * (64*(2*2048)),
+   },
+   {
+   .name   = Environment,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 2 * (64*(2*2048)),
+   },
+   {
+   .name   = Kernel,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 12 * (64*(2*2048)),
+   },
+   {
+   .name   = File System,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = MTDPART_SIZ_FULL,
+   },
+};
+
+static int igep3_onenand_setup(void __iomem *onenand_base, int freq)
+{
+   /* nothing is required to be setup for onenand as of now */
+   return 0;
+}
+
+static struct omap_onenand_platform_data igep3_onenand_pdata = {
+   .parts = igep3_onenand_partitions,
+   .nr_parts = ARRAY_SIZE(igep3_onenand_partitions),
+   .onenand_setup = igep3_onenand_setup,
+   .dma_channel= -1,   /* disable DMA in OMAP OneNAND driver */
+};
+
+static struct platform_device igep3_onenand_device = {
+   .name   = omap2-onenand,
+   .id = -1

[PATCH 0/6] omap3: Various fixes and improvements for IGEP v2 board.

2010-09-25 Thread Enric Balletbo i Serra
Hello,

These patch series fixes and improves the support for IGEP v2 board. Please
consider to add in next merge window, thanks.

Kind regards,
  Enric

--
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/6] omap3: Add GPIO's for external VBUS power switch and overcurrent detect on IGEP v2 board.

2010-09-25 Thread Enric Balletbo i Serra
Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   14 ++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 175f043..1052a63 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -274,6 +274,20 @@ static int igep2_twl_gpio_setup(struct device *dev,
igep2_vmmc1_supply.dev = mmc[0].dev;
igep2_vmmc2_supply.dev = mmc[1].dev;
 
+   /*
+* REVISIT: need ehci-omap hooks for external VBUS
+* power switch and overcurrent detect
+*/
+   gpio_request(gpio + 1, GPIO_EHCI_NOC);
+   gpio_direction_input(gpio + 1);
+
+   /*
+* TWL4030_GPIO_MAX + 0 == ledA, GPIO_USBH_CPEN
+* (out, active low)
+*/
+   gpio_request(gpio + TWL4030_GPIO_MAX, 0);
+   gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+
return 0;
 };
 
-- 
1.7.0.4

--
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/6] omap3: fix and improve the LED handling on IGEP v2 board.

2010-09-25 Thread Enric Balletbo i Serra
The IGEP v2 board has four leds, this patch allows control all
of these LEDs using the LED class if CONFIG_LEDS_GPIO is selected
or using the General Purpose Input/Output (GPIO) interface if
CONFIG_LEDS_GPIO is not selected.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |  156 +++---
 1 files changed, 87 insertions(+), 69 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 1052a63..9f25d0d 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -261,6 +261,77 @@ static struct omap2_hsmmc_info mmc[] = {
{}  /* Terminator */
 };
 
+#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
+#include linux/leds.h
+
+static struct gpio_led igep2_gpio_leds[] = {
+   [0] = {
+   .name = gpio-led:red:d0,
+   .gpio = IGEP2_GPIO_LED0_RED,
+   .default_trigger = default-off
+   },
+   [1] = {
+   .name = gpio-led:green:d0,
+   .gpio = IGEP2_GPIO_LED0_GREEN,
+   .default_trigger = default-off,
+   },
+   [2] = {
+   .name = gpio-led:red:d1,
+   .gpio = IGEP2_GPIO_LED1_RED,
+   .default_trigger = default-off,
+   },
+   [3] = {
+   .name = gpio-led:green:d1,
+   .default_trigger = heartbeat,
+   .gpio = -EINVAL, /* gets replaced */
+   },
+};
+
+static struct gpio_led_platform_data igep2_led_pdata = {
+   .leds   = igep2_gpio_leds,
+   .num_leds   = ARRAY_SIZE(igep2_gpio_leds),
+};
+
+static struct platform_device igep2_led_device = {
+.name   = leds-gpio,
+.id = -1,
+.dev= {
+.platform_data  =  igep2_led_pdata,
+   },
+};
+
+static void __init igep2_leds_init(void)
+{
+   platform_device_register(igep2_led_device);
+}
+
+#else
+static inline void igep2_leds_init(void)
+{
+   if ((gpio_request(IGEP2_GPIO_LED0_RED, gpio-led:red:d0) == 0) 
+   (gpio_direction_output(IGEP2_GPIO_LED0_RED, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED0_RED, 0);
+   gpio_set_value(IGEP2_GPIO_LED0_RED, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED0_RED\n);
+
+   if ((gpio_request(IGEP2_GPIO_LED0_GREEN, gpio-led:green:d0) == 0) 
+   (gpio_direction_output(IGEP2_GPIO_LED0_GREEN, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED0_GREEN, 0);
+   gpio_set_value(IGEP2_GPIO_LED0_GREEN, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED0_GREEN\n);
+
+   if ((gpio_request(IGEP2_GPIO_LED1_RED, gpio-led:red:d1) == 0) 
+   (gpio_direction_output(IGEP2_GPIO_LED1_RED, 1) == 0)) {
+   gpio_export(IGEP2_GPIO_LED1_RED, 0);
+   gpio_set_value(IGEP2_GPIO_LED1_RED, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED1_RED\n);
+
+}
+#endif
+
 static int igep2_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
 {
@@ -288,14 +359,26 @@ static int igep2_twl_gpio_setup(struct device *dev,
gpio_request(gpio + TWL4030_GPIO_MAX, 0);
gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
 
+   /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
+#if !defined(CONFIG_LEDS_GPIO)  !defined(CONFIG_LEDS_GPIO_MODULE)
+   if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, gpio-led:green:d1) == 0)
+(gpio_direction_output(gpio + TWL4030_GPIO_MAX + 1, 1) == 0)) {
+   gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);
+   gpio_set_value(gpio + TWL4030_GPIO_MAX + 1, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED1_GREEN\n);
+#else
+   igep2_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
+#endif
+
return 0;
 };
 
-static struct twl4030_gpio_platform_data igep2_gpio_data = {
+static struct twl4030_gpio_platform_data igep2_twl4030_gpio_pdata = {
.gpio_base  = OMAP_MAX_GPIO_LINES,
.irq_base   = TWL4030_GPIO_IRQ_BASE,
.irq_end= TWL4030_GPIO_IRQ_END,
-   .use_leds   = false,
+   .use_leds   = true,
.setup  = igep2_twl_gpio_setup,
 };
 
@@ -369,47 +452,6 @@ static void __init igep2_display_init(void)
pr_err(IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n);
 }
 
-#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-#include linux/leds.h
-
-static struct gpio_led igep2_gpio_leds[] = {
-   {
-   .name = led0:red,
-   .gpio = IGEP2_GPIO_LED0_RED,
-   },
-   {
-   .name = led0:green,
-   .default_trigger = heartbeat,
-   .gpio = IGEP2_GPIO_LED0_GREEN,
-   },
-   {
-   .name = led1:red,
-   .gpio = IGEP2_GPIO_LED1_RED

[PATCH 3/6] omap3: Introduce function to detect the IGEP v2 hardware revision.

2010-09-25 Thread Enric Balletbo i Serra
Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   47 ++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 9f25d0d..a386425 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -45,6 +45,49 @@
 #define IGEP2_GPIO_WIFI_NPD94
 #define IGEP2_GPIO_WIFI_NRESET 95
 
+/*
+ * IGEP2 Hardware Revision Table
+ *
+ *  --
+ * | Id. | Hw Rev. | HW0 (28) |
+ *  --
+ * |  0  |   B/C   |   high   |
+ * |  1  |   C |   low|
+ *  --
+ */
+
+#define IGEP2_BOARD_HWREV_B0
+#define IGEP2_BOARD_HWREV_C1
+
+static u8 hwrev;
+
+static void __init igep2_get_revision(void)
+{
+   u8 ret;
+
+   omap_mux_init_gpio(IGEP2_GPIO_LED1_RED, OMAP_PIN_INPUT);
+
+   if ((gpio_request(IGEP2_GPIO_LED1_RED, GPIO_HW0_REV) == 0) 
+   (gpio_direction_input(IGEP2_GPIO_LED1_RED) == 0)) {
+   ret = gpio_get_value(IGEP2_GPIO_LED1_RED);
+   if (hwrev == 0) {
+   pr_info(IGEP2: Hardware Revision C (B-NON 
compatible)\n);
+   hwrev = IGEP2_BOARD_HWREV_C;
+   } else if (hwrev ==  1) {
+   pr_info(IGEP2: Hardware Revision B/C (B 
compatible)\n);
+   hwrev = IGEP2_BOARD_HWREV_B;
+   } else {
+   pr_err(IGEP2: Unknow Hardware Revision\n);
+   hwrev = -1;
+   }
+   } else {
+   pr_warning(IGEP2: Could not obtain gpio GPIO_HW0_REV\n);
+   pr_err(IGEP2: Unknow Hardware Revision\n);
+   }
+
+   gpio_free(IGEP2_GPIO_LED1_RED);
+}
+
 #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
 
@@ -535,6 +578,10 @@ static struct omap_board_mux board_mux[] __initdata = {
 static void __init igep2_init(void)
 {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+
+   /* Get IGEP2 hardware revision */
+   igep2_get_revision();
+
igep2_i2c_init();
platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
omap_serial_init();
-- 
1.7.0.4

--
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/6] omap3: Fix handling some GPIO's for WLAN-BT combo on IGEP v2.

2010-09-25 Thread Enric Balletbo i Serra
Some GPIO's used by WLAN-BT combo on IGEP v2 depends on hardware
revision. This patch handles these GPIO's.

  --
 |   Hw Rev.   | WIFI_NPD | WIFI_NRESET | BT_NRESET |
  --
 |  B  | gpio94  |   gpio95| -  |
 |  B/C (B-compatible) | gpio94  |   gpio95|  gpio137   |
 |  C  | gpio138 |   gpio139   |  gpio137   |
  --

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   94 --
 1 files changed, 67 insertions(+), 27 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index a386425..ec7da7f 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -38,22 +38,28 @@
 #define IGEP2_SMSC911X_CS   5
 #define IGEP2_SMSC911X_GPIO 176
 #define IGEP2_GPIO_USBH_NRESET  24
-#define IGEP2_GPIO_LED0_GREEN  26
-#define IGEP2_GPIO_LED0_RED27
-#define IGEP2_GPIO_LED1_RED28
-#define IGEP2_GPIO_DVI_PUP 170
-#define IGEP2_GPIO_WIFI_NPD94
-#define IGEP2_GPIO_WIFI_NRESET 95
+#define IGEP2_GPIO_LED0_GREEN   26
+#define IGEP2_GPIO_LED0_RED 27
+#define IGEP2_GPIO_LED1_RED 28
+#define IGEP2_GPIO_DVI_PUP  170
+
+#define IGEP2_RB_GPIO_WIFI_NPD 94
+#define IGEP2_RB_GPIO_WIFI_NRESET  95
+#define IGEP2_RB_GPIO_BT_NRESET137
+#define IGEP2_RC_GPIO_WIFI_NPD 138
+#define IGEP2_RC_GPIO_WIFI_NRESET  139
+#define IGEP2_RC_GPIO_BT_NRESET137
 
 /*
  * IGEP2 Hardware Revision Table
  *
- *  --
- * | Id. | Hw Rev. | HW0 (28) |
- *  --
- * |  0  |   B/C   |   high   |
- * |  1  |   C |   low|
- *  --
+ *  --
+ * | Id. | Hw Rev.| HW0 (28) | WIFI_NPD | WIFI_NRESET | BT_NRESET |
+ *  --
+ * |  0  | B  |   high   |  gpio94  |   gpio95| - |
+ * |  0  | B/C (B-compatible) |   high   |  gpio94  |   gpio95|  gpio137  |
+ * |  1  | C  |   low|  gpio138 |   gpio139   |  gpio137  |
+ *  --
  */
 
 #define IGEP2_BOARD_HWREV_B0
@@ -295,12 +301,14 @@ static struct omap2_hsmmc_info mmc[] = {
.gpio_cd= -EINVAL,
.gpio_wp= -EINVAL,
},
+#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
{
.mmc= 2,
.wires  = 4,
.gpio_cd= -EINVAL,
.gpio_wp= -EINVAL,
},
+#endif
{}  /* Terminator */
 };
 
@@ -575,6 +583,48 @@ static struct omap_board_mux board_mux[] __initdata = {
 #define board_mux  NULL
 #endif
 
+#if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
+
+static void __init igep2_wlan_bt_init(void)
+{
+   unsigned npd, wreset, btreset;
+
+   /* GPIO's for WLAN-BT combo depends on hardware revision */
+   if (hwrev == IGEP2_BOARD_HWREV_B) {
+   npd = IGEP2_RB_GPIO_WIFI_NPD;
+   wreset = IGEP2_RB_GPIO_WIFI_NRESET;
+   btreset = IGEP2_RB_GPIO_BT_NRESET;
+   } else if (hwrev == IGEP2_BOARD_HWREV_B) {
+   npd = IGEP2_RC_GPIO_WIFI_NPD;
+   wreset = IGEP2_RC_GPIO_WIFI_NRESET;
+   btreset = IGEP2_RC_GPIO_BT_NRESET;
+   } else
+   return;
+
+   /* Set GPIO's for  WLAN-BT combo module */
+   if ((gpio_request(npd, GPIO_WIFI_NPD) == 0) 
+   (gpio_direction_output(npd, 1) == 0)) {
+   gpio_export(npd, 0);
+   } else
+   pr_warning(IGEP2: Could not obtain gpio GPIO_WIFI_NPD\n);
+
+   if ((gpio_request(wreset, GPIO_WIFI_NRESET) == 0) 
+   (gpio_direction_output(wreset, 1) == 0)) {
+   gpio_export(wreset, 0);
+   gpio_set_value(wreset, 0);
+   udelay(10);
+   gpio_set_value(wreset, 1);
+   } else
+   pr_warning(IGEP2: Could not obtain gpio GPIO_WIFI_NRESET\n);
+
+   if ((gpio_request(btreset, GPIO_BT_NRESET) == 0) 
+   (gpio_direction_output(btreset, 1) == 0)) {
+   gpio_export(btreset, 0);
+   } else
+   pr_warning(IGEP2: Could not obtain gpio GPIO_BT_NRESET\n);
+}
+#endif
+
 static void __init igep2_init(void)
 {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
@@ -593,22 +643,12 @@ static void __init igep2_init(void)
igep2_display_init();
igep2_init_smsc911x();
 
-   /* GPIO W-LAN + Bluetooth combo module */
-   if ((gpio_request(IGEP2_GPIO_WIFI_NPD, GPIO_WIFI_NPD

[PATCH 5/6] omap3: Add i2c eeprom driver to read EDID on IGEP v2.

2010-09-25 Thread Enric Balletbo i Serra
Add i2c eeprom driver to access monitor EDID binary information
from user space, something that is required by 'decode-edid' and
'parse-edid'.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   24 +---
 1 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index ec7da7f..c5eaa43 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -539,7 +539,7 @@ static struct twl4030_platform_data igep2_twldata = {
 
 };
 
-static struct i2c_board_info __initdata igep2_i2c_boardinfo[] = {
+static struct i2c_board_info __initdata igep2_i2c1_boardinfo[] = {
{
I2C_BOARD_INFO(twl4030, 0x48),
.flags  = I2C_CLIENT_WAKE,
@@ -548,13 +548,23 @@ static struct i2c_board_info __initdata 
igep2_i2c_boardinfo[] = {
},
 };
 
+static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = {
+   {
+   I2C_BOARD_INFO(eeprom, 0x50),
+   },
+};
+
 static int __init igep2_i2c_init(void)
 {
-   omap_register_i2c_bus(1, 2600, igep2_i2c_boardinfo,
-   ARRAY_SIZE(igep2_i2c_boardinfo));
-   /* Bus 3 is attached to the DVI port where devices like the pico DLP
-* projector don't work reliably with 400kHz */
-   omap_register_i2c_bus(3, 100, NULL, 0);
+   omap_register_i2c_bus(1, 2600, igep2_i2c1_boardinfo,
+   ARRAY_SIZE(igep2_i2c1_boardinfo));
+   /*
+* Bus 3 is attached to the DVI port where devices like the pico DLP
+* projector don't work reliably with 400kHz
+*/
+   omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo,
+ARRAY_SIZE(igep2_i2c3_boardinfo));
+
return 0;
 }
 
@@ -631,7 +641,7 @@ static void __init igep2_init(void)
 
/* Get IGEP2 hardware revision */
igep2_get_revision();
-
+   /* Register I2C busses and drivers */
igep2_i2c_init();
platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
omap_serial_init();
-- 
1.7.0.4

--
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 6/6] omap3: Remove VMMC2 regulator on IGEP v2 because it's not used.

2010-09-25 Thread Enric Balletbo i Serra
Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   26 +++---
 1 files changed, 3 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index c5eaa43..fa450b1 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -260,10 +260,6 @@ static struct regulator_consumer_supply igep2_vmmc1_supply 
= {
.supply = vmmc,
 };
 
-static struct regulator_consumer_supply igep2_vmmc2_supply = {
-   .supply = vmmc,
-};
-
 /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
 static struct regulator_init_data igep2_vmmc1 = {
.constraints = {
@@ -279,21 +275,6 @@ static struct regulator_init_data igep2_vmmc1 = {
.consumer_supplies  = igep2_vmmc1_supply,
 };
 
-/* VMMC2 for OMAP VDD_MMC2 (i/o) and MMC2 WIFI */
-static struct regulator_init_data igep2_vmmc2 = {
-   .constraints = {
-   .min_uV = 185,
-   .max_uV = 315,
-   .valid_modes_mask   = REGULATOR_MODE_NORMAL
-   | REGULATOR_MODE_STANDBY,
-   .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
-   | REGULATOR_CHANGE_MODE
-   | REGULATOR_CHANGE_STATUS,
-   },
-   .num_consumer_supplies  = 1,
-   .consumer_supplies  = igep2_vmmc2_supply,
-};
-
 static struct omap2_hsmmc_info mmc[] = {
{
.mmc= 1,
@@ -390,11 +371,11 @@ static int igep2_twl_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc);
 
-   /* link regulators to MMC adapters ... we know the
+   /*
+* link regulators to MMC adapters ... we know the
 * regulators will be set up only *after* we return.
-   */
+*/
igep2_vmmc1_supply.dev = mmc[0].dev;
-   igep2_vmmc2_supply.dev = mmc[1].dev;
 
/*
 * REVISIT: need ehci-omap hooks for external VBUS
@@ -534,7 +515,6 @@ static struct twl4030_platform_data igep2_twldata = {
.codec  = igep2_codec_data,
.gpio   = igep2_twl4030_gpio_pdata,
.vmmc1  = igep2_vmmc1,
-   .vmmc2  = igep2_vmmc2,
.vpll2  = igep2_vpll2,
 
 };
-- 
1.7.0.4

--
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/4] omap3: Various fixes for IGEP platforms.

2010-08-03 Thread Enric Balletbo i Serra
Hello,

Please consider to add these patch which improves the support for IGEP v2 
platform and adds support
for the new IGEP OMAP3 module.

$ git diff --stat origin/master
 arch/arm/mach-omap2/Kconfig  |5 +
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/board-igep0020.c |  212 -
 arch/arm/mach-omap2/board-igep0030.c |  436 ++
 4 files changed, 594 insertions(+), 61 deletions(-)

Thanks in advance,

Enric
--
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/4] omap3: configure GPIO's for external VBUS power switch and overcurrent detect on IGEP v2 board.

2010-08-03 Thread Enric Balletbo i Serra
From: Enric Balletbo i Serra eballe...@iseebcn.com


Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index 6b5f9c8..d88fc08 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -285,6 +285,16 @@ static int igep2_twl_gpio_setup(struct device *dev,
igep2_vmmc1_supply.dev = mmc[0].dev;
igep2_vmmc2_supply.dev = mmc[1].dev;
 
+   /* REVISIT: need ehci-omap hooks for external VBUS
+* power switch and overcurrent detect
+*/
+   gpio_request(gpio + 1, GPIO_EHCI_NOC);
+   gpio_direction_input(gpio + 1);
+
+   /* TWL4030_GPIO_MAX + 0 == ledA, GPIO_USBH_CPEN (out, active low) */
+   gpio_request(gpio + TWL4030_GPIO_MAX, GPIO_USB_CPEN);
+   gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
+
return 0;
 };
 
-- 
1.7.0.4

--
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/4] omap3: GPIO's for W-LAN + Bluetooth combo depends on IGEP v2 hardware revision.

2010-08-03 Thread Enric Balletbo i Serra
From: Enric Balletbo i Serra eballe...@iseebcn.com

This patch adds support to detect IGEP v2 hardware revision and configure
GPIO's for W-LAN + Bluetooth combo which depends on hardware revision.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |   99 +++---
 1 files changed, 80 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index d55c57b..6b5f9c8 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -42,8 +42,19 @@
 #define IGEP2_GPIO_LED0_RED27
 #define IGEP2_GPIO_LED1_RED28
 #define IGEP2_GPIO_DVI_PUP 170
-#define IGEP2_GPIO_WIFI_NPD94
-#define IGEP2_GPIO_WIFI_NRESET 95
+
+/*  HIGH : It is a rev. B or C (B-compatible) board
+LOW  : It is a rev. C (B-NON compatible) board */
+#define IGEP2_GPIO_HW_REV  28
+
+/* Platform: IGEP v2 Hw Rev. B / C (B-compatible) */
+#define IGEP2_RB_GPIO_WIFI_NPD 94
+#define IGEP2_RB_GPIO_WIFI_NRESET  95
+#define IGEP2_RB_GPIO_BT_NRESET137
+/* Platform: IGEP v2 Hw Rev. C (B-non compatible) */
+#define IGEP2_RC_GPIO_WIFI_NPD 138
+#define IGEP2_RC_GPIO_WIFI_NRESET  139
+#define IGEP2_RC_GPIO_BT_NRESET137
 
 #if defined(CONFIG_MTD_ONENAND_OMAP2) || \
defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
@@ -476,8 +487,66 @@ static struct omap_board_mux board_mux[] __initdata = {
 #define board_mux  NULL
 #endif
 
+static int igep2_get_hw_rev(void)
+{
+   int ret = -1;
+
+   if ((gpio_request(IGEP2_GPIO_HW_REV, GPIO_HW_REV) == 0) 
+   (gpio_direction_input(IGEP2_GPIO_HW_REV) == 0))
+   ret = gpio_get_value(IGEP2_GPIO_HW_REV);
+   else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_HW_REV\n);
+
+   gpio_free(IGEP2_GPIO_HW_REV);
+
+   return ret;
+}
+
+static void __init igep2_init_wifi_bt(void)
+{
+   int hwrev;
+   unsigned npd, wreset, btreset;
+
+   hwrev = igep2_get_hw_rev();
+
+   /* GPIO's for W-LAN + Bluetooth combo depends on hardware revision */
+   if (hwrev) {
+   npd = IGEP2_RB_GPIO_WIFI_NPD;
+   wreset = IGEP2_RB_GPIO_WIFI_NRESET;
+   btreset = IGEP2_RB_GPIO_BT_NRESET;
+   } else {
+   npd = IGEP2_RC_GPIO_WIFI_NPD;
+   wreset = IGEP2_RC_GPIO_WIFI_NRESET;
+   btreset = IGEP2_RC_GPIO_BT_NRESET;
+   }
+
+   /* Set GPIO's for  W-LAN + Bluetooth combo module */
+   if ((gpio_request(npd, GPIO_WIFI_NPD) == 0) 
+   (gpio_direction_output(npd, 1) == 0)) {
+   gpio_export(npd, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_WIFI_NPD\n);
+
+   if ((gpio_request(wreset, GPIO_WIFI_NRESET) == 0) 
+   (gpio_direction_output(wreset, 1) == 0)) {
+   gpio_export(wreset, 0);
+   gpio_set_value(wreset, 0);
+   udelay(10);
+   gpio_set_value(wreset, 1);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_WIFI_NRESET\n);
+
+   if ((gpio_request(btreset, GPIO_BT_NRESET) == 0) 
+   (gpio_direction_output(btreset, 1) == 0)) {
+   gpio_export(btreset, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_BT_NRESET\n);
+}
+
 static void __init igep2_init(void)
 {
+   int hwrev;
+
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
igep2_i2c_init();
platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
@@ -485,10 +554,19 @@ static void __init igep2_init(void)
usb_musb_init(musb_board_data);
usb_ehci_init(ehci_pdata);
 
+   hwrev = igep2_get_hw_rev();
+   if (hwrev == 0)
+   pr_info(IGEP platform: IGEP v2 Hw Rev. C (B-NON 
compatible)\n);
+   else if (hwrev ==  1)
+   pr_info(IGEP platform: IGEP v2 Hw Rev. B/C (B compatible)\n);
+   else
+   pr_err(IGEP platform: Unknow\n);
+
igep2_flash_init();
igep2_init_led();
igep2_display_init();
igep2_init_smsc911x();
+   igep2_init_wifi_bt();
 
/* GPIO userspace leds */
 #if !defined(CONFIG_LEDS_GPIO)  !defined(CONFIG_LEDS_GPIO_MODULE)
@@ -513,23 +591,6 @@ static void __init igep2_init(void)
} else
pr_warning(IGEP v2: Could not obtain gpio GPIO_LED1_RED\n);
 #endif
-
-   /* GPIO W-LAN + Bluetooth combo module */
-   if ((gpio_request(IGEP2_GPIO_WIFI_NPD, GPIO_WIFI_NPD) == 0) 
-   (gpio_direction_output(IGEP2_GPIO_WIFI_NPD, 1) == 0)) {
-   gpio_export(IGEP2_GPIO_WIFI_NPD, 0);
-/* gpio_set_value(IGEP2_GPIO_WIFI_NPD, 0); */
-   } else
-   pr_warning(IGEP v2: Could not obtain gpio GPIO_WIFI_NPD\n);
-
-   if ((gpio_request(IGEP2_GPIO_WIFI_NRESET, GPIO_WIFI_NRESET) == 0

[PATCH 3/4] omap3: fix and improve the LED handling on IGEP v2 board.

2010-08-03 Thread Enric Balletbo i Serra
From: Enric Balletbo i Serra eballe...@iseebcn.com

The IGEP v2 board has four leds, this patch allows control all
of these LEDs using the LED class if CONFIG_LEDS_GPIO is selected
or using the General Purpose Input/Output (GPIO) interface if
CONFIG_LEDS_GPIO is not selected.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/board-igep0020.c |  103 --
 1 files changed, 61 insertions(+), 42 deletions(-)

diff --git a/arch/arm/mach-omap2/board-igep0020.c 
b/arch/arm/mach-omap2/board-igep0020.c
index d88fc08..6868dda 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -272,6 +272,54 @@ static struct omap2_hsmmc_info mmc[] = {
{}  /* Terminator */
 };
 
+#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
+#include linux/leds.h
+
+static struct gpio_led igep2_gpio_leds[] = {
+   [0] = {
+   .name = led0:red,
+   .gpio = IGEP2_GPIO_LED0_RED,
+   .default_trigger = default-off,
+   },
+   [1] = {
+   .name = led0:green,
+   .gpio = IGEP2_GPIO_LED0_GREEN,
+   .default_trigger = default-off,
+   },
+   [2] = {
+   .name = led1:red,
+   .gpio = IGEP2_GPIO_LED1_RED,
+   .default_trigger = default-off,
+   },
+   [3] = {
+   .name = led1:green,
+   .default_trigger = heartbeat,
+   .gpio = -EINVAL, /* gets replaced */
+   },
+};
+
+static struct gpio_led_platform_data igep2_led_pdata = {
+   .leds   = igep2_gpio_leds,
+   .num_leds   = ARRAY_SIZE(igep2_gpio_leds),
+};
+
+static struct platform_device igep2_led_device = {
+.name   = leds-gpio,
+.id = -1,
+.dev= {
+.platform_data  =  igep2_led_pdata,
+   },
+};
+
+static void __init igep2_init_led(void)
+{
+   platform_device_register(igep2_led_device);
+}
+
+#else
+static inline void igep2_init_led(void) {}
+#endif
+
 static int igep2_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
 {
@@ -295,6 +343,18 @@ static int igep2_twl_gpio_setup(struct device *dev,
gpio_request(gpio + TWL4030_GPIO_MAX, GPIO_USB_CPEN);
gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0);
 
+   /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
+#if !defined(CONFIG_LEDS_GPIO)  !defined(CONFIG_LEDS_GPIO_MODULE)
+   if ((gpio_request(gpio + TWL4030_GPIO_MAX + 1, led1:green) == 0) 
+   (gpio_direction_output(gpio + TWL4030_GPIO_MAX + 1, 1) == 0)) {
+   gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);
+   gpio_set_value(gpio + TWL4030_GPIO_MAX + 1, 0);
+   } else
+   pr_warning(IGEP v2: Could not obtain gpio GPIO_LED1_GREEN\n);
+#else
+   igep2_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
+#endif
+
return 0;
 };
 
@@ -302,7 +362,7 @@ static struct twl4030_gpio_platform_data igep2_gpio_data = {
.gpio_base  = OMAP_MAX_GPIO_LINES,
.irq_base   = TWL4030_GPIO_IRQ_BASE,
.irq_end= TWL4030_GPIO_IRQ_END,
-   .use_leds   = false,
+   .use_leds   = true,
.setup  = igep2_twl_gpio_setup,
 };
 
@@ -376,47 +436,6 @@ static void __init igep2_display_init(void)
pr_err(IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n);
 }
 
-#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-#include linux/leds.h
-
-static struct gpio_led igep2_gpio_leds[] = {
-   {
-   .name = led0:red,
-   .gpio = IGEP2_GPIO_LED0_RED,
-   },
-   {
-   .name = led0:green,
-   .default_trigger = heartbeat,
-   .gpio = IGEP2_GPIO_LED0_GREEN,
-   },
-   {
-   .name = led1:red,
-   .gpio = IGEP2_GPIO_LED1_RED,
-   },
-};
-
-static struct gpio_led_platform_data igep2_led_pdata = {
-   .leds   = igep2_gpio_leds,
-   .num_leds   = ARRAY_SIZE(igep2_gpio_leds),
-};
-
-static struct platform_device igep2_led_device = {
-.name   = leds-gpio,
-.id = -1,
-.dev= {
-.platform_data  =  igep2_led_pdata,
-   },
-};
-
-static void __init igep2_init_led(void)
-{
-   platform_device_register(igep2_led_device);
-}
-
-#else
-static inline void igep2_init_led(void) {}
-#endif
-
 static struct platform_device *igep2_devices[] __initdata = {
igep2_dss_device,
 };
-- 
1.7.0.4

--
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/4] omap3: Add minimal OMAP3 IGEP module support.

2010-08-03 Thread Enric Balletbo i Serra
The OMAP3 IGEP module is a low-power, high performance production-ready
system-on-module (SOM) based on TI's OMAP3 family.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 arch/arm/mach-omap2/Kconfig  |5 +
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/board-igep0030.c |  436 ++
 3 files changed, 443 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-igep0030.c

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index b31b6f1..db8bd18 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -142,6 +142,11 @@ config MACH_IGEP0020
depends on ARCH_OMAP3
select OMAP_PACKAGE_CBB
 
+config MACH_IGEP0030
+   bool IGEP OMAP3 module
+   depends on ARCH_OMAP3
+   select OMAP_PACKAGE_CBB
+
 config MACH_SBC3530
bool OMAP3 SBC STALKER board
depends on ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index ea52b03..fab0222 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -136,6 +136,8 @@ obj-$(CONFIG_MACH_CM_T35)   += board-cm-t35.o \
   hsmmc.o
 obj-$(CONFIG_MACH_IGEP0020)+= board-igep0020.o \
   hsmmc.o
+obj-$(CONFIG_MACH_IGEP0030)+= board-igep0030.o \
+  hsmmc.o
 obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK) += board-omap3touchbook.o \
   hsmmc.o
 obj-$(CONFIG_MACH_OMAP_4430SDP)+= board-4430sdp.o \
diff --git a/arch/arm/mach-omap2/board-igep0030.c 
b/arch/arm/mach-omap2/board-igep0030.c
new file mode 100644
index 000..936bf98
--- /dev/null
+++ b/arch/arm/mach-omap2/board-igep0030.c
@@ -0,0 +1,436 @@
+/*
+ * Copyright (C) 2010 Integration Software and Electronic Engineering.
+ *
+ * Modified from mach-omap2/board-generic.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include linux/kernel.h
+#include linux/init.h
+#include linux/platform_device.h
+#include linux/delay.h
+#include linux/err.h
+#include linux/clk.h
+#include linux/io.h
+#include linux/gpio.h
+#include linux/interrupt.h
+
+#include linux/regulator/machine.h
+#include linux/i2c/twl.h
+
+#include asm/mach-types.h
+#include asm/mach/arch.h
+
+#include plat/board.h
+#include plat/common.h
+#include plat/gpmc.h
+#include plat/usb.h
+#include plat/onenand.h
+
+#include mux.h
+#include hsmmc.h
+#include sdram-numonyx-m65kam.h
+
+#define IGEP3_GPIO_LED0_GREEN  54
+#define IGEP3_GPIO_LED0_RED53
+#define IGEP3_GPIO_LED1_RED16
+
+#define IGEP3_GPIO_WIFI_NPD138
+#define IGEP3_GPIO_WIFI_NRESET 139
+#define IGEP3_GPIO_BT_NRESET   137
+
+#define IGEP3_GPIO_USBH_NRESET  115
+
+
+#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
+   defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
+
+#define ONENAND_MAP 0x2000
+
+/* x2 Flash built-in COMBO POP MEMORY
+ * Since the device is equipped with two DataRAMs, and two-plane NAND
+ * Flash memory array, these two component enables simultaneous program
+ * of 4KiB. Plane1 has only even blocks such as block0, block2, block4
+ * while Plane2 has only odd blocks such as block1, block3, block5.
+ * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048)
+ */
+
+static struct mtd_partition igep3_onenand_partitions[] = {
+   {
+   .name   = X-Loader,
+   .offset = 0,
+   .size   = 2 * (64*(2*2048))
+   },
+   {
+   .name   = U-Boot,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 6 * (64*(2*2048)),
+   },
+   {
+   .name   = Environment,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 2 * (64*(2*2048)),
+   },
+   {
+   .name   = Kernel,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = 12 * (64*(2*2048)),
+   },
+   {
+   .name   = File System,
+   .offset = MTDPART_OFS_APPEND,
+   .size   = MTDPART_SIZ_FULL,
+   },
+};
+
+static int igep3_onenand_setup(void __iomem *onenand_base, int freq)
+{
+   /* nothing is required to be setup for onenand as of now */
+   return 0;
+}
+
+static struct omap_onenand_platform_data igep3_onenand_data = {
+   .parts = igep3_onenand_partitions,
+   .nr_parts = ARRAY_SIZE(igep3_onenand_partitions),
+   .onenand_setup = igep3_onenand_setup,
+   .dma_channel= -1,   /* disable DMA in OMAP OneNAND driver */
+};
+
+static struct platform_device igep3_onenand_device = {
+   .name   = omap2-onenand

  1   2   >