From patchwork Mon Sep 21 09:16:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 1368184 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BvzNL6G1sz9sTN for ; Mon, 21 Sep 2020 19:17:06 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=luceUTko; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4BvzNL3GwPzDqcG for ; Mon, 21 Sep 2020 19:17:06 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::542; helo=mail-pg1-x542.google.com; envelope-from=joel.stan@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=luceUTko; dkim-atps=neutral Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4BvzNG0YD5zDqTQ for ; Mon, 21 Sep 2020 19:17:00 +1000 (AEST) Received: by mail-pg1-x542.google.com with SMTP id t14so8472549pgl.10 for ; Mon, 21 Sep 2020 02:17:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HIhrg8tRGQCxs5Sa82o6WHubo3OlUJFmsl/2L8gztn8=; b=luceUTkoW+9pCSILD5AJicH1J7GUxI+drnA7b7xnLPdudcjaTLtZDZEXBBcaCOHK3/ eJ/HTzvjz30J6sVCL0gS4tX6QBRAOUnOf8CfiwxIhqPir5iQvrDuLvoG0ZOP9eZKxhUU lNzz1Fny3mKw/eNJ7r9UIP8gZPM7MWUvt4UYahlSDRhR2BV3H8ngmzyQ47fD9dFPW+c7 am4R1V0XmCL84wJjCpaosxDc9zMPkgmgQCJwDWMfAWacXXJpcd1VVfrBENnJmSCKQIMF 4yZZAJ3pFHuKsQ3gbrycfl0p1pS7cBuh7byMcYJCwBa4LGhMzyiPyUp5Oqm2lsQq3p3w phIA== 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 :in-reply-to:references:mime-version:content-transfer-encoding; bh=HIhrg8tRGQCxs5Sa82o6WHubo3OlUJFmsl/2L8gztn8=; b=YzaF+KhE/UJAi7XOmsmpfvFQsWY++gtGox3Ok4892eaxAU8C6+I/Oz+CAG1O0+Iidl lkkEtICMJfhQo2D0szX0cP/K/02znVr1hZ9xRbp/TzraJKthq2fn5JH4SFvk8VfzdnEY nGpraV/qmvQM8UweqD9FBhzsoblk0zngpRS/lK1Zd7pAokjw4B2BC0hJeJhAQ0+5IEcm 86UDZGRPDGbMIbfuhLEIlURcvHqd9xANrZnkakehZYDsXShrL//feP1qJ/eNOwBiqyBV Ni5swwulBrsdXPFMjaKQgczm8ZUQ+0SoMeCnaVnTo2G23N860FZK3L0Gq0F9gdWdIBMU WeHg== X-Gm-Message-State: AOAM532U2Zzjq37BggbvEVRZnpOyVvqbz1dZ+1dW2VJFt7VKlvAYf2Zi Jq3pgRiqUIyJcScv5YgkMTCbGwWrLVY= X-Google-Smtp-Source: ABdhPJwkuFJnVm4iQza9Qo50hDygKfc4y7LOKZiXmom/SbE+SshwfyezqsxBfCvXn2jybxjLYwRgug== X-Received: by 2002:a17:902:b286:b029:d2:29fc:c89c with SMTP id u6-20020a170902b286b02900d229fcc89cmr2287067plr.3.1600679818365; Mon, 21 Sep 2020 02:16:58 -0700 (PDT) Received: from localhost.localdomain ([45.124.203.18]) by smtp.gmail.com with ESMTPSA id gb19sm10105690pjb.38.2020.09.21.02.16.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2020 02:16:57 -0700 (PDT) From: Joel Stanley To: Rob Herring , Andrew Jeffery Subject: [PATCH v3 1/3] dt-bindings: aspeed: Add silicon id node to SCU Date: Mon, 21 Sep 2020 18:46:42 +0930 Message-Id: <20200921091644.133107-2-joel@jms.id.au> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921091644.133107-1-joel@jms.id.au> References: <20200921091644.133107-1-joel@jms.id.au> MIME-Version: 1.0 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" Different ASPEED families have various unique hardware silicon identifiers within the SoC. Signed-off-by: Joel Stanley Reviewed-by: Andrew Jeffery --- v2: - Fix 2500 string - Be explicit about which ast2600 register to use --- .../devicetree/bindings/mfd/aspeed-scu.txt | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/aspeed-scu.txt b/Documentation/devicetree/bindings/mfd/aspeed-scu.txt index 4d92c0bb6687..857ee33f7329 100644 --- a/Documentation/devicetree/bindings/mfd/aspeed-scu.txt +++ b/Documentation/devicetree/bindings/mfd/aspeed-scu.txt @@ -20,3 +20,29 @@ syscon: syscon@1e6e2000 { #clock-cells = <1>; #reset-cells = <1>; }; + +Silicon ID +----------------- + +Families have unique hardware silicon identifiers within the SoC. + +Required properties: + + - compatible: "aspeed,silicon-id" or: + "aspeed,ast2400-silicon-id" or + "aspeed,ast2500-silicon-id" or + "aspeed,ast2600-silicon-id" + + - reg: offset and length of the silicon id information + optionally, a second offset and length describes the unique chip id + + The reg should be the unique silicon id register, and + not backwards compatible one in eg. the 2600. + +Example: + + +silicon-id@7c { + compatible = "aspeed,ast2500-silicon-id", "aspeed,silicon-id"; + reg = <0x7c 0x4 0x150 0x8>; +}; From patchwork Mon Sep 21 09:16:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 1368186 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BvzNg4C8Vz9sTN for ; Mon, 21 Sep 2020 19:17:23 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OmmennCc; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4BvzNg2vF9zDqdM for ; Mon, 21 Sep 2020 19:17:23 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::544; helo=mail-pg1-x544.google.com; envelope-from=joel.stan@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OmmennCc; dkim-atps=neutral Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4BvzNJ6t1CzDqTT for ; Mon, 21 Sep 2020 19:17:04 +1000 (AEST) Received: by mail-pg1-x544.google.com with SMTP id k133so3726205pgc.7 for ; Mon, 21 Sep 2020 02:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GNuvFUCG0UIOJY2lM+ys35a4Bzf9PFRVPqPZ1cJjWa4=; b=OmmennCcellYKaDdNl7zydTRmqSGJvqke57LdlRu8hipUWe0MkjM2mkbzQHG70qvNE GfeOBhzqODWYc587s9Zv8SeHFeZS77VLJ1hIU8oXzgSLouIC/Ds9cofD96Jmqj2m7SQi 0vYLhDtlw3eysZTnQX1D6wFPs/aH1mm53IAWSWhV2kn5knaeJo/pslE+ikZOUFDL+aQP S0WcAYKgax3/c2CCJiMlRG1lf4gu1SB56H4UG30NKVMiMhQ2IegpDvDKAVh9qEmwQgS8 V8c+WhaQeXg2qbwRWAavHKowgUCg5klaxEjdXUaumfT6tO3Mtx8S3losM98LlG5Cn/TY MSVA== 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 :in-reply-to:references:mime-version:content-transfer-encoding; bh=GNuvFUCG0UIOJY2lM+ys35a4Bzf9PFRVPqPZ1cJjWa4=; b=WCwLrQn7XlmN78vEQ3vKoQk4AUfvfkt6oEPPzNcTs3m5ESYZu2DYsabEG8cNwtubfw CABTdqChJm7oa2Xr7Sbt3aSmG34U9Ie/xxmfUpHGsOAp0dDvjvwwSL4JIAcJts3pGCA6 xs01x7rdWuOeUBCqrjR6dhWyldDk3YhFr3Y0tH4nKDoB0VnakZqMZbXNR+imgMsDWV2z u9exP5SjyjO0PAjhYgrpHfODvS2EyeqEIehpcrZaDmdmAOqTZFhTPQIfvTstIG0Xwhhm IexAyAfJZeyVUvRwSCk6/2TusJL4IdC1FUjdRIgJ45O513otX30ICEb33NTS2l5WONt5 ntfA== X-Gm-Message-State: AOAM533IEhJpZ/2O1lhU3NdSVJweOUXQBz0z+Z/X8qwthxSkDdBZJ89i JjTMSV0f8FcB0eHI5SlI01xphOdRXoE= X-Google-Smtp-Source: ABdhPJzb4b2zMjBDsUM7y14Og/FqODWOiOtV0kdQTsYYqtEA9Wqp7E+qdTiza8crZxnbwPMjJuwTEw== X-Received: by 2002:a63:e94a:: with SMTP id q10mr20675317pgj.189.1600679822211; Mon, 21 Sep 2020 02:17:02 -0700 (PDT) Received: from localhost.localdomain ([45.124.203.18]) by smtp.gmail.com with ESMTPSA id gb19sm10105690pjb.38.2020.09.21.02.16.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2020 02:17:00 -0700 (PDT) From: Joel Stanley To: Rob Herring , Andrew Jeffery Subject: [PATCH v3 2/3] soc: aspeed: Add soc info driver Date: Mon, 21 Sep 2020 18:46:43 +0930 Message-Id: <20200921091644.133107-3-joel@jms.id.au> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921091644.133107-1-joel@jms.id.au> References: <20200921091644.133107-1-joel@jms.id.au> MIME-Version: 1.0 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" This adds a SOC_BUS info driver for the ASPEED platform. The full ID table is preserved in this commit message in case someone finds a need to change the implemntation in the future. { "AST1100-A0", 0x00000200 }, { "AST1100-A1", 0x00000201 }, { "AST1100-A2", 0x00000202 }, { "AST1100-A3", 0x00000202 }, { "AST2050-A0", 0x00000200 }, { "AST2050-A1", 0x00000201 }, { "AST2050-A2", 0x00000202 }, { "AST2050-A3", 0x00000202 }, { "AST2100-A0", 0x00000300 }, { "AST2100-A1", 0x00000301 }, { "AST2100-A2", 0x00000302 }, { "AST2100-A3", 0x00000302 }, { "AST2150-A0", 0x00000202 }, { "AST2150-A1", 0x00000202 }, { "AST2200-A0", 0x00000102 }, { "AST2200-A1", 0x00000102 }, { "AST2300-A0", 0x01000003 }, { "AST2300-A1", 0x01010303 }, { "AST1300-A1", 0x01010003 }, { "AST1050-A1", 0x01010203 }, { "AST2400-A0", 0x02000303 }, { "AST2400-A1", 0x02010303 }, { "AST1400-A1", 0x02010103 }, { "AST1250-A1", 0x02010303 }, { "AST2500-A0", 0x04000303 }, { "AST2510-A0", 0x04000103 }, { "AST2520-A0", 0x04000203 }, { "AST2530-A0", 0x04000403 }, { "AST2500-A1", 0x04010303 }, { "AST2510-A1", 0x04010103 }, { "AST2520-A1", 0x04010203 }, { "AST2530-A1", 0x04010403 }, { "AST2500-A2", 0x04030303 }, { "AST2510-A2", 0x04030103 }, { "AST2520-A2", 0x04030203 }, { "AST2530-A2", 0x04030403 }, { "AST2600-A0", 0x05000303 }, { "AST2600-A1", 0x05010303 }, { "AST2600-A2", 0x05020303 }, { "AST2620-A1", 0x05010203 }, { "AST2620-A2", 0x05020203 }, Signed-off-by: Joel Stanley Reviewed-by: Andrew Jeffery --- v3: - Remove unncessary frees v2: - Fix of_node_puts - Skip kasprintf where it's not needed --- drivers/soc/aspeed/Kconfig | 7 ++ drivers/soc/aspeed/Makefile | 1 + drivers/soc/aspeed/aspeed-socinfo.c | 133 ++++++++++++++++++++++++++++ 3 files changed, 141 insertions(+) create mode 100644 drivers/soc/aspeed/aspeed-socinfo.c diff --git a/drivers/soc/aspeed/Kconfig b/drivers/soc/aspeed/Kconfig index 9ce252445605..7ece0675b1fa 100644 --- a/drivers/soc/aspeed/Kconfig +++ b/drivers/soc/aspeed/Kconfig @@ -31,6 +31,13 @@ config ASPEED_P2A_CTRL driver also provides an interface for userspace mappings to a pre-defined region. +config ASPEED_SOCINFO + bool "ASPEED SoC Information driver" + default ARCH_ASPEED + select SOC_BUS + help + Say yes to support decoding of ASPEED BMC information. + endmenu endif diff --git a/drivers/soc/aspeed/Makefile b/drivers/soc/aspeed/Makefile index b64be47f2b1f..fcab7192e1a4 100644 --- a/drivers/soc/aspeed/Makefile +++ b/drivers/soc/aspeed/Makefile @@ -2,3 +2,4 @@ obj-$(CONFIG_ASPEED_LPC_CTRL) += aspeed-lpc-ctrl.o obj-$(CONFIG_ASPEED_LPC_SNOOP) += aspeed-lpc-snoop.o obj-$(CONFIG_ASPEED_P2A_CTRL) += aspeed-p2a-ctrl.o +obj-$(CONFIG_ASPEED_SOCINFO) += aspeed-socinfo.o diff --git a/drivers/soc/aspeed/aspeed-socinfo.c b/drivers/soc/aspeed/aspeed-socinfo.c new file mode 100644 index 000000000000..26db42ef6aae --- /dev/null +++ b/drivers/soc/aspeed/aspeed-socinfo.c @@ -0,0 +1,133 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* Copyright 2019 IBM Corp. */ + +#include +#include +#include +#include +#include +#include +#include + +static struct { + const char *name; + const u32 id; +} const rev_table[] = { + /* AST2400 */ + { "AST2400", 0x02000303 }, + { "AST1400", 0x02010103 }, + { "AST1250", 0x02010303 }, + /* AST2500 */ + { "AST2500", 0x04000303 }, + { "AST2510", 0x04000103 }, + { "AST2520", 0x04000203 }, + { "AST2530", 0x04000403 }, + /* AST2600 */ + { "AST2600", 0x05000303 }, + { "AST2620", 0x05010203 }, +}; + +static const char *siliconid_to_name(u32 siliconid) +{ + unsigned int id = siliconid & 0xff00ffff; + unsigned int i; + + for (i = 0 ; i < ARRAY_SIZE(rev_table) ; ++i) { + if (rev_table[i].id == id) + return rev_table[i].name; + } + + return "Unknown"; +} + +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"; + }; + + return "??"; +} + +static int __init aspeed_socinfo_init(void) +{ + struct soc_device_attribute *attrs; + struct soc_device *soc_dev; + struct device_node *np; + void __iomem *reg; + bool has_chipid = false; + u32 siliconid; + u32 chipid[2]; + const char *machine = NULL; + + np = of_find_compatible_node(NULL, NULL, "aspeed,silicon-id"); + if (!of_device_is_available(np)) { + of_node_put(np); + return -ENODEV; + } + + reg = of_iomap(np, 0); + if (!reg) + return -ENODEV; + siliconid = readl(reg); + iounmap(reg); + + /* This is optional, the ast2400 does not have it */ + reg = of_iomap(np, 1); + if (reg) { + has_chipid = true; + chipid[0] = readl(reg); + chipid[1] = readl(reg + 4); + iounmap(reg); + } + of_node_put(np); + + attrs = kzalloc(sizeof(*attrs), GFP_KERNEL); + if (!attrs) + return -ENODEV; + + /* + * Machine: Romulus BMC + * Family: AST2500 + * Revision: A1 + * SoC ID: raw silicon revision id + * Serial Number: 64-bit chipid + */ + + np = of_find_node_by_path("/"); + of_property_read_string(np, "model", &machine); + if (machine) + attrs->machine = kstrdup(machine, GFP_KERNEL); + of_node_put(np); + + attrs->family = siliconid_to_name(siliconid); + attrs->revision = siliconid_to_rev(siliconid); + attrs->soc_id = kasprintf(GFP_KERNEL, "%08x", siliconid); + + if (has_chipid) + attrs->serial_number = kasprintf(GFP_KERNEL, "%08x%08x", + chipid[1], chipid[0]); + + soc_dev = soc_device_register(attrs); + if (IS_ERR(soc_dev)) { + kfree(attrs->soc_id); + kfree(attrs->serial_number); + kfree(attrs); + return PTR_ERR(soc_dev); + } + + pr_info("ASPEED %s rev %s (%s)\n", + attrs->family, + attrs->revision, + attrs->soc_id); + + return 0; +} +early_initcall(aspeed_socinfo_init); From patchwork Mon Sep 21 09:16:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 1368188 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BvzNn4vXbz9sTN for ; Mon, 21 Sep 2020 19:17:29 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=j5DOgZ4q; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4BvzNn4QjDzDqc7 for ; Mon, 21 Sep 2020 19:17:29 +1000 (AEST) X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::1043; helo=mail-pj1-x1043.google.com; envelope-from=joel.stan@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=jms.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=j5DOgZ4q; dkim-atps=neutral Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4BvzNP19RVzDqdZ for ; Mon, 21 Sep 2020 19:17:08 +1000 (AEST) Received: by mail-pj1-x1043.google.com with SMTP id fa1so7133573pjb.0 for ; Mon, 21 Sep 2020 02:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sn5K/Ys4ffnC/CyJiVbEeEFS78Vl8Zham2P4UxWGNJU=; b=j5DOgZ4qszU7bfjOt4m2bI23gOkc2lxMD2ZlNSuVDQQh1TEYqXUL20mEke0dBWjD0G LdtvuZJc8TCK8NZPBx4IVi2xZ0eGOlSrkYMtyV/sb9H81nVJtjbd1XDHoN5GuOtDBnH0 v3BAjNlgm1aqaF+aE9SERxiF0ILDWB3Cr/FwCftJG5xC28cvcQKRt8++4WoKLrDdeRYO zFNFQOAtA4Z+HiZ3asZB3m9TjJQe+/RobbF4uEXw2IoDWpy9OD0qkQ0IPZC+4k7E9bac /8BnIFhjfp9oe3CSSBqwetRzOYV+HQM1QYIH+KpgScj4IpE792qM/wMOzWSESfSqKSk0 WGLw== 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 :in-reply-to:references:mime-version:content-transfer-encoding; bh=sn5K/Ys4ffnC/CyJiVbEeEFS78Vl8Zham2P4UxWGNJU=; b=pGjPhtrk3nG6mgU8erWTkVraKL7ZXUvXvSV4jWEU80T5w5YsD3Vwg6U+nb/41/9CD8 470+VYpK4EXQfVqsYDGEras3Z2ot/9ATYYlgL8L/74oFI5RseLbhrxDqZsd+eq3dMSeC 9H36AgwlK2JhFiOA5mndkx38XEqC9fokqdJc381olhgyx6Vf80pVvUG3JyANHmcR+nla jCWKMvxuRQBhzF2f4u22SsNr+TJscqovJPYKeOPdYPOudnEuJg84iZf9/azqJ/tpFsKx zIXKkRGpgh9dIHypTrWUUUvoCJhUJLrZ5xPK7rwb+3zAdKr1TgrT2b32evIyeapzpIw3 AKug== X-Gm-Message-State: AOAM533tcN8LUqBPZQU4mBaFH61BjdKs2VDuKbx1LeMeGMl8jYrjVTsO mB0UVb1EhmBKuxv/5SLX/cE= X-Google-Smtp-Source: ABdhPJyIJ30bJu40sRZT1WpTmfeK1pthj3AVWC/Gymfjp5WKgSeZOivdPOYyolIQ7OX3y0hrK4VWog== X-Received: by 2002:a17:90b:f83:: with SMTP id ft3mr23676343pjb.234.1600679825817; Mon, 21 Sep 2020 02:17:05 -0700 (PDT) Received: from localhost.localdomain ([45.124.203.18]) by smtp.gmail.com with ESMTPSA id gb19sm10105690pjb.38.2020.09.21.02.17.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Sep 2020 02:17:04 -0700 (PDT) From: Joel Stanley To: Rob Herring , Andrew Jeffery Subject: [PATCH v3 3/3] ARM: dts: aspeed: Add silicon id node Date: Mon, 21 Sep 2020 18:46:44 +0930 Message-Id: <20200921091644.133107-4-joel@jms.id.au> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921091644.133107-1-joel@jms.id.au> References: <20200921091644.133107-1-joel@jms.id.au> MIME-Version: 1.0 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux ASPEED SoC development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aspeed@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" This register describes the silicon id and chip unique id. It varies between CPU revisions, but is always part of the SCU. Signed-off-by: Joel Stanley Reviewed-by: Andrew Jeffery --- v2: Fix whitespace --- arch/arm/boot/dts/aspeed-g4.dtsi | 5 +++++ arch/arm/boot/dts/aspeed-g5.dtsi | 5 +++++ arch/arm/boot/dts/aspeed-g6.dtsi | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi index 82f0213e3a3c..b3dafbc8caca 100644 --- a/arch/arm/boot/dts/aspeed-g4.dtsi +++ b/arch/arm/boot/dts/aspeed-g4.dtsi @@ -192,6 +192,11 @@ p2a: p2a-control@2c { status = "disabled"; }; + silicon-id@7c { + compatible = "aspeed,ast2400-silicon-id", "aspeed,silicon-id"; + reg = <0x7c 0x4>; + }; + pinctrl: pinctrl@80 { reg = <0x80 0x18>, <0xa0 0x10>; compatible = "aspeed,ast2400-pinctrl"; diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi index 9c91afb2b404..c6862182313a 100644 --- a/arch/arm/boot/dts/aspeed-g5.dtsi +++ b/arch/arm/boot/dts/aspeed-g5.dtsi @@ -239,6 +239,11 @@ p2a: p2a-control@2c { status = "disabled"; }; + silicon-id@7c { + compatible = "aspeed,ast2500-silicon-id", "aspeed,silicon-id"; + reg = <0x7c 0x4 0x150 0x8>; + }; + pinctrl: pinctrl@80 { compatible = "aspeed,ast2500-pinctrl"; reg = <0x80 0x18>, <0xa0 0x10>; diff --git a/arch/arm/boot/dts/aspeed-g6.dtsi b/arch/arm/boot/dts/aspeed-g6.dtsi index b58220a49cbd..1ce3a1f06f7f 100644 --- a/arch/arm/boot/dts/aspeed-g6.dtsi +++ b/arch/arm/boot/dts/aspeed-g6.dtsi @@ -311,6 +311,11 @@ pinctrl: pinctrl { compatible = "aspeed,ast2600-pinctrl"; }; + silicon-id@14 { + compatible = "aspeed,ast2600-silicon-id", "aspeed,silicon-id"; + reg = <0x14 0x4 0x5b0 0x8>; + }; + smp-memram@180 { compatible = "aspeed,ast2600-smpmem"; reg = <0x180 0x40>;