From patchwork Fri May 14 15:00:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Schramm X-Patchwork-Id: 12258047 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E22E8C433ED for ; Fri, 14 May 2021 15:00:05 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A74026145D for ; Fri, 14 May 2021 15:00:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A74026145D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=manjaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6r4g9ziWVgxDtO30+QbhT3fnqrRYFjZmEJDaYYBJ0+4=; b=J68z72WrwRoWSctYAe8l+Wmgf sKLp4erX03rQCNnBOH/Qvg1geHyPh2V+2e0SKkQ07rGRKHajtijS/EXjEgNQuXvrwbD+uPZsvZX1V 6wM+NDCfBbHLGsbWKZzo3B0K5NOlbjKKPKSEVnKlwQ+r2qs4M6qtGi9x2RlMiFILQyJeiQ26DCvIG 5C6EsNBQ7fbSZm52j/eYc69jOhQHr2nfdmvE8XcRvv3nujd0dbJE8yfJSodPJDMtPnOLoNNczngch gg70SDRpdcz4sMfQbNXzFcnI7eWIXk7se0IbL+l/rn3umHgrpYRt/N2EynUZblzE4bMG74DzlSxtc 5uuJ/UcEw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhZIK-008M36-5N; Fri, 14 May 2021 15:00:04 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhZHv-008Lyx-4x; Fri, 14 May 2021 14:59:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=4AIjOIjK8U6rD3QXZW3Vzh+OKNjFkX209TXootJ4H/o=; b=k8wBGb7ivhotEn4qllywVH1NCp FHClFF+CFfkUgL8MKa7j0u7uBTnmTaRIn1RbpjsFTpBCZphw2DHuUsIwul1IDyFVvv2ZnQL6rRL1N vUMMmTSHyAatNQPL/y9F2SnccrYQtY+12DTkYvyy/U5CjtaDvENvXW4QprgGLb5PpmLe8gWEY6SZw LDSQabRQ/qFQby/10mntxNH2K159B35AnY5sSWGUxoWK3qoIvLmb88+pXYWIqggP5EHFtA+5meTKD h9lCEPcO0/a6PSmCjnALAa8GnJcQk731m1wExdCMexJ7HAUWIfSCKpfCw1LKoNhQwHjkqK6gdGwIG r2TX+U7A==; Received: from mail.manjaro.org ([2a01:4f8:150:448b::1]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhZHs-00C43p-II; Fri, 14 May 2021 14:59:37 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.manjaro.org (Postfix) with ESMTP id 6DCE1222575; Fri, 14 May 2021 16:59:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at manjaro.org Received: from mail.manjaro.org ([127.0.0.1]) by localhost (manjaro.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mfS1E6guK9J1; Fri, 14 May 2021 16:59:30 +0200 (CEST) From: Tobias Schramm To: linux-usb@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Cc: Johan Jonker , Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tobias Schramm Subject: [PATCH v2 1/5] dt-bindings: phy: rockchip-inno-usb2: add compatible for rk3308 USB phy Date: Fri, 14 May 2021 17:00:40 +0200 Message-Id: <20210514150044.2099298-2-t.schramm@manjaro.org> In-Reply-To: <20210514150044.2099298-1-t.schramm@manjaro.org> References: <20210514150044.2099298-1-t.schramm@manjaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210514_075936_794764_E926978B X-CRM114-Status: UNSURE ( 7.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The RK3308 features a slightly different USB phy than other Rockchip SoCs. This patch adds a compatible string for it. Signed-off-by: Tobias Schramm Acked-by: Rob Herring --- .../devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml b/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml index fb29ad807b68..a5b027a6e70f 100644 --- a/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml +++ b/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml @@ -14,6 +14,7 @@ properties: enum: - rockchip,px30-usb2phy - rockchip,rk3228-usb2phy + - rockchip,rk3308-usb2phy - rockchip,rk3328-usb2phy - rockchip,rk3366-usb2phy - rockchip,rk3399-usb2phy From patchwork Fri May 14 15:00:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Schramm X-Patchwork-Id: 12258053 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FEB3C433B4 for ; Fri, 14 May 2021 15:00:33 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7175D61166 for ; Fri, 14 May 2021 15:00:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7175D61166 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=manjaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NGcI0Lf/Sbai4O46YMkeHwnSUfV6DlxkOM3g0y+jAnU=; b=hEZyOF1+9p3Z7RkOitlmmeVY+ e9JXDeBD4kUwNMD5okeWJlmKC15p7vlnbKwHkxGtg7lb3LBCBBOXgLtMtjhlrxN/uXQLiFhwRUoTq rxWiA8SQJEPrGQdYVh09CTwoLZycptKhcNM5Pbbj7FwlWuuffnfJmm+4juRl4Uap3Eh59fKRKVHWo vF6evKVNsGKBxOqVT8rZqom7AEPgkp4H2S2h54urxkMRIp7lfDbOI5rqKVIuwWZsdnXueJmSTW0lr MUAUaPruFmSn8c1qBTqayHYOD1VRGSYjqhbDuQjml3XCztvxQFG5/T0MSXYr4zu3qwWm9FxZe01nD Tn/SG2ZLw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhZIk-008M9I-RB; Fri, 14 May 2021 15:00:30 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhZHw-008LzD-Ap; Fri, 14 May 2021 14:59:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=9qosxxRkbPLtQiOVsNhwEK6fg8bGFYtMyBg7cyxHEfs=; b=hsPXvcSXBG/05zHWk5sIIEkjkN b1iuUXzX66CvqF/7QOes6dVmL4AoGZenRiT6JaQ4tUZLOVrY5wZvf5vAGClygC/T9GM12DMaPhc2g K9vQTaKBpC1ZzCQC0V9rdx+xyhoAYAqnFcZU+Ap9WjHVU1tA+WmtBOrIaa+TkCLlUItoaaih1IS5Q PJqJXQh2ZQ3UUrf+x5hAxshEmd+SfRmOSQVR9ZRawrH34KtF0LV21RzZ3Cg13o9qOIhCVtZUYd+MC 7DX3OY6Znpee/kMlCdD2ETkFftqG75aZsn5Ge3xqlOOcJywqh47LNbPbmPIfVmz3fp0yKnq9SpJ7d FZ/jMaPQ==; Received: from mail.manjaro.org ([2a01:4f8:150:448b::1]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhZHs-00C43n-IH; Fri, 14 May 2021 14:59:39 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.manjaro.org (Postfix) with ESMTP id B11A2220901; Fri, 14 May 2021 16:59:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at manjaro.org Received: from mail.manjaro.org ([127.0.0.1]) by localhost (manjaro.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3-ZMU6Ofhnkw; Fri, 14 May 2021 16:59:31 +0200 (CEST) From: Tobias Schramm To: linux-usb@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Cc: Johan Jonker , Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tobias Schramm Subject: [PATCH v2 2/5] phy: phy-rockchip-inno-usb2: add support for RK3308 USB phy Date: Fri, 14 May 2021 17:00:41 +0200 Message-Id: <20210514150044.2099298-3-t.schramm@manjaro.org> In-Reply-To: <20210514150044.2099298-1-t.schramm@manjaro.org> References: <20210514150044.2099298-1-t.schramm@manjaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210514_075936_789872_2BB5E33C X-CRM114-Status: GOOD ( 10.77 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The RK3308 SoC uses a slightly different USB phy than other Rockchip parts. This commit adds support for that phy. Signed-off-by: Tobias Schramm --- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c index 46ebdb1460a3..beacac1dd253 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c @@ -1256,6 +1256,49 @@ static const struct rockchip_usb2phy_cfg rk3228_phy_cfgs[] = { { /* sentinel */ } }; +static const struct rockchip_usb2phy_cfg rk3308_phy_cfgs[] = { + { + .reg = 0x100, + .num_ports = 2, + .clkout_ctl = { 0x108, 4, 4, 1, 0 }, + .port_cfgs = { + [USB2PHY_PORT_OTG] = { + .phy_sus = { 0x0100, 8, 0, 0, 0x1d1 }, + .bvalid_det_en = { 0x3020, 2, 2, 0, 1 }, + .bvalid_det_st = { 0x3024, 2, 2, 0, 1 }, + .bvalid_det_clr = { 0x3028, 2, 2, 0, 1 }, + .ls_det_en = { 0x3020, 0, 0, 0, 1 }, + .ls_det_st = { 0x3024, 0, 0, 0, 1 }, + .ls_det_clr = { 0x3028, 0, 0, 0, 1 }, + .utmi_avalid = { 0x0120, 10, 10, 0, 1 }, + .utmi_bvalid = { 0x0120, 9, 9, 0, 1 }, + .utmi_ls = { 0x0120, 5, 4, 0, 1 }, + }, + [USB2PHY_PORT_HOST] = { + .phy_sus = { 0x0104, 8, 0, 0, 0x1d1 }, + .ls_det_en = { 0x3020, 1, 1, 0, 1 }, + .ls_det_st = { 0x3024, 1, 1, 0, 1 }, + .ls_det_clr = { 0x3028, 1, 1, 0, 1 }, + .utmi_ls = { 0x0120, 17, 16, 0, 1 }, + .utmi_hstdet = { 0x0120, 19, 19, 0, 1 } + } + }, + .chg_det = { + .opmode = { 0x0100, 3, 0, 5, 1 }, + .cp_det = { 0x0120, 24, 24, 0, 1 }, + .dcp_det = { 0x0120, 23, 23, 0, 1 }, + .dp_det = { 0x0120, 25, 25, 0, 1 }, + .idm_sink_en = { 0x0108, 8, 8, 0, 1 }, + .idp_sink_en = { 0x0108, 7, 7, 0, 1 }, + .idp_src_en = { 0x0108, 9, 9, 0, 1 }, + .rdm_pdwn_en = { 0x0108, 10, 10, 0, 1 }, + .vdm_src_en = { 0x0108, 12, 12, 0, 1 }, + .vdp_src_en = { 0x0108, 11, 11, 0, 1 }, + }, + }, + { /* sentinel */ } +}; + static const struct rockchip_usb2phy_cfg rk3328_phy_cfgs[] = { { .reg = 0x100, @@ -1425,6 +1468,7 @@ static const struct rockchip_usb2phy_cfg rv1108_phy_cfgs[] = { static const struct of_device_id rockchip_usb2phy_dt_match[] = { { .compatible = "rockchip,px30-usb2phy", .data = &rk3328_phy_cfgs }, { .compatible = "rockchip,rk3228-usb2phy", .data = &rk3228_phy_cfgs }, + { .compatible = "rockchip,rk3308-usb2phy", .data = &rk3308_phy_cfgs }, { .compatible = "rockchip,rk3328-usb2phy", .data = &rk3328_phy_cfgs }, { .compatible = "rockchip,rk3366-usb2phy", .data = &rk3366_phy_cfgs }, { .compatible = "rockchip,rk3399-usb2phy", .data = &rk3399_phy_cfgs }, From patchwork Fri May 14 15:00:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Schramm X-Patchwork-Id: 12258049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EB32C43461 for ; Fri, 14 May 2021 15:00:06 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0516061461 for ; Fri, 14 May 2021 15:00:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0516061461 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=manjaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/ODrA0aBobHYhcLH77PoxzL0IWkzMM6XXI2zNszR+4E=; b=OOviAkKlyIXawseibw6fgALNF T34tN92uqDBoszNSUbcgyPDTNNEWENSFW7IPtA448lSYZ+4W4jnUYM087iAKHMCrcuVAvLa4edncQ bIu4N2dM1H3X8CVu7QkeWWJm1RFRJvftY3XpEXHTG1Fx9/vK9VsleqLZPvRXhhQsyIag8Ek5J0w7N HmNTjU6fxHluz9VlTIP+6kB/4cclTDbgrXevLU9JSbVNewRQXwSWjkCq62JTUnczsuin2MZxLfqQ6 tcBwxBI3SvhFLWRbQEef1TlvzZJqOCofYkTP2jfVsf+KYMa4IV3d4HVBCEOoeJBOau8B5oONLAW0v MOkgyRyZw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhZIK-008M3D-EX; Fri, 14 May 2021 15:00:04 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhZHv-008Lyy-4p; Fri, 14 May 2021 14:59:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Cs41mioYQ+sZovsJ0UMQOqMg8rdBg3GqSgyqpD4kATE=; b=vWIxwFk9SKS2wCKSm92WbyUmF4 tz1yCsoBGIahkm1lFtk2g5GK/BSPNY5X2Rv88In/FuZNFYI6BVpAHyuZvsKUh93DNWP25TBJTnj6V od8FE/v6eKqymn1I4ZeXPuta+DotAhTbYZkbKXfnDkbnTs7CpQ6A/7CUgv4Q8rdxWHT/v8kfUh6P4 kaW/hZ4OykQqNBFIusKHzURtU86uaXZgPqe0LNuc7OCA0b1V7jYv6GyZkLMITwREXkBp3ap7tumUz q9uQ0wjzGoYmP1AlZaimA8Qx1PeT37nV5BMYUx1fTgYiQ4bVCz34fBfwYsrbGvqLfFiuB+DqvaX4D k4X1tPMw==; Received: from mail.manjaro.org ([2a01:4f8:150:448b::1]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhZHs-00C43q-ID; Fri, 14 May 2021 14:59:37 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.manjaro.org (Postfix) with ESMTP id 1A83E222572; Fri, 14 May 2021 16:59:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at manjaro.org Received: from mail.manjaro.org ([127.0.0.1]) by localhost (manjaro.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yRjHlQv2R6Os; Fri, 14 May 2021 16:59:32 +0200 (CEST) From: Tobias Schramm To: linux-usb@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Cc: Johan Jonker , Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tobias Schramm Subject: [PATCH v2 3/5] dt-bindings: usb: dwc2: add compatible for RK3308 USB controller Date: Fri, 14 May 2021 17:00:42 +0200 Message-Id: <20210514150044.2099298-4-t.schramm@manjaro.org> In-Reply-To: <20210514150044.2099298-1-t.schramm@manjaro.org> References: <20210514150044.2099298-1-t.schramm@manjaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210514_075936_788290_0642039B X-CRM114-Status: UNSURE ( 8.17 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The USB controller in the RK3308 is compatible with the RK3066 USB controller. This patch adds a compatible string for it. Signed-off-by: Tobias Schramm Acked-by: Rob Herring --- Documentation/devicetree/bindings/usb/dwc2.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.yaml b/Documentation/devicetree/bindings/usb/dwc2.yaml index e5ee51b7b470..10c7d9b6cc53 100644 --- a/Documentation/devicetree/bindings/usb/dwc2.yaml +++ b/Documentation/devicetree/bindings/usb/dwc2.yaml @@ -24,6 +24,7 @@ properties: - rockchip,rk3188-usb - rockchip,rk3228-usb - rockchip,rk3288-usb + - rockchip,rk3308-usb - rockchip,rk3328-usb - rockchip,rk3368-usb - rockchip,rv1108-usb From patchwork Fri May 14 15:00:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Schramm X-Patchwork-Id: 12258051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CE2FC43460 for ; Fri, 14 May 2021 15:00:33 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0E57D61457 for ; Fri, 14 May 2021 15:00:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E57D61457 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=manjaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Ab2vAfouKV92EK3RR5GRsCz6OXyJyLXvGiasnJUIRPE=; b=oIbhvPP5CXezcSYdBcCqFy8So GL6H7+VvAdo5rQRBS0k9V1D02QzBhII84iHuDEDnLpvjzS/8CUkxw6L0aPV5LF0TdzdWMexqxtdqX 2QKmcQiYuseQjngCSo4q0Ok9QajXY7VqjBJlLW9+XUzMn3uImRxMLpOx0eFYwTrywP4jBBK78h2cD HKh+e/D/zan5xJsOcgre5O9GGONVhm9t0dTCygvq6dZixhtoEN4S/1eRgeCG63evKzlHOzIPDck28 cU2OpuiEhixNMEOA9NITIkzAlkwce1r3DOHB3fW34qeRcbPbO95sPuXYWDYfDWXtuoCcYArRP+Jxq ZxFQrs7hg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhZIl-008M9T-D3; Fri, 14 May 2021 15:00:31 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhZHw-008LzC-AL; Fri, 14 May 2021 14:59:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=lA6QdZEIcYfr7WkNSP1q7t4iJ00C09HPF4/k1bFql0w=; b=bTl+t00S7w74gLk2HAQxYG/i1z B1MHkypr4rZIk7D1WKi1vKb3ckAInsdgvxYEf93pVI5l8IgbC79P8t6ghdTd0jEJpMx5BOPFJ4SHa BQR6O6uQTtflK2eiaN+P80jwyKqf3GPDK/qcTNHVXTqfveghW0N86za8Y67MvKxaaG5nmj6C91gUo ys2mWEBOYFYC8E7IIqiZQgheejIBY98IPE49p/0ZpnbIVLDNLhCc2oDeaXwUQFqWJVBdOHGvlzTd8 H6FbptM/3O25o9d2Ma4dj6xCnSrW7+ny6Az+xo8TrTEdpuWEI3hDda8H8Qx1UngbLrnZ9TyptB9LA dW/iJxnQ==; Received: from mail.manjaro.org ([176.9.38.148]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhZHt-00C43z-9p; Fri, 14 May 2021 14:59:39 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.manjaro.org (Postfix) with ESMTP id 04F56222574; Fri, 14 May 2021 16:59:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at manjaro.org Received: from mail.manjaro.org ([127.0.0.1]) by localhost (manjaro.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RVUCmKNzUL1i; Fri, 14 May 2021 16:59:33 +0200 (CEST) From: Tobias Schramm To: linux-usb@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Cc: Johan Jonker , Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tobias Schramm Subject: [PATCH v2 4/5] dt-bindings: soc: rockchip: grf: add compatible for RK3308 USB grf Date: Fri, 14 May 2021 17:00:43 +0200 Message-Id: <20210514150044.2099298-5-t.schramm@manjaro.org> In-Reply-To: <20210514150044.2099298-1-t.schramm@manjaro.org> References: <20210514150044.2099298-1-t.schramm@manjaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210514_075937_507042_68C7E141 X-CRM114-Status: UNSURE ( 7.75 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The RK3308 has a USB GRF. This patch adds a compatible string for it. Signed-off-by: Tobias Schramm --- Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml index 84bdaf88d5a6..df77bd2e6752 100644 --- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml +++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml @@ -30,6 +30,7 @@ properties: - rockchip,rk3288-grf - rockchip,rk3308-core-grf - rockchip,rk3308-detect-grf + - rockchip,rk3308-usb2phy-grf - rockchip,rk3308-grf - rockchip,rk3328-grf - rockchip,rk3328-usb2phy-grf From patchwork Fri May 14 15:00:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Schramm X-Patchwork-Id: 12258057 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AC9EC433ED for ; Fri, 14 May 2021 15:01:01 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BE8BB61166 for ; Fri, 14 May 2021 15:01:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE8BB61166 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=manjaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pZ3LJTIs4PCUb2AvYplDzFQxbowqS4tyUopLKiH+PbA=; b=QtY3NInKEB8PWh2cKpyuP+ZAK SQuqAAOJnl0kZIIQ7AgGI3XO/w964ENPyss7ncHUqqWFwKieoZyRO2kLkTRgV4y9hCxn86XBJtORn 0DI8wYhqEFAyCaPVUgRXlJhZTr822VubRBdP7MoDYhZ7zEMYLnP5GVqEmPALxuNPxTDtjEfoovCmG gFT5OTzuGj589asP4UGPm/sVAUanZO/RnNmh4GRRNBp7AS0dH/fviaPoZx81lSEEp6r/shCuKaT7J MWcMAFF05fFQRUf+uBE1BbS1Eq4ft8Ox/EQRTWm91u9tlho34LfVXrg2Oo1qalpq5wz9PYpWG7/4m d3kVMW0Bg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhZJD-008MJW-0m; Fri, 14 May 2021 15:00:59 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhZHx-008Lzq-R1; Fri, 14 May 2021 14:59:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=pbLfBDzmCHZgiDRRj4nFY96ZtAQqgQOqhiyHaxVjQXQ=; b=17grr3luAEVx+EdMxEkmockvp1 SRbfoeTaigXn36URSb1Ig4zxVqp9qNMZmY9uWI7zx3LNmPUWUbXl9ZwB/EN7y6Ogp+QkBhmFKDIwj zoGVBqiwXLLum0u0FUw3QSJCN5buvA2lKaqcta5uCz0go9m8T2GXKN5WgKF4vARO1dwf+TLacKiDC XwiDLDcobhRJRvvf5AS/vCH2vilTaBWrzVcWVjZ0+M/71qw5UnoPrehdQ0wUYGEiH/fePWHIW/QDG 8QdZ0XzWyQBTnX50qGFtoe4LKUvpaO70y3S0Umo7qN5nSXCMby7vVmxV0p9UrQ/j9X22ZpYU2IC79 zk/OAHYA==; Received: from mail.manjaro.org ([176.9.38.148]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhZHv-00C454-6P; Fri, 14 May 2021 14:59:40 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.manjaro.org (Postfix) with ESMTP id E9ECB222579; Fri, 14 May 2021 16:59:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at manjaro.org Received: from mail.manjaro.org ([127.0.0.1]) by localhost (manjaro.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LKbtEON92Hkg; Fri, 14 May 2021 16:59:34 +0200 (CEST) From: Tobias Schramm To: linux-usb@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org Cc: Johan Jonker , Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tobias Schramm Subject: [PATCH v2 5/5] arm64: dts: rockchip: add USB support to RK3308 dts Date: Fri, 14 May 2021 17:00:44 +0200 Message-Id: <20210514150044.2099298-6-t.schramm@manjaro.org> In-Reply-To: <20210514150044.2099298-1-t.schramm@manjaro.org> References: <20210514150044.2099298-1-t.schramm@manjaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210514_075939_405598_1076D245 X-CRM114-Status: UNSURE ( 9.49 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The Rockchip RK3308 features an integrated USB 2.0 phy, an USB OTG controller and OHCI/EHCI interfaces. This patch adds all of those to the RK3308 dtsi and thereby enables USB support on the RK3308. Signed-off-by: Tobias Schramm --- arch/arm64/boot/dts/rockchip/rk3308.dtsi | 73 ++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3308.dtsi b/arch/arm64/boot/dts/rockchip/rk3308.dtsi index 0c5fa9801e6f..4f55477d70f1 100644 --- a/arch/arm64/boot/dts/rockchip/rk3308.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3308.dtsi @@ -177,6 +177,43 @@ reboot-mode { }; }; + usb2phy_grf: syscon@ff008000 { + compatible = "rockchip,rk3308-usb2phy-grf", "syscon", + "simple-mfd"; + reg = <0x0 0xff008000 0x0 0x4000>; + #address-cells = <1>; + #size-cells = <1>; + + u2phy: usb2-phy@100 { + compatible = "rockchip,rk3308-usb2phy"; + reg = <0x100 0x10>; + clocks = <&cru SCLK_USBPHY_REF>; + clock-names = "phyclk"; + clock-output-names = "usb480m_phy"; + #clock-cells = <0>; + assigned-clocks = <&cru USB480M>; + assigned-clock-parents = <&u2phy>; + status = "disabled"; + + u2phy_otg: otg-port { + #phy-cells = <0>; + interrupts = , + , + ; + interrupt-names = "otg-bvalid", "otg-id", + "linestate"; + status = "disabled"; + }; + + u2phy_host: host-port { + #phy-cells = <0>; + interrupts = ; + interrupt-names = "linestate"; + status = "disabled"; + }; + }; + }; + detect_grf: syscon@ff00b000 { compatible = "rockchip,rk3308-detect-grf", "syscon", "simple-mfd"; reg = <0x0 0xff00b000 0x0 0x1000>; @@ -579,6 +616,42 @@ spdif_tx: spdif-tx@ff3a0000 { status = "disabled"; }; + usb20_otg: usb@ff400000 { + compatible = "rockchip,rk3308-usb", "rockchip,rk3066-usb", + "snps,dwc2"; + reg = <0x0 0xff400000 0x0 0x40000>; + interrupts = ; + clocks = <&cru HCLK_OTG>; + clock-names = "otg"; + dr_mode = "otg"; + g-np-tx-fifo-size = <16>; + g-rx-fifo-size = <280>; + g-tx-fifo-size = <256 128 128 64 32 16>; + phys = <&u2phy_otg>; + phy-names = "usb2-phy"; + status = "disabled"; + }; + + usb_host_ehci: usb@ff440000 { + compatible = "generic-ehci"; + reg = <0x0 0xff440000 0x0 0x10000>; + interrupts = ; + clocks = <&cru HCLK_HOST>, <&cru HCLK_HOST_ARB>, <&u2phy>; + phys = <&u2phy_host>; + phy-names = "usb"; + status = "disabled"; + }; + + usb_host_ohci: usb@ff450000 { + compatible = "generic-ohci"; + reg = <0x0 0xff450000 0x0 0x10000>; + interrupts = ; + clocks = <&cru HCLK_HOST>, <&cru HCLK_HOST_ARB>, <&u2phy>; + phys = <&u2phy_host>; + phy-names = "usb"; + status = "disabled"; + }; + sdmmc: mmc@ff480000 { compatible = "rockchip,rk3308-dw-mshc", "rockchip,rk3288-dw-mshc"; reg = <0x0 0xff480000 0x0 0x4000>;