* [PATCH 0/2] video: fbdev: pxafb: devicetree conversion
@ 2015-10-03 16:11 Robert Jarzmik
2015-10-03 16:11 ` [PATCH 1/2] video: fbdev: pxafb: loosen the platform data bond Robert Jarzmik
2015-10-03 16:11 ` [PATCH 2/2] video: fbdev: pxafb: initial devicetree conversion Robert Jarzmik
0 siblings, 2 replies; 6+ messages in thread
From: Robert Jarzmik @ 2015-10-03 16:11 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: linux-fbdev, linux-kernel, Robert Jarzmik
This patchset aims at bringing support for the pxa framebuffer driver to a
devicetree pxa platform.
This was tested on a pxa27x platform, in both a devicetree build and a classic
platform data one.
Robert Jarzmik (2):
video: fbdev: pxafb: loosen the platform data bond
video: fbdev: pxafb: initial devicetree conversion
drivers/video/fbdev/Kconfig | 2 +
drivers/video/fbdev/pxafb.c | 212 +++++++++++++++++++++++++++++++++++++++-----
drivers/video/fbdev/pxafb.h | 2 +
3 files changed, 195 insertions(+), 21 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] video: fbdev: pxafb: loosen the platform data bond
2015-10-03 16:11 [PATCH 0/2] video: fbdev: pxafb: devicetree conversion Robert Jarzmik
@ 2015-10-03 16:11 ` Robert Jarzmik
2015-10-03 16:11 ` [PATCH 2/2] video: fbdev: pxafb: initial devicetree conversion Robert Jarzmik
1 sibling, 0 replies; 6+ messages in thread
From: Robert Jarzmik @ 2015-10-03 16:11 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: linux-fbdev, linux-kernel, Robert Jarzmik
In order to prepare the transition to a mixed platform data and
device-tree initialization, remove all the platform data references all
over the driver.
Copy the platform data into the internal structure of the pxafb, and
only use this afterward.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
drivers/video/fbdev/pxafb.c | 54 ++++++++++++++++++++++++++++-----------------
drivers/video/fbdev/pxafb.h | 2 ++
2 files changed, 36 insertions(+), 20 deletions(-)
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index 94813af97f09..ed4b1a5dc306 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -457,7 +457,7 @@ static int pxafb_adjust_timing(struct pxafb_info *fbi,
static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
{
struct pxafb_info *fbi = container_of(info, struct pxafb_info, fb);
- struct pxafb_mach_info *inf = dev_get_platdata(fbi->dev);
+ struct pxafb_mach_info *inf = fbi->inf;
int err;
if (inf->fixed_modes) {
@@ -1230,7 +1230,7 @@ static unsigned int __smart_timing(unsigned time_ns, unsigned long lcd_clk)
static void setup_smart_timing(struct pxafb_info *fbi,
struct fb_var_screeninfo *var)
{
- struct pxafb_mach_info *inf = dev_get_platdata(fbi->dev);
+ struct pxafb_mach_info *inf = fbi->inf;
struct pxafb_mode_info *mode = &inf->modes[0];
unsigned long lclk = clk_get_rate(fbi->clk);
unsigned t1, t2, t3, t4;
@@ -1258,14 +1258,13 @@ static void setup_smart_timing(struct pxafb_info *fbi,
static int pxafb_smart_thread(void *arg)
{
struct pxafb_info *fbi = arg;
- struct pxafb_mach_info *inf = dev_get_platdata(fbi->dev);
+ struct pxafb_mach_info *inf = fbi->inf;
if (!inf->smart_update) {
pr_err("%s: not properly initialized, thread terminated\n",
__func__);
return -EINVAL;
}
- inf = dev_get_platdata(fbi->dev);
pr_debug("%s(): task starting\n", __func__);
@@ -1788,11 +1787,11 @@ decode_mode:
fbi->video_mem_size = video_mem_size;
}
-static struct pxafb_info *pxafb_init_fbinfo(struct device *dev)
+static struct pxafb_info *pxafb_init_fbinfo(struct device *dev,
+ struct pxafb_mach_info *inf)
{
struct pxafb_info *fbi;
void *addr;
- struct pxafb_mach_info *inf = dev_get_platdata(dev);
/* Alloc the pxafb_info and pseudo_palette in one step */
fbi = kmalloc(sizeof(struct pxafb_info) + sizeof(u32) * 16, GFP_KERNEL);
@@ -1801,6 +1800,7 @@ static struct pxafb_info *pxafb_init_fbinfo(struct device *dev)
memset(fbi, 0, sizeof(struct pxafb_info));
fbi->dev = dev;
+ fbi->inf = inf;
fbi->clk = clk_get(dev, NULL);
if (IS_ERR(fbi->clk)) {
@@ -1852,10 +1852,9 @@ static struct pxafb_info *pxafb_init_fbinfo(struct device *dev)
}
#ifdef CONFIG_FB_PXA_PARAMETERS
-static int parse_opt_mode(struct device *dev, const char *this_opt)
+static int parse_opt_mode(struct device *dev, const char *this_opt,
+ struct pxafb_mach_info *inf)
{
- struct pxafb_mach_info *inf = dev_get_platdata(dev);
-
const char *name = this_opt+5;
unsigned int namelen = strlen(name);
int res_specified = 0, bpp_specified = 0;
@@ -1911,9 +1910,9 @@ done:
return 0;
}
-static int parse_opt(struct device *dev, char *this_opt)
+static int parse_opt(struct device *dev, char *this_opt,
+ struct pxafb_mach_info *inf)
{
- struct pxafb_mach_info *inf = dev_get_platdata(dev);
struct pxafb_mode_info *mode = &inf->modes[0];
char s[64];
@@ -1922,7 +1921,7 @@ static int parse_opt(struct device *dev, char *this_opt)
if (!strncmp(this_opt, "vmem:", 5)) {
video_mem_size = memparse(this_opt + 5, NULL);
} else if (!strncmp(this_opt, "mode:", 5)) {
- return parse_opt_mode(dev, this_opt);
+ return parse_opt_mode(dev, this_opt, inf);
} else if (!strncmp(this_opt, "pixclock:", 9)) {
mode->pixclock = simple_strtoul(this_opt+9, NULL, 0);
sprintf(s, "pixclock: %ld\n", mode->pixclock);
@@ -2011,7 +2010,8 @@ static int parse_opt(struct device *dev, char *this_opt)
return 0;
}
-static int pxafb_parse_options(struct device *dev, char *options)
+static int pxafb_parse_options(struct device *dev, char *options,
+ struct pxafb_mach_info *inf)
{
char *this_opt;
int ret;
@@ -2023,7 +2023,7 @@ static int pxafb_parse_options(struct device *dev, char *options)
/* could be made table driven or similar?... */
while ((this_opt = strsep(&options, ",")) != NULL) {
- ret = parse_opt(dev, this_opt);
+ ret = parse_opt(dev, this_opt, inf);
if (ret)
return ret;
}
@@ -2095,19 +2095,33 @@ static void pxafb_check_options(struct device *dev, struct pxafb_mach_info *inf)
static int pxafb_probe(struct platform_device *dev)
{
struct pxafb_info *fbi;
- struct pxafb_mach_info *inf;
+ struct pxafb_mach_info *inf, *pdata;
struct resource *r;
- int irq, ret;
+ int i, irq, ret;
dev_dbg(&dev->dev, "pxafb_probe\n");
- inf = dev_get_platdata(&dev->dev);
ret = -ENOMEM;
- fbi = NULL;
+ pdata = dev_get_platdata(&dev->dev);
+ inf = devm_kmalloc(&dev->dev, sizeof(*inf), GFP_KERNEL);
if (!inf)
goto failed;
+ if (pdata) {
+ *inf = *pdata;
+ inf->modes + devm_kmalloc_array(&dev->dev, pdata->num_modes,
+ sizeof(inf->modes[0]), GFP_KERNEL);
+ if (!inf->modes)
+ goto failed;
+ for (i = 0; i < inf->num_modes; i++)
+ inf->modes[i] = pdata->modes[i];
+ }
+
+ fbi = NULL;
+ if (!pdata)
+ goto failed;
- ret = pxafb_parse_options(&dev->dev, g_options);
+ ret = pxafb_parse_options(&dev->dev, g_options, inf);
if (ret < 0)
goto failed;
@@ -2125,7 +2139,7 @@ static int pxafb_probe(struct platform_device *dev)
goto failed;
}
- fbi = pxafb_init_fbinfo(&dev->dev);
+ fbi = pxafb_init_fbinfo(&dev->dev, inf);
if (!fbi) {
/* only reason for pxafb_init_fbinfo to fail is kmalloc */
dev_err(&dev->dev, "Failed to initialize framebuffer device\n");
diff --git a/drivers/video/fbdev/pxafb.h b/drivers/video/fbdev/pxafb.h
index 26ba9fa3f737..5dc414e26fc8 100644
--- a/drivers/video/fbdev/pxafb.h
+++ b/drivers/video/fbdev/pxafb.h
@@ -167,6 +167,8 @@ struct pxafb_info {
void (*lcd_power)(int, struct fb_var_screeninfo *);
void (*backlight_power)(int);
+
+ struct pxafb_mach_info *inf;
};
#define TO_INF(ptr,member) container_of(ptr,struct pxafb_info,member)
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] video: fbdev: pxafb: initial devicetree conversion
2015-10-03 16:11 [PATCH 0/2] video: fbdev: pxafb: devicetree conversion Robert Jarzmik
2015-10-03 16:11 ` [PATCH 1/2] video: fbdev: pxafb: loosen the platform data bond Robert Jarzmik
@ 2015-10-03 16:11 ` Robert Jarzmik
2015-10-03 17:02 ` Philipp Zabel
1 sibling, 1 reply; 6+ messages in thread
From: Robert Jarzmik @ 2015-10-03 16:11 UTC (permalink / raw)
To: Jean-Christophe Plagniol-Villard, Tomi Valkeinen
Cc: linux-fbdev, linux-kernel, Robert Jarzmik
This patch brings a first support of pxa framebuffer devices to a
devicetree pxa platform, as was before platform data.
There are restrictions with this port, the biggest one being the lack of
support of smart panels. Moreover the conversion doesn't provide a way
to declare multiple framebuffer configurations with different bits per
pixel, only the LCD hardware bus width is used.
The patch was tested on both pxa25x, pxa27x and pxa3xx platform (namely
lubbock, mainstone and zylonite).
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
drivers/video/fbdev/Kconfig | 2 +
drivers/video/fbdev/pxafb.c | 162 +++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 161 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 8b1d371b5404..1a24ca5a0624 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -1878,6 +1878,8 @@ config FB_PXA
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
+ select VIDEOMODE_HELPERS if OF
+ select FB_MODE_HELPERS if OF
---help---
Frame buffer driver for the built-in LCD controller in the Intel
PXA2x0 processor.
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index ed4b1a5dc306..602622c56186 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -55,6 +55,8 @@
#include <linux/kthread.h>
#include <linux/freezer.h>
#include <linux/console.h>
+#include <video/of_display_timing.h>
+#include <video/videomode.h>
#include <mach/hardware.h>
#include <asm/io.h>
@@ -2092,6 +2094,152 @@ static void pxafb_check_options(struct device *dev, struct pxafb_mach_info *inf)
#define pxafb_check_options(...) do {} while (0)
#endif
+#if defined(CONFIG_OF)
+static const char * const lcd_types[] = {
+ "unknown", "mono-stn", "mono-dstn", "color-stn", "color-dstn",
+ "color-tft", "smart-panel", NULL
+};
+
+static int of_get_pxafb_display(struct device *dev, struct device_node *disp,
+ struct pxafb_mach_info *info)
+{
+ struct display_timings *timings;
+ struct videomode vm;
+ int i, ret = -EINVAL;
+ u32 bpp;
+ const char *s;
+
+ ret = of_property_read_u32(disp, "bits-per-pixel", &bpp);
+ if (ret) {
+ dev_err(dev, "no bits per pixel specified: %d\n", ret);
+ return ret;
+ }
+
+ ret = of_property_read_string(disp, "lcd-type", &s);
+ if (ret) {
+ dev_err(dev, "no lcd type: %d\n", ret);
+ return ret;
+ }
+
+ for (i = 0; lcd_types[i]; i++)
+ if (!strcmp(s, lcd_types[i]))
+ break;
+ if (!i || !lcd_types[i]) {
+ dev_err(dev, "lcd-type %s is unknown\n", s);
+ return -EINVAL;
+ }
+ info->lcd_conn |= LCD_CONN_TYPE(i);
+ info->lcd_conn |= LCD_CONN_WIDTH(bpp);
+
+ timings = of_get_display_timings(disp);
+ if (!timings)
+ goto out;
+
+ ret = -ENOMEM;
+ info->modes = kmalloc_array(timings->num_timings,
+ sizeof(info->modes[0]), GFP_KERNEL);
+ if (!info->modes)
+ goto out;
+ info->num_modes = timings->num_timings;
+
+ for (i = 0; i < timings->num_timings; i++) {
+ ret = videomode_from_timings(timings, &vm, i);
+ if (ret) {
+ dev_err(dev, "videomode_from_timings %d failed: %d\n",
+ i, ret);
+ goto out;
+ }
+ if (vm.flags & DISPLAY_FLAGS_PIXDATA_POSEDGE)
+ info->lcd_conn |= LCD_PCLK_EDGE_RISE;
+ if (vm.flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
+ info->lcd_conn |= LCD_PCLK_EDGE_FALL;
+ if (vm.flags & DISPLAY_FLAGS_DE_HIGH)
+ info->lcd_conn |= LCD_BIAS_ACTIVE_HIGH;
+ if (vm.flags & DISPLAY_FLAGS_DE_LOW)
+ info->lcd_conn |= LCD_BIAS_ACTIVE_LOW;
+ if (vm.flags & DISPLAY_FLAGS_HSYNC_HIGH)
+ info->modes[i].sync |= FB_SYNC_HOR_HIGH_ACT;
+ if (vm.flags & DISPLAY_FLAGS_VSYNC_HIGH)
+ info->modes[i].sync |= FB_SYNC_VERT_HIGH_ACT;
+
+ info->modes[i].pixclock = 1000000000UL / (vm.pixelclock / 1000);
+ info->modes[i].xres = vm.hactive;
+ info->modes[i].yres = vm.vactive;
+ info->modes[i].hsync_len = vm.hsync_len;
+ info->modes[i].left_margin = vm.hback_porch;
+ info->modes[i].right_margin = vm.hfront_porch;
+ info->modes[i].vsync_len = vm.vsync_len;
+ info->modes[i].upper_margin = vm.vback_porch;
+ info->modes[i].lower_margin = vm.vfront_porch;
+ info->modes[i].bpp = bpp;
+ }
+ ret = 0;
+
+out:
+ display_timings_release(timings);
+ return ret;
+}
+
+static int of_get_pxafb_mode_info(struct device *dev,
+ struct pxafb_mach_info *info)
+{
+ struct device_node *display;
+ u32 depth = 0, transparency = 0;
+ int ret, i;
+
+ of_property_read_u32(dev->of_node, "depth", &depth);
+ of_property_read_u32(dev->of_node, "enable-transparency-bit",
+ &transparency);
+
+ display = of_parse_phandle(dev->of_node, "display", 0);
+ if (!display) {
+ dev_err(dev, "no display defined\n");
+ return -EINVAL;
+ }
+
+ ret = of_get_pxafb_display(dev, display, info);
+ of_node_put(display);
+ if (ret)
+ return ret;
+
+ for (i = 0; i < info->num_modes; i++) {
+ info->modes[i].depth = depth;
+ info->modes[i].transparency = transparency;
+ }
+
+ return 0;
+}
+
+static struct pxafb_mach_info *of_pxafb_of_mach_info(struct device *dev)
+{
+ int ret;
+ struct pxafb_mach_info *info;
+
+ if (!dev->of_node)
+ return NULL;
+ info = devm_kzalloc(dev, sizeof(*info), GFP_KERNEL);
+ if (!info)
+ return ERR_PTR(-ENOMEM);
+ ret = of_get_pxafb_mode_info(dev, info);
+ if (ret) {
+ kfree(info->modes);
+ return ERR_PTR(ret);
+ }
+
+ /*
+ * On purpose, neither lccrX registers nor video memory size can be
+ * specified through device-tree, they are considered more a debug hack
+ * available through command line.
+ */
+ return info;
+}
+#else
+static struct pxafb_mach_info *of_pxafb_of_mach_info(struct device *dev)
+{
+ return NULL;
+}
+#endif
+
static int pxafb_probe(struct platform_device *dev)
{
struct pxafb_info *fbi;
@@ -2104,8 +2252,7 @@ static int pxafb_probe(struct platform_device *dev)
ret = -ENOMEM;
pdata = dev_get_platdata(&dev->dev);
inf = devm_kmalloc(&dev->dev, sizeof(*inf), GFP_KERNEL);
- if (!inf)
- goto failed;
+
if (pdata) {
*inf = *pdata;
inf->modes @@ -2117,8 +2264,9 @@ static int pxafb_probe(struct platform_device *dev)
inf->modes[i] = pdata->modes[i];
}
- fbi = NULL;
if (!pdata)
+ inf = of_pxafb_of_mach_info(&dev->dev);
+ if (IS_ERR_OR_NULL(inf))
goto failed;
ret = pxafb_parse_options(&dev->dev, g_options, inf);
@@ -2313,11 +2461,19 @@ static int pxafb_remove(struct platform_device *dev)
return 0;
}
+static const struct of_device_id pxafb_of_dev_id[] = {
+ {
+ .compatible = "marvell,pxa2xx-fb",
+ },
+};
+MODULE_DEVICE_TABLE(of, pxafb_of_dev_id);
+
static struct platform_driver pxafb_driver = {
.probe = pxafb_probe,
.remove = pxafb_remove,
.driver = {
.name = "pxa2xx-fb",
+ .of_match_table = pxafb_of_dev_id,
#ifdef CONFIG_PM
.pm = &pxafb_pm_ops,
#endif
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] video: fbdev: pxafb: initial devicetree conversion
2015-10-03 16:11 ` [PATCH 2/2] video: fbdev: pxafb: initial devicetree conversion Robert Jarzmik
@ 2015-10-03 17:02 ` Philipp Zabel
2015-10-03 17:08 ` Robert Jarzmik
0 siblings, 1 reply; 6+ messages in thread
From: Philipp Zabel @ 2015-10-03 17:02 UTC (permalink / raw)
To: Robert Jarzmik
Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen, linux-fbdev,
LKML
Hi Robert,
On Sat, Oct 3, 2015 at 6:11 PM, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> This patch brings a first support of pxa framebuffer devices to a
> devicetree pxa platform, as was before platform data.
>
> There are restrictions with this port, the biggest one being the lack of
> support of smart panels. Moreover the conversion doesn't provide a way
> to declare multiple framebuffer configurations with different bits per
> pixel, only the LCD hardware bus width is used.
>
> The patch was tested on both pxa25x, pxa27x and pxa3xx platform (namely
> lubbock, mainstone and zylonite).
>
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Thanks a lot for working on this! Out of interest, do you plan to
convert MIOA701 to DT?
[...]
> + of_property_read_u32(dev->of_node, "depth", &depth);
[...]
> + of_property_read_u32(dev->of_node, "enable-transparency-bit",
[...]
> + display = of_parse_phandle(dev->of_node, "display", 0);
[...]
> + ret = of_property_read_u32(disp, "bits-per-pixel", &bpp);
[...]
> + ret = of_property_read_string(disp, "lcd-type", &s);
[...]
> + timings = of_get_display_timings(disp);
These DT properties need some kind of binding documentation.
[...]
> @@ -2313,11 +2461,19 @@ static int pxafb_remove(struct platform_device *dev)
> return 0;
> }
>
> +static const struct of_device_id pxafb_of_dev_id[] = {
> + {
> + .compatible = "marvell,pxa2xx-fb",
At least in the old Intel manuals, this was called the LCD Controller,
all register names are LCsomething.
Please let's not just put the Linux driver name in the device tree and
call this pxa2xx-lcd-controller or a shortened version thereof.
best regards
Philipp
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] video: fbdev: pxafb: initial devicetree conversion
2015-10-03 17:02 ` Philipp Zabel
@ 2015-10-03 17:08 ` Robert Jarzmik
2015-10-03 18:05 ` Philipp Zabel
0 siblings, 1 reply; 6+ messages in thread
From: Robert Jarzmik @ 2015-10-03 17:08 UTC (permalink / raw)
To: Philipp Zabel
Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen, linux-fbdev,
LKML
Philipp Zabel <philipp.zabel@gmail.com> writes:
> Hi Robert,
>
> On Sat, Oct 3, 2015 at 6:11 PM, Robert Jarzmik <robert.jarzmik@free.fr> wrote:
>> This patch brings a first support of pxa framebuffer devices to a
>> devicetree pxa platform, as was before platform data.
>>
>> There are restrictions with this port, the biggest one being the lack of
>> support of smart panels. Moreover the conversion doesn't provide a way
>> to declare multiple framebuffer configurations with different bits per
>> pixel, only the LCD hardware bus width is used.
>>
>> The patch was tested on both pxa25x, pxa27x and pxa3xx platform (namely
>> lubbock, mainstone and zylonite).
>>
>> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
>
> Thanks a lot for working on this! Out of interest, do you plan to
> convert MIOA701 to DT?
Actually, I already had. If you take all the pending patches scattered across
all the subsystems (around 40 by my last count), then mioa701 is converted, see
in [1]. If we take -next tree, I think the count will be closer to 20 or so.
>> @@ -2313,11 +2461,19 @@ static int pxafb_remove(struct platform_device *dev)
>> return 0;
>> }
>>
>> +static const struct of_device_id pxafb_of_dev_id[] = {
>> + {
>> + .compatible = "marvell,pxa2xx-fb",
>
> At least in the old Intel manuals, this was called the LCD Controller,
> all register names are LCsomething.
> Please let's not just put the Linux driver name in the device tree and
> call this pxa2xx-lcd-controller or a shortened version thereof.
Ok, I'm very open for a name change, devicetree is not my speciality, so
basically I'll take any advice :)
Cheers.
--
Robert
[1] mioa701 dt
/*
* Copyright (C) Robert Jarzmik <robert.jarzmik@free.fr>
*
* 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
* publishhed by the Free Software Foundation.
*/
/dts-v1/;
#include "pxa27x.dtsi"
#include "include/dt-bindings/gpio/gpio.h"
#include "include/dt-bindings/clock/pxa-clock.h"
/ {
model = "Mitac Mio A701 Board";
/* compatible = "mitac,mioa701"; */
compatible = "marvell,pxa270";
chosen {
bootargs = "mtdparts=docg3.0:256k@3456k(barebox)ro,256k(barebox-logo),128k(barebox-env),4M(kernel),-(root) ubi.mtd=4 rootfstype=ubifs root=ubi0:linux_root ro";
};
memory {
reg = <0xa0000000 0x04000000>;
reserved-memory {
#address-cells = <1>;
#size-cells = <1>;
pstore_region:region@0xa2000000 {
compatible = "linux,contiguous-memory-region";
reg = <0xa2000000 1048576>;
};
};
};
cpus {
cpu {
cpu-supply = <&vcc_core>;
};
};
pxabus {
gpio: gpio@40e00000 {
status = "okay";
};
ffuart: uart@40100000 {
status = "okay";
};
btuart: uart@40200000 {
status = "okay";
};
stuart: uart@40700000 {
status = "okay";
};
usb2phy: gpio-vbus@13 {
compatible = "usb-nop-xceiv";
vbus-detect-gpio = <&gpio 13 GPIO_ACTIVE_LOW>;
wakeup;
};
pxa27x_udc: udc@40600000 {
status = "okay";
gpios = <&gpio 22 0>;
phys = <&usb2phy>;
phys-names = "usb2phy";
};
pwri2c: i2c@40f000180 {
status = "okay";
max1586@14 {
compatible = "maxim,max1586";
reg = <0x14>;
v3-gain = <1000000>;
regulators {
vcc_core: v3 {
regulator-name = "vcc_core";
regulator-compatible = "Output_V3";
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1705000>;
regulator-always-on;
};
};
};
};
pxai2c1: i2c@40301680 {
mrvl,i2c-fast-mode;
status = "okay";
mt9m111: camera@5d {
compatible = "micron,mt9m111";
reg = <0x5d>;
gpios = <&gpio 56 GPIO_ACTIVE_HIGH>;
remote = <&pxa_camera>;
port {
mt9m111_1: endpoint {
bus-width = <8>;
remote-endpoint = <&pxa_camera>;
};
};
};
};
keypad: keypad@41500000 {
status = "okay";
keypad,num-rows = <3>;
keypad,num-columns = <3>;
linux,keymap = <
0x00000067 /* KEY_UP */
0x0001006a /* KEY_RIGHT */
0x000200e2 /* KEY_MEDIA */
0x0100006c /* KEY_DOWN */
0x0101001c /* KEY_ENTER */
0x010200da /* KEY_CONNECT */
0x02000069 /* KEY_LEFT */
0x020100a9 /* KEY_PHONE */
0x020200d4>; /* KEY_CAMERA */
marvell,debounce-interval = <0>;
};
gpio-keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;
status = "okay";
button@0 {
label = "GPIO Key Power";
linux,code = <174>;
gpios = <&gpio 0 0>;
gpio-key,wakeup;
};
button@12 {
label = "HP jack detect";
linux,code = <211>;
gpios = <&gpio 12 0>;
};
button@93 {
label = "Volume Up Key";
linux,code = <115>;
gpios = <&gpio 93 0>;
};
button@94 {
label = "Volume Down Key";
linux,code = <114>;
gpios = <&gpio 94 0>;
};
};
mmc0: mmc@41100000 {
vmmc-supply = <®_vmmc>;
status = "okay";
};
pxa_camera: imaging@50000000 {
status = "okay";
port {
#address-cells = <1>;
#size-cells = <0>;
/* Parallel bus endpoint */
qci: endpoint@0 {
reg = <0>; /* Local endpoint # */
remote-endpoint = <&mt9m111_1>; /* Remote phandle */
bus-width = <8>; /* Used data lines */
hsync-active = <0>; /* Active low */
vsync-active = <0>; /* Active low */
pclk-sample = <1>; /* Rising */
};
};
};
pxafb: video@40500000 {
status = "okay";
display = <&display0>;
enable-transparency-bit = <0>;
enable-greyscale-cmap = <0>;
};
};
regulators {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;
reg_vmmc: regulator@0 {
compatible = "regulator-fixed";
regulator-name = "vmmc";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
};
backlight {
compatible = "pwm-backlight";
pwms = <&pwm0 0 40960000>;
pwm-names = "backlight";
brightness-levels = <0 4 8 16 32 64 128 255>;
default-brightness-level = <2>;
};
docg3: flash@0 {
compatible = "m-systems,diskonchip-g3";
reg = <0x0 0x2000>;
};
display0: display@0 {
lcd-type = "color-tft";
bits-per-pixel = <16>;
display-timings {
native-mode = <&timing0>;
timing0: 240p {
/* 240x320p24 */
clock-frequency = <4545000>;
hactive = <240>;
vactive = <320>;
hfront-porch = <4>;
hback-porch = <6>;
hsync-len = <4>;
vback-porch = <5>;
vfront-porch = <3>;
vsync-len = <2>;
};
};
};
};
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] video: fbdev: pxafb: initial devicetree conversion
2015-10-03 17:08 ` Robert Jarzmik
@ 2015-10-03 18:05 ` Philipp Zabel
0 siblings, 0 replies; 6+ messages in thread
From: Philipp Zabel @ 2015-10-03 18:05 UTC (permalink / raw)
To: Robert Jarzmik
Cc: Jean-Christophe Plagniol-Villard, Tomi Valkeinen, linux-fbdev,
LKML
Am Samstag, den 03.10.2015, 19:08 +0200 schrieb Robert Jarzmik:
> > Thanks a lot for working on this! Out of interest, do you plan to
> > convert MIOA701 to DT?
> Actually, I already had. If you take all the pending patches
> scattered across
> all the subsystems (around 40 by my last count), then mioa701 is
> converted, see
> in [1]. If we take -next tree, I think the count will be closer to 20
> or so.
This is amazing. I'm looking forward to follow your good example with
magician and hx4700 once that hits mainline.
regards
Philipp
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-03 18:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-03 16:11 [PATCH 0/2] video: fbdev: pxafb: devicetree conversion Robert Jarzmik
2015-10-03 16:11 ` [PATCH 1/2] video: fbdev: pxafb: loosen the platform data bond Robert Jarzmik
2015-10-03 16:11 ` [PATCH 2/2] video: fbdev: pxafb: initial devicetree conversion Robert Jarzmik
2015-10-03 17:02 ` Philipp Zabel
2015-10-03 17:08 ` Robert Jarzmik
2015-10-03 18:05 ` Philipp Zabel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).