All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel
@ 2013-10-16 14:23 Nikita Kiryanov
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 1/6] spi: omap3: remove semicolon from #define Nikita Kiryanov
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Nikita Kiryanov @ 2013-10-16 14:23 UTC (permalink / raw)
  To: u-boot

This patch ports the Linux driver for DataImage SCF0403852GGU04 and
SCF0403526GGU20 LCD panels into U-Boot. As a preparation step, variable SPI word
length support is added to omap3_spi and the generic SPI interface.
Finally, the driver is used in cm_t35 board.

The SPI changes were tested with a Beagle I2C/SPI/MDIO Protocol Analyzer, and
also with a DataImage SCF0403 lcd as part of the DataImage driver test.

Patch number 6 depends on http://patchwork.ozlabs.org/patch/275283/

Cc: Tom Rini <trini@ti.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>

Changes in V2:
	- Rebased on top of latest U-Boot
	- New patches:
		 1) spi: omap3: remove semicolon from #define
		 2) spi: define SPI_XFER_ONCE
		 3) omap3_dss: define DSS_ONOFF
	1 is a preliminary cleanup suggested by Gerhard Sittig and Igor Grinberg
	2 and 3 are splitting off some new #defines to separate patches
	- Moved wordlen to generic spi_slave struct, and added generic
	implementation for spi_set_wordlen which only updates the struct without
	touching the hardware (Igor Grinberg)
	- Updated wordlen in hardware just before doing SPI transactions, not
	when changing wordlen (Igor Grinberg)
	- OMAP3 specific check of wordlen value from old implementation of
	spi_set_wordlen moved to xfer. It refines the more general check done
	in the new spi_set_wordlen.
	- Fixed comment style in spi.h following a rebase on top of latest
	U-Boot
	- Added SPDX-License-Identifier to all new files (Anatolij Gustschin)
	- s/printf/puts for not formatted strings in scf0403 driver (Anatolij
	Gustschin)
	- Do not fail scf0403 driver init if an invalid reset_gpio is given
	(Igor Grinberg)

Nikita Kiryanov (6):
  spi: omap3: remove semicolon from #define
  spi: omap3: add support for more word lengths
  spi: define SPI_XFER_ONCE
  lcd: add DataImage SCF0403x LCD panel support
  omap3_dss: define DSS_ONOFF
  cm_t35: use scf0403 driver

 arch/arm/include/asm/arch-omap3/dss.h |   9 +-
 board/compulab/cm_t35/cm_t35.c        |  12 ++
 board/compulab/common/omap3_display.c |  46 +++++-
 drivers/spi/omap3_spi.c               |  71 +++++---
 drivers/spi/omap3_spi.h               |   8 +-
 drivers/spi/spi.c                     |  13 ++
 drivers/video/Makefile                |   1 +
 drivers/video/scf0403_lcd.c           | 296 ++++++++++++++++++++++++++++++++++
 include/configs/cm_t35.h              |   3 +
 include/scf0403_lcd.h                 |  11 ++
 include/spi.h                         |  17 ++
 11 files changed, 456 insertions(+), 31 deletions(-)
 create mode 100644 drivers/video/scf0403_lcd.c
 create mode 100644 include/scf0403_lcd.h

-- 
1.8.1.2

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 1/6] spi: omap3: remove semicolon from #define
  2013-10-16 14:23 [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel Nikita Kiryanov
@ 2013-10-16 14:23 ` Nikita Kiryanov
  2013-11-12  9:15   ` Anatolij Gustschin
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 2/6] spi: omap3: add support for more word lengths Nikita Kiryanov
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Nikita Kiryanov @ 2013-10-16 14:23 UTC (permalink / raw)
  To: u-boot

Remove unnecessary semicolon from #define SPI_WAIT_TIMEOUT

Cc: Tom Rini <trini@ti.com>
Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Cc: Gerhard Sittig <gsi@denx.de>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
---
NOTE:	New patch in series (Gerhard Sittig, Igor Grinberg)

 drivers/spi/omap3_spi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index e80be8e..116276c 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -21,7 +21,7 @@
 #include "omap3_spi.h"
 
 #define WORD_LEN	8
-#define SPI_WAIT_TIMEOUT 3000000;
+#define SPI_WAIT_TIMEOUT 3000000
 
 static void spi_reset(struct omap3_spi_slave *ds)
 {
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 2/6] spi: omap3: add support for more word lengths
  2013-10-16 14:23 [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel Nikita Kiryanov
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 1/6] spi: omap3: remove semicolon from #define Nikita Kiryanov
@ 2013-10-16 14:23 ` Nikita Kiryanov
  2013-11-12  9:18   ` Anatolij Gustschin
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 3/6] spi: define SPI_XFER_ONCE Nikita Kiryanov
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Nikita Kiryanov @ 2013-10-16 14:23 UTC (permalink / raw)
  To: u-boot

Current implementation only supports 8 bit word lengths, even though
omap3 can handle anything between 4 and 32.

Update the spi interface to support changing the SPI word length,
and implement it in omap3_spi driver to support the full range of
possible word lengths.
This implementation is backwards compatible by defaulting to the old
behavior of 8 bit word lengths.
Also, it required a change to the omap3_spi non static I/O functions,
but since they are not used anywhere else, no collateral changes are required.

Cc: Tom Rini <trini@ti.com>
Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
---
Changes in V2:
	- Removed semicolon from #define SPI_DEFAULT_WORDLEN (Gerhard Sittig,
	Igor Grinberg)
	- Moved wordlen to generic spi_slave struct, and added generic
	implementation for spi_set_wordlen which only updates the struct without
	touching the hardware (Igor Grinberg)
	- Update wordlen in hardware just before doing SPI transactions, not
	when changing wordlen (Igor Grinberg)
	- OMAP3 specific check of wordlen value from old implementation of
	spi_set_wordlen moved to xfer. It refines the more general check done
	in the new spi_set_wordlen.
	- Fixed comment style in spi.h following a rebase on top of latest
	U-Boot

 drivers/spi/omap3_spi.c | 69 +++++++++++++++++++++++++++++++++++--------------
 drivers/spi/omap3_spi.h |  8 +++---
 drivers/spi/spi.c       | 13 ++++++++++
 include/spi.h           | 16 ++++++++++++
 4 files changed, 82 insertions(+), 24 deletions(-)

diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index 116276c..a3ad056 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -20,7 +20,6 @@
 #include <asm/io.h>
 #include "omap3_spi.h"
 
-#define WORD_LEN	8
 #define SPI_WAIT_TIMEOUT 3000000
 
 static void spi_reset(struct omap3_spi_slave *ds)
@@ -185,7 +184,7 @@ int spi_claim_bus(struct spi_slave *slave)
 
 	/* wordlength */
 	conf &= ~OMAP3_MCSPI_CHCONF_WL_MASK;
-	conf |= (WORD_LEN - 1) << 7;
+	conf |= (ds->slave.wordlen - 1) << 7;
 
 	/* set chipselect polarity; manage with FORCE */
 	if (!(ds->mode & SPI_CS_HIGH))
@@ -223,7 +222,7 @@ void spi_release_bus(struct spi_slave *slave)
 	spi_reset(ds);
 }
 
-int omap3_spi_write(struct spi_slave *slave, unsigned int len, const u8 *txp,
+int omap3_spi_write(struct spi_slave *slave, unsigned int len, const void *txp,
 		    unsigned long flags)
 {
 	struct omap3_spi_slave *ds = to_omap3_spi(slave);
@@ -234,7 +233,8 @@ int omap3_spi_write(struct spi_slave *slave, unsigned int len, const u8 *txp,
 	/* Enable the channel */
 	omap3_spi_set_enable(ds,OMAP3_MCSPI_CHCTRL_EN);
 
-	chconf &= ~OMAP3_MCSPI_CHCONF_TRM_MASK;
+	chconf &= ~(OMAP3_MCSPI_CHCONF_TRM_MASK | OMAP3_MCSPI_CHCONF_WL_MASK);
+	chconf |= (ds->slave.wordlen - 1) << 7;
 	chconf |= OMAP3_MCSPI_CHCONF_TRM_TX_ONLY;
 	chconf |= OMAP3_MCSPI_CHCONF_FORCE;
 	omap3_spi_write_chconf(ds,chconf);
@@ -250,7 +250,13 @@ int omap3_spi_write(struct spi_slave *slave, unsigned int len, const u8 *txp,
 			}
 		}
 		/* Write the data */
-		writel(txp[i], &ds->regs->channel[ds->slave.cs].tx);
+		unsigned int *tx = &ds->regs->channel[ds->slave.cs].tx;
+		if (ds->slave.wordlen > 16)
+			writel(((u32 *)txp)[i], tx);
+		else if (ds->slave.wordlen > 8)
+			writel(((u16 *)txp)[i], tx);
+		else
+			writel(((u8 *)txp)[i], tx);
 	}
 
 	/* wait to finish of transfer */
@@ -268,7 +274,7 @@ int omap3_spi_write(struct spi_slave *slave, unsigned int len, const u8 *txp,
 	return 0;
 }
 
-int omap3_spi_read(struct spi_slave *slave, unsigned int len, u8 *rxp,
+int omap3_spi_read(struct spi_slave *slave, unsigned int len, void *rxp,
 		   unsigned long flags)
 {
 	struct omap3_spi_slave *ds = to_omap3_spi(slave);
@@ -279,7 +285,8 @@ int omap3_spi_read(struct spi_slave *slave, unsigned int len, u8 *rxp,
 	/* Enable the channel */
 	omap3_spi_set_enable(ds,OMAP3_MCSPI_CHCTRL_EN);
 
-	chconf &= ~OMAP3_MCSPI_CHCONF_TRM_MASK;
+	chconf &= ~(OMAP3_MCSPI_CHCONF_TRM_MASK | OMAP3_MCSPI_CHCONF_WL_MASK);
+	chconf |= (ds->slave.wordlen - 1) << 7;
 	chconf |= OMAP3_MCSPI_CHCONF_TRM_RX_ONLY;
 	chconf |= OMAP3_MCSPI_CHCONF_FORCE;
 	omap3_spi_write_chconf(ds,chconf);
@@ -302,7 +309,13 @@ int omap3_spi_read(struct spi_slave *slave, unsigned int len, u8 *rxp,
 			omap3_spi_set_enable(ds,OMAP3_MCSPI_CHCTRL_DIS);
 
 		/* Read the data */
-		rxp[i] = readl(&ds->regs->channel[ds->slave.cs].rx);
+		unsigned int *rx = &ds->regs->channel[ds->slave.cs].rx;
+		if (ds->slave.wordlen > 16)
+			((u32 *)rxp)[i] = readl(rx);
+		else if (ds->slave.wordlen > 8)
+			((u16 *)rxp)[i] = (u16)readl(rx);
+		else
+			((u8 *)rxp)[i] = (u8)readl(rx);
 	}
 
 	if (flags & SPI_XFER_END) {
@@ -314,8 +327,8 @@ int omap3_spi_read(struct spi_slave *slave, unsigned int len, u8 *rxp,
 }
 
 /*McSPI Transmit Receive Mode*/
-int omap3_spi_txrx(struct spi_slave *slave,
-		unsigned int len, const u8 *txp, u8 *rxp, unsigned long flags)
+int omap3_spi_txrx(struct spi_slave *slave, unsigned int len,
+		   const void *txp, void *rxp, unsigned long flags)
 {
 	struct omap3_spi_slave *ds = to_omap3_spi(slave);
 	int timeout = SPI_WAIT_TIMEOUT;
@@ -327,7 +340,8 @@ int omap3_spi_txrx(struct spi_slave *slave,
 	omap3_spi_set_enable(ds,OMAP3_MCSPI_CHCTRL_EN);
 
 	/*set TRANSMIT-RECEIVE Mode*/
-	chconf &= ~OMAP3_MCSPI_CHCONF_TRM_MASK;
+	chconf &= ~(OMAP3_MCSPI_CHCONF_TRM_MASK | OMAP3_MCSPI_CHCONF_WL_MASK);
+	chconf |= (ds->slave.wordlen - 1) << 7;
 	chconf |= OMAP3_MCSPI_CHCONF_FORCE;
 	omap3_spi_write_chconf(ds,chconf);
 
@@ -344,7 +358,13 @@ int omap3_spi_txrx(struct spi_slave *slave,
 			}
 		}
 		/* Write the data */
-		writel(txp[i], &ds->regs->channel[ds->slave.cs].tx);
+		unsigned int *tx = &ds->regs->channel[ds->slave.cs].tx;
+		if (ds->slave.wordlen > 16)
+			writel(((u32 *)txp)[i], tx);
+		else if (ds->slave.wordlen > 8)
+			writel(((u16 *)txp)[i], tx);
+		else
+			writel(((u8 *)txp)[i], tx);
 
 		/*Read: wait for RX containing data (RXS == 1)*/
 		while (!(readl(&ds->regs->channel[ds->slave.cs].chstat) &
@@ -356,7 +376,13 @@ int omap3_spi_txrx(struct spi_slave *slave,
 			}
 		}
 		/* Read the data */
-		rxp[i] = readl(&ds->regs->channel[ds->slave.cs].rx);
+		unsigned int *rx = &ds->regs->channel[ds->slave.cs].rx;
+		if (ds->slave.wordlen > 16)
+			((u32 *)rxp)[i] = readl(rx);
+		else if (ds->slave.wordlen > 8)
+			((u16 *)rxp)[i] = (u16)readl(rx);
+		else
+			((u8 *)rxp)[i] = (u8)readl(rx);
 	}
 	/* Disable the channel */
 	omap3_spi_set_enable(ds,OMAP3_MCSPI_CHCTRL_DIS);
@@ -375,14 +401,17 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
 {
 	struct omap3_spi_slave *ds = to_omap3_spi(slave);
 	unsigned int	len;
-	const u8	*txp = dout;
-	u8		*rxp = din;
 	int ret = -1;
 
-	if (bitlen % 8)
+	if (ds->slave.wordlen < 4 || ds->slave.wordlen > 32) {
+		printf("omap3_spi: invalid wordlen %d\n", ds->slave.wordlen);
+		return -1;
+	}
+
+	if (bitlen % ds->slave.wordlen)
 		return -1;
 
-	len = bitlen / 8;
+	len = bitlen / ds->slave.wordlen;
 
 	if (bitlen == 0) {	 /* only change CS */
 		int chconf = readl(&ds->regs->channel[ds->slave.cs].chconf);
@@ -400,11 +429,11 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
 		ret = 0;
 	} else {
 		if (dout != NULL && din != NULL)
-			ret = omap3_spi_txrx(slave, len, txp, rxp, flags);
+			ret = omap3_spi_txrx(slave, len, dout, din, flags);
 		else if (dout != NULL)
-			ret = omap3_spi_write(slave, len, txp, flags);
+			ret = omap3_spi_write(slave, len, dout, flags);
 		else if (din != NULL)
-			ret = omap3_spi_read(slave, len, rxp, flags);
+			ret = omap3_spi_read(slave, len, din, flags);
 	}
 	return ret;
 }
diff --git a/drivers/spi/omap3_spi.h b/drivers/spi/omap3_spi.h
index 01537b6..ab7cd84 100644
--- a/drivers/spi/omap3_spi.h
+++ b/drivers/spi/omap3_spi.h
@@ -99,11 +99,11 @@ static inline struct omap3_spi_slave *to_omap3_spi(struct spi_slave *slave)
 	return container_of(slave, struct omap3_spi_slave, slave);
 }
 
-int omap3_spi_txrx(struct spi_slave *slave, unsigned int len, const u8 *txp,
-			u8 *rxp, unsigned long flags);
-int omap3_spi_write(struct spi_slave *slave, unsigned int len, const u8 *txp,
+int omap3_spi_txrx(struct spi_slave *slave, unsigned int len, const void *txp,
+			void *rxp, unsigned long flags);
+int omap3_spi_write(struct spi_slave *slave, unsigned int len, const void *txp,
 		    unsigned long flags);
-int omap3_spi_read(struct spi_slave *slave, unsigned int len, u8 *rxp,
+int omap3_spi_read(struct spi_slave *slave, unsigned int len, void *rxp,
 		   unsigned long flags);
 
 #endif /* _OMAP3_SPI_H_ */
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index ea39d1a..b76a26c 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -8,6 +8,18 @@
 #include <malloc.h>
 #include <spi.h>
 
+int spi_set_wordlen(struct spi_slave *slave, unsigned int wordlen)
+{
+	if (wordlen == 0 || wordlen > 32) {
+		printf("spi: invalid wordlen %d\n", wordlen);
+		return -1;
+	}
+
+	slave->wordlen = wordlen;
+
+	return 0;
+}
+
 void *spi_do_alloc_slave(int offset, int size, unsigned int bus,
 			 unsigned int cs)
 {
@@ -20,6 +32,7 @@ void *spi_do_alloc_slave(int offset, int size, unsigned int bus,
 		slave = (struct spi_slave *)(ptr + offset);
 		slave->bus = bus;
 		slave->cs = cs;
+		slave->wordlen = SPI_DEFAULT_WORDLEN;
 	}
 
 	return ptr;
diff --git a/include/spi.h b/include/spi.h
index ad9248b..67da75c 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -33,6 +33,8 @@
 /* Header byte that marks the start of the message */
 #define SPI_PREAMBLE_END_BYTE	0xec
 
+#define SPI_DEFAULT_WORDLEN 8
+
 /**
  * struct spi_slave - Representation of a SPI slave
  *
@@ -40,6 +42,7 @@
  *
  * @bus:		ID of the bus that the slave is attached to.
  * @cs:			ID of the chip select connected to the slave.
+ * @wordlen:		Size of SPI word in number of bits
  * @max_write_size:	If non-zero, the maximum number of bytes which can
  *			be written at once, excluding command bytes.
  * @memory_map:		Address of read-only SPI flash access.
@@ -47,6 +50,7 @@
 struct spi_slave {
 	unsigned int bus;
 	unsigned int cs;
+	unsigned int wordlen;
 	unsigned int max_write_size;
 	void *memory_map;
 };
@@ -153,6 +157,18 @@ int spi_claim_bus(struct spi_slave *slave);
 void spi_release_bus(struct spi_slave *slave);
 
 /**
+ * Set the word length for SPI transactions
+ *
+ * Set the word length (number of bits per word) for SPI transactions.
+ *
+ * @slave:	The SPI slave
+ * @wordlen:	The number of bits in a word
+ *
+ * Returns: 0 on success, -1 on failure.
+ */
+int spi_set_wordlen(struct spi_slave *slave, unsigned int wordlen);
+
+/**
  * SPI transfer
  *
  * This writes "bitlen" bits out the SPI MOSI port and simultaneously clocks
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 3/6] spi: define SPI_XFER_ONCE
  2013-10-16 14:23 [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel Nikita Kiryanov
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 1/6] spi: omap3: remove semicolon from #define Nikita Kiryanov
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 2/6] spi: omap3: add support for more word lengths Nikita Kiryanov
@ 2013-10-16 14:23 ` Nikita Kiryanov
  2013-11-12  9:19   ` Anatolij Gustschin
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 4/6] lcd: add DataImage SCF0403x LCD panel support Nikita Kiryanov
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 19+ messages in thread
From: Nikita Kiryanov @ 2013-10-16 14:23 UTC (permalink / raw)
  To: u-boot

The flag combination "SPI_XFER_BEGIN | SPI_XFER_END" is a common use
case of spi_xfer, and it can easily cause an already long line (spi_xfer
takes 5 parameters) to go over the 80 character limit.

define SPI_XFER_ONCE to be a shorter version of the above flag combination.

Cc: Tom Rini <trini@ti.com>
Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
---
NOTE:	This is a new patch. Its contents were originally part of "lcd: add
	DataImage SCF0403x LCD panel support". Split because it is unrelated to
	the patch it was originally in. (Igor Grinberg)

 include/spi.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/spi.h b/include/spi.h
index 67da75c..e2563c9 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -29,6 +29,7 @@
 #define SPI_XFER_END		0x02	/* Deassert CS after transfer */
 #define SPI_XFER_MMAP		0x08	/* Memory Mapped start */
 #define SPI_XFER_MMAP_END	0x10	/* Memory Mapped End */
+#define SPI_XFER_ONCE		(SPI_XFER_BEGIN | SPI_XFER_END)
 
 /* Header byte that marks the start of the message */
 #define SPI_PREAMBLE_END_BYTE	0xec
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 4/6] lcd: add DataImage SCF0403x LCD panel support
  2013-10-16 14:23 [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel Nikita Kiryanov
                   ` (2 preceding siblings ...)
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 3/6] spi: define SPI_XFER_ONCE Nikita Kiryanov
@ 2013-10-16 14:23 ` Nikita Kiryanov
  2013-10-17 16:22   ` Anatolij Gustschin
  2013-11-12  9:20   ` Anatolij Gustschin
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 5/6] omap3_dss: define DSS_ONOFF Nikita Kiryanov
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 19+ messages in thread
From: Nikita Kiryanov @ 2013-10-16 14:23 UTC (permalink / raw)
  To: u-boot

Add SPI-based driver for DataImage SCF0403852GGU04 and SCF0403526GGU20
LCD panels.

Cc: Tom Rini <trini@ti.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
---
Changes in V2:
	- Added SPDX-License-Identifier to all new files (Anatolij Gustschin)
	- s/printf/puts for not formatted strings (Anatolij Gustschin)
	- Do not fail init if an invalid reset_gpio is given (Igor Grinberg)
	- Move definition of SPI_XFER_ONCE to a separate patch (Igor Grinberg)

 drivers/video/Makefile      |   1 +
 drivers/video/scf0403_lcd.c | 296 ++++++++++++++++++++++++++++++++++++++++++++
 include/scf0403_lcd.h       |  11 ++
 3 files changed, 308 insertions(+)
 create mode 100644 drivers/video/scf0403_lcd.c
 create mode 100644 include/scf0403_lcd.h

diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 6c208c5..e7324d1 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -22,6 +22,7 @@ COBJS-$(CONFIG_FSL_DIU_FB) += fsl_diu_fb.o videomodes.o
 COBJS-$(CONFIG_L5F31188) += l5f31188.o
 COBJS-$(CONFIG_MPC8XX_LCD) += mpc8xx_lcd.o
 COBJS-$(CONFIG_PXA_LCD) += pxa_lcd.o
+COBJS-$(CONFIG_SCF0403_LCD) += scf0403_lcd.o
 COBJS-$(CONFIG_S6E8AX0) += s6e8ax0.o
 COBJS-$(CONFIG_S6E63D6) += s6e63d6.o
 COBJS-$(CONFIG_LD9040) += ld9040.o
diff --git a/drivers/video/scf0403_lcd.c b/drivers/video/scf0403_lcd.c
new file mode 100644
index 0000000..2bc8bca
--- /dev/null
+++ b/drivers/video/scf0403_lcd.c
@@ -0,0 +1,296 @@
+/*
+ * scf0403.c -- support for DataImage SCF0403 LCD
+ *
+ * Copyright (c) 2013 Adapted from Linux driver:
+ * Copyright (c) 2012 Anders Electronics plc. All Rights Reserved.
+ * Copyright (c) 2012 CompuLab, Ltd
+ *           Dmitry Lifshitz <lifshitz@compulab.co.il>
+ *           Ilya Ledvich <ilya@compulab.co.il>
+ * Inspired by Alberto Panizzo <maramaopercheseimorto@gmail.com> &
+ *	Marek Vasut work in l4f00242t03.c
+ *
+ * U-Boot port: Nikita Kiryanov <nikita@compulab.co.il>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/gpio.h>
+#include <spi.h>
+
+struct scf0403_cmd {
+	u16 cmd;
+	u16 *params;
+	int count;
+};
+
+struct scf0403_initseq_entry {
+	struct scf0403_cmd cmd;
+	int delay_ms;
+};
+
+struct scf0403_priv {
+	struct spi_slave *spi;
+	unsigned int reset_gpio;
+	u32 rddid;
+	struct scf0403_initseq_entry *init_seq;
+	int seq_size;
+};
+
+struct scf0403_priv priv;
+
+#define SCF0403852GGU04_ID 0x000080
+
+/* SCF0403526GGU20 model commands parameters */
+static u16 extcmd_params_sn20[]		= {0xff, 0x98, 0x06};
+static u16 spiinttype_params_sn20[]	= {0x60};
+static u16 bc_params_sn20[]		= {
+		0x01, 0x10, 0x61, 0x74, 0x01, 0x01, 0x1B,
+		0x12, 0x71, 0x00, 0x00, 0x00, 0x01, 0x01,
+		0x05, 0x00, 0xFF, 0xF2, 0x01, 0x00, 0x40,
+};
+static u16 bd_params_sn20[] = {0x01, 0x23, 0x45, 0x67, 0x01, 0x23, 0x45, 0x67};
+static u16 be_params_sn20[] = {
+		0x01, 0x22, 0x22, 0xBA, 0xDC, 0x26, 0x28, 0x22,	0x22,
+};
+static u16 vcom_params_sn20[]		= {0x74};
+static u16 vmesur_params_sn20[]		= {0x7F, 0x0F, 0x00};
+static u16 powerctl_params_sn20[]	= {0x03, 0x0b, 0x00};
+static u16 lvglvolt_params_sn20[]	= {0x08};
+static u16 engsetting_params_sn20[]	= {0x00, 0x00, 0x00, 0x00, 0x00, 0x20};
+static u16 dispfunc_params_sn20[]	= {0xa0};
+static u16 dvddvolt_params_sn20[]	= {0x74};
+static u16 dispinv_params_sn20[]	= {0x00, 0x00, 0x00};
+static u16 panelres_params_sn20[]	= {0x82};
+static u16 framerate_params_sn20[]	= {0x00, 0x13, 0x13};
+static u16 timing_params_sn20[]		= {0x80, 0x05, 0x40, 0x28};
+static u16 powerctl2_params_sn20[]	= {0x17, 0x75, 0x79, 0x20};
+static u16 memaccess_params_sn20[]	= {0x00};
+static u16 pixfmt_params_sn20[]		= {0x66};
+static u16 pgamma_params_sn20[]		= {
+		0x00, 0x03, 0x0b, 0x0c, 0x0e, 0x08, 0xc5, 0x04,
+		0x08, 0x0c, 0x13, 0x11, 0x11, 0x14, 0x0c, 0x10,
+};
+static u16 ngamma_params_sn20[] = {
+		0x00, 0x0d, 0x11, 0x0c, 0x0c, 0x04, 0x76, 0x03,
+		0x08, 0x0b, 0x16, 0x10, 0x0d, 0x16, 0x0a, 0x00,
+};
+static u16 tearing_params_sn20[] = {0x00};
+
+/* SCF0403852GGU04 model commands parameters */
+static u16 memaccess_params_sn04[]	= {0x08};
+static u16 pixfmt_params_sn04[]		= {0x66};
+static u16 modectl_params_sn04[]	= {0x01};
+static u16 dispfunc_params_sn04[]	= {0x22, 0xe2, 0xFF, 0x04};
+static u16 vcom_params_sn04[]		= {0x00, 0x6A};
+static u16 pgamma_params_sn04[]		= {
+		0x00, 0x07, 0x0d, 0x10, 0x13, 0x19, 0x0f, 0x0c,
+		0x05, 0x08, 0x06, 0x13,	0x0f, 0x30, 0x20, 0x1f,
+};
+static u16 ngamma_params_sn04[]		= {
+		0x1F, 0x20, 0x30, 0x0F, 0x13, 0x06, 0x08, 0x05,
+		0x0C, 0x0F, 0x19, 0x13, 0x10, 0x0D, 0x07, 0x00,
+};
+static u16 dispinv_params_sn04[]	= {0x02};
+
+/* Common commands */
+static struct scf0403_cmd scf0403_cmd_slpout	= {0x11, NULL, 0};
+static struct scf0403_cmd scf0403_cmd_dison	= {0x29, NULL, 0};
+
+/* SCF0403852GGU04 init sequence */
+static struct scf0403_initseq_entry scf0403_initseq_sn04[] = {
+	{{0x36, memaccess_params_sn04,	ARRAY_SIZE(memaccess_params_sn04)}, 0},
+	{{0x3A, pixfmt_params_sn04,	ARRAY_SIZE(pixfmt_params_sn04)}, 0},
+	{{0xB6, dispfunc_params_sn04,	ARRAY_SIZE(dispfunc_params_sn04)}, 0},
+	{{0xC5, vcom_params_sn04,	ARRAY_SIZE(vcom_params_sn04)}, 0},
+	{{0xE0, pgamma_params_sn04,	ARRAY_SIZE(pgamma_params_sn04)}, 0},
+	{{0xE1, ngamma_params_sn04,	ARRAY_SIZE(ngamma_params_sn04)}, 20},
+	{{0xB0, modectl_params_sn04,	ARRAY_SIZE(modectl_params_sn04)}, 0},
+	{{0xB4, dispinv_params_sn04,	ARRAY_SIZE(dispinv_params_sn04)}, 100},
+};
+
+/* SCF0403526GGU20 init sequence */
+static struct scf0403_initseq_entry scf0403_initseq_sn20[] = {
+	{{0xff, extcmd_params_sn20,	ARRAY_SIZE(extcmd_params_sn20)}, 0},
+	{{0xba, spiinttype_params_sn20,	ARRAY_SIZE(spiinttype_params_sn20)}, 0},
+	{{0xbc, bc_params_sn20,		ARRAY_SIZE(bc_params_sn20)}, 0},
+	{{0xbd, bd_params_sn20,		ARRAY_SIZE(bd_params_sn20)}, 0},
+	{{0xbe, be_params_sn20,		ARRAY_SIZE(be_params_sn20)}, 0},
+	{{0xc7, vcom_params_sn20,	ARRAY_SIZE(vcom_params_sn20)}, 0},
+	{{0xed, vmesur_params_sn20,	ARRAY_SIZE(vmesur_params_sn20)}, 0},
+	{{0xc0, powerctl_params_sn20,	ARRAY_SIZE(powerctl_params_sn20)}, 0},
+	{{0xfc, lvglvolt_params_sn20,	ARRAY_SIZE(lvglvolt_params_sn20)}, 0},
+	{{0xb6, dispfunc_params_sn20,	ARRAY_SIZE(dispfunc_params_sn20)}, 0},
+	{{0xdf, engsetting_params_sn20,	ARRAY_SIZE(engsetting_params_sn20)}, 0},
+	{{0xf3, dvddvolt_params_sn20,	ARRAY_SIZE(dvddvolt_params_sn20)}, 0},
+	{{0xb4, dispinv_params_sn20,	ARRAY_SIZE(dispinv_params_sn20)}, 0},
+	{{0xf7, panelres_params_sn20,	ARRAY_SIZE(panelres_params_sn20)}, 0},
+	{{0xb1, framerate_params_sn20,	ARRAY_SIZE(framerate_params_sn20)}, 0},
+	{{0xf2, timing_params_sn20,	ARRAY_SIZE(timing_params_sn20)}, 0},
+	{{0xc1, powerctl2_params_sn20,	ARRAY_SIZE(powerctl2_params_sn20)}, 0},
+	{{0x36, memaccess_params_sn20,	ARRAY_SIZE(memaccess_params_sn20)}, 0},
+	{{0x3a, pixfmt_params_sn20,	ARRAY_SIZE(pixfmt_params_sn20)}, 0},
+	{{0xe0, pgamma_params_sn20,	ARRAY_SIZE(pgamma_params_sn20)}, 0},
+	{{0xe1, ngamma_params_sn20,	ARRAY_SIZE(ngamma_params_sn20)}, 0},
+	{{0x35, tearing_params_sn20,	ARRAY_SIZE(tearing_params_sn20)}, 0},
+};
+
+static void scf0403_gpio_reset(unsigned int gpio)
+{
+	if (!gpio_is_valid(gpio))
+		return;
+
+	gpio_set_value(gpio, 1);
+	mdelay(100);
+	gpio_set_value(gpio, 0);
+	mdelay(40);
+	gpio_set_value(gpio, 1);
+	mdelay(100);
+}
+
+static int scf0403_spi_read_rddid(struct spi_slave *spi, u32 *rddid)
+{
+	int error = 0;
+	u8 ids_buf = 0x00;
+	u16 dummy_buf = 0x00;
+	u16 cmd = 0x04;
+
+	error = spi_set_wordlen(spi, 9);
+	if (error)
+		return error;
+
+	/* Here 9 bits required to transmit a command */
+	error = spi_xfer(spi, 9, &cmd, NULL, SPI_XFER_ONCE);
+	if (error)
+		return error;
+
+	/*
+	 * Here 8 + 1 bits required to arrange extra clock cycle
+	 * before the first data bit.
+	 * According to the datasheet - first parameter is the dummy data.
+	 */
+	error = spi_xfer(spi, 9, NULL, &dummy_buf, SPI_XFER_ONCE);
+	if (error)
+		return error;
+
+	error = spi_set_wordlen(spi, 8);
+	if (error)
+		return error;
+
+	/* Read rest of the data */
+	error = spi_xfer(spi, 8, NULL, &ids_buf, SPI_XFER_ONCE);
+	if (error)
+		return error;
+
+	*rddid = ids_buf;
+
+	return 0;
+}
+
+static int scf0403_spi_transfer(struct spi_slave *spi, struct scf0403_cmd *cmd)
+{
+	int i, error;
+	u32 command = cmd->cmd;
+	u32 msg;
+
+	error = spi_set_wordlen(spi, 9);
+	if (error)
+		return error;
+
+	error = spi_xfer(spi, 9, &command, NULL, SPI_XFER_ONCE);
+	if (error)
+		return error;
+
+	for (i = 0; i < cmd->count; i++) {
+		msg = (cmd->params[i] | 0x100);
+		error = spi_xfer(spi, 9, &msg, NULL, SPI_XFER_ONCE);
+		if (error)
+			return error;
+	}
+
+	return 0;
+}
+
+static void scf0403_lcd_init(struct scf0403_priv *priv)
+{
+	int i;
+
+	/* reset LCD */
+	scf0403_gpio_reset(priv->reset_gpio);
+
+	for (i = 0; i < priv->seq_size; i++) {
+		if (scf0403_spi_transfer(priv->spi, &priv->init_seq[i].cmd) < 0)
+			puts("SPI transfer failed\n");
+
+		mdelay(priv->init_seq[i].delay_ms);
+	}
+}
+
+static int scf0403_request_reset_gpio(unsigned gpio)
+{
+	int err = gpio_request(gpio, "lcd reset");
+
+	if (err)
+		return err;
+
+	err = gpio_direction_output(gpio, 0);
+	if (err)
+		gpio_free(gpio);
+
+	return err;
+}
+
+int scf0403_init(int reset_gpio)
+{
+	int error;
+
+	if (gpio_is_valid(reset_gpio)) {
+		error = scf0403_request_reset_gpio(reset_gpio);
+		if (error) {
+			printf("Failed requesting reset GPIO%d: %d\n",
+			       reset_gpio, error);
+			return error;
+		}
+	}
+
+	priv.reset_gpio = reset_gpio;
+	priv.spi = spi_setup_slave(3, 0, 1000000, SPI_MODE_0);
+	error = spi_claim_bus(priv.spi);
+	if (error)
+		goto bus_claim_fail;
+
+	/* reset LCD */
+	scf0403_gpio_reset(reset_gpio);
+
+	error = scf0403_spi_read_rddid(priv.spi, &priv.rddid);
+	if (error) {
+		puts("IDs read failed\n");
+		goto readid_fail;
+	}
+
+	if (priv.rddid == SCF0403852GGU04_ID) {
+		priv.init_seq = scf0403_initseq_sn04;
+		priv.seq_size = ARRAY_SIZE(scf0403_initseq_sn04);
+	} else {
+		priv.init_seq = scf0403_initseq_sn20;
+		priv.seq_size = ARRAY_SIZE(scf0403_initseq_sn20);
+	}
+
+	scf0403_lcd_init(&priv);
+
+	/* Start operation */
+	scf0403_spi_transfer(priv.spi, &scf0403_cmd_dison);
+	mdelay(100);
+	scf0403_spi_transfer(priv.spi, &scf0403_cmd_slpout);
+	spi_release_bus(priv.spi);
+
+	return 0;
+
+readid_fail:
+	spi_release_bus(priv.spi);
+bus_claim_fail:
+	if (gpio_is_valid(priv.reset_gpio))
+		gpio_free(priv.reset_gpio);
+
+	return error;
+}
diff --git a/include/scf0403_lcd.h b/include/scf0403_lcd.h
new file mode 100644
index 0000000..d71896b
--- /dev/null
+++ b/include/scf0403_lcd.h
@@ -0,0 +1,11 @@
+/*
+ * Copyright (c) 2013, Compulab Inc.
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+#ifndef SCF0403_LCD_H_
+#define SCF0403_LCD_H_
+
+int scf0403_init(int reset_gpio);
+
+#endif
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 5/6] omap3_dss: define DSS_ONOFF
  2013-10-16 14:23 [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel Nikita Kiryanov
                   ` (3 preceding siblings ...)
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 4/6] lcd: add DataImage SCF0403x LCD panel support Nikita Kiryanov
@ 2013-10-16 14:23 ` Nikita Kiryanov
  2013-10-17 16:23   ` Anatolij Gustschin
  2013-11-12  9:22   ` Anatolij Gustschin
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 6/6] cm_t35: use scf0403 driver Nikita Kiryanov
  2013-11-04 20:49 ` [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel Tom Rini
  6 siblings, 2 replies; 19+ messages in thread
From: Nikita Kiryanov @ 2013-10-16 14:23 UTC (permalink / raw)
  To: u-boot

Add DSS_ONOFF to polarity defines

Cc: Tom Rini <trini@ti.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
---
NOTE:	This is a new patch. Its contents were originally part of "cm_t35: use
	scf0403 driver". Split because it is unrelated to the patch it was
	originally in.

 arch/arm/include/asm/arch-omap3/dss.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm/include/asm/arch-omap3/dss.h b/arch/arm/include/asm/arch-omap3/dss.h
index ae0babf..8bf6b48 100644
--- a/arch/arm/include/asm/arch-omap3/dss.h
+++ b/arch/arm/include/asm/arch-omap3/dss.h
@@ -178,10 +178,11 @@ struct venc_regs {
 #define LCD_INTERFACE_24_BIT	3
 
 /* Polarity */
-#define DSS_IVS	(1 << 12)
-#define DSS_IHS	(1 << 13)
-#define DSS_IPC	(1 << 14)
-#define DSS_IEO	(1 << 15)
+#define DSS_IVS		(1 << 12)
+#define DSS_IHS		(1 << 13)
+#define DSS_IPC		(1 << 14)
+#define DSS_IEO		(1 << 15)
+#define DSS_ONOFF	(1 << 17)
 
 /* GFX format */
 #define GFXFORMAT_BITMAP1		(0x0 << 1)
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 6/6] cm_t35: use scf0403 driver
  2013-10-16 14:23 [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel Nikita Kiryanov
                   ` (4 preceding siblings ...)
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 5/6] omap3_dss: define DSS_ONOFF Nikita Kiryanov
@ 2013-10-16 14:23 ` Nikita Kiryanov
  2013-11-12  9:23   ` Anatolij Gustschin
  2013-11-04 20:49 ` [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel Tom Rini
  6 siblings, 1 reply; 19+ messages in thread
From: Nikita Kiryanov @ 2013-10-16 14:23 UTC (permalink / raw)
  To: u-boot

Use scf0403 driver to add scf0403x LCD support for cm-t35 and cm-t3730
boards.

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
---
NOTE:	This patch depends on http://patchwork.ozlabs.org/patch/275283/

Changes in V2:
	- Changes to arch/arm/include/asm/arch-omap3/dss.h were split off to
	another patch.

 board/compulab/cm_t35/cm_t35.c        | 12 +++++++++
 board/compulab/common/omap3_display.c | 46 +++++++++++++++++++++++++++++++++--
 include/configs/cm_t35.h              |  3 +++
 3 files changed, 59 insertions(+), 2 deletions(-)

diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c
index a6d4aba..51dd4a4 100644
--- a/board/compulab/cm_t35/cm_t35.c
+++ b/board/compulab/cm_t35/cm_t35.c
@@ -268,6 +268,9 @@ static void cm_t3x_set_common_muxconf(void)
 	/* DVI enable */
 	MUX_VAL(CP(GPMC_NCS3),		(IDIS  | PTU | DIS  | M4));/*GPMC_nCS3*/
 
+	/* DataImage backlight */
+	MUX_VAL(CP(GPMC_NCS7),		(IDIS  | PTU | DIS  | M4));/*GPIO_58*/
+
 	/* CM-T3x Ethernet */
 	MUX_VAL(CP(GPMC_NCS5),		(IDIS | PTU | DIS | M0)); /*GPMC_nCS5*/
 	MUX_VAL(CP(GPMC_CLK),		(IEN  | PTD | DIS | M4)); /*GPIO_59*/
@@ -374,6 +377,15 @@ static void cm_t3x_set_common_muxconf(void)
 	MUX_VAL(CP(MMC1_DAT1),		(IEN  | PTU | EN  | M0)); /*MMC1_DAT1*/
 	MUX_VAL(CP(MMC1_DAT2),		(IEN  | PTU | EN  | M0)); /*MMC1_DAT2*/
 	MUX_VAL(CP(MMC1_DAT3),		(IEN  | PTU | EN  | M0)); /*MMC1_DAT3*/
+
+	/* SPI */
+	MUX_VAL(CP(MCBSP1_CLKR),	(IEN | PTD | DIS | M1)); /*MCSPI4_CLK*/
+	MUX_VAL(CP(MCBSP1_DX),		(IEN | PTD | DIS | M1)); /*MCSPI4_SIMO*/
+	MUX_VAL(CP(MCBSP1_DR),		(IEN | PTD | DIS | M1)); /*MCSPI4_SOMI*/
+	MUX_VAL(CP(MCBSP1_FSX),		(IEN | PTU | EN  | M1)); /*MCSPI4_CS0*/
+
+	/* display controls */
+	MUX_VAL(CP(MCBSP1_FSR),		(IDIS | PTU | DIS | M4)); /*GPIO_157*/
 }
 
 static void cm_t35_set_muxconf(void)
diff --git a/board/compulab/common/omap3_display.c b/board/compulab/common/omap3_display.c
index ead821e..61707f5 100644
--- a/board/compulab/common/omap3_display.c
+++ b/board/compulab/common/omap3_display.c
@@ -14,6 +14,7 @@
 #include <stdio_dev.h>
 #include <asm/arch/dss.h>
 #include <lcd.h>
+#include <scf0403_lcd.h>
 #include <asm/arch-omap3/dss.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -22,6 +23,7 @@ enum display_type {
 	NONE,
 	DVI,
 	DVI_CUSTOM,
+	DATA_IMAGE, /* #define CONFIG_SCF0403_LCD to use */
 };
 
 #define CMAP_ADDR	0x80100000
@@ -119,6 +121,18 @@ static const struct panel_config preset_dvi_1280X1024 = {
 	.gfx_format	= GFXFORMAT_RGB16,
 };
 
+static const struct panel_config preset_dataimage_480X800 = {
+	.lcd_size	= PANEL_LCD_SIZE(480, 800),
+	.timing_h	= DSS_HBP(2) | DSS_HFP(2) | DSS_HSW(2),
+	.timing_v	= DSS_VBP(17) | DSS_VFP(20) | DSS_VSW(3),
+	.pol_freq	= DSS_IVS | DSS_IHS | DSS_IPC | DSS_ONOFF,
+	.divisor	= 10 | (1 << 10),
+	.data_lines	= LCD_INTERFACE_18_BIT,
+	.panel_type	= ACTIVE_DISPLAY,
+	.load_mode	= 2,
+	.gfx_format	= GFXFORMAT_RGB16,
+};
+
 /*
  * set_resolution_params()
  *
@@ -146,6 +160,13 @@ static enum display_type set_dvi_preset(const struct panel_config preset,
 	return DVI;
 }
 
+static enum display_type set_dataimage_preset(const struct panel_config preset,
+		int x_res, int y_res)
+{
+	set_preset(preset, x_res, y_res);
+	return DATA_IMAGE;
+}
+
 /*
  * parse_mode() - parse the mode parameter of custom lcd settings
  *
@@ -369,6 +390,8 @@ static enum display_type env_parse_displaytype(char *displaytype)
 		return set_dvi_preset(preset_dvi_1280X960, 1280, 960);
 	else if (!strncmp(displaytype, "dvi1280x1024", 12))
 		return set_dvi_preset(preset_dvi_1280X1024, 1280, 1024);
+	else if (!strncmp(displaytype, "dataimage480x800", 16))
+		return set_dataimage_preset(preset_dataimage_480X800, 480, 800);
 
 	return NONE;
 }
@@ -401,12 +424,31 @@ void lcd_ctrl_init(void *lcdbase)
 	clrsetbits_le32(&prcm->clksel_dss, 0xF, 3);
 }
 
+#ifdef CONFIG_SCF0403_LCD
+static void scf0403_enable(void)
+{
+	gpio_direction_output(58, 1);
+	scf0403_init(157);
+}
+#else
+static inline void scf0403_enable(void) {}
+#endif
+
 void lcd_enable(void)
 {
-	if (lcd_def == DVI || lcd_def == DVI_CUSTOM) {
+	switch (lcd_def) {
+	case NONE:
+		return;
+	case DVI:
+	case DVI_CUSTOM:
 		gpio_direction_output(54, 0); /* Turn on DVI */
-		omap3_dss_enable();
+		break;
+	case DATA_IMAGE:
+		scf0403_enable();
+		break;
 	}
+
+	omap3_dss_enable();
 }
 
 void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue) {}
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index eff35b9..f01958d 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -326,5 +326,8 @@
 #define CONFIG_SPLASH_SCREEN
 #define CONFIG_CMD_BMP
 #define CONFIG_BMP_16BPP
+#define CONFIG_SCF0403_LCD
+
+#define CONFIG_OMAP3_SPI
 
 #endif /* __CONFIG_H */
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 4/6] lcd: add DataImage SCF0403x LCD panel support
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 4/6] lcd: add DataImage SCF0403x LCD panel support Nikita Kiryanov
@ 2013-10-17 16:22   ` Anatolij Gustschin
  2013-11-12  9:20   ` Anatolij Gustschin
  1 sibling, 0 replies; 19+ messages in thread
From: Anatolij Gustschin @ 2013-10-17 16:22 UTC (permalink / raw)
  To: u-boot


Acked-by: Anatolij Gustschin <agust@denx.de>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 5/6] omap3_dss: define DSS_ONOFF
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 5/6] omap3_dss: define DSS_ONOFF Nikita Kiryanov
@ 2013-10-17 16:23   ` Anatolij Gustschin
  2013-11-12  9:22   ` Anatolij Gustschin
  1 sibling, 0 replies; 19+ messages in thread
From: Anatolij Gustschin @ 2013-10-17 16:23 UTC (permalink / raw)
  To: u-boot


Acked-by: Anatolij Gustschin <agust@denx.de>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel
  2013-10-16 14:23 [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel Nikita Kiryanov
                   ` (5 preceding siblings ...)
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 6/6] cm_t35: use scf0403 driver Nikita Kiryanov
@ 2013-11-04 20:49 ` Tom Rini
  2013-11-06  9:46   ` Nikita Kiryanov
  2013-11-06 10:14   ` Anatolij Gustschin
  6 siblings, 2 replies; 19+ messages in thread
From: Tom Rini @ 2013-11-04 20:49 UTC (permalink / raw)
  To: u-boot

On Wed, Oct 16, 2013 at 05:23:23PM +0300, Nikita Kiryanov wrote:

> This patch ports the Linux driver for DataImage SCF0403852GGU04 and
> SCF0403526GGU20 LCD panels into U-Boot. As a preparation step, variable SPI word
> length support is added to omap3_spi and the generic SPI interface.
> Finally, the driver is used in cm_t35 board.
> 
> The SPI changes were tested with a Beagle I2C/SPI/MDIO Protocol Analyzer, and
> also with a DataImage SCF0403 lcd as part of the DataImage driver test.
> 
> Patch number 6 depends on http://patchwork.ozlabs.org/patch/275283/
> 
> Cc: Tom Rini <trini@ti.com>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
> 
> Changes in V2:
> 	- Rebased on top of latest U-Boot
> 	- New patches:
> 		 1) spi: omap3: remove semicolon from #define
> 		 2) spi: define SPI_XFER_ONCE
> 		 3) omap3_dss: define DSS_ONOFF
> 	1 is a preliminary cleanup suggested by Gerhard Sittig and Igor Grinberg
> 	2 and 3 are splitting off some new #defines to separate patches
> 	- Moved wordlen to generic spi_slave struct, and added generic
> 	implementation for spi_set_wordlen which only updates the struct without
> 	touching the hardware (Igor Grinberg)
> 	- Updated wordlen in hardware just before doing SPI transactions, not
> 	when changing wordlen (Igor Grinberg)
> 	- OMAP3 specific check of wordlen value from old implementation of
> 	spi_set_wordlen moved to xfer. It refines the more general check done
> 	in the new spi_set_wordlen.
> 	- Fixed comment style in spi.h following a rebase on top of latest
> 	U-Boot
> 	- Added SPDX-License-Identifier to all new files (Anatolij Gustschin)
> 	- s/printf/puts for not formatted strings in scf0403 driver (Anatolij
> 	Gustschin)
> 	- Do not fail scf0403 driver init if an invalid reset_gpio is given
> 	(Igor Grinberg)
> 
> Nikita Kiryanov (6):
>   spi: omap3: remove semicolon from #define
>   spi: omap3: add support for more word lengths
>   spi: define SPI_XFER_ONCE
>   lcd: add DataImage SCF0403x LCD panel support
>   omap3_dss: define DSS_ONOFF
>   cm_t35: use scf0403 driver
> 
>  arch/arm/include/asm/arch-omap3/dss.h |   9 +-
>  board/compulab/cm_t35/cm_t35.c        |  12 ++
>  board/compulab/common/omap3_display.c |  46 +++++-
>  drivers/spi/omap3_spi.c               |  71 +++++---
>  drivers/spi/omap3_spi.h               |   8 +-
>  drivers/spi/spi.c                     |  13 ++
>  drivers/video/Makefile                |   1 +
>  drivers/video/scf0403_lcd.c           | 296 ++++++++++++++++++++++++++++++++++
>  include/configs/cm_t35.h              |   3 +
>  include/scf0403_lcd.h                 |  11 ++
>  include/spi.h                         |  17 ++
>  11 files changed, 456 insertions(+), 31 deletions(-)
>  create mode 100644 drivers/video/scf0403_lcd.c
>  create mode 100644 include/scf0403_lcd.h

Did the mailing list eat the CC?  I expect these changes to come in via
the spi tree, since Anatolij acked the other parts.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131104/d12efc30/attachment.pgp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel
  2013-11-04 20:49 ` [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel Tom Rini
@ 2013-11-06  9:46   ` Nikita Kiryanov
  2013-11-06 10:14   ` Anatolij Gustschin
  1 sibling, 0 replies; 19+ messages in thread
From: Nikita Kiryanov @ 2013-11-06  9:46 UTC (permalink / raw)
  To: u-boot

Perhaps we should try his other email address; he seems to be using it
more than the gmail one now (added Cc).

On 11/04/2013 10:49 PM, Tom Rini wrote:
> On Wed, Oct 16, 2013 at 05:23:23PM +0300, Nikita Kiryanov wrote:
>
>> This patch ports the Linux driver for DataImage SCF0403852GGU04 and
>> SCF0403526GGU20 LCD panels into U-Boot. As a preparation step, variable SPI word
>> length support is added to omap3_spi and the generic SPI interface.
>> Finally, the driver is used in cm_t35 board.
>>
>> The SPI changes were tested with a Beagle I2C/SPI/MDIO Protocol Analyzer, and
>> also with a DataImage SCF0403 lcd as part of the DataImage driver test.
>>
>> Patch number 6 depends on http://patchwork.ozlabs.org/patch/275283/
>>
>> Cc: Tom Rini <trini@ti.com>
>> Cc: Anatolij Gustschin <agust@denx.de>
>> Cc: Igor Grinberg <grinberg@compulab.co.il>
>> Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
>>
>> Changes in V2:
>> 	- Rebased on top of latest U-Boot
>> 	- New patches:
>> 		 1) spi: omap3: remove semicolon from #define
>> 		 2) spi: define SPI_XFER_ONCE
>> 		 3) omap3_dss: define DSS_ONOFF
>> 	1 is a preliminary cleanup suggested by Gerhard Sittig and Igor Grinberg
>> 	2 and 3 are splitting off some new #defines to separate patches
>> 	- Moved wordlen to generic spi_slave struct, and added generic
>> 	implementation for spi_set_wordlen which only updates the struct without
>> 	touching the hardware (Igor Grinberg)
>> 	- Updated wordlen in hardware just before doing SPI transactions, not
>> 	when changing wordlen (Igor Grinberg)
>> 	- OMAP3 specific check of wordlen value from old implementation of
>> 	spi_set_wordlen moved to xfer. It refines the more general check done
>> 	in the new spi_set_wordlen.
>> 	- Fixed comment style in spi.h following a rebase on top of latest
>> 	U-Boot
>> 	- Added SPDX-License-Identifier to all new files (Anatolij Gustschin)
>> 	- s/printf/puts for not formatted strings in scf0403 driver (Anatolij
>> 	Gustschin)
>> 	- Do not fail scf0403 driver init if an invalid reset_gpio is given
>> 	(Igor Grinberg)
>>
>> Nikita Kiryanov (6):
>>    spi: omap3: remove semicolon from #define
>>    spi: omap3: add support for more word lengths
>>    spi: define SPI_XFER_ONCE
>>    lcd: add DataImage SCF0403x LCD panel support
>>    omap3_dss: define DSS_ONOFF
>>    cm_t35: use scf0403 driver
>>
>>   arch/arm/include/asm/arch-omap3/dss.h |   9 +-
>>   board/compulab/cm_t35/cm_t35.c        |  12 ++
>>   board/compulab/common/omap3_display.c |  46 +++++-
>>   drivers/spi/omap3_spi.c               |  71 +++++---
>>   drivers/spi/omap3_spi.h               |   8 +-
>>   drivers/spi/spi.c                     |  13 ++
>>   drivers/video/Makefile                |   1 +
>>   drivers/video/scf0403_lcd.c           | 296 ++++++++++++++++++++++++++++++++++
>>   include/configs/cm_t35.h              |   3 +
>>   include/scf0403_lcd.h                 |  11 ++
>>   include/spi.h                         |  17 ++
>>   11 files changed, 456 insertions(+), 31 deletions(-)
>>   create mode 100644 drivers/video/scf0403_lcd.c
>>   create mode 100644 include/scf0403_lcd.h
>
> Did the mailing list eat the CC?  I expect these changes to come in via
> the spi tree, since Anatolij acked the other parts.  Thanks!
>


-- 
Regards,
Nikita.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel
  2013-11-04 20:49 ` [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel Tom Rini
  2013-11-06  9:46   ` Nikita Kiryanov
@ 2013-11-06 10:14   ` Anatolij Gustschin
  2013-11-06 12:17     ` Nikita Kiryanov
  1 sibling, 1 reply; 19+ messages in thread
From: Anatolij Gustschin @ 2013-11-06 10:14 UTC (permalink / raw)
  To: u-boot

On Mon, 4 Nov 2013 15:49:57 -0500
Tom Rini <trini@ti.com> wrote:

> On Wed, Oct 16, 2013 at 05:23:23PM +0300, Nikita Kiryanov wrote:
> 
> > This patch ports the Linux driver for DataImage SCF0403852GGU04 and
> > SCF0403526GGU20 LCD panels into U-Boot. As a preparation step, variable SPI word
> > length support is added to omap3_spi and the generic SPI interface.
> > Finally, the driver is used in cm_t35 board.
> > 
> > The SPI changes were tested with a Beagle I2C/SPI/MDIO Protocol Analyzer, and
> > also with a DataImage SCF0403 lcd as part of the DataImage driver test.
> > 
> > Patch number 6 depends on http://patchwork.ozlabs.org/patch/275283/
> > 
> > Cc: Tom Rini <trini@ti.com>
> > Cc: Anatolij Gustschin <agust@denx.de>
> > Cc: Igor Grinberg <grinberg@compulab.co.il>
> > Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
> > 
> > Changes in V2:
> > 	- Rebased on top of latest U-Boot
> > 	- New patches:
> > 		 1) spi: omap3: remove semicolon from #define
> > 		 2) spi: define SPI_XFER_ONCE
> > 		 3) omap3_dss: define DSS_ONOFF
> > 	1 is a preliminary cleanup suggested by Gerhard Sittig and Igor Grinberg
> > 	2 and 3 are splitting off some new #defines to separate patches
> > 	- Moved wordlen to generic spi_slave struct, and added generic
> > 	implementation for spi_set_wordlen which only updates the struct without
> > 	touching the hardware (Igor Grinberg)
> > 	- Updated wordlen in hardware just before doing SPI transactions, not
> > 	when changing wordlen (Igor Grinberg)
> > 	- OMAP3 specific check of wordlen value from old implementation of
> > 	spi_set_wordlen moved to xfer. It refines the more general check done
> > 	in the new spi_set_wordlen.
> > 	- Fixed comment style in spi.h following a rebase on top of latest
> > 	U-Boot
> > 	- Added SPDX-License-Identifier to all new files (Anatolij Gustschin)
> > 	- s/printf/puts for not formatted strings in scf0403 driver (Anatolij
> > 	Gustschin)
> > 	- Do not fail scf0403 driver init if an invalid reset_gpio is given
> > 	(Igor Grinberg)
> > 
> > Nikita Kiryanov (6):
> >   spi: omap3: remove semicolon from #define
> >   spi: omap3: add support for more word lengths
> >   spi: define SPI_XFER_ONCE
> >   lcd: add DataImage SCF0403x LCD panel support
> >   omap3_dss: define DSS_ONOFF
> >   cm_t35: use scf0403 driver
> > 
> >  arch/arm/include/asm/arch-omap3/dss.h |   9 +-
> >  board/compulab/cm_t35/cm_t35.c        |  12 ++
> >  board/compulab/common/omap3_display.c |  46 +++++-
> >  drivers/spi/omap3_spi.c               |  71 +++++---
> >  drivers/spi/omap3_spi.h               |   8 +-
> >  drivers/spi/spi.c                     |  13 ++
> >  drivers/video/Makefile                |   1 +
> >  drivers/video/scf0403_lcd.c           | 296 ++++++++++++++++++++++++++++++++++
> >  include/configs/cm_t35.h              |   3 +
> >  include/scf0403_lcd.h                 |  11 ++
> >  include/spi.h                         |  17 ++
> >  11 files changed, 456 insertions(+), 31 deletions(-)
> >  create mode 100644 drivers/video/scf0403_lcd.c
> >  create mode 100644 include/scf0403_lcd.h
> 
> Did the mailing list eat the CC?  I expect these changes to come in via
> the spi tree, since Anatolij acked the other parts.  Thanks!

The patch this series depends on is not in u-boot.git/master branch
yet (but in u-boot-arm.git tree already). So, after the arm tree
is merged to master this series can be applied. I can push it via
the video tree if nobody objects.

Thanks,
Anatolij

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel
  2013-11-06 10:14   ` Anatolij Gustschin
@ 2013-11-06 12:17     ` Nikita Kiryanov
  0 siblings, 0 replies; 19+ messages in thread
From: Nikita Kiryanov @ 2013-11-06 12:17 UTC (permalink / raw)
  To: u-boot

On 11/06/2013 12:14 PM, Anatolij Gustschin wrote:
> On Mon, 4 Nov 2013 15:49:57 -0500
> Tom Rini <trini@ti.com> wrote:
>
>>
>> Did the mailing list eat the CC?  I expect these changes to come in via
>> the spi tree, since Anatolij acked the other parts.  Thanks!
>
> The patch this series depends on is not in u-boot.git/master branch
> yet (but in u-boot-arm.git tree already). So, after the arm tree
> is merged to master this series can be applied. I can push it via
> the video tree if nobody objects.

Fine by me.

>
> Thanks,
> Anatolij
>


-- 
Regards,
Nikita.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 1/6] spi: omap3: remove semicolon from #define
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 1/6] spi: omap3: remove semicolon from #define Nikita Kiryanov
@ 2013-11-12  9:15   ` Anatolij Gustschin
  0 siblings, 0 replies; 19+ messages in thread
From: Anatolij Gustschin @ 2013-11-12  9:15 UTC (permalink / raw)
  To: u-boot

On Wed, 16 Oct 2013 17:23:24 +0300
Nikita Kiryanov <nikita@compulab.co.il> wrote:

> Remove unnecessary semicolon from #define SPI_WAIT_TIMEOUT
> 
> Cc: Tom Rini <trini@ti.com>
> Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Cc: Gerhard Sittig <gsi@denx.de>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
> ---
> NOTE:	New patch in series (Gerhard Sittig, Igor Grinberg)
> 
>  drivers/spi/omap3_spi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied to u-boot-video/master, thanks!

Anatolij

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 2/6] spi: omap3: add support for more word lengths
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 2/6] spi: omap3: add support for more word lengths Nikita Kiryanov
@ 2013-11-12  9:18   ` Anatolij Gustschin
  0 siblings, 0 replies; 19+ messages in thread
From: Anatolij Gustschin @ 2013-11-12  9:18 UTC (permalink / raw)
  To: u-boot

On Wed, 16 Oct 2013 17:23:25 +0300
Nikita Kiryanov <nikita@compulab.co.il> wrote:

> Current implementation only supports 8 bit word lengths, even though
> omap3 can handle anything between 4 and 32.
> 
> Update the spi interface to support changing the SPI word length,
> and implement it in omap3_spi driver to support the full range of
> possible word lengths.
> This implementation is backwards compatible by defaulting to the old
> behavior of 8 bit word lengths.
> Also, it required a change to the omap3_spi non static I/O functions,
> but since they are not used anywhere else, no collateral changes are required.
> 
> Cc: Tom Rini <trini@ti.com>
> Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
> ---
> Changes in V2:
> 	- Removed semicolon from #define SPI_DEFAULT_WORDLEN (Gerhard Sittig,
> 	Igor Grinberg)
> 	- Moved wordlen to generic spi_slave struct, and added generic
> 	implementation for spi_set_wordlen which only updates the struct without
> 	touching the hardware (Igor Grinberg)
> 	- Update wordlen in hardware just before doing SPI transactions, not
> 	when changing wordlen (Igor Grinberg)
> 	- OMAP3 specific check of wordlen value from old implementation of
> 	spi_set_wordlen moved to xfer. It refines the more general check done
> 	in the new spi_set_wordlen.
> 	- Fixed comment style in spi.h following a rebase on top of latest
> 	U-Boot
> 
>  drivers/spi/omap3_spi.c | 69 +++++++++++++++++++++++++++++++++++--------------
>  drivers/spi/omap3_spi.h |  8 +++---
>  drivers/spi/spi.c       | 13 ++++++++++
>  include/spi.h           | 16 ++++++++++++
>  4 files changed, 82 insertions(+), 24 deletions(-)

applied to u-boot-video/master, thanks!

Anatolij

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 3/6] spi: define SPI_XFER_ONCE
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 3/6] spi: define SPI_XFER_ONCE Nikita Kiryanov
@ 2013-11-12  9:19   ` Anatolij Gustschin
  0 siblings, 0 replies; 19+ messages in thread
From: Anatolij Gustschin @ 2013-11-12  9:19 UTC (permalink / raw)
  To: u-boot

On Wed, 16 Oct 2013 17:23:26 +0300
Nikita Kiryanov <nikita@compulab.co.il> wrote:

> The flag combination "SPI_XFER_BEGIN | SPI_XFER_END" is a common use
> case of spi_xfer, and it can easily cause an already long line (spi_xfer
> takes 5 parameters) to go over the 80 character limit.
> 
> define SPI_XFER_ONCE to be a shorter version of the above flag combination.
> 
> Cc: Tom Rini <trini@ti.com>
> Cc: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
> ---
> NOTE:	This is a new patch. Its contents were originally part of "lcd: add
> 	DataImage SCF0403x LCD panel support". Split because it is unrelated to
> 	the patch it was originally in. (Igor Grinberg)
> 
>  include/spi.h | 1 +
>  1 file changed, 1 insertion(+)

applied to u-boot-video/master, thanks!

Anatolij

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 4/6] lcd: add DataImage SCF0403x LCD panel support
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 4/6] lcd: add DataImage SCF0403x LCD panel support Nikita Kiryanov
  2013-10-17 16:22   ` Anatolij Gustschin
@ 2013-11-12  9:20   ` Anatolij Gustschin
  1 sibling, 0 replies; 19+ messages in thread
From: Anatolij Gustschin @ 2013-11-12  9:20 UTC (permalink / raw)
  To: u-boot

On Wed, 16 Oct 2013 17:23:27 +0300
Nikita Kiryanov <nikita@compulab.co.il> wrote:

> Add SPI-based driver for DataImage SCF0403852GGU04 and SCF0403526GGU20
> LCD panels.
> 
> Cc: Tom Rini <trini@ti.com>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
> ---
> Changes in V2:
> 	- Added SPDX-License-Identifier to all new files (Anatolij Gustschin)
> 	- s/printf/puts for not formatted strings (Anatolij Gustschin)
> 	- Do not fail init if an invalid reset_gpio is given (Igor Grinberg)
> 	- Move definition of SPI_XFER_ONCE to a separate patch (Igor Grinberg)
> 
>  drivers/video/Makefile      |   1 +
>  drivers/video/scf0403_lcd.c | 296 ++++++++++++++++++++++++++++++++++++++++++++
>  include/scf0403_lcd.h       |  11 ++
>  3 files changed, 308 insertions(+)
>  create mode 100644 drivers/video/scf0403_lcd.c
>  create mode 100644 include/scf0403_lcd.h

applied to u-boot-video/master, thanks!

Anatolij

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 5/6] omap3_dss: define DSS_ONOFF
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 5/6] omap3_dss: define DSS_ONOFF Nikita Kiryanov
  2013-10-17 16:23   ` Anatolij Gustschin
@ 2013-11-12  9:22   ` Anatolij Gustschin
  1 sibling, 0 replies; 19+ messages in thread
From: Anatolij Gustschin @ 2013-11-12  9:22 UTC (permalink / raw)
  To: u-boot

On Wed, 16 Oct 2013 17:23:28 +0300
Nikita Kiryanov <nikita@compulab.co.il> wrote:

> Add DSS_ONOFF to polarity defines
> 
> Cc: Tom Rini <trini@ti.com>
> Cc: Anatolij Gustschin <agust@denx.de>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
> ---
> NOTE:	This is a new patch. Its contents were originally part of "cm_t35: use
> 	scf0403 driver". Split because it is unrelated to the patch it was
> 	originally in.
> 
>  arch/arm/include/asm/arch-omap3/dss.h | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

applied to u-boot-video/master, thanks!

Anatolij

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [U-Boot] [PATCH V2 6/6] cm_t35: use scf0403 driver
  2013-10-16 14:23 ` [U-Boot] [PATCH V2 6/6] cm_t35: use scf0403 driver Nikita Kiryanov
@ 2013-11-12  9:23   ` Anatolij Gustschin
  0 siblings, 0 replies; 19+ messages in thread
From: Anatolij Gustschin @ 2013-11-12  9:23 UTC (permalink / raw)
  To: u-boot

On Wed, 16 Oct 2013 17:23:29 +0300
Nikita Kiryanov <nikita@compulab.co.il> wrote:

> Use scf0403 driver to add scf0403x LCD support for cm-t35 and cm-t3730
> boards.
> 
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
> ---
> NOTE:	This patch depends on http://patchwork.ozlabs.org/patch/275283/
> 
> Changes in V2:
> 	- Changes to arch/arm/include/asm/arch-omap3/dss.h were split off to
> 	another patch.
> 
>  board/compulab/cm_t35/cm_t35.c        | 12 +++++++++
>  board/compulab/common/omap3_display.c | 46 +++++++++++++++++++++++++++++++++--
>  include/configs/cm_t35.h              |  3 +++
>  3 files changed, 59 insertions(+), 2 deletions(-)

applied to u-boot-video/master, thanks!

Anatolij

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-11-12  9:23 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-16 14:23 [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel Nikita Kiryanov
2013-10-16 14:23 ` [U-Boot] [PATCH V2 1/6] spi: omap3: remove semicolon from #define Nikita Kiryanov
2013-11-12  9:15   ` Anatolij Gustschin
2013-10-16 14:23 ` [U-Boot] [PATCH V2 2/6] spi: omap3: add support for more word lengths Nikita Kiryanov
2013-11-12  9:18   ` Anatolij Gustschin
2013-10-16 14:23 ` [U-Boot] [PATCH V2 3/6] spi: define SPI_XFER_ONCE Nikita Kiryanov
2013-11-12  9:19   ` Anatolij Gustschin
2013-10-16 14:23 ` [U-Boot] [PATCH V2 4/6] lcd: add DataImage SCF0403x LCD panel support Nikita Kiryanov
2013-10-17 16:22   ` Anatolij Gustschin
2013-11-12  9:20   ` Anatolij Gustschin
2013-10-16 14:23 ` [U-Boot] [PATCH V2 5/6] omap3_dss: define DSS_ONOFF Nikita Kiryanov
2013-10-17 16:23   ` Anatolij Gustschin
2013-11-12  9:22   ` Anatolij Gustschin
2013-10-16 14:23 ` [U-Boot] [PATCH V2 6/6] cm_t35: use scf0403 driver Nikita Kiryanov
2013-11-12  9:23   ` Anatolij Gustschin
2013-11-04 20:49 ` [U-Boot] [PATCH V2 0/6] Add support for SPI based DataImage LCD panel Tom Rini
2013-11-06  9:46   ` Nikita Kiryanov
2013-11-06 10:14   ` Anatolij Gustschin
2013-11-06 12:17     ` Nikita Kiryanov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.