[U-Boot] [PATCH v5 0/16] tegra: Add display driver and LCD support for Seaboard

Simon Glass sjg at chromium.org
Mon Oct 8 23:42:20 CEST 2012


This series adds support for the Tegra2x's display peripheral. This
supports the LCD display on Seaboard and we use this to enable console
output in U-Boot on the LCD.

Configuration is via the device tree. Proposed bindings are included
in this series, taken from pwm bindings that should be in linux-next,
a Tegra video binding that might be accepted in devicetree-discuss
and a proposed video mode binding posted to dri-devel.

While I agree EDID is convenient for machines I would prefer to provide
a user-friendly way of selecting LCD settings as well, with EDID more
as a fallback and auto-detection when available.

To improve performance two optimisations are offered:

1. The LCD frame buffer is cached, with the cache being flushed after
each newline sent to putc(), and in a few other situations. This
dramatically increases performance (around 10x). This requires a few
additions to the ARM cache support.

2. The console supports scrolling in steps of more than 1 line. This
speeds up scrolling output considerably, particularly commands like
'printenv' which display a lot of output, and particular when the
dcache is off. This requires a new CONFIG and a change to the
console_scrollup() function.

As reported by Stephen Warren: there is one problem with this serial.
The display works fine for cold boot, or hitting the physical reset
button, but when I execute "reset" at the U-Boot prompt, or "reboot"
within Linux, the display is messed up; it looks like the LCD isn't able
to sync to the timings sent by the display controller or something similar.

Changes in v5:
- Update Tegra PWM binding s/duty cycle/period/
- Make all Tegra LCD fdt nodes disabled by default
- Enable required LCD fdt nodes (which are now disabled by default)
- Fix CONFIG_CONSOLE_SCROLL_LINES commit title
- Fix misleading comments in common/lcd.c

Changes in v4:
- Moved panel information into panel node (was in rgb node)
- Remove LCD frame buffer address property hack
- Add CONFIG_PWM_TEGRA to control inclusion of PWM support
- Add a little more debugging to the PWM driver
- Move code to set up PWM into the PWM commit
- Rebase on top of new tegra common directory structure
- Adjust fdt binding according to Thierry and Stephen's comments
- Remove LCD frame buffer address property hack
- Rebase on top of new tegra common directory structure
- Change LCD panel GPIOs to be entirely optional
- Only indicate that LCD init is complete when all stages complete
- Change order of LCD init so that PWM comes first
- Use system bit values for enum dcache_option instead of arbitrary numbers
- Remove system.h header which is included anyway by most archs
- Use lcd_puts() for echoing user input so lcd cached data is flushed
- Adjust LCD fdt nodes for new binding
- Remove LCD frame buffer address property hack
- Use CONFIG_CONSOLE_SCROLL_LINES instead of CONSOLE_SCROLL_LINES
- Put default CONFIG_CONSOLE_SCROLL_LINES at top of file
- Add CONFIG_BOARD_LATE_INIT to enable LCD
- Use CONFIG_CONSOLE_SCROLL_LINES instead of CONSOLE_SCROLL_LINES
- Enable separate CONFIG_PWM_TEGRA option

Changes in v3:
- Remove LPW1 pin which is not needed by display
- Add new commit for pwm binding and node
- Use displaymode binding for fdt
- Bring in proposed tegra display controller binding
- Add new panel binding to fit with tegra display controller binding
- Rename pwfm driver to pwm
- Use new proposed upstream pwm binding
- Decode fdt node within the pwm driver
- Introduce concept of a pwm channel, rather than separate peripherals
- Separate display driver and LCD driver more in fdt
- Add probe function to read in fdt parameters in display driver
- Move some fdt decode code from LCD driver to SOC display driver
- Rename fdt config structures
- Use new pwm binding from pre-linux-next
- Adjust LCD driver to use new SOC display driver structures
- Add separate call to pwm_init() in board_init()
- Put the LCD cache flush logic back into lcd_puts()
- Handle a cached frame buffer out of normal U-Boot memory
- Use new upstream proposed LCD definitions
- Fix tiny bug in mult-line lcd scrolling

Changes in v2:
- Add new patch to use const in pinmux_config_pingroup/table()
- Use const where possible in funcmux
- Add nvidia prefix to device tree properties
- Update LCD driver to deal with new fdt bindings
- Use a more generic config CONFIG_LCD_ALIGNMENT for lcd alignment
- Put the LCD cache flush logic into lcd_putc() instead of lcd_puts()
- Align tegra display using new CONFIG_LCD_ALIGNMENT feature
- Update seaboard LCD definitions for new fdt binding

Mayuresh Kulkarni (1):
  tegra: Enable display/lcd support on Seaboard

Simon Glass (14):
  tegra: Use const for pinmux_config_pingroup/table()
  tegra: Add display support to funcmux
  tegra: fdt: Add pwm binding and node
  tegra: fdt: Add LCD definitions for Tegra
  tegra: Add support for PWM
  tegra: Add LCD driver
  tegra: Add LCD support to Nvidia boards
  arm: Add control over cachability of memory regions
  lcd: Add CONFIG_LCD_ALIGNMENT to select frame buffer alignment
  lcd: Add support for flushing LCD fb from dcache after update
  tegra: Align LCD frame buffer to section boundary
  tegra: Support control of cache settings for LCD
  tegra: fdt: Add LCD definitions for Seaboard
  lcd: Add CONFIG_CONSOLE_SCROLL_LINES option to speed console

Wei Ni (1):
  tegra: Add SOC support for display/lcd

 README                                         |   16 +
 arch/arm/cpu/armv7/cache_v7.c                  |   11 +
 arch/arm/cpu/armv7/tegra20/Makefile            |    2 +
 arch/arm/cpu/armv7/tegra20/display.c           |  409 ++++++++++++++++++
 arch/arm/cpu/armv7/tegra20/pwm.c               |  101 +++++
 arch/arm/cpu/tegra20-common/funcmux.c          |   37 ++
 arch/arm/cpu/tegra20-common/pinmux.c           |    4 +-
 arch/arm/dts/tegra20.dtsi                      |  105 +++++
 arch/arm/include/asm/arch-tegra20/dc.h         |  545 ++++++++++++++++++++++++
 arch/arm/include/asm/arch-tegra20/display.h    |  152 +++++++
 arch/arm/include/asm/arch-tegra20/pinmux.h     |    4 +-
 arch/arm/include/asm/arch-tegra20/pwm.h        |   75 ++++
 arch/arm/include/asm/system.h                  |   30 ++
 arch/arm/lib/cache-cp15.c                      |   50 ++-
 board/nvidia/common/board.c                    |   26 ++-
 board/nvidia/dts/tegra20-seaboard.dts          |   33 ++
 common/lcd.c                                   |   89 ++++-
 common/main.c                                  |   12 +-
 doc/device-tree-bindings/pwm/tegra20-pwm.txt   |   18 +
 doc/device-tree-bindings/video/displaymode.txt |   42 ++
 doc/device-tree-bindings/video/tegra20-dc.txt  |   84 ++++
 drivers/video/Makefile                         |    1 +
 drivers/video/tegra.c                          |  372 ++++++++++++++++
 include/configs/seaboard.h                     |   13 +-
 include/configs/tegra20-common.h               |    3 +
 include/fdtdec.h                               |    2 +
 include/lcd.h                                  |   11 +
 lib/fdtdec.c                                   |    2 +
 28 files changed, 2212 insertions(+), 37 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/tegra20/display.c
 create mode 100644 arch/arm/cpu/armv7/tegra20/pwm.c
 create mode 100644 arch/arm/include/asm/arch-tegra20/dc.h
 create mode 100644 arch/arm/include/asm/arch-tegra20/display.h
 create mode 100644 arch/arm/include/asm/arch-tegra20/pwm.h
 create mode 100644 doc/device-tree-bindings/pwm/tegra20-pwm.txt
 create mode 100644 doc/device-tree-bindings/video/displaymode.txt
 create mode 100644 doc/device-tree-bindings/video/tegra20-dc.txt
 create mode 100644 drivers/video/tegra.c

-- 
1.7.7.3



More information about the U-Boot mailing list