Unverified Commit 62bd59ca authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'tegra-for-6.17-memory' of...

Merge tag 'tegra-for-6.17-memory' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers

memory: tegra: Updates for v6.17-rc1

Enable support for the memory and external memory controllers found on
Tegra264.

* tag 'tegra-for-6.17-memory' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  memory: tegra: Add Tegra264 MC and EMC support
  dt-bindings: memory: tegra: Add Tegra264 support

Link: https://lore.kernel.org/r/20250711220943.2389322-4-thierry.reding@gmail.com


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 27d0ff5a 2401dc4d
Loading
Loading
Loading
Loading
+82 −2
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ properties:
          - nvidia,tegra186-mc
          - nvidia,tegra194-mc
          - nvidia,tegra234-mc
          - nvidia,tegra264-mc

  reg:
    minItems: 6
@@ -42,8 +43,12 @@ properties:
    maxItems: 18

  interrupts:
    items:
      - description: MC general interrupt
    minItems: 1
    maxItems: 8

  interrupt-names:
    minItems: 1
    maxItems: 8

  "#address-cells":
    const: 2
@@ -74,6 +79,7 @@ patternProperties:
              - nvidia,tegra186-emc
              - nvidia,tegra194-emc
              - nvidia,tegra234-emc
              - nvidia,tegra264-emc

      reg:
        minItems: 1
@@ -127,6 +133,15 @@ patternProperties:
            reg:
              minItems: 2

      - if:
          properties:
            compatible:
              const: nvidia,tegra264-emc
        then:
          properties:
            reg:
              minItems: 2

    additionalProperties: false

    required:
@@ -158,6 +173,12 @@ allOf:
            - const: ch2
            - const: ch3

        interrupts:
          items:
            - description: MC general interrupt

        interrupt-names: false

  - if:
      properties:
        compatible:
@@ -189,6 +210,12 @@ allOf:
            - const: ch14
            - const: ch15

        interrupts:
          items:
            - description: MC general interrupt

        interrupt-names: false

  - if:
      properties:
        compatible:
@@ -220,6 +247,59 @@ allOf:
            - const: ch14
            - const: ch15

        interrupts:
          items:
            - description: MC general interrupt

        interrupt-names: false

  - if:
      properties:
        compatible:
          const: nvidia,tegra264-mc
    then:
      properties:
        reg:
          minItems: 17
          maxItems: 17
          description: 17 memory controller channels

        reg-names:
          items:
            - const: broadcast
            - const: ch0
            - const: ch1
            - const: ch2
            - const: ch3
            - const: ch4
            - const: ch5
            - const: ch6
            - const: ch7
            - const: ch8
            - const: ch9
            - const: ch10
            - const: ch11
            - const: ch12
            - const: ch13
            - const: ch14
            - const: ch15

        interrupts:
          minItems: 8
          maxItems: 8
          description: One interrupt line for each MC component

        interrupt-names:
          items:
            - const: mcf
            - const: hub1
            - const: hub2
            - const: hub3
            - const: hub4
            - const: hub5
            - const: sbs
            - const: channel

additionalProperties: false

required:
+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ tegra-mc-$(CONFIG_ARCH_TEGRA_210_SOC) += tegra210.o
tegra-mc-$(CONFIG_ARCH_TEGRA_186_SOC) += tegra186.o
tegra-mc-$(CONFIG_ARCH_TEGRA_194_SOC) += tegra186.o tegra194.o
tegra-mc-$(CONFIG_ARCH_TEGRA_234_SOC) += tegra186.o tegra234.o
tegra-mc-$(CONFIG_ARCH_TEGRA_264_SOC) += tegra186.o tegra264.o

obj-$(CONFIG_TEGRA_MC) += tegra-mc.o

@@ -21,5 +22,6 @@ obj-$(CONFIG_TEGRA210_EMC) += tegra210-emc.o
obj-$(CONFIG_ARCH_TEGRA_186_SOC) += tegra186-emc.o
obj-$(CONFIG_ARCH_TEGRA_194_SOC) += tegra186-emc.o
obj-$(CONFIG_ARCH_TEGRA_234_SOC) += tegra186-emc.o
obj-$(CONFIG_ARCH_TEGRA_264_SOC) += tegra186-emc.o

tegra210-emc-y := tegra210-emc-core.o tegra210-emc-cc-r21021.o
+4 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2014 NVIDIA CORPORATION.  All rights reserved.
 * Copyright (C) 2014-2025 NVIDIA CORPORATION.  All rights reserved.
 */

#include <linux/clk.h>
@@ -48,6 +48,9 @@ static const struct of_device_id tegra_mc_of_match[] = {
#endif
#ifdef CONFIG_ARCH_TEGRA_234_SOC
	{ .compatible = "nvidia,tegra234-mc", .data = &tegra234_mc_soc },
#endif
#ifdef CONFIG_ARCH_TEGRA_264_SOC
	{ .compatible = "nvidia,tegra264-mc", .data = &tegra264_mc_soc },
#endif
	{ /* sentinel */ }
};
+7 −2
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2014 NVIDIA CORPORATION.  All rights reserved.
 * Copyright (C) 2014-2025 NVIDIA CORPORATION.  All rights reserved.
 */

#ifndef MEMORY_TEGRA_MC_H
@@ -182,6 +182,10 @@ extern const struct tegra_mc_soc tegra194_mc_soc;
extern const struct tegra_mc_soc tegra234_mc_soc;
#endif

#ifdef CONFIG_ARCH_TEGRA_264_SOC
extern const struct tegra_mc_soc tegra264_mc_soc;
#endif

#if defined(CONFIG_ARCH_TEGRA_3x_SOC) || \
    defined(CONFIG_ARCH_TEGRA_114_SOC) || \
    defined(CONFIG_ARCH_TEGRA_124_SOC) || \
@@ -193,7 +197,8 @@ extern const struct tegra_mc_ops tegra30_mc_ops;

#if defined(CONFIG_ARCH_TEGRA_186_SOC) || \
    defined(CONFIG_ARCH_TEGRA_194_SOC) || \
    defined(CONFIG_ARCH_TEGRA_234_SOC)
    defined(CONFIG_ARCH_TEGRA_234_SOC) || \
    defined(CONFIG_ARCH_TEGRA_264_SOC)
extern const struct tegra_mc_ops tegra186_mc_ops;
#endif

+4 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2019 NVIDIA CORPORATION.  All rights reserved.
 * Copyright (C) 2019-2025 NVIDIA CORPORATION.  All rights reserved.
 */

#include <linux/clk.h>
@@ -393,6 +393,9 @@ static const struct of_device_id tegra186_emc_of_match[] = {
#endif
#if defined(CONFIG_ARCH_TEGRA_234_SOC)
	{ .compatible = "nvidia,tegra234-emc" },
#endif
#if defined(CONFIG_ARCH_TEGRA_264_SOC)
	{ .compatible = "nvidia,tegra264-emc" },
#endif
	{ /* sentinel */ }
};
Loading