Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3784377rdb; Thu, 14 Sep 2023 02:28:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjGzrVABw8sgSwciUEZesCQ1trLx0gru4gDhX6CT4b8+RtvFyV02NuQ5P0dAnJrA14JgUV X-Received: by 2002:a05:6358:52c8:b0:135:85ec:a080 with SMTP id z8-20020a05635852c800b0013585eca080mr4574296rwz.32.1694683709823; Thu, 14 Sep 2023 02:28:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694683709; cv=none; d=google.com; s=arc-20160816; b=Hi8KPjIhNm6lvAMdjHAv8Am6/2iq9ao9S29VMvhqpLQ+bdczxM/yC08e39G6N1y1p4 tMIa+htBNKm30O2T7zDumsFCdA47HxsoNQwKyc4FK9YfUIpA4omrnAPGhyFcXKMnrAoL JnaV1o0TUhWZ2Xw2sSd2CGPAz6N0zeG+9qp65wThkVKGnH+2VLsfTYzxUIBWv10m6LTk rIH0KTme4mircreY3tJVqkBxewNneIqQS43Jk2KRlfO1bRySpaN+eJq5cBCBYtl3kDKh 6mMzDsvuLQg4sqv9xEE6PsBTdPTSPPvM4r0nQYvdgJsWDv7+9xzKmCsamtIxrXqPNt8h TEhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7IIEC67naZi6/0RAJKrEfkH2cWlE/u6Yf+YjSmZRSxQ=; fh=I4UGvJoXM4fDYor3jv3arxZZrfI27rMPChaxoQloJns=; b=AeyhMswsUelS2zJ95PMkBtm73zrPp2I27+pKoemZSLRx3kLe/VJPqlqdR0Bnkhj2fb jB78FeNfXpXECHmV7VwRCpvGKRvXkPgJmk2FILebm2i+9q0LOmn9yTSalWYmupKimvVy 3xWuN0tWxKw2tAYgFa73y1rApGg47IHu1QEpyNCdl038bkPg5uQGSnBt3NMLimjckEw4 j0a8UANVn1Ks8RIPtb0vTO339YjO2s0WdjaGTTPwOwcH94KoEgJhj1jrs4u+hApkDfbe LQx21j1M3TurvzGKrcVT9BcXO6pIB2quw59l8UAOllos+lkk6jnuNvEweDSZFVW2dWP/ UPcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=h3pkAJl2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id j70-20020a638049000000b00574008433a7si1175416pgd.9.2023.09.14.02.28.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 02:28:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=h3pkAJl2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4CBC281BC4A9; Wed, 13 Sep 2023 21:06:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234792AbjINEGT (ORCPT + 99 others); Thu, 14 Sep 2023 00:06:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234875AbjINEFx (ORCPT ); Thu, 14 Sep 2023 00:05:53 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 035121BF8 for ; Wed, 13 Sep 2023 21:05:48 -0700 (PDT) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 38E45ZqI012669; Wed, 13 Sep 2023 23:05:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1694664335; bh=7IIEC67naZi6/0RAJKrEfkH2cWlE/u6Yf+YjSmZRSxQ=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=h3pkAJl2x4fDuqohz2bwIVhB8VtrgtItA8EpWu6TZA8BRsyA7n1TxX6rfDPe/dKp4 AqPJfwOsBOVWujIm09ubDCzy+FYvhPSeJ0d2TL1mKMGF1gYsWWBSv8BZc92KDrilIi IewUSUbLTYgnBL7lRMMuAXSStiORX8vaUmgGhuBc= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 38E45ZJm119512 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 13 Sep 2023 23:05:35 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 13 Sep 2023 23:05:35 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 13 Sep 2023 23:05:35 -0500 Received: from [10.24.68.114] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 38E45VtF120507; Wed, 13 Sep 2023 23:05:32 -0500 Message-ID: Date: Thu, 14 Sep 2023 09:35:31 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH] soc: ti: k3-socinfo: Fix the silicon revision misprint Content-Language: en-US To: Nishanth Menon CC: Thejasvi Konduru , , , Santosh Shilimkar , Tero Kristo , Grygorii Strashko , Lokesh Vutla , Apurva Nandan , Udit Kumar References: <20230607080349.26671-1-t-konduru@ti.com> <20230607104304.iengykppptr3fxe6@reflected> <20230913112823.prv5dmasvv4nt6qv@nuclear> From: Neha Malcom Francis In-Reply-To: <20230913112823.prv5dmasvv4nt6qv@nuclear> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 13 Sep 2023 21:06:29 -0700 (PDT) X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Hi Nishanth On 13/09/23 16:58, Nishanth Menon wrote: > On 12:07-20230912, Neha Malcom Francis wrote: > > [...] > >>>> +void >>>> +k3_chipinfo_silicon_rev(unsigned int variant, >>>> + struct soc_device_attribute *soc_dev_attr) >>>> +{ >>>> + const char *family_name = soc_dev_attr->family; >>>> + int j721e_lookup_arr_size = ARRAY_SIZE(soc_revision_j721e); >>>> + >>>> + if (!strcmp(family_name, "J721E") && variant < j721e_lookup_arr_size) { >>>> + soc_dev_attr->revision = kasprintf(GFP_KERNEL, "SR%s", soc_revision_j721e[variant]); >>>> + } else { >>>> + variant++; >>>> + soc_dev_attr->revision = kasprintf(GFP_KERNEL, "SR%x.0", variant); >>>> + } >>> >>> I am not comfortable with if else here. Why not extend k3_soc_id >>> structure to include the variant LuT? Are there exceptions to this rule >>> (Say AM65x?), those would make sense to handle with a compare against >>> the partno? >>> >> >> Trying to revive this patch, I see what you are saying is similar to the way >> detection has already been implemented in U-Boot (drivers/soc/soc_ti_k3.c) >> if I'm not mistaken. > > Yes. > >> >> But I can't find any existing exception to this "family --> version" rule >> that forces us to use "partno --> version". Checked through all AM65x device >> TRMs available in ti.com; all seem to use common partno. So maybe I am not >> on the same page, did you mean something else? > > https://www.ti.com/lit/ug/spruid7e/spruid7e.pdf > CTRLMMR_WKUP_JTAGID:: VARIANT field: SR2.0: 1h SR1.0: 0h > Latest data sheet: https://www.ti.com/lit/ds/symlink/am6548.pdf > indicates SR 2.1 > > How is this detected? Detection of the ".x" bit is still a WIP and needs some alignment internally before I can add that patch. So for now, working on cleaning up the known issues of the driver. > > What I indicated is a LUT table similar to > https://git.ti.com/cgit/k3conf/k3conf/tree/common/socinfo.c#n382 > > This allows a switch statement to handle custom SR handling schemes or > use LUT with variants that use VARIANT field to handle things properly. > This makes sense, will work on the patch accordingly. Thanks! > [...] -- Thanking You Neha Malcom Francis