1. 15 12月, 2015 30 次提交
  2. 14 12月, 2015 10 次提交
    • A
      drm/msm/dsi: Enable MMSS SPFB port via syscon · 0c7df47f
      Archit Taneja 提交于
      For DSIv2 to work, we need to enable MMSS_AHB_ARB_MASTER_PORT in
      MMSS_SFPB. We enable the required bitfield by retrieving MMSS_SFPB
      regmap pointer via syscon.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      0c7df47f
    • A
      drm/msm/dsi: Don't use iommu for command TX buffer for DSIv2 · 4ff9d4cb
      Archit Taneja 提交于
      We currently use iommu allocated DMA buffers for sending DSI commands.
      DSIv2 doesn't have a port connected to the MDP iommu. Therefore, it
      can't use iommu allocated buffers to fetch DSI commands.
      
      Use a regular contiguous DMA buffer if we are DSIv2.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      4ff9d4cb
    • A
      drm/msm/dsi: Add dsi_cfg for APQ8064 · cea65dbd
      Archit Taneja 提交于
      Add a dsi_cfg entry for APQ8064. Since this is the first DSIv2 chip to
      be supported, add a list of bus clocks that are required by the DSIv2
      block.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      cea65dbd
    • A
      drm/msm/dsi: Set up link clocks for DSIv2 · 4bfa9748
      Archit Taneja 提交于
      DSIv2 (DSI on older A family chips) has slightly different link clock
      requirements.
      
      First, we have an extra clock called src_clk (with a dedicated RCG).
      This is required by the DSI controller to process the pixel data
      coming from MDP. It needs to be set at the rate "pclk * bytes_per_pixel".
      
      We also need to explicitly configure esc_clk. On DSI6G chips, we don't
      need to set a rate to esc_clk because its RCG is always sourced from
      crystal clock (19.2 Mhz in all cases), which is within the escape clock
      frequency range in the mipi DSI spec. For chips with DSIv2, the crystal
      clock rate may not be within the required range (27Mhz on APQ8064).
      Therefore, we derive it from the DSI byte clock. We calculate an esc_clck
      rate that is within the mipi spec and also divisible by the byte clock
      rate.
      
      When setting rate and enabling the link clocks, we make sure that byte_clk
      is configured before esc_clk, and src_clk before pixel_clk. We create two
      different link_enable funcs for DSI6G and DSIv2 since the sequences are
      different.
      
      We also obtain two extra source clocks (dsi_src_clk and esc_src_clk) and
      set their parent to the clocks provided by DSI PLL.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      4bfa9748
    • A
      drm/msm/dsi: Parse bus clocks from a list · 6e0eb52e
      Archit Taneja 提交于
      DSI bus clocks seem to vary between different DSI host versions, and the
      SOC to which they belong. Even the enable/disable sequence varies.
      
      Provide a list of bus clock names in dsi_cfg. The driver will use this to
      retrieve the clocks, and enable/disable them.
      
      Add bus clock lists for DSI6G, and DSI for MSM8916(this is DSI6G too, but
      there is no MMSS_CC specific clock since there is no MMSS clock controller
      on 8916).
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      6e0eb52e
    • A
      drm/msm/dsi: Delay dsi_clk_init · 31c92767
      Archit Taneja 提交于
      Initialize clocks only after we get the DSI host version. This will allow
      us to get clocks using a pre-defined list based on the DSI major/minor
      version of the host. This is required since clock requirements of
      different major DSI revisions(v2 vs 6g) aren't the same.
      
      Modify dsi_get_version to get the interface clock, and then put it after
      it is used.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      31c92767
    • A
      drm/msm/dsi: Use a better way to figure out DSI version · 648d5063
      Archit Taneja 提交于
      The current version checking mechanism works fine for DSI6G blocks. It
      doesn't work so well for older generation DSIv2 blocks.
      
      The initial read of REG_DSI_6G_HW_VERSION(offset 0x0) would result in a
      read of REG_DSI_CTRL for DSIv2. This register won't necessarily be 0 on
      DSIv2. It can be non zero if DSI was previously initialized by the
      bootloader.
      
      Instead of reading offset 0x0, we now read offset 0x1f0. For DSIv2, this
      register is DSI_VERSION, and is bound to be non-zero. On DSI6G, this
      register(offset 0x1f0) is SCRATCH_REGISTER_0, which no one ever seems to
      touch, and from all register dumps I'vc seen, holds 0 all the time.
      
      Modify dsi_get_version to read REG_DSI_VERSION to determine whether we
      are DSI6G or DSIv2.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      648d5063
    • A
      drm/msm/dsi: Add DSI PLL for 28nm 8960 PHY · c6538de8
      Archit Taneja 提交于
      Add DSI PLL common clock framework clocks for 8960 PHY.
      
      The PLL here is different from the ones found in B family msm chips. As
      before, the DSI provides two clocks to the outside world. dsixpll and
      dsixpllbyte (x = 1, 2). dsixpll is a regular clock divider, but
      dsixpllbyte is modelled as a custom clock divider.
      
      dsixpllbyte is the starting point of the PLL configuration. It is the
      one that sets up the VCO clock rate. We need the VCO clock rate in the
      form: F * byteclk, where F is a multiplication factor that varies on
      the byte clock the DSI driver is trying to set. We use the custom
      clk_ops for dsixpllbyte to ensure that the parent (VCO) is set at this
      rate.
      
      An additional divider (POSTDIV1) generates the bitclk. Since bit clock
      can be derived from byteclock, we calculate it internally, and don't
      expose it as a clock.
      
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      c6538de8
    • A
      drm/msm/dsi: Add support for 28nm PHY on 8960 · 225380b3
      Archit Taneja 提交于
      DSI PHY on MSM8960 and APQ8064 is a 28nm PHY that's different from the
      supported 28nm LP PHY found in newer chips.
      
      Add support for the new PHY.
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      225380b3
    • A
      drm/msm/dsi: Don't get byte/pixel source clocks from DT · e6c4c78c
      Archit Taneja 提交于
      We retrieve the byte and pixel source clocks (RCG clocks) in the dsi
      driver via DT. These are needed so that we can re-parent these source
      clocks if we want to drive it using a different DSI PLL.
      
      We shouldn't get these via DT because they aren't clocks that directly
      serve as inputs to the dsi host.
      
      Fortunately, there is a static parent-child link between the
      byte_clk_src/pixel_clk_src and byte_clk/pixel_clk clocks. So, we can
      retrieve the source clocks via clk_get_parent.
      
      Do this instead of retrieving via DT.
      
      Cc: Rob Herring <robh@kernel.org>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      e6c4c78c