From patchwork Tue Sep 18 07:35:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970982 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42Dw4Y6Nx8z9sCR for ; Tue, 18 Sep 2018 17:44:45 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 565CCC21E62; Tue, 18 Sep 2018 07:42:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C2FFFC21EA1; Tue, 18 Sep 2018 07:40:35 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E6A77C21E1A; Tue, 18 Sep 2018 07:40:31 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id D87C5C21D4A for ; Tue, 18 Sep 2018 07:40:28 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067706" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:23 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:23 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:24 +0300 Message-ID: <1537256157-18001-2-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, Maxime Ripard , nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 01/34] w1: Add 1-Wire uclass X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Maxime Ripard We might want to use 1-Wire devices connected on boards such as EEPROMs in U-Boot. Provide a framework to be able to do that. Signed-off-by: Maxime Ripard [eugen.hristev@microchip.com: reworked] Signed-off-by: Eugen Hristev --- drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/w1/Kconfig | 18 ++++ drivers/w1/Makefile | 1 + drivers/w1/w1-uclass.c | 236 +++++++++++++++++++++++++++++++++++++++++++++++++ include/dm/uclass-id.h | 1 + include/w1.h | 36 ++++++++ 7 files changed, 295 insertions(+) create mode 100644 drivers/w1/Kconfig create mode 100644 drivers/w1/Makefile create mode 100644 drivers/w1/w1-uclass.c create mode 100644 include/w1.h diff --git a/drivers/Kconfig b/drivers/Kconfig index 56536c4..6f91eac 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -106,6 +106,8 @@ source "drivers/usb/Kconfig" source "drivers/video/Kconfig" +source "drivers/w1/Kconfig" + source "drivers/watchdog/Kconfig" config PHYS_TO_BUS diff --git a/drivers/Makefile b/drivers/Makefile index 23ea609..4ca07c3 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -105,6 +105,7 @@ obj-y += smem/ obj-y += soc/ obj-y += thermal/ obj-y += axi/ +obj-$(CONFIG_W1) += w1/ obj-$(CONFIG_MACH_PIC32) += ddr/microchip/ endif diff --git a/drivers/w1/Kconfig b/drivers/w1/Kconfig new file mode 100644 index 0000000..64b27c6 --- /dev/null +++ b/drivers/w1/Kconfig @@ -0,0 +1,18 @@ +# +# W1 subsystem configuration +# + +menu "1-Wire support" + +config W1 + bool "Enable 1-wire controllers support" + default no + depends on DM + help + Support for the Dallas 1-Wire bus. + +if W1 + +endif + +endmenu diff --git a/drivers/w1/Makefile b/drivers/w1/Makefile new file mode 100644 index 0000000..f81693b --- /dev/null +++ b/drivers/w1/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_W1) += w1-uclass.o diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c new file mode 100644 index 0000000..44759fe --- /dev/null +++ b/drivers/w1/w1-uclass.c @@ -0,0 +1,236 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * + * Copyright (c) 2015 Free Electrons + * Copyright (c) 2015 NextThing Co. + * Copyright (c) 2018 Microchip Technology, Inc. + * + * Maxime Ripard + * Eugen Hristev + * + */ + +#include +#include +#include + +#include + +#define W1_MATCH_ROM 0x55 +#define W1_SKIP_ROM 0xcc +#define W1_SEARCH 0xf0 + +struct w1_bus { + u64 search_id; +}; + +static int w1_enumerate(struct udevice *bus) +{ + const struct w1_ops *ops = device_get_ops(bus); + struct w1_bus *w1 = dev_get_uclass_priv(bus); + u64 last_rn, rn = w1->search_id, tmp64; + bool last_device = false; + int search_bit, desc_bit = 64; + int last_zero = -1; + u8 triplet_ret = 0; + int i; + + if (!ops->reset || !ops->write_byte || !ops->triplet) + return -ENOSYS; + + while (!last_device) { + last_rn = rn; + rn = 0; + + /* + * Reset bus and all 1-wire device state machines + * so they can respond to our requests. + * + * Return 0 - device(s) present, 1 - no devices present. + */ + if (ops->reset(bus)) { + debug("%s: No devices present on the wire.\n", + __func__); + break; + } + + /* Start the search */ + ops->write_byte(bus, W1_SEARCH); + for (i = 0; i < 64; ++i) { + /* Determine the direction/search bit */ + if (i == desc_bit) + /* took the 0 path last time, so take the 1 path */ + search_bit = 1; + else if (i > desc_bit) + /* take the 0 path on the next branch */ + search_bit = 0; + else + search_bit = ((last_rn >> i) & 0x1); + + /* Read two bits and write one bit */ + triplet_ret = ops->triplet(bus, search_bit); + + /* quit if no device responded */ + if ((triplet_ret & 0x03) == 0x03) + break; + + /* If both directions were valid, and we took the 0 path... */ + if (triplet_ret == 0) + last_zero = i; + + /* extract the direction taken & update the device number */ + tmp64 = (triplet_ret >> 2); + rn |= (tmp64 << i); + } + + /* last device or error, aborting here */ + if ((triplet_ret & 0x03) == 0x03) + last_device = true; + + if ((triplet_ret & 0x03) != 0x03) { + if (desc_bit == last_zero || last_zero < 0) { + last_device = 1; + w1->search_id = 0; + } else { + w1->search_id = rn; + } + desc_bit = last_zero; + + debug("%s: Detected new device 0x%llx (family 0x%x)\n", + bus->name, rn, (u8)(rn & 0xff)); + } + } + + return 0; +} + +int w1_get_bus(int busnum, struct udevice **busp) +{ + int ret, i = 0; + + struct udevice *dev; + + for (ret = uclass_first_device(UCLASS_W1, &dev); + !ret; + uclass_next_device(&dev), i++) { + if (ret) { + debug("Cannot find w1 bus %d\n", busnum); + return ret; + } + if (i == busnum) { + *busp = dev; + return 0; + } + } + return ret; +} + +u8 w1_get_device_family(struct udevice *dev) +{ + struct w1_device *w1 = dev_get_parent_platdata(dev); + + return w1->id & 0xff; +} + +int w1_reset_select(struct udevice *dev) +{ + struct w1_device *w1 = dev_get_parent_platdata(dev); + struct udevice *bus = dev_get_parent(dev); + const struct w1_ops *ops = device_get_ops(bus); + int i; + + if (!ops->reset || !ops->write_byte) + return -ENOSYS; + + ops->reset(bus); + + ops->write_byte(bus, W1_MATCH_ROM); + + for (i = 0; i < sizeof(w1->id); i++) + ops->write_byte(bus, (w1->id >> (i * 8)) & 0xff); + + return 0; +} + +int w1_read_byte(struct udevice *dev) +{ + struct udevice *bus = dev_get_parent(dev); + const struct w1_ops *ops = device_get_ops(bus); + + if (!ops->read_byte) + return -ENOSYS; + + return ops->read_byte(bus); +} + +int w1_read_buf(struct udevice *dev, u8 *buf, unsigned int count) +{ + int i, ret; + + for (i = 0; i < count; i++) { + ret = w1_read_byte(dev); + if (ret < 0) + return ret; + + buf[i] = ret & 0xff; + } + + return 0; +} + +int w1_write_byte(struct udevice *dev, u8 byte) +{ + struct udevice *bus = dev_get_parent(dev); + const struct w1_ops *ops = device_get_ops(bus); + + if (!ops->write_byte) + return -ENOSYS; + + ops->write_byte(bus, byte); + + return 0; +} + +static int w1_post_probe(struct udevice *bus) +{ + w1_enumerate(bus); + + return 0; +} + +int w1_init(void) +{ + struct udevice *bus; + struct uclass *uc; + int ret; + + ret = uclass_get(UCLASS_W1, &uc); + if (ret) + return ret; + + uclass_foreach_dev(bus, uc) { + ret = device_probe(bus); + if (ret == -ENODEV) { /* No such device. */ + printf("W1 controller not available.\n"); + continue; + } + + if (ret) { /* Other error. */ + printf("W1 controller probe failed.\n"); + continue; + } + } + return 0; +} + +UCLASS_DRIVER(w1) = { + .name = "w1", + .id = UCLASS_W1, + .flags = DM_UC_FLAG_SEQ_ALIAS, + .per_device_auto_alloc_size = sizeof(struct w1_bus), + .post_probe = w1_post_probe, +#if CONFIG_IS_ENABLED(OF_CONTROL) + .post_bind = dm_scan_fdt_dev, +#endif + .per_child_platdata_auto_alloc_size = sizeof(struct w1_device), +}; diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index 7027ea0..fa72afb 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -92,6 +92,7 @@ enum uclass_id { UCLASS_VIDEO, /* Video or LCD device */ UCLASS_VIDEO_BRIDGE, /* Video bridge, e.g. DisplayPort to LVDS */ UCLASS_VIDEO_CONSOLE, /* Text console driver for video device */ + UCLASS_W1, /* Dallas 1-Wire bus */ UCLASS_WDT, /* Watchdot Timer driver */ UCLASS_COUNT, diff --git a/include/w1.h b/include/w1.h new file mode 100644 index 0000000..b36e0f8 --- /dev/null +++ b/include/w1.h @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0+ + * + * Copyright (c) 2015 Free Electrons + * Copyright (c) 2015 NextThing Co + * + */ + +#ifndef __W1_H +#define __W1_H + +#include + +#define W1_FAMILY_DS24B33 0x23 +#define W1_FAMILY_DS2431 0x2d + +struct w1_device { + u64 id; +}; + +struct w1_ops { + u8 (*read_byte)(struct udevice *dev); + bool (*reset)(struct udevice *dev); + u8 (*triplet)(struct udevice *dev, bool bdir); + void (*write_byte)(struct udevice *dev, u8 byte); +}; + +int w1_get_bus(int busnum, struct udevice **busp); +u8 w1_get_device_family(struct udevice *dev); + +int w1_read_buf(struct udevice *dev, u8 *buf, unsigned int count); +int w1_read_byte(struct udevice *dev); +int w1_reset_select(struct udevice *dev); +int w1_write_buf(struct udevice *dev, u8 *buf, unsigned int count); +int w1_write_byte(struct udevice *dev, u8 byte); + +#endif From patchwork Tue Sep 18 07:35:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970981 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42Dw4J71gzz9sCR for ; Tue, 18 Sep 2018 17:44:32 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 95E25C21DFA; Tue, 18 Sep 2018 07:41:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E945AC21E7D; Tue, 18 Sep 2018 07:40:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D0326C21E12; Tue, 18 Sep 2018 07:40:31 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 0BAEDC21D65 for ; Tue, 18 Sep 2018 07:40:28 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067712" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:25 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:25 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:25 +0300 Message-ID: <1537256157-18001-3-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, Maxime Ripard , nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 02/34] w1: Add 1-Wire gpio driver X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Maxime Ripard Add a bus driver for bitbanging a 1-Wire bus over a GPIO. Signed-off-by: Maxime Ripard [eugen.hristev@microchip.com: fixed some issues] Signed-off-by: Eugen Hristev --- drivers/w1/Kconfig | 7 ++ drivers/w1/Makefile | 2 + drivers/w1/w1-gpio.c | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 185 insertions(+) create mode 100644 drivers/w1/w1-gpio.c diff --git a/drivers/w1/Kconfig b/drivers/w1/Kconfig index 64b27c6..d6e0457 100644 --- a/drivers/w1/Kconfig +++ b/drivers/w1/Kconfig @@ -13,6 +13,13 @@ config W1 if W1 +config W1_GPIO + bool "Enable 1-wire GPIO bitbanging" + default no + depends on DM_GPIO + help + Emulate a 1-wire bus using a GPIO. + endif endmenu diff --git a/drivers/w1/Makefile b/drivers/w1/Makefile index f81693b..7fd8697 100644 --- a/drivers/w1/Makefile +++ b/drivers/w1/Makefile @@ -1 +1,3 @@ obj-$(CONFIG_W1) += w1-uclass.o + +obj-$(CONFIG_W1_GPIO) += w1-gpio.o diff --git a/drivers/w1/w1-gpio.c b/drivers/w1/w1-gpio.c new file mode 100644 index 0000000..5e5d6b3 --- /dev/null +++ b/drivers/w1/w1-gpio.c @@ -0,0 +1,176 @@ +/* SPDX-License-Identifier: GPL-2.0+ + * + * Copyright (c) 2015 Free Electrons + * Copyright (c) 2015 NextThing Co + * + * Maxime Ripard + * + */ + +#include +#include +#include + +#include + +#define W1_TIMING_A 6 +#define W1_TIMING_B 64 +#define W1_TIMING_C 60 +#define W1_TIMING_D 10 +#define W1_TIMING_E 9 +#define W1_TIMING_F 55 +#define W1_TIMING_G 0 +#define W1_TIMING_H 480 +#define W1_TIMING_I 70 +#define W1_TIMING_J 410 + +struct w1_gpio_pdata { + struct gpio_desc gpio; + u64 search_id; +}; + +static bool w1_gpio_read_bit(struct udevice *dev) +{ + struct w1_gpio_pdata *pdata = dev_get_platdata(dev); + int val; + + dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_OUT); + udelay(W1_TIMING_A); + + dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_IN); + udelay(W1_TIMING_E); + + val = dm_gpio_get_value(&pdata->gpio); + if (val < 0) + debug("error in retrieving GPIO value"); + udelay(W1_TIMING_F); + + return val; +} + +static u8 w1_gpio_read_byte(struct udevice *dev) +{ + int i; + u8 ret = 0; + + for (i = 0; i < 8; ++i) + ret |= (w1_gpio_read_bit(dev) ? 1 : 0) << i; + + return ret; +} + +static void w1_gpio_write_bit(struct udevice *dev, bool bit) +{ + struct w1_gpio_pdata *pdata = dev_get_platdata(dev); + + dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_OUT); + + bit ? udelay(W1_TIMING_A) : udelay(W1_TIMING_C); + + dm_gpio_set_value(&pdata->gpio, 1); + + bit ? udelay(W1_TIMING_B) : udelay(W1_TIMING_D); +} + +static void w1_gpio_write_byte(struct udevice *dev, u8 byte) +{ + int i; + + for (i = 0; i < 8; ++i) + w1_gpio_write_bit(dev, (byte >> i) & 0x1); +} + +static bool w1_gpio_reset(struct udevice *dev) +{ + struct w1_gpio_pdata *pdata = dev_get_platdata(dev); + int val; + + /* initiate the reset pulse. first we must pull the bus to low */ + dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); + udelay(W1_TIMING_G); + + dm_gpio_set_value(&pdata->gpio, 0); + /* wait for the specified time with the bus kept low */ + udelay(W1_TIMING_H); + + /* now we must read the presence pulse */ + dm_gpio_set_dir_flags(&pdata->gpio, GPIOD_IS_IN); + udelay(W1_TIMING_I); + + val = dm_gpio_get_value(&pdata->gpio); + if (val < 0) + debug("error in retrieving GPIO value"); + + /* if nobody pulled the bus down , it means nobody is on the bus */ + if (val != 0) + return 1; + /* we have the bus pulled down, let's wait for the specified presence time */ + udelay(W1_TIMING_J); + + /* read again, the other end should leave the bus free */ + val = dm_gpio_get_value(&pdata->gpio); + if (val < 0) + debug("error in retrieving GPIO value"); + + /* bus is not going up again, so we have an error */ + if (val != 1) + return 1; + + /* all good, presence detected */ + return 0; +} + +static u8 w1_gpio_triplet(struct udevice *dev, bool bdir) +{ + u8 id_bit = w1_gpio_read_bit(dev); + u8 comp_bit = w1_gpio_read_bit(dev); + u8 retval; + + if (id_bit && comp_bit) + return 0x03; /* error */ + + if (!id_bit && !comp_bit) { + /* Both bits are valid, take the direction given */ + retval = bdir ? 0x04 : 0; + } else { + /* Only one bit is valid, take that direction */ + bdir = id_bit; + retval = id_bit ? 0x05 : 0x02; + } + + w1_gpio_write_bit(dev, bdir); + return retval; +} + +static const struct w1_ops w1_gpio_ops = { + .read_byte = w1_gpio_read_byte, + .reset = w1_gpio_reset, + .triplet = w1_gpio_triplet, + .write_byte = w1_gpio_write_byte, +}; + +static int w1_gpio_ofdata_to_platdata(struct udevice *dev) +{ + struct w1_gpio_pdata *pdata = dev_get_platdata(dev); + int ret; + + ret = gpio_request_by_name(dev, "gpios", 0, &pdata->gpio, 0); + if (ret < 0) + printf("Error claiming GPIO %d\n", ret); + + return ret; +}; + +static const struct udevice_id w1_gpio_id[] = { + { "w1-gpio", 0 }, + { }, +}; + +U_BOOT_DRIVER(w1_gpio_drv) = { + .id = UCLASS_W1, + .name = "w1_gpio_drv", + .of_match = w1_gpio_id, + .ofdata_to_platdata = w1_gpio_ofdata_to_platdata, + .ops = &w1_gpio_ops, + .platdata_auto_alloc_size = sizeof(struct w1_gpio_pdata), +}; From patchwork Tue Sep 18 07:35:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970978 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42Dw0g6PhVz9sCR for ; Tue, 18 Sep 2018 17:41:23 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 5AD76C21F20; Tue, 18 Sep 2018 07:41:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 201D7C21E3B; Tue, 18 Sep 2018 07:40:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5D7E5C21D65; Tue, 18 Sep 2018 07:40:31 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id AFE0EC21D72 for ; Tue, 18 Sep 2018 07:40:29 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067713" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:27 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:26 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:26 +0300 Message-ID: <1537256157-18001-4-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 03/34] dt-bindings: W1: w1-gpio: added bindings for w1-gpio X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Added bindings specification for bitbanged gpio driver for Dallas one wire protocol Signed-off-by: Eugen Hristev --- doc/device-tree-bindings/w1/w1-gpio.txt | 40 +++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 doc/device-tree-bindings/w1/w1-gpio.txt diff --git a/doc/device-tree-bindings/w1/w1-gpio.txt b/doc/device-tree-bindings/w1/w1-gpio.txt new file mode 100644 index 0000000..5a58244 --- /dev/null +++ b/doc/device-tree-bindings/w1/w1-gpio.txt @@ -0,0 +1,40 @@ +W1 gpio device binding - one wire protocol over bitbanged gpio +======================= + + +Child nodes are required in device tree. The driver will detect +the devices serial number and then search in the child nodes in the device tree +for the proper node and try to match it with the device. + +Also check doc/device-tree-bindings/w1-eeprom for possible child nodes drivers + +Driver: +- drivers/w1/w1-gpio.c + +Software w1 device-tree node properties: +Required: +* compatible = "w1-gpio"; +* gpios = <...>; + This is the gpio used for one wire protocol, using bitbanging + +Optional: +* none + +Example: + +onewire_tm: onewire { + compatible = "w1-gpio"; + gpios = <&pioA 32 0>; +}; + +Example with child: + +onewire_tm: onewire { + compatible = "w1-gpio"; + gpios = <&pioA 32 0>; + + eeprom1: eeprom@0 { + compatible = "maxim,ds24xxx"; + } +}; + From patchwork Tue Sep 18 07:35:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970979 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42Dw1q0sLBz9sCP for ; Tue, 18 Sep 2018 17:42:23 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B6251C21EE5; Tue, 18 Sep 2018 07:41:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 20A70C21E4F; Tue, 18 Sep 2018 07:40:34 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C0AB9C21E0D; Tue, 18 Sep 2018 07:40:31 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id DD081C21D74 for ; Tue, 18 Sep 2018 07:40:29 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067714" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:29 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:28 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:27 +0300 Message-ID: <1537256157-18001-5-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, Maxime Ripard , nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 04/34] W1-EEPROM: Add an W1-EEPROM uclass for 1 wire EEPROMs X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Maxime Ripard We might want to access data stored onto one wire EEPROMs. Create a framework to provide a consistent API. Signed-off-by: Maxime Ripard [eugen.hristev@microchip.com: reworked patch] Signed-off-by: Eugen Hristev --- drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/w1-eeprom/Kconfig | 17 +++++ drivers/w1-eeprom/Makefile | 2 + drivers/w1-eeprom/w1-eeprom-uclass.c | 116 +++++++++++++++++++++++++++++++++++ include/dm/uclass-id.h | 1 + include/w1-eeprom.h | 33 ++++++++++ 7 files changed, 172 insertions(+) create mode 100644 drivers/w1-eeprom/Kconfig create mode 100644 drivers/w1-eeprom/Makefile create mode 100644 drivers/w1-eeprom/w1-eeprom-uclass.c create mode 100644 include/w1-eeprom.h diff --git a/drivers/Kconfig b/drivers/Kconfig index 6f91eac..e4396b4 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -108,6 +108,8 @@ source "drivers/video/Kconfig" source "drivers/w1/Kconfig" +source "drivers/w1-eeprom/Kconfig" + source "drivers/watchdog/Kconfig" config PHYS_TO_BUS diff --git a/drivers/Makefile b/drivers/Makefile index 4ca07c3..1d5905f 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -106,6 +106,7 @@ obj-y += soc/ obj-y += thermal/ obj-y += axi/ obj-$(CONFIG_W1) += w1/ +obj-$(CONFIG_W1_EEPROM) += w1-eeprom/ obj-$(CONFIG_MACH_PIC32) += ddr/microchip/ endif diff --git a/drivers/w1-eeprom/Kconfig b/drivers/w1-eeprom/Kconfig new file mode 100644 index 0000000..d5ddc80 --- /dev/null +++ b/drivers/w1-eeprom/Kconfig @@ -0,0 +1,17 @@ +# +# EEPROM subsystem configuration +# + +menu "1-wire EEPROM support" + +config W1_EEPROM + bool "Enable support for EEPROMs on 1wire interface" + depends on DM + help + Support for the EEPROMs connected on 1-wire Dallas protocol interface + +if W1_EEPROM + +endif + +endmenu diff --git a/drivers/w1-eeprom/Makefile b/drivers/w1-eeprom/Makefile new file mode 100644 index 0000000..b72950e --- /dev/null +++ b/drivers/w1-eeprom/Makefile @@ -0,0 +1,2 @@ +obj-$(CONFIG_W1_EEPROM) += w1-eeprom-uclass.o + diff --git a/drivers/w1-eeprom/w1-eeprom-uclass.c b/drivers/w1-eeprom/w1-eeprom-uclass.c new file mode 100644 index 0000000..7b05793 --- /dev/null +++ b/drivers/w1-eeprom/w1-eeprom-uclass.c @@ -0,0 +1,116 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * + * Copyright (c) 2015 Free Electrons + * Copyright (c) 2015 NextThing Co. + * Copyright (c) 2018 Microchip Technology, Inc. + * + * Maxime Ripard + * Eugen Hristev + * + */ + +#include +#include +#include +#include + +#include + +int w1_eeprom_read_buf(struct udevice *dev, unsigned int offset, + u8 *buf, unsigned int count) +{ + const struct w1_eeprom_ops *ops = device_get_ops(dev); + u64 id = 0; + int ret; + + if (!ops->read_buf) + return -ENOSYS; + + ret = w1_eeprom_get_id(dev, &id); + if (ret) + return ret; + if (!id) + return -ENODEV; + + return ops->read_buf(dev, offset, buf, count); +} + +int w1_eeprom_register_new_device(u64 id) +{ + u8 family = id & 0xff; + int ret; + struct udevice *dev; + + for (ret = uclass_first_device(UCLASS_W1_EEPROM, &dev); + !ret && dev; + uclass_next_device(&dev)) { + if (ret || !dev) { + debug("cannot find w1 eeprom dev\n"); + return ret; + } + if (dev_get_driver_data(dev) == family) { + struct w1_device *w1; + + w1 = dev_get_parent_platdata(dev); + if (w1->id) /* device already in use */ + continue; + w1->id = id; + debug("%s: Match found: %s:%s %llx\n", __func__, + dev->name, dev->driver->name, id); + return 0; + } + } + + debug("%s: No matches found: error %d\n", __func__, ret); + + return ret; +} + +int w1_eeprom_get_id(struct udevice *dev, u64 *id) +{ + struct w1_device *w1 = dev_get_parent_platdata(dev); + + if (!w1) + return -ENODEV; + *id = w1->id; + + return 0; +} + +UCLASS_DRIVER(w1_eeprom) = { + .name = "w1_eeprom", + .id = UCLASS_W1_EEPROM, + .flags = DM_UC_FLAG_SEQ_ALIAS, +#if CONFIG_IS_ENABLED(OF_CONTROL) + .post_bind = dm_scan_fdt_dev, +#endif +}; + +int w1_eeprom_dm_init(void) +{ + struct udevice *dev; + struct uclass *uc; + int ret; + + ret = uclass_get(UCLASS_W1_EEPROM, &uc); + if (ret) { + debug("W1_EEPROM uclass not available\n"); + return ret; + } + + uclass_foreach_dev(dev, uc) { + ret = device_probe(dev); + if (ret == -ENODEV) { /* No such device. */ + debug("W1_EEPROM not available.\n"); + continue; + } + + if (ret) { /* Other error. */ + printf("W1_EEPROM probe failed, error %d\n", ret); + continue; + } + } + + return 0; +} diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h index fa72afb..71adf7e 100644 --- a/include/dm/uclass-id.h +++ b/include/dm/uclass-id.h @@ -93,6 +93,7 @@ enum uclass_id { UCLASS_VIDEO_BRIDGE, /* Video bridge, e.g. DisplayPort to LVDS */ UCLASS_VIDEO_CONSOLE, /* Text console driver for video device */ UCLASS_W1, /* Dallas 1-Wire bus */ + UCLASS_W1_EEPROM, /* one-wire EEPROMs */ UCLASS_WDT, /* Watchdot Timer driver */ UCLASS_COUNT, diff --git a/include/w1-eeprom.h b/include/w1-eeprom.h new file mode 100644 index 0000000..2233736 --- /dev/null +++ b/include/w1-eeprom.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0+ + * + * Copyright (c) 2015 Free Electrons + * Copyright (c) 2015 NextThing Co + * Copyright (c) 2018 Microchip Technology, Inc. + * + */ + +#ifndef __W1_EEPROM_H +#define __W1_EEPROM_H + +struct udevice; + +struct w1_eeprom_ops { + /* + * Reads a buff from the given EEPROM memory, starting at + * given offset and place the results into the given buffer. + * Should read given count of bytes. + * Should return 0 on success, and normal error.h on error + */ + int (*read_buf)(struct udevice *dev, unsigned int offset, + u8 *buf, unsigned int count); +}; + +int w1_eeprom_read_buf(struct udevice *dev, unsigned int offset, + u8 *buf, unsigned int count); + +int w1_eeprom_dm_init(void); + +int w1_eeprom_register_new_device(u64 id); + +int w1_eeprom_get_id(struct udevice *dev, u64 *id); +#endif From patchwork Tue Sep 18 07:35:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970980 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42Dw2x1gQsz9sCR for ; Tue, 18 Sep 2018 17:43:21 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B61E8C21DE8; Tue, 18 Sep 2018 07:42:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A89D5C21EC8; Tue, 18 Sep 2018 07:40:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 20BA4C21E12; Tue, 18 Sep 2018 07:40:39 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 99872C21E29 for ; Tue, 18 Sep 2018 07:40:32 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067715" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:31 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:30 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:28 +0300 Message-ID: <1537256157-18001-6-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 05/34] w1: identify devices with w1-eeprom uclass X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When a new device is discovered, this may be a w1 eeprom device. Attempt to find the proper node and driver from the w1-eeprom subsystem. Signed-off-by: Eugen Hristev --- drivers/w1/w1-uclass.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c index 44759fe..aecf7fe 100644 --- a/drivers/w1/w1-uclass.c +++ b/drivers/w1/w1-uclass.c @@ -13,6 +13,7 @@ #include #include #include +#include #include @@ -98,6 +99,9 @@ static int w1_enumerate(struct udevice *bus) debug("%s: Detected new device 0x%llx (family 0x%x)\n", bus->name, rn, (u8)(rn & 0xff)); + + /* attempt to register as w1-eeprom device */ + w1_eeprom_register_new_device(rn); } } From patchwork Tue Sep 18 07:35:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 971003 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwM349wQz9sCP for ; Tue, 18 Sep 2018 17:57:19 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 47A93C21E4E; Tue, 18 Sep 2018 07:43:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 87F9AC21EC3; Tue, 18 Sep 2018 07:40:47 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 309CAC21EBE; Tue, 18 Sep 2018 07:40:40 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 3C0A1C21E68 for ; Tue, 18 Sep 2018 07:40:34 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067716" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:33 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:33 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:29 +0300 Message-ID: <1537256157-18001-7-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, Maxime Ripard , nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 06/34] W1-EEPROM: add support for Maxim DS24 eeprom families X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Maxime Ripard Add a driver that supports Maxim 1 wire EEPROMs families DS24B33 and DS2431. Can be extended for other families as well. Signed-off-by: Maxime Ripard [eugen.hristev@microchip.com: reworked driver] Signed-off-by: Eugen Hristev --- drivers/w1-eeprom/Kconfig | 6 +++++ drivers/w1-eeprom/Makefile | 2 ++ drivers/w1-eeprom/ds24xxx.c | 55 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 drivers/w1-eeprom/ds24xxx.c diff --git a/drivers/w1-eeprom/Kconfig b/drivers/w1-eeprom/Kconfig index d5ddc80..20ec549 100644 --- a/drivers/w1-eeprom/Kconfig +++ b/drivers/w1-eeprom/Kconfig @@ -12,6 +12,12 @@ config W1_EEPROM if W1_EEPROM +config W1_EEPROM_DS24XXX + bool "Enable Maxim DS24 families EEPROM support" + depends on W1 + help + Maxim DS24 EEPROMs 1-Wire EEPROM support + endif endmenu diff --git a/drivers/w1-eeprom/Makefile b/drivers/w1-eeprom/Makefile index b72950e..3f4aa13 100644 --- a/drivers/w1-eeprom/Makefile +++ b/drivers/w1-eeprom/Makefile @@ -1,2 +1,4 @@ obj-$(CONFIG_W1_EEPROM) += w1-eeprom-uclass.o +obj-$(CONFIG_W1_EEPROM_DS24XXX) += ds24xxx.o + diff --git a/drivers/w1-eeprom/ds24xxx.c b/drivers/w1-eeprom/ds24xxx.c new file mode 100644 index 0000000..56186e5 --- /dev/null +++ b/drivers/w1-eeprom/ds24xxx.c @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * + * Copyright (c) 2015 Free Electrons + * Copyright (c) 2015 NextThing Co + * Copyright (c) 2018 Microchip Technology, Inc. + * + */ + +#include +#include +#include +#include +#include + +#define W1_F2D_READ_EEPROM 0xf0 + +static int ds24xxx_read_buf(struct udevice *dev, unsigned int offset, + u8 *buf, unsigned int count) +{ + w1_reset_select(dev); + + w1_write_byte(dev, W1_F2D_READ_EEPROM); + w1_write_byte(dev, offset & 0xff); + w1_write_byte(dev, offset >> 8); + + return w1_read_buf(dev, buf, count); +} + +static int ds24xxx_probe(struct udevice *dev) +{ + struct w1_device *w1; + + w1 = dev_get_platdata(dev); + w1->id = 0; + return 0; +} + +static const struct w1_eeprom_ops ds24xxx_ops = { + .read_buf = ds24xxx_read_buf, +}; + +static const struct udevice_id ds24xxx_id[] = { + { .compatible = "maxim,ds24b33", .data = W1_FAMILY_DS24B33 }, + { .compatible = "maxim,ds2431", .data = W1_FAMILY_DS2431 }, + { }, +}; + +U_BOOT_DRIVER(ds24xxx) = { + .name = "ds24xxx", + .id = UCLASS_W1_EEPROM, + .of_match = ds24xxx_id, + .ops = &ds24xxx_ops, + .probe = ds24xxx_probe, +}; From patchwork Tue Sep 18 07:35:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970983 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42Dw4r6xkYz9sCR for ; Tue, 18 Sep 2018 17:45:00 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 93F4FC21EA1; Tue, 18 Sep 2018 07:44:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 527AEC21EDC; Tue, 18 Sep 2018 07:40:57 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 05016C21E70; Tue, 18 Sep 2018 07:40:43 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id DD3A6C21EA2 for ; Tue, 18 Sep 2018 07:40:35 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067717" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:35 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:34 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:30 +0300 Message-ID: <1537256157-18001-8-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 07/34] dt-bindings: w1-eeprom: ds24xxx: create bindings X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Bindings for Maxim's ds24 onewire EEPROM families driver Signed-off-by: Eugen Hristev --- doc/device-tree-bindings/w1-eeprom/ds24xxx.txt | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 doc/device-tree-bindings/w1-eeprom/ds24xxx.txt diff --git a/doc/device-tree-bindings/w1-eeprom/ds24xxx.txt b/doc/device-tree-bindings/w1-eeprom/ds24xxx.txt new file mode 100644 index 0000000..2e91be9 --- /dev/null +++ b/doc/device-tree-bindings/w1-eeprom/ds24xxx.txt @@ -0,0 +1,37 @@ +Maxim DS24 families driver device binding - one wire protocol EEPROMS from Maxim +======================= + +This memory needs to be connected to a onewire bus, as a child node. +The bus will read the device serial number and match this node with a found +device on the bus +Also check doc/device-tree-bindings/w1 for onewire bus drivers + +Driver: +- drivers/w1-eeprom/ds24xxx.c + +Software ds24xxx device-tree node properties: +Required: +* compatible = "maxim,ds24b33" +or +* compatible = "maxim,ds2431" +Further memories can be added. + +Optional: +* none + +Example: + eeprom1: eeprom@0 { + compatible = "maxim,ds24xxx"; + } + +Example with parent bus: + +onewire_tm: onewire { + compatible = "w1-gpio"; + gpios = <&pioA 32 0>; + + eeprom1: eeprom@0 { + compatible = "maxim,ds24xxx"; + } +}; + From patchwork Tue Sep 18 07:35:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 971005 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwNg47G0z9sCP for ; Tue, 18 Sep 2018 17:58:43 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4A859C21D4A; Tue, 18 Sep 2018 07:43:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 2DA7CC21E62; Tue, 18 Sep 2018 07:40:52 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EE55AC21EA2; Tue, 18 Sep 2018 07:40:43 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id C1C8DC21E0D for ; Tue, 18 Sep 2018 07:40:37 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067720" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:37 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:36 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:31 +0300 Message-ID: <1537256157-18001-9-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 08/34] W1-EEPROM: add sandbox driver X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add a sandbox driver for a one wire EEPROM memory Signed-off-by: Eugen Hristev --- drivers/w1-eeprom/Kconfig | 6 ++++ drivers/w1-eeprom/Makefile | 1 + drivers/w1-eeprom/eep_sandbox.c | 61 +++++++++++++++++++++++++++++++++++++++++ include/w1.h | 1 + 4 files changed, 69 insertions(+) create mode 100644 drivers/w1-eeprom/eep_sandbox.c diff --git a/drivers/w1-eeprom/Kconfig b/drivers/w1-eeprom/Kconfig index 20ec549..4b7f3c4 100644 --- a/drivers/w1-eeprom/Kconfig +++ b/drivers/w1-eeprom/Kconfig @@ -18,6 +18,12 @@ config W1_EEPROM_DS24XXX help Maxim DS24 EEPROMs 1-Wire EEPROM support +config W1_EEPROM_SANDBOX + bool "Enable sandbox onewire EEPROM driver" + depends on W1 + help + Sandbox driver for a onewire EEPROM memory + endif endmenu diff --git a/drivers/w1-eeprom/Makefile b/drivers/w1-eeprom/Makefile index 3f4aa13..03cc4c8 100644 --- a/drivers/w1-eeprom/Makefile +++ b/drivers/w1-eeprom/Makefile @@ -2,3 +2,4 @@ obj-$(CONFIG_W1_EEPROM) += w1-eeprom-uclass.o obj-$(CONFIG_W1_EEPROM_DS24XXX) += ds24xxx.o +obj-$(CONFIG_W1_EEPROM_SANDBOX) += eep_sandbox.o diff --git a/drivers/w1-eeprom/eep_sandbox.c b/drivers/w1-eeprom/eep_sandbox.c new file mode 100644 index 0000000..27c7f9f --- /dev/null +++ b/drivers/w1-eeprom/eep_sandbox.c @@ -0,0 +1,61 @@ +/* SPDX-License-Identifier: GPL-2.0+ + * + * Copyright (c) 2018 Microchip Technology, Inc. + * + */ + +#include +#include +#include +#include +#include + +#define W1_F2D_READ_EEPROM 0xf0 + +#define EEP_SANDBOX_SAMPLE_MEM "this is a sample EEPROM memory string." + +static int eep_sandbox_read_buf(struct udevice *dev, unsigned int offset, + u8 *buf, unsigned int count) +{ + /* do not allow to copy more than our maximum sample string */ + if (offset + count < strlen(EEP_SANDBOX_SAMPLE_MEM)) { + offset = 0; + count = strlen(EEP_SANDBOX_SAMPLE_MEM); + } + strncpy((char *)buf, EEP_SANDBOX_SAMPLE_MEM, count); + + /* + * in case the w1 subsystem uses some different kind of sandbox testing, + * like randomized gpio values , we take the buffer from there + */ + + w1_reset_select(dev); + + w1_write_byte(dev, W1_F2D_READ_EEPROM); + w1_write_byte(dev, offset & 0xff); + w1_write_byte(dev, offset >> 8); + + w1_read_buf(dev, buf, count); + + /* + * even if read buf from w1 fails, return success as we hardcoded + * the buffer. + */ + return 0; +} + +static const struct w1_eeprom_ops eep_sandbox_ops = { + .read_buf = eep_sandbox_read_buf, +}; + +static const struct udevice_id eep_sandbox_id[] = { + { .compatible = "sandbox,w1-eeprom", .data = W1_FAMILY_EEP_SANDBOX }, + { }, +}; + +U_BOOT_DRIVER(eep_sandbox) = { + .name = "eep_sandbox", + .id = UCLASS_W1_EEPROM, + .of_match = eep_sandbox_id, + .ops = &eep_sandbox_ops, +}; diff --git a/include/w1.h b/include/w1.h index b36e0f8..399177a 100644 --- a/include/w1.h +++ b/include/w1.h @@ -12,6 +12,7 @@ #define W1_FAMILY_DS24B33 0x23 #define W1_FAMILY_DS2431 0x2d +#define W1_FAMILY_EEP_SANDBOX 0xfe struct w1_device { u64 id; From patchwork Tue Sep 18 07:35:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970984 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42Dw6b5zqZz9sCR for ; Tue, 18 Sep 2018 17:46:31 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 5C83EC21D72; Tue, 18 Sep 2018 07:43:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 49C36C21E6A; Tue, 18 Sep 2018 07:40:51 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 1A8CFC21EC5; Tue, 18 Sep 2018 07:40:47 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 7E04EC21E56 for ; Tue, 18 Sep 2018 07:40:39 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067723" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:39 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:38 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:32 +0300 Message-ID: <1537256157-18001-10-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 09/34] dt-bindings: w1-eeprom: eep_sandbox: create bindings X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Bindings for sandbox onewire eeprom driver Signed-off-by: Eugen Hristev --- doc/device-tree-bindings/w1-eeprom/eep_sandbox.txt | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 doc/device-tree-bindings/w1-eeprom/eep_sandbox.txt diff --git a/doc/device-tree-bindings/w1-eeprom/eep_sandbox.txt b/doc/device-tree-bindings/w1-eeprom/eep_sandbox.txt new file mode 100644 index 0000000..82bb589 --- /dev/null +++ b/doc/device-tree-bindings/w1-eeprom/eep_sandbox.txt @@ -0,0 +1,34 @@ +Onewire EEPROM sandbox driver device binding - one wire protocol sandbox EEPROM +======================= + +This memory needs to be connected to a onewire bus, as a child node. +The bus will read the device serial number and match this node with a found +device on the bus +Also check doc/device-tree-bindings/w1 for onewire bus drivers + +Driver: +- drivers/w1-eeprom/eep_sandbox.c + +Software ds24xxx device-tree node properties: +Required: +* compatible = "sandbox,w1-eeprom" + +Optional: +* none + +Example: + eeprom1: eeprom@0 { + compatible = "sandbox,w1-eeprom"; + } + +Example with parent bus: + +onewire_tm: onewire { + compatible = "w1-gpio"; + gpios = <&gpio_a 8>; + + eeprom1: eeprom@0 { + compatible = "sandbox,w1-eeprom"; + } +}; + From patchwork Tue Sep 18 07:35:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970985 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42Dw884bjkz9sCR for ; Tue, 18 Sep 2018 17:47:52 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 362E4C21E62; Tue, 18 Sep 2018 07:44:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 576E8C21DF8; Tue, 18 Sep 2018 07:40:53 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 508BBC21DED; Tue, 18 Sep 2018 07:40:48 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 3EF3BC21E77 for ; Tue, 18 Sep 2018 07:40:41 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067724" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:40 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:40 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:33 +0300 Message-ID: <1537256157-18001-11-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 10/34] w1: add command for onewire protocol X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add basic command for bus information and read for onewire bus using Dallas 1-Wire protocol. Signed-off-by: Eugen Hristev --- cmd/Kconfig | 7 ++++ cmd/Makefile | 1 + cmd/w1.c | 126 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 cmd/w1.c diff --git a/cmd/Kconfig b/cmd/Kconfig index 13d4c99..b0d6e1b 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -832,6 +832,13 @@ config CMD_I2C help I2C support. +config CMD_W1 + depends on W1 + default y if W1 + bool "w1 - Support for Dallas 1-Wire protocol" + help + Dallas 1-wire protocol support + config CMD_LOADB bool "loadb" default y diff --git a/cmd/Makefile b/cmd/Makefile index 3487c80..b5241b8 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -145,6 +145,7 @@ obj-$(CONFIG_CMD_THOR_DOWNLOAD) += thordown.o obj-$(CONFIG_CMD_XIMG) += ximg.o obj-$(CONFIG_CMD_YAFFS2) += yaffs2.o obj-$(CONFIG_CMD_SPL) += spl.o +obj-$(CONFIG_CMD_W1) += w1.o obj-$(CONFIG_CMD_ZIP) += zip.o obj-$(CONFIG_CMD_ZFS) += zfs.o diff --git a/cmd/w1.c b/cmd/w1.c new file mode 100644 index 0000000..9c95fcf --- /dev/null +++ b/cmd/w1.c @@ -0,0 +1,126 @@ +/* SPDX-License-Identifier: GPL-2.0+ + * + * (C) Copyright 2018 + * Microchip Technology, Inc. + * Eugen Hristev + */ +#include +#include +#include +#include +#include + +static int w1_bus(void) +{ + struct udevice *bus, *dev; + int ret; + + ret = w1_get_bus(0, &bus); + if (ret) { + printf("one wire interface not found\n"); + return CMD_RET_FAILURE; + } + printf("Bus %d:\t%s", bus->seq, bus->name); + if (device_active(bus)) + printf(" (active)"); + printf("\n"); + + for (device_find_first_child(bus, &dev); + dev; + device_find_next_child(&dev)) { + ret = device_probe(dev); + + printf("\t%s (%d) uclass %s : ", dev->name, dev->seq, + dev->uclass->uc_drv->name); + + if (ret) + printf("device error\n"); + else + printf("family 0x%x\n", w1_get_device_family(dev)); + } + return CMD_RET_SUCCESS; +} + +static int w1_read(int argc, char *const argv[]) +{ + int bus_n = 0, dev_n = 0, offset = 0, len = 512; + int i; + struct udevice *bus, *dev; + int ret; + u8 buf[512]; + + if (argc > 2) + bus_n = simple_strtoul(argv[2], NULL, 10); + + if (argc > 3) + dev_n = simple_strtoul(argv[3], NULL, 10); + + if (argc > 4) + offset = simple_strtoul(argv[4], NULL, 10); + + if (argc > 5) + len = simple_strtoul(argv[5], NULL, 10); + + if (len > 512) { + printf("len needs to be <= 512\n"); + return CMD_RET_FAILURE; + } + + ret = w1_get_bus(bus_n, &bus); + if (ret) { + printf("one wire interface not found\n"); + return CMD_RET_FAILURE; + } + + for (device_find_first_child(bus, &dev), i = 0; + dev && i <= dev_n; + device_find_next_child(&dev), i++) { + ret = device_probe(dev); + if (!ret && i == dev_n) + break; + } + + if (i != dev_n || ret || !dev) { + printf("invalid dev\n"); + return CMD_RET_FAILURE; + } + + if (strcmp(dev->uclass->uc_drv->name, "w1_eeprom")) { + printf("the device present on the interface is of unknown device class\n"); + return CMD_RET_FAILURE; + } + + ret = w1_eeprom_read_buf(dev, offset, (u8 *)buf, len); + if (ret) { + printf("error reading device %s\n", dev->name); + return CMD_RET_FAILURE; + } + + for (i = 0; i < len; i++) + printf("%x", buf[i]); + printf("\n"); + + return CMD_RET_SUCCESS; +} + +int do_w1(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) +{ + if (argc < 2) + return CMD_RET_USAGE; + + if (!strcmp(argv[1], "bus")) + return w1_bus(); + + if (!strcmp(argv[1], "read")) + return w1_read(argc, argv); + + return CMD_RET_SUCCESS; +} + +U_BOOT_CMD(w1, 6, 0, do_w1, + "onewire interface utility commands", + "bus - show onewire bus info (all)\n" + "w1 read [ [ [offset [length]]]]" + " - read from onewire device 'dev' on onewire bus 'bus'" + " starting from offset 'offset' and length 'length'\n" + " defaults: bus 0, dev 0, offset 0, length 512 bytes."); From patchwork Tue Sep 18 07:35:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970993 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwHt12J7z9sCP for ; Tue, 18 Sep 2018 17:54:34 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D2E07C21E08; Tue, 18 Sep 2018 07:45:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A8535C21F16; Tue, 18 Sep 2018 07:41:12 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9F705C21F03; Tue, 18 Sep 2018 07:40:51 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id DFA5AC21EAE for ; Tue, 18 Sep 2018 07:40:42 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067725" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:42 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:41 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:34 +0300 Message-ID: <1537256157-18001-12-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 11/34] pinctrl: sandbox: add gpio onewire w1 group X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add onewire "w1" groups and pin function for onewire GPIOs in sandbox. Signed-off-by: Eugen Hristev --- drivers/pinctrl/pinctrl-sandbox.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinctrl/pinctrl-sandbox.c b/drivers/pinctrl/pinctrl-sandbox.c index 468fa2a..755ac08 100644 --- a/drivers/pinctrl/pinctrl-sandbox.c +++ b/drivers/pinctrl/pinctrl-sandbox.c @@ -14,6 +14,7 @@ static const char * const sandbox_pins[] = { "SDA", "TX", "RX", + "W1" }; static const char * const sandbox_groups[] = { @@ -21,12 +22,14 @@ static const char * const sandbox_groups[] = { "serial_a", "serial_b", "spi", + "w1", }; static const char * const sandbox_functions[] = { "i2c", "serial", "spi", + "w1", }; static const struct pinconf_param sandbox_conf_params[] = { From patchwork Tue Sep 18 07:35:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970989 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwFX5FKjz9sCP for ; Tue, 18 Sep 2018 17:52:32 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7B2A1C21E76; Tue, 18 Sep 2018 07:44:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9225DC21E77; Tue, 18 Sep 2018 07:41:06 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6B410C21EE5; Tue, 18 Sep 2018 07:40:52 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 979BEC21E62 for ; Tue, 18 Sep 2018 07:40:44 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067727" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:44 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:43 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:35 +0300 Message-ID: <1537256157-18001-13-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 12/34] sandbox: DTS: w1: add node for one wire interface on GPIO X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add a node for the one wire uclass and one wire gpio driver in sandbox. Signed-off-by: Eugen Hristev --- arch/sandbox/dts/sandbox.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index 6ac37f1..1aa0f8e 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -153,6 +153,7 @@ pinctrl { compatible = "sandbox,pinctrl"; + status = "okay"; pinctrl_i2c0: i2c0 { groups = "i2c"; @@ -164,6 +165,12 @@ groups = "serial_a"; function = "serial"; }; + + pinctrl_onewire0: onewire0 { + groups = "w1"; + function = "w1"; + bias-pull-up; + }; }; reset@1 { @@ -322,6 +329,19 @@ reg = <0x0 0x400>; }; }; + + onewire0: onewire { + compatible = "w1-gpio"; + gpios = <&gpio_a 8>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_onewire0>; + status = "okay"; + + sandbox_eeprom0: sandbox_eeprom@0 { + compatible = "sandbox,w1-eeprom"; + status = "okay"; + }; + }; }; #include "cros-ec-keyboard.dtsi" From patchwork Tue Sep 18 07:35:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970998 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwJd5ncmz9sCP for ; Tue, 18 Sep 2018 17:55:13 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 408D5C21E2F; Tue, 18 Sep 2018 07:44:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5E305C21E52; Tue, 18 Sep 2018 07:41:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D9B00C21E29; Tue, 18 Sep 2018 07:40:53 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 71B9FC21E0D for ; Tue, 18 Sep 2018 07:40:46 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067730" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:46 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:45 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:36 +0300 Message-ID: <1537256157-18001-14-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 13/34] configs: sandbox: add onewire w1 and sandbox eeprom X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" To be able to test Dallas onewire protocol and one wire eeproms driver and subsystem, add in sandbox defconfig the drivers' config. Signed-off-by: Eugen Hristev --- configs/sandbox_defconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index ca12118..eff6e1e 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -191,6 +191,10 @@ CONFIG_CONSOLE_ROTATION=y CONFIG_CONSOLE_TRUETYPE=y CONFIG_CONSOLE_TRUETYPE_CANTORAONE=y CONFIG_VIDEO_SANDBOX_SDL=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_SANDBOX=y CONFIG_WDT=y CONFIG_WDT_SANDBOX=y CONFIG_FS_CBFS=y From patchwork Tue Sep 18 07:35:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 971008 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwQc5xL2z9sCP for ; Tue, 18 Sep 2018 18:00:24 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7E999C21D72; Tue, 18 Sep 2018 07:45:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A5ACDC21F04; Tue, 18 Sep 2018 07:41:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 92F8CC21E42; Tue, 18 Sep 2018 07:40:55 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 187E5C21D74 for ; Tue, 18 Sep 2018 07:40:47 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067733" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:47 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:47 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:37 +0300 Message-ID: <1537256157-18001-15-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 14/34] configs: sama5d2_xplained: add onewire and eeprom drivers X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" SAMA5D2 SoC can have extra clip boards (PDAs) connected, which have an EEPROM memory for identification. A special GPIO can be used to read this memory over 1wire protocol. Enabling one wire and eeprom drivers for this memory. Signed-off-by: Eugen Hristev --- configs/sama5d2_xplained_mmc_defconfig | 4 ++++ configs/sama5d2_xplained_spiflash_defconfig | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig index 77dc82c..46b143b 100644 --- a/configs/sama5d2_xplained_mmc_defconfig +++ b/configs/sama5d2_xplained_mmc_defconfig @@ -88,3 +88,7 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_DM_VIDEO=y CONFIG_ATMEL_HLCD=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig index fc9ec9c..9da026b 100644 --- a/configs/sama5d2_xplained_spiflash_defconfig +++ b/configs/sama5d2_xplained_spiflash_defconfig @@ -85,3 +85,7 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_DM_VIDEO=y CONFIG_ATMEL_HLCD=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y From patchwork Tue Sep 18 07:35:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970997 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwJc3lrPz9sCR for ; Tue, 18 Sep 2018 17:55:12 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 2E575C21E74; Tue, 18 Sep 2018 07:45:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C405CC21EF0; Tue, 18 Sep 2018 07:41:08 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 4256CC21E29; Tue, 18 Sep 2018 07:40:56 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id C5997C21E89 for ; Tue, 18 Sep 2018 07:40:49 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067734" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:49 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:48 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:38 +0300 Message-ID: <1537256157-18001-16-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 15/34] configs: sama5d3_xplained: add onewire and eeprom drivers X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" SAMA5D3 SoC can have extra clip boards (PDAs) connected, which have an EEPROM memory for identification. A special GPIO can be used to read this memory over 1wire protocol. Enabling one wire and eeprom drivers for this memory. Signed-off-by: Eugen Hristev --- configs/sama5d3_xplained_mmc_defconfig | 4 ++++ configs/sama5d3_xplained_nandflash_defconfig | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig index 7f2d276..7d8d1ad 100644 --- a/configs/sama5d3_xplained_mmc_defconfig +++ b/configs/sama5d3_xplained_mmc_defconfig @@ -76,3 +76,7 @@ CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig index ac8435e..f536877 100644 --- a/configs/sama5d3_xplained_nandflash_defconfig +++ b/configs/sama5d3_xplained_nandflash_defconfig @@ -72,4 +72,8 @@ CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y CONFIG_FAT_WRITE=y From patchwork Tue Sep 18 07:35:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 971006 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwNv0LYhz9sCS for ; Tue, 18 Sep 2018 17:58:55 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C74B3C21CB1; Tue, 18 Sep 2018 07:48:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id CBD10C21E89; Tue, 18 Sep 2018 07:41:43 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0FAA5C21F32; Tue, 18 Sep 2018 07:40:57 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 83898C21E77 for ; Tue, 18 Sep 2018 07:40:51 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067735" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:51 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:50 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:39 +0300 Message-ID: <1537256157-18001-17-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 16/34] configs: sama5d27_som1_ek: add onewire and eeprom drivers X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" SAMA5D2 SoC can have extra clip boards (PDAs) connected, which have an EEPROM memory for identification. A special GPIO can be used to read this memory over 1wire protocol. Enabling one wire and eeprom drivers for this memory. Signed-off-by: Eugen Hristev --- configs/sama5d27_som1_ek_mmc_defconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configs/sama5d27_som1_ek_mmc_defconfig b/configs/sama5d27_som1_ek_mmc_defconfig index 56c7252..c1fd5c3 100644 --- a/configs/sama5d27_som1_ek_mmc_defconfig +++ b/configs/sama5d27_som1_ek_mmc_defconfig @@ -88,3 +88,7 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_DM_VIDEO=y CONFIG_ATMEL_HLCD=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y From patchwork Tue Sep 18 07:35:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970992 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwGT4c4fz9sCR for ; Tue, 18 Sep 2018 17:53:21 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4DE8CC21E2F; Tue, 18 Sep 2018 07:48:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E37F4C21F3F; Tue, 18 Sep 2018 07:41:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3E017C21F01; Tue, 18 Sep 2018 07:41:00 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 32E6CC21ECE for ; Tue, 18 Sep 2018 07:40:53 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067737" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:52 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:52 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:40 +0300 Message-ID: <1537256157-18001-18-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 17/34] configs: sama5d2_ptc_ek: add onewire and eeprom drivers X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" SAMA5D2 SoC can have extra clip boards (PDAs) connected, which have an EEPROM memory for identification. A special GPIO can be used to read this memory over 1wire protocol. Enabling one wire and eeprom drivers for this memory. Signed-off-by: Eugen Hristev --- configs/sama5d2_ptc_ek_mmc_defconfig | 4 ++++ configs/sama5d2_ptc_ek_nandflash_defconfig | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/configs/sama5d2_ptc_ek_mmc_defconfig b/configs/sama5d2_ptc_ek_mmc_defconfig index 42f0c95..047a7ec 100644 --- a/configs/sama5d2_ptc_ek_mmc_defconfig +++ b/configs/sama5d2_ptc_ek_mmc_defconfig @@ -63,3 +63,7 @@ CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y diff --git a/configs/sama5d2_ptc_ek_nandflash_defconfig b/configs/sama5d2_ptc_ek_nandflash_defconfig index c4b3085..1b3d097 100644 --- a/configs/sama5d2_ptc_ek_nandflash_defconfig +++ b/configs/sama5d2_ptc_ek_nandflash_defconfig @@ -62,3 +62,7 @@ CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y From patchwork Tue Sep 18 07:35:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 971002 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwLQ1Dmxz9sCP for ; Tue, 18 Sep 2018 17:56:46 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 41C11C21E45; Tue, 18 Sep 2018 07:47:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D62F8C21F37; Tue, 18 Sep 2018 07:41:23 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B46ADC21F02; Tue, 18 Sep 2018 07:41:02 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id F3604C21E52 for ; Tue, 18 Sep 2018 07:40:54 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067738" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:54 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:53 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:41 +0300 Message-ID: <1537256157-18001-19-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 18/34] configs: sama5d4_xplained: add onewire and eeprom drivers X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" SAMA5D4 SoC can have extra clip boards (PDAs) connected, which have an EEPROM memory for identification. A special GPIO can be used to read this memory over 1wire protocol. Enabling one wire and eeprom drivers for this memory. Signed-off-by: Eugen Hristev --- configs/sama5d4_xplained_mmc_defconfig | 4 ++++ configs/sama5d4_xplained_nandflash_defconfig | 4 ++++ configs/sama5d4_xplained_spiflash_defconfig | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig index 89393a9..26960eb 100644 --- a/configs/sama5d4_xplained_mmc_defconfig +++ b/configs/sama5d4_xplained_mmc_defconfig @@ -84,3 +84,7 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_DM_VIDEO=y CONFIG_ATMEL_HLCD=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig index 5387966..c463c74 100644 --- a/configs/sama5d4_xplained_nandflash_defconfig +++ b/configs/sama5d4_xplained_nandflash_defconfig @@ -80,3 +80,7 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_DM_VIDEO=y CONFIG_ATMEL_HLCD=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig index 39c86ec..13869da 100644 --- a/configs/sama5d4_xplained_spiflash_defconfig +++ b/configs/sama5d4_xplained_spiflash_defconfig @@ -84,3 +84,7 @@ CONFIG_USB_GADGET=y CONFIG_USB_GADGET_ATMEL_USBA=y CONFIG_DM_VIDEO=y CONFIG_ATMEL_HLCD=y +CONFIG_W1=y +CONFIG_W1_GPIO=y +CONFIG_W1_EEPROM=y +CONFIG_W1_EEPROM_DS24XXX=y From patchwork Tue Sep 18 07:35:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 971001 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwJw6hg8z9sCP for ; Tue, 18 Sep 2018 17:55:28 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 95AFCC21E29; Tue, 18 Sep 2018 07:47:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 9BBF8C21E96; Tue, 18 Sep 2018 07:41:31 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E5569C21E12; Tue, 18 Sep 2018 07:41:03 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id AA6A3C21E89 for ; Tue, 18 Sep 2018 07:40:56 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067741" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:56 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:55 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:42 +0300 Message-ID: <1537256157-18001-20-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 19/34] board: atmel: add support for pda detection X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This adds the support for PDA detection as common code for Atmel boards. Using the one wire interface over GPIO , an EEPROM memory is read and compared to preprogrammed values for PDA screens TM4300, TM7000 and TM7000B. Once the PDA is detected, an environment variable is set accordingly. Signed-off-by: Eugen Hristev --- board/atmel/common/board.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/board/atmel/common/board.c b/board/atmel/common/board.c index 650eb22..8f9b5e1 100644 --- a/board/atmel/common/board.c +++ b/board/atmel/common/board.c @@ -5,7 +5,64 @@ */ #include +#include +#include +#include + +#define AT91_PDA_EEPROM_ID_OFFSET 15 +#define AT91_PDA_EEPROM_ID_LENGTH 5 +#define AT91_PDA_EEPROM_DEFAULT_BUS 0 void dummy(void) { } + +#if defined CONFIG_W1 +void at91_pda_detect(void) +{ + struct udevice *bus, *dev; + u8 buf[AT91_PDA_EEPROM_ID_LENGTH + 1] = {0}; + int ret; + int pda = 0; + + ret = w1_get_bus(AT91_PDA_EEPROM_DEFAULT_BUS, &bus); + if (ret) + return; + + for (device_find_first_child(bus, &dev); + dev; + device_find_next_child(&dev)) { + ret = device_probe(dev); + if (ret) { + continue; + } else { + ret = w1_eeprom_read_buf(dev, AT91_PDA_EEPROM_ID_OFFSET, + (u8 *)buf, AT91_PDA_EEPROM_ID_LENGTH); + if (ret) + return; + break; + } + } + pda = simple_strtoul((const char *)buf, NULL, 10); + + switch (pda) { + case 7000: + if (buf[4] == 'B') + printf("PDA TM7000B detected\n"); + else + printf("PDA TM7000 detected\n"); + break; + case 4300: + printf("PDA TM4300 detected\n"); + break; + case 5000: + printf("PDA TM5000 detected\n"); + break; + } + env_set("pda", (const char *)buf); +} +#else +void at91_pda_detect(void) +{ +} +#endif From patchwork Tue Sep 18 07:35:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 971012 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwSq4gdVz9sCR for ; Tue, 18 Sep 2018 18:02:19 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 4DE96C21EB1; Tue, 18 Sep 2018 07:47:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id C8691C21F21; Tue, 18 Sep 2018 07:41:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 40E85C21F29; Tue, 18 Sep 2018 07:41:05 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 55A19C21E96 for ; Tue, 18 Sep 2018 07:40:58 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067743" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:57 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:57 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:43 +0300 Message-ID: <1537256157-18001-21-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 20/34] board: sama5d2_xplained: add pda detect call at init time X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Call the PDA detection mechanism at boot time so we can have the pda environment variable ready for use. Signed-off-by: Eugen Hristev --- board/atmel/sama5d2_xplained/sama5d2_xplained.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index 592b4d8..fccd80e 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -15,6 +15,8 @@ #include #include +extern void at91_pda_detect(void); + DECLARE_GLOBAL_DATA_PTR; static void board_usb_hw_init(void) @@ -28,6 +30,7 @@ int board_late_init(void) #ifdef CONFIG_DM_VIDEO at91_video_show_board_info(); #endif + at91_pda_detect(); return 0; } #endif From patchwork Tue Sep 18 07:35:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 971000 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwJs3C8Dz9sCS for ; Tue, 18 Sep 2018 17:55:25 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 27259C21E90; Tue, 18 Sep 2018 07:46:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 14FDCC21EF7; Tue, 18 Sep 2018 07:41:22 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 65097C21E36; Tue, 18 Sep 2018 07:41:05 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id E4D25C21E68 for ; Tue, 18 Sep 2018 07:40:59 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067746" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:40:59 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:40:59 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:44 +0300 Message-ID: <1537256157-18001-22-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 21/34] board: sama5d3_xplained: add pda detect call at init time X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Call the PDA detection mechanism at boot time so we can have the pda environment variable ready for use. Signed-off-by: Eugen Hristev --- arch/arm/mach-at91/Kconfig | 1 + board/atmel/sama5d3_xplained/sama5d3_xplained.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 69856c8..3784cbb 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -177,6 +177,7 @@ config TARGET_SAMA5D3_XPLAINED select BOARD_EARLY_INIT_F select SAMA5D3 select SUPPORT_SPL + select BOARD_LATE_INIT config TARGET_SAMA5D3XEK bool "SAMA5D3X-EK board" diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c index c47f638..289f8d8 100644 --- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c +++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c @@ -18,6 +18,8 @@ DECLARE_GLOBAL_DATA_PTR; +extern void at91_pda_detect(void); + #ifdef CONFIG_NAND_ATMEL void sama5d3_xplained_nand_hw_init(void) { @@ -72,6 +74,14 @@ void board_debug_uart_init(void) } #endif +#ifdef CONFIG_BOARD_LATE_INIT +int board_late_init(void) +{ + at91_pda_detect(); + return 0; +} +#endif + #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { From patchwork Tue Sep 18 07:35:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970987 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwDK09W0z9sCP for ; Tue, 18 Sep 2018 17:51:28 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id A5DB2C21E08; Tue, 18 Sep 2018 07:48:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D18F5C21F32; Tue, 18 Sep 2018 07:41:44 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 759F9C21E08; Tue, 18 Sep 2018 07:41:05 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id B0ABDC21E0D for ; Tue, 18 Sep 2018 07:41:01 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067747" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:41:01 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:41:00 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:45 +0300 Message-ID: <1537256157-18001-23-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 22/34] board: sama5d27_som1_ek: add pda detect call at init time X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Call the PDA detection mechanism at boot time so we can have the pda environment variable ready for use. Signed-off-by: Eugen Hristev --- board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c index d5ddf8d..8363434 100644 --- a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c +++ b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c @@ -15,6 +15,8 @@ #include #include +extern void at91_pda_detect(void); + DECLARE_GLOBAL_DATA_PTR; static void board_usb_hw_init(void) @@ -28,6 +30,7 @@ int board_late_init(void) #ifdef CONFIG_DM_VIDEO at91_video_show_board_info(); #endif + at91_pda_detect(); return 0; } #endif From patchwork Tue Sep 18 07:35:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970994 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwHx1jSmz9sCP for ; Tue, 18 Sep 2018 17:54:36 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 71F2EC21E29; Tue, 18 Sep 2018 07:48:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 13031C21F03; Tue, 18 Sep 2018 07:41:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 314AEC21E63; Tue, 18 Sep 2018 07:41:07 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 8FAA5C21EF0 for ; Tue, 18 Sep 2018 07:41:03 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067750" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:41:03 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:41:02 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:46 +0300 Message-ID: <1537256157-18001-24-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 23/34] board: sama5d2_ptc_ek: add pda detect call at init time X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Call the PDA detection mechanism at boot time so we can have the pda environment variable ready for use. Signed-off-by: Eugen Hristev --- arch/arm/mach-at91/Kconfig | 1 + board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 3784cbb..a6329dc 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -151,6 +151,7 @@ config TARGET_SAMA5D2_PTC_EK bool "SAMA5D2 PTC EK board" select BOARD_EARLY_INIT_F select SAMA5D2 + select BOARD_LATE_INIT config TARGET_SAMA5D2_XPLAINED bool "SAMA5D2 Xplained board" diff --git a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c index 789841e..17e08fa 100644 --- a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c +++ b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c @@ -20,6 +20,8 @@ #include #include +extern void at91_pda_detect(void); + DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_NAND_ATMEL @@ -65,6 +67,14 @@ static void board_nand_hw_init(void) } #endif +#ifdef CONFIG_BOARD_LATE_INIT +int board_late_init(void) +{ + at91_pda_detect(); + return 0; +} +#endif + static void board_usb_hw_init(void) { atmel_pio4_set_pio_output(AT91_PIO_PORTB, 12, ATMEL_PIO_PUEN_MASK); From patchwork Tue Sep 18 07:35:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970988 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwDq3v1qz9sCP for ; Tue, 18 Sep 2018 17:51:55 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 39BF0C21E68; Tue, 18 Sep 2018 07:46:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 321C5C21EF1; Tue, 18 Sep 2018 07:41:19 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B9146C21E08; Tue, 18 Sep 2018 07:41:09 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 43950C21E08 for ; Tue, 18 Sep 2018 07:41:05 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067758" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:41:04 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:41:04 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:47 +0300 Message-ID: <1537256157-18001-25-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 24/34] board: sama5d4_xplained: add pda detect call at init time X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Call the PDA detection mechanism at boot time so we can have the pda environment variable ready for use. Signed-off-by: Eugen Hristev --- board/atmel/sama5d4_xplained/sama5d4_xplained.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c index 526c6c7..4da6489 100644 --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c @@ -17,6 +17,8 @@ DECLARE_GLOBAL_DATA_PTR; +extern void at91_pda_detect(void); + #ifdef CONFIG_NAND_ATMEL static void sama5d4_xplained_nand_hw_init(void) { @@ -71,6 +73,7 @@ static void sama5d4_xplained_usb_hw_init(void) #ifdef CONFIG_BOARD_LATE_INIT int board_late_init(void) { + at91_pda_detect(); #ifdef CONFIG_DM_VIDEO at91_video_show_board_info(); #endif From patchwork Tue Sep 18 07:35:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970990 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwFq1JGTz9sCR for ; Tue, 18 Sep 2018 17:52:47 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E0C84C21DF8; Tue, 18 Sep 2018 07:46:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5613EC21EBB; Tue, 18 Sep 2018 07:41:18 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 101ACC21F02; Tue, 18 Sep 2018 07:41:11 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 0A3A1C21E29 for ; Tue, 18 Sep 2018 07:41:06 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067761" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:41:06 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:41:06 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:48 +0300 Message-ID: <1537256157-18001-26-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 25/34] configs: sama5d2_xplained: add fdt overlay support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add commands for fdt overlay merging. This is required for the boot scripts that detect PDAs and apply specific overlays to the DTB passed on to kernel. Signed-off-by: Eugen Hristev --- configs/sama5d2_xplained_mmc_defconfig | 1 + configs/sama5d2_xplained_spiflash_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig index 46b143b..f8748f8 100644 --- a/configs/sama5d2_xplained_mmc_defconfig +++ b/configs/sama5d2_xplained_mmc_defconfig @@ -92,3 +92,4 @@ CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig index 9da026b..efe7176 100644 --- a/configs/sama5d2_xplained_spiflash_defconfig +++ b/configs/sama5d2_xplained_spiflash_defconfig @@ -89,3 +89,4 @@ CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y +CONFIG_OF_LIBFDT_OVERLAY=y From patchwork Tue Sep 18 07:35:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970986 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwBn58Wdz9sCP for ; Tue, 18 Sep 2018 17:50:09 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 1019AC21E08; Tue, 18 Sep 2018 07:49:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E5EA5C21E70; Tue, 18 Sep 2018 07:41:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B5CFDC21F49; Tue, 18 Sep 2018 07:41:14 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id CAF13C21EF1 for ; Tue, 18 Sep 2018 07:41:08 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067762" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:41:08 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:41:07 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:49 +0300 Message-ID: <1537256157-18001-27-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 26/34] configs: sama5d3_xplained: add fdt overlay support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add commands for fdt overlay merging. This is required for the boot scripts that detect PDAs and apply specific overlays to the DTB passed on to kernel. Signed-off-by: Eugen Hristev --- configs/sama5d3_xplained_mmc_defconfig | 1 + configs/sama5d3_xplained_nandflash_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/sama5d3_xplained_mmc_defconfig b/configs/sama5d3_xplained_mmc_defconfig index 7d8d1ad..154cdc2 100644 --- a/configs/sama5d3_xplained_mmc_defconfig +++ b/configs/sama5d3_xplained_mmc_defconfig @@ -80,3 +80,4 @@ CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/configs/sama5d3_xplained_nandflash_defconfig b/configs/sama5d3_xplained_nandflash_defconfig index f536877..3bf93de 100644 --- a/configs/sama5d3_xplained_nandflash_defconfig +++ b/configs/sama5d3_xplained_nandflash_defconfig @@ -77,3 +77,4 @@ CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y CONFIG_FAT_WRITE=y +CONFIG_OF_LIBFDT_OVERLAY=y From patchwork Tue Sep 18 07:35:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 971011 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwSn4STcz9sCR for ; Tue, 18 Sep 2018 18:02:17 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 565E8C21E76; Tue, 18 Sep 2018 07:49:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id F2D20C21F51; Tue, 18 Sep 2018 07:41:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D92CAC21F51; Tue, 18 Sep 2018 07:41:16 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 79BE3C21F00 for ; Tue, 18 Sep 2018 07:41:10 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067763" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:41:10 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:41:09 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:50 +0300 Message-ID: <1537256157-18001-28-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 27/34] configs: sama5d2_ptc_ek: add fdt overlay support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add commands for fdt overlay merging. This is required for the boot scripts that detect PDAs and apply specific overlays to the DTB passed on to kernel. Signed-off-by: Eugen Hristev --- configs/sama5d2_ptc_ek_mmc_defconfig | 1 + configs/sama5d2_ptc_ek_nandflash_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/sama5d2_ptc_ek_mmc_defconfig b/configs/sama5d2_ptc_ek_mmc_defconfig index 047a7ec..60df0f0 100644 --- a/configs/sama5d2_ptc_ek_mmc_defconfig +++ b/configs/sama5d2_ptc_ek_mmc_defconfig @@ -67,3 +67,4 @@ CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/configs/sama5d2_ptc_ek_nandflash_defconfig b/configs/sama5d2_ptc_ek_nandflash_defconfig index 1b3d097..4e39406 100644 --- a/configs/sama5d2_ptc_ek_nandflash_defconfig +++ b/configs/sama5d2_ptc_ek_nandflash_defconfig @@ -66,3 +66,4 @@ CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y +CONFIG_OF_LIBFDT_OVERLAY=y From patchwork Tue Sep 18 07:35:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970995 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwJ462R3z9sCS for ; Tue, 18 Sep 2018 17:54:44 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 81515C21E42; Tue, 18 Sep 2018 07:49:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 113D0C21EE7; Tue, 18 Sep 2018 07:42:15 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2F7E5C21E08; Tue, 18 Sep 2018 07:41:16 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 3D06FC21E35 for ; Tue, 18 Sep 2018 07:41:12 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067764" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:41:11 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:41:11 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:51 +0300 Message-ID: <1537256157-18001-29-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 28/34] configs: sama5d27_som1_ek: add fdt overlay support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add commands for fdt overlay merging. This is required for the boot scripts that detect PDAs and apply specific overlays to the DTB passed on to kernel. Signed-off-by: Eugen Hristev --- configs/sama5d27_som1_ek_mmc_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/sama5d27_som1_ek_mmc_defconfig b/configs/sama5d27_som1_ek_mmc_defconfig index c1fd5c3..270ac37 100644 --- a/configs/sama5d27_som1_ek_mmc_defconfig +++ b/configs/sama5d27_som1_ek_mmc_defconfig @@ -92,3 +92,4 @@ CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y +CONFIG_OF_LIBFDT_OVERLAY=y From patchwork Tue Sep 18 07:35:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970999 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwJk5JpQz9sCP for ; Tue, 18 Sep 2018 17:55:18 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 7F069C21E4E; Tue, 18 Sep 2018 07:50:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A3333C21F4A; Tue, 18 Sep 2018 07:42:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 75A25C21F59; Tue, 18 Sep 2018 07:41:18 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id D8EBFC21F13 for ; Tue, 18 Sep 2018 07:41:13 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067765" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:41:13 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:41:12 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:52 +0300 Message-ID: <1537256157-18001-30-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 29/34] configs: sama5d4_xplained: add fdt overlay support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add commands for fdt overlay merging. This is required for the boot scripts that detect PDAs and apply specific overlays to the DTB passed on to kernel. Signed-off-by: Eugen Hristev --- configs/sama5d4_xplained_mmc_defconfig | 1 + configs/sama5d4_xplained_nandflash_defconfig | 1 + configs/sama5d4_xplained_spiflash_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig index 26960eb..f60b6b5 100644 --- a/configs/sama5d4_xplained_mmc_defconfig +++ b/configs/sama5d4_xplained_mmc_defconfig @@ -88,3 +88,4 @@ CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig index c463c74..3524dbf 100644 --- a/configs/sama5d4_xplained_nandflash_defconfig +++ b/configs/sama5d4_xplained_nandflash_defconfig @@ -84,3 +84,4 @@ CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y +CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig index 13869da..3f519cd 100644 --- a/configs/sama5d4_xplained_spiflash_defconfig +++ b/configs/sama5d4_xplained_spiflash_defconfig @@ -88,3 +88,4 @@ CONFIG_W1=y CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y +CONFIG_OF_LIBFDT_OVERLAY=y From patchwork Tue Sep 18 07:35:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 970996 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwJ51fQ4z9sCV for ; Tue, 18 Sep 2018 17:54:45 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E7E78C21E6A; Tue, 18 Sep 2018 07:50:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 4E175C21F31; Tue, 18 Sep 2018 07:42:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3246CC21EB1; Tue, 18 Sep 2018 07:41:19 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id A5E0AC21E29 for ; Tue, 18 Sep 2018 07:41:15 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067767" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:41:15 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:41:14 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:53 +0300 Message-ID: <1537256157-18001-31-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 30/34] ARM: dts: at91: sama5d2_xplained: add onewire connector for LCD eeprom X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add onewire node in device tree for TM series LCDs Signed-off-by: Eugen Hristev --- arch/arm/dts/at91-sama5d2_xplained.dts | 17 +++++++++++++++++ arch/arm/dts/sama5d2.dtsi | 5 +++++ 2 files changed, 22 insertions(+) diff --git a/arch/arm/dts/at91-sama5d2_xplained.dts b/arch/arm/dts/at91-sama5d2_xplained.dts index 01326a1..33064b3 100644 --- a/arch/arm/dts/at91-sama5d2_xplained.dts +++ b/arch/arm/dts/at91-sama5d2_xplained.dts @@ -11,6 +11,18 @@ stdout-path = &uart1; }; + onewire_tm: onewire { + gpios = <&pioA PIN_PB0 0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_onewire_tm_default>; + status = "okay"; + + w1_eeprom: w1_eeprom@0 { + compatible = "maxim,ds24b33"; + status = "okay"; + }; + }; + ahb { usb1: ohci@00400000 { num-ports = <3>; @@ -270,6 +282,11 @@ pinmux = ; bias-disable; }; + + pinctrl_onewire_tm_default: onewire_tm_default { + pinmux = ; + bias-pull-up; + }; }; }; }; diff --git a/arch/arm/dts/sama5d2.dtsi b/arch/arm/dts/sama5d2.dtsi index 6645a55..830251a 100644 --- a/arch/arm/dts/sama5d2.dtsi +++ b/arch/arm/dts/sama5d2.dtsi @@ -769,4 +769,9 @@ }; }; }; + + onewire_tm: onewire { + compatible = "w1-gpio"; + status = "disabled"; + }; }; From patchwork Tue Sep 18 07:35:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 971010 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwSk0vHSz9sCR for ; Tue, 18 Sep 2018 18:02:14 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id CB42AC21E68; Tue, 18 Sep 2018 07:51:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id AA71BC21E63; Tue, 18 Sep 2018 07:42:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 30504C21F60; Tue, 18 Sep 2018 07:41:26 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 8BD66C21EBD for ; Tue, 18 Sep 2018 07:41:17 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067771" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:41:17 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:41:16 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:54 +0300 Message-ID: <1537256157-18001-32-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 31/34] ARM: dts: at91: sama5d3_xplained: add onewire connector for LCD eeprom X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add onewire node in device tree for TM series LCDs Signed-off-by: Eugen Hristev --- arch/arm/dts/at91-sama5d3_xplained.dts | 17 +++++++++++++++++ arch/arm/dts/sama5d3.dtsi | 5 +++++ 2 files changed, 22 insertions(+) diff --git a/arch/arm/dts/at91-sama5d3_xplained.dts b/arch/arm/dts/at91-sama5d3_xplained.dts index 6959710..20fba5f 100644 --- a/arch/arm/dts/at91-sama5d3_xplained.dts +++ b/arch/arm/dts/at91-sama5d3_xplained.dts @@ -36,6 +36,18 @@ }; }; + onewire_tm: onewire { + gpios = <&pioE 23 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_onewire_tm_default>; + status = "okay"; + + w1_eeprom: w1_eeprom@0 { + compatible = "maxim,ds24b33"; + status = "okay"; + }; + }; + ahb { apb { mmc0: mmc@f0000000 { @@ -243,6 +255,11 @@ atmel,pins = ; /* PE9, conflicts with A9 */ }; + + pinctrl_onewire_tm_default: onewire_tm_default { + atmel,pins = + ; + }; }; }; }; diff --git a/arch/arm/dts/sama5d3.dtsi b/arch/arm/dts/sama5d3.dtsi index ba707b0..7db66c5 100644 --- a/arch/arm/dts/sama5d3.dtsi +++ b/arch/arm/dts/sama5d3.dtsi @@ -1534,4 +1534,9 @@ }; }; }; + + onewire_tm: onewire { + compatible = "w1-gpio"; + status = "disabled"; + }; }; From patchwork Tue Sep 18 07:35:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 971004 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwN050Myz9sCP for ; Tue, 18 Sep 2018 17:58:08 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3485FC21E29; Tue, 18 Sep 2018 07:50:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 42544C21F27; Tue, 18 Sep 2018 07:42:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2A9C6C21F27; Tue, 18 Sep 2018 07:41:27 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id 475F8C21F03 for ; Tue, 18 Sep 2018 07:41:19 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067772" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:41:18 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:41:18 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:55 +0300 Message-ID: <1537256157-18001-33-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 32/34] ARM: dts: at91: sama5d27_som1_ek: add onewire connector for LCD eeprom X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add onewire node in device tree for TM series LCDs Signed-off-by: Eugen Hristev --- arch/arm/dts/at91-sama5d27_som1_ek.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/dts/at91-sama5d27_som1_ek.dts b/arch/arm/dts/at91-sama5d27_som1_ek.dts index 5e62d4a..4cd6db6 100644 --- a/arch/arm/dts/at91-sama5d27_som1_ek.dts +++ b/arch/arm/dts/at91-sama5d27_som1_ek.dts @@ -54,6 +54,18 @@ stdout-path = &uart1; }; + onewire_tm: onewire { + gpios = <&pioA 17 0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_onewire_tm_default>; + status = "okay"; + + w1_eeprom: w1_eeprom@0 { + compatible = "maxim,ds24b33"; + status = "okay"; + }; + }; + ahb { usb1: ohci@00400000 { num-ports = <3>; @@ -208,6 +220,11 @@ pinmux = ; bias-disable; }; + + pinctrl_onewire_tm_default: onewire_tm_default { + pinmux = ; + bias-pull-up; + }; }; }; }; From patchwork Tue Sep 18 07:35:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 971007 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwPn4gzqz9sCR for ; Tue, 18 Sep 2018 17:59:41 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3B2C4C21E7E; Tue, 18 Sep 2018 07:51:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BCE96C21F6A; Tue, 18 Sep 2018 07:43:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0C588C21F67; Tue, 18 Sep 2018 07:41:30 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id EB4F2C21F1A for ; Tue, 18 Sep 2018 07:41:20 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067774" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:41:20 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:41:19 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:56 +0300 Message-ID: <1537256157-18001-34-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 33/34] ARM: dts: at91: sama5d2_ptc: add onewire connector for LCD eeprom X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add onewire node in device tree for TM series LCDs Signed-off-by: Eugen Hristev --- arch/arm/dts/at91-sama5d2_ptc_ek.dts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/dts/at91-sama5d2_ptc_ek.dts b/arch/arm/dts/at91-sama5d2_ptc_ek.dts index ab5ab21..068a117 100644 --- a/arch/arm/dts/at91-sama5d2_ptc_ek.dts +++ b/arch/arm/dts/at91-sama5d2_ptc_ek.dts @@ -56,6 +56,18 @@ stdout-path = &uart0; }; + onewire_tm: onewire { + gpios = <&pioA PIN_PB31 0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_onewire_tm_default>; + status = "okay"; + + w1_eeprom: w1_eeprom@0 { + compatible = "maxim,ds24b33"; + status = "okay"; + }; + }; + ahb { usb0: gadget@00300000 { atmel,vbus-gpio = <&pioA PIN_PA27 GPIO_ACTIVE_HIGH>; @@ -208,6 +220,11 @@ pinmux = ; bias-disable; }; + + pinctrl_onewire_tm_default: onewire_tm_default { + pinmux = ; + bias-pull-up; + }; }; }; }; From patchwork Tue Sep 18 07:35:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 971009 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42DwQv2FXDz9sCP for ; Tue, 18 Sep 2018 18:00:39 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 0FA70C21DED; Tue, 18 Sep 2018 07:50:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 49B10C21F35; Tue, 18 Sep 2018 07:42:17 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6416AC21E8A; Tue, 18 Sep 2018 07:41:30 +0000 (UTC) Received: from esa2.microchip.iphmx.com (esa2.microchip.iphmx.com [68.232.149.84]) by lists.denx.de (Postfix) with ESMTPS id BEF14C21F27 for ; Tue, 18 Sep 2018 07:41:22 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.53,389,1531810800"; d="scan'208";a="20067778" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 18 Sep 2018 00:41:22 -0700 Received: from eh-station.mchp-main.com (10.10.76.4) by chn-sv-exch06.mchp-main.com (10.10.76.107) with Microsoft SMTP Server id 14.3.352.0; Tue, 18 Sep 2018 00:41:21 -0700 From: Eugen Hristev To: , Date: Tue, 18 Sep 2018 10:35:57 +0300 Message-ID: <1537256157-18001-35-git-send-email-eugen.hristev@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> References: <1537256157-18001-1-git-send-email-eugen.hristev@microchip.com> MIME-Version: 1.0 Cc: maxime.ripard@bootlin.com, nicolas.ferre@microchip.com Subject: [U-Boot] [PATCH v4 34/34] ARM: dts: at91: sama5d4_xplained: add onewire connector for LCD eeprom X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add onewire node in device tree for TM series LCDs Signed-off-by: Eugen Hristev --- arch/arm/dts/at91-sama5d4_xplained.dts | 16 ++++++++++++++++ arch/arm/dts/sama5d4.dtsi | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/arch/arm/dts/at91-sama5d4_xplained.dts b/arch/arm/dts/at91-sama5d4_xplained.dts index ea35dc2..58a0e60 100644 --- a/arch/arm/dts/at91-sama5d4_xplained.dts +++ b/arch/arm/dts/at91-sama5d4_xplained.dts @@ -58,6 +58,18 @@ stdout-path = &usart3; }; + onewire_tm: onewire { + gpios = <&pioE 15 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_onewire_tm_default>; + status = "okay"; + + w1_eeprom: w1_eeprom@0 { + compatible = "maxim,ds24b33"; + status = "okay"; + }; + }; + memory { reg = <0x20000000 0x20000000>; }; @@ -199,6 +211,10 @@ atmel,pins = ; }; + pinctrl_onewire_tm_default: onewire_tm_default { + atmel,pins = + ; + }; }; }; }; diff --git a/arch/arm/dts/sama5d4.dtsi b/arch/arm/dts/sama5d4.dtsi index 8072b8a..8875d7b 100644 --- a/arch/arm/dts/sama5d4.dtsi +++ b/arch/arm/dts/sama5d4.dtsi @@ -1913,4 +1913,9 @@ }; }; }; + + onewire_tm: onewire { + compatible = "w1-gpio"; + status = "disabled"; + }; };