1. 22 Mar, 2020 1 commit
    • Pritesh Raithatha's avatar
      Tegra: memctrl: cleanup streamid override registers · 36e26375
      Pritesh Raithatha authored
      
      
      Streamid override registers are passed to memctrl to program bypass
      streamid for all the registers. There is no reason to bypass SMMU
      for any of the client so need to remove register list and do not
      set streamid_override_cfg.
      
      Some Tegra186 platforms don't boot due to SDMMC failure so keep SDMMC
      bypass as of now. Will revisit once these issues are fixed.
      
      Change-Id: I3f67e2a0e1b53160e2218f3acace7da45532f934
      Signed-off-by: default avatarPritesh Raithatha <praithatha@nvidia.com>
      36e26375
  2. 11 Mar, 2020 2 commits
    • Pritesh Raithatha's avatar
      Tegra: smmu: remove context save sequence · a391d494
      Pritesh Raithatha authored
      
      
      SMMU and MC registers are saved as part of the System Suspend sequence.
      The register list includes some NS world SMMU registers that need to be
      saved by NS world software instead. All that remains as a result are
      the MC registers.
      
      This patch moves code to MC file as a result and renames all the
      variables and defines to use the MC prefix instead of SMMU. The
      Tegra186 and Tegra194 platform ports are updated to provide the MC
      context register list to the parent driver. The memory required for
      context save is reduced due to removal of the SMMU registers.
      
      Change-Id: I83a05079039f52f9ce91c938ada6cd6dfd9c843f
      Signed-off-by: default avatarPritesh Raithatha <praithatha@nvidia.com>
      a391d494
    • Pritesh Raithatha's avatar
      Tegra194: memctrl: lock some more MC SID security configs · de3fd9b3
      Pritesh Raithatha authored
      
      
      The platform code already contains the initial set of MC SID
      security configs to be locked during boot. This patch adds some
      more configs to the list. Since the reset value of these registers
      is already as per expectations, there is no need to change it.
      
      MC SID security configs
      - PTCR,
      - MIU6R, MIU6W, MIU7R, MIU7W,
      - MPCORER, MPCOREW,
      - NVDEC1SRD, NVDEC1SRD1, NVDEC1SWR.
      
      Change-Id: Ia9a1f6a6b6d34fb2787298651f7a4792a40b88ab
      Signed-off-by: default avatarPritesh Raithatha <praithatha@nvidia.com>
      de3fd9b3
  3. 09 Mar, 2020 2 commits
    • Pravin's avatar
      Tegra194: memctrl: add support for MIU4 and MIU5 · a69a30ff
      Pravin authored
      
      
      This patch adds support for memqual miu 4,5.
      
      The MEMQUAL engine has miu0 to miu7 in which miu6 and
      miu7 is hardwired to bypass SMMU. So only miu0 to miu5
      support is provided.
      
      Change-Id: Ib350334eec521e65f395f1c3205e2cdaf464ebea
      Signed-off-by: default avatarPravin <pt@nvidia.com>
      a69a30ff
    • Stefan Kristiansson's avatar
      Tegra194: memctrl: remove support to reconfigure MSS · 4b74f6d2
      Stefan Kristiansson authored
      
      
      As bpmp-fw is running at the same time as ATF, and
      the mss client reconfiguration sequence involves performing
      a hot flush resets on bpmp, there is a chance that bpmp-fw is
      trying to perform accesses while the hot flush is active.
      
      Therefore, the mss client reconfigure has been moved to
      System Suspend resume fw and bootloader, and it can be
      removed from here.
      
      Change-Id: I34019ad12abea9681f5e180af6bc86f2c4c6fc74
      Signed-off-by: default avatarStefan Kristiansson <stefank@nvidia.com>
      4b74f6d2
  4. 20 Feb, 2020 1 commit
    • Pritesh Raithatha's avatar
      Tegra194: memctrl: lock mc stream id security config · 56e7d6a7
      Pritesh Raithatha authored
      
      
      This patch locks most of the stream id security config registers as
      per HW guidance.
      
      This patch keeps the stream id configs unlocked for the following
      clients, to allow some platforms to still function, until they make
      the transition to the latest guidance.
      
      - ISPRA
      - ISPFALR
      - ISPFALW
      - ISPWA
      - ISPWA1
      - ISPWB
      - XUSB_DEVR
      - XUSB_DEVW
      - XUSB_HOSTR
      - XUSB_HOSTW
      - VIW
      - VIFALR
      - VIFALW
      
      Change-Id: I66192b228a0a237035938f498babc0325764d5df
      Signed-off-by: default avatarPritesh Raithatha <praithatha@nvidia.com>
      56e7d6a7
  5. 23 Jan, 2020 7 commits
  6. 17 Jan, 2020 3 commits
  7. 28 Nov, 2019 8 commits
    • Steven Kao's avatar
      Tegra194: memctrl: fix logic to check TZDRAM config register access · 95397d96
      Steven Kao authored
      
      
      This patch fixes the logic to check if the previous bootloader has
      disabled access to the TZDRAM configuration registers. The polarity
      for the bit was incorrect in the previous check.
      
      Change-Id: I7a0ba4f7b1714997508ece904c0261ca2c901a03
      Signed-off-by: default avatarSteven Kao <skao@nvidia.com>
      95397d96
    • Steven Kao's avatar
      Tegra194: memctrl: platform handler for TZDRAM setup · 4e697b77
      Steven Kao authored
      
      
      This patch provides the platform with flexibility to perform custom
      steps during TZDRAM setup. Tegra194 platforms checks if the config
      registers are locked and TZDRAM setup has already been done by the
      previous bootloaders, before setting up the fence.
      
      Change-Id: Ifee7077d4b46a7031c4568934c63e361c53a12e3
      Signed-off-by: default avatarSteven Kao <skao@nvidia.com>
      4e697b77
    • Puneet Saxena's avatar
      Tegra194: memctrl: override SE client as coherent · 5ad50d7d
      Puneet Saxena authored
      
      
      This patch enables IO coherency for SE clients, SEWR and SERD,
      by overriding their platform settings to "normal_coherent".
      This setting also converts read/write requests from these SE
      clients to Normal type.
      
      Change-Id: I31ad195ad30ecc9ee785e5e84184cda2eea5c45a
      Signed-off-by: default avatarPuneet Saxena <puneets@nvidia.com>
      Signed-off-by: default avatarShravani Dingari <shravanid@nvidia.com>
      Signed-off-by: default avatarJeff Tsai <jefft@nvidia.com>
      5ad50d7d
    • Steven Kao's avatar
      Tegra194: rename secure scratch register macros · 192fd367
      Steven Kao authored
      
      
      This patch renames all the secure scratch registers to reflect
      their usage.
      
      This is a list of all the macros being renamed:
      
      - SECURE_SCRATCH_RSV44_* -> SCRATCH_BOOT_PARAMS_ADDR_*
      - SECURE_SCRATCH_RSV97 -> SCRATCH_SECURE_BOOTP_FCFG
      - SECURE_SCRATCH_RSV99_* -> SCRATCH_SMMU_TABLE_ADDR_*
      - SECURE_SCRATCH_RSV109_* -> SCRATCH_RESET_VECTOR_*
      
      Change-Id: I838ece3da39bc4be8f349782e99bac777755fa39
      Signed-off-by: default avatarSteven Kao <skao@nvidia.com>
      192fd367
    • Anthony Zhou's avatar
      Tegra194: fix defects flagged by MISRA scan · b6533b56
      Anthony Zhou authored
      
      
      Main fixes:
      
      Fix invalid use of function pointer [Rule 1.3]
      
      Added explicit casts (e.g. 0U) to integers in order for them to be
      compatible with whatever operation they're used in [Rule 10.1]
      
      convert object type to match the type of function parameters
      [Rule 10.3]
      
      Force operands of an operator to the same type category [Rule 10.4]
      
      Fix implicit widening of composite assignment [Rule 10.6]
      
      Fixed if statement conditional to be essentially boolean [Rule 14.4]
      
      Added curly braces ({}) around if statements in order to
      make them compound [Rule 15.6]
      
      Voided non c-library functions whose return types are not used
      [Rule 17.7]
      
      Change-Id: I65a2b33e59aebb7746bd31544c79d57c3d5678c5
      Signed-off-by: default avatarAnthony Zhou <anzhou@nvidia.com>
      b6533b56
    • Varun Wadekar's avatar
      Tegra194: memctrl: platform handlers to reprogram MSS · f32e8525
      Varun Wadekar authored
      
      
      Introduce platform handlers to reprogram the MSS settings.
      
      Change-Id: Ibb9a5457d1bad9ecccea619d69a62bed3bf7d861
      Signed-off-by: default avatarPuneet Saxena <puneets@nvidia.com>
      Signed-off-by: default avatarKrishna Reddy <vdumpa@nvidia.com>
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      f32e8525
    • Ajay Gupta's avatar
      Tegra194: program stream ids for XUSB · bc019041
      Ajay Gupta authored
      
      
      T194 XUSB has support for XUSB virtualization. It will have one
      physical function (PF) and four Virtual function (VF)
      
      There were below two SIDs for XUSB until T186.
      1) #define TEGRA_SID_XUSB_HOST    0x1bU
      2) #define TEGRA_SID_XUSB_DEV    0x1cU
      
      We have below four new SIDs added for VF(s)
      3) #define TEGRA_SID_XUSB_VF0    0x5dU
      4) #define TEGRA_SID_XUSB_VF1    0x5eU
      5) #define TEGRA_SID_XUSB_VF2    0x5fU
      6) #define TEGRA_SID_XUSB_VF3    0x60U
      
      When virtualization is enabled then we have to disable SID override
      and program above SIDs in below newly added SID registers in XUSB
      PADCTL MMIO space. These registers are TZ protected and so need to
      be done in ATF.
      a) #define XUSB_PADCTL_HOST_AXI_STREAMID_PF_0 (0x136cU)
      b) #define XUSB_PADCTL_DEV_AXI_STREAMID_PF_0  (0x139cU)
      c) #define XUSB_PADCTL_HOST_AXI_STREAMID_VF_0 (0x1370U)
      d) #define XUSB_PADCTL_HOST_AXI_STREAMID_VF_1 (0x1374U)
      e) #define XUSB_PADCTL_HOST_AXI_STREAMID_VF_2 (0x1378U)
      f) #define XUSB_PADCTL_HOST_AXI_STREAMID_VF_3 (0x137cU)
      
      This change disables SID override and programs XUSB SIDs in
      above registers to support both virtualization and non-virtualization.
      
      Change-Id: I38213a72999e933c44c5392441f91034d3b47a39
      Signed-off-by: default avatarAjay Gupta <ajayg@nvidia.com>
      bc019041
    • Varun Wadekar's avatar
      Tegra194: platform support for memctrl/smmu drivers · 719fdb6e
      Varun Wadekar authored
      
      
      This patch adds platform support for the Memory Controller and
      SMMU drivers, for the Tegra194 SoC.
      
      Change-Id: Id8b482de70f1f93bedbca8d124575c39b469927f
      Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
      719fdb6e
  8. 24 Oct, 2019 2 commits