From a651c42acaf44c11d8f6354acbd1e21a945a4064 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Mon, 7 Jul 2014 18:32:24 +0200 Subject: [PATCH 01/21] ARM: at91/dt: define the HLCDC node available on sama5d3 SoCs Define the HLCDC (HLCD Controller) IP available on some sama5d3 SoCs (i.e. sama5d31, sama5d33, sama5d34 and sama5d36) in sama5d3 dtsi file. Signed-off-by: Boris Brezillon Tested-by: Anthony Harivel --- arch/arm/boot/dts/sama5d3_lcd.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi b/arch/arm/boot/dts/sama5d3_lcd.dtsi index 611ff8a1ba811e..1cb41250c1325d 100644 --- a/arch/arm/boot/dts/sama5d3_lcd.dtsi +++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi @@ -194,6 +194,34 @@ }; }; + hlcdc: hlcdc@f0030000 { + compatible = "atmel,sama5d3-hlcdc"; + reg = <0xf0030000 0x2000>; + interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>; + clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>; + clock-names = "periph_clk","sys_clk", "slow_clk"; + status = "disabled"; + + hlcdc-display-controller { + compatible = "atmel,hlcdc-display-controller"; + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + }; + + hlcdc_pwm: hlcdc-pwm { + compatible = "atmel,hlcdc-pwm"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_pwm>; + #pwm-cells = <3>; + }; + }; + pmc: pmc@fffffc00 { periphck { lcdc_clk: lcdc_clk { From 9bf35f973b7ab0264778086166c43b1bcd89eee3 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Wed, 7 Jan 2015 09:30:20 +0100 Subject: [PATCH 02/21] drm: atmel-hlcdc: add support for at91sam9x5 SoCs Describe capabilities of the HLCDC IP found on at91sam9x5 SoCs and add a new entry to the atmel_hlcdc_of_match table. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 88 ++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c index 7320a6c6613f17..ba71f8800630b0 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c @@ -29,6 +29,90 @@ #define ATMEL_HLCDC_LAYER_IRQS_OFFSET 8 +static const struct atmel_hlcdc_layer_desc atmel_hlcdc_at91sam9x5_layers[] = { + { + .name = "base", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x40, + .id = 0, + .type = ATMEL_HLCDC_BASE_LAYER, + .nconfigs = 5, + .layout = { + .xstride = { 2 }, + .default_color = 3, + .general_config = 4, + .disc_pos = 5, + .disc_size = 6, + }, + }, + { + .name = "overlay1", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x140, + .id = 1, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .nconfigs = 10, + .layout = { + .pos = 2, + .size = 3, + .xstride = { 4 }, + .pstride = { 5 }, + .default_color = 6, + .chroma_key = 7, + .chroma_key_mask = 8, + .general_config = 9, + }, + }, + { + .name = "high-end-overlay", + .formats = &atmel_hlcdc_plane_rgb_and_yuv_formats, + .regs_offset = 0x240, + .id = 2, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .nconfigs = 17, + .layout = { + .pos = 2, + .size = 3, + .memsize = 4, + .xstride = { 5, 7 }, + .pstride = { 6, 8 }, + .default_color = 9, + .chroma_key = 10, + .chroma_key_mask = 11, + .general_config = 12, + .csc = 14, + }, + }, + { + .name = "cursor", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x340, + .id = 3, + .type = ATMEL_HLCDC_CURSOR_LAYER, + .nconfigs = 10, + .max_width = 128, + .max_height = 128, + .layout = { + .pos = 2, + .size = 3, + .xstride = { 4 }, + .default_color = 6, + .chroma_key = 7, + .chroma_key_mask = 8, + .general_config = 9, + }, + }, +}; + +static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_at91sam9x5 = { + .min_width = 0, + .min_height = 0, + .max_width = 800, + .max_height = 600, + .nlayers = ARRAY_SIZE(atmel_hlcdc_at91sam9x5_layers), + .layers = atmel_hlcdc_at91sam9x5_layers, +}; + static const struct atmel_hlcdc_layer_desc atmel_hlcdc_sama5d3_layers[] = { { .name = "base", @@ -133,6 +217,10 @@ static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_sama5d3 = { }; static const struct of_device_id atmel_hlcdc_of_match[] = { + { + .compatible = "atmel,at91sam9x5-hlcdc", + .data = &atmel_hlcdc_dc_at91sam9x5, + }, { .compatible = "atmel,sama5d3-hlcdc", .data = &atmel_hlcdc_dc_sama5d3, From b7a2b221a4ed1aed0e7d711e20b6b759d1fd6cbd Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Wed, 7 Jan 2015 09:32:35 +0100 Subject: [PATCH 03/21] mfd: atmel-hlcdc: Add support for at91sam9x5 SoCs Add an entry in the atmel_hlcdc_match table to support the HLCDC IP available on at91sam9x5 SoCs Signed-off-by: Boris Brezillon --- drivers/mfd/atmel-hlcdc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c index cfd58f4cc5c349..84872baea0099d 100644 --- a/drivers/mfd/atmel-hlcdc.c +++ b/drivers/mfd/atmel-hlcdc.c @@ -102,6 +102,7 @@ static int atmel_hlcdc_remove(struct platform_device *pdev) } static const struct of_device_id atmel_hlcdc_match[] = { + { .compatible = "atmel,at91sam9x5-hlcdc" }, { .compatible = "atmel,sama5d3-hlcdc" }, { /* sentinel */ }, }; From c2beb68c751a74e86acf2bef365f2e3a22f448bc Mon Sep 17 00:00:00 2001 From: Boris BREZILLON Date: Thu, 31 Jul 2014 09:34:54 +0200 Subject: [PATCH 04/21] ARM: at91/dt: add at91sam9x5 Display Module dtsi Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/at91sam9x5dm.dtsi | 74 +++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 arch/arm/boot/dts/at91sam9x5dm.dtsi diff --git a/arch/arm/boot/dts/at91sam9x5dm.dtsi b/arch/arm/boot/dts/at91sam9x5dm.dtsi new file mode 100644 index 00000000000000..c41cd8fa6f8eb6 --- /dev/null +++ b/arch/arm/boot/dts/at91sam9x5dm.dtsi @@ -0,0 +1,74 @@ +/* + * at91sam9x5dm.dtsi - Device Tree file for SAM9x5 display module + * + * Copyright (C) 2014 Atmel, + * 2014 Free Electrons + * + * Author: Boris Brezillon + * + * Licensed under GPLv2 or later. + */ + +/ { + ahb { + apb { + hlcdc: hlcdc@f8038000 { + hlcdc-display-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>; + + port@0 { + hlcdc_panel_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + }; + }; + + bl_reg: backlight_regulator { + compatible = "regulator-fixed"; + regulator-name = "backlight-power-supply"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + status = "disabled"; + }; + + panel_reg: panel_regulator { + compatible = "regulator-fixed"; + regulator-name = "panel-power-supply"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + status = "disabled"; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&hlcdc_pwm 0 50000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + power-supply = <&bl_reg>; + status = "disabled"; + }; + + panel: panel { + compatible = "foxlink,fl500wvr00-a0t", "simple-panel"; + backlight = <&backlight>; + power-supply = <&panel_reg>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + + panel_input: endpoint@0 { + reg = <0>; + remote-endpoint = <&hlcdc_panel_output>; + }; + }; + }; +}; From 668276b5d2a28e007ff5dded2c16332c1a6899f4 Mon Sep 17 00:00:00 2001 From: Boris BREZILLON Date: Thu, 31 Jul 2014 09:35:31 +0200 Subject: [PATCH 05/21] ARM: at91/dt: define hlcdc node in at91sam9x5_lcd.dtsi Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/at91sam9x5_lcd.dtsi | 139 ++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/arch/arm/boot/dts/at91sam9x5_lcd.dtsi b/arch/arm/boot/dts/at91sam9x5_lcd.dtsi index 485302e8233d4d..08857c9f1d61d8 100644 --- a/arch/arm/boot/dts/at91sam9x5_lcd.dtsi +++ b/arch/arm/boot/dts/at91sam9x5_lcd.dtsi @@ -13,6 +13,137 @@ / { ahb { apb { + hlcdc: hlcdc@f8038000 { + compatible = "atmel,at91sam9x5-hlcdc"; + reg = <0xf8038000 0x4000>; + interrupts = <25 IRQ_TYPE_LEVEL_HIGH 0>; + clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>; + clock-names = "periph_clk","sys_clk", "slow_clk"; + status = "disabled"; + + hlcdc-display-controller { + compatible = "atmel,hlcdc-display-controller"; + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + }; + + hlcdc_pwm: hlcdc-pwm { + compatible = "atmel,hlcdc-pwm"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_pwm>; + #pwm-cells = <3>; + }; + }; + + pinctrl@fffff400 { + lcd { + pinctrl_lcd_pwm: lcd-pwm-0 { + atmel,pins = ; /* LCDPWM */ + }; + + pinctrl_lcd_base: lcd-base-0 { + atmel,pins = + ; /* LCDPCK */ + }; + + pinctrl_lcd_rgb444: lcd-rgb-0 { + atmel,pins = + ; /* LCDD11 pin */ + }; + + pinctrl_lcd_rgb565: lcd-rgb-1 { + atmel,pins = + ; /* LCDD15 pin */ + }; + + pinctrl_lcd_rgb666: lcd-rgb-2 { + atmel,pins = + ; /* LCDD17 pin */ + }; + + pinctrl_lcd_rgb888: lcd-rgb-3 { + atmel,pins = + ; /* LCDD23 pin */ + }; + }; + }; + pmc: pmc@fffffc00 { periphck { lcdc_clk: lcdc_clk { @@ -20,6 +151,14 @@ reg = <25>; }; }; + + systemck { + lcdck: lcdck { + #clock-cells = <0>; + reg = <3>; + clocks = <&mck>; + }; + }; }; }; }; From 4fcb685ecd79087dde1dfaea20de7cf07629c4b7 Mon Sep 17 00:00:00 2001 From: Boris BREZILLON Date: Thu, 31 Jul 2014 09:36:10 +0200 Subject: [PATCH 06/21] ARM: at91/dt: include lcd dtsi in at91sam9x5 dtsis Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/at91sam9g15.dtsi | 1 + arch/arm/boot/dts/at91sam9g35.dtsi | 1 + arch/arm/boot/dts/at91sam9x35.dtsi | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/arm/boot/dts/at91sam9g15.dtsi b/arch/arm/boot/dts/at91sam9g15.dtsi index cfd7044616d793..27de7dc0f0e09f 100644 --- a/arch/arm/boot/dts/at91sam9g15.dtsi +++ b/arch/arm/boot/dts/at91sam9g15.dtsi @@ -7,6 +7,7 @@ */ #include "at91sam9x5.dtsi" +#include "at91sam9x5_lcd.dtsi" / { model = "Atmel AT91SAM9G15 SoC"; diff --git a/arch/arm/boot/dts/at91sam9g35.dtsi b/arch/arm/boot/dts/at91sam9g35.dtsi index e35c2fcf82985f..ff4115886f9781 100644 --- a/arch/arm/boot/dts/at91sam9g35.dtsi +++ b/arch/arm/boot/dts/at91sam9g35.dtsi @@ -7,6 +7,7 @@ */ #include "at91sam9x5.dtsi" +#include "at91sam9x5_lcd.dtsi" #include "at91sam9x5_macb0.dtsi" / { diff --git a/arch/arm/boot/dts/at91sam9x35.dtsi b/arch/arm/boot/dts/at91sam9x35.dtsi index 499cdc81f4c07c..d9054e8167b7c1 100644 --- a/arch/arm/boot/dts/at91sam9x35.dtsi +++ b/arch/arm/boot/dts/at91sam9x35.dtsi @@ -7,6 +7,7 @@ */ #include "at91sam9x5.dtsi" +#include "at91sam9x5_lcd.dtsi" #include "at91sam9x5_macb0.dtsi" #include "at91sam9x5_can.dtsi" From 4a18eaf5d2a42d01b0e7e9c098342af2c6bad650 Mon Sep 17 00:00:00 2001 From: Boris BREZILLON Date: Thu, 31 Jul 2014 09:37:06 +0200 Subject: [PATCH 07/21] ARM: at91/dt: enable lcd support for at91sam9x5 SoCs Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/at91sam9g15ek.dts | 21 +++++++++++++++++++++ arch/arm/boot/dts/at91sam9g35ek.dts | 21 +++++++++++++++++++++ arch/arm/boot/dts/at91sam9x35ek.dts | 21 +++++++++++++++++++++ 3 files changed, 63 insertions(+) diff --git a/arch/arm/boot/dts/at91sam9g15ek.dts b/arch/arm/boot/dts/at91sam9g15ek.dts index e5167828a92031..3650dcf04e1fe1 100644 --- a/arch/arm/boot/dts/at91sam9g15ek.dts +++ b/arch/arm/boot/dts/at91sam9g15ek.dts @@ -8,6 +8,7 @@ */ /dts-v1/; #include "at91sam9g15.dtsi" +#include "at91sam9x5dm.dtsi" #include "at91sam9x5ek.dtsi" / { @@ -20,6 +21,26 @@ /* mmc1 pins is conflicted with spi0 pins */ status = "disabled"; }; + + hlcdc: hlcdc@f8038000 { + status = "okay"; + }; }; }; + + bl_reg: backlight_regulator { + status = "okay"; + }; + + panel_reg: panel_regulator { + status = "okay"; + }; + + backlight: backlight { + status = "okay"; + }; + + panel: panel { + status = "okay"; + }; }; diff --git a/arch/arm/boot/dts/at91sam9g35ek.dts b/arch/arm/boot/dts/at91sam9g35ek.dts index ec240d26b8cf41..95ce9c5e3d3976 100644 --- a/arch/arm/boot/dts/at91sam9g35ek.dts +++ b/arch/arm/boot/dts/at91sam9g35ek.dts @@ -8,6 +8,7 @@ */ /dts-v1/; #include "at91sam9g35.dtsi" +#include "at91sam9x5dm.dtsi" #include "at91sam9x5ek.dtsi" / { @@ -16,6 +17,10 @@ ahb { apb { + hlcdc: hlcdc@f8038000 { + status = "okay"; + }; + macb0: ethernet@f802c000 { phy-mode = "rmii"; status = "okay"; @@ -27,4 +32,20 @@ }; }; }; + + bl_reg: backlight_regulator { + status = "okay"; + }; + + panel_reg: panel_regulator { + status = "okay"; + }; + + backlight: backlight { + status = "okay"; + }; + + panel: panel { + status = "okay"; + }; }; diff --git a/arch/arm/boot/dts/at91sam9x35ek.dts b/arch/arm/boot/dts/at91sam9x35ek.dts index fb80fba5ce6031..7fa73392620e49 100644 --- a/arch/arm/boot/dts/at91sam9x35ek.dts +++ b/arch/arm/boot/dts/at91sam9x35ek.dts @@ -8,6 +8,7 @@ */ /dts-v1/; #include "at91sam9x35.dtsi" +#include "at91sam9x5dm.dtsi" #include "at91sam9x5ek.dtsi" / { @@ -16,6 +17,10 @@ ahb { apb { + hlcdc: hlcdc@f8038000 { + status = "okay"; + }; + macb0: ethernet@f802c000 { phy-mode = "rmii"; status = "okay"; @@ -27,4 +32,20 @@ }; }; }; + + bl_reg: backlight_regulator { + status = "okay"; + }; + + panel_reg: panel_regulator { + status = "okay"; + }; + + backlight: backlight { + status = "okay"; + }; + + panel: panel { + status = "okay"; + }; }; From 8cb6fcfd6d5fafecce2a29b5cfc982f6b361768a Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Wed, 7 Jan 2015 10:12:41 +0100 Subject: [PATCH 08/21] drm: atmel-hlcdc: add support for at91sam9n12 SoC Describe capabilities of the HLCDC IP found on at91sam9n12 SoC and add a new entry to the atmel_hlcdc_of_match table. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 29 ++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c index ba71f8800630b0..c7f91696eedd92 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c @@ -29,6 +29,31 @@ #define ATMEL_HLCDC_LAYER_IRQS_OFFSET 8 +static const struct atmel_hlcdc_layer_desc atmel_hlcdc_at91sam9n12_layers[] = { + { + .name = "base", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x40, + .id = 0, + .type = ATMEL_HLCDC_BASE_LAYER, + .nconfigs = 5, + .layout = { + .xstride = { 2 }, + .default_color = 3, + .general_config = 4, + }, + }, +}; + +static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_at91sam9n12 = { + .min_width = 0, + .min_height = 0, + .max_width = 1280, + .max_height = 860, + .nlayers = ARRAY_SIZE(atmel_hlcdc_at91sam9n12_layers), + .layers = atmel_hlcdc_at91sam9n12_layers, +}; + static const struct atmel_hlcdc_layer_desc atmel_hlcdc_at91sam9x5_layers[] = { { .name = "base", @@ -217,6 +242,10 @@ static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_sama5d3 = { }; static const struct of_device_id atmel_hlcdc_of_match[] = { + { + .compatible = "atmel,at91sam9n12-hlcdc", + .data = &atmel_hlcdc_dc_at91sam9n12, + }, { .compatible = "atmel,at91sam9x5-hlcdc", .data = &atmel_hlcdc_dc_at91sam9x5, From c4c9daaf787bd8dd9f47722258c9d80658abaa21 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Wed, 7 Jan 2015 10:15:55 +0100 Subject: [PATCH 09/21] mfd: atmel-hlcdc: Add support for at91sam9n12 SoC Add an entry in the atmel_hlcdc_match table to support the HLCDC IP available on at91sam9n12 SoC. Signed-off-by: Boris Brezillon --- drivers/mfd/atmel-hlcdc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c index 84872baea0099d..8bc7bac3a3fc80 100644 --- a/drivers/mfd/atmel-hlcdc.c +++ b/drivers/mfd/atmel-hlcdc.c @@ -102,6 +102,7 @@ static int atmel_hlcdc_remove(struct platform_device *pdev) } static const struct of_device_id atmel_hlcdc_match[] = { + { .compatible = "atmel,at91sam9n12-hlcdc" }, { .compatible = "atmel,at91sam9x5-hlcdc" }, { .compatible = "atmel,sama5d3-hlcdc" }, { /* sentinel */ }, From 2eb674a013613bc75ac9d09258952d700e47c858 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Wed, 7 Jan 2015 10:25:41 +0100 Subject: [PATCH 10/21] drm: atmel-hlcdc: add support for sama5d4 SoCs Describe capabilities of the HLCDC IP found on sama5d4 SoCs and add a new entry to the atmel_hlcdc_of_match table. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 86 ++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c index c7f91696eedd92..c2988a71648908 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c @@ -241,6 +241,88 @@ static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_sama5d3 = { .layers = atmel_hlcdc_sama5d3_layers, }; +static const struct atmel_hlcdc_layer_desc atmel_hlcdc_sama5d4_layers[] = { + { + .name = "base", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x40, + .id = 0, + .type = ATMEL_HLCDC_BASE_LAYER, + .nconfigs = 7, + .layout = { + .xstride = { 2 }, + .default_color = 3, + .general_config = 4, + .disc_pos = 5, + .disc_size = 6, + }, + }, + { + .name = "overlay1", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x140, + .id = 1, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .nconfigs = 10, + .layout = { + .pos = 2, + .size = 3, + .xstride = { 4 }, + .pstride = { 5 }, + .default_color = 6, + .chroma_key = 7, + .chroma_key_mask = 8, + .general_config = 9, + }, + }, + { + .name = "overlay2", + .formats = &atmel_hlcdc_plane_rgb_formats, + .regs_offset = 0x240, + .id = 2, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .nconfigs = 10, + .layout = { + .pos = 2, + .size = 3, + .xstride = { 4 }, + .pstride = { 5 }, + .default_color = 6, + .chroma_key = 7, + .chroma_key_mask = 8, + .general_config = 9, + }, + }, + { + .name = "high-end-overlay", + .formats = &atmel_hlcdc_plane_rgb_and_yuv_formats, + .regs_offset = 0x340, + .id = 3, + .type = ATMEL_HLCDC_OVERLAY_LAYER, + .nconfigs = 42, + .layout = { + .pos = 2, + .size = 3, + .memsize = 4, + .xstride = { 5, 7 }, + .pstride = { 6, 8 }, + .default_color = 9, + .chroma_key = 10, + .chroma_key_mask = 11, + .general_config = 12, + .csc = 14, + }, + }, +}; + +static const struct atmel_hlcdc_dc_desc atmel_hlcdc_dc_sama5d4 = { + .min_width = 0, + .min_height = 0, + .max_width = 2048, + .max_height = 2048, + .nlayers = ARRAY_SIZE(atmel_hlcdc_sama5d4_layers), + .layers = atmel_hlcdc_sama5d4_layers, +}; static const struct of_device_id atmel_hlcdc_of_match[] = { { .compatible = "atmel,at91sam9n12-hlcdc", @@ -254,6 +336,10 @@ static const struct of_device_id atmel_hlcdc_of_match[] = { .compatible = "atmel,sama5d3-hlcdc", .data = &atmel_hlcdc_dc_sama5d3, }, + { + .compatible = "atmel,sama5d4-hlcdc", + .data = &atmel_hlcdc_dc_sama5d4, + }, { /* sentinel */ }, }; From b5dd6edd97633f3485151aee55d9f6efbb9270a4 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Wed, 7 Jan 2015 10:26:48 +0100 Subject: [PATCH 11/21] mfd: atmel-hlcdc: Add support for sama5d4 SoCs Add an entry in the atmel_hlcdc_match table to support the HLCDC IP available on sama5d4 SoCs. Signed-off-by: Boris Brezillon --- drivers/mfd/atmel-hlcdc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c index 8bc7bac3a3fc80..0208cd534515ce 100644 --- a/drivers/mfd/atmel-hlcdc.c +++ b/drivers/mfd/atmel-hlcdc.c @@ -105,6 +105,7 @@ static const struct of_device_id atmel_hlcdc_match[] = { { .compatible = "atmel,at91sam9n12-hlcdc" }, { .compatible = "atmel,at91sam9x5-hlcdc" }, { .compatible = "atmel,sama5d3-hlcdc" }, + { .compatible = "atmel,sama5d4-hlcdc" }, { /* sentinel */ }, }; From 579bfa39804aafa3fc372b535a3b68b2a6307908 Mon Sep 17 00:00:00 2001 From: Boris BREZILLON Date: Fri, 1 Aug 2014 09:41:13 +0200 Subject: [PATCH 12/21] ARM: at91/dt: sama5d4: rename lcd_clk into lcdc_clk Rename lcd_clk into lcdc_clk to be consistent with sama5d3 clock definitions. Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/sama5d4.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi index ffd4fc6acecbc8..fc28c53251728a 100644 --- a/arch/arm/boot/dts/sama5d4.dtsi +++ b/arch/arm/boot/dts/sama5d4.dtsi @@ -783,7 +783,7 @@ reg = <50>; }; - lcd_clk: lcd_clk { + lcdc_clk: lcdc_clk { #clock-cells = <0>; reg = <51>; }; From 6cc23447cdef3a78f24e848085546e6a20288931 Mon Sep 17 00:00:00 2001 From: Boris BREZILLON Date: Fri, 1 Aug 2014 09:41:46 +0200 Subject: [PATCH 13/21] ARM: at91/dt: sama5d4: fix lcdck parent clk lcdck takes mck (not smd) as its parent. Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/sama5d4.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi index fc28c53251728a..a083dcc3fdf439 100644 --- a/arch/arm/boot/dts/sama5d4.dtsi +++ b/arch/arm/boot/dts/sama5d4.dtsi @@ -475,7 +475,7 @@ lcdck: lcdck { #clock-cells = <0>; reg = <4>; - clocks = <&smd>; + clocks = <&mck>; }; smdck: smdck { From 5d9025b51341434f9a096e1e5824c04aec437f77 Mon Sep 17 00:00:00 2001 From: Boris BREZILLON Date: Fri, 1 Aug 2014 09:42:18 +0200 Subject: [PATCH 14/21] ARM: at91/dt: sama5d4: add lcdc pin definitions Add LCDC pin definitions. Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/sama5d4.dtsi | 101 +++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi index a083dcc3fdf439..52732c2dcc4d22 100644 --- a/arch/arm/boot/dts/sama5d4.dtsi +++ b/arch/arm/boot/dts/sama5d4.dtsi @@ -1474,6 +1474,107 @@ AT91_PIOC 23 AT91_PERIPH_B AT91_PINCTRL_NONE>; /* PC23 periph B RD1 */ }; }; + + lcd { + pinctrl_lcd_pwm: lcd-pwm-0 { + atmel,pins = ; /* LCDPWM */ + }; + + pinctrl_lcd_base: lcd-base-0 { + atmel,pins = + ; /* LCDPCK */ + }; + + pinctrl_lcd_rgb444: lcd-rgb-0 { + atmel,pins = + ; /* LCDD11 pin */ + }; + + pinctrl_lcd_rgb565: lcd-rgb-1 { + atmel,pins = + ; /* LCDD15 pin */ + }; + + pinctrl_lcd_rgb666: lcd-rgb-2 { + atmel,pins = + ; /* LCDD17 pin */ + }; + + pinctrl_lcd_rgb888: lcd-rgb-3 { + atmel,pins = + ; /* LCDD23 pin */ + }; + }; }; aic: interrupt-controller@fc06e000 { From 20f867a10377507563bf866062d2871b7d44f3cb Mon Sep 17 00:00:00 2001 From: Boris BREZILLON Date: Fri, 1 Aug 2014 09:43:11 +0200 Subject: [PATCH 15/21] ARM: at91/dt: sama5d4: add hlcdc node Add HLCDC node. Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/sama5d4.dtsi | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi index 52732c2dcc4d22..e58ba79b25770e 100644 --- a/arch/arm/boot/dts/sama5d4.dtsi +++ b/arch/arm/boot/dts/sama5d4.dtsi @@ -322,6 +322,34 @@ #size-cells = <1>; ranges; + hlcdc: hlcdc@f0000000 { + compatible = "atmel,sama5d4-hlcdc"; + reg = <0xf0000000 0x4000>; + interrupts = <51 IRQ_TYPE_LEVEL_HIGH 0>; + clocks = <&lcdc_clk>, <&lcdck>, <&clk32k>; + clock-names = "periph_clk","sys_clk", "slow_clk"; + status = "disabled"; + + hlcdc-display-controller { + compatible = "atmel,hlcdc-display-controller"; + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + }; + }; + + hlcdc_pwm: hlcdc-pwm { + compatible = "atmel,hlcdc-pwm"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_pwm>; + #pwm-cells = <3>; + }; + }; + dma1: dma-controller@f0004000 { compatible = "atmel,sama5d4-dma"; reg = <0xf0004000 0x200>; From bd4bb15a98f4a07105c403024a7a6d520af15bef Mon Sep 17 00:00:00 2001 From: Boris BREZILLON Date: Fri, 18 Jul 2014 09:07:11 +0200 Subject: [PATCH 16/21] drm: panel: add shelly panel support !!!! I'm not sure about the LCD panel properties, these values should be checked with atmel. Signed-off-by: Boris BREZILLON --- drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 695f406338910b..caf21ebbed8ffd 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -641,6 +641,29 @@ static const struct panel_desc samsung_ltn101nt05 = { }, }; + +static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = { + .clock = 33300, + .hdisplay = 800, + .hsync_start = 800 + 1, + .hsync_end = 800 + 1 + 64, + .htotal = 800 + 1 + 64 + 64, + .vdisplay = 480, + .vsync_start = 480 + 1, + .vsync_end = 480 + 1 + 23, + .vtotal = 480 + 1 + 23 + 22, + .vrefresh = 60, +}; + +static const struct panel_desc shelly_sca07010_bfn_lnn = { + .modes = &shelly_sca07010_bfn_lnn_mode, + .num_modes = 1, + .size = { + .width = 152, + .height = 91, + }, +}; + static const struct of_device_id platform_of_match[] = { { .compatible = "auo,b101aw03", @@ -684,6 +707,9 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "samsung,ltn101nt05", .data = &samsung_ltn101nt05, + }, { + .compatible = "shelly,sca07010-bfn-lnn", + .data = &shelly_sca07010_bfn_lnn, }, { /* sentinel */ } From 6b6b79334591566f85a4a2f88ecbc07cc45f88c8 Mon Sep 17 00:00:00 2001 From: Boris BREZILLON Date: Fri, 18 Jul 2014 09:09:27 +0200 Subject: [PATCH 17/21] ARM: dt: add PDA's TM7000 display module dtsi At the moment only the LCD panel is defined. Other components should be added later. Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/pda-tm7000.dtsi | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 arch/arm/boot/dts/pda-tm7000.dtsi diff --git a/arch/arm/boot/dts/pda-tm7000.dtsi b/arch/arm/boot/dts/pda-tm7000.dtsi new file mode 100644 index 00000000000000..373508b651e765 --- /dev/null +++ b/arch/arm/boot/dts/pda-tm7000.dtsi @@ -0,0 +1,53 @@ +/* + * pda-tm7000.dtsi - Device Tree Include file for PDA 7" display module + * + * Copyright (C) 2014 Atmel + * Copyright (C) 2014 Free Electrons + * + * Author: Boris Brezillon + * + * Licensed under GPLv2 or later. + */ + +/ { + bl_reg: backlight_regulator { + compatible = "regulator-fixed"; + regulator-name = "backlight-power-supply"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + status = "disabled"; + }; + + panel_reg: panel_regulator { + compatible = "regulator-fixed"; + regulator-name = "panel-power-supply"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + status = "disabled"; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + power-supply = <&bl_reg>; + status = "disabled"; + }; + + panel: panel { + compatible = "shelly,sca07010-bfn-lnn", "simple-panel"; + backlight = <&backlight>; + power-supply = <&panel_reg>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + panel_input: endpoint@0 { + reg = <0>; + }; + }; + }; +}; From 6e55aa2a98dc5291f346078345c9b226791da97c Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Wed, 7 Jan 2015 10:57:43 +0100 Subject: [PATCH 18/21] ARM: at91/dt: sama5d4: enable panel related nodes in sama5d4ek dts Include pda-tm7000 display module dtsi and enable the HLCDC and panel related devices. Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/at91-sama5d4ek.dts | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm/boot/dts/at91-sama5d4ek.dts b/arch/arm/boot/dts/at91-sama5d4ek.dts index ab5a45e9419a85..88423eea9c8740 100644 --- a/arch/arm/boot/dts/at91-sama5d4ek.dts +++ b/arch/arm/boot/dts/at91-sama5d4ek.dts @@ -44,6 +44,7 @@ */ /dts-v1/; #include "sama5d4.dtsi" +#include "pda-tm7000.dtsi" / { model = "Atmel SAMA5D4-EK"; @@ -98,6 +99,20 @@ }; }; + hlcdc: hlcdc@f0000000 { + hlcdc-display-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb666>; + + port@0 { + hlcdc_panel_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + adc0: adc@fc034000 { /* The vref depends on JP22 of EK. If connect 1-2 then use 3.3V. connect 2-3 use 3.0V */ atmel,adc-vref = <3300>; @@ -450,4 +465,29 @@ atmel,ssc-controller = <&ssc0>; atmel,audio-codec = <&wm8904>; }; + + bl_reg: backlight_regulator { + status = "okay"; + }; + + panel_reg: panel_regulator { + status = "okay"; + }; + + backlight: backlight { + pwms = <&hlcdc_pwm 0 50000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + status = "okay"; + }; + + panel: panel { + status = "okay"; + + port@0 { + panel_input: endpoint@0 { + remote-endpoint = <&hlcdc_panel_output>; + }; + }; + }; }; From 28cf7cd330b5a23069b701bcabc33c8fd9828ef7 Mon Sep 17 00:00:00 2001 From: Boris BREZILLON Date: Fri, 1 Aug 2014 09:48:47 +0200 Subject: [PATCH 19/21] ARM: at91/dt: replace lcd_bus node by hlcdc node The lcd_bus and hlcdc cannot be both defined at the same time because they are using the same resources. Remove old lcb_bus node and then enable the hlcdc node. Signed-off-by: Boris BREZILLON --- arch/arm/boot/dts/at91-sama5d4ek.dts | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/arch/arm/boot/dts/at91-sama5d4ek.dts b/arch/arm/boot/dts/at91-sama5d4ek.dts index 88423eea9c8740..36dc81d8208476 100644 --- a/arch/arm/boot/dts/at91-sama5d4ek.dts +++ b/arch/arm/boot/dts/at91-sama5d4ek.dts @@ -79,27 +79,9 @@ ahb { apb { - lcd_bus@f0000000 { + hlcdc: hlcdc@f0000000 { status = "okay"; - lcd@f0000000 { - status = "okay"; - }; - - lcdovl1@f0000140 { - status = "okay"; - }; - - lcdovl2@f0000240 { - status = "okay"; - }; - - lcdheo1@f0000340 { - status = "okay"; - }; - }; - - hlcdc: hlcdc@f0000000 { hlcdc-display-controller { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb666>; From 38095f5ed12e7f5d0bcbc47ec13d37bf2281c655 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 12 Feb 2015 09:40:34 +0100 Subject: [PATCH 20/21] drm: panel: add bus_format to sca07010_bfn_lnn panel desc Signed-off-by: Boris Brezillon --- drivers/gpu/drm/panel/panel-simple.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index caf21ebbed8ffd..34af4d6fd22eb0 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -662,6 +662,7 @@ static const struct panel_desc shelly_sca07010_bfn_lnn = { .width = 152, .height = 91, }, + .bus_format = MEDIA_BUS_FMT_RGB666_1X18, }; static const struct of_device_id platform_of_match[] = { From 668a3fdf8d6eb0269ed88951abf45f81dbb41c36 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 12 Feb 2015 13:44:41 +0100 Subject: [PATCH 21/21] ARM: at91/dt: add sama5d3xek + PDA7 board files Signed-off-by: Boris Brezillon --- arch/arm/boot/dts/Makefile | 8 ++ arch/arm/boot/dts/sama5d31ek_pda7.dts | 84 +++++++++++++++++ arch/arm/boot/dts/sama5d31ek_revc_pda7.dts | 98 +++++++++++++++++++ arch/arm/boot/dts/sama5d33ek_pda7.dts | 84 +++++++++++++++++ arch/arm/boot/dts/sama5d33ek_revc_pda7.dts | 94 +++++++++++++++++++ arch/arm/boot/dts/sama5d34ek_pda7.dts | 94 +++++++++++++++++++ arch/arm/boot/dts/sama5d34ek_revc_pda7.dts | 104 +++++++++++++++++++++ arch/arm/boot/dts/sama5d36ek_pda7.dts | 92 ++++++++++++++++++ arch/arm/boot/dts/sama5d36ek_revc_pda7.dts | 95 +++++++++++++++++++ 9 files changed, 753 insertions(+) create mode 100644 arch/arm/boot/dts/sama5d31ek_pda7.dts create mode 100644 arch/arm/boot/dts/sama5d31ek_revc_pda7.dts create mode 100644 arch/arm/boot/dts/sama5d33ek_pda7.dts create mode 100644 arch/arm/boot/dts/sama5d33ek_revc_pda7.dts create mode 100644 arch/arm/boot/dts/sama5d34ek_pda7.dts create mode 100644 arch/arm/boot/dts/sama5d34ek_revc_pda7.dts create mode 100644 arch/arm/boot/dts/sama5d36ek_pda7.dts create mode 100644 arch/arm/boot/dts/sama5d36ek_revc_pda7.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index f6d923d9ab523b..2372ae0967c376 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -44,15 +44,23 @@ dtb-$(CONFIG_ARCH_AT91) += at91sam9x35ek.dtb # sama5d3 dtb-$(CONFIG_ARCH_AT91) += at91-sama5d3_xplained.dtb dtb-$(CONFIG_ARCH_AT91) += sama5d31ek.dtb +dtb-$(CONFIG_ARCH_AT91) += sama5d31ek_pda7.dtb dtb-$(CONFIG_ARCH_AT91) += sama5d31ek_revc.dtb +dtb-$(CONFIG_ARCH_AT91) += sama5d31ek_revc_pda7.dtb dtb-$(CONFIG_ARCH_AT91) += sama5d33ek.dtb +dtb-$(CONFIG_ARCH_AT91) += sama5d33ek_pda7.dtb dtb-$(CONFIG_ARCH_AT91) += sama5d33ek_revc.dtb +dtb-$(CONFIG_ARCH_AT91) += sama5d33ek_revc_pda7.dtb dtb-$(CONFIG_ARCH_AT91) += sama5d34ek.dtb +dtb-$(CONFIG_ARCH_AT91) += sama5d34ek_pda7.dtb dtb-$(CONFIG_ARCH_AT91) += sama5d34ek_revc.dtb +dtb-$(CONFIG_ARCH_AT91) += sama5d34ek_revc_pda7.dtb dtb-$(CONFIG_ARCH_AT91) += sama5d35ek.dtb dtb-$(CONFIG_ARCH_AT91) += sama5d35ek_revc.dtb dtb-$(CONFIG_ARCH_AT91) += sama5d36ek.dtb +dtb-$(CONFIG_ARCH_AT91) += sama5d36ek_pda7.dtb dtb-$(CONFIG_ARCH_AT91) += sama5d36ek_revc.dtb +dtb-$(CONFIG_ARCH_AT91) += sama5d36ek_revc_pda7.dtb # sama5d4 dtb-$(CONFIG_ARCH_AT91) += at91-sama5d4_xplained.dtb dtb-$(CONFIG_ARCH_AT91) += at91-sama5d4ek.dtb diff --git a/arch/arm/boot/dts/sama5d31ek_pda7.dts b/arch/arm/boot/dts/sama5d31ek_pda7.dts new file mode 100644 index 00000000000000..9091b72926fead --- /dev/null +++ b/arch/arm/boot/dts/sama5d31ek_pda7.dts @@ -0,0 +1,84 @@ +/* + * sama5d31ek.dts - Device Tree file for SAMA5D31-EK board + * + * Copyright (C) 2013 Atmel, + * 2013 Ludovic Desroches + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "sama5d31.dtsi" +#include "sama5d3xmb.dtsi" +#include "sama5d3xmb_audio.dtsi" +#include "sama5d3xmb_isi_sensors.dtsi" +#include "pda-tm7000.dtsi" + +/ { + model = "Atmel SAMA5D31-EK"; + compatible = "atmel,sama5d31ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5"; + + ahb { + apb { + spi0: spi@f0004000 { + status = "okay"; + }; + + ssc0: ssc@f0008000 { + status = "okay"; + }; + + i2c1: i2c@f0018000 { + status = "okay"; + }; + + hlcdc: hlcdc@f0030000 { + status = "okay"; + hlcdc-display-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb666_alt>; + + port@0 { + hlcdc_panel_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + + macb1: ethernet@f802c000 { + status = "okay"; + }; + }; + }; + + backlight: backlight { + pwms = <&hlcdc_pwm 0 50000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + power-supply = <&bl_reg>; + status = "okay"; + }; + + bl_reg: backlight_regulator { + status = "okay"; + }; + + panel_reg: panel_regulator { + status = "okay"; + }; + + panel: panel { + status = "okay"; + + port@0 { + panel_input: endpoint@0 { + remote-endpoint = <&hlcdc_panel_output>; + }; + }; + }; + + sound { + status = "okay"; + }; +}; diff --git a/arch/arm/boot/dts/sama5d31ek_revc_pda7.dts b/arch/arm/boot/dts/sama5d31ek_revc_pda7.dts new file mode 100644 index 00000000000000..7899a618a9ec7c --- /dev/null +++ b/arch/arm/boot/dts/sama5d31ek_revc_pda7.dts @@ -0,0 +1,98 @@ +/* + * sama5d31ek_revc.dts - Device Tree file for SAMA5D31-EK with rev.C MB + * + * Copyright (C) 2013 Atmel, + * 2013 Ludovic Desroches + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "sama5d31.dtsi" +#include "sama5d3xmb.dtsi" +#include "sama5d3xmb_revc_audio.dtsi" +#include "pda-tm7000.dtsi" + +/ { + model = "Atmel SAMA5D31-EK"; + compatible = "atmel,sama5d31ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5"; + + ahb { + apb { + spi0: spi@f0004000 { + status = "okay"; + }; + + ssc0: ssc@f0008000 { + status = "okay"; + }; + + i2c0: i2c@f0014000 { + status = "okay"; + }; + + i2c1: i2c@f0018000 { + status = "okay"; + }; + + hlcdc: hlcdc@f0030000 { + status = "okay"; + hlcdc-display-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb666_alt>; + + port@0 { + hlcdc_panel_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + + macb1: ethernet@f802c000 { + status = "okay"; + }; + }; + }; + + backlight: backlight { + status = "okay"; + }; + + bl_reg: backlight_regulator { + status = "okay"; + }; + + leds { + d3 { + label = "d3"; + gpios = <&pioE 24 GPIO_ACTIVE_HIGH>; + }; + }; + + panel_reg: panel_regulator { + status = "okay"; + }; + + backlight: backlight { + pwms = <&hlcdc_pwm 0 50000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + power-supply = <&bl_reg>; + status = "okay"; + }; + + panel: panel { + status = "okay"; + + port@0 { + panel_input: endpoint@0 { + remote-endpoint = <&hlcdc_panel_output>; + }; + }; + }; + + sound { + status = "okay"; + }; +}; diff --git a/arch/arm/boot/dts/sama5d33ek_pda7.dts b/arch/arm/boot/dts/sama5d33ek_pda7.dts new file mode 100644 index 00000000000000..a924bc2acbbabb --- /dev/null +++ b/arch/arm/boot/dts/sama5d33ek_pda7.dts @@ -0,0 +1,84 @@ +/* + * sama5d33ek.dts - Device Tree file for SAMA5D33-EK board + * + * Copyright (C) 2013 Atmel, + * 2013 Ludovic Desroches + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "sama5d33.dtsi" +#include "sama5d3xmb.dtsi" +#include "sama5d3xmb_audio.dtsi" +#include "sama5d3xmb_isi_sensors.dtsi" +#include "pda-tm7000.dtsi" + +/ { + model = "Atmel SAMA5D33-EK"; + compatible = "atmel,sama5d33ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d33", "atmel,sama5d3", "atmel,sama5"; + + ahb { + apb { + spi0: spi@f0004000 { + status = "okay"; + }; + + ssc0: ssc@f0008000 { + status = "okay"; + }; + + i2c1: i2c@f0018000 { + status = "okay"; + }; + + macb0: ethernet@f0028000 { + status = "okay"; + }; + + hlcdc: hlcdc@f0030000 { + status = "okay"; + hlcdc-display-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb666_alt>; + + port@0 { + hlcdc_panel_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + }; + }; + + backlight: backlight { + pwms = <&hlcdc_pwm 0 50000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + power-supply = <&bl_reg>; + status = "okay"; + }; + + bl_reg: backlight_regulator { + status = "okay"; + }; + + panel: panel { + status = "okay"; + + port@0 { + panel_input: endpoint@0 { + remote-endpoint = <&hlcdc_panel_output>; + }; + }; + }; + + panel_reg: panel_regulator { + status = "okay"; + }; + + sound { + status = "okay"; + }; +}; diff --git a/arch/arm/boot/dts/sama5d33ek_revc_pda7.dts b/arch/arm/boot/dts/sama5d33ek_revc_pda7.dts new file mode 100644 index 00000000000000..8106700435ebe8 --- /dev/null +++ b/arch/arm/boot/dts/sama5d33ek_revc_pda7.dts @@ -0,0 +1,94 @@ +/* + * sama5d33ek_revc.dts - Device Tree file for SAMA5D33-EK with rev.C MB + * + * Copyright (C) 2013 Atmel, + * 2013 Ludovic Desroches + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "sama5d33.dtsi" +#include "sama5d3xmb.dtsi" +#include "sama5d3xmb_revc_audio.dtsi" +#include "pda-tm7000.dtsi" + +/ { + model = "Atmel SAMA5D33-EK"; + compatible = "atmel,sama5d33ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d33", "atmel,sama5d3", "atmel,sama5"; + + ahb { + apb { + spi0: spi@f0004000 { + status = "okay"; + }; + + ssc0: ssc@f0008000 { + status = "okay"; + }; + + i2c0: i2c@f0014000 { + status = "okay"; + }; + + i2c1: i2c@f0018000 { + status = "okay"; + }; + + macb0: ethernet@f0028000 { + status = "okay"; + }; + + hlcdc: hlcdc@f0030000 { + status = "okay"; + hlcdc-display-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb666_alt>; + + port@0 { + hlcdc_panel_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + }; + }; + + backlight: backlight { + pwms = <&hlcdc_pwm 0 50000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + power-supply = <&bl_reg>; + status = "okay"; + }; + + bl_reg: backlight_regulator { + status = "okay"; + }; + + leds { + d3 { + label = "d3"; + gpios = <&pioE 24 GPIO_ACTIVE_HIGH>; + }; + }; + + panel: panel { + status = "okay"; + + port@0 { + panel_input: endpoint@0 { + remote-endpoint = <&hlcdc_panel_output>; + }; + }; + }; + + panel_reg: panel_regulator { + status = "okay"; + }; + + sound { + status = "okay"; + }; +}; diff --git a/arch/arm/boot/dts/sama5d34ek_pda7.dts b/arch/arm/boot/dts/sama5d34ek_pda7.dts new file mode 100644 index 00000000000000..1dfcdb064854ff --- /dev/null +++ b/arch/arm/boot/dts/sama5d34ek_pda7.dts @@ -0,0 +1,94 @@ +/* + * sama5d34ek.dts - Device Tree file for SAMA5D34-EK board + * + * Copyright (C) 2013 Atmel, + * 2013 Ludovic Desroches + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "sama5d34.dtsi" +#include "sama5d3xmb.dtsi" +#include "sama5d3xmb_audio.dtsi" +#include "sama5d3xmb_isi_sensors.dtsi" +#include "pda-tm7000.dtsi" + +/ { + model = "Atmel SAMA5D34-EK"; + compatible = "atmel,sama5d34ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d34", "atmel,sama5d3", "atmel,sama5"; + + ahb { + apb { + spi0: spi@f0004000 { + status = "okay"; + }; + + ssc0: ssc@f0008000 { + status = "okay"; + }; + + can0: can@f000c000 { + status = "okay"; + }; + + i2c1: i2c@f0018000 { + status = "okay"; + + 24c256@50 { + compatible = "24c256"; + reg = <0x50>; + pagesize = <64>; + }; + }; + + macb0: ethernet@f0028000 { + status = "okay"; + }; + + hlcdc: hlcdc@f0030000 { + status = "okay"; + hlcdc-display-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb666_alt>; + + port@0 { + hlcdc_panel_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + }; + }; + + backlight: backlight { + pwms = <&hlcdc_pwm 0 50000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + power-supply = <&bl_reg>; + status = "okay"; + }; + + bl_reg: backlight_regulator { + status = "okay"; + }; + + panel: panel { + status = "okay"; + + port@0 { + panel_input: endpoint@0 { + remote-endpoint = <&hlcdc_panel_output>; + }; + }; + }; + + panel_reg: panel_regulator { + status = "okay"; + }; + + sound { + status = "okay"; + }; +}; diff --git a/arch/arm/boot/dts/sama5d34ek_revc_pda7.dts b/arch/arm/boot/dts/sama5d34ek_revc_pda7.dts new file mode 100644 index 00000000000000..5fbe2298341949 --- /dev/null +++ b/arch/arm/boot/dts/sama5d34ek_revc_pda7.dts @@ -0,0 +1,104 @@ +/* + * sama5d34ek_revc.dts - Device Tree file for SAMA5D34-EK with rev.C MB + * + * Copyright (C) 2013 Atmel, + * 2013 Ludovic Desroches + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "sama5d34.dtsi" +#include "sama5d3xmb.dtsi" +#include "sama5d3xmb_revc_audio.dtsi" +#include "pda-tm7000.dtsi" + +/ { + model = "Atmel SAMA5D34-EK"; + compatible = "atmel,sama5d34ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d34", "atmel,sama5d3", "atmel,sama5"; + + ahb { + apb { + spi0: spi@f0004000 { + status = "okay"; + }; + + ssc0: ssc@f0008000 { + status = "okay"; + }; + + can0: can@f000c000 { + status = "okay"; + }; + + i2c0: i2c@f0014000 { + status = "okay"; + }; + + i2c1: i2c@f0018000 { + status = "okay"; + + 24c256@50 { + compatible = "24c256"; + reg = <0x50>; + pagesize = <64>; + }; + }; + + macb0: ethernet@f0028000 { + status = "okay"; + }; + + hlcdc: hlcdc@f0030000 { + status = "okay"; + hlcdc-display-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb666_alt>; + + port@0 { + hlcdc_panel_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + }; + }; + + backlight: backlight { + pwms = <&hlcdc_pwm 0 50000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + power-supply = <&bl_reg>; + status = "okay"; + }; + + bl_reg: backlight_regulator { + status = "okay"; + }; + + leds { + d3 { + label = "d3"; + gpios = <&pioE 24 GPIO_ACTIVE_HIGH>; + }; + }; + + panel: panel { + status = "okay"; + + port@0 { + panel_input: endpoint@0 { + remote-endpoint = <&hlcdc_panel_output>; + }; + }; + }; + + panel_reg: panel_regulator { + status = "okay"; + }; + + sound { + status = "okay"; + }; +}; diff --git a/arch/arm/boot/dts/sama5d36ek_pda7.dts b/arch/arm/boot/dts/sama5d36ek_pda7.dts new file mode 100644 index 00000000000000..4d5b73b30b1b04 --- /dev/null +++ b/arch/arm/boot/dts/sama5d36ek_pda7.dts @@ -0,0 +1,92 @@ +/* + * sama5d36ek.dts - Device Tree file for SAMA5D36-EK board with PDA7 display module + * + * Copyright (C) 2013 Atmel, + * 2013 Josh Wu + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "sama5d36.dtsi" +#include "sama5d3xmb.dtsi" +#include "sama5d3xmb_audio.dtsi" +#include "sama5d3xmb_isi_sensors.dtsi" +#include "pda-tm7000.dtsi" + +/ { + model = "Atmel SAMA5D36-EK"; + compatible = "atmel,sama5d36ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d36", "atmel,sama5d3", "atmel,sama5"; + + ahb { + apb { + spi0: spi@f0004000 { + status = "okay"; + }; + + ssc0: ssc@f0008000 { + status = "okay"; + }; + + can0: can@f000c000 { + status = "okay"; + }; + + i2c1: i2c@f0018000 { + status = "okay"; + }; + + macb0: ethernet@f0028000 { + status = "okay"; + }; + + hlcdc: hlcdc@f0030000 { + status = "okay"; + hlcdc-display-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb666_alt>; + + port@0 { + hlcdc_panel_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + + macb1: ethernet@f802c000 { + status = "okay"; + }; + }; + }; + + backlight: backlight { + pwms = <&hlcdc_pwm 0 50000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + power-supply = <&bl_reg>; + status = "okay"; + }; + + bl_reg: backlight_regulator { + status = "okay"; + }; + + panel: panel { + status = "okay"; + + port@0 { + panel_input: endpoint@0 { + remote-endpoint = <&hlcdc_panel_output>; + }; + }; + }; + + panel_reg: panel_regulator { + status = "okay"; + }; + + sound { + status = "okay"; + }; +}; diff --git a/arch/arm/boot/dts/sama5d36ek_revc_pda7.dts b/arch/arm/boot/dts/sama5d36ek_revc_pda7.dts new file mode 100644 index 00000000000000..2f8bad73aa43cd --- /dev/null +++ b/arch/arm/boot/dts/sama5d36ek_revc_pda7.dts @@ -0,0 +1,95 @@ +/* + * sama5d36ek_revc.dts - Device Tree file for SAMA5D36-EK with rev.C MB + * + * Copyright (C) 2013 Atmel, + * 2013 Josh Wu + * + * Licensed under GPLv2 or later. + */ +/dts-v1/; +#include "sama5d36.dtsi" +#include "sama5d3xmb.dtsi" +#include "sama5d3xmb_revc_audio.dtsi" +#include "pda-tm7000.dtsi" + +/ { + model = "Atmel SAMA5D36-EK"; + compatible = "atmel,sama5d36ek", "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d36", "atmel,sama5d3", "atmel,sama5"; + + ahb { + apb { + spi0: spi@f0004000 { + status = "okay"; + }; + + ssc0: ssc@f0008000 { + status = "okay"; + }; + + can0: can@f000c000 { + status = "okay"; + }; + + i2c0: i2c@f0014000 { + status = "okay"; + }; + + i2c1: i2c@f0018000 { + status = "okay"; + }; + + macb0: ethernet@f0028000 { + status = "okay"; + }; + + hlcdc: hlcdc@f0030000 { + status = "okay"; + hlcdc-display-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb666_alt>; + + port@0 { + hlcdc_panel_output: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; + }; + }; + }; + + macb1: ethernet@f802c000 { + status = "okay"; + }; + }; + }; + + backlight: backlight { + pwms = <&hlcdc_pwm 0 50000 0>; + brightness-levels = <0 4 8 16 32 64 128 255>; + default-brightness-level = <6>; + power-supply = <&bl_reg>; + status = "okay"; + }; + + bl_reg: backlight_regulator { + status = "okay"; + }; + + panel: panel { + status = "okay"; + + port@0 { + panel_input: endpoint@0 { + remote-endpoint = <&hlcdc_panel_output>; + }; + }; + }; + + panel_reg: panel_regulator { + status = "okay"; + }; + + sound { + status = "okay"; + }; +};