From: Judith Mendez <jm@ti.com>
To: Andrew Davis <afd@ti.com>, Nishanth Menon <nm@ti.com>,
Tero Kristo <kristo@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>
Cc: Vignesh Raghavendra <vigneshr@ti.com>,
Santosh Shilimkar <ssantosh@kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-mmc@vger.kernel.org>
Subject: Re: [PATCH 2/4] soc: ti: k3-socinfo: Add support for AM62P variants
Date: Thu, 7 Aug 2025 17:29:24 -0500 [thread overview]
Message-ID: <da9c4afb-84ce-49ee-86b3-b7f50457a067@ti.com> (raw)
In-Reply-To: <37f73812-be0c-43b2-a5bc-a41e09db85ea@ti.com>
Hi Andrew,
On 8/7/25 12:24 PM, Andrew Davis wrote:
> On 8/5/25 6:49 PM, Judith Mendez wrote:
>> This adds a support for detecting AM62P SR1.0, SR1.1, SR1.2.
>>
>> On AM62P, silicon revision is discovered with GP_SW1 instead of JTAGID
>> register, so introduce GP_SW register range to determine SoC revision.
>>
>> Signed-off-by: Judith Mendez <jm@ti.com>
>> ---
>> drivers/soc/ti/k3-socinfo.c | 82 +++++++++++++++++++++++++++++++++----
>> 1 file changed, 74 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c
>> index d716be113c84..9daeced656d6 100644
>> --- a/drivers/soc/ti/k3-socinfo.c
>> +++ b/drivers/soc/ti/k3-socinfo.c
>> @@ -15,6 +15,7 @@
>> #include <linux/sys_soc.h>
>> #define CTRLMMR_WKUP_JTAGID_REG 0
>> +#define CTRLMMR_WKUP_GP_SW1_REG 4
>> /*
>> * Bits:
>> * 31-28 VARIANT Device variant
>> @@ -62,10 +63,63 @@ static const struct k3_soc_id {
>> { JTAG_ID_PARTNO_AM62LX, "AM62LX" },
>> };
>> +static const struct regmap_config k3_chipinfo_regmap_cfg = {
>> + .reg_bits = 32,
>> + .val_bits = 32,
>> + .reg_stride = 4,
>> +};
>> +
>> static const char * const j721e_rev_string_map[] = {
>> "1.0", "1.1", "2.0",
>> };
>> +static const char * const am62p_gpsw_rev_string_map[] = {
>> + "1.0", "1.1", "1.2",
>> +};
>> +
>> +static int
>> +k3_chipinfo_get_variant_alternate(struct platform_device *pdev,
>> unsigned int partno, u32 *variant)
>> +{
>> + struct device *dev = &pdev->dev;
>> + struct regmap *regmap;
>> + void __iomem *base;
>> + u32 offset;
>> + int ret;
>> +
>> + base = devm_platform_ioremap_resource(pdev, 1);
>> + if (IS_ERR(base))
>> + return PTR_ERR(base);
>> +
>> + regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
>
> devm_regmap_init_mmio()
>
> Otherwise this regmap never gets freed up in the error paths.
Thanks for reviewing, but....
I have completely changed this patch in v2, feel free to review v2
though (:
..
next prev parent reply other threads:[~2025-08-07 22:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 23:49 [PATCH 0/4] Add support for AM62P SR1.2 Judith Mendez
2025-08-05 23:49 ` [PATCH 1/4] dt-bindings: hwinfo: Add second register range for GP_SW Judith Mendez
2025-08-06 6:40 ` Krzysztof Kozlowski
2025-08-06 15:24 ` Judith Mendez
2025-08-07 8:22 ` Krzysztof Kozlowski
2025-08-05 23:49 ` [PATCH 2/4] soc: ti: k3-socinfo: Add support for AM62P variants Judith Mendez
2025-08-07 17:24 ` Andrew Davis
2025-08-07 22:29 ` Judith Mendez [this message]
2025-08-05 23:49 ` [PATCH 3/4] mmc: sdhci_am654: Disable HS400 for AM62P SR1.0 and SR1.1 Judith Mendez
2025-08-07 17:28 ` Andrew Davis
2025-08-07 22:14 ` Judith Mendez
2025-08-05 23:49 ` [PATCH 4/4] arm64: dts: ti: k3-am62p-j722s-common-wakeup: Add GP_SW reg range to chipid node Judith Mendez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=da9c4afb-84ce-49ee-86b3-b7f50457a067@ti.com \
--to=jm@ti.com \
--cc=adrian.hunter@intel.com \
--cc=afd@ti.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kristo@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=nm@ti.com \
--cc=robh@kernel.org \
--cc=ssantosh@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®