Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1157055/?format=api
{ "id": 1157055, "url": "http://patchwork.ozlabs.org/api/patches/1157055/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20190903143850.9824-4-lukma@denx.de/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20190903143850.9824-4-lukma@denx.de>", "list_archive_url": null, "date": "2019-09-03T14:38:39", "name": "[U-Boot,v2,03/14] DM: I2C: Switch display5 board to use DM_I2C", "commit_ref": "dac9a8f8a2ae3a116748d056305251cfc035a6e4", "pull_url": null, "state": "accepted", "archived": false, "hash": "94a36cb2206c6a435bdf386c787a5930916479af", "submitter": { "id": 70701, "url": "http://patchwork.ozlabs.org/api/people/70701/?format=api", "name": "Lukasz Majewski", "email": "lukma@denx.de" }, "delegate": { "id": 1693, "url": "http://patchwork.ozlabs.org/api/users/1693/?format=api", "username": "sbabic", "first_name": "Stefano", "last_name": "Babic", "email": "sbabic@denx.de" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20190903143850.9824-4-lukma@denx.de/mbox/", "series": [ { "id": 128783, "url": "http://patchwork.ozlabs.org/api/series/128783/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=128783", "date": "2019-09-03T14:38:36", "name": "DM: display5: Convert display5 board to DM/DTS (including 'factory' setup)", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/128783/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1157055/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1157055/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=none (p=none dis=none) header.from=denx.de" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 46N8rL3NM1z9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 4 Sep 2019 00:45:22 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid 2A153C21E02; Tue, 3 Sep 2019 14:40:08 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 8B791C21E0D;\n\tTue, 3 Sep 2019 14:39:32 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid DF4EFC21DD4; Tue, 3 Sep 2019 14:39:18 +0000 (UTC)", "from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10])\n\tby lists.denx.de (Postfix) with ESMTPS id 090C7C21DD4\n\tfor <u-boot@lists.denx.de>; Tue, 3 Sep 2019 14:39:15 +0000 (UTC)", "from frontend01.mail.m-online.net (unknown [192.168.8.182])\n\tby mail-out.m-online.net (Postfix) with ESMTP id 46N8jG0Nk9z1rVvl;\n\tTue, 3 Sep 2019 16:39:13 +0200 (CEST)", "from localhost (dynscan1.mnet-online.de [192.168.6.70])\n\tby mail.m-online.net (Postfix) with ESMTP id 46N8jF53k0z1qqkB;\n\tTue, 3 Sep 2019 16:39:13 +0200 (CEST)", "from mail.mnet-online.de ([192.168.8.182])\n\tby localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id SPqmtaMgI7Lp; Tue, 3 Sep 2019 16:39:11 +0200 (CEST)", "from localhost.localdomain (85-222-111-42.dynamic.chello.pl\n\t[85.222.111.42])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mail.mnet-online.de (Postfix) with ESMTPSA;\n\tTue, 3 Sep 2019 16:39:11 +0200 (CEST)" ], "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\n\tautolearn_force=no version=3.4.0", "X-Virus-Scanned": "amavisd-new at mnet-online.de", "X-Auth-Info": "ZkUCAF79S+YoCt6ArI5EtIaVCrcGmKsDUxMWcjkwhDM=", "From": "Lukasz Majewski <lukma@denx.de>", "To": "u-boot@lists.denx.de,\n\tStefano Babic <sbabic@denx.de>", "Date": "Tue, 3 Sep 2019 16:38:39 +0200", "Message-Id": "<20190903143850.9824-4-lukma@denx.de>", "X-Mailer": "git-send-email 2.11.0", "In-Reply-To": "<20190903143850.9824-1-lukma@denx.de>", "References": "<20190903143850.9824-1-lukma@denx.de>", "Cc": "Marek Vasut <marex@denx.de>, Parthiban Nallathambi <parthitce@gmail.com>,\n\tOtavio Salvador <otavio@ossystems.com.br>,\n\tMartyn Welch <martyn@welchs.me.uk>, \n\t\"NXP i.MX U-Boot Team\" <uboot-imx@nxp.com>,\n\tFabien Lahoudere <fabien.lahoudere@collabora.com>", "Subject": "[U-Boot] [PATCH v2 03/14] DM: I2C: Switch display5 board to use\n\tDM_I2C", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "After this commit the display5 device would use I2C driver supporting\ndriver model (DM_I2C).\n\nThe 'i2c' and 'eeprom' commands now use DM I2C drivers and initialize\non-bus devices according to device tree description.\n\nSigned-off-by: Lukasz Majewski <lukma@denx.de>\n---\n\nChanges in v2: None\n\n arch/arm/mach-imx/mx6/Kconfig | 2 ++\n board/liebherr/display5/display5.c | 48 --------------------------------------\n configs/display5_defconfig | 14 +++++++++++\n include/configs/display5.h | 8 -------\n 4 files changed, 16 insertions(+), 56 deletions(-)", "diff": "diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig\nindex fe5991e7c6db..39f0e548f5f1 100644\n--- a/arch/arm/mach-imx/mx6/Kconfig\n+++ b/arch/arm/mach-imx/mx6/Kconfig\n@@ -187,6 +187,8 @@ config TARGET_DHCOMIMX6\n config TARGET_DISPLAY5\n \tbool \"LWN DISPLAY5 board\"\n \tselect DM\n+\tselect DM_I2C\n+\tselect DM_GPIO\n \tselect DM_SERIAL\n \tselect SUPPORT_SPL\n \timply CMD_DM\ndiff --git a/board/liebherr/display5/display5.c b/board/liebherr/display5/display5.c\nindex 037c4e69e59c..5ebc8529e9c7 100644\n--- a/board/liebherr/display5/display5.c\n+++ b/board/liebherr/display5/display5.c\n@@ -18,7 +18,6 @@\n #include <asm/gpio.h>\n #include <malloc.h>\n #include <asm/mach-imx/iomux-v3.h>\n-#include <asm/mach-imx/mxc_i2c.h>\n #include <asm/mach-imx/boot_mode.h>\n #include <asm/mach-imx/spi.h>\n #include <mmc.h>\n@@ -119,49 +118,6 @@ int dram_init(void)\n \treturn 0;\n }\n \n-#define PC\tMUX_PAD_CTRL(I2C_PAD_CTRL)\n-/* I2C1: TFA9879 */\n-struct i2c_pads_info i2c_pad_info0 = {\n-\t.scl = {\n-\t\t.i2c_mode = MX6_PAD_EIM_D21__I2C1_SCL | PC,\n-\t\t.gpio_mode = MX6_PAD_EIM_D21__GPIO3_IO21 | PC,\n-\t\t.gp = IMX_GPIO_NR(3, 21)\n-\t},\n-\t.sda = {\n-\t\t.i2c_mode = MX6_PAD_EIM_D28__I2C1_SDA | PC,\n-\t\t.gpio_mode = MX6_PAD_EIM_D28__GPIO3_IO28 | PC,\n-\t\t.gp = IMX_GPIO_NR(3, 28)\n-\t}\n-};\n-\n-/* I2C2: TIVO TM4C123 */\n-struct i2c_pads_info i2c_pad_info1 = {\n-\t.scl = {\n-\t\t.i2c_mode = MX6_PAD_EIM_EB2__I2C2_SCL | PC,\n-\t\t.gpio_mode = MX6_PAD_EIM_EB2__GPIO2_IO30 | PC,\n-\t\t.gp = IMX_GPIO_NR(2, 30)\n-\t},\n-\t.sda = {\n-\t\t.i2c_mode = MX6_PAD_EIM_D16__I2C2_SDA | PC,\n-\t\t.gpio_mode = MX6_PAD_EIM_D16__GPIO3_IO16 | PC,\n-\t\t.gp = IMX_GPIO_NR(3, 16)\n-\t}\n-};\n-\n-/* I2C3: PMIC PF0100, EEPROM AT24C256C */\n-struct i2c_pads_info i2c_pad_info2 = {\n-\t.scl = {\n-\t\t.i2c_mode = MX6_PAD_EIM_D17__I2C3_SCL | PC,\n-\t\t.gpio_mode = MX6_PAD_EIM_D17__GPIO3_IO17 | PC,\n-\t\t.gp = IMX_GPIO_NR(3, 17)\n-\t},\n-\t.sda = {\n-\t\t.i2c_mode = MX6_PAD_EIM_D18__I2C3_SDA | PC,\n-\t\t.gpio_mode = MX6_PAD_EIM_D18__GPIO3_IO18 | PC,\n-\t\t.gp = IMX_GPIO_NR(3, 18)\n-\t}\n-};\n-\n iomux_v3_cfg_t const misc_pads[] = {\n \t/* Prod ID GPIO pins */\n \tMX6_PAD_NANDF_D4__GPIO2_IO04 | MUX_PAD_CTRL(NO_PAD_CTRL),\n@@ -369,10 +325,6 @@ int board_init(void)\n \n \tudelay(25);\n \n-\tsetup_i2c(0, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info0);\n-\tsetup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);\n-\tsetup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);\n-\n \treturn 0;\n }\n \ndiff --git a/configs/display5_defconfig b/configs/display5_defconfig\nindex 69f3ceee098b..9ab055ac5587 100644\n--- a/configs/display5_defconfig\n+++ b/configs/display5_defconfig\n@@ -67,6 +67,19 @@ CONFIG_DEFAULT_DEVICE_TREE=\"imx6q-display5\"\n CONFIG_ENV_IS_IN_SPI_FLASH=y\n CONFIG_BOOTCOUNT_LIMIT=y\n CONFIG_BOOTCOUNT_BOOTLIMIT=3\n+CONFIG_I2C_SET_DEFAULT_BUS_NUM=y\n+CONFIG_I2C_DEFAULT_BUS_NUMBER=0x2\n+CONFIG_SYS_I2C_MXC=y\n+CONFIG_SYS_I2C_MXC_I2C1=y\n+CONFIG_SYS_I2C_MXC_I2C2=y\n+CONFIG_SYS_I2C_MXC_I2C3=y\n+CONFIG_MISC=y\n+CONFIG_I2C_EEPROM=y\n+CONFIG_SYS_I2C_EEPROM_ADDR=0x50\n+CONFIG_SYS_I2C_EEPROM_BUS=2\n+CONFIG_SYS_EEPROM_SIZE=32768\n+CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=5\n+CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2\n CONFIG_SUPPORT_EMMC_BOOT=y\n CONFIG_FSL_USDHC=y\n CONFIG_MTD_DEVICE=y\n@@ -85,4 +98,5 @@ CONFIG_PINCTRL_IMX6=y\n CONFIG_MXC_UART=y\n CONFIG_SPI=y\n CONFIG_MXC_SPI=y\n+CONFIG_I2C_EDID=y\n CONFIG_IMX_WATCHDOG=y\ndiff --git a/include/configs/display5.h b/include/configs/display5.h\nindex 550b7c09f4f6..2a039c24288f 100644\n--- a/include/configs/display5.h\n+++ b/include/configs/display5.h\n@@ -57,15 +57,7 @@\n #define CONFIG_MXC_UART_BASE\t\tUART5_BASE\n \n /* I2C Configs */\n-#define CONFIG_SYS_I2C\n-#define CONFIG_SYS_I2C_MXC\n-#define CONFIG_SYS_I2C_MXC_I2C1\n-#define CONFIG_SYS_I2C_MXC_I2C2\n-#define CONFIG_SYS_I2C_MXC_I2C3\n #define CONFIG_I2C_MULTI_BUS\n-#define CONFIG_SYS_I2C_SPEED\t\t100000\n-#define CONFIG_I2C_EDID\n-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2\n \n /* Ethernet */\n #ifdef CONFIG_FEC_MXC\n", "prefixes": [ "U-Boot", "v2", "03/14" ] }