24 Feb, 2018

2 commits

  • This migrates rk_vop (the shared functions used by multiple VOP
    mini-drivers) to be compatible with a live tree.

    Unfortunately, there's
    (i) a lot of tree traversal needed for a VOP (as each active VOP
    vnode references back to the endpoints in the encoders and vice
    versa) to configure the connection between VOPs and encoders;
    (ii) the DTS binding is not too sane and one needs to walk a node's
    parents (the original code just assumed that the device would
    live 3 levels above the property linked through a phandle) until
    a UCLASS_DISPLAY device can be found.

    As part of the migration, the code for finding the enclosing display
    device has been changed to not assume a specific depth of nesting
    (i.e. we walk until we reach the root or find a matching device) and
    to use the newly introduced (in the same series) ofnode_get_parent()
    function.

    Signed-off-by: Philipp Tomsich
    Tested-by: Klaus Goger
    Reviewed-by: Anatolij Gustschin

    Philipp Tomsich
     
  • The rk_hdmi (shared functions for multiple HDMI mini-drivers) has been
    using devfdt_get_addr() to read the HDMI controller's IO base address.
    This will cause a failure with a live tree.

    This changes the driver to use dev_read_addr() which is safe both for
    flat trees and live trees.

    Signed-off-by: Philipp Tomsich
    Tested-by: Klaus Goger
    Reviewed-by: Anatolij Gustschin

    Philipp Tomsich
     

08 Aug, 2017

4 commits


11 Jul, 2017

2 commits


11 Jun, 2017

1 commit


10 Jun, 2017

2 commits

  • On reset the standby bit is clear, but if U-Boot is chain-loaded from
    another boot loader it may be set. Clear it before starting up video so
    that it works correctly.

    Signed-off-by: Simon Glass
    Acked-by: Anatolij Gustschin
    Squashed in 'rockchip: video: fix taking the VOP device out of standby':
    Signed-off-by: Philipp Tomsich

    Simon Glass
     
  • Add remove() methods for EDP and VOP so that U-Boot can shut down the
    video on exit. This avoids leaving DMA running while booting Linux which
    can cause problems if Linux uses the frame buffer for something else.

    It also makes it clear what is needed to shut down video.

    While we are here, make rkvop_enable() static.

    Signed-off-by: Simon Glass
    Acked-by: Anatolij Gustschin
    Squashed in 'rockchip: video: fix taking the VOP device out of standby':
    Signed-off-by: Philipp Tomsich

    Simon Glass
     

09 Jun, 2017

2 commits


08 Jun, 2017

9 commits

  • The last set of rebases had dropped the 'grf' field from the common
    rk_vop. Add this back to un-break the build (and driver).

    Signed-off-by: Philipp Tomsich

    Philipp Tomsich
     
  • This commit enables the RK3399 HDMI TX, which is very similar to the
    one found on the RK3288. As requested by Simon, this splits the HDMI
    driver into a SOC-specific portion (rk3399_hdmi.c, rk3288_hdmi.c) and
    a common portion (rk_hdmi.c).

    Note that the I2C communication for reading the EDID works well with
    the default settings, but does not with the alternate settings used on
    the RK3288... this configuration aspect is reflected by the driverdata
    for the RK3399 driver.

    Having some sort of DTS-based configuration for the regulator
    dependencies would be nice for the future, but for now we simply use
    lists of regulator names (also via driverdata) that we probe.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • To prepare for the addition of RK3399 HDMI support, the HDMI driver is
    refactored and broken into a chip-specific and a generic part. This
    change adds the internal interfaces, makes common/reusable functions
    externally visible and splits the RK3288 driver into a separate file.

    For the probing of regulators, we reuse the infrastructure created
    during the VOP refactoring... i.e. we simply call into the helper
    function defined for the VOP.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • The Linux driver now supports higher mpixelclock settings.
    Add these to rockchip_phy_config[] and rockchip_mpll_cfg[].

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • This commit adds a driver for the RK3399 VOPs capable and all the
    necessary plumbing to feed the HDMI encoder. For the VOP-big, this
    correctly tracks the ability to feed 10bit RGB data to the encoder.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • To prepare for adding the RK3399 VOP driver (which shares most of its
    registers and config logic with the RK3228 VOP), this change refactors
    the driver and splits the RK3288-specific driver off.

    The changes in detail are:
    - introduces a data-structure for chip-specific drivers to register
    features/callbacks with the common driver: at this time, this is
    limited to a callback for setting the pin polarities (between the
    VOP and the encoder modules) and a flag to signal 10bit RGB
    capability
    - refactors the probing of regulators into a helper function that
    can take a list of regulator names to probe and autoset
    - moves the priv data-structure into a (common) header file to be
    used by the chip-specific drivers to provide base addresses to
    the common driver
    - uses a callback into the chip-specific driver to set pin polarities
    (replacing the direct register accesses previously used)
    - splits enabling the output (towards an encoder) into a separate
    help function withint the common driver

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • This introduces two new Kconfig options that configure the maximum
    allowable framebuffer size (i.e. the memory reservation/allocation for
    the framebuffer):
    - VIDEO_ROCKCHIP_MAX_XRES
    - VIDEO_ROCKCHIP_MAX_YRES
    The resulting memory allocation will cover 4 byte per pixel for these
    resolutions.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • For consistency sake (and as we are about to add new options to this
    file), reformat the help for VIDEO_ROCKCHIP.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     
  • When enabling CONFIG_DISPLAY_ROCKCHIP_HDMI, compile-time warning for
    the following implicitly defined functions are raised due to a missing
    include directive:

    drivers/video/rockchip/rk_hdmi.c: In function 'rk_hdmi_probe':
    drivers/video/rockchip/rk_hdmi.c:150:2: warning: implicit declaration of function 'rk_setreg' [-Wimplicit-function-declaration]
    rk_setreg(&priv->grf->soc_con6, 1 << 15);
    ^~~~~~~~~
    drivers/video/rockchip/rk_hdmi.c:153:2: warning: implicit declaration of function 'rk_clrsetreg' [-Wimplicit-function-declaration]
    rk_clrsetreg(&priv->grf->soc_con6, 1 << 4,
    ^~~~~~~~~~~~

    This change fixes this by including in rk_hdmi.c.

    Signed-off-by: Philipp Tomsich
    Acked-by: Simon Glass

    Philipp Tomsich
     

01 Jun, 2017

1 commit

  • These support the flat device tree. We want to use the dev_read_..()
    prefix for functions that support both flat tree and live tree. So rename
    the existing functions to avoid confusion.

    In the end we will have:

    1. dev_read_addr...() - works on devices, supports flat/live tree
    2. devfdt_get_addr...() - current functions, flat tree only
    3. of_get_address() etc. - new functions, live tree only

    All drivers will be written to use 1. That function will in turn call
    either 2 or 3 depending on whether the flat or live tree is in use.

    Note this involves changing some dead code - the imx_lpi2c.c file.

    Signed-off-by: Simon Glass

    Simon Glass
     

16 May, 2017

1 commit

  • Instead of having drivers/video/rockchip/Kconfig point outside of its
    hierarchy for dw_hdmi.o, we should use a configuration-option to
    include the Designware HDMI support.

    This change introduces a new config option (not to be selected via
    menuconfig, but to be selected from a dependent video driver's
    configuration option) that enables dw_hdmi.o and selects it whenever
    the HDMI support for Rockchip SoCs is selected.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass

    Philipp Tomsich
     

11 May, 2017

7 commits


05 Apr, 2017

1 commit

  • Designware HDMI controller and phy are used in other SoCs as well. Split
    out platform independent code.

    DW HDMI has 8 bit registers but they can be represented as 32 bit
    registers as well. Add support to select access mode.

    EDID reading code use reading by blocks which is not supported by other
    SoCs in general. Make it more general using byte by byte approach, which
    is also used in Linux driver.

    Finally, not all DW HDMI controllers are accompanied with DW HDMI phy.
    Support custom phys by making controller code independent from phy code.

    Signed-off-by: Jernej Skrabec
    Tested-by: Nickey Yang
    Reviewed-by: Simon Glass

    Jernej Skrabec
     

17 Mar, 2017

2 commits


27 Feb, 2017

1 commit


08 Feb, 2017

1 commit

  • At present devices use a simple integer offset to record the device tree
    node associated with the device. In preparation for supporting a live
    device tree, which uses a node pointer instead, refactor existing code to
    access this field through an inline function.

    Signed-off-by: Simon Glass

    Simon Glass
     

12 Jan, 2017

1 commit


26 Nov, 2016

3 commits