From patchwork Mon Oct 28 10:21:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 177898 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3181059ill; Mon, 28 Oct 2019 03:22:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDloX1LzN4Rhy+xdZfpn98tvG7zVceF8xXKm2iLCSq1unc0UXe2DyVkBCeCRwgI0WdJ4yr X-Received: by 2002:aa7:d294:: with SMTP id w20mr18711430edq.57.1572258128788; Mon, 28 Oct 2019 03:22:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572258128; cv=none; d=google.com; s=arc-20160816; b=x8iMeI5x5Evp8PUIoKA5HZOgnfMFQ1JGYm9Ac3KVgKMDAq8dk9e3+3fsy+aiine879 tXXoRIiLODIpXlmJAZChrYzsehfce9+QlvkXiGRzqeyiE/wdyfS7+Fc/LXknZ8QQksZZ Vg/Tlpl/TnzM9grZQcxWd8mvRSvTdUsdXMDOMAHzSvzUphuiLLvqQ315CnqnkVhXq/Fe AKcsg3MBbyKikeX09N/iIxv6KoYcgPYUQu7M34wHtUrnzgZTW6enUU4SGqImBlNukm8x i7kL1rPL9DQ+XMQwnv/usU1dSoUffeqezzSmfyF889Ps5QEqFE68OV3v6HQL8V6jLO03 KZZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=PPfmQTQzpjZI6/syLNanL8WvNYmx/cljQMHzTOzXfpA=; b=xZEYLqBqd6fEeBthohwJ9zpTy6ynZ5EFtGnR4V0BfXyDlij6gauALO9ApzqtpVj5/s jIbXeYoLIdEUTEVWmieACd1aZztdEr4MkuAh+Q4pMUOCCIA6v2DVPni1UntYILSgYItZ bjmZVch8FSu07Pi4/OH8SI+330DOWQOHDKzFe2XeLxFoX/iwgP06N3jBm5cR2i1bBSXE 0kmZGh9ICDmVFKh0S2ln9X6uXt5suWtcIUTofTwmCM+YDEsPBkuov1QLmSRW67rR9Zxk gH59EKC5OJFG7wtVx9EaB3zyY6lZPWEUQXiaIgWARhAmJt0QnsNzsHx6xbBputhg6CM2 P4dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=TIV3wE0u; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z65si7754509ede.388.2019.10.28.03.22.08; Mon, 28 Oct 2019 03:22:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=TIV3wE0u; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388103AbfJ1KWF (ORCPT + 8 others); Mon, 28 Oct 2019 06:22:05 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:55922 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732186AbfJ1KWE (ORCPT ); Mon, 28 Oct 2019 06:22:04 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9SAM2S4127050; Mon, 28 Oct 2019 05:22:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1572258122; bh=PPfmQTQzpjZI6/syLNanL8WvNYmx/cljQMHzTOzXfpA=; h=From:To:CC:Subject:Date; b=TIV3wE0uT34tziVChKbsEgDxQ8VOPBC7hAMwuhs7/ZO/sP38RBaURle1ME0Xes7Ct jcEQdxExRq74sM8Wa9xtifId2e/oRHqyDkd543ZbnETd0Pgdw+BrIGS6Y3h5xc01Uz sJ9vZ/rN/zmlyDASuMdo4dEY7AUzgLi6HEuQgixU= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9SAM2nC003812 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 28 Oct 2019 05:22:02 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 28 Oct 2019 05:21:49 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 28 Oct 2019 05:22:01 -0500 Received: from lta0400828a.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9SALwqF024783; Mon, 28 Oct 2019 05:21:59 -0500 From: Roger Quadros To: CC: , , , , , , Roger Quadros Subject: [PATCH v4 0/3] phy: cadence: j721e-wiz: Add Type-C plug flip support Date: Mon, 28 Oct 2019 12:21:50 +0200 Message-ID: <20191028102153.24866-1-rogerq@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi, On J721e platform, the 2 lanes of SERDES PHY are used to achieve USB Type-C plug flip support without any additional MUX component by using a lane swap feature. However, the driver needs to know the Type-C plug orientation before it can decide whether to swap the lanes or not. This is achieved via a GPIO named DIR. Another constraint is that the lane swap must happen only when the PHY is in inactive state. This is achieved by sampling the GPIO and programming the lane swap before bringing the PHY out of reset. This series adds support to read the GPIO and accordingly program the Lane swap for Type-C plug flip support. Series must be applied on top of https://lkml.org/lkml/2019/10/23/589 cheers, -roger Changelog: v4 - fixes in dt-binding document - fix typo - change to typec-dir-debounce-ms and add min/max/default values - drop reference to uint32 type - fixes in driver - change to updated typec-dir-debounce-ms property - add limit checks and use default value if not specified v3 - Rebase on v2 of PHY series and update DT binding to yaml v2 - revise commit log of patch 1 - use regmap_field in patch 3 Roger Quadros (3): phy: cadence: Sierra: add phy_reset hook dt-bindings: phy: ti,phy-j721e-wiz: Add Type-C dir GPIO phy: ti: j721e-wiz: Manage typec-gpio-dir .../bindings/phy/ti,phy-j721e-wiz.yaml | 17 ++++++ drivers/phy/cadence/phy-cadence-sierra.c | 10 +++ drivers/phy/ti/phy-j721e-wiz.c | 61 +++++++++++++++++++ 3 files changed, 88 insertions(+) -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki