From patchwork Thu Apr 25 13:30:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1090800 X-Patchwork-Delegate: sr@denx.de 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=nic.cz Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="H/rlANhL"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44qdNp6J9Sz9sBp for ; Thu, 25 Apr 2019 23:30:49 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B7560C21E2F; Thu, 25 Apr 2019 13:30: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=T_DKIM_INVALID 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 10EF0C21C2C; Thu, 25 Apr 2019 13:30:45 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5749AC21D8E; Thu, 25 Apr 2019 13:30:43 +0000 (UTC) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) by lists.denx.de (Postfix) with ESMTPS id 1179EC21C2C for ; Thu, 25 Apr 2019 13:30:43 +0000 (UTC) Received: from dellmb.labs.office.nic.cz (unknown [172.20.6.125]) by mail.nic.cz (Postfix) with ESMTP id B080763785; Thu, 25 Apr 2019 15:30:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1556199042; bh=fFXpfhvNzU5gPVjbeoeVgVdhB5VCqKknz4IyxRlPrBA=; h=From:To:Date; b=H/rlANhLXFnxHagU6P7SWTFrBi26FomYPK0rQ8y7Y+23w2zynczzmbaiTqKLdLlCS ApFUwibtFhEA3XjEhN8OtbC/PMpqBSIySIJgwqcMie7VGz6sAlhKQPdkAoQhJnp0nF Ebguxc0NiBuTDeIXPkWTaO37Ucb+ilEDoSR6lgvI= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: u-boot@lists.denx.de Date: Thu, 25 Apr 2019 15:30:39 +0200 Message-Id: <20190425133042.19014-2-marek.behun@nic.cz> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190425133042.19014-1-marek.behun@nic.cz> References: <20190425133042.19014-1-marek.behun@nic.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Cc: Baruch Siach , Stefan Roese , Chris Packham Subject: [U-Boot] [PATCH 1/4] i2c: mvtwsi: fix disabling i2c slave on Armada 38x 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" Commit 173ec351 ("i2c: mvtwsi: disable i2c slave on Armada 38x") adds slave disabling code on port 0 into bind method. This does not work on Turris Omnia in SPL, because at the time the bind method is called in SPL, arch/arm/mach-mvebu/spl.c has not yet set DM translation offset, so the bind function reads from bad memory place, which causes a fault. Move the i2c slave disabling code into the probe method of mvtwsi, by that time dm_set_translation_offset is already called. Signed-off-by: Marek Behún Cc: Baruch Siach Cc: Heiko Schocher Cc: Chris Packham Cc: Stefan Roese --- drivers/i2c/mvtwsi.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c index 74ac0a4aa7..b0f7c3e057 100644 --- a/drivers/i2c/mvtwsi.c +++ b/drivers/i2c/mvtwsi.c @@ -804,22 +804,15 @@ static void twsi_disable_i2c_slave(struct mvtwsi_registers *twsi) clrbits_le32(&twsi->debug, BIT(18)); } -static int mvtwsi_i2c_bind(struct udevice *bus) +static int mvtwsi_i2c_probe(struct udevice *bus) { - struct mvtwsi_registers *twsi = devfdt_get_addr_ptr(bus); + struct mvtwsi_i2c_dev *dev = dev_get_priv(bus); + uint actual_speed; /* Disable the hidden slave in i2c0 of these platforms */ if ((IS_ENABLED(CONFIG_ARMADA_38X) || IS_ENABLED(CONFIG_KIRKWOOD)) && bus->req_seq == 0) - twsi_disable_i2c_slave(twsi); - - return 0; -} - -static int mvtwsi_i2c_probe(struct udevice *bus) -{ - struct mvtwsi_i2c_dev *dev = dev_get_priv(bus); - uint actual_speed; + twsi_disable_i2c_slave(dev->base); __twsi_i2c_init(dev->base, dev->speed, dev->slaveadd, &actual_speed); dev->speed = actual_speed; @@ -871,7 +864,6 @@ U_BOOT_DRIVER(i2c_mvtwsi) = { .name = "i2c_mvtwsi", .id = UCLASS_I2C, .of_match = mvtwsi_i2c_ids, - .bind = mvtwsi_i2c_bind, .probe = mvtwsi_i2c_probe, .ofdata_to_platdata = mvtwsi_i2c_ofdata_to_platdata, .priv_auto_alloc_size = sizeof(struct mvtwsi_i2c_dev), From patchwork Thu Apr 25 13:30:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1090807 X-Patchwork-Delegate: sr@denx.de 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=nic.cz Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="m+8oPzKB"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44qdR43kpXz9sBp for ; Thu, 25 Apr 2019 23:32:48 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id E62DFC21DD4; Thu, 25 Apr 2019 13:31: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=T_DKIM_INVALID 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 A284EC21E0D; Thu, 25 Apr 2019 13:30:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8B134C21CB1; Thu, 25 Apr 2019 13:30:43 +0000 (UTC) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) by lists.denx.de (Postfix) with ESMTPS id 24DB6C21CB1 for ; Thu, 25 Apr 2019 13:30:43 +0000 (UTC) Received: from dellmb.labs.office.nic.cz (unknown [172.20.6.125]) by mail.nic.cz (Postfix) with ESMTP id BD69863794; Thu, 25 Apr 2019 15:30:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1556199042; bh=jiVT/C0kJrvjhRL9/62tytvFBHa0flnbrNLBW5yOzm4=; h=From:To:Date; b=m+8oPzKBS4Y34Ly2wtuL5eXc3Ck4bKb1B/YvWYHJY9aGTWZxzolb31fTg+L9dLt7V jwGm5uIhT4ctL8o7sdosGjVuyWPKV40y85Zp9lBs6KDyDv3C0QehmHmoCQITMIWVYI cm3TXVXpqpgUDwOEoBSkii1XW1VVS5+Cx79odMYg= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: u-boot@lists.denx.de Date: Thu, 25 Apr 2019 15:30:40 +0200 Message-Id: <20190425133042.19014-3-marek.behun@nic.cz> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190425133042.19014-1-marek.behun@nic.cz> References: <20190425133042.19014-1-marek.behun@nic.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Cc: Baruch Siach , Stefan Roese Subject: [U-Boot] [PATCH 2/4] mvebu: turris_omnia: remove redundant code 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" The i2c slave disabling is done by mvtwsi driver and is not needed here. Signed-off-by: Marek Behún Cc: Baruch Siach --- board/CZ.NIC/turris_omnia/turris_omnia.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index c21d2f3ffa..c446f471a6 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -297,8 +297,6 @@ static int set_regdomain(void) int board_early_init_f(void) { - u32 i2c_debug_reg; - /* Configure MPP */ writel(0x11111111, MVEBU_MPP_BASE + 0x00); writel(0x11111111, MVEBU_MPP_BASE + 0x04); @@ -321,15 +319,6 @@ int board_early_init_f(void) writel(OMNIA_GPP_OUT_ENA_LOW, MVEBU_GPIO0_BASE + 0x04); writel(OMNIA_GPP_OUT_ENA_MID, MVEBU_GPIO1_BASE + 0x04); - /* - * Disable I2C debug mode blocking 0x64 I2C address. - * Note: that would be redundant once Turris Omnia migrates to DM_I2C, - * because the mvtwsi driver includes equivalent code. - */ - i2c_debug_reg = readl(MVEBU_TWSI_BASE + MVTWSI_ARMADA_DEBUG_REG); - i2c_debug_reg &= ~(1<<18); - writel(i2c_debug_reg, MVEBU_TWSI_BASE + MVTWSI_ARMADA_DEBUG_REG); - return 0; } From patchwork Thu Apr 25 13:30:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1090805 X-Patchwork-Delegate: sr@denx.de 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=nic.cz Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="sqNwsOc/"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44qdQB5mlFz9s70 for ; Thu, 25 Apr 2019 23:32:02 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 20FF5C21E31; Thu, 25 Apr 2019 13:31:19 +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=T_DKIM_INVALID 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 1181DC21E07; Thu, 25 Apr 2019 13:30:46 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 79F9BC21C2C; Thu, 25 Apr 2019 13:30:43 +0000 (UTC) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) by lists.denx.de (Postfix) with ESMTPS id 36B19C21D4A for ; Thu, 25 Apr 2019 13:30:43 +0000 (UTC) Received: from dellmb.labs.office.nic.cz (unknown [172.20.6.125]) by mail.nic.cz (Postfix) with ESMTP id D0FA363795; Thu, 25 Apr 2019 15:30:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1556199042; bh=TXyT7ElpJXBQWAwsQDgxgc0SyomucniMj9hZv78sIRY=; h=From:To:Date; b=sqNwsOc/sPGQ9vcnUqQaow5jd6eQwv4Ol0dOnxYNJy4pYFEjX7B3NyWh+zUX7aXxP XDVI5ChTQ6BhzRL/d9lx7qCN/TuYpsefEBCfehF8cl6azfie3MrKhkXBPIHu5woUGO LF2ckSkN1OHHw6xERkiU9wAoQjTAyejbTtQCC3p0= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: u-boot@lists.denx.de Date: Thu, 25 Apr 2019 15:30:41 +0200 Message-Id: <20190425133042.19014-4-marek.behun@nic.cz> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190425133042.19014-1-marek.behun@nic.cz> References: <20190425133042.19014-1-marek.behun@nic.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Cc: Stefan Roese Subject: [U-Boot] [PATCH 3/4] mvebu: turris_omnia: fix eeprom/mcu device names 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: Pierre Bourdon Commit c4bd12a7dad4 ("i2c: mux: Generate longer i2c mux name") changed the naming scheme of i2c devices within a mux. This broke references to i2c@0 in the Turris Omnia board initialization code. Signed-off-by: Pierre Bourdon Reviewed-by: Marek Behún --- board/CZ.NIC/turris_omnia/turris_omnia.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index c446f471a6..3bfd6fe4e4 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -32,13 +32,13 @@ DECLARE_GLOBAL_DATA_PTR; -#define OMNIA_I2C_EEPROM_DM_NAME "i2c@0" +#define OMNIA_I2C_EEPROM_DM_NAME "i2c@11000->i2cmux@70->i2c@0" #define OMNIA_I2C_EEPROM 0x54 #define OMNIA_I2C_EEPROM_CONFIG_ADDR 0x0 #define OMNIA_I2C_EEPROM_ADDRLEN 2 #define OMNIA_I2C_EEPROM_MAGIC 0x0341a034 -#define OMNIA_I2C_MCU_DM_NAME "i2c@0" +#define OMNIA_I2C_MCU_DM_NAME "i2c@11000->i2cmux@70->i2c@0" #define OMNIA_I2C_MCU_ADDR_STATUS 0x1 #define OMNIA_I2C_MCU_SATA 0x20 #define OMNIA_I2C_MCU_CARDDET 0x10 From patchwork Thu Apr 25 13:30:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1090808 X-Patchwork-Delegate: sr@denx.de 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=nic.cz Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="b6dWMo82"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44qdRX0xTKz9s9T for ; Thu, 25 Apr 2019 23:33:12 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id D37FBC21DEC; Thu, 25 Apr 2019 13:31: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=T_DKIM_INVALID 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 1864EC21E2B; Thu, 25 Apr 2019 13:30:47 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5A145C21C29; Thu, 25 Apr 2019 13:30:44 +0000 (UTC) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) by lists.denx.de (Postfix) with ESMTPS id 4A5C4C21D74 for ; Thu, 25 Apr 2019 13:30:43 +0000 (UTC) Received: from dellmb.labs.office.nic.cz (unknown [172.20.6.125]) by mail.nic.cz (Postfix) with ESMTP id E33EA63796; Thu, 25 Apr 2019 15:30:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1556199043; bh=jJGG629weln5RqDJFY6BsYEZgjopz9fZJg1oYQ9kZEI=; h=From:To:Date; b=b6dWMo82BNfyZGUingcVM2dBiyuyxl/7ebphIsoV/I4xWd9kFBxug6kZ6ta49m78G qgIzTz8hHUu3Uc19GDze3Jd3Pw+DQGSoSSPsyICP6XD//0Y14qd/tjyCcAXGj2hSTX hWvsTeBVQvV+y86niKyDP6gp8E2ia6vmaqCVAE0A= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: u-boot@lists.denx.de Date: Thu, 25 Apr 2019 15:30:42 +0200 Message-Id: <20190425133042.19014-5-marek.behun@nic.cz> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190425133042.19014-1-marek.behun@nic.cz> References: <20190425133042.19014-1-marek.behun@nic.cz> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Cc: Stefan Roese Subject: [U-Boot] [PATCH 4/4] arm: mvebu: turris_omnia: add XHCI to defconfig 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 XHCI_HOST and XHCI_MVEBU to defconfig, so that user's can by default boot from USB on Turris Omnia. Signed-off-by: Marek Behún --- configs/turris_omnia_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/turris_omnia_defconfig b/configs/turris_omnia_defconfig index 85f214148a..4b792d9a5a 100644 --- a/configs/turris_omnia_defconfig +++ b/configs/turris_omnia_defconfig @@ -56,5 +56,7 @@ CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_DM_USB=y CONFIG_USB_EHCI_HCD=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_MVEBU=y CONFIG_WDT=y CONFIG_WDT_ORION=y