From patchwork Wed Feb 10 11:46:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 12080635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F051C43381 for ; Wed, 10 Feb 2021 11:48:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F57264E40 for ; Wed, 10 Feb 2021 11:48:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F57264E40 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Y8VY2q5zq+UNm/BvMFRQ6TabkU5GlgQ9rCvfSWF/Uwg=; b=oXw5rorsfXu8U3X4wRXepX4nC5 jdUydSGL/JU2Xhnqyq62FDEukKhDfD2ERFBn5eAHLBPuMVzl3HT7QDe2n1QQQcpxHYKIUpWDYA2PX zTsUqAJHDk2lypsj+IbUQ5hKr7J9qOetwIdnGOAyoQHxAwjXdiKu6lOuBdl9+MnXSbkNHJRiClyTJ xTxoxjGK1GhuS3PPMAo13SZ9gdv/jdiiBXeG4RtiBrQVKHx+k/TRV4ETAShEIApjnp2MIs6VffJvl 1balhcsDJY4FWnvSjGtGFJa6UiBuE/ZLycq8HeEtFwM228GHCvCy09LLExejc+qZe4bDJWae9NHMp W1HzFRDw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9nxa-0001UJ-6g; Wed, 10 Feb 2021 11:47:06 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l9nxW-0001Ta-Ci for linux-arm-kernel@lists.infradead.org; Wed, 10 Feb 2021 11:47:03 +0000 Received: by mail-pj1-x1036.google.com with SMTP id cv23so960642pjb.5 for ; Wed, 10 Feb 2021 03:47:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SquWdczocRj1Zqc41Sdg/xRUhoXlPE28+OwXR1sRajo=; b=Mid58bw7ffch7T1M2/MyOoryBoEljUfP90Q4leXFY4Bb30y8u8tC4mYwm0byAeeF5D JXWfq8uwtEVUKsYc8X8zKx7EtiiLMPf9mK8Cjcq7HuMwTgqE/dqYaiYiw/zKfvEUWJfY fSoqnnRyf5iU4bYJCV/gawmA04vyawlUbnVAoYgg+/wq1NhCmi77Kz9CnDww6UB6/4Kd oS2gHZyooLjnNnU2wpUn5nBNEYbya+peyss/G5/jHteHMQWjVrWxo76xsP8Tr7MBGc6p zQJRWG1qTNoTqHIUvCaX66mMZl4HWLtVM9x+V5ZhsDTv4Secd/X/QmmxpkJ0diy3ugpe U7Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=SquWdczocRj1Zqc41Sdg/xRUhoXlPE28+OwXR1sRajo=; b=Zcz2Q6lwQk6aVHm12eugPxeEJjdO08IYdZJEOORROgDEW96u1wgFtYtJDEKfjnH32+ 1ACrRSksU0BnY0B8gOFR1AOrCXZsT/2h6jnAjVFSKPAUggKE1SHgKmUqrbmTaCV49a2D TTdXURe0S4wt71ZLVMxcxGKB9RFfYo+MAXx0Sz1jCquZkuWLl7nqT00LXnm5flSEpPGh ViL59BJ//qHPk/A9fP5RSwPXRd8d7IWvDxckYM8pdLpE2Z6bvSttLsUTRht67BVbjHwU 3F3j6vz3t1Gcvymc9PZYjZ3GK4THM4QsKM8bCvorRXo4tsBhsl7a+/DUQK77DcBNvzoZ tMrA== X-Gm-Message-State: AOAM530XS5AvTG3fF/Q54umSHEafSQlBEX2G9qVxKEtxKWfJZwhn6zWQ 9C0lTo0/qTnVgcwvqD35npFTu285fKM73A== X-Google-Smtp-Source: ABdhPJw/l0zMA7OWPgNPe6WecQDh+3gZsciN6poYlVqsk6C/q5SwxJ5qMlYM3SW+llkrW4kx3WxwIA== X-Received: by 2002:a17:90a:ba0b:: with SMTP id s11mr2797767pjr.182.1612957619956; Wed, 10 Feb 2021 03:46:59 -0800 (PST) Received: from localhost.localdomain ([45.124.203.14]) by smtp.gmail.com with ESMTPSA id e12sm2096216pjj.23.2021.02.10.03.46.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 03:46:58 -0800 (PST) From: Joel Stanley To: Andrew Jeffery Subject: [PATCH] soc: aspeed: socinfo: Add new systems Date: Wed, 10 Feb 2021 22:16:51 +1030 Message-Id: <20210210114651.334324-1-joel@jms.id.au> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210210_064702_444862_E4A38D80 X-CRM114-Status: GOOD ( 14.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ryan Chen , linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Aspeed's u-boot sdk has been updated with the SoC IDs for the AST2605 variant, as well as A2 and A3 variants of the 2600 family. From u-boot's arch/arm/mach-aspeed/ast2600/scu_info.c: SOC_ID("AST2600-A0", 0x0500030305000303), SOC_ID("AST2600-A1", 0x0501030305010303), SOC_ID("AST2620-A1", 0x0501020305010203), SOC_ID("AST2600-A2", 0x0502030305010303), SOC_ID("AST2620-A2", 0x0502020305010203), SOC_ID("AST2605-A2", 0x0502010305010103), SOC_ID("AST2600-A3", 0x0503030305030303), SOC_ID("AST2620-A3", 0x0503020305030203), SOC_ID("AST2605-A3", 0x0503010305030103), Signed-off-by: Joel Stanley Reviewed-by: Andrew Jeffery --- drivers/soc/aspeed/aspeed-socinfo.c | 33 ++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/drivers/soc/aspeed/aspeed-socinfo.c b/drivers/soc/aspeed/aspeed-socinfo.c index 773930e0cb10..e3215f826d17 100644 --- a/drivers/soc/aspeed/aspeed-socinfo.c +++ b/drivers/soc/aspeed/aspeed-socinfo.c @@ -25,6 +25,7 @@ static struct { /* AST2600 */ { "AST2600", 0x05000303 }, { "AST2620", 0x05010203 }, + { "AST2605", 0x05030103 }, }; static const char *siliconid_to_name(u32 siliconid) @@ -43,14 +44,30 @@ static const char *siliconid_to_name(u32 siliconid) static const char *siliconid_to_rev(u32 siliconid) { unsigned int rev = (siliconid >> 16) & 0xff; - - switch (rev) { - case 0: - return "A0"; - case 1: - return "A1"; - case 3: - return "A2"; + unsigned int gen = (siliconid >> 24) & 0xff; + + if (gen < 0x5) { + /* AST2500 and below */ + switch (rev) { + case 0: + return "A0"; + case 1: + return "A1"; + case 3: + return "A2"; + } + } else { + /* AST2600 */ + switch (rev) { + case 0: + return "A0"; + case 1: + return "A1"; + case 2: + return "A2"; + case 3: + return "A3"; + } } return "??";