From 4518996f90b1c2e04dfa15137dcafe59a47b59f7 Mon Sep 17 00:00:00 2001 From: Alexander Stein Date: Thu, 5 Mar 2015 08:35:38 +0100 Subject: [PATCH 01/12] DT: video: atmel_lcdc: Add example of fixed framebuffer memory This drivers allows a fixed framebuffer memory to be set by an additional IORESOURCE_MEM resource. Thus add an example to the DT documentation. Signed-off-by: Alexander Stein Signed-off-by: Nicolas Ferre --- .../devicetree/bindings/video/atmel,lcdc.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/video/atmel,lcdc.txt b/Documentation/devicetree/bindings/video/atmel,lcdc.txt index f059dd0b3d28..ecb8da063d07 100644 --- a/Documentation/devicetree/bindings/video/atmel,lcdc.txt +++ b/Documentation/devicetree/bindings/video/atmel,lcdc.txt @@ -10,7 +10,9 @@ Required properties: "atmel,at91sam9g45es-lcdc" , "atmel,at91sam9rl-lcdc" , "atmel,at32ap-lcdc" -- reg : Should contain 1 register ranges(address and length) +- reg : Should contain 1 register ranges(address and length). + Can contain an additional register range(address and length) + for fixed framebuffer memory. Useful for dedicated memories. - interrupts : framebuffer controller interrupt - display: a phandle pointing to the display node @@ -38,6 +40,14 @@ Example: }; +Example for fixed framebuffer memory: + + fb0: fb@0x00500000 { + compatible = "atmel,at91sam9263-lcdc"; + reg = <0x00700000 0x1000 0x70000000 0x200000>; + [...] + }; + Atmel LCDC Display ----------------------------------------------------- Required properties (as per of_videomode_helper): From 5934973ddaf01beda9a0ce4f5efa7506ca8f8cb4 Mon Sep 17 00:00:00 2001 From: Nicolas Ferre Date: Thu, 19 Mar 2015 17:23:13 +0100 Subject: [PATCH 02/12] ARM: at91/dt: at91sam9x5cm: enable RTC Enable RTC for all the at91sam9x5 CPU Modules: this will enable it for all the EK boards. Signed-off-by: Nicolas Ferre --- arch/arm/boot/dts/at91sam9x5cm.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/at91sam9x5cm.dtsi b/arch/arm/boot/dts/at91sam9x5cm.dtsi index 229d6c24a9c4..26112ebd15fc 100644 --- a/arch/arm/boot/dts/at91sam9x5cm.dtsi +++ b/arch/arm/boot/dts/at91sam9x5cm.dtsi @@ -42,6 +42,10 @@ }; }; }; + + rtc@fffffeb0 { + status = "okay"; + }; }; nand0: nand@40000000 { From 87003229119ee1e18660d6be6209f44167ba6c6e Mon Sep 17 00:00:00 2001 From: Nicolas Ferre Date: Thu, 19 Mar 2015 17:41:41 +0100 Subject: [PATCH 03/12] ARM: at91/dt: at91sam9n12ek: enable RTC Signed-off-by: Nicolas Ferre --- arch/arm/boot/dts/at91sam9n12ek.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts index 6123109f14ff..6e067c8a3502 100644 --- a/arch/arm/boot/dts/at91sam9n12ek.dts +++ b/arch/arm/boot/dts/at91sam9n12ek.dts @@ -137,6 +137,10 @@ watchdog@fffffe40 { status = "okay"; }; + + rtc@fffffeb0 { + status = "okay"; + }; }; nand0: nand@40000000 { From 42be876539299cab8cf7324db7332cd680fdd4b5 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Mon, 7 Jul 2014 18:31:49 +0200 Subject: [PATCH 04/12] ARM: at91/dt: split sama5d3 lcd pin definitions to match RGB mode configs The HLCDC (HLCD Controller) IP supports 4 different output mode (RGB444, RGB565, RGB666 and RGB888) and the pin muxing will depend on the chosen RGB mode. Split pin definitions to be able to set pin config according to the selected mode. Signed-off-by: Boris Brezillon Tested-by: Anthony Harivel Signed-off-by: Nicolas Ferre --- arch/arm/boot/dts/sama5d3_lcd.dtsi | 127 ++++++++++++++++++++++------- 1 file changed, 96 insertions(+), 31 deletions(-) diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi b/arch/arm/boot/dts/sama5d3_lcd.dtsi index 8aeff6c122aa..9006e21e7537 100644 --- a/arch/arm/boot/dts/sama5d3_lcd.dtsi +++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi @@ -15,38 +15,103 @@ apb { pinctrl@fffff200 { lcd { - pinctrl_lcd: lcd-0 { + pinctrl_lcd_base: lcd-base-0 { atmel,pins = - ; /* PE28 periph C LCDD23 pin */ + ; /* LCDPCK */ + }; + + pinctrl_lcd_pwm: lcd-pwm-0 { + atmel,pins = ; /* LCDPWM */ + }; + + 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 */ }; }; }; From ee839fdd9ff14fc94e8092aa6f35572b6f760e09 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Fri, 4 Jul 2014 16:43:53 +0200 Subject: [PATCH 05/12] ARM: at91/dt: add alternative pin muxing for sama5d3 lcd pins Define alternative pin muxing for the LCDC pins. Signed-off-by: Boris Brezillon Tested-by: Anthony Harivel Signed-off-by: Nicolas Ferre --- arch/arm/boot/dts/sama5d3_lcd.dtsi | 50 ++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi b/arch/arm/boot/dts/sama5d3_lcd.dtsi index 9006e21e7537..49038859d84f 100644 --- a/arch/arm/boot/dts/sama5d3_lcd.dtsi +++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi @@ -65,6 +65,28 @@ }; pinctrl_lcd_rgb666: lcd-rgb-2 { + atmel,pins = + ; /* LCDD17 pin */ + }; + + pinctrl_lcd_rgb666_alt: lcd-rgb-2-alt { atmel,pins = ; /* LCDD23 pin */ + }; + + pinctrl_lcd_rgb888_alt: lcd-rgb-3-alt { atmel,pins = Date: Mon, 7 Jul 2014 18:32:24 +0200 Subject: [PATCH 06/12] 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 Signed-off-by: Nicolas Ferre --- 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 49038859d84f..be7cfefc6c31 100644 --- a/arch/arm/boot/dts/sama5d3_lcd.dtsi +++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi @@ -13,6 +13,34 @@ / { ahb { apb { + 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>; + }; + }; + pinctrl@fffff200 { lcd { pinctrl_lcd_base: lcd-base-0 { From f1ea096c78db038e947b6a5393467d4f065e1669 Mon Sep 17 00:00:00 2001 From: Nicolas Ferre Date: Wed, 27 Nov 2013 15:30:05 +0100 Subject: [PATCH 07/12] ARM: at91/dt: sama5d3: add uart0 Signed-off-by: Nicolas Ferre Signed-off-by: Ludovic Desroches --- arch/arm/boot/dts/sama5d3.dtsi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi index e30fee2edd55..1477e97df8f0 100644 --- a/arch/arm/boot/dts/sama5d3.dtsi +++ b/arch/arm/boot/dts/sama5d3.dtsi @@ -26,6 +26,7 @@ serial2 = &usart1; serial3 = &usart2; serial4 = &usart3; + serial5 = &uart0; gpio0 = &pioA; gpio1 = &pioB; gpio2 = &pioC; @@ -206,6 +207,17 @@ status = "disabled"; }; + uart0: serial@f0024000 { + compatible = "atmel,at91sam9260-usart"; + reg = <0xf0024000 0x100>; + interrupts = <16 IRQ_TYPE_LEVEL_HIGH 5>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart0>; + clocks = <&uart0_clk>; + clock-names = "usart"; + status = "disabled"; + }; + pwm0: pwm@f002c000 { compatible = "atmel,sama5d3-pwm"; reg = <0xf002c000 0x300>; @@ -764,6 +776,14 @@ }; }; + uart0 { + pinctrl_uart0: uart0-0 { + atmel,pins = + ; /* conflicts with ISI_PCK */ + }; + }; + usart0 { pinctrl_usart0: usart0-0 { atmel,pins = @@ -1098,6 +1118,12 @@ atmel,clk-output-range = <0 66000000>; }; + uart0_clk: uart0_clk { + #clock-cells = <0>; + reg = <16>; + atmel,clk-output-range = <0 66000000>; + }; + twi0_clk: twi0_clk { reg = <18>; #clock-cells = <0>; From 3c309ab8fa896ba74959c8a0523aee6c25b3b80f Mon Sep 17 00:00:00 2001 From: Nicolas Ferre Date: Wed, 11 Feb 2015 17:49:02 +0100 Subject: [PATCH 08/12] ARM: at91/dt: sama5d3: add uart1 pinctrl definition Signed-off-by: Nicolas Ferre --- arch/arm/boot/dts/sama5d3.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/sama5d3.dtsi b/arch/arm/boot/dts/sama5d3.dtsi index 1477e97df8f0..7de02f104004 100644 --- a/arch/arm/boot/dts/sama5d3.dtsi +++ b/arch/arm/boot/dts/sama5d3.dtsi @@ -784,6 +784,14 @@ }; }; + uart1 { + pinctrl_uart1: uart1-0 { + atmel,pins = + ; /* conflicts with TWCK0, ISI_HSYNC */ + }; + }; + usart0 { pinctrl_usart0: usart0-0 { atmel,pins = From c5900a9edf3e21595a012116ab738d4758ce9912 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Fri, 1 Aug 2014 09:42:18 +0200 Subject: [PATCH 09/12] ARM: at91/dt: sama5d4: add lcdc pin definitions Add LCDC pin definitions. Signed-off-by: Boris Brezillon Signed-off-by: Nicolas Ferre --- arch/arm/boot/dts/sama5d4.dtsi | 95 ++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi index 63eb7a2c08f7..3d91ca33313e 100644 --- a/arch/arm/boot/dts/sama5d4.dtsi +++ b/arch/arm/boot/dts/sama5d4.dtsi @@ -1358,6 +1358,101 @@ }; }; + lcd { + pinctrl_lcd_base: lcd-base-0 { + atmel,pins = + ; /* LCDPCK */ + }; + pinctrl_lcd_pwm: lcd-pwm-0 { + atmel,pins = ; /* LCDPWM */ + }; + 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 */ + }; + }; + macb0 { pinctrl_macb0_rmii: macb0_rmii-0 { atmel,pins = From 7e60dd30656771ed7f33aae796f791586a1fb356 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Fri, 1 Aug 2014 09:43:11 +0200 Subject: [PATCH 10/12] ARM: at91/dt: sama5d4: add hlcdc node Add HLCDC node. Signed-off-by: Boris Brezillon Signed-off-by: Nicolas Ferre --- 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 3d91ca33313e..f525e7b1be4f 100644 --- a/arch/arm/boot/dts/sama5d4.dtsi +++ b/arch/arm/boot/dts/sama5d4.dtsi @@ -314,6 +314,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 e9b93cf5d1dd8c37a82007fca6e54bff83eb503c Mon Sep 17 00:00:00 2001 From: Nicolas Ferre Date: Fri, 20 Feb 2015 15:07:18 +0100 Subject: [PATCH 11/12] ARM: at91/dt: sama5d4: fix LCD pins for RGB666 format The color arrangement for SAMA5D4 in RGB 666 takes the most significant bits of each color line groups. Signed-off-by: Nicolas Ferre --- arch/arm/boot/dts/sama5d4.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi index f525e7b1be4f..7847e9a04025 100644 --- a/arch/arm/boot/dts/sama5d4.dtsi +++ b/arch/arm/boot/dts/sama5d4.dtsi @@ -1433,24 +1433,24 @@ }; pinctrl_lcd_rgb666: lcd-rgb-2 { atmel,pins = - ; /* LCDD17 pin */ + AT91_PIOA 18 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD18 pin */ + AT91_PIOA 19 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD19 pin */ + AT91_PIOA 20 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD20 pin */ + AT91_PIOA 21 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD21 pin */ + AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD22 pin */ + AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */ }; pinctrl_lcd_rgb888: lcd-rgb-3 { atmel,pins = From 3c42ae3645a7fd2605453de9947629fb7b26c95f Mon Sep 17 00:00:00 2001 From: Nicolas Ferre Date: Wed, 25 Feb 2015 19:04:05 +0100 Subject: [PATCH 12/12] ARM: at91/dt: sama5d4: add rgb777 LCD line configuration For the SAMA5D4 SoC, some LCD lines are in conflict with useful peripherals. Remove these lines and the lowest significant bit of a 24 bit LCD. It gives us a RGB 777 configuration. Signed-off-by: Nicolas Ferre --- arch/arm/boot/dts/sama5d4.dtsi | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sama5d4.dtsi b/arch/arm/boot/dts/sama5d4.dtsi index 7847e9a04025..5cccbc98b267 100644 --- a/arch/arm/boot/dts/sama5d4.dtsi +++ b/arch/arm/boot/dts/sama5d4.dtsi @@ -1452,7 +1452,34 @@ AT91_PIOA 22 AT91_PERIPH_A AT91_PINCTRL_NONE /* LCDD22 pin */ AT91_PIOA 23 AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */ }; - pinctrl_lcd_rgb888: lcd-rgb-3 { + pinctrl_lcd_rgb777: lcd-rgb-3 { + atmel,pins = + /* LCDDAT0 conflicts with TMS */ + ; /* LCDD23 pin */ + }; + pinctrl_lcd_rgb888: lcd-rgb-4 { atmel,pins =