From patchwork Tue Mar 9 12:27:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 395984 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2559341jai; Tue, 9 Mar 2021 04:56:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZxW+TWoB37G++7elrojZkEHk7h7hZKksgDR30QLwRXLWcir3hNXm+fq/7c46DwN1oq3ri X-Received: by 2002:a17:907:16a8:: with SMTP id hc40mr19857288ejc.40.1615294599980; Tue, 09 Mar 2021 04:56:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615294599; cv=none; d=google.com; s=arc-20160816; b=XpuMDDL9gip51r0HUch0E8vyIfQEjXaV7vJyUIexGyj4jt5SJ5mAGebQDo0wzkdJnW BTqZfx0T9MLjdm6TRVyrgY/Lb+TSQZDte2DgPCsueST3P2o/+04B5OFQvHRTAkukAAn+ X4CInqf77hNkGp1bQEq02s6t9MyVJCTfCsHNBRPXielzq4TFTkBdyK5N7L0Mw0VUZcSf fE8quApuBeRomv6xuFM3QW14EmyP36sWxyFPV/dj3eDyqi3+zG1PRdKgaQvdYMhJAC3Q NyfV60brSggFIhQuei/6/v8gHAQi6o6tGWCJwC+XhUOX/ggh2iCD94gS5rOb3XvCRfQe bi3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=VieQO83cYuADTOF+wM585fV7SFgh2USeSMXzlJ6v0DQ=; b=of1hmRP5ibqjCtUNiLCF/jypXit1nOv8S2HSJzNFpL0TrqEvg9pAIQHyBnEH58yMDW +SGJ+bCoc1yMmhF1SqXRilw3UDV+G5VbqkghLvx3nMZtgxK2nvFc93Y/cHeTt06ve42z ut4YYvPxL8YGODOiQH7RsQ3oZjbabuX1crRQBnmFpIG8PF0smBqoOreJrjuHknTP13ME H92klKzo1047CZkSp83byT1BC3PNjAoHgKqvgzC0jooNCRCNadxMp8jadu0nguG0pgcZ 97c8x2UpziB60XZDQTiiN6lC1TYMHXWuuF/BUvJ7/IMEcINUh7Tn4wBaXfmtDQsbYbfY nT8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=h9EeLGxu; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id d15si8832380edv.309.2021.03.09.04.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 04:56:39 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=h9EeLGxu; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9E8FA828A2; Tue, 9 Mar 2021 13:54:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="h9EeLGxu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 62CE282625; Tue, 9 Mar 2021 13:28:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 75212825F1 for ; Tue, 9 Mar 2021 13:28:30 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kishon@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 129CSTHB071269; Tue, 9 Mar 2021 06:28:29 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1615292909; bh=VieQO83cYuADTOF+wM585fV7SFgh2USeSMXzlJ6v0DQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=h9EeLGxuIasUtsM9D1MBnf/aK7WDHRvmq1WxvN3+wlwvdoRKvwUEu+EqGzxNPGa2w HKuHnW8AHAc0qUuSGJvbEvd7OYrcs4s7tdM1beHSdPjJprfXr7qkQYlFYVONpTXQm+ 2kAIMLVeZuYncDeRzACG97zkL2uxjEu8MUWQ/E+k= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 129CSTIc076214 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 9 Mar 2021 06:28:29 -0600 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 9 Mar 2021 06:28:28 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Tue, 9 Mar 2021 06:28:28 -0600 Received: from a0393678-ssd.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 129CRncc119584; Tue, 9 Mar 2021 06:28:26 -0600 From: Kishon Vijay Abraham I To: Lokesh Vutla , Simon Glass , Aswath Govindraju CC: Subject: [PATCH 15/16] env: ti: j721e-evm: Add env variable to power on & reset QSGMII PHY in J7200 EVM Date: Tue, 9 Mar 2021 17:57:47 +0530 Message-ID: <20210309122748.31842-16-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210309122748.31842-1-kishon@ti.com> References: <20210309122748.31842-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Approved-At: Tue, 09 Mar 2021 13:53:37 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean MAIN CPSW0 requires the PHY to be powered on and reset for QSGMII operation. Add a env variable to configure driving "0" on ENET_EXP_PWRDN controlled by GPIO EXPANDER2 (I2C Addr: 0x22), PIN: 17 and driving "1" on ENET_EXP_RESETZ controlled by GPIO EXPANDER2 (I2C Addr: 0x22), PIN: 18. Signed-off-by: Kishon Vijay Abraham I --- include/configs/j721e_evm.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h index b707fc4e89..00d0a18a68 100644 --- a/include/configs/j721e_evm.h +++ b/include/configs/j721e_evm.h @@ -139,11 +139,24 @@ #endif /* CONFIG_TARGET_J721E_A72_EVM */ #ifdef CONFIG_TARGET_J7200_A72_EVM +#define EXTRA_ENV_CONFIG_MAIN_CPSW0_QSGMII_PHY \ + "do_main_cpsw0_qsgmii_phyinit=1\0" \ + "init_main_cpsw0_qsgmii_phy=gpio set gpio@22_17;" \ + "gpio clear gpio@22_16\0" \ + "main_cpsw0_qsgmii_phyinit=" \ + "if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1 && test ${dorprocboot} -eq 1 && " \ + "test ${boot} = mmc; then " \ + "run init_main_cpsw0_qsgmii_phy;" \ + "fi;\0" #define DEFAULT_RPROCS "" \ "2 /lib/firmware/j7200-main-r5f0_0-fw " \ "3 /lib/firmware/j7200-main-r5f0_1-fw " #endif /* CONFIG_TARGET_J7200_A72_EVM */ +#ifndef EXTRA_ENV_CONFIG_MAIN_CPSW0_QSGMII_PHY +#define EXTRA_ENV_CONFIG_MAIN_CPSW0_QSGMII_PHY +#endif + /* set default dfu_bufsiz to 128KB (sector size of OSPI) */ #define EXTRA_ENV_DFUARGS \ "dfu_bufsiz=0x20000\0" \ @@ -170,7 +183,8 @@ EXTRA_ENV_RPROC_SETTINGS \ EXTRA_ENV_DFUARGS \ DEFAULT_UFS_TI_ARGS \ - EXTRA_ENV_J721E_BOARD_SETTINGS_MTD + EXTRA_ENV_J721E_BOARD_SETTINGS_MTD \ + EXTRA_ENV_CONFIG_MAIN_CPSW0_QSGMII_PHY /* Now for the remaining common defines */ #include