Add device tree based discovery support for drm-fimd
Subsystems (5)
cover Add device tree based discovery support for drm-fimd
From: Leela Krishna <[email protected]>
The patches are created against "for-next" branch of Kukjin Kim's tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
This patch set adds Backlight, LCD support and device tree based discovery support for drm-fimd
Leela Krishna (3):
ARM: EXYNOS5: add device tree based discovery support for FIMD
ARM: EXYNOS5: Add the bus clock for FIMD
ARM: EXYNOS5: Set parent clock to fimd
Leela Krishna Amudala (4):
ARM: SAMSUNG: add additional registers and SFR definitions for
writeback
ARM: EXYNOS5: add machine specific support for backlight
ARM: EXYNOS5: add machine specific support for LCD
ARM: EXYNOS: Adding DRM platform device
arch/arm/boot/dts/exynos5250-smdk5250.dts | 16 +++ arch/arm/boot/dts/exynos5250.dtsi | 7 ++ arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/clock-exynos5.c | 30 ++++-- arch/arm/mach-exynos/include/mach/map.h | 1 + arch/arm/mach-exynos/mach-exynos5-dt.c | 125 +++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/clock.h | 2 + arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 10 ++ arch/arm/plat-samsung/include/plat/regs-fb.h | 51 +++++++++ drivers/video/Kconfig | 6 + 10 files changed, 239 insertions(+), 10 deletions(-)
PATCH 1/7 ARM: SAMSUNG: add additional registers and SFR definitions for writeback
This patch updates the register address offsets and adds SFR definitions for writeback for Samsung's V8 display controller.
--- arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 10 ++++ arch/arm/plat-samsung/include/plat/regs-fb.h | 51 +++++++++++++++++++++++ drivers/video/Kconfig | 6 +++ 3 files changed, 67 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/include/plat/regs-fb-v4.h +10 -0
@@ -30,9 +30,16 @@#define VIDCON1_FSTATUS_EVEN (1 << 15)/* Video timing controls */ +#ifdef CONFIG_FB_EXYNOS_FIMD_V8 +#define VIDTCON0 (0x20010) +#define VIDTCON1 (0x20014) +#define VIDTCON3 (0x2001C) +#else #define VIDTCON0 (0x10)#define VIDTCON1 (0x14)#define VIDTCON2 (0x18) +#define VIDTCON3 (0x1C) +#endif /* Window position controls */
@@ -43,9 +50,12 @@#define VIDOSD_BASE (0x40)#define VIDINTCON0 (0x130) +#define VIDINTCON1 (0x134)/* WINCONx */ +#define WINCONx_CSC_CON_EQ709 (1 << 28) +#define WINCONx_CSC_CON_EQ601 (0 << 28)#define WINCONx_CSCWIDTH_MASK (0x3 << 26)#define WINCONx_CSCWIDTH_SHIFT (26)#define WINCONx_CSCWIDTH_WIDE (0x0 << 26)
arch/arm/plat-samsung/include/plat/regs-fb.h +51 -0
105 lines not on this page · raw message
drivers/video/Kconfig +6 -0
@@ -2053,6 +2053,12 @@ config FB_S3C Currently the support is only for the S3C6400 and S3C6410 SoCs. +config FB_EXYNOS_FIMD_V8 + bool "register extensions for FIMD version 8" + depends on ARCH_EXYNOS5 + ---help--- + This uses register extensions for FIMD version 8 + config FB_S3C_DEBUG_REGWRITE bool "Debug register writes" depends on FB_S3C
Signature · 1 line
1.7.0.4
PATCH 2/7 ARM: EXYNOS5: add machine specific support for backlight
In reply to Leela Krishna AmudalaAdds machine specific support for LCD backlight for SMDK board based on Exynos5
--- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-exynos5-dt.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/Kconfig +1 -0
@@ -412,6 +412,7 @@ config MACH_EXYNOS5_DT select SOC_EXYNOS5250 select USE_OF select ARM_AMBA + select SAMSUNG_DEV_BACKLIGHT help Machine support for Samsung Exynos4 machine with device tree enabled. Select this if a fdt blob is available for the EXYNOS4 SoC based board.
arch/arm/mach-exynos/mach-exynos5-dt.c +28 -0
@@ -11,6 +11,8 @@#include <linux/of_platform.h> #include <linux/serial_core.h> +#include <linux/pwm_backlight.h> +#include <linux/gpio.h> #include <asm/mach/arch.h> #include <asm/hardware/gic.h>
@@ -18,9 +20,34 @@#include <plat/cpu.h> #include <plat/regs-serial.h> +#include <plat/backlight.h> +#include <plat/gpio-cfg.h> #include "common.h" + +static int smdk5250_bl_notify (struct device *unused,int brightness) +{ +/* manage lcd_bl_en signal */ +if (brightness) +gpio_set_value (EXYNOS5_GPX3 (0 ),1 ); +else +gpio_set_value (EXYNOS5_GPX3 (0 ),0 ); + +return brightness; +} + +/* LCD Backlight data */ +static struct samsung_bl_gpio_info smdk5250_bl_gpio_info = { + .no =EXYNOS5_GPB2 (0 ), + .func =S3C_GPIO_SFN (2 ), +}; + +static struct platform_pwm_backlight_data smdk5250_bl_data = { + .pwm_period_ns =1000000 , + .notify = smdk5250_bl_notify, +}; +/* * The following lookup table is used to override device names when devices * are registered from device tree. This is temporarily added to enable
@@ -61,6 +88,7 @@ static void __init exynos5250_dt_map_io(void)static void __init exynos5250_dt_machine_init (void ) { +samsung_bl_set (&smdk5250_bl_gpio_info, &smdk5250_bl_data);of_platform_populate (NULL , of_default_bus_match_table, exynos5250_auxdata_lookup,NULL ); }
Signature · 1 line
1.7.0.4
Re: [PATCH 2/7] ARM: EXYNOS5: add machine specific support for backlight
Quoted 44 lines · Leela Krishna Amudala
Adds machine specific support for LCD backlight for SMDK board based on Exynos5
Signed-off-by Leela Krishna Amudala <[email protected]>--- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-exynos5-dt.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 0 deletions(-)arch/arm/mach-exynos/Kconfig +1
-0@@ -412,6 +412,7 @@ config MACH_EXYNOS5_DT select SOC_EXYNOS5250 select USE_OF select ARM_AMBA + select SAMSUNG_DEV_BACKLIGHT help Machine support for Samsung Exynos4 machine with device tree enabled. Select this if a fdt blob is available for the EXYNOS4 SoC based board.arch/arm/mach-exynos/mach-exynos5-dt.c +4
-0@@ -11,6 +11,8 @@#include <linux/of_platform.h> #include <linux/serial_core.h> +#include <linux/pwm_backlight.h> +#include <linux/gpio.h> #include <asm/mach/arch.h> #include <asm/hardware/gic.h> @@ -18,9 +20,34 @@#include <plat/cpu.h> #include <plat/regs-serial.h> +#include <plat/backlight.h> +#include <plat/gpio-cfg.h> #include "common.h"
arch/arm/mach-exynos/mach-exynos5-dt.c line 37
Quoted 10 lines
arch/arm/mach-exynos/mach-exynos5-dt.c +10
-0+ +static int smdk5250_bl_notify (struct device *unused,int brightness) +{ +/* manage lcd_bl_en signal */ +if (brightness) +gpio_set_value (EXYNOS5_GPX3 (0 ),1 ); +else +gpio_set_value (EXYNOS5_GPX3 (0 ),0 ); + +return brightness;
Why do you need to return the brightness?
Quoted 34 lines
arch/arm/mach-exynos/mach-exynos5-dt.c +13
-0+} + +/* LCD Backlight data */ +static struct samsung_bl_gpio_info smdk5250_bl_gpio_info = { + .no =EXYNOS5_GPB2 (0 ), + .func =S3C_GPIO_SFN (2 ), +}; + +static struct platform_pwm_backlight_data smdk5250_bl_data = { + .pwm_period_ns =1000000 , + .notify = smdk5250_bl_notify, +}; +/* * The following lookup table is used to override device names when devices
* are registered from device tree. This is temporarily added to enablearch/arm/mach-exynos/mach-exynos5-dt.c +1
-1@@ -61,6 +88,7 @@ static void __init exynos5250_dt_map_io(void)static void __init exynos5250_dt_machine_init (void ) { +samsung_bl_set (&smdk5250_bl_gpio_info, &smdk5250_bl_data);of_platform_populate (NULL , of_default_bus_match_table, exynos5250_auxdata_lookup,NULL ); } --1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
With warm regards, Sachin
RE: [PATCH 2/7] ARM: EXYNOS5: add machine specific support for backlight
In reply to Leela Krishna AmudalaQuoted 36 lines · Leela Krishna Amudala
Adds machine specific support for LCD backlight for SMDK board based on Exynos5
Signed-off-by Leela Krishna Amudala <[email protected]>--- arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-exynos5-dt.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 0 deletions(-)arch/arm/mach-exynos/Kconfig +1
-0@@ -412,6 +412,7 @@ config MACH_EXYNOS5_DT select SOC_EXYNOS5250 select USE_OF select ARM_AMBA + select SAMSUNG_DEV_BACKLIGHT help Machine support for Samsung Exynos4 machine with device tree enabled. Select this if a fdt blob is available for the EXYNOS4 SoC based board.arch/arm/mach-exynos/mach-exynos5-dt.c +2
-0@@ -11,6 +11,8 @@#include <linux/of_platform.h> #include <linux/serial_core.h> +#include <linux/pwm_backlight.h> +#include <linux/gpio.h> #include <asm/mach/arch.h> #include <asm/hardware/gic.h>
arch/arm/mach-exynos/mach-exynos5-dt.c line 28
Quoted 9 lines
arch/arm/mach-exynos/mach-exynos5-dt.c +3
-0@@ -18,9 +20,34 @@#include <plat/cpu.h> #include <plat/regs-serial.h> +#include <plat/backlight.h> +#include <plat/gpio-cfg.h> #include "common.h" +
Delete this useless line.
Quoted 40 lines
arch/arm/mach-exynos/mach-exynos5-dt.c +23
-1+static int smdk5250_bl_notify (struct device *unused,int brightness) +{ +/* manage lcd_bl_en signal */ +if (brightness) +gpio_set_value (EXYNOS5_GPX3 (0 ),1 ); +else +gpio_set_value (EXYNOS5_GPX3 (0 ),0 ); + +return brightness; +} + +/* LCD Backlight data */ +static struct samsung_bl_gpio_info smdk5250_bl_gpio_info = { + .no =EXYNOS5_GPB2 (0 ), + .func =S3C_GPIO_SFN (2 ), +}; + +static struct platform_pwm_backlight_data smdk5250_bl_data = { + .pwm_period_ns =1000000 , + .notify = smdk5250_bl_notify, +}; +/* * The following lookup table is used to override device names when devices * are registered from device tree. This is temporarily added to enable @@ -61,6 +88,7 @@ static void __init exynos5250_dt_map_io(void)static void __init exynos5250_dt_machine_init (void ) { +samsung_bl_set (&smdk5250_bl_gpio_info, &smdk5250_bl_data);of_platform_populate (NULL , of_default_bus_match_table, exynos5250_auxdata_lookup,NULL ); } --1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 3/7 ARM: EXYNOS5: add machine specific support for LCD
In reply to Leela Krishna AmudalaThis patch adds machine specific support for LCD controller like setting power to LCD and adding LCD platform device.
--- arch/arm/mach-exynos/mach-exynos5-dt.c | 57 ++++++++++++++++++++++++++++++++ 1 files changed, 57 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/mach-exynos5-dt.c +57 -0
@@ -13,6 +13,7 @@#include <linux/serial_core.h> #include <linux/pwm_backlight.h> #include <linux/gpio.h> +#include <linux/delay.h> #include <asm/mach/arch.h> #include <asm/hardware/gic.h>
@@ -25,6 +26,8 @@#include "common.h" +#include <video/platform_lcd.h> +static int smdk5250_bl_notify (struct device *unused,int brightness) {
@@ -48,6 +51,55 @@ static struct platform_pwm_backlight_data smdk5250_bl_data = { .notify = smdk5250_bl_notify, }; +static void lcd_set_power (struct plat_lcd_data *pd, +unsigned int power) +{ + +/* reset */ +gpio_request_one (EXYNOS5_GPX1 (5 ),GPIOF_OUT_INIT_HIGH ,"GPX1" ); + +mdelay (20 ); +if (power) { +/* fire nRESET on power up */ +gpio_set_value (EXYNOS5_GPX1 (5 ),0 ); +mdelay (20 ); +gpio_set_value (EXYNOS5_GPX1 (5 ),1 ); +mdelay (20 ); +gpio_free (EXYNOS5_GPX1 (5 )); + }else { +/* fire nRESET on power off */ +gpio_set_value (EXYNOS5_GPX1 (5 ),0 ); +mdelay (20 ); +gpio_set_value (EXYNOS5_GPX1 (5 ),1 ); +mdelay (20 ); +gpio_free (EXYNOS5_GPX1 (5 )); + } +mdelay (20 ); + +/* +* Request lcd_bl_en GPIO for smdk5250_bl_notify(). +* TODO: Fix this so we are not at risk of requesting the GPIO +* multiple times, this should be done with device tree, and +* likely integrated into the plat-samsung/dev-backlight.c init. +*/ +gpio_request_one (EXYNOS5_GPX3 (0 ),GPIOF_OUT_INIT_LOW ,"GPX3" ); +} + +static int smdk5250_match_fb (struct plat_lcd_data *pd,struct fb_info *info) +{ +/* Don't call .set_power callback while unblanking */ +return 0 ; +} + +static struct plat_lcd_data smdk5250_lcd_data = { + .set_power = lcd_set_power, + .match_fb = smdk5250_match_fb, +}; + +static struct platform_device smdk5250_lcd = { + .name ="platform-lcd" , + .dev.platform_data = &smdk5250_lcd_data, +};/* * The following lookup table is used to override device names when devices * are registered from device tree. This is temporarily added to enable
@@ -80,6 +132,10 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { {}, }; +static struct platform_device *smdk5250_devices[]__initdata = { + &smdk5250_lcd,/* for platform_lcd device */ +}; +static void __init exynos5250_dt_map_io (void ) {exynos_init_io (NULL ,0 );
@@ -91,6 +147,7 @@ static void __init exynos5250_dt_machine_init(void)samsung_bl_set (&smdk5250_bl_gpio_info, &smdk5250_bl_data);of_platform_populate (NULL , of_default_bus_match_table, exynos5250_auxdata_lookup,NULL ); +platform_add_devices (smdk5250_devices,ARRAY_SIZE (smdk5250_devices)); }static char const *exynos5250_dt_compat[]__initdata = {
Signature · 1 line
1.7.0.4
PATCH 4/7 ARM: EXYNOS: Adding DRM platform device
In reply to Leela Krishna AmudalaAdd DRM platform device to machine file for exynos5.
--- arch/arm/mach-exynos/mach-exynos5-dt.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-)
arch/arm/mach-exynos/mach-exynos5-dt.c +27 -0
@@ -17,6 +17,7 @@#include <asm/mach/arch.h> #include <asm/hardware/gic.h> +#include <asm/io.h> #include <mach/map.h> #include <plat/cpu.h>
@@ -29,6 +30,22 @@#include <video/platform_lcd.h> +static void exynos_fimd_gpio_setup_24bpp (void ) +{ +unsigned int reg =0 ; +/* +* Set DISP1BLK_CFG register for Display path selection +* FIMD of DISP1_BLK Bypass selection : DISP1BLK_CFG[15] +* --------------------- +* 0 | MIE/MDNIE +* 1 | FIMD : selected +*/ + reg =__raw_readl (S3C_VA_SYS +0x0214 ); + reg &= ~(1 <<15 );/* To save other reset values */ + reg |= (1 <<15 ); +__raw_writel (reg,S3C_VA_SYS +0x0214 ); +} +static int smdk5250_bl_notify (struct device *unused,int brightness) {/* manage lcd_bl_en signal */
@@ -51,6 +68,14 @@ static struct platform_pwm_backlight_data smdk5250_bl_data = { .notify = smdk5250_bl_notify, }; +static struct platform_device exynos_drm_device = { + .name ="exynos-drm" , + .dev = { + .dma_mask = &exynos_drm_device.dev.coherent_dma_mask, + .coherent_dma_mask =0xffffffffUL , + } +}; +static void lcd_set_power (struct plat_lcd_data *pd,unsigned int power) {
@@ -134,6 +159,7 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = {static struct platform_device *smdk5250_devices[]__initdata = { &smdk5250_lcd,/* for platform_lcd device */ + &exynos_drm_device, };static void __init exynos5250_dt_map_io (void )
@@ -147,6 +173,7 @@ static void __init exynos5250_dt_machine_init(void)samsung_bl_set (&smdk5250_bl_gpio_info, &smdk5250_bl_data);of_platform_populate (NULL , of_default_bus_match_table, exynos5250_auxdata_lookup,NULL ); +exynos_fimd_gpio_setup_24bpp ();platform_add_devices (smdk5250_devices,ARRAY_SIZE (smdk5250_devices)); }
Signature · 1 line
1.7.0.4
PATCH 5/7 ARM: EXYNOS5: add device tree based discovery support for FIMD
In reply to Leela Krishna AmudalaFrom: Leela Krishna <[email protected]>
This patch adds support for device tree based discovery for Samsung's display controller. Adds DRM-Fimd plat data for smdk5250 evt1 to the corresponding dts file
--- arch/arm/boot/dts/exynos5250-smdk5250.dts | 16 ++++++++++++++++ arch/arm/boot/dts/exynos5250.dtsi | 7 +++++++ arch/arm/mach-exynos/include/mach/map.h | 1 + arch/arm/mach-exynos/mach-exynos5-dt.c | 2 ++ 4 files changed, 26 insertions(+), 0 deletions(-)
arch/arm/boot/dts/exynos5250-smdk5250.dts +16 -0
@@ -71,4 +71,20 @@ i2c@12CD0000 { status = "disabled"; }; + + lcd_fimd0: lcd_panel0 { + lcd-htiming = <4 4 4 1280>; + lcd-vtiming = <4 4 4 800>; + supports-mipi-panel; + }; + + fimd { + samsung,fimd-display = <&lcd_fimd0>; + samsung,fimd-vidout-rgb; + samsung,fimd-inv-vclk; + samsung,fimd-frame-rate = <60>; + samsung,default-window = <0>; + samsung,fimd-win-bpp = <32>; + }; + };
arch/arm/boot/dts/exynos5250.dtsi +7 -0
@@ -424,4 +424,11 @@ #gpio-cells = <4>; }; }; + + fimd { + compatible = "samsung,exynos5-drm"; + interrupt-parent = <&combiner>; + reg = <0x14400000 0x40000>; + interrupts = <18 5>, <18 4>, <18 6>; + }; };
arch/arm/mach-exynos/include/mach/map.h +1 -0
@@ -167,6 +167,7 @@#define EXYNOS4_PA_MIPI_CSIS1 0x11890000#define EXYNOS4_PA_FIMD0 0x11C00000 +#define EXYNOS5_PA_FIMD1 0x14400000#define EXYNOS4_PA_HSMMC (x) (0x12510000 + ((x) * 0x10000))#define EXYNOS4_PA_DWMCI 0x12550000
arch/arm/mach-exynos/mach-exynos5-dt.c +2 -0
@@ -154,6 +154,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = {OF_DEV_AUXDATA ("arm,pl330" ,EXYNOS5_PA_PDMA0 ,"dma-pl330.0" ,NULL ),OF_DEV_AUXDATA ("arm,pl330" ,EXYNOS5_PA_PDMA1 ,"dma-pl330.1" ,NULL ),OF_DEV_AUXDATA ("arm,pl330" ,EXYNOS5_PA_MDMA1 ,"dma-pl330.2" ,NULL ), +OF_DEV_AUXDATA ("samsung,exynos5-drm" ,EXYNOS5_PA_FIMD1 , + "exynos5-fb", NULL), {}, };
Signature · 1 line
1.7.0.4
Re: [PATCH 5/7] ARM: EXYNOS5: add device tree based discovery support for FIMD
Quoted 6 lines · Leela Krishna Amudala
From: Leela Krishna <[email protected]>
This patch adds support for device tree based discovery for Samsung's display controller. Adds DRM-Fimd plat data for smdk5250 evt1 to the corresponding dts file
Quoted 6 lines
Signed-off-by Leela Krishna <[email protected]>--- arch/arm/boot/dts/exynos5250-smdk5250.dts | 16 ++++++++++++++++ arch/arm/boot/dts/exynos5250.dtsi | 7 +++++++ arch/arm/mach-exynos/include/mach/map.h | 1 + arch/arm/mach-exynos/mach-exynos5-dt.c | 2 ++
You also need to update the documentation for the bindings.
Quoted 82 lines
4 files changed, 26 insertions(+), 0 deletions(-)arch/arm/boot/dts/exynos5250-smdk5250.dts +16
-0@@ -71,4 +71,20 @@ i2c@12CD0000 { status = "disabled"; }; + + lcd_fimd0: lcd_panel0 { + lcd-htiming = <4 4 4 1280>; + lcd-vtiming = <4 4 4 800>; + supports-mipi-panel; + }; + + fimd { + samsung,fimd-display = <&lcd_fimd0>; + samsung,fimd-vidout-rgb; + samsung,fimd-inv-vclk; + samsung,fimd-frame-rate = <60>; + samsung,default-window = <0>; + samsung,fimd-win-bpp = <32>; + }; + };arch/arm/boot/dts/exynos5250.dtsi +7
-0@@ -424,4 +424,11 @@ #gpio-cells = <4>; }; }; + + fimd { + compatible = "samsung,exynos5-drm"; + interrupt-parent = <&combiner>; + reg = <0x14400000 0x40000>; + interrupts = <18 5>, <18 4>, <18 6>; + }; };arch/arm/mach-exynos/include/mach/map.h +1
-0@@ -167,6 +167,7 @@#define EXYNOS4_PA_MIPI_CSIS1 0x11890000#define EXYNOS4_PA_FIMD0 0x11C00000 +#define EXYNOS5_PA_FIMD1 0x14400000#define EXYNOS4_PA_HSMMC (x) (0x12510000 + ((x) * 0x10000))#define EXYNOS4_PA_DWMCI 0x12550000arch/arm/mach-exynos/mach-exynos5-dt.c +2
-1@@ -154,6 +154,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = {OF_DEV_AUXDATA ("arm,pl330" ,EXYNOS5_PA_PDMA0 ,"dma-pl330.0" ,NULL ),OF_DEV_AUXDATA ("arm,pl330" ,EXYNOS5_PA_PDMA1 ,"dma-pl330.1" ,NULL ),OF_DEV_AUXDATA ("arm,pl330" ,EXYNOS5_PA_MDMA1 ,"dma-pl330.2" ,NULL ), +OF_DEV_AUXDATA ("samsung,exynos5-drm" ,EXYNOS5_PA_FIMD1 , +"exynos5-fb" ,NULL ), {}, }; --1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
With warm regards, Sachin
Re: [PATCH 5/7] ARM: EXYNOS5: add device tree based discovery support for FIMD
Quoted 7 lines · Sachin Kamat
Quoted 6 lines · Leela Krishna Amudala
From: Leela Krishna <[email protected]>
This patch adds support for device tree based discovery for Samsung's display controller. Adds DRM-Fimd plat data for smdk5250 evt1 to the corresponding dts file
Quoted 9 lines
Quoted 6 lines
Signed-off-by Leela Krishna <[email protected]>--- arch/arm/boot/dts/exynos5250-smdk5250.dts | 16 ++++++++++++++++ arch/arm/boot/dts/exynos5250.dtsi | 7 +++++++ arch/arm/mach-exynos/include/mach/map.h | 1 + arch/arm/mach-exynos/mach-exynos5-dt.c | 2 ++You also need to update the documentation for the bindings.
Yes, updated the documentation for bindings
Please refer to the link http://www.spinics.net/lists/dri-devel/msg24862.html
Quoted 91 lines
Quoted 76 lines
4 files changed, 26 insertions(+), 0 deletions(-)arch/arm/boot/dts/exynos5250-smdk5250.dts +16
-0@@ -71,4 +71,20 @@ i2c@12CD0000 { status = "disabled"; }; + + lcd_fimd0: lcd_panel0 { + lcd-htiming = <4 4 4 1280>; + lcd-vtiming = <4 4 4 800>; + supports-mipi-panel; + }; + + fimd { + samsung,fimd-display = <&lcd_fimd0>; + samsung,fimd-vidout-rgb; + samsung,fimd-inv-vclk; + samsung,fimd-frame-rate = <60>; + samsung,default-window = <0>; + samsung,fimd-win-bpp = <32>; + }; + };arch/arm/boot/dts/exynos5250.dtsi +7
-0@@ -424,4 +424,11 @@ #gpio-cells = <4>; }; }; + + fimd { + compatible = "samsung,exynos5-drm"; + interrupt-parent = <&combiner>; + reg = <0x14400000 0x40000>; + interrupts = <18 5>, <18 4>, <18 6>; + }; };arch/arm/mach-exynos/include/mach/map.h +1
-0@@ -167,6 +167,7 @@#define EXYNOS4_PA_MIPI_CSIS1 0x11890000#define EXYNOS4_PA_FIMD0 0x11C00000 +#define EXYNOS5_PA_FIMD1 0x14400000#define EXYNOS4_PA_HSMMC (x) (0x12510000 + ((x) * 0x10000))#define EXYNOS4_PA_DWMCI 0x12550000arch/arm/mach-exynos/mach-exynos5-dt.c +2
-1@@ -154,6 +154,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = {OF_DEV_AUXDATA ("arm,pl330" ,EXYNOS5_PA_PDMA0 ,"dma-pl330.0" ,NULL ),OF_DEV_AUXDATA ("arm,pl330" ,EXYNOS5_PA_PDMA1 ,"dma-pl330.1" ,NULL ),OF_DEV_AUXDATA ("arm,pl330" ,EXYNOS5_PA_MDMA1 ,"dma-pl330.2" ,NULL ), +OF_DEV_AUXDATA ("samsung,exynos5-drm" ,EXYNOS5_PA_FIMD1 , +"exynos5-fb" ,NULL ), {}, }; --1.7.0.4
Quoted 6 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
With warm regards,
Sachin
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 6/7 ARM: EXYNOS5: Add the bus clock for FIMD
In reply to Leela Krishna AmudalaFrom: Leela Krishna <[email protected]>
This patch adds the bus clock for FIMD and changes the device name for lcd clock
--- arch/arm/mach-exynos/clock-exynos5.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
arch/arm/mach-exynos/clock-exynos5.c +6 -1
@@ -629,6 +629,11 @@ static struct clk exynos5_init_clocks_off[] = { .enable = exynos5_clk_ip_disp1_ctrl, .ctrlbit = (1 << 3), }, { + .name = "fimd", + .devname = "exynos5-fb", + .enable = exynos5_clk_ip_disp1_ctrl, + .ctrlbit = (1 << 0), + }, { .name = "iis", .devname = "samsung-i2s.1", .enable = exynos5_clk_ip_peric_ctrl,
@@ -1046,7 +1051,7 @@ static struct clksrc_clk exynos5_clksrcs[] = { }, { .clk = { .name = "sclk_fimd", - .devname = "s3cfb.1", + .devname = "exynos5-fb", .enable = exynos5_clksrc_mask_disp1_0_ctrl, .ctrlbit = (1 << 0), },
Signature · 1 line
1.7.0.4
PATCH 7/7 ARM: EXYNOS5: Set parent clock to fimd
In reply to Leela Krishna AmudalaFrom: Leela Krishna <[email protected]>
This patch sets mout_mpll_user as parent clock to fimd also sets Fimd source clock rate to 800 MHz for MIPI LCD
--- arch/arm/mach-exynos/clock-exynos5.c | 25 +++++++++++++++---------- arch/arm/mach-exynos/mach-exynos5-dt.c | 11 +++++++++++ arch/arm/plat-samsung/include/plat/clock.h | 2 ++ 3 files changed, 28 insertions(+), 10 deletions(-)
arch/arm/mach-exynos/clock-exynos5.c +15 -10
@@ -1039,6 +1039,18 @@ static struct clksrc_clk exynos5_clk_sclk_mmc3 = { .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS2, .shift = 24, .size = 8 }, }; +struct clksrc_clk exynos5_clk_sclk_fimd = { + .clk = { + .name ="sclk_fimd" , + .devname ="exynos5-fb" , + .enable = exynos5_clksrc_mask_disp1_0_ctrl, + .ctrlbit = (1 <<0 ), + }, + .sources = &exynos5_clkset_group, + .reg_src = { .reg =EXYNOS5_CLKSRC_DISP1_0 , .shift =0 , .size =4 }, + .reg_div = { .reg =EXYNOS5_CLKDIV_DISP1_0 , .shift =0 , .size =4 }, +}; +static struct clksrc_clk exynos5_clksrcs[] = { { .clk = {
@@ -1050,16 +1062,6 @@ static struct clksrc_clk exynos5_clksrcs[] = { .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS3, .shift = 8, .size = 8 }, }, { .clk = { - .name = "sclk_fimd", - .devname = "exynos5-fb", - .enable = exynos5_clksrc_mask_disp1_0_ctrl, - .ctrlbit = (1 << 0), - }, - .sources = &exynos5_clkset_group, - .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 0, .size = 4 }, - .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 0, .size = 4 }, - }, { - .clk = { .name = "aclk_266_gscl", }, .sources = &clk_src_gscl_266,
@@ -1153,6 +1155,7 @@ static struct clksrc_clk *exynos5_sysclks[] = { &exynos5_clk_dout_mmc4, &exynos5_clk_aclk_acp, &exynos5_clk_pclk_acp, + &exynos5_clk_sclk_fimd, }; static struct clk *exynos5_clk_cdev[] = {
@@ -1402,6 +1405,8 @@ void __init_or_cpufreq exynos5_setup_clocks(void)clk_set_rate (&exynos5_clk_aclk_acp.clk,267000000 );clk_set_rate (&exynos5_clk_pclk_acp.clk,134000000 ); +clk_set_parent (&exynos5_clk_sclk_fimd.clk, + &exynos5_clk_mout_mpll_user.clk);for (ptr =0 ; ptr <ARRAY_SIZE (exynos5_clksrcs); ptr++)s3c_set_clksrc (&exynos5_clksrcs[ptr], true);
arch/arm/mach-exynos/mach-exynos5-dt.c +11 -0
@@ -24,6 +24,9 @@#include <plat/regs-serial.h> #include <plat/backlight.h> #include <plat/gpio-cfg.h> +#include <plat/clock.h> +#include <plat/s5p-clock.h> +#include <plat/clock-clksrc.h> #include "common.h"
@@ -172,9 +175,17 @@ static void __init exynos5250_dt_map_io(void)static void __init exynos5250_dt_machine_init (void ) { +struct device_node *fimd_node; +samsung_bl_set (&smdk5250_bl_gpio_info, &smdk5250_bl_data);of_platform_populate (NULL , of_default_bus_match_table, exynos5250_auxdata_lookup,NULL ); + + fimd_node =of_find_node_with_property (NULL ,"supports-mipi-panel" ); +if (of_get_property (fimd_node,"supports-mipi-panel" ,NULL )) +clk_set_rate (&exynos5_clk_sclk_fimd.clk,800000000 ); +of_node_put (fimd_node); +exynos_fimd_gpio_setup_24bpp ();platform_add_devices (smdk5250_devices,ARRAY_SIZE (smdk5250_devices)); }
arch/arm/plat-samsung/include/plat/clock.h +2 -0
@@ -83,6 +83,8 @@ extern struct clk clk_ext;extern struct clksrc_clk clk_epllref;extern struct clksrc_clk clk_esysclk; +extern struct clksrc_clk exynos5_clk_sclk_fimd; +/* S3C64XX specific clocks */ extern struct clk clk_h2;extern struct clk clk_27m;
Signature · 1 line
1.7.0.4
Hi Leela,
Some nits and suggestions.
Please include device tree list ([email protected]) for all dt related patches.
Quoted 10 lines · Leela Krishna Amudala
From: Leela Krishna <[email protected]>
The patches are created against "for-next" branch of Kukjin Kim's tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.gitThis patch set adds Backlight, LCD support and device tree based discovery support for drm-fimd
Leela Krishna (3):
ARM: EXYNOS5: add device tree based discovery support for FIMD
Just keep it EXYNOS (not EXYNOS5).
Quoted 4 lines
ARM: EXYNOS5: Add the bus clock for FIMD
ARM: EXYNOS5: Set parent clock to fimdLeela Krishna Amudala (4):
Better maintain same (author) name style atleast in a series.
Quoted 25 lines
ARM: SAMSUNG: add additional registers and SFR definitions for
writeback
ARM: EXYNOS5: add machine specific support for backlight
ARM: EXYNOS5: add machine specific support for LCD
ARM: EXYNOS: Adding DRM platform devicearch/arm/boot/dts/exynos5250-smdk5250.dts | 16 +++ arch/arm/boot/dts/exynos5250.dtsi | 7 ++ arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/clock-exynos5.c | 30 ++++-- arch/arm/mach-exynos/include/mach/map.h | 1 + arch/arm/mach-exynos/mach-exynos5-dt.c | 125 +++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/clock.h | 2 + arch/arm/plat-samsung/include/plat/regs-fb-v4.h | 10 ++ arch/arm/plat-samsung/include/plat/regs-fb.h | 51 +++++++++ drivers/video/Kconfig | 6 + 10 files changed, 239 insertions(+), 10 deletions(-)--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
With warm regards, Sachin