From patchwork Tue Mar 31 17:02:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Hilliard X-Patchwork-Id: 11468137 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5E03792A for ; Tue, 31 Mar 2020 17:02:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CA6220BED for ; Tue, 31 Mar 2020 17:02:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ljredR6m" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731239AbgCaRC3 (ORCPT ); Tue, 31 Mar 2020 13:02:29 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:33991 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726194AbgCaRC2 (ORCPT ); Tue, 31 Mar 2020 13:02:28 -0400 Received: by mail-oi1-f194.google.com with SMTP id d3so14991170oic.1; Tue, 31 Mar 2020 10:02:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ACsAvcUB0Ich6sC5ibu9BU0pfyXIA9WospeN5xQtndA=; b=ljredR6mDihL+IgzR7kLoBOMHk5LGRM+2HtXgJsPN40/UJ1a7fSmKTEOmKf2qMZn90 5bIBUBcGMky3seXChX4d7+2WKbHZaa4sj8l3KwAi2KVCOyLF7Fj0CP3/XwbwfDzu29kI CP257blmwAP6qBR53OkiqAQujGoTiMuXNxVeKGqjKeg7fHg4qX9UMWEvtYQfN8dDTHdA yDS6nZ708UA4Zcn+fq9ppHlzbrih57mBoikBaXwj4G19/hiGy7UmFMvsyyle7PYnSjML cBw+1e4DQimdcBwdh6PTlbzapczsG6pkO0T/zZXJEC0/qhYxzTxNjkhSIcH1sRNktxv0 8veg== 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:mime-version:content-transfer-encoding; bh=ACsAvcUB0Ich6sC5ibu9BU0pfyXIA9WospeN5xQtndA=; b=pYLeseAkhoCsCcK+yzntB2J2UcvJV5K++nfGF1GBxhqWgt94SvKB7BXdunoZOuCSnz CB/FZh3uhw3VOwWg7uEUp8GnWH2m3ObjkMbcjZ3OE58NNTqOBu2D60A6roHCgMKTa+RZ FAOWz2iYh+ZbSQNlNDDb20ZSE2WDsVOqgosGNSICTr74lKiFdepnqc9u7Xo0rF2/3/wl BVn5rJhd+K25IZAtF/mNixOPyFNI2HnhTVMv2qpvWYEHrInmrLm9INVUD4ZV/u9eOx5l sVXNIfRSxWhcSeeTbvGhO8yMwcy628wcaP8Kliv2knbDjXDg1lQ58N3/0m8OZ5zt21Fo sBOw== X-Gm-Message-State: ANhLgQ3rYPd0DRehMW3ErNxFQhf4OWjK8c+Ehs6dL6oQK24zOLmYoiUd g+RZG2wY6bJHPUuGjzGKbA9lhEIEl7tguw== X-Google-Smtp-Source: ADFU+vsJg6w+flXYQzAnQxtbYwFwGMu75oHPkSsA/cGgrGKhX+C0nYsb+hviudv7ZA1hh82vQUaIGg== X-Received: by 2002:aca:f585:: with SMTP id t127mr2826285oih.38.1585674148326; Tue, 31 Mar 2020 10:02:28 -0700 (PDT) Received: from desertvoice.lan ([2601:3c7:8303:2a10::21c]) by smtp.gmail.com with ESMTPSA id h7sm2952605otk.3.2020.03.31.10.02.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 10:02:27 -0700 (PDT) From: George Hilliard To: Chen-Yu Tsai , Rob Herring , Mark Rutland Cc: George Hilliard , Icenowy Zheng , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/5] dt-bindings: Add new F1C100s compatible strings for USB Date: Tue, 31 Mar 2020 12:02:15 -0500 Message-Id: <20200331170219.267732-2-thirtythreeforty@gmail.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200331170219.267732-1-thirtythreeforty@gmail.com> References: <20200331170219.267732-1-thirtythreeforty@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This chip contains variants of the already-supported peripherals present on other Allwinner parts. Add a new compatible line for them. Signed-off-by: George Hilliard Acked-by: Chen-Yu Tsai --- .../devicetree/bindings/phy/allwinner,sun4i-a10-usb-phy.yaml | 1 + .../devicetree/bindings/usb/allwinner,sun4i-a10-musb.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun4i-a10-usb-phy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun4i-a10-usb-phy.yaml index 94ac23687b7e..4206a0e373b0 100644 --- a/Documentation/devicetree/bindings/phy/allwinner,sun4i-a10-usb-phy.yaml +++ b/Documentation/devicetree/bindings/phy/allwinner,sun4i-a10-usb-phy.yaml @@ -18,6 +18,7 @@ properties: enum: - allwinner,sun4i-a10-usb-phy - allwinner,sun7i-a20-usb-phy + - allwinner,suniv-f1c100s-usb-phy reg: items: diff --git a/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.yaml b/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.yaml index d9207bf9d894..d2eea0003b99 100644 --- a/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.yaml +++ b/Documentation/devicetree/bindings/usb/allwinner,sun4i-a10-musb.yaml @@ -17,6 +17,7 @@ properties: - const: allwinner,sun6i-a31-musb - const: allwinner,sun8i-a33-musb - const: allwinner,sun8i-h3-musb + - const: allwinner,suniv-f1c100s-musb - items: - enum: - allwinner,sun8i-a83t-musb From patchwork Tue Mar 31 17:02:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Hilliard X-Patchwork-Id: 11468135 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DC3F392A for ; Tue, 31 Mar 2020 17:02:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B99B320848 for ; Tue, 31 Mar 2020 17:02:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iOq/MgcB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731272AbgCaRCc (ORCPT ); Tue, 31 Mar 2020 13:02:32 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:43202 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731224AbgCaRCa (ORCPT ); Tue, 31 Mar 2020 13:02:30 -0400 Received: by mail-ot1-f68.google.com with SMTP id a6so22752276otb.10; Tue, 31 Mar 2020 10:02:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j9UnDZyQ2YKPggbhoniPAeDPe2uWjAaBSRBm1Rfex5E=; b=iOq/MgcBbSipwpL2n98Yk5g1vneSS5GA3tyBB69AbUUL5cNdEcOnw2MeATbdsbXuPa q51MWnepSfz4AUMlY558zD6fcHf/6wVH/QlYdH/68WRgQCEc9lS1is6B2QZD5Mh6vr3i hes/yYhQ8QzoKYlEsOa6tG7ZLh18RpmgwgYS5UUwM4erDxteM1dktc1Bx8ynD030JWVX vKePHvx7M7ZOhOBmHOA74xux6fdXR+5/xAI/6wVckRj4fEVNihE3dwP1nR4Xo6pjr3x1 N6zbgzjaKWMXiZL/ovbynVMSYl0Zu8Vz39FNjPEXCvLsOKNA9s4YB671aHX9QfC7obaD O0Sw== 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:mime-version:content-transfer-encoding; bh=j9UnDZyQ2YKPggbhoniPAeDPe2uWjAaBSRBm1Rfex5E=; b=gfjdg/8Kz+pZnlHv7g4rQ3FHdaP2fjYE4CD69kwSZhQLyoPeyQX6GIGwExK6AXzKDp lu29BDlm7gRC8KF8eRIxw6LvsdE6V+Ubylp0zeLAkSpw09i8UEkZvkydx/+AyEySefHv ZgiXpBwflhODZc6YM6Thdwas+9utLQutch/BKHAJbeXZ8QkjXB5JKNsvTuSPzfzAMSWQ h1OSYe1f5/+RCqe+oiR3Iq/bvSlCwoAYQ00Ex0YL5VEAT8SYGxuxfRDD4d5fekA1R1ZE JkYJBAdK8uM4vUED/KVm2UubigKaDRhY8mcgNlcPYdNs2GhV39u7RAtC4YHBEQhvX4N5 OCkA== X-Gm-Message-State: ANhLgQ15/7+8iFqp9xrr/0OmyWPjF/dafRmvOZL/Kz0mkEmlU7amDeq5 KY6NCmDaceV8pCQIQJV6wJE= X-Google-Smtp-Source: ADFU+vtFnS3zr2wAMvjQYxIlrGQnqds5Xcyfx/Z5iGHNM3Jx81a88ZVOB6nYOjKjkMwMfb92CZrk7A== X-Received: by 2002:a05:6830:1d90:: with SMTP id y16mr14257426oti.157.1585674149603; Tue, 31 Mar 2020 10:02:29 -0700 (PDT) Received: from desertvoice.lan ([2601:3c7:8303:2a10::21c]) by smtp.gmail.com with ESMTPSA id h7sm2952605otk.3.2020.03.31.10.02.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 10:02:29 -0700 (PDT) From: George Hilliard To: Chen-Yu Tsai , Rob Herring , Mark Rutland Cc: Icenowy Zheng , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, George Hilliard Subject: [PATCH v2 2/5] phy: sun4i-usb: add support for the USB PHY on suniv SoC Date: Tue, 31 Mar 2020 12:02:16 -0500 Message-Id: <20200331170219.267732-3-thirtythreeforty@gmail.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200331170219.267732-1-thirtythreeforty@gmail.com> References: <20200331170219.267732-1-thirtythreeforty@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Icenowy Zheng The suniv SoC has one USB OTG port connected to a MUSB controller. Add support for its USB PHY. Signed-off-by: Icenowy Zheng George Hilliard: changed style to match existing code. Signed-off-by: George Hilliard --- v1..v2: reordered sun{50,iv} to match `sort` order. drivers/phy/allwinner/phy-sun4i-usb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index 856927382248..5c10b55f2aad 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -107,6 +107,7 @@ enum sun4i_usb_phy_type { sun8i_v3s_phy, sun50i_a64_phy, sun50i_h6_phy, + suniv_f1c100s_phy, }; struct sun4i_usb_phy_cfg { @@ -972,6 +973,14 @@ static const struct sun4i_usb_phy_cfg sun50i_h6_cfg = { .missing_phys = BIT(1) | BIT(2), }; +static const struct sun4i_usb_phy_cfg suniv_f1c100s_cfg = { + .num_phys = 1, + .type = suniv_f1c100s_phy, + .disc_thresh = 3, + .phyctl_offset = REG_PHYCTL_A10, + .dedicated_clocks = true, +}; + static const struct of_device_id sun4i_usb_phy_of_match[] = { { .compatible = "allwinner,sun4i-a10-usb-phy", .data = &sun4i_a10_cfg }, { .compatible = "allwinner,sun5i-a13-usb-phy", .data = &sun5i_a13_cfg }, @@ -986,6 +995,7 @@ static const struct of_device_id sun4i_usb_phy_of_match[] = { { .compatible = "allwinner,sun50i-a64-usb-phy", .data = &sun50i_a64_cfg}, { .compatible = "allwinner,sun50i-h6-usb-phy", .data = &sun50i_h6_cfg }, + { .compatible = "allwinner,suniv-f1c100s-usb-phy", .data = &suniv_f1c100s_cfg }, { }, }; MODULE_DEVICE_TABLE(of, sun4i_usb_phy_of_match); From patchwork Tue Mar 31 17:02:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Hilliard X-Patchwork-Id: 11468129 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2604492A for ; Tue, 31 Mar 2020 17:02:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 03DF5212CC for ; Tue, 31 Mar 2020 17:02:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ln+YYohf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731315AbgCaRCd (ORCPT ); Tue, 31 Mar 2020 13:02:33 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:42479 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731285AbgCaRCc (ORCPT ); Tue, 31 Mar 2020 13:02:32 -0400 Received: by mail-oi1-f196.google.com with SMTP id e4so19527014oig.9; Tue, 31 Mar 2020 10:02:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=id2xxsG8HdP6q9xFW9MmRd4xH5edJmLoce+xqnoklSM=; b=Ln+YYohfvUI1Rn402zQNq4/Tunb2vzjCDx+ZlXhWlcgB5/MRsOteTXXqu7nzjV3ZMD dahwlWLYYvBKq/iimi9bHTdtAZz4/oLR5as/Vwr5Eg//UtFX9YqjrV9GHYFf14vayBzT 6HJkJSUwk3jJd6d8xJngZY+GfyHg1Ag86rh20SbbdIXHmghgOslK9IhGLUJMF+N7bNXD JhthmUweI5X6NYY/Yn99lTC0Si4s9xAxTBfbS1dYRJV/SoZS+lfwM+qzaE7KZmcZPHY+ 0wZJKPbW94ZFztcU6lnPiZOwqM1PBGBqNqAnE20+EKhknku1EhcGTN2T6/A8WvdO0fNP XhQA== 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:mime-version:content-transfer-encoding; bh=id2xxsG8HdP6q9xFW9MmRd4xH5edJmLoce+xqnoklSM=; b=Q4rdjl3/rvARdLqpnEl+YA6atz0+xkgIT+5I//mEI0Rt5q60inwFzeEVDehhfxQ0NX 5fq+0G3XPeP18Y04ODvZis/+PvsLu4ZBhGuVaG7o6+YmyA85pstZ2RUIl5jSqZF2CDms kT3LkUalSYiLbcT44McIP1UzdPK8bJZjek2hHYKWQx4EXQcVvnRsnxS8+vysQWW0UMsz JJ7qhPqdDtY8syn6xsUfNuxpjD8yTpPlHLSyJZtAUzrKJd0YvlB7kHXJUjlNuu/DkRKI A6nAZulNhgLzwyCtBptKXhRipYgucROaCXQSzE7at3GDZaKKVlQfJShtoVnC4fMK/bFS KsdQ== X-Gm-Message-State: ANhLgQ1r1t50j4Zi3qhHUZt7bbGZi59BGLl/ZtL/f1c8SalotHBWlVuH EUh9UroGC0ltXAfBRRLELVY= X-Google-Smtp-Source: ADFU+vth7hHXB71hCpzRlXiX79+rJwCE6+IaxSB5vsQPun29d1yYVBmdSpcpsXuLB5QjvEAMh0qPMQ== X-Received: by 2002:aca:d78a:: with SMTP id o132mr2837176oig.60.1585674150925; Tue, 31 Mar 2020 10:02:30 -0700 (PDT) Received: from desertvoice.lan ([2601:3c7:8303:2a10::21c]) by smtp.gmail.com with ESMTPSA id h7sm2952605otk.3.2020.03.31.10.02.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 10:02:30 -0700 (PDT) From: George Hilliard To: Chen-Yu Tsai , Rob Herring , Mark Rutland Cc: George Hilliard , Icenowy Zheng , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/5] musb: sunxi: add support for the suniv MUSB controller Date: Tue, 31 Mar 2020 12:02:17 -0500 Message-Id: <20200331170219.267732-4-thirtythreeforty@gmail.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200331170219.267732-1-thirtythreeforty@gmail.com> References: <20200331170219.267732-1-thirtythreeforty@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The suniv SoC has a MUSB controller like the one in A33, but with a SRAM region to be claimed. Add support for it. Signed-off-by: Icenowy Zheng George Hilliard: debugged, match existing style Signed-off-by: George Hilliard Acked-by: Chen-Yu Tsai --- v1..v2: reordered sun{50,iv} to match `sort` order. drivers/usb/musb/sunxi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb/sunxi.c index f3f76f2ac63f..9b353b97fb06 100644 --- a/drivers/usb/musb/sunxi.c +++ b/drivers/usb/musb/sunxi.c @@ -714,14 +714,17 @@ static int sunxi_musb_probe(struct platform_device *pdev) INIT_WORK(&glue->work, sunxi_musb_work); glue->host_nb.notifier_call = sunxi_musb_host_notifier; - if (of_device_is_compatible(np, "allwinner,sun4i-a10-musb")) + if (of_device_is_compatible(np, "allwinner,sun4i-a10-musb") || + of_device_is_compatible(np, "allwinner,suniv-f1c100s-musb")) { set_bit(SUNXI_MUSB_FL_HAS_SRAM, &glue->flags); + } if (of_device_is_compatible(np, "allwinner,sun6i-a31-musb")) set_bit(SUNXI_MUSB_FL_HAS_RESET, &glue->flags); if (of_device_is_compatible(np, "allwinner,sun8i-a33-musb") || - of_device_is_compatible(np, "allwinner,sun8i-h3-musb")) { + of_device_is_compatible(np, "allwinner,sun8i-h3-musb") || + of_device_is_compatible(np, "allwinner,suniv-f1c100s-musb")) { set_bit(SUNXI_MUSB_FL_HAS_RESET, &glue->flags); set_bit(SUNXI_MUSB_FL_NO_CONFIGDATA, &glue->flags); } @@ -818,6 +821,7 @@ static const struct of_device_id sunxi_musb_match[] = { { .compatible = "allwinner,sun6i-a31-musb", }, { .compatible = "allwinner,sun8i-a33-musb", }, { .compatible = "allwinner,sun8i-h3-musb", }, + { .compatible = "allwinner,suniv-f1c100s-musb", }, {} }; MODULE_DEVICE_TABLE(of, sunxi_musb_match); From patchwork Tue Mar 31 17:02:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Hilliard X-Patchwork-Id: 11468131 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 21B8992A for ; Tue, 31 Mar 2020 17:02:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F32A020848 for ; Tue, 31 Mar 2020 17:02:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GdK3RuEF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731323AbgCaRCe (ORCPT ); Tue, 31 Mar 2020 13:02:34 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:39547 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731299AbgCaRCd (ORCPT ); Tue, 31 Mar 2020 13:02:33 -0400 Received: by mail-ot1-f68.google.com with SMTP id x11so22795246otp.6; Tue, 31 Mar 2020 10:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oRINeVDdGBQ2w1iXgS/Wa+Yp6Zm4cCc2abZS5s8f4+U=; b=GdK3RuEFe1kCVtxTEB3nUR4BaZAC7jbub22f/XQKpnwZgimjp4A14ZfOREwTk71+YN DpaGx+J1kSH9yISno7FLgILIZhxAOgbp696JerhPCT8GSdapWmq/jg4/DafD1xIcqGYO oltzrn1DBfkKgFs0XAYMAMpf+N820ALT+cHjCj0OBR2ytKw8fZLxDFIgWuQEbjaNB/42 p7nCXsr9ztLiY1Pq6yHi9PsDvR/zLUN8eid9d2MLKyBQ9YQitNjNOkebDOO8sUNYrlZV x812bpkIVPJXGeGlVArghbc6Qb2lsVF1XSWdW4cC3QxMdaIl85CL18GAeqMg32ffT2Ms JYwQ== 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:mime-version:content-transfer-encoding; bh=oRINeVDdGBQ2w1iXgS/Wa+Yp6Zm4cCc2abZS5s8f4+U=; b=I0XHbtHKRCKmxfeLC6M77Yz6QrMnqg2Pt0gviRDnT936o2MLazCqmaGVA3g9xR1Eu2 mmSCkDXCnSX18onPyGWaTAmGl5zkzqu9/+SAe1GvfubESVV3ONP+T3p6zz8MUvmjKRdC xoBf7gs9KZCcpdzTRO4lFlzq6gv6y8ocWhfKC3LmWoNHRpJhOWGZY4EUodnU9/BNOOF+ TxawJDwDeMrvh4IbShshA+9Hrgr795f1FYD5/2x20jKmP6INDmexnVVNtjvitNPGDCbP U5OPa5pE6Zc23qnCqSqxU7izPC5oZCjd6/2611+wMP9YRnawfP30PUUpOvxRaahjiuIX AZDA== X-Gm-Message-State: ANhLgQ1LsMGuUc1wQ/uEW+vYPLa5mDwDZV6xFohqC89c0EU7ph2c6TU3 mnQKIdBtU4V3xE3JUuJEZtw= X-Google-Smtp-Source: ADFU+vvnjRPiOsFlZO3fi/+iOec9ItAWXtVwtErkpzk2PsVvTCz1N/VLm8I8EfB4EMH/R5/ax7ko4Q== X-Received: by 2002:a05:6830:1495:: with SMTP id s21mr14453598otq.35.1585674152152; Tue, 31 Mar 2020 10:02:32 -0700 (PDT) Received: from desertvoice.lan ([2601:3c7:8303:2a10::21c]) by smtp.gmail.com with ESMTPSA id h7sm2952605otk.3.2020.03.31.10.02.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 10:02:31 -0700 (PDT) From: George Hilliard To: Chen-Yu Tsai , Rob Herring , Mark Rutland Cc: Icenowy Zheng , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, George Hilliard Subject: [PATCH v2 4/5] ARM: suniv: add USB-related device nodes Date: Tue, 31 Mar 2020 12:02:18 -0500 Message-Id: <20200331170219.267732-5-thirtythreeforty@gmail.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200331170219.267732-1-thirtythreeforty@gmail.com> References: <20200331170219.267732-1-thirtythreeforty@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Icenowy Zheng The suniv SoC has a USB OTG controller and a USB PHY like other Allwinner SoCs. Add their device tree node. Signed-off-by: Icenowy Zheng Signed-off-by: George Hilliard --- arch/arm/boot/dts/suniv-f1c100s.dtsi | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm/boot/dts/suniv-f1c100s.dtsi b/arch/arm/boot/dts/suniv-f1c100s.dtsi index 6100d3b75f61..ec9f248ba889 100644 --- a/arch/arm/boot/dts/suniv-f1c100s.dtsi +++ b/arch/arm/boot/dts/suniv-f1c100s.dtsi @@ -4,6 +4,9 @@ * Copyright 2018 Mesih Kilinc */ +#include +#include + / { #address-cells = <1>; #size-cells = <1>; @@ -140,5 +143,31 @@ uart2: serial@1c25800 { resets = <&ccu 26>; status = "disabled"; }; + + usb_otg: usb@1c13000 { + compatible = "allwinner,suniv-f1c100s-musb"; + reg = <0x01c13000 0x0400>; + clocks = <&ccu CLK_BUS_OTG>; + resets = <&ccu RST_BUS_OTG>; + interrupts = <26>; + interrupt-names = "mc"; + phys = <&usbphy 0>; + phy-names = "usb"; + extcon = <&usbphy 0>; + allwinner,sram = <&otg_sram 1>; + status = "disabled"; + }; + + usbphy: phy@1c13400 { + compatible = "allwinner,suniv-f1c100s-usb-phy"; + reg = <0x01c13400 0x10>; + reg-names = "phy_ctrl"; + clocks = <&ccu CLK_USB_PHY0>; + clock-names = "usb0_phy"; + resets = <&ccu RST_USB_PHY0>; + reset-names = "usb0_reset"; + #phy-cells = <1>; + status = "disabled"; + }; }; }; From patchwork Tue Mar 31 17:02:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: George Hilliard X-Patchwork-Id: 11468133 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ABE8715AB for ; Tue, 31 Mar 2020 17:02:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 89BC520848 for ; Tue, 31 Mar 2020 17:02:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MKbrczXq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731343AbgCaRCl (ORCPT ); Tue, 31 Mar 2020 13:02:41 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:40067 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731304AbgCaRCe (ORCPT ); Tue, 31 Mar 2020 13:02:34 -0400 Received: by mail-oi1-f193.google.com with SMTP id y71so19533824oia.7; Tue, 31 Mar 2020 10:02:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WsoENpy2jwTifAM1fD5pLX9mFDs7jg0pTni7tEt5IGg=; b=MKbrczXqOEVLENPHhVTtv8kAwrtvN5vHUwpd+lgl2YbyPhAF/qHbzvLUES2RQIO3IX s+PcA1CsLvTGYrN4vzj1JwrBWvDbq+l1p1Hx0M8atZ9r2Ortbp01hvl2+/acF8wK6Fac S7iMrmgmM/RmbP3LXDkGXB1evGlSYvXAFhRSS5xLcHSXnH2ylxhXrs1nfcqukc2wX7WL aeKPKB1RtOtuAk1CEbSRT6P+30ZiSqb1b7fO3LoNHTz0Wag5bGWjW3XTUSDprK1AF3CV kBnYNSRy+eQLWKMgc9nT4arDriakeq75Z3EHZqrXrrJZAft5HkoaX0M94zfVQA/3rhmA FPjA== 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:mime-version:content-transfer-encoding; bh=WsoENpy2jwTifAM1fD5pLX9mFDs7jg0pTni7tEt5IGg=; b=kVZQb+v9KPVC82XYX805YOckl1AgYMc05mwI3x9S7fBkHDcmyjJ0XWeWahPdQaL8RA ymmWqY4OU0f0J7q3Pm0mA5Chwi9DpDOcIb1fKF8zBvmKezZN2wEgOU5lMCUynFlA37/v nLVztOrqOov2Q1d+ZfA8nWm5pbqAdGCcvqOQQ3i7V1E77xBcLhCD0ZjVOSulFw2TfUn3 TnmLtDoeu0wIFRDVmJ50+b7K32Yqk+S1WDzPuqsR0Ym0QsWsyWoJDoUQ1W50ubLnRGKV 2vK462mLjqvhsx5/V8GPpIk92M6I6PGzOxRnWfhzoK5OPX5grsv3PaLYWGqWgPP4oX4s YvNg== X-Gm-Message-State: ANhLgQ3sldfMOYVIW5lfAGqY1utuQ/IWJsyrkecNwiXD2Hx5e5t+6GO4 yhXLwPzLIdi9K+Ck/3BDtSf8GyjYAd/gNA== X-Google-Smtp-Source: ADFU+vvmit3GaQ6YrWCOnhehTfCG2Zwd1krBmjaYHHVxlPhFJnQT53Psinli0KKnkdL8JqlmGB40Xg== X-Received: by 2002:aca:efd4:: with SMTP id n203mr2853602oih.159.1585674153405; Tue, 31 Mar 2020 10:02:33 -0700 (PDT) Received: from desertvoice.lan ([2601:3c7:8303:2a10::21c]) by smtp.gmail.com with ESMTPSA id h7sm2952605otk.3.2020.03.31.10.02.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 10:02:32 -0700 (PDT) From: George Hilliard To: Chen-Yu Tsai , Rob Herring , Mark Rutland Cc: Icenowy Zheng , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, George Hilliard Subject: [PATCH v2 5/5] ARM: suniv: f1c100s: enable USB on Lichee Pi Nano Date: Tue, 31 Mar 2020 12:02:19 -0500 Message-Id: <20200331170219.267732-6-thirtythreeforty@gmail.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200331170219.267732-1-thirtythreeforty@gmail.com> References: <20200331170219.267732-1-thirtythreeforty@gmail.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Icenowy Zheng Lichee Pi Nano has a Micro-USB connector, with its D+, D- pins connected to the USB pins of the SoC and ID pin connected to PE2 GPIO. Enable the USB functionality. This patch depends on the previous change to the F1C100s device tree. Signed-off-by: Icenowy Zheng Signed-off-by: George Hilliard --- .../arm/boot/dts/suniv-f1c100s-licheepi-nano.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts b/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts index a1154e6c7cb5..c42186e22d45 100644 --- a/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts +++ b/arch/arm/boot/dts/suniv-f1c100s-licheepi-nano.dts @@ -6,6 +6,8 @@ /dts-v1/; #include "suniv-f1c100s.dtsi" +#include + / { model = "Lichee Pi Nano"; compatible = "licheepi,licheepi-nano", "allwinner,suniv-f1c100s"; @@ -19,8 +21,22 @@ chosen { }; }; +&otg_sram { + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pe_pins>; status = "okay"; }; + +&usb_otg { + dr_mode = "otg"; + status = "okay"; +}; + +&usbphy { + usb0_id_det-gpio = <&pio 4 2 GPIO_ACTIVE_HIGH>; /* PE2 */ + status = "okay"; +};