From patchwork Mon Oct 7 17:55:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 1172936 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="zkLe1lXI"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46n7Sg6Qsgz9sPT for ; Tue, 8 Oct 2019 04:56:03 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729425AbfJGR4C (ORCPT ); Mon, 7 Oct 2019 13:56:02 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:38683 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728545AbfJGR4C (ORCPT ); Mon, 7 Oct 2019 13:56:02 -0400 Received: by mail-pf1-f195.google.com with SMTP id h195so9130577pfe.5 for ; Mon, 07 Oct 2019 10:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BqAPbs/wZUWEhGivyo3NLB3Z3ocJiJHq8gLjsQrSOVI=; b=zkLe1lXI/kTfrysTVpJMwuaXco3MElI5JuoKHwGdd9huySPjwcnc3rUpITt2/11Zm5 tiXNO9v9vnVvIIZd94wdw/YiU4qkXUd98CG1rM8X+hL7q76fc91jo2CiIuKtM0jtJ9rL v/kOPD4SUR/VvcEUI+ziPVYPSPfQsN3CGSoWEWAGNtH2cGERQn01eSXsazGSuW5VlQBc XCg5L0bLn/3dNIkIPJ/E/0FVK8XV2n51gVKvv+dTLBeaGJMwc+fIFiXuQ8Yn0/Sq28RE 2z+dVzuJX2OsLboR4aXc7T1Ei8Y1KCFzodNnELOhDZ0euq7lSepkr59SyAKucel2Bn9c bjmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BqAPbs/wZUWEhGivyo3NLB3Z3ocJiJHq8gLjsQrSOVI=; b=gvee1uFAMHIWYEqov+D78v7OHv+aR3n/Lu0oz/Kh7pPgkuLKp70FD4XhWAqglcy1fL xdLo93O9vcpwbAREnvdXlzblocXzY1W0oeamftjChBFOrZJzuaTrh+NQUDjfa2X57Dd+ 3vE66cXW361cGovWywM00sj+uRbIAU6GVug7M7BEBlTSCCLXbgngA6b0+9FvzPjLzT7V eKq2IiqzBtWlDvSv5tdWJr8mQA3y/aFabJ/E0/5g4EnI7u4gLIOhYYqFEblSGH35tv5H Gcbi4OYEeQ33/c+fflvvSt+eURLWV+g/NUCyKGdo50GpN7L6fzR/gIEUdvpOU14hDRU/ 6AkA== X-Gm-Message-State: APjAAAXQAJV58Uybbtph7aloOEEUKoT0Z8SMbv9l8xB1bzMjRHC/ziUr OnzAtbAfRRsrUcprqi2B7J49Kg== X-Google-Smtp-Source: APXvYqzR09qKYZDkL9zavOHzE5V/dTeZBEetwtzxc9ol5SRT48VvfuWeKP1zcPB5Go2sfBi0OZM/lA== X-Received: by 2002:a62:1516:: with SMTP id 22mr33771701pfv.87.1570470961345; Mon, 07 Oct 2019 10:56:01 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id k15sm3820096pgt.25.2019.10.07.10.55.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 10:56:00 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Greg Kroah-Hartman , Felipe Balbi , Andy Shevchenko , Rob Herring , Mark Rutland , Yu Chen , Matthias Brugger , Chunfeng Yun , linux-usb@vger.kernel.org, devicetree@vger.kernel.org Subject: [RFC][PATCH v2 1/5] dt-bindings: usb: dwc3: Add a property to do a CGTL soft reset on mode switching Date: Mon, 7 Oct 2019 17:55:49 +0000 Message-Id: <20191007175553.66940-2-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191007175553.66940-1-john.stultz@linaro.org> References: <20191007175553.66940-1-john.stultz@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Provide a dt-binding for quirk needed to do a GCTL soft reset on mode switching Cc: Greg Kroah-Hartman Cc: Felipe Balbi Cc: Andy Shevchenko Cc: Rob Herring Cc: Mark Rutland Cc: Yu Chen Cc: Matthias Brugger Cc: Chunfeng Yun Cc: linux-usb@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: John Stultz --- Documentation/devicetree/bindings/usb/dwc3.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt index 66780a47ad85..cf4ef6c22fb3 100644 --- a/Documentation/devicetree/bindings/usb/dwc3.txt +++ b/Documentation/devicetree/bindings/usb/dwc3.txt @@ -77,6 +77,8 @@ Optional properties: during HS transmit. - snps,dis_metastability_quirk: when set, disable metastability workaround. CAUTION: use only if you are absolutely sure of it. + - snps,gctl-reset-quirk: when set, GCTL soft reset will be executed on mode + switch. - snps,is-utmi-l1-suspend: true when DWC3 asserts output signal utmi_l1_suspend_n, false when asserts utmi_sleep_n - snps,hird-threshold: HIRD threshold From patchwork Mon Oct 7 17:55:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 1172937 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="SlY3eXwv"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46n7T91c0pz9sPV for ; Tue, 8 Oct 2019 04:56:29 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729032AbfJGR4Y (ORCPT ); Mon, 7 Oct 2019 13:56:24 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:44594 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729449AbfJGR4H (ORCPT ); Mon, 7 Oct 2019 13:56:07 -0400 Received: by mail-pl1-f196.google.com with SMTP id q15so7199890pll.11 for ; Mon, 07 Oct 2019 10:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7/b3yUeZa8CC2Us86GgYloZCqUlnEcjewTRh+R9Lbvk=; b=SlY3eXwvCRPmzMOhMJJSBUGa/3rX3D4MUbmP0Ohh4buo2qrQ3DCJIvh8hRcWXRpawv QB80v4EAGe5Dvtan+jOEazC5pe64LQb01TslpzL+J7t1hzRTuRhYCdxhfYXQBbAcI/Zq bFxGsoLTeC4mNqGdjuOKXVihqfjxr5ufHsZZa3pYGj05xoNRFOuWY4wLGePQIJcoC8ry GMomuuVRq9oKJMX/OvfgT19utBjL+NR1tT6xgcPkd9EQbEpXfqCeNm1eY8PSUaRHYgO2 PtJ+Dk4z1VlTkcHKjqtWtn47m3uJ2kJuZ2V8bSDM59Id/tThwdsiUSNhuXTu2pNkEHZM iIRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7/b3yUeZa8CC2Us86GgYloZCqUlnEcjewTRh+R9Lbvk=; b=sIOjtvB3KfzQri5DiKpqs1AbEM7RIMaiizoK+P+3mPuHt8eniHDM/F1y7tk9yvjzfh 3AhvVcFWU3roTik+QyKOV+k+yy/biDqhoX9GWsSZExQ0rohAh79+cNNIog3Nq3svd4hR TGYnfvMMOiuHga+mUF0yK3TCVhGI6G1P7S+A1pCm7O0rFYnH3Eaj3TrgVYVnwW0fPuSa I0SawzP9wXcos+7NKDpbdNTMC9vdHbrgeYMisE4xKvlnbu6FXfYlCwoAE6pKttHy0yqT aR/kKWvJiyemG6sB4pWoeedsHTRyTI7dWfcEDiRn3r7C4LtIbonOlJk/UQNa7c3Fc65U ZvpQ== X-Gm-Message-State: APjAAAXKDnnf3toULSLk43ItG1Lwd1FPx5t1NX8hphOECbkw/XjKA1fK rYIHyibenBcHT8wTidYQ1/9Opg== X-Google-Smtp-Source: APXvYqxzIFObkEZ3b71NwneTkjqqzC3Nj0N3NNcomwCN9GSXlPRZnaHZIfK+yVDlQ0vpXSE4EK6AaQ== X-Received: by 2002:a17:902:820f:: with SMTP id x15mr29187700pln.230.1570470966697; Mon, 07 Oct 2019 10:56:06 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id k15sm3820096pgt.25.2019.10.07.10.56.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 10:56:06 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Greg Kroah-Hartman , Felipe Balbi , Andy Shevchenko , Rob Herring , Mark Rutland , Yu Chen , Matthias Brugger , Chunfeng Yun , linux-usb@vger.kernel.org, devicetree@vger.kernel.org Subject: [RFC][PATCH v2 4/5] dt-bindings: usb: dwc3: of-simple: add compatible for HiSi Date: Mon, 7 Oct 2019 17:55:52 +0000 Message-Id: <20191007175553.66940-5-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191007175553.66940-1-john.stultz@linaro.org> References: <20191007175553.66940-1-john.stultz@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add necessary compatible flag for HiSi's DWC3 so dwc3-of-simple will probe. Cc: Greg Kroah-Hartman Cc: Felipe Balbi Cc: Andy Shevchenko Cc: Rob Herring Cc: Mark Rutland Cc: Yu Chen Cc: Matthias Brugger Cc: Chunfeng Yun Cc: linux-usb@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: John Stultz --- v2: Tweaked clock names as clk_usb3phy_ref didn't seem right. --- .../devicetree/bindings/usb/hisi,dwc3.txt | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/hisi,dwc3.txt diff --git a/Documentation/devicetree/bindings/usb/hisi,dwc3.txt b/Documentation/devicetree/bindings/usb/hisi,dwc3.txt new file mode 100644 index 000000000000..3a3e5c320f2a --- /dev/null +++ b/Documentation/devicetree/bindings/usb/hisi,dwc3.txt @@ -0,0 +1,52 @@ +HiSi SuperSpeed DWC3 USB SoC controller + +Required properties: +- compatible: should contain "hisilicon,hi3660-dwc3" for HiSi SoC +- clocks: A list of phandle + clock-specifier pairs for the + clocks listed in clock-names +- clock-names: Should contain the following: + "clk_abb_usb" USB reference clk + "aclk_usb3otg" USB3 OTG aclk + +- assigned-clocks: Should be: + HI3660_ACLK_GATE_USB3OTG +- assigned-clock-rates: Should be: + 229Mhz (229000000) for HI3660_ACLK_GATE_USB3OTG + +Optional properties: +- resets: Phandle to reset control that resets core and wrapper. + +Required child node: +A child node must exist to represent the core DWC3 IP block. The name of +the node is not important. The content of the node is defined in dwc3.txt. + +Example device nodes: + + usb3: hisi_dwc3 { + compatible = "hisilicon,hi3660-dwc3"; + #address-cells = <2>; + #size-cells = <2>; + ranges; + + clocks = <&crg_ctrl HI3660_CLK_ABB_USB>, + <&crg_ctrl HI3660_ACLK_GATE_USB3OTG>; + clock-names = "clk_abb_usb", "aclk_usb3otg"; + + assigned-clocks = <&crg_ctrl HI3660_ACLK_GATE_USB3OTG>; + assigned-clock-rates = <229 000 000>; + resets = <&crg_rst 0x90 8>, + <&crg_rst 0x90 7>, + <&crg_rst 0x90 6>, + <&crg_rst 0x90 5>; + + dwc3: dwc3@ff100000 { + compatible = "snps,dwc3"; + reg = <0x0 0xff100000 0x0 0x100000>; + interrupts = <0 159 4>, <0 161 4>; + phys = <&usb_phy>; + phy-names = "usb3-phy"; + dr_mode = "otg"; + + ... + }; + };