From patchwork Mon Mar 1 16:05:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 388687 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp3583869jap; Mon, 1 Mar 2021 10:22:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwnxMw8KgoHED/THofZKvE4Q+gPbNOQy06yFjgzi9GdYe97w2B2bjed4Qbk0Aw7lA2MhyA/ X-Received: by 2002:a17:906:da0e:: with SMTP id fi14mr1961760ejb.188.1614622971610; Mon, 01 Mar 2021 10:22:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614622971; cv=none; d=google.com; s=arc-20160816; b=zXiMyGm0bORXg3V+YvbZ6TTe9Ew9JlEw7xcjAAugA6sDQqPNFJnUq29auHiPQCKrV8 7f8vDsH8Yb0MiHPM/9uW5Bez64mvdrHySDAs0dGLT+bWhbnbXbKu/mz2Yh45pKPoVhbk zhUmP30Dmqb6jXQupqCN0vr7xmsYL9IyUiWrZRGELDQvokg6g3sih9B63JxfKs9ninAM BLzBpx6EFal/niCmp2sZNG5U14sLKzwv+bYrpcFio2/c0opQ4dfIkhqyuNk8rSoH93HO HJhzwJ+obf5dlBM8z+GxicxPlqrAf2/v5SGFCMgFjGwGOia7At7YyK0Kii21gc20NivH Ga0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PH7GhB8r8dgEyiXBqa5ZeulG+oidcVyyqM+vptakhwU=; b=JOy81AoIyAgQiZjZFq5Tu/o4FwmT0leyFia/mAFNJHc5KBfWAX+AjsZpzuFuKQ99Cw 78jShoQDzRC2Wv03BVRiyRgZCalzZo73W73ljAJ0xFYvkpCMvpASVfyaaTpXpDjuB7Or jztq9hLm6D6zqxZPm694MPgWWD82Uu93cELVojQ2WDRuuk/dgXUDQB5iFFaQG4TVJm2q tVGK6t3QF/PZnkjyZHbbkcYsgwmpuVVCyZIZe2VpRD9G/n6wRyDPw8iI8Bn3jVclTPp1 NiLOhwlQGrscFqYXkEY/iq8VcOUTbgUhKrdKGYRyx/Vx52XFEsxYDnZbLwOKfnu4UYie zVqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Gomx/cbv"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg20si12881563ejc.125.2021.03.01.10.22.51; Mon, 01 Mar 2021 10:22:51 -0800 (PST) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Gomx/cbv"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239649AbhCASVt (ORCPT + 13 others); Mon, 1 Mar 2021 13:21:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:34282 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239503AbhCASRA (ORCPT ); Mon, 1 Mar 2021 13:17:00 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0E48D652F6; Mon, 1 Mar 2021 17:40:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614620458; bh=mZcnrgi8B582SnCq4bcrTHUNa4DYBXcoGAQB5miVU3o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gomx/cbvIGky1xL7wOm+TSSRJOZ6xAA0mhZi0rwcJ8dMZv4T0BmBmfdFlo7ICSdhM WaauYnsjbGu/tpz8c+1wvIs9PYqt0xQiLj0CBi73Gc6uviqbvpli1NNgpNNwgHEv6k b231BXBXNkVlkzaD97A1OMHke9K0RPoYa98JRKTU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Joel Stanley , Sasha Levin Subject: [PATCH 5.11 160/775] soc: aspeed: socinfo: Add new systems Date: Mon, 1 Mar 2021 17:05:28 +0100 Message-Id: <20210301161209.549142793@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161201.679371205@linuxfoundation.org> References: <20210301161201.679371205@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Joel Stanley [ Upstream commit d0e72be77e7995923fac73f27cf7a75d3d1a4dec ] 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), Fixes: e0218dca5787 ("soc: aspeed: Add soc info driver") Link: https://lore.kernel.org/r/20210210114651.334324-1-joel@jms.id.au Signed-off-by: Joel Stanley Signed-off-by: Sasha Levin --- drivers/soc/aspeed/aspeed-socinfo.c | 33 ++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) -- 2.27.0 diff --git a/drivers/soc/aspeed/aspeed-socinfo.c b/drivers/soc/aspeed/aspeed-socinfo.c index 773930e0cb100..e3215f826d17a 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 "??";