On Thu, Aug 25, 2016 at 7:03 AM, Jyri Sarha <jsarha@xxxxxx> wrote: > Add "blue-and-red-crossed"-device tree property and update devicetree > binding document. The red and blue components are reversed between 24 > and 16 bit modes on am335x LCDC output pins. To get 24 RGB format the > red and blue wires has to be crossed and this in turn causes 16 colors > output to be in BGR format. With straight wiring the 16 color is RGB > and 24 bit is BGR. The new property describes whether the red and blue > wires are crossed or not. If the wires are crossed this boolean property > should be present in the relevant devicetree node. > > The am335x-evm and am335x-evm have the blue and red wires crossed for > 24 bit RGB mode and after this patch their LCDC nodes should have this > property to get correct colors in the display. > > For more details see section 3.1.1 in AM335x Silicon Errata: > http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360 > > Signed-off-by: Jyri Sarha <jsarha@xxxxxx> > --- > .../devicetree/bindings/display/tilcdc/tilcdc.txt | 12 +++++++++++ > drivers/gpu/drm/tilcdc/tilcdc_drv.c | 24 ++++++++++++++++++++++ > drivers/gpu/drm/tilcdc/tilcdc_drv.h | 4 ++++ > drivers/gpu/drm/tilcdc/tilcdc_plane.c | 9 +++----- > 4 files changed, 43 insertions(+), 6 deletions(-) > > diff --git a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt > index 6efa4c5..48a660a 100644 > --- a/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt > +++ b/Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt > @@ -17,6 +17,8 @@ Optional properties: > the lcd controller. > - max-pixelclock: The maximum pixel clock that can be supported > by the lcd controller in KHz. > + - blue-and-red-crossed: Boolean property, set this of blue and red wires > + for LCD_DATA are crossed for 24-bit RGB support (and 16-bit BGR mode). [1] Doesn't this need to be blue-and-red-straight for compatibility? > > Optional nodes: > > @@ -28,6 +30,14 @@ Optional nodes: > Documentation/devicetree/bindings/display/tilcdc/tfp410.txt for connecting > tfp410 DVI encoder or lcd panel to lcdc > > +[1] There is an errata about AM335x color wiring. For 16-bit color mode > + the wires work as they should (LCD_DATA[0:4] is for Blue[3:7]), > + but for 24 bit color modes the wiring of blue and red components is > + crossed and LCD_DATA[0:4] is for Red[3:7] and LCD_DATA[11:15] is > + for Blue[3-7]. For more details see section 3.1.1 in AM335x > + Silicon Errata: > + http://www.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprz360 > + > Example: > > fb: fb@4830e000 { > @@ -37,6 +47,8 @@ Example: > interrupts = <36>; > ti,hwmods = "lcdc"; > > + blue-and-red-wiring = "crossed"; > + This needs to be updated. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html