From patchwork Wed Mar 22 14:03:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 73444 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2365074wrt; Wed, 22 Mar 2023 07:14:52 -0700 (PDT) X-Google-Smtp-Source: AK7set9qNpwsY5xW+RV+mgkllZjD680kpijyzY4bZ1I9vy0E49qWdVr/KgzX5OcyhA1kfv6Cwwzc X-Received: by 2002:a05:6a20:6722:b0:cc:b5de:3037 with SMTP id q34-20020a056a20672200b000ccb5de3037mr6176721pzh.51.1679494492061; Wed, 22 Mar 2023 07:14:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679494492; cv=none; d=google.com; s=arc-20160816; b=qFcC3rIEez8Keo3i8SNiYYWTVf8z5NiH4a+oy2bWxuYWVFhUk8BES1Bka0ewtym04R vGEAlyutZk0FT/aa/cBNGQ8RDuiKyyUZjxBG48geYnadrG7/Z+wyjkBtz2YcbaCwi59q gRg3fBpAqTOgssZYooJgIQAtiADVuZuQSF6Nxy1mNFDyP1zLC6zlcSEBi0Mp5/8fUpmK yQcyicihPpq0keCpyzFPMGlZf5UsihP4rKxGFLq0bHJs/lmT4W9+fYQxR/QhrZeXJlTj gJKqMDkuPqpG7MPk+p/HVsjde6crx+goaexk4LoqtkxAlQHgqz1LnJQlN6L3MxSJVM// 8F9w== 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=u10EnUSL6p0ItLDNOhx6Gr1HUTPaTt28SKZJBED3HJs=; b=iRK173mM0ANFDywCd3NHSFfGvhjOhkEw1PAXPjsp4J3Fia9RBQq66UzbD9ZeciQUbl R29UBG4423euFU0OKLpGaPt3LcwR+9GwO/BUas3W1qqzt39ATNw3gxLufnIg3M9cerFu YXi++X6QHkbu2m9adC25P8dtz2jws0xY6XRxUJaR/RXFCCv5O8VivgH/pJoyBfOjE3Lu 3W65Ji62kyzJ8zcYcDTXt7YwVjSchqznoaIEWpmlRtbhnqsm70LIZkkl9y9MHVx1HZJZ M2Zg2qXJnJxqYwadN7CgTSiSGPBDV29ItXD4mQwt6NIazH0ZSb75jd+pR+tcBkrSnwP/ Gg4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=CntaOVPH; 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 t6-20020a656086000000b00502e5477334si16275444pgu.687.2023.03.22.07.14.36; Wed, 22 Mar 2023 07:14:52 -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=CntaOVPH; 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 S231246AbjCVOEY (ORCPT + 99 others); Wed, 22 Mar 2023 10:04:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230518AbjCVOEO (ORCPT ); Wed, 22 Mar 2023 10:04:14 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64CF22448C; Wed, 22 Mar 2023 07:04:12 -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 32MDihSN014912; Wed, 22 Mar 2023 14:03: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=u10EnUSL6p0ItLDNOhx6Gr1HUTPaTt28SKZJBED3HJs=; b=CntaOVPHFcNmfQvy6jqnoB2rn1yjsPlQ0VIo8FAppMqXb9x0B9QhdazvxdyYXX5aeOS3 uYaYPr6HhkylKJCnfgUw5T/YoqvsaR3tliGLjvV0YObVS5m3eW2fWcLJ8ndlZaL36sDS nJM7eJCzqqU3phQmZwVu6/TkT9IkSjTO9tFeXq0EDI26KTeUlEgtO7D9dFzdPHkV63lA wP3PI3HALwScSgqWoYGT3VGQonqOg4QpuplpDhjSxR5srLD23/R/yNQgL2T5wdRVx1RC H2LCD1JGJtUmDm6WZ1dNHmZgOeqn7wXxd0M9T3vvjBi0TIxk+1/vfcUAFZMPZNU2wODg fA== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3pg2ttghwa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 14:03:56 +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 32MCBRfN029517; Wed, 22 Mar 2023 14:03:55 GMT Received: from smtprelay04.dal12v.mail.ibm.com ([9.208.130.102]) by ppma03dal.us.ibm.com (PPS) with ESMTPS id 3pd4x7ep2k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 14:03:55 +0000 Received: from smtpav03.wdc07v.mail.ibm.com (smtpav03.wdc07v.mail.ibm.com [10.39.53.230]) by smtprelay04.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32ME3rqj12059208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Mar 2023 14:03:54 GMT Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C9BD95805F; Wed, 22 Mar 2023 14:03:53 +0000 (GMT) Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 327CE5805C; Wed, 22 Mar 2023 14:03:52 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.77.129.242]) by smtpav03.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 22 Mar 2023 14:03: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 v3 1/4] eeprom: ee1004: Enable devices on multiple busses Date: Wed, 22 Mar 2023 09:03:45 -0500 Message-Id: <20230322140348.569397-2-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230322140348.569397-1-eajames@linux.ibm.com> References: <20230322140348.569397-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: lwzZVQoF0jZrNNdtQ5hcuv5TvtGC0mQm X-Proofpoint-GUID: lwzZVQoF0jZrNNdtQ5hcuv5TvtGC0mQm 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-22_11,2023-03-22_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 adultscore=0 suspectscore=0 bulkscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303220103 X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,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 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?1761077616272894932?= X-GMAIL-MSGID: =?utf-8?q?1761077616272894932?= 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 --- Changes since v2: - Remove of_device.h include drivers/misc/eeprom/ee1004.c | 174 +++++++++++++++++++++-------------- 1 file changed, 105 insertions(+), 69 deletions(-) diff --git a/drivers/misc/eeprom/ee1004.c b/drivers/misc/eeprom/ee1004.c index c8c6deb7ed89..0aed5760e370 100644 --- a/drivers/misc/eeprom/ee1004.c +++ b/drivers/misc/eeprom/ee1004.c @@ -9,9 +9,11 @@ * Copyright (C) 2008 Wolfram Sang, Pengutronix */ +#include #include #include #include +#include #include #include #include @@ -31,20 +33,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 +60,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 +78,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 +109,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 +130,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 +138,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 +150,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 +164,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 +222,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 Wed Mar 22 14:03:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 73450 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2367562wrt; Wed, 22 Mar 2023 07:19:37 -0700 (PDT) X-Google-Smtp-Source: AK7set8AvCZ0H7z9AnQnsQDKT0DHk8ZL9RMp+7cFA1DwRp5OXCF642OP/WqqxQo0mkx00QEfAQsI X-Received: by 2002:a17:903:11c4:b0:1a1:da3c:6065 with SMTP id q4-20020a17090311c400b001a1da3c6065mr3825360plh.22.1679494777095; Wed, 22 Mar 2023 07:19:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679494777; cv=none; d=google.com; s=arc-20160816; b=CENW6mfMFsXh7RdbGtBQSp4PJ3isGix/JrvGfCw7qtvXdoAwR87gMimpM6chtigxbz fQOV18Xn84idtOhL3BW4eVBr4KLAJLunqHpe6sPRlzIOtzOssdDL6dkuxt6BIieKIhLb uoyZniqAyA9bV1Ykv4y7js5HJ2SBO+h9+SZOSmqnOmTszL+1uh0l7/4w1hOkqKGtqPjl AIU0JzudAf6X4FK8GixwJcP5T7OogKaN0B3o0SxKCHKoIzD3mfpQ/6Aaz9mX5Q6e0z1s Z3Ue0tBGsPzlt8yRro+SZ9tbX7Y5YkZfXmlByQSSJAyNMLdYepLlPY7fd+TAO2G2uzao R2AQ== 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=G2VDcMPZylaZW24+nLg4SfkUNuDp0ugu4HX8Reayq9g=; b=wsCg8Bmmab0dHIM5Jjl8RkwHX2zdojWkBISCkkt2eMkzIWHOLIiyPPz801jL4jceSu Fzzaqbn0/wRx73GVabeiMrIO2Hdt/mvuUhrqWe4SHMvspQOHtv2p/RBSG9it+ZOK+SbY q0NchwlXkaj9qamuIzkGaVcZhLc3BcFtBB0RUfDtgIDPECgQVV8zovtyG+W0uWMA1cvO csy/efB8TO8NnujT9ixF79va/x1FIn6A3ecTzTJK3iMrY0ifDVYRNOd90BZtYYoQublq binAB66uXzkZt+59QMlbwhec0wcyZMnXJz/TVs/iwCcciMnDeSDESArTws0o1z5D4nTj BELQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b="BH/rrfoo"; 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 bv191-20020a632ec8000000b0050f83aa181esi7926995pgb.698.2023.03.22.07.19.24; Wed, 22 Mar 2023 07:19:37 -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="BH/rrfoo"; 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 S231147AbjCVOEP (ORCPT + 99 others); Wed, 22 Mar 2023 10:04:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229975AbjCVOEN (ORCPT ); Wed, 22 Mar 2023 10:04:13 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 530BB1F5F6; Wed, 22 Mar 2023 07:04:12 -0700 (PDT) Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32MCCYpF036849; Wed, 22 Mar 2023 14:03:57 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=G2VDcMPZylaZW24+nLg4SfkUNuDp0ugu4HX8Reayq9g=; b=BH/rrfooFiMNg8MHH4/5cR+2/2sPYrHmdrr5jxqUmOxAEDwZ9FeLod/ik8sMhyN2EKiK AQWXc+81xhYW/sRdpJNR1xCQXp3tIDNnLq/74FTq59w8I7dCQkYRCPkOe8du2UOMZmg4 TsmWwk5MAyUe4OKk3GXGVlBEcC4WpyRhfh6bNsBHqOdgOd35WnrBu2Qy0OUHieS0IKvP lTjZLOuP7++kqAm6mLrH3YbpIZ5W5lwiqsJEzvyM4qQkEtI7Dl32aHLoHUNqU7wx3pwJ 7ucnJOFIV4Mcz5KRnj2up4lXBpPaICn5nKq7/KC/R8kBsuBBkXasxhkBrAfeomcfbZYs 6w== Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pfx528c0w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 14:03:57 +0000 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32MDmE09012015; Wed, 22 Mar 2023 14:03:56 GMT Received: from smtprelay06.dal12v.mail.ibm.com ([9.208.130.100]) by ppma01wdc.us.ibm.com (PPS) with ESMTPS id 3pd4x70m8w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 14:03:56 +0000 Received: from smtpav03.wdc07v.mail.ibm.com (smtpav03.wdc07v.mail.ibm.com [10.39.53.230]) by smtprelay06.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32ME3t8t14811896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Mar 2023 14:03:55 GMT Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8A1B95805D; Wed, 22 Mar 2023 14:03:55 +0000 (GMT) Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 10A905805A; Wed, 22 Mar 2023 14:03:54 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.77.129.242]) by smtpav03.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 22 Mar 2023 14:03:53 +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 v3 2/4] dt-bindings: trivial-devices: Add Atmel AT30TSE004A serial eeprom Date: Wed, 22 Mar 2023 09:03:46 -0500 Message-Id: <20230322140348.569397-3-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230322140348.569397-1-eajames@linux.ibm.com> References: <20230322140348.569397-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Eg0c6fKpZDdm_AZXCn3bx8UifTJ4XU19 X-Proofpoint-ORIG-GUID: Eg0c6fKpZDdm_AZXCn3bx8UifTJ4XU19 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-22_11,2023-03-22_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 spamscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 clxscore=1015 bulkscore=0 suspectscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303220103 X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,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 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?1761077915207182291?= X-GMAIL-MSGID: =?utf-8?q?1761077915207182291?= The AT30TSE004A EEPROM is compatible with the JEDEC EE1004 standard. Document it as a trivial I2C device. Signed-off-by: Eddie James Acked-by: Krzysztof Kozlowski --- Changes since v2: - Use full model name - Fix commit name 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..9ce6308466c5 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,at30tse004a # i2c trusted platform module (TPM) - atmel,at97sc3204t # ATSHA204 - i2c h/w symmetric crypto module From patchwork Wed Mar 22 14:03:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 73449 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2367450wrt; Wed, 22 Mar 2023 07:19:25 -0700 (PDT) X-Google-Smtp-Source: AK7set/BljnRzPbdpfNE5R2OjyZ7NxsopTi0TAS1CvllMPYr84Xd3+2i+YedGh8Z8XZgnYLgfA0I X-Received: by 2002:a17:90b:384e:b0:23d:10f2:bda2 with SMTP id nl14-20020a17090b384e00b0023d10f2bda2mr4379277pjb.30.1679494764959; Wed, 22 Mar 2023 07:19:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679494764; cv=none; d=google.com; s=arc-20160816; b=GbFGDlfXhxNuA6EWBq3e8+7QC8qrsn0vrisbAoGNmoF+JwGSAPeyAR682LMf8PO6I7 uWfO1yQmzIIYETb1w2DcsB8AL2OnVjHCzbN4uz4M4YwQr+ryt/p7/EjoTteEgKqjeIGi u1NcyRgWdRAsl50orRx8qA1K6X8MpEiP3Pw1IC/M6XvPJOETJEhHr2X8a9oNgA4MtWW3 IjD/HxgAitJeC9fD+7ZyL+RtT3d7Wo6hxz5SHAHNpFo6gmdFNIG765vzzpSfM0d21kUF Q8fkGL4wpZXt7RoR4YGMea+/cz2AMizOZskg5zqtjHmzBMWqUIBWj66sjOt77ahLSqn7 0ykw== 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=GrcH9OwGP0s3q2kLc5+IBzkO2QsYs64mhVYB9WCnCTo=; b=M2BmlWR8OxAtTwTVrDeBLCAJVN8Uti//e3y7NTZyShmwK27cRGsy1q+wCcrARE18zl G6rBdBEfvTXI8vMV+FTAo+yObc2FFmK9ofp3ru/tjVvJ3K/6KCbgjQWpGfVzj/dwlUGL bTnk0PhLsMtd5nBHSMq101cuAIy2wf/QXQHrNH/CFlLySMlfGhgNqIUd/H4nmt3JTk0a Bb5q+OdDQKaOvDgKJ8HXyfGaFIWesZ3KEv7AR3DrxPTHnWJLKLO+d9eJXSm+JxUNHFhQ QMM6dVoN6x1TBVZnrfJAldrubiXuyTuu6kYBHqLz4fN04jBwatciLd5LJuL+tEK2Yw8H QPtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=D0Rqq9WW; 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 h8-20020a17090a710800b0023cfb718146si15841414pjk.30.2023.03.22.07.19.12; Wed, 22 Mar 2023 07:19:24 -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=D0Rqq9WW; 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 S231220AbjCVOER (ORCPT + 99 others); Wed, 22 Mar 2023 10:04:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230157AbjCVOEN (ORCPT ); Wed, 22 Mar 2023 10:04:13 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 790A624733; Wed, 22 Mar 2023 07:04:12 -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 32MBsZHX010968; Wed, 22 Mar 2023 14:04:00 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=GrcH9OwGP0s3q2kLc5+IBzkO2QsYs64mhVYB9WCnCTo=; b=D0Rqq9WWsl37PwiQijrdYKNpEy5V4j9V4o0X8/1crceAWBbEPij3B5x1U7ibiqoNI+Hl qIeLYS7ldNwDOpPxMHEffs20qPW7cw8vgqb2x9aF1Hnpuk+bAmlhAnE0AFfOfOpYSjBx cOrY6hgLeC0O+WFxbLAIe4MlYOl2mgjDtkdBcaLcOBuH/PdIcZ6Jkit5UofoZN9H1T21 F8gYB2jX/BAUm5shQiQ7qGUSC0U+tRTB+UYnwlvjNzW8hpGKkanJD5P8ZX4dLzoij/Na J+2uFmmwWHQNBtUfYv4vNIo8EHc+nqgO915FUwLlSx7Wp8L5mJjuqtZCBBOwqzU2c5lL 7w== Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pg17dumh3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 14:03:59 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32MDkB2N001051; Wed, 22 Mar 2023 14:03:58 GMT Received: from smtprelay01.wdc07v.mail.ibm.com ([9.208.129.119]) by ppma04wdc.us.ibm.com (PPS) with ESMTPS id 3pd4x78m0u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 14:03:58 +0000 Received: from smtpav03.wdc07v.mail.ibm.com (smtpav03.wdc07v.mail.ibm.com [10.39.53.230]) by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32ME3vnv29491896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Mar 2023 14:03:57 GMT Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 493F15806F; Wed, 22 Mar 2023 14:03:57 +0000 (GMT) Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C3E9E5805A; Wed, 22 Mar 2023 14:03:55 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.77.129.242]) by smtpav03.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 22 Mar 2023 14:03:55 +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 v3 3/4] eeprom: ee1004: Add OF matching support Date: Wed, 22 Mar 2023 09:03:47 -0500 Message-Id: <20230322140348.569397-4-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230322140348.569397-1-eajames@linux.ibm.com> References: <20230322140348.569397-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: PwtGncKZ4mGumoWJR2aDyULX4TL5DaKm X-Proofpoint-GUID: PwtGncKZ4mGumoWJR2aDyULX4TL5DaKm 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-22_11,2023-03-22_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 impostorscore=0 clxscore=1015 suspectscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303220103 X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,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 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?1761077902421221034?= X-GMAIL-MSGID: =?utf-8?q?1761077902421221034?= Add an OF match table for devicetree instantiation of the AT30TSE004A EEPROM. Signed-off-by: Eddie James --- Changes since v2: - Use full model number - Fix commit name 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 0aed5760e370..b7566c1d6edd 100644 --- a/drivers/misc/eeprom/ee1004.c +++ b/drivers/misc/eeprom/ee1004.c @@ -58,6 +58,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,at30tse004a" }, + {} +}; +MODULE_DEVICE_TABLE(of, ee1004_of_match); + /*-------------------------------------------------------------------------*/ static int ee1004_get_current_page(struct ee1004_bus *bus) @@ -269,6 +275,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 Wed Mar 22 14:03:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eddie James X-Patchwork-Id: 73448 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2367312wrt; Wed, 22 Mar 2023 07:19:09 -0700 (PDT) X-Google-Smtp-Source: AK7set/EXZSShe0Spg21Bw12f1k5p8t7Sn12vxo/bCjSXAAheJBcaNYvmBPmtM63PwzUl6gvY8N4 X-Received: by 2002:a17:902:d413:b0:1a1:d366:b0a4 with SMTP id b19-20020a170902d41300b001a1d366b0a4mr2200131ple.51.1679494748904; Wed, 22 Mar 2023 07:19:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679494748; cv=none; d=google.com; s=arc-20160816; b=UPsl/oC5IHHC7XMru/n9AOK/t/lAxLegu79vzuxn9ds+i52nNOUO+nFNS23kI+TFxq C7XNsRZpkmN8WBG2aMlH0TQKu3o38WLxa/EUdD6sgGGRc8Rjo9V4r3Zzn0T2nXeuAXG0 /N7B6M0GyGBHlpRAJacm3GQZ8s0saE2xXIpZx7nc5sbCgkFeCdAfz7IJxVar5Z4DGi1m zgdpnuEN9MsOrBwsmmVRjDjwJzBccMnOlfQixGjtS2Oi6QMO1evVvoeZ2o7oNKtTFq2R 9SZL3gJMV1CESkQdY2TUDzUgVbi3O3BbMqL744d68NnnRZ73LF6f9H+qI6U6FvnV16mp rbsA== 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=e5kXO0NJGkvXS5bgTXxLjg7+d878iJXOxykGqAZwKRQ=; b=RX1XPqM0ztp4ecmknN+J8N2eLd2Fd/7CuadQoftIpkRq2XNTiDUyVv13kAhmWDzUAu SgvwwcB6WIpv1dm+7lotkYFYWMUO/Mriuef/IhHOLP++HUJOH2g0senu0lBhRcnWatit BxjERWgwG+64UX++ysL2zcf1/rqmh84MXLQp7CXeiC/ckdFRxLkxHYB8VUMmabZ08nZ9 6suJHOUON4Rz4ppzyGI+g0h7rQbHq3uie178Yh2fbk/lQC5Fr5DvA3NIeGgeMg+Z4Aij U1RCu1aFx8X4JjzE9dsA+ZNGDcQACuKUfxKV9y08+PV9J+xNh/w8wjf06u3nrhSOoyns wRSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=OgEMCVX0; 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 la3-20020a170902fa0300b0019e2eb4922esi15171492plb.639.2023.03.22.07.18.56; Wed, 22 Mar 2023 07:19:08 -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=OgEMCVX0; 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 S231253AbjCVOE0 (ORCPT + 99 others); Wed, 22 Mar 2023 10:04:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231128AbjCVOEO (ORCPT ); Wed, 22 Mar 2023 10:04:14 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C886C1F5F6; Wed, 22 Mar 2023 07:04: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 32MDHB1I019224; Wed, 22 Mar 2023 14:04: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=e5kXO0NJGkvXS5bgTXxLjg7+d878iJXOxykGqAZwKRQ=; b=OgEMCVX02lVt/uqJez+0REqJk8ImhUmH64sMkOiIdKM9FD79skDWzsD4sSBKrKFK1bUH AGix19nZ32MR9ChMTkvoXIqBRXw2F8Kc2vE5P1pL8CQPur4lZ4URkIqZvQhtb38BsHYb LcoTaw3pwJFhCEgzwWV363jlIOXI6eAcdkJY7QOBsuiGV5lQTaGgS3E1XXJru1n8UW7T ygvAzTH8dag+8WLQvGD+rH9jz9b1nqGKzUzH9cJHPwgMnhVFsXQmMN2V2NYqPHBqn9Rs 8qTo3xZk2DLvE4LcB1JmuHaM4QCNBBmcg1EjIAmLr1EzcP0s5P0AB3eBhKrS8td5j5lF cA== 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 3pg2dy9cgb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 14:04:00 +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 32MAiWYM030001; Wed, 22 Mar 2023 14:04:00 GMT Received: from smtprelay03.wdc07v.mail.ibm.com ([9.208.129.113]) by ppma02wdc.us.ibm.com (PPS) with ESMTPS id 3pd4x78mcw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 14:04:00 +0000 Received: from smtpav03.wdc07v.mail.ibm.com (smtpav03.wdc07v.mail.ibm.com [10.39.53.230]) by smtprelay03.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32ME3xQR27394762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 22 Mar 2023 14:03:59 GMT Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0719C5805D; Wed, 22 Mar 2023 14:03:59 +0000 (GMT) Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8346E58064; Wed, 22 Mar 2023 14:03:57 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.77.129.242]) by smtpav03.wdc07v.mail.ibm.com (Postfix) with ESMTP; Wed, 22 Mar 2023 14:03:57 +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 v3 4/4] ARM: dts: aspeed: bonnell: Add DIMM SPD Date: Wed, 22 Mar 2023 09:03:48 -0500 Message-Id: <20230322140348.569397-5-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230322140348.569397-1-eajames@linux.ibm.com> References: <20230322140348.569397-1-eajames@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: W_DPpyvQCuqjlus0IPW6KlVFz3MnU4nx X-Proofpoint-ORIG-GUID: W_DPpyvQCuqjlus0IPW6KlVFz3MnU4nx 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-22_11,2023-03-22_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 malwarescore=0 suspectscore=0 adultscore=0 mlxlogscore=648 lowpriorityscore=0 phishscore=0 spamscore=0 mlxscore=0 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303220103 X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,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 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?1761077885837080162?= X-GMAIL-MSGID: =?utf-8?q?1761077885837080162?= Add the DIMM SPD to the processor I2C busses. Signed-off-by: Eddie James Reviewed-by: Joel Stanley --- 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..ab99d915b50e 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,at30tse004a"; + reg = <0x50>; + }; }; cfam0_i2c11: i2c-bus@b { reg = <11>; /* OP3B */ + + eeprom@50 { + compatible = "atmel,at30tse004a"; + reg = <0x50>; + }; }; cfam0_i2c12: i2c-bus@c { reg = <12>; /* OP4A */ + + eeprom@50 { + compatible = "atmel,at30tse004a"; + reg = <0x50>; + }; }; cfam0_i2c13: i2c-bus@d { reg = <13>; /* OP4B */ + + eeprom@50 { + compatible = "atmel,at30tse004a"; + reg = <0x50>; + }; }; cfam0_i2c14: i2c-bus@e {