From: Piotr Wilczek <p.wilczek@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver
Date: Fri, 28 Feb 2014 08:48:26 +0100 [thread overview]
Message-ID: <53103F4A.60103@samsung.com> (raw)
In-Reply-To: <CAEC9eQM7+O--y5n5C-F7w1wunwbBbxZveMH_Ahj45vZhuiECsg@mail.gmail.com>
Hi Ajay,
On 02/27/2014 03:59 PM, Ajay kumar wrote:
> Piotr,
>
> DT bindings should usually be free of "_" (underscore)
> Please use hyphen: "-"
I will use hypen.
> On Tue, Feb 25, 2014 at 11:33 PM, Piotr Wilczek <p.wilczek@samsung.com>wrote:
>
>> This patch enables parsing mipi data from device tree.
>> Non device tree case is still supported.
>>
>> Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>> Cc: Minkyu Kang <mk7.kang@samsung.com>
>> ---
>> Changes for v3:
>> - none
>>
>> Changes for v2:
>> - removed panel specific init function 's6e8ax0_init' to the board file
>>
>> arch/arm/include/asm/arch-exynos/mipi_dsim.h | 5 ++
>> drivers/video/exynos_mipi_dsi.c | 96
>> ++++++++++++++++++++++++++++
>> include/fdtdec.h | 1 +
>> lib/fdtdec.c | 1 +
>> 4 files changed, 103 insertions(+)
>>
>> diff --git a/arch/arm/include/asm/arch-exynos/mipi_dsim.h
>> b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
>> index 40aca71..50e5c25 100644
>> --- a/arch/arm/include/asm/arch-exynos/mipi_dsim.h
>> +++ b/arch/arm/include/asm/arch-exynos/mipi_dsim.h
>> @@ -12,6 +12,7 @@
>>
>> #include <linux/list.h>
>> #include <linux/fb.h>
>> +#include <lcd.h>
>>
>> #define PANEL_NAME_SIZE (32)
>>
>> @@ -368,8 +369,12 @@ int exynos_mipi_dsi_register_lcd_device(struct
>> mipi_dsim_lcd_device
>> *lcd_dev);
>>
>> void exynos_set_dsim_platform_data(struct exynos_platform_mipi_dsim *pd);
>> +void exynos_init_dsim_platform_data(vidinfo_t *vid);
>>
>> /* panel driver init based on mipi dsi interface */
>> void s6e8ax0_init(void);
>>
>> +#ifdef CONFIG_OF_CONTROL
>> +extern int mipi_power(void);
>> +#endif
>> #endif /* _DSIM_H */
>> diff --git a/drivers/video/exynos_mipi_dsi.c
>> b/drivers/video/exynos_mipi_dsi.c
>> index 8bb8fea..6c10f11 100644
>> --- a/drivers/video/exynos_mipi_dsi.c
>> +++ b/drivers/video/exynos_mipi_dsi.c
>> @@ -9,6 +9,8 @@
>>
>> #include <common.h>
>> #include <malloc.h>
>> +#include <fdtdec.h>
>> +#include <libfdt.h>
>> #include <linux/err.h>
>> #include <asm/arch/dsim.h>
>> #include <asm/arch/mipi_dsim.h>
>> @@ -22,7 +24,14 @@
>> #define master_to_driver(a) (a->dsim_lcd_drv)
>> #define master_to_device(a) (a->dsim_lcd_dev)
>>
>> +DECLARE_GLOBAL_DATA_PTR;
>> +
>> static struct exynos_platform_mipi_dsim *dsim_pd;
>> +#ifdef CONFIG_OF_CONTROL
>> +static struct mipi_dsim_config dsim_config_dt;
>> +static struct exynos_platform_mipi_dsim dsim_platform_data_dt;
>> +static struct mipi_dsim_lcd_device mipi_lcd_device_dt;
>> +#endif
>>
>> struct mipi_dsim_ddi {
>> int bus_id;
>> @@ -238,3 +247,90 @@ void exynos_set_dsim_platform_data(struct
>> exynos_platform_mipi_dsim *pd)
>>
>> dsim_pd = pd;
>> }
>> +
>> +#ifdef CONFIG_OF_CONTROL
>> +int exynos_dsim_config_parse_dt(const void *blob)
>> +{
>> + int node;
>> +
>> + node = fdtdec_next_compatible(blob, 0,
>> COMPAT_SAMSUNG_EXYNOS_MIPI_DSI);
>> + if (node <= 0) {
>> + printf("exynos_mipi_dsi: Can't get device node for mipi
>> dsi\n");
>> + return -ENODEV;
>> + }
>> +
>> + dsim_config_dt.e_interface = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-e_interface", 0);
>> +
>> + dsim_config_dt.e_virtual_ch = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-e_virtual_ch", 0);
>> +
>> + dsim_config_dt.e_pixel_format = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-e_pixel_format", 0);
>> +
>> + dsim_config_dt.e_burst_mode = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-e_burst_mode", 0);
>> +
>> + dsim_config_dt.e_no_data_lane = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-e_no_data_lane", 0);
>> +
>> + dsim_config_dt.e_byte_clk = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-e_byte_clk", 0);
>> +
>> + dsim_config_dt.hfp = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-hfp", 0);
>> +
>> + dsim_config_dt.p = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-p", 0);
>> + dsim_config_dt.m = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-m", 0);
>> + dsim_config_dt.s = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-s", 0);
>> +
>> + dsim_config_dt.pll_stable_time = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-pll_stable_time", 0);
>> +
>> + dsim_config_dt.esc_clk = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-esc_clk", 0);
>> +
>> + dsim_config_dt.stop_holding_cnt = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-stop_holding_cnt", 0);
>> +
>> + dsim_config_dt.bta_timeout = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-bta_timeout", 0);
>> +
>> + dsim_config_dt.rx_timeout = fdtdec_get_int(blob, node,
>> + "samsung,dsim-config-rx_timeout", 0);
>> +
>> + mipi_lcd_device_dt.name = fdtdec_get_config_string(blob,
>> + "samsung,dsim-device-name");
>> +
>> + mipi_lcd_device_dt.id = fdtdec_get_int(blob, node,
>> + "samsung,dsim-device-id", 0);
>> +
>> + mipi_lcd_device_dt.bus_id = fdtdec_get_int(blob, node,
>> + "samsung,dsim-device-bus_id", 0);
>> +
>> + mipi_lcd_device_dt.reverse_panel = fdtdec_get_int(blob, node,
>> + "samsung,dsim-device-reverse_panel", 0);
>> +
>> + return 0;
>> +}
>> +
>> +void exynos_init_dsim_platform_data(vidinfo_t *vid)
>> +{
>> + if (exynos_dsim_config_parse_dt(gd->fdt_blob))
>> + debug("Can't get proper dsim config.\n");
>> +
>> + strcpy(dsim_platform_data_dt.lcd_panel_name,
>> mipi_lcd_device_dt.name);
>> + dsim_platform_data_dt.dsim_config = &dsim_config_dt;
>> + dsim_platform_data_dt.mipi_power = mipi_power;
>> + dsim_platform_data_dt.phy_enable = set_mipi_phy_ctrl;
>> + dsim_platform_data_dt.lcd_panel_info = (void *)vid;
>> +
>> + mipi_lcd_device_dt.platform_data = (void *)&dsim_platform_data_dt;
>> + exynos_mipi_dsi_register_lcd_device(&mipi_lcd_device_dt);
>> +
>> + dsim_pd = &dsim_platform_data_dt;
>> +}
>> +#endif
>> diff --git a/include/fdtdec.h b/include/fdtdec.h
>> index 19bab79..bd84c83 100644
>> --- a/include/fdtdec.h
>> +++ b/include/fdtdec.h
>> @@ -79,6 +79,7 @@ enum fdt_compat_id {
>> COMPAT_SAMSUNG_EXYNOS5_USB3_PHY,/* Exynos phy controller for
>> usb3.0 */
>> COMPAT_SAMSUNG_EXYNOS_TMU, /* Exynos TMU */
>> COMPAT_SAMSUNG_EXYNOS_FIMD, /* Exynos Display controller */
>> + COMPAT_SAMSUNG_EXYNOS_MIPI_DSI, /* Exynos mipi dsi */
>> COMPAT_SAMSUNG_EXYNOS5_DP, /* Exynos Display port controller
>> */
>> COMPAT_SAMSUNG_EXYNOS5_DWMMC, /* Exynos5 DWMMC controller */
>> COMPAT_SAMSUNG_EXYNOS_SERIAL, /* Exynos UART */
>> diff --git a/lib/fdtdec.c b/lib/fdtdec.c
>> index 1fecab3..c97fad3 100644
>> --- a/lib/fdtdec.c
>> +++ b/lib/fdtdec.c
>> @@ -52,6 +52,7 @@ static const char * const compat_names[COMPAT_COUNT] = {
>> COMPAT(SAMSUNG_EXYNOS5_USB3_PHY, "samsung,exynos5250-usb3-phy"),
>> COMPAT(SAMSUNG_EXYNOS_TMU, "samsung,exynos-tmu"),
>> COMPAT(SAMSUNG_EXYNOS_FIMD, "samsung,exynos-fimd"),
>> + COMPAT(SAMSUNG_EXYNOS_MIPI_DSI, "samsung,exynos-mipi-dsi"),
>> COMPAT(SAMSUNG_EXYNOS5_DP, "samsung,exynos5-dp"),
>> COMPAT(SAMSUNG_EXYNOS5_DWMMC, "samsung,exynos5250-dwmmc"),
>> COMPAT(SAMSUNG_EXYNOS_SERIAL, "samsung,exynos4210-uart"),
>> --
>> 1.8.3.2
>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>
>
> Regards,
> Ajay Kumar
>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
Best regards,
Piotr Wilczek
next prev parent reply other threads:[~2014-02-28 7:48 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 14:15 [U-Boot] [PATCH 0/9] Exynos4: add support for device tree Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 1/9] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-01-28 8:54 ` Jaehoon Chung
2014-01-28 12:13 ` Piotr Wilczek
2014-01-29 8:03 ` Minkyu Kang
2014-01-27 14:15 ` [U-Boot] [PATCH 2/9] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-02-07 7:53 ` Minkyu Kang
2014-02-07 8:43 ` Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 3/9] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-02-07 7:53 ` Minkyu Kang
2014-02-07 8:19 ` Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 4/9] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-01-28 9:42 ` Jaehoon Chung
2014-01-28 12:31 ` Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 5/9] arm:exynos: add common board file for exynos 4 Piotr Wilczek
2014-02-07 7:52 ` Minkyu Kang
2014-02-07 8:40 ` Piotr Wilczek
2014-02-07 9:47 ` Minkyu Kang
2014-02-10 8:52 ` Piotr Wilczek
2014-02-10 9:09 ` Minkyu Kang
2014-01-27 14:15 ` [U-Boot] [PATCH 6/9] board:origen:fdt: Enable device tree on Origen Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 7/9] board:universal:fdt: Enable device tree on Universal Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 8/9] trats:fdt: Enable device tree on Trats Piotr Wilczek
2014-01-27 14:15 ` [U-Boot] [PATCH 9/9] board:trats2:fdt: Enable device tree on Trats2 Piotr Wilczek
2014-01-28 9:47 ` Jaehoon Chung
2014-01-28 12:41 ` Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 00/12] Exynos4: add support for device tree Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 01/12] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 03/12] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 04/12] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 05/12] board:samsung:common: remove unused max77686 init function Piotr Wilczek
2014-02-14 5:32 ` Rajeshwari Birje
2014-02-14 9:48 ` Piotr Wilczek
2014-02-14 11:40 ` Rajeshwari Birje
2014-02-22 7:37 ` Minkyu Kang
2014-02-24 6:39 ` Piotr Wilczek
2014-02-24 10:05 ` Minkyu Kang
2014-02-13 14:10 ` [U-Boot] [PATCH V2 06/12] board:samsung: move checkboard to common file Piotr Wilczek
2014-02-14 5:35 ` Rajeshwari Birje
2014-02-13 14:10 ` [U-Boot] [PATCH V2 07/12] arm:exynos: add common DTS file for exynos 4 Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 08/12] arm:exynos: enble sdhci and misc_init to common board Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 09/12] board:origen: Enable device tree on Origen Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 10/12] board:universal: Enable device tree on Universal Piotr Wilczek
2014-02-14 8:53 ` Przemyslaw Marczak
2014-02-13 14:10 ` [U-Boot] [PATCH V2 11/12] board:trats: Enable device tree on Trats Piotr Wilczek
2014-02-13 14:10 ` [U-Boot] [PATCH V2 12/12] board:trats2: Enable device tree on Trats2 Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 00/12] Exynos4: add support for device tree Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 01/12] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-02-27 14:59 ` Ajay kumar
2014-02-28 7:48 ` Piotr Wilczek [this message]
2014-02-25 14:33 ` [U-Boot] [PATCH V3 03/12] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-02-27 13:50 ` Ajay kumar
2014-02-27 14:10 ` Ajay kumar
2014-02-28 8:54 ` Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 04/12] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 05/12] board:samsung: move checkboard to common file Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 06/12] arm:exynos: add common DTS file for exynos 4 Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 07/12] board:samsung:common: move max77686 init function Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 08/12] arm:exynos: enable sdhci and misc_init to common board Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 09/12] board:origen: Enable device tree on Origen Piotr Wilczek
2014-02-26 2:47 ` Minkyu Kang
2014-02-25 14:33 ` [U-Boot] [PATCH V3 10/12] board:universal: Enable device tree on Universal Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 11/12] board:trats: Enable device tree on Trats Piotr Wilczek
2014-02-25 14:33 ` [U-Boot] [PATCH V3 12/12] board:trats2: Enable device tree on Trats2 Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 00/12] Exynos4: add support for device tree Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 01/12] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-03-05 6:16 ` Ajay kumar
2014-03-05 6:57 ` Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 03/12] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-03-05 6:06 ` Ajay kumar
2014-03-05 7:11 ` Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 04/12] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 05/12] board:samsung: move checkboard to common file Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 06/12] arm:exynos: add common DTS file for exynos 4 Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 07/12] board:samsung:common: move max77686 init function Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 08/12] arm:exynos: enable sdhci and misc_init to common board Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 09/12] board:origen: Enable device tree on Origen Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 10/12] board:universal: Enable device tree on Universal Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 11/12] board:trats: Enable device tree on Trats Piotr Wilczek
2014-03-04 13:55 ` [U-Boot] [PATCH V4 12/12] board:trats2: Enable device tree on Trats2 Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 00/12] Exynos4: add support for device tree Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 01/12] exynos4:pinmux:fdt: decode peripheral id Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 02/12] video:mipidsim:fdt: Add DT support for mipi dsim driver Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 03/12] video:exynos_fb:fdt: add additional fdt data Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 04/12] drivers:mmc:sdhci: enable support for DT Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 05/12] board:samsung: move checkboard to common file Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 06/12] arm:exynos: add common DTS file for exynos 4 Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 07/12] board:samsung:common: move max77686 init function Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 08/12] arm:exynos: enable sdhci and misc_init to common board Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 09/12] board:origen: Enable device tree on Origen Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 10/12] board:universal: Enable device tree on Universal Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 11/12] board:trats: Enable device tree on Trats Piotr Wilczek
2014-03-07 13:59 ` [U-Boot] [PATCH V5 12/12] board:trats2: Enable device tree on Trats2 Piotr Wilczek
2014-03-12 11:59 ` [U-Boot] [PATCH V5 00/12] Exynos4: add support for device tree Minkyu Kang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53103F4A.60103@samsung.com \
--to=p.wilczek@samsung.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox