soc/tegra: Changes for v5.18-rc1

This contains the final bit to enable advanced power management on
 Tegra20 and Tegra30. It also contains some cleanups and wake event
 support on Tegra234.
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmIZBUETHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zodJ7D/iKg/aP3rroIzzISWfB1t2GcT98RaI9
 8CnJ7ywKqf5lDCNuRGm8La4IyXewfTfzXK/r6RninlljonGVbaalVQk4uJgiXkkP
 m50/SpYqUGnT2bPfO5JByJCTUdDmzzIcAWpAw53Cs0OLgr9aMyIpmpyn5vwfRDY6
 9UQQokaDFKuCwr71QZv3EEl8V840cazopp89Q5C1ivHW2uwSG6sjojTIsB9Rxr5x
 C+WqP48mSrDZ9pB+qx8uszb7d3SolYH7lOfWyMzPhnCXy7hyoVcAYcywt5JIoBQ1
 t+FtRoJ5e3bShJyhHDU3vdRV6R2hD0V1BHOLpiZmDzQYZtTIHYdKnnRe7VTtFSQK
 rFHz1+LQeI1b3pZTmY1HtUO8XIUo01NdMOh84RQx5U5Fp7zgBrsp7e0TV1BLhx6r
 fACZCeFnFvt8bFVJYBxun5hV5pfByqqh7G432D+DXpyCvwPe6p6a8frewWDr/4M3
 e89T9pU3MNahLC7R97Tfs1JvkQijXuW/yPU505Y6sCFzwzvXyF3axE4ERYJN8yT8
 2iev8As/CGwTGtU1glYCd0U/gvsZwJdlxxepCSitaxNxl2EUwlhZo68UM4SG45vb
 bWFXfWe+hXHIDz7RS1E5D/00nhqoN9ZBldteDit6UenoK4Ys3s6ExZwYSd6zxWsX
 NEWkUTW6kBqu
 =Jmv9
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmIcwfMACgkQmmx57+YA
 GNn2RA//XLSM4sQtSsuBnp6gtYohGbm8O2BJdG7gu3BsjtM/ZM9Sy8zjPJh8ZGoF
 qYktfhm6KwoEHd2Cm0nNNcWNA3IOATHRUveeFIuWWgeUyMwPz0eXsd4w0KZzzqZE
 N6Cvp8Jml3BjEC8yat5IxgHJTJXt87zJHvYiEQPQzoqVL7/vGA/SDGaun7dU9yzG
 Yb+3SDeMcIYniU5w1fiQPS4zl07UzXceAPSEPDZXtXKYSBgvbjtFEtLZ7GPDYfeI
 cAH4BqaZBVUh3vZZk7ZqeyAPF4lVgmbeNZbWP3zTG/jrTryCAmi0u1xiKKC07uh3
 QeFrxr7URHj25Co5zgpsAyNf48uHGKq6x8P9SGleIeENCs94ORrmkdWc69dkzzmO
 R2gOR/Er+3JFzvaf23vSx2qhtIN476CusBTwHkWuh7gmmc5EC+5D7GcLqYCCKlJg
 0wY0AUXc60T80S8e50u80UN4UrBPI6I89ibPz4mRcrwhVeFKf4iAli7tYSVyCaQx
 ykrjRw7EGsUMCsmu35IavRDWKbzFOJvjiaK6dw365wO8XdDu+lO27+mj7Eo4mamc
 y2kGr0ZJCirSGQaRHaqu6G7jIhHhSOlQrzJUzOp+sxd73bY8v72FuS34gvjivlxi
 ntOJFmAYmX+jzyW4K+Q8KeXMIf0BPkHGZLGFYNxfFxwYJFBhCKo=
 =26qK
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-5.18-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers

soc/tegra: Changes for v5.18-rc1

This contains the final bit to enable advanced power management on
Tegra20 and Tegra30. It also contains some cleanups and wake event
support on Tegra234.

* tag 'tegra-for-5.18-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: bpmp: cleanup double word in comment
  soc/tegra: pmc: Add Tegra234 wake events
  soc/tegra: fuse: Explicitly cast to/from __iomem
  soc/tegra: fuse: Update nvmem cell list
  soc/tegra: pmc: Enable core domain support for Tegra20 and Tegra30

Link: https://lore.kernel.org/r/20220225164741.1064416-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2022-02-28 13:37:06 +01:00
commit 345932db14
3 changed files with 33 additions and 9 deletions

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2013-2021, NVIDIA CORPORATION. All rights reserved.
*/
#include <linux/clk.h>
@ -161,6 +161,12 @@ static const struct nvmem_cell_info tegra_fuse_cells[] = {
.bytes = 4,
.bit_offset = 0,
.nbits = 32,
}, {
.name = "gcplex-config-fuse",
.offset = 0x1c8,
.bytes = 4,
.bit_offset = 0,
.nbits = 32,
}, {
.name = "tsensor-realignment",
.offset = 0x1fc,
@ -179,13 +185,25 @@ static const struct nvmem_cell_info tegra_fuse_cells[] = {
.bytes = 4,
.bit_offset = 0,
.nbits = 32,
}, {
.name = "pdi0",
.offset = 0x300,
.bytes = 4,
.bit_offset = 0,
.nbits = 32,
}, {
.name = "pdi1",
.offset = 0x304,
.bytes = 4,
.bit_offset = 0,
.nbits = 32,
},
};
static void tegra_fuse_restore(void *base)
{
fuse->base = (void __iomem *)base;
fuse->clk = NULL;
fuse->base = base;
}
static int tegra_fuse_probe(struct platform_device *pdev)
@ -195,7 +213,7 @@ static int tegra_fuse_probe(struct platform_device *pdev)
struct resource *res;
int err;
err = devm_add_action(&pdev->dev, tegra_fuse_restore, base);
err = devm_add_action(&pdev->dev, tegra_fuse_restore, (void __force *)base);
if (err)
return err;

View File

@ -3,7 +3,7 @@
* drivers/soc/tegra/pmc.c
*
* Copyright (c) 2010 Google, Inc
* Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
*
* Author:
* Colin Cross <ccross@google.com>
@ -54,6 +54,7 @@
#include <dt-bindings/pinctrl/pinctrl-tegra-io-pad.h>
#include <dt-bindings/gpio/tegra186-gpio.h>
#include <dt-bindings/gpio/tegra194-gpio.h>
#include <dt-bindings/gpio/tegra234-gpio.h>
#include <dt-bindings/soc/tegra-pmc.h>
#define PMC_CNTRL 0x0
@ -3066,7 +3067,7 @@ static void tegra20_pmc_setup_irq_polarity(struct tegra_pmc *pmc,
}
static const struct tegra_pmc_soc tegra20_pmc_soc = {
.supports_core_domain = false,
.supports_core_domain = true,
.num_powergates = ARRAY_SIZE(tegra20_powergates),
.powergates = tegra20_powergates,
.num_cpu_powergates = 0,
@ -3127,7 +3128,7 @@ static const char * const tegra30_reset_sources[] = {
};
static const struct tegra_pmc_soc tegra30_pmc_soc = {
.supports_core_domain = false,
.supports_core_domain = true,
.num_powergates = ARRAY_SIZE(tegra30_powergates),
.powergates = tegra30_powergates,
.num_cpu_powergates = ARRAY_SIZE(tegra30_cpu_powergates),
@ -3788,6 +3789,11 @@ static const char * const tegra234_reset_sources[] = {
"FUSECRC",
};
static const struct tegra_wake_event tegra234_wake_events[] = {
TEGRA_WAKE_GPIO("power", 29, 1, TEGRA234_AON_GPIO(EE, 4)),
TEGRA_WAKE_IRQ("rtc", 73, 10),
};
static const struct tegra_pmc_soc tegra234_pmc_soc = {
.supports_core_domain = false,
.num_powergates = 0,
@ -3812,8 +3818,8 @@ static const struct tegra_pmc_soc tegra234_pmc_soc = {
.num_reset_sources = ARRAY_SIZE(tegra234_reset_sources),
.reset_levels = tegra186_reset_levels,
.num_reset_levels = ARRAY_SIZE(tegra186_reset_levels),
.num_wake_events = 0,
.wake_events = NULL,
.num_wake_events = ARRAY_SIZE(tegra234_wake_events),
.wake_events = tegra234_wake_events,
.pmc_clks_data = NULL,
.num_pmc_clks = 0,
.has_blink_output = false,

View File

@ -931,7 +931,7 @@ enum mrq_reset_commands {
* @brief Request with MRQ_RESET
*
* Used by the sender of an #MRQ_RESET message to request BPMP to
* assert or or deassert a given reset line.
* assert or deassert a given reset line.
*/
struct mrq_reset_request {
/** @brief Reset action to perform (@ref mrq_reset_commands) */