* [PATCH 0/2] [kernel] ARM: lpc32xx: migrate CLCD config to device tree
@ 2017-03-08 17:46 ` Sylvain Lemieux
0 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2017-03-08 17:46 UTC (permalink / raw)
To: vz, robh+dt; +Cc: devicetree, linux-arm-kernel
From: Sylvain Lemieux <slemieux@tycoint.com>
Migrate the CLCD configurations to the device tree and
remove custom functions from board files.
This change depends on the following change:
"video: ARM CLCD: fix dma allocation size"
https://www.spinics.net/lists/arm-kernel/msg567178.html
Note:
* We tested a similar change on a custom LPC32xx board with a 480x272 LCD.
* We did not test this change on hardware;
we do not have access to a PHY3250 board with the 240x320 LCD.
Liam Beguin (2):
ARM: dts: lpc32xx: phy3250: add clcd configuration
ARM: lpc32xx: drop CLCD configuration
arch/arm/boot/dts/lpc3250-phy3250.dts | 35 ++++++++++++++++++
arch/arm/mach-lpc32xx/phy3250.c | 70 -----------------------------------
2 files changed, 35 insertions(+), 70 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] [kernel] ARM: lpc32xx: migrate CLCD config to device tree
@ 2017-03-08 17:46 ` Sylvain Lemieux
0 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2017-03-08 17:46 UTC (permalink / raw)
To: linux-arm-kernel
From: Sylvain Lemieux <slemieux@tycoint.com>
Migrate the CLCD configurations to the device tree and
remove custom functions from board files.
This change depends on the following change:
"video: ARM CLCD: fix dma allocation size"
https://www.spinics.net/lists/arm-kernel/msg567178.html
Note:
* We tested a similar change on a custom LPC32xx board with a 480x272 LCD.
* We did not test this change on hardware;
we do not have access to a PHY3250 board with the 240x320 LCD.
Liam Beguin (2):
ARM: dts: lpc32xx: phy3250: add clcd configuration
ARM: lpc32xx: drop CLCD configuration
arch/arm/boot/dts/lpc3250-phy3250.dts | 35 ++++++++++++++++++
arch/arm/mach-lpc32xx/phy3250.c | 70 -----------------------------------
2 files changed, 35 insertions(+), 70 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] [kernel] ARM: dts: lpc32xx: phy3250: add clcd configuration
2017-03-08 17:46 ` Sylvain Lemieux
@ 2017-03-08 17:46 ` Sylvain Lemieux
-1 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2017-03-08 17:46 UTC (permalink / raw)
To: vz, robh+dt; +Cc: devicetree, linux-arm-kernel
From: Liam Beguin <lbeguin@tycoint.com>
Updating CLCD board and panel definiton to use
up-to-date devicetree hardware description.
Signed-off-by: Liam Beguin <lbeguin@tycoint.com>
Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
---
arch/arm/boot/dts/lpc3250-phy3250.dts | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/arch/arm/boot/dts/lpc3250-phy3250.dts b/arch/arm/boot/dts/lpc3250-phy3250.dts
index fd95e2b10357..1e5dbbad6cc4 100644
--- a/arch/arm/boot/dts/lpc3250-phy3250.dts
+++ b/arch/arm/boot/dts/lpc3250-phy3250.dts
@@ -72,7 +72,42 @@
};
&clcd {
+ interrupt-names = "combined";
+ max-memory-bandwidth = <11700000>; /* Bps, 240x320@60 16bpp */
status = "okay";
+
+ port {
+ clcd_pads: endpoint {
+ remote-endpoint = <&clcd_panel>;
+ arm,pl11x,tft-r0g0b0-pads = <3 10 19>; /* Set LCD to BGR 565 */
+ };
+ };
+
+ panel {
+ compatible = "panel-dpi";
+
+ port {
+ clcd_panel: endpoint {
+ remote-endpoint = <&clcd_pads>;
+ };
+ };
+
+ panel-timing {
+ clock-frequency = <5850000>;
+
+ hactive = <240>;
+ hback-porch = <11>;
+ hfront-porch = <22>;
+ hsync-len = <5>;
+
+ vactive = <320>;
+ vback-porch = <2>;
+ vfront-porch = <1>;
+ vsync-len = <2>;
+
+ pixelclk-active = <1>;
+ };
+ };
};
&i2c1 {
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 1/2] [kernel] ARM: dts: lpc32xx: phy3250: add clcd configuration
@ 2017-03-08 17:46 ` Sylvain Lemieux
0 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2017-03-08 17:46 UTC (permalink / raw)
To: linux-arm-kernel
From: Liam Beguin <lbeguin@tycoint.com>
Updating CLCD board and panel definiton to use
up-to-date devicetree hardware description.
Signed-off-by: Liam Beguin <lbeguin@tycoint.com>
Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
---
arch/arm/boot/dts/lpc3250-phy3250.dts | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/arch/arm/boot/dts/lpc3250-phy3250.dts b/arch/arm/boot/dts/lpc3250-phy3250.dts
index fd95e2b10357..1e5dbbad6cc4 100644
--- a/arch/arm/boot/dts/lpc3250-phy3250.dts
+++ b/arch/arm/boot/dts/lpc3250-phy3250.dts
@@ -72,7 +72,42 @@
};
&clcd {
+ interrupt-names = "combined";
+ max-memory-bandwidth = <11700000>; /* Bps, 240x320 at 60 16bpp */
status = "okay";
+
+ port {
+ clcd_pads: endpoint {
+ remote-endpoint = <&clcd_panel>;
+ arm,pl11x,tft-r0g0b0-pads = <3 10 19>; /* Set LCD to BGR 565 */
+ };
+ };
+
+ panel {
+ compatible = "panel-dpi";
+
+ port {
+ clcd_panel: endpoint {
+ remote-endpoint = <&clcd_pads>;
+ };
+ };
+
+ panel-timing {
+ clock-frequency = <5850000>;
+
+ hactive = <240>;
+ hback-porch = <11>;
+ hfront-porch = <22>;
+ hsync-len = <5>;
+
+ vactive = <320>;
+ vback-porch = <2>;
+ vfront-porch = <1>;
+ vsync-len = <2>;
+
+ pixelclk-active = <1>;
+ };
+ };
};
&i2c1 {
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] [kernel] ARM: lpc32xx: drop CLCD configuration
2017-03-08 17:46 ` Sylvain Lemieux
@ 2017-03-08 17:46 ` Sylvain Lemieux
-1 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2017-03-08 17:46 UTC (permalink / raw)
To: vz, robh+dt; +Cc: devicetree, linux-arm-kernel
From: Liam Beguin <lbeguin@tycoint.com>
Drop the CLCD configurations and custom functions
since it's now done using the devicetree.
Signed-off-by: Liam Beguin <lbeguin@tycoint.com>
Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
---
arch/arm/mach-lpc32xx/phy3250.c | 70 -----------------------------------------
1 file changed, 70 deletions(-)
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c
index 6c52bd32610e..97bffd9324f3 100644
--- a/arch/arm/mach-lpc32xx/phy3250.c
+++ b/arch/arm/mach-lpc32xx/phy3250.c
@@ -24,8 +24,6 @@
#include <linux/irq.h>
#include <linux/dma-mapping.h>
#include <linux/gpio.h>
-#include <linux/amba/bus.h>
-#include <linux/amba/clcd.h>
#include <linux/amba/pl08x.h>
#include <linux/amba/mmci.h>
#include <linux/of.h>
@@ -45,73 +43,6 @@
#include <mach/board.h>
#include "common.h"
-/*
- * AMBA LCD controller
- */
-static struct clcd_panel conn_lcd_panel = {
- .mode = {
- .name = "QVGA portrait",
- .refresh = 60,
- .xres = 240,
- .yres = 320,
- .pixclock = 191828,
- .left_margin = 22,
- .right_margin = 11,
- .upper_margin = 2,
- .lower_margin = 1,
- .hsync_len = 5,
- .vsync_len = 2,
- .sync = 0,
- .vmode = FB_VMODE_NONINTERLACED,
- },
- .width = -1,
- .height = -1,
- .tim2 = (TIM2_IVS | TIM2_IHS),
- .cntl = (CNTL_BGR | CNTL_LCDTFT | CNTL_LCDVCOMP(1) |
- CNTL_LCDBPP16_565),
- .bpp = 16,
-};
-#define PANEL_SIZE (3 * SZ_64K)
-
-static int lpc32xx_clcd_setup(struct clcd_fb *fb)
-{
- dma_addr_t dma;
-
- fb->fb.screen_base = dma_alloc_wc(&fb->dev->dev, PANEL_SIZE, &dma,
- GFP_KERNEL);
- if (!fb->fb.screen_base) {
- printk(KERN_ERR "CLCD: unable to map framebuffer\n");
- return -ENOMEM;
- }
-
- fb->fb.fix.smem_start = dma;
- fb->fb.fix.smem_len = PANEL_SIZE;
- fb->panel = &conn_lcd_panel;
-
- return 0;
-}
-
-static int lpc32xx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
-{
- return dma_mmap_wc(&fb->dev->dev, vma, fb->fb.screen_base,
- fb->fb.fix.smem_start, fb->fb.fix.smem_len);
-}
-
-static void lpc32xx_clcd_remove(struct clcd_fb *fb)
-{
- dma_free_wc(&fb->dev->dev, fb->fb.fix.smem_len, fb->fb.screen_base,
- fb->fb.fix.smem_start);
-}
-
-static struct clcd_board lpc32xx_clcd_data = {
- .name = "Phytec LCD",
- .check = clcdfb_check,
- .decode = clcdfb_decode,
- .setup = lpc32xx_clcd_setup,
- .mmap = lpc32xx_clcd_mmap,
- .remove = lpc32xx_clcd_remove,
-};
-
static struct pl08x_channel_data pl08x_slave_channels[] = {
{
.bus_id = "nand-slc",
@@ -161,7 +92,6 @@ static struct lpc32xx_mlc_platform_data lpc32xx_mlc_data = {
static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = {
OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", NULL),
OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", NULL),
- OF_DEV_AUXDATA("arm,pl110", 0x31040000, "dev:clcd", &lpc32xx_clcd_data),
OF_DEV_AUXDATA("arm,pl080", 0x31000000, "pl08xdmac", &pl08x_pd),
OF_DEV_AUXDATA("arm,pl18x", 0x20098000, "20098000.sd",
&lpc32xx_mmci_data),
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] [kernel] ARM: lpc32xx: drop CLCD configuration
@ 2017-03-08 17:46 ` Sylvain Lemieux
0 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2017-03-08 17:46 UTC (permalink / raw)
To: linux-arm-kernel
From: Liam Beguin <lbeguin@tycoint.com>
Drop the CLCD configurations and custom functions
since it's now done using the devicetree.
Signed-off-by: Liam Beguin <lbeguin@tycoint.com>
Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
---
arch/arm/mach-lpc32xx/phy3250.c | 70 -----------------------------------------
1 file changed, 70 deletions(-)
diff --git a/arch/arm/mach-lpc32xx/phy3250.c b/arch/arm/mach-lpc32xx/phy3250.c
index 6c52bd32610e..97bffd9324f3 100644
--- a/arch/arm/mach-lpc32xx/phy3250.c
+++ b/arch/arm/mach-lpc32xx/phy3250.c
@@ -24,8 +24,6 @@
#include <linux/irq.h>
#include <linux/dma-mapping.h>
#include <linux/gpio.h>
-#include <linux/amba/bus.h>
-#include <linux/amba/clcd.h>
#include <linux/amba/pl08x.h>
#include <linux/amba/mmci.h>
#include <linux/of.h>
@@ -45,73 +43,6 @@
#include <mach/board.h>
#include "common.h"
-/*
- * AMBA LCD controller
- */
-static struct clcd_panel conn_lcd_panel = {
- .mode = {
- .name = "QVGA portrait",
- .refresh = 60,
- .xres = 240,
- .yres = 320,
- .pixclock = 191828,
- .left_margin = 22,
- .right_margin = 11,
- .upper_margin = 2,
- .lower_margin = 1,
- .hsync_len = 5,
- .vsync_len = 2,
- .sync = 0,
- .vmode = FB_VMODE_NONINTERLACED,
- },
- .width = -1,
- .height = -1,
- .tim2 = (TIM2_IVS | TIM2_IHS),
- .cntl = (CNTL_BGR | CNTL_LCDTFT | CNTL_LCDVCOMP(1) |
- CNTL_LCDBPP16_565),
- .bpp = 16,
-};
-#define PANEL_SIZE (3 * SZ_64K)
-
-static int lpc32xx_clcd_setup(struct clcd_fb *fb)
-{
- dma_addr_t dma;
-
- fb->fb.screen_base = dma_alloc_wc(&fb->dev->dev, PANEL_SIZE, &dma,
- GFP_KERNEL);
- if (!fb->fb.screen_base) {
- printk(KERN_ERR "CLCD: unable to map framebuffer\n");
- return -ENOMEM;
- }
-
- fb->fb.fix.smem_start = dma;
- fb->fb.fix.smem_len = PANEL_SIZE;
- fb->panel = &conn_lcd_panel;
-
- return 0;
-}
-
-static int lpc32xx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
-{
- return dma_mmap_wc(&fb->dev->dev, vma, fb->fb.screen_base,
- fb->fb.fix.smem_start, fb->fb.fix.smem_len);
-}
-
-static void lpc32xx_clcd_remove(struct clcd_fb *fb)
-{
- dma_free_wc(&fb->dev->dev, fb->fb.fix.smem_len, fb->fb.screen_base,
- fb->fb.fix.smem_start);
-}
-
-static struct clcd_board lpc32xx_clcd_data = {
- .name = "Phytec LCD",
- .check = clcdfb_check,
- .decode = clcdfb_decode,
- .setup = lpc32xx_clcd_setup,
- .mmap = lpc32xx_clcd_mmap,
- .remove = lpc32xx_clcd_remove,
-};
-
static struct pl08x_channel_data pl08x_slave_channels[] = {
{
.bus_id = "nand-slc",
@@ -161,7 +92,6 @@ static struct lpc32xx_mlc_platform_data lpc32xx_mlc_data = {
static const struct of_dev_auxdata lpc32xx_auxdata_lookup[] __initconst = {
OF_DEV_AUXDATA("arm,pl022", 0x20084000, "dev:ssp0", NULL),
OF_DEV_AUXDATA("arm,pl022", 0x2008C000, "dev:ssp1", NULL),
- OF_DEV_AUXDATA("arm,pl110", 0x31040000, "dev:clcd", &lpc32xx_clcd_data),
OF_DEV_AUXDATA("arm,pl080", 0x31000000, "pl08xdmac", &pl08x_pd),
OF_DEV_AUXDATA("arm,pl18x", 0x20098000, "20098000.sd",
&lpc32xx_mmci_data),
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] [kernel] ARM: lpc32xx: migrate CLCD config to device tree
2017-03-08 17:46 ` Sylvain Lemieux
@ 2017-03-28 17:28 ` Sylvain Lemieux
-1 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2017-03-28 17:28 UTC (permalink / raw)
To: vz-ChpfBGZJDbMAvxtiuMwx3w
Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA
Hi Vladimir,
On Wed, 2017-03-08 at 12:46 -0500, Sylvain Lemieux wrote:
> From: Sylvain Lemieux <slemieux-1xCVI8+nB4ZBDgjK7y7TUQ@public.gmane.org>
>
> Migrate the CLCD configurations to the device tree and
> remove custom functions from board files.
>
> This change depends on the following change:
> "video: ARM CLCD: fix dma allocation size"
> https://www.spinics.net/lists/arm-kernel/msg567178.html
>
> Note:
> * We tested a similar change on a custom LPC32xx board with a 480x272 LCD.
> * We did not test this change on hardware;
> we do not have access to a PHY3250 board with the 240x320 LCD.
>
> Liam Beguin (2):
> ARM: dts: lpc32xx: phy3250: add clcd configuration
> ARM: lpc32xx: drop CLCD configuration
>
> arch/arm/boot/dts/lpc3250-phy3250.dts | 35 ++++++++++++++++++
> arch/arm/mach-lpc32xx/phy3250.c | 70 -----------------------------------
> 2 files changed, 35 insertions(+), 70 deletions(-)
>
do you think you can look at this patchset?
Regards,
Sylvain
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 0/2] [kernel] ARM: lpc32xx: migrate CLCD config to device tree
@ 2017-03-28 17:28 ` Sylvain Lemieux
0 siblings, 0 replies; 8+ messages in thread
From: Sylvain Lemieux @ 2017-03-28 17:28 UTC (permalink / raw)
To: linux-arm-kernel
Hi Vladimir,
On Wed, 2017-03-08 at 12:46 -0500, Sylvain Lemieux wrote:
> From: Sylvain Lemieux <slemieux@tycoint.com>
>
> Migrate the CLCD configurations to the device tree and
> remove custom functions from board files.
>
> This change depends on the following change:
> "video: ARM CLCD: fix dma allocation size"
> https://www.spinics.net/lists/arm-kernel/msg567178.html
>
> Note:
> * We tested a similar change on a custom LPC32xx board with a 480x272 LCD.
> * We did not test this change on hardware;
> we do not have access to a PHY3250 board with the 240x320 LCD.
>
> Liam Beguin (2):
> ARM: dts: lpc32xx: phy3250: add clcd configuration
> ARM: lpc32xx: drop CLCD configuration
>
> arch/arm/boot/dts/lpc3250-phy3250.dts | 35 ++++++++++++++++++
> arch/arm/mach-lpc32xx/phy3250.c | 70 -----------------------------------
> 2 files changed, 35 insertions(+), 70 deletions(-)
>
do you think you can look at this patchset?
Regards,
Sylvain
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-03-28 17:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 17:46 [PATCH 0/2] [kernel] ARM: lpc32xx: migrate CLCD config to device tree Sylvain Lemieux
2017-03-08 17:46 ` Sylvain Lemieux
2017-03-08 17:46 ` [PATCH 1/2] [kernel] ARM: dts: lpc32xx: phy3250: add clcd configuration Sylvain Lemieux
2017-03-08 17:46 ` Sylvain Lemieux
2017-03-08 17:46 ` [PATCH 2/2] [kernel] ARM: lpc32xx: drop CLCD configuration Sylvain Lemieux
2017-03-08 17:46 ` Sylvain Lemieux
[not found] ` <20170308174638.25578-1-slemieux.tyco-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-03-28 17:28 ` [PATCH 0/2] [kernel] ARM: lpc32xx: migrate CLCD config to device tree Sylvain Lemieux
2017-03-28 17:28 ` Sylvain Lemieux
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.