From patchwork Tue Mar 21 15:16:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 72927 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:1828:b0:ab:1fc6:e12a with SMTP id l40csp2423161dyk; Tue, 21 Mar 2023 08:55:29 -0700 (PDT) X-Google-Smtp-Source: AK7set9zB04lnpy33dNeGWvfGZ1slyIKECFdfgd9uq4Rv5UrUMOjiTWNY7QUIbnl1ir6OqBIFkxo X-Received: by 2002:a17:902:d4cb:b0:19c:d7a9:8bf0 with SMTP id o11-20020a170902d4cb00b0019cd7a98bf0mr4288658plg.10.1679414129317; Tue, 21 Mar 2023 08:55:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679414129; cv=none; d=google.com; s=arc-20160816; b=qG6webT4hRa5HkGiQN6P7hI79nHxwBDNC/bi+zQO4ILvn2q3r6co96uHS2OOwUM1zP mCLZe3VNdCGA7jbi4X0jcVjMxc2PbNkgnsyitN3FqGFsR6hwF4uvjxYHCYVbtSxqwdmh wO2Rigx3RWnLIf+ryr2a50nCemWFjOOFWKTvXj/FlBvpkR6LYHF68UEZaiAy1//JBUzo xdxg/JZ14axvfWklssnSjWOJWefJYVHgqExvyFQRc0W00QBPE7WUUPUf0Z/qbnoNuK5K I5zWridIHN8DIb7suTpXNYaSuywrgUP1SeUbzplZ7Qlz34sKRVMwpS4Q1T71b9mowvNh 1SBw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AV88f+76ahwOXTELtVaHbKx8Syz2qs3ENASHWyGOxMc=; b=rg53Nqp51zNdI9vnwKJoJPdj+qHYi66QaZkeYR6QqBuKzZKzCoTGhE9exLEoEF5C6G oSs2Q9PhlzwndeSETFwUsqAKskpu0XMFQO8/5N9cWQzLv0EEbv8drBbKf9vOO4kl69eH 5ry44GoIg4YdYOwMWyEQzdq69mpoG+CngYutLu+2zeuAhQeY/J/slxsncck7tSxEko0B QVLoTe2hQYDoA3PQZby0wzZ3+IVvyA8XWnIx27q8ulD5f2I15g4HSrIj1f9JY+hzKbGe Xzkb5xV8EgY9dav2rJaAJReAYmktXKMp+bupn211bDaYe39XztgCuPCf8CGN8miZ6RkP CVEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=owp+hZHr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k21-20020a170902761500b001a19248bfcfsi13076976pll.511.2023.03.21.08.55.15; Tue, 21 Mar 2023 08:55:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=owp+hZHr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231659AbjCUPR2 (ORCPT + 99 others); Tue, 21 Mar 2023 11:17:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231614AbjCUPRS (ORCPT ); Tue, 21 Mar 2023 11:17:18 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 984C038649; Tue, 21 Mar 2023 08:17:13 -0700 (PDT) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32LEhJe7030365; Tue, 21 Mar 2023 15:16:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=AV88f+76ahwOXTELtVaHbKx8Syz2qs3ENASHWyGOxMc=; b=owp+hZHrs42sVJ44sB3mN7X6Jt2JcBt6310sBqsfMgtEpn5hpop8qhASqI6D9WPVjJVT KfLU+gyvnqUq6fMTFFbhEihrlgbIvLEYK3MKRKQIjeFMf9LF+HMbgqZssCDUKGa1gJ3K 3WZxVy1jYrAz+GjCsclieQnmHPeghHK972TKOnyI8AWYcpi/U82GotJF9V5/XBjICclx dqpQbgDXki7+73mt2MV/GqSmSL1IBXJcReX5r14DEdlaJVjRS/WXvudj+u6vJmO/wAHS oLFHjxg/DXHbOhhTNNGjLj9iiW+JV6mkAY1qx+8K3J/UnWVTqNrVrPZqaC3+TNbP0ro2 Tg== Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3pfc52nhbq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 15:16:53 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32LEoS99001461; Tue, 21 Mar 2023 15:16:52 GMT Received: from smtprelay07.wdc07v.mail.ibm.com ([9.208.129.116]) by ppma02wdc.us.ibm.com (PPS) with ESMTPS id 3pd4x737s5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 15:16:52 +0000 Received: from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com [10.39.53.228]) by smtprelay07.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32LFGpnW2949658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Mar 2023 15:16:51 GMT Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7A5D458063; Tue, 21 Mar 2023 15:16:51 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 03C2B5804B; Tue, 21 Mar 2023 15:16:50 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.160.111.39]) by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTP; Tue, 21 Mar 2023 15:16:49 +0000 (GMT) From: Eddie James To: linux-kernel@vger.kernel.org Cc: linux-aspeed@lists.ozlabs.org, devicetree@vger.kernel.org, andrew@aj.id.au, joel@jms.id.au, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, Eddie James Subject: [PATCH v2 1/4] eeprom: ee1004: Enable devices on multiple busses Date: Tue, 21 Mar 2023 10:16:39 -0500 Message-Id: <20230321151642.461618-2-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230321151642.461618-1-eajames@linux.ibm.com> References: <20230321151642.461618-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: zLSjT5HD4Kbb_31fCD-c9IZnScW7idoq X-Proofpoint-ORIG-GUID: zLSjT5HD4Kbb_31fCD-c9IZnScW7idoq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-21_11,2023-03-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 adultscore=0 phishscore=0 lowpriorityscore=0 suspectscore=0 mlxscore=0 spamscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=999 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303210118 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760993349947209110?= X-GMAIL-MSGID: =?utf-8?q?1760993349947209110?= The driver previously prevented probing devices on more than one bus due to locking constraints with the special page addresses. This constraint can be removed by allocating a reference-counted bus structure containing the lock, rather than using global variables. Signed-off-by: Eddie James --- drivers/misc/eeprom/ee1004.c | 175 +++++++++++++++++++++-------------- 1 file changed, 106 insertions(+), 69 deletions(-) diff --git a/drivers/misc/eeprom/ee1004.c b/drivers/misc/eeprom/ee1004.c index c8c6deb7ed89..950813821087 100644 --- a/drivers/misc/eeprom/ee1004.c +++ b/drivers/misc/eeprom/ee1004.c @@ -9,12 +9,15 @@ * Copyright (C) 2008 Wolfram Sang, Pengutronix */ +#include #include #include #include +#include #include #include #include +#include /* * DDR4 memory modules use special EEPROMs following the Jedec EE1004 @@ -31,20 +34,24 @@ * over performance. */ -#define EE1004_ADDR_SET_PAGE 0x36 +#define EE1004_ADDR_SET_PAGE0 0x36 +#define EE1004_ADDR_SET_PAGE1 0x37 #define EE1004_NUM_PAGES 2 #define EE1004_PAGE_SIZE 256 #define EE1004_PAGE_SHIFT 8 #define EE1004_EEPROM_SIZE (EE1004_PAGE_SIZE * EE1004_NUM_PAGES) -/* - * Mutex protects ee1004_set_page and ee1004_dev_count, and must be held - * from page selection to end of read. - */ -static DEFINE_MUTEX(ee1004_bus_lock); -static struct i2c_client *ee1004_set_page[EE1004_NUM_PAGES]; -static unsigned int ee1004_dev_count; -static int ee1004_current_page; +struct ee1004_bus { + struct kref kref; + struct list_head list; + struct mutex lock; + struct i2c_adapter *adapter; + struct i2c_client *set_page_clients[EE1004_NUM_PAGES]; + int page; +}; + +static LIST_HEAD(ee1004_busses); +static DEFINE_MUTEX(ee1004_busses_lock); static const struct i2c_device_id ee1004_ids[] = { { "ee1004", 0 }, @@ -54,11 +61,11 @@ MODULE_DEVICE_TABLE(i2c, ee1004_ids); /*-------------------------------------------------------------------------*/ -static int ee1004_get_current_page(void) +static int ee1004_get_current_page(struct ee1004_bus *bus) { int err; - err = i2c_smbus_read_byte(ee1004_set_page[0]); + err = i2c_smbus_read_byte(bus->set_page_clients[0]); if (err == -ENXIO) { /* Nack means page 1 is selected */ return 1; @@ -72,33 +79,30 @@ static int ee1004_get_current_page(void) return 0; } -static int ee1004_set_current_page(struct device *dev, int page) +static int ee1004_set_current_page(struct ee1004_bus *bus, int page) { int ret; - if (page == ee1004_current_page) + if (page == bus->page) return 0; /* Data is ignored */ - ret = i2c_smbus_write_byte(ee1004_set_page[page], 0x00); + ret = i2c_smbus_write_byte(bus->set_page_clients[page], 0x00); + /* * Don't give up just yet. Some memory modules will select the page * but not ack the command. Check which page is selected now. */ - if (ret == -ENXIO && ee1004_get_current_page() == page) + if (ret == -ENXIO && ee1004_get_current_page(bus) == page) ret = 0; - if (ret < 0) { - dev_err(dev, "Failed to select page %d (%d)\n", page, ret); + if (ret < 0) return ret; - } - - dev_dbg(dev, "Selected page %d\n", page); - ee1004_current_page = page; + bus->page = page; return 0; } -static ssize_t ee1004_eeprom_read(struct i2c_client *client, char *buf, +static ssize_t ee1004_eeprom_read(struct i2c_client *client, struct ee1004_bus *bus, char *buf, unsigned int offset, size_t count) { int status, page; @@ -106,9 +110,11 @@ static ssize_t ee1004_eeprom_read(struct i2c_client *client, char *buf, page = offset >> EE1004_PAGE_SHIFT; offset &= (1 << EE1004_PAGE_SHIFT) - 1; - status = ee1004_set_current_page(&client->dev, page); - if (status) + status = ee1004_set_current_page(bus, page); + if (status) { + dev_err(&client->dev, "Failed to select page %d (%d)\n", page, status); return status; + } /* Can't cross page boundaries */ if (offset + count > EE1004_PAGE_SIZE) @@ -125,6 +131,7 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj, char *buf, loff_t off, size_t count) { struct i2c_client *client = kobj_to_i2c_client(kobj); + struct ee1004_bus *bus = i2c_get_clientdata(client); size_t requested = count; int ret = 0; @@ -132,10 +139,10 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj, * Read data from chip, protecting against concurrent access to * other EE1004 SPD EEPROMs on the same adapter. */ - mutex_lock(&ee1004_bus_lock); + mutex_lock(&bus->lock); while (count) { - ret = ee1004_eeprom_read(client, buf, off, count); + ret = ee1004_eeprom_read(client, bus, buf, off, count); if (ret < 0) goto out; @@ -144,7 +151,7 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj, count -= ret; } out: - mutex_unlock(&ee1004_bus_lock); + mutex_unlock(&bus->lock); return ret < 0 ? ret : requested; } @@ -158,18 +165,56 @@ static struct bin_attribute *ee1004_attrs[] = { BIN_ATTRIBUTE_GROUPS(ee1004); -static void ee1004_cleanup(int idx) +static void ee1004_bus_unregister(struct ee1004_bus *bus) { - if (--ee1004_dev_count == 0) - while (--idx >= 0) { - i2c_unregister_device(ee1004_set_page[idx]); - ee1004_set_page[idx] = NULL; - } + i2c_unregister_device(bus->set_page_clients[1]); + i2c_unregister_device(bus->set_page_clients[0]); +} + +static void ee1004_bus_release(struct kref *kref) +{ + struct ee1004_bus *bus = container_of(kref, struct ee1004_bus, kref); + + ee1004_bus_unregister(bus); + + mutex_lock(&ee1004_busses_lock); + list_del(&bus->list); + mutex_unlock(&ee1004_busses_lock); + + kfree(bus); +} + +static int ee1004_bus_initialize(struct ee1004_bus *bus, struct i2c_adapter *adapter) +{ + bus->set_page_clients[0] = i2c_new_dummy_device(adapter, EE1004_ADDR_SET_PAGE0); + if (IS_ERR(bus->set_page_clients[0])) + return PTR_ERR(bus->set_page_clients[0]); + + bus->set_page_clients[1] = i2c_new_dummy_device(adapter, EE1004_ADDR_SET_PAGE1); + if (IS_ERR(bus->set_page_clients[1])) { + i2c_unregister_device(bus->set_page_clients[0]); + return PTR_ERR(bus->set_page_clients[1]); + } + + bus->page = ee1004_get_current_page(bus); + if (bus->page < 0) { + ee1004_bus_unregister(bus); + return bus->page; + } + + kref_init(&bus->kref); + list_add(&bus->list, &ee1004_busses); + mutex_init(&bus->lock); + bus->adapter = adapter; + + return 0; } static int ee1004_probe(struct i2c_client *client) { - int err, cnr = 0; + struct ee1004_bus *bus; + bool found = false; + int rc = 0; /* Make sure we can operate on this adapter */ if (!i2c_check_functionality(client->adapter, @@ -178,53 +223,45 @@ static int ee1004_probe(struct i2c_client *client) I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_READ_BYTE_DATA)) return -EPFNOSUPPORT; - /* Use 2 dummy devices for page select command */ - mutex_lock(&ee1004_bus_lock); - if (++ee1004_dev_count == 1) { - for (cnr = 0; cnr < EE1004_NUM_PAGES; cnr++) { - struct i2c_client *cl; - - cl = i2c_new_dummy_device(client->adapter, EE1004_ADDR_SET_PAGE + cnr); - if (IS_ERR(cl)) { - err = PTR_ERR(cl); - goto err_clients; - } - ee1004_set_page[cnr] = cl; + mutex_lock(&ee1004_busses_lock); + list_for_each_entry(bus, &ee1004_busses, list) { + if (bus->adapter == client->adapter) { + kref_get(&bus->kref); + found = true; + break; + } + } + + if (!found) { + bus = kzalloc(sizeof(*bus), GFP_KERNEL); + if (!bus) { + rc = -ENOMEM; + goto unlock; } - /* Remember current page to avoid unneeded page select */ - err = ee1004_get_current_page(); - if (err < 0) - goto err_clients; - dev_dbg(&client->dev, "Currently selected page: %d\n", err); - ee1004_current_page = err; - } else if (client->adapter != ee1004_set_page[0]->adapter) { - dev_err(&client->dev, - "Driver only supports devices on a single I2C bus\n"); - err = -EOPNOTSUPP; - goto err_clients; + rc = ee1004_bus_initialize(bus, client->adapter); + if (rc) { + kfree(bus); + goto unlock; + } } - mutex_unlock(&ee1004_bus_lock); + + i2c_set_clientdata(client, bus); dev_info(&client->dev, "%u byte EE1004-compliant SPD EEPROM, read-only\n", EE1004_EEPROM_SIZE); - return 0; - - err_clients: - ee1004_cleanup(cnr); - mutex_unlock(&ee1004_bus_lock); - - return err; +unlock: + mutex_unlock(&ee1004_busses_lock); + return rc; } static void ee1004_remove(struct i2c_client *client) { - /* Remove page select clients if this is the last device */ - mutex_lock(&ee1004_bus_lock); - ee1004_cleanup(EE1004_NUM_PAGES); - mutex_unlock(&ee1004_bus_lock); + struct ee1004_bus *bus = i2c_get_clientdata(client); + + kref_put(&bus->kref, ee1004_bus_release); } /*-------------------------------------------------------------------------*/ From patchwork Tue Mar 21 15:16:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 72921 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:1828:b0:ab:1fc6:e12a with SMTP id l40csp2419816dyk; Tue, 21 Mar 2023 08:49:47 -0700 (PDT) X-Google-Smtp-Source: AK7set9aIZDBA24Wg0UrYUHduXuFRLGiV6zv4LBbwNoxJIGU3L/AjqxsKAS2IoPJU4BHLWY6Wr7j X-Received: by 2002:a17:90b:4b92:b0:23d:3698:8ed3 with SMTP id lr18-20020a17090b4b9200b0023d36988ed3mr236207pjb.22.1679413786875; Tue, 21 Mar 2023 08:49:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679413786; cv=none; d=google.com; s=arc-20160816; b=SB1sb0pZmdf59Ha9rZYT6G9fMpVBXJtjIdYmC9UddEc6seOTe/BlXXPBYpCCKfkyHB BMYl0z6dghltuJ5lFcCUoeWzahEggRGPk2MZpMIFnsSQUlCF9WNJl3c5rkNNUgaSa8jk 90p6OtqaXSDO6FfknfMORPYzf0Q8BzEqCvYyMjDJNTzOLXVQGBD8e+poQHaNQWNGvfy4 hAGt/gh6ophvnp782dR5CJTDz/R77QLU3GRiOiTbgQwgzrPGrfvRGL4S4GihflbDbiHu YS1ir0NBA/GPafPv7MrwvQE5e2JG3U64ETu6m/eqNX1ullWcRRur69I68DftKqwImPQf ctHg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CHCxWc3rbFcp6UZWpf/pCxYlaalqi6G6tNsTY1PMYM4=; b=dGqn2yeZj+7/iTxXST/cmWYWpbZer3yrcMt2AatyNI77s3X0HeO1FI56qCTlw5bQYm moJZlpc4jy027hXuWbgITEiNzG+xNemPAh0lPrYqUPlVMmNiJSSXEoSJHpBeotFGV33i zQQih4OQzN7SQ3i6dO8vsFgovjKVY6e1u2tb920hM3pkIn5Wb3te2McsQC/kYTmL7UFm M2zo5kO0+5Dii17oWwHMjTa7WU3vKqoakISHd9jJXTs/QAqveeJbiyZCu9m8Z4SZEmWM 8BHefkZE1w8jnwG7dPjAJk+IqJiDWuGAyEErSNVuQINmtq6ysTObJpS5v0+S2M8oG9wz CNvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=iIaJFDFl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l8-20020a170903120800b001a05bb54963si14332704plh.176.2023.03.21.08.49.34; Tue, 21 Mar 2023 08:49:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=iIaJFDFl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231625AbjCUPRV (ORCPT + 99 others); Tue, 21 Mar 2023 11:17:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbjCUPRR (ORCPT ); Tue, 21 Mar 2023 11:17:17 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F60A26CF3; Tue, 21 Mar 2023 08:17:15 -0700 (PDT) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32LEh78R024839; Tue, 21 Mar 2023 15:16:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=CHCxWc3rbFcp6UZWpf/pCxYlaalqi6G6tNsTY1PMYM4=; b=iIaJFDFlcNCRPRB3mGP+5Q6NWvTt/7b4dV4LX4IfMH+yjWT8ykhluGWXXzCzuLiyKTjX HyBLuPib/tI5rNk2oqvgVzp7oM5K00TWeF5N+lTMqlAf2uMRoUfMPsWNEZ1sYZi+Y2/n W1A6YYn485TsjxPSe67iZp8qmOrNQ5RAXhRF0MOAa3K4JjZJfeo/VpzH2kMcJW3h1Q4C rDSGehGyagX+4f6JQ8XIYCt10qWUn/adOsPisTLIcoBj4brIKmi3yfWra/jNiQ8vsNgI UhUxCFkbWDe8TSMDD6lyzJ7bZo2BbBlFWodwvCexsHE1p1oTwg2GtunBYlGL3p2V+LPN rA== Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3pf7qnv3pk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 15:16:56 +0000 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32LEE4lx030320; Tue, 21 Mar 2023 15:16:55 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([9.208.130.98]) by ppma03wdc.us.ibm.com (PPS) with ESMTPS id 3pd4x6u7gu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 15:16:55 +0000 Received: from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com [10.39.53.228]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32LFGrFJ61800786 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Mar 2023 15:16:54 GMT Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CDFF55805B; Tue, 21 Mar 2023 15:16:53 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 521F958063; Tue, 21 Mar 2023 15:16:52 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.160.111.39]) by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTP; Tue, 21 Mar 2023 15:16:52 +0000 (GMT) From: Eddie James To: linux-kernel@vger.kernel.org Cc: linux-aspeed@lists.ozlabs.org, devicetree@vger.kernel.org, andrew@aj.id.au, joel@jms.id.au, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, Eddie James Subject: [PATCH v2 2/4] doc: Add Atmel AT30TSE serial eeprom Date: Tue, 21 Mar 2023 10:16:40 -0500 Message-Id: <20230321151642.461618-3-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230321151642.461618-1-eajames@linux.ibm.com> References: <20230321151642.461618-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: BDGxzua8XQlU3P1guiQT_48bq79xeThX X-Proofpoint-ORIG-GUID: BDGxzua8XQlU3P1guiQT_48bq79xeThX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-21_11,2023-03-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 malwarescore=0 suspectscore=0 bulkscore=0 lowpriorityscore=0 mlxlogscore=999 priorityscore=1501 clxscore=1015 phishscore=0 impostorscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303210118 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760991733671356083?= X-GMAIL-MSGID: =?utf-8?q?1760992990914442992?= The AT30TSE is compatible with the JEDEC EE1004 standard. Document it as a trivial I2C device. Signed-off-by: Eddie James --- Documentation/devicetree/bindings/trivial-devices.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml index 6f482a254a1d..43e26c73a95f 100644 --- a/Documentation/devicetree/bindings/trivial-devices.yaml +++ b/Documentation/devicetree/bindings/trivial-devices.yaml @@ -47,6 +47,8 @@ properties: - ams,iaq-core # i2c serial eeprom (24cxx) - at,24c08 + # i2c serial eeprom (EE1004 standard) + - atmel,at30tse # i2c trusted platform module (TPM) - atmel,at97sc3204t # ATSHA204 - i2c h/w symmetric crypto module From patchwork Tue Mar 21 15:16:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 72915 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1846845wrt; Tue, 21 Mar 2023 08:34:00 -0700 (PDT) X-Google-Smtp-Source: AK7set+u/GbvJxb3XjVYhDfOvutYaVQTiakhsYDqnzZbWlNHyeUiWXB7pu9SZYE73fqJGoPSHBX8 X-Received: by 2002:a62:1d12:0:b0:628:1852:7343 with SMTP id d18-20020a621d12000000b0062818527343mr288492pfd.2.1679412840376; Tue, 21 Mar 2023 08:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679412840; cv=none; d=google.com; s=arc-20160816; b=nDs1UFB3gK71+oFie5YlJIK5QqiNsXaepSrwYJjOJ2ZgFmNIc4ZoD7Aw3irHCq0RYE QKX0aT2HpzYCy5T84d7wlOs/8xyDDlUGX+PhaBgL7coPWbpOvDlkTNcRKi7sO1MHfHur F28Rc69SDA/kzoYRvCCgJjt4llgNEAP7veS/sjw3PJcIPSrwG9Y6QWhRLgsfGVrxbEQT c2Yh3wbKKpafBYgnYoh0IuY60mS0BfjSYQXwXeLv/wRrE6UV9y9TWKmf63aJ6KGlLrN4 ERQgrhSkz2AF8UvsleNmNKdXe+u/iQAOQXhCCjP2L/zV13J4ci/ZMCF3HAjnCYZ3N5dr ArXg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vbLhpg+PI2Rym4W/kWQG3RHITMxtpIWM1agvPvo6g0A=; b=jtE8XFqSzAcnF/SxywzkLyO2gEx29wir+aG+2QdP6xvyttdIjMv3Z+tzAA0sGkXP5s 0uj6qz02mluu6x5n0caPZ43rMkWQTSLO++lyaZFRAt/cvByd8Q2qNWev9x5KCOjFOQGG WzZ8ZlFp9oa5LHLprU+S2R64yBodsuCn10nnUFtwd+UkVkTtP851z81BDYDHPxSq1m3P GheOhyGhy3N/9oUpYxkqqoJwmyTde2+p34SC+JR/cEgm3F+Wt6IpdUOTDY6CGKagmRGM OgHl3ZN9HO4ATRwDKQWUMDrxaO/HUOshLUr/5DmuzOeTerKV+6yb3F7Q2S2tMRUyrblI u+ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=B6d5SdVz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 13-20020a63070d000000b0050fbb5b4bccsi361668pgh.105.2023.03.21.08.33.41; Tue, 21 Mar 2023 08:34:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=B6d5SdVz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231646AbjCUPRZ (ORCPT + 99 others); Tue, 21 Mar 2023 11:17:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231220AbjCUPRR (ORCPT ); Tue, 21 Mar 2023 11:17:17 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31F433BDBB; Tue, 21 Mar 2023 08:17:15 -0700 (PDT) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32LEh3JZ016684; Tue, 21 Mar 2023 15:16:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=vbLhpg+PI2Rym4W/kWQG3RHITMxtpIWM1agvPvo6g0A=; b=B6d5SdVzpiGIxzuKxR/wWjNXk8Uor5NdEtqSOyox6/6H1I3DZS75T4WfjEvAC/t/K+5w OElCcjleJsDhZmBi8pPjXcD7KmkdY4ZOsEWN8cxcU26BDOcRy5/bRgzTTivxvfqkU+Bk UhTGok+I50jhyNsRwvXn4onEOlZPRZFPZHhC2eNT5ASuj1kkUS+F6Fl7ZUTYX63TEqpG T+1XwukgqnuEgIcU+KUkU156BwbQXNNg7+ERHDpxfN+Ail0+V4cTiswdzQqserB3/eRZ 46DG9sZv1v/1UU6JoG5s4X8iLxI6O2e5lFRJF8oQAW9t5VTggzpxaIB/NAyoR5Ze/c9e EQ== Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pf92421s3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 15:16:58 +0000 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32LF2HbD032441; Tue, 21 Mar 2023 15:16:57 GMT Received: from smtprelay06.dal12v.mail.ibm.com ([9.208.130.100]) by ppma05wdc.us.ibm.com (PPS) with ESMTPS id 3pd4x736jn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 15:16:57 +0000 Received: from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com [10.39.53.228]) by smtprelay06.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32LFGuhc6160974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Mar 2023 15:16:56 GMT Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3E52658066; Tue, 21 Mar 2023 15:16:56 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ABF5D58065; Tue, 21 Mar 2023 15:16:54 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.160.111.39]) by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTP; Tue, 21 Mar 2023 15:16:54 +0000 (GMT) From: Eddie James To: linux-kernel@vger.kernel.org Cc: linux-aspeed@lists.ozlabs.org, devicetree@vger.kernel.org, andrew@aj.id.au, joel@jms.id.au, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, Eddie James Subject: [PATCH v2 3/4] eeprom: ee1004: Add devicetree binding Date: Tue, 21 Mar 2023 10:16:41 -0500 Message-Id: <20230321151642.461618-4-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230321151642.461618-1-eajames@linux.ibm.com> References: <20230321151642.461618-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 79e012hUrlu-aSBvM21uiScPTC0ymbzc X-Proofpoint-ORIG-GUID: 79e012hUrlu-aSBvM21uiScPTC0ymbzc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-21_11,2023-03-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 clxscore=1015 impostorscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303210118 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760991998227648399?= X-GMAIL-MSGID: =?utf-8?q?1760991998227648399?= Add an OF match table for devicetree instantiation of EE1004 devices. Signed-off-by: Eddie James --- drivers/misc/eeprom/ee1004.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/misc/eeprom/ee1004.c b/drivers/misc/eeprom/ee1004.c index 950813821087..72068bb72621 100644 --- a/drivers/misc/eeprom/ee1004.c +++ b/drivers/misc/eeprom/ee1004.c @@ -59,6 +59,12 @@ static const struct i2c_device_id ee1004_ids[] = { }; MODULE_DEVICE_TABLE(i2c, ee1004_ids); +static const struct of_device_id ee1004_of_match[] = { + { .compatible = "atmel,at30tse" }, + {} +}; +MODULE_DEVICE_TABLE(of, ee1004_of_match); + /*-------------------------------------------------------------------------*/ static int ee1004_get_current_page(struct ee1004_bus *bus) @@ -270,6 +276,7 @@ static struct i2c_driver ee1004_driver = { .driver = { .name = "ee1004", .dev_groups = ee1004_groups, + .of_match_table = ee1004_of_match, }, .probe_new = ee1004_probe, .remove = ee1004_remove, From patchwork Tue Mar 21 15:16:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 72912 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp1844783wrt; Tue, 21 Mar 2023 08:30:26 -0700 (PDT) X-Google-Smtp-Source: AK7set9U3sbjDP8cgqi64aLvafhsoo07Vi+tO3MCrIj2m5GmZ1RaeuXExJnbgTooL4ZM+OiIWpBR X-Received: by 2002:a17:90b:4f48:b0:23b:5537:8c99 with SMTP id pj8-20020a17090b4f4800b0023b55378c99mr22075pjb.45.1679412626603; Tue, 21 Mar 2023 08:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679412626; cv=none; d=google.com; s=arc-20160816; b=c07OKNx/6CuN5VbHwkhhFfUZ0QHdciFS5lXC6o3Pauc/PLiZo4nVQdYcD08M6p+3we 1roacvPzziaYNamQ8m5/FnF4F1JwCJRhaQt2zLMitqExYvZl5vKaaT5HNbgkszB4x7CM y7E7PbFiay+Re5fog9xFjLfvIn6Gjrv4udZAODti7qF1BN03KLekrbWuCIoyRF3FAhzv VSjH/eLVv84STtfdifYZ9asrWKLNujyIt2nxENH3u6ZwkArinGexG4TJW4msnX8AX43i nuA6t8wd/z2laTru6A1OxWqLMv5h22rV1TvEv4bMAopUVOezR5z1OfwsgD/XgyM4dWgQ rvQQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=dhhNXJsGDiYrFRftxc7OOljCn824ZAzW6LGRuHROY7M=; b=EXQ+JVe7lkkJYp1ZktX1K0vCy/BZiAF3NtU6Vu5gNDD2Q1zuXlcDhKA5nYIYsaECxv t4TxfMQROwg40mlyO3t8QCNvvWwwOQrT+pbTyFmhySQtZA+fJ1Vh+DY0jDB4CWo1+2fx p27RQ3w34Hrd5bGUY7aF+P6dWJFE0YEXTshKUimwz2GoGCa+IuiYhlZVHiHMfT93Vz69 jPOkFX9LO1UDHXSTKDKXpBTh+pOcS9YwG4cas8B34iG+0g1rwS2lIfpzS6tulji10XJ7 XvXTPW2apcuwZIAk7PCHm++6i0ozc+w29L/qnmC1OHRBbYNhbNW7oOz5tgX9iUBgbYq4 7HEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=UNkxUlo7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lr13-20020a17090b4b8d00b0023d2d9e0483si15899374pjb.109.2023.03.21.08.30.10; Tue, 21 Mar 2023 08:30:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=UNkxUlo7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231636AbjCUPRX (ORCPT + 99 others); Tue, 21 Mar 2023 11:17:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231597AbjCUPRR (ORCPT ); Tue, 21 Mar 2023 11:17:17 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51200231F8; Tue, 21 Mar 2023 08:17:13 -0700 (PDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32LEfHcX031372; Tue, 21 Mar 2023 15:17:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=dhhNXJsGDiYrFRftxc7OOljCn824ZAzW6LGRuHROY7M=; b=UNkxUlo7RrrMKtKByKTmuwSRd+b6JPnz5pTKXY+J7MIpCFMcU4r0gLB5bs4zmkVVumYz 6o6X02kQbFZjj2I4FKUXAAgKe4bz4tbsUGgtu/U1+wfoF8ljQxDCNEHPuAHYZfo+1MWX ZCZgivIVNwYYrDvgVlTTXFQKIm8uSQtulsLrd9YgJIZG8glV+9KtJFbdKFLDUCkogPiS k1RkogLtTB1FBrtTAQ4n9O9IxbnILSkrjMok6GoEbEfGOPFWebQKrPyfi+e2yV//C+6o X5wA5p3pgIVEaTHi0zW9R8wsim76ehpYG0ZZaRRh6xOtNyZ+dAEvz2w2gPF2+5DQP43N 2Q== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pfat97mem-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 15:17:01 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32LFEa3X029517; Tue, 21 Mar 2023 15:17:00 GMT Received: from smtprelay01.wdc07v.mail.ibm.com ([9.208.129.119]) by ppma03dal.us.ibm.com (PPS) with ESMTPS id 3pd4x77y42-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 21 Mar 2023 15:17:00 +0000 Received: from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com [10.39.53.228]) by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32LFGwgX34406890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Mar 2023 15:16:58 GMT Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 784D858067; Tue, 21 Mar 2023 15:16:58 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F112C58063; Tue, 21 Mar 2023 15:16:56 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.160.111.39]) by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTP; Tue, 21 Mar 2023 15:16:56 +0000 (GMT) From: Eddie James To: linux-kernel@vger.kernel.org Cc: linux-aspeed@lists.ozlabs.org, devicetree@vger.kernel.org, andrew@aj.id.au, joel@jms.id.au, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, Eddie James Subject: [PATCH v2 4/4] ARM: dts: aspeed: bonnell: Add DIMM SPD Date: Tue, 21 Mar 2023 10:16:42 -0500 Message-Id: <20230321151642.461618-5-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230321151642.461618-1-eajames@linux.ibm.com> References: <20230321151642.461618-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 3j_M-v25EPzmbn1EcklvNePnDon_0Bi3 X-Proofpoint-GUID: 3j_M-v25EPzmbn1EcklvNePnDon_0Bi3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-21_10,2023-03-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 lowpriorityscore=0 clxscore=1015 mlxlogscore=653 bulkscore=0 suspectscore=0 priorityscore=1501 phishscore=0 adultscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303210118 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760991774513765134?= X-GMAIL-MSGID: =?utf-8?q?1760991774513765134?= Add the DIMM SPD to the processor I2C busses. Signed-off-by: Eddie James --- arch/arm/boot/dts/aspeed-bmc-ibm-bonnell.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-bmc-ibm-bonnell.dts b/arch/arm/boot/dts/aspeed-bmc-ibm-bonnell.dts index 79516dc21c01..72186020e75a 100644 --- a/arch/arm/boot/dts/aspeed-bmc-ibm-bonnell.dts +++ b/arch/arm/boot/dts/aspeed-bmc-ibm-bonnell.dts @@ -232,18 +232,38 @@ cfam0_i2c1: i2c-bus@1 { cfam0_i2c10: i2c-bus@a { reg = <10>; /* OP3A */ + + eeprom@50 { + compatible = "atmel,at30tse"; + reg = <0x50>; + }; }; cfam0_i2c11: i2c-bus@b { reg = <11>; /* OP3B */ + + eeprom@50 { + compatible = "atmel,at30tse"; + reg = <0x50>; + }; }; cfam0_i2c12: i2c-bus@c { reg = <12>; /* OP4A */ + + eeprom@50 { + compatible = "atmel,at30tse"; + reg = <0x50>; + }; }; cfam0_i2c13: i2c-bus@d { reg = <13>; /* OP4B */ + + eeprom@50 { + compatible = "atmel,at30tse"; + reg = <0x50>; + }; }; cfam0_i2c14: i2c-bus@e {