1. 28 May, 2020 13 commits
    • Arnd Bergmann's avatar
      Merge branch 'baikal/drivers' into arm/drivers · 0d583273
      Arnd Bergmann authored
      [arnd: This is a patch series from Serge Semin to add a few drivers
       that don't have any other subsystem maintainer tree to go through,
       so I'm picking them up through the soc tree, full series description
       from the mailing list below]
      
      Baikal-T1 SoC CPU is based on two MIPS Warrior P5600 cores. Their main
      memory Non-Coherent IO interface is connected to the OCP2AXI bridge,
      which in turn is then connected to the DW AMBA 3 AXI Interconnect (so
      called Main Interconnect) with nine masters and four slaves ports. Main
      Interconnect is responsible for the AXI-bus traffic arbitration (QoS)
      and its routing from one component to another. In addition there is
      a Errors Handler Block (EHB) accesible by means of the Baikal-T1 SoC
      System Controller responsible to detect AXI protocol errors and device
      not responding situations built on top the interconnect. Baikal-T1 AXI-bus
      driver included in this patchset will be responsible for working with that
      functionality, though currently it doesn't support QoS tuning. Instead
      it's capable of detecting the error events, reporting an info about
      them to the system log, injecting artificial errors to test the driver
      functionality. Since AXI Interconnect doesn't provide a way to find
      out which devices are connected to it, so its DT node is supposed to
      be compatible with "simple-bus" driver, while sub-nodes shall represent
      the masters attached to the bus.
      
      One of the AXI Interconnect slaves is an AXI-APB bridge used to access the
      Baikal-T1 SoC subsystems CSRs. MMIO request from CPU and DMAC masters are
      routed there if they are detected to be within [0x08000000 0x1FFFFFFF]
      range of the physical memory. In case if an attempted APB transaction
      stays with no response for a pre-defined time it will be detected by
      the APB-bus Errors Handler Block (EHB), which will raise an interrupt,
      then the bus gets freed for a next operation. The APB-bus driver provides
      the interrupt handler to detect the erroneous address, update an errors
      counter and prints an error message about the faulty address. The counter
      and the APB-bus operations timeout can be accessed via corresponding sysfs
      nodes. A dedicated sysfs-node can be also used to artificially cause the
      bus errors described above. Since APB-bus is a platform bus, it doesn't
      provide a way to detect slave devices connected to it, so similarly to
      the AXI-bus it's also supposed to be compatible with "simple-bus" driver.
      
      Aside from PCIe/SATA/DDR/I2C/EHB/CPU/reboot specific settings the
      Baikal-T1 System Controller provides a MIPS P5600 CM2 L2-cache tuning
      block. It is responsible for the setting up the Tag/Data/WS L2-to-RAM
      latencies. The last small patch in this patchset provides a driver and
      DT-schema-based binding for the described device. So that the latencies
      can be tuned up by means of dedicated DT properties and sysfs nodes.
      
      This patchset is rebased and tested on the mainline Linux kernel
      5.7-rc4.
      
      Changelog v2 (AXI/APB bus):
      - Assign dual GPL/BSD licenses to the bindings.
      - Use single lined copyright headers in the bindings.
      - Replace "additionalProperties: false" property with
        "unevaluatedProperties: false" in the bindings.
      - Don't use a multi-arg clock phandle reference in DT binding examples.
        Thus remove includes from there.
      - Fix some commit message and Kconfig help text spelling.
      - Move drivers from soc to the bus subsystem.
      - Convert a simple EHB drivers to the Baikal-T1 AXI and APB bus ones.
      - Convert APB bus driver to using regmap MMIO API.
      - Use syscon regmap to access the AXI-bus erroneous address.
      - Add reset line support.
      - Add Main Interconnect clock support to the AXI-bus driver.
      - Remove probe-status info string printout.
      - Discard of_match_ptr() macro utilization.
      - Don't print error-message if no platform IRQ found. Just return an
        error.
      - Use generic FIELD_{GET,PREP} macros instead of handwritten ones in the
        AXI-bus driver.
      
      Changelog v2 (l2 driver):
      - Fix some commit message and Kconfig help text spelling.
      - Move the driver to the memory subsystem.
      - Assign dual GPL/BSD license to the DT binding.
      - Use single lined copyright header in the binding.
      - Discard reg property and syscon compatible string.
      - Move "allOf" restrictions to the root level of the properties.
      - The DT node is supposed to be a child of the Baikal-T1 system
        controller node. So regmap will be fetched from there.
      - Use generic FIELD_{GET,PREP} macro.
      - Remove probe-status info string printout.
      - Since the driver depends on the OF config we can remove of_match_ptr()
        macro utilization.
      
      Changelog v3:
      - Combine l2 and AXI/APB bus patches in a single patchset.
      - Retrieve AXI-bus QoS registers by resource name "qos".
      - Discard CONFIG_OF dependency since there is none at compile-time.
      - Add syscon EHB registers range to the AXI-bus reg property as optional
        entry.
      - Fix invalid of_property_read_u32() return value test in the l2-ctl
        driver.
      - Get the reg property back into the l2-ctl DT bindings even though the
        driver is using the parental syscon regmap.
      - The l2-ctl DT schema will live separately from the system controller,
        but the corresponding sub-node of the later DT schema will $ref this
        one.
      - Set non-default latencies in the l2-ctl DT example.
      
      * baikal/drivers:
        memory: Add Baikal-T1 L2-cache Control Block driver
        bus: Add Baikal-T1 APB-bus driver
        bus: Add Baikal-T1 AXI-bus driver
        dt-bindings: bus: Add Baikal-T1 APB-bus binding
        dt-bindings: bus: Add Baikal-T1 AXI-bus binding
      
      Link: https://lore.kernel.org/lkml/20200526130841.ap6qlxv7hqmabnh5@mobilestation/Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      0d583273
    • Serge Semin's avatar
      memory: Add Baikal-T1 L2-cache Control Block driver · 83ca8b3e
      Serge Semin authored
      Baikal-T1 SoC provides a way to tune the MIPS P5600 CM2 L2-cache
      performance up. It can be done by changing the L2-RAM Data/Tag/WS
      latencies in a dedicated register exposed by the system controller.
      The driver added by this commit provides a dts properties-based and
      sysfs-based interface for it. The device DT node is supposed to be a
      child of Baikal-T1 System Controller node.
      
      Link: https://lore.kernel.org/r/20200526125928.17096-7-Sergey.Semin@baikalelectronics.ruSigned-off-by: default avatarSerge Semin <Sergey.Semin@baikalelectronics.ru>
      Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
      Cc: Paul Burton <paulburton@kernel.org>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: soc@kernel.org
      Cc: devicetree@vger.kernel.org
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      83ca8b3e
    • Serge Semin's avatar
      bus: Add Baikal-T1 APB-bus driver · 8f93662d
      Serge Semin authored
      Baikal-T1 AXI-APB bridge is used to access the SoC subsystem CSRs.
      IO requests are routed to this bus by means of the DW AMBA 3 AXI
      Interconnect. In case if an attempted APB transaction stays with no
      response for a pre-defined time an interrupt occurs and the bus gets
      freed for a next operation. This driver provides the interrupt handler
      to detect the erroneous address, prints an error message about the
      address fault, updates an errors counter. The counter and the APB-bus
      operations timeout can be accessed via corresponding sysfs nodes.
      A dedicated sysfs-node can be also used to artificially cause the
      bus errors described above.
      
      [arnd: fix build warnings for missing includes and wrong return types]
      
      Link: https://lore.kernel.org/r/20200526125928.17096-6-Sergey.Semin@baikalelectronics.ruSigned-off-by: default avatarSerge Semin <Sergey.Semin@baikalelectronics.ru>
      Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
      Cc: Paul Burton <paulburton@kernel.org>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: soc@kernel.org
      Cc: devicetree@vger.kernel.org
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      8f93662d
    • Serge Semin's avatar
      bus: Add Baikal-T1 AXI-bus driver · 63cb7713
      Serge Semin authored
      AXI3-bus is the main communication bus connecting all high-speed
      peripheral IP-cores with RAM controller and MIPS P5600 cores on Baikal-T1
      SoC. Bus traffic arbitration is done by means of DW AMBA 3 AXI
      Interconnect (so called AXI Main Interconnect) routing IO requests from
      one SoC block to another. This driver provides a way to detect any bus
      protocol errors and device not responding situations by means of an
      embedded on top of the interconnect errors handler block (EHB). AXI
      Interconnect QoS arbitration tuning is currently unsupported.
      The bus doesn't provide a way to detect the interconnected devices,
      so they are supposed to be statically defined like by means of the
      simple-bus sub-nodes.
      
      [arnd: fix build warnings for missing includes and wrong return types]
      
      Link: https://lore.kernel.org/r/20200526125928.17096-5-Sergey.Semin@baikalelectronics.ruSigned-off-by: default avatarSerge Semin <Sergey.Semin@baikalelectronics.ru>
      Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
      Cc: Paul Burton <paulburton@kernel.org>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: linux-mips@vger.kernel.org
      Cc: soc@kernel.org
      Cc: devicetree@vger.kernel.org
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      63cb7713
    • Serge Semin's avatar
      dt-bindings: bus: Add Baikal-T1 APB-bus binding · a1c13784
      Serge Semin authored
      Baikal-T1 CPU or DMAC MMIO requests are handled by the AMBA 3 AXI
      Interconnect which routes them to the AXI-APB bridge, which in turn
      serializes accesses and routes them to the corresponding APB slave device.
      This binding describes the AXI-APB bridge considered as the APB-bus. It is
      supposed to be compatible with "be,bt1-apb" and "simple-bus" drivers,
      should be equipped with EHB MMIO region and a region with no slave device
      mapped, interrupts line number, APB reference clock and domain reset line.
      
      Link: https://lore.kernel.org/r/20200526125928.17096-3-Sergey.Semin@baikalelectronics.ruSigned-off-by: default avatarSerge Semin <Sergey.Semin@baikalelectronics.ru>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
      Cc: Paul Burton <paulburton@kernel.org>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: linux-mips@vger.kernel.org
      Cc: soc@kernel.org
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      a1c13784
    • Serge Semin's avatar
      dt-bindings: bus: Add Baikal-T1 AXI-bus binding · 78c43a05
      Serge Semin authored
      AXI3-bus is the main communication bus connecting all high-speed
      peripheral IP-cores with RAM controller and with MIPS P5600 cores on
      Baikal-T1 SoC. This binding describes the DW AMBA 3 AXI Inteconnect
      and Errors Handler Block synthesized on top of it, which are
      responsible for the AXI-bus traffic arbitration and errors reporting
      upstream to CPU. Baikal-T1 AXI-bus DT node is supposed to be compatible
      with "be,bt1-axi" and "simple-bus" drivers, should have reg property with
      AXI-bus QOS registers space, syscon phandle reference to the Baikal-T1
      System Controller, IRQ line declared, AXI Interconnect reference clock and
      reset line.
      
      Link: https://lore.kernel.org/r/20200526125928.17096-2-Sergey.Semin@baikalelectronics.ruSigned-off-by: default avatarSerge Semin <Sergey.Semin@baikalelectronics.ru>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
      Cc: Paul Burton <paulburton@kernel.org>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: linux-mips@vger.kernel.org
      Cc: soc@kernel.org
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      78c43a05
    • Arnd Bergmann's avatar
      Merge tag 'drivers_soc_for_5.8' of... · 9536a315
      Arnd Bergmann authored
      Merge tag 'drivers_soc_for_5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into arm/drivers
      
      soc: ARM TI update for v5.8
      
       - Platform chipid driver support and associated dts doc update
       - Sparse warning fix in Navigator driver
      
      * tag 'drivers_soc_for_5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone:
        drivers: soc: ti: knav_qmss_queue: Make knav_gp_range_ops static
        soc: ti: add k3 platforms chipid module driver
        dt-bindings: soc: ti: add binding for k3 platforms chipid module
      
      Link: https://lore.kernel.org/r/1590638489-12023-1-git-send-email-santosh.shilimkar@oracle.comSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      9536a315
    • Arnd Bergmann's avatar
      staging: tegra-video: fix V4L2 dependency · 1f46d85f
      Arnd Bergmann authored
      Rather than using a dependency on VIDEO_V4L2, this driver uses
      "select", which fails when other dependencies are missing:
      
      WARNING: unmet direct dependencies detected for VIDEO_V4L2
        Depends on [n]: MEDIA_SUPPORT [=y] && (I2C [=y] || I2C [=y]=n) && VIDEO_DEV [=n]
        Selected by [y]:
        - VIDEO_TEGRA [=y] && STAGING [=y] && STAGING_MEDIA [=y] && MEDIA_SUPPORT [=y] && TEGRA_HOST1X [=y]
      (plus an endless stream of link errors for other drivers that
      depend on VIDEO_V4L2 but are now lacking their dependencies)
      
      Link: https://lore.kernel.org/r/20200527221327.3339232-1-arnd@arndb.de
      Fixes: 3d8a97ea ("media: tegra-video: Add Tegra210 Video input driver")
      Reviewed-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      1f46d85f
    • Arnd Bergmann's avatar
      Merge tag 'soc-fsl-next-v5.8' of... · fb6c05b0
      Arnd Bergmann authored
      Merge tag 'soc-fsl-next-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/drivers
      
      NXP/FSL SoC driver updates for v5.8
      
      DPAA2 DPIO driver
      - Prefer the CPU affined DPIO
      
      QUICC Engine drivers
      - Replace one-element array and use struct_size() helper
      
      Cleanups in various drivers
      
      * tag 'soc-fsl-next-v5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux:
        soc: fsl: dpio: Remove unused inline function qbman_write_eqcr_am_rt_register
        soc: fsl: qe: clean up an indentation issue
        soc: fsl: dpio: Prefer the CPU affine DPIO
        soc: fsl: qbman: Remove unused inline function qm_eqcr_get_ci_stashing
        soc: fsl: qe: Replace one-element array and use struct_size() helper
        treewide: Replace zero-length array with flexible-array
      
      Link: https://lore.kernel.org/r/20200527215740.9279-1-leoyang.li@nxp.comSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      fb6c05b0
    • Arnd Bergmann's avatar
      tee: fix crypto select · 60b4000f
      Arnd Bergmann authored
      When selecting a crypto cipher, we also need to select the
      subsystem itself:
      
      WARNING: unmet direct dependencies detected for CRYPTO_SHA1
        Depends on [m]: CRYPTO [=m]
        Selected by [y]:
        - TEE [=y] && (HAVE_ARM_SMCCC [=n] || COMPILE_TEST [=y] || CPU_SUP_AMD [=y])
        Selected by [m]:
        - CRYPTO_DEV_QAT [=m] && CRYPTO [=m] && CRYPTO_HW [=y]
        - CRYPTO_DEV_MEDIATEK [=m] && CRYPTO [=m] && CRYPTO_HW [=y] && (ARM && ARCH_MEDIATEK || COMPILE_TEST [=y])
        - CRYPTO_DEV_SAFEXCEL [=m] && CRYPTO [=m] && CRYPTO_HW [=y] && (OF [=y] || PCI [=y] || COMPILE_TEST [=y]) && HAS_IOMEM [=y]
        - CRYPTO_DEV_CCREE [=m] && CRYPTO [=m] && CRYPTO_HW [=y] && OF [=y] && HAS_DMA [=y]
        - CRYPTO_DEV_SP_CCP [=y] && CRYPTO [=m] && CRYPTO_HW [=y] && CRYPTO_DEV_CCP [=y] && CRYPTO_DEV_CCP_DD [=m] && DMADEVICES [=y]
      
      Link: https://lore.kernel.org/r/20200527133924.724819-1-arnd@arndb.de
      Fixes: e33bcbab ("tee: add support for session's client UUID generation")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarVesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      60b4000f
    • Samuel Zou's avatar
      drivers: soc: ti: knav_qmss_queue: Make knav_gp_range_ops static · b8b38a8e
      Samuel Zou authored
      Fix the following sparse warning:
      
      drivers/soc/ti/knav_qmss_queue.c:412:23: warning: symbol 'knav_gp_range_ops' was not declared.
      
      The knav_acc_firmwares has only call site within knav_qmss_queue.c
      It should be static
      
      Fixes: 41f93af9 ("soc: ti: add Keystone Navigator QMSS driver")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarSamuel Zou <zou_wei@huawei.com>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      b8b38a8e
    • Grygorii Strashko's avatar
      soc: ti: add k3 platforms chipid module driver · 907a2b7e
      Grygorii Strashko authored
      The Texas Instruments K3 Multicore SoC platforms have chipid module which
      is represented by CTRLMMR_xxx_JTAGID register and contains information
      about SoC id and revision.
       Bits:
        31-28 VARIANT Device variant
        27-12 PARTNO  Part number
        11-1  MFG     Indicates TI as manufacturer (0x17)
        1             Always 1
      
      This patch adds corresponding driver to identify the TI K3 SoC family and
      revision, and registers this information with the SoC bus. It is available
      under /sys/devices/soc0/ for user space, and can be checked, where needed,
      in Kernel using soc_device_match().
      
      Identification is done by:
      - checking MFG to be TI ID
       - retrieving Device variant (revision)
       - retrieving Part number and convert it to the family
       - retrieving machine from DT "/model"
      
      Example J721E:
        # cat /sys/devices/soc0/{machine,family,revision}
        Texas Instruments K3 J721E SoC
        J721E
        SR1.0
      
      Example AM65x:
        # cat /sys/devices/soc0/{machine,family,revision}
        Texas Instruments AM654 Base Board
        AM65X
        SR1.0
      
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Reviewed-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
      Reviewed-by: default avatarTero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      907a2b7e
    • Grygorii Strashko's avatar
      dt-bindings: soc: ti: add binding for k3 platforms chipid module · 232150cc
      Grygorii Strashko authored
      Add DT binding for Texas Instruments K3 Multicore SoC platforms chipid
      module which is represented by CTRLMMR_xxx_JTAGID register and contains
      information about SoC id and revision.
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Reviewed-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
      Reviewed-by: default avatarTero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
      232150cc
  2. 25 May, 2020 20 commits
  3. 22 May, 2020 7 commits