From nobody Tue Jun 23 20:19:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0749FC433FE for ; Sun, 27 Feb 2022 15:30:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231481AbiB0PbA (ORCPT ); Sun, 27 Feb 2022 10:31:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231428AbiB0Pa5 (ORCPT ); Sun, 27 Feb 2022 10:30:57 -0500 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF5943F337; Sun, 27 Feb 2022 07:30:20 -0800 (PST) Received: by mail-qt1-x832.google.com with SMTP id bt3so6934290qtb.0; Sun, 27 Feb 2022 07:30:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RL6lgc9JQzCOWChXKBrpjhVjZkUp1FLcriOwSbYz2iE=; b=hvgOgznrh30xXh+nkSrsBMPkCB4ujzOxoGmBK/u9VRcgkqwymxg6Mxu8hYKJG8vCnc YfmFcT74a7dYNXyvozTgKNHdwRcPRmd8KP0iZX2dIbRbL/9rT6caMH7Tfke0C811BgeN QvWQvpWPeh5n8G4wUOZ2BV4IdUF1Djv68inIz+GeeIQHbV8+zqmWxMU4hhdPwPWP23Ky 2bbbvy+DX0naoadktFKmGu2zqbYwZpZLaTi4NKwoTQh3ZXFaYFQJvc05p3g5tlBR28p/ MAteWdW/xil/F+uzEsEwvIUJQ2KHObSBEDbTJNTfVwstTk11sOiwQR2S4fo1AsHWoIXN G+ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RL6lgc9JQzCOWChXKBrpjhVjZkUp1FLcriOwSbYz2iE=; b=kFSMuOpUG3+AID/TD+Hru9G4uBti+0kHO/8xQXmzHRYPnR5eQaTfMQ0lY1dm2/ZHlu BZo1PzI4zuz792bGtW+zHvkQfOG2O3s3djN7pzvILaGFOVfSFGWGWcdCUOgFRPXDjmBx vEUehgmY3rzgn7cf3JK2b6XbjQEhSl3f/xUpUXzlrI5WgQGF9MuBD1+2qzWoo3nyVFZ/ DVyussw2WzhWJhSKhrh9MGRmv92HE2fhxFj4/3x35f0rOsZ5m8clqZ+6lWnUzP+dkUz5 vc9q5NGFIkzq/sr8rAPeK3+nAinoo2dAd8z2ttMR30+/3thc6DqQ5Uqx77ZjdvtAOkt8 VkiQ== X-Gm-Message-State: AOAM532gv4X1UA2cQ+uZjE5RlXUJB1ez6oh4cKkU7pVbEd/O4vzvs9bQ P6uD8W1vvd1gL7CnQ0VqB+Q= X-Google-Smtp-Source: ABdhPJwsjJ4rXnuZsZt6SzbdunncOBf1dPZk6WG4fCqgA687+tb1CfuSAGeppBjNxh0cIZG0GwXynA== X-Received: by 2002:ac8:5993:0:b0:2dd:c4df:35aa with SMTP id e19-20020ac85993000000b002ddc4df35aamr13528206qte.369.1645975819897; Sun, 27 Feb 2022 07:30:19 -0800 (PST) Received: from master-x64.sparksnet ([2601:153:980:85b1::10]) by smtp.gmail.com with ESMTPSA id s10-20020a05620a080a00b0062ce6f3f5d7sm3845767qks.16.2022.02.27.07.30.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Feb 2022 07:30:19 -0800 (PST) From: Peter Geis To: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Vinod Koul , Yifeng Zhao , Johan Jonker Cc: linux-rockchip@lists.infradead.org, michael.riesch@wolfvision.net, Peter Geis , Rob Herring , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/7] dt-bindings: soc: grf: fix rk3568 usb definitions Date: Sun, 27 Feb 2022 10:30:10 -0500 Message-Id: <20220227153016.950473-2-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220227153016.950473-1-pgwipeout@gmail.com> References: <20220227153016.950473-1-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The rockchip,rk3568-pipe-grf and rockchip,rk3568-pipe-phy-grf compatibles were incorrectly assigned to the syscon, simple-mfd enumeration, vice only the syscon enumeration. This leads a dtbs_check failure. Move these to the syscon enumeration. Fixes: b3df807e1fb0 ("dt-bindings: soc: grf: add naneng combo phy register = compatible") Signed-off-by: Peter Geis --- Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml b/Docu= mentation/devicetree/bindings/soc/rockchip/grf.yaml index 072318fcd57b..5079e9d24af6 100644 --- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml +++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml @@ -15,6 +15,8 @@ properties: - items: - enum: - rockchip,rk3288-sgrf + - rockchip,rk3568-pipe-grf + - rockchip,rk3568-pipe-phy-grf - rockchip,rk3568-usb2phy-grf - rockchip,rv1108-usbgrf - const: syscon @@ -39,8 +41,6 @@ properties: - rockchip,rk3399-grf - rockchip,rk3399-pmugrf - rockchip,rk3568-grf - - rockchip,rk3568-pipe-grf - - rockchip,rk3568-pipe-phy-grf - rockchip,rk3568-pmugrf - rockchip,rv1108-grf - rockchip,rv1108-pmugrf --=20 2.25.1 From nobody Tue Jun 23 20:19:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8218C43219 for ; Sun, 27 Feb 2022 15:30:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231528AbiB0PbH (ORCPT ); Sun, 27 Feb 2022 10:31:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231453AbiB0Pa7 (ORCPT ); Sun, 27 Feb 2022 10:30:59 -0500 Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEFAB3FBC0; Sun, 27 Feb 2022 07:30:21 -0800 (PST) Received: by mail-qt1-x82a.google.com with SMTP id b23so6957342qtt.6; Sun, 27 Feb 2022 07:30:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gwYHMhbRHXQxrol3Z4onOOebIeXrEkEaF8cW1M7ix2U=; b=fX7jIl7DhRISNYbrdZ7o3NlddSPJm6wn8+Fz2legfMrw0fWC7J3Dbw7TDnR5wOJdCY gpAxFOW7fOZ5tpfbGQXrfwbIxARXhi3BEoV5C9q1Mvv2TV+huO9eBaVRwR/Z4JCN4pou o+cd7icR01yEHh3RgUzTVtwekz8ocngD+m/wPuborxjbKudpyPSG3yTEUng1HKgNl5RR ubdjJB/NSYy+tqlkdG9UFnHkbezAj3KhR0ghlQbU70td2rW5szs8VL6YEWXJsic1R8PK pbusKyUqtKRy+NJVzqvm1M7K+xUXmehhDsRtAKIqpOeuxqX9i6sUSKFgPBeG7/3zPYXW Jmlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gwYHMhbRHXQxrol3Z4onOOebIeXrEkEaF8cW1M7ix2U=; b=UZjlBObTV7iISz+8twe9rR2MlW6tmn52RkMxLEDaQ8rgiJnHM+oWIeXW03w7OjYlM8 PFIiB9vTV5vqe9G0hod1YE2v8pKtucwATQPm5HvXaeD8q4FRZt3+kuhC7fh9pZdWQVeK RCqK9Kp3ocXrh019ijrc98M5iwrDBn3B7yB9scO1vD+hK6epiXBNSPuuylirVJicomtM kceLIdYa5a+FefF7NgmeKZMKPh0d/9qjjhwb//gDX0TOxM+HfJ6rJwdL/516p7432OH7 6ta3GFwcRYN+mnVPXfgysBGo8tPizEkortslIdC37SxlI6MDxWX0DG0JGpo5YmJv/CcL xc3Q== X-Gm-Message-State: AOAM530RKXzCpIodna3yZQSJCEOEV1JxXiK5WoEq18NN+dplU6bfr2yj ppa26judjfyZL6BnLWdwLCk= X-Google-Smtp-Source: ABdhPJxQRsI7Khsgyq5bCDJkTk1UuWXiSFiSgTumT5vnLv5/CZeunbwcFbAYiHp8junh5Dy5tZskpg== X-Received: by 2002:ac8:5805:0:b0:2de:23d0:1c28 with SMTP id g5-20020ac85805000000b002de23d01c28mr13602302qtg.585.1645975820913; Sun, 27 Feb 2022 07:30:20 -0800 (PST) Received: from master-x64.sparksnet ([2601:153:980:85b1::10]) by smtp.gmail.com with ESMTPSA id s10-20020a05620a080a00b0062ce6f3f5d7sm3845767qks.16.2022.02.27.07.30.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Feb 2022 07:30:20 -0800 (PST) From: Peter Geis To: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner Cc: linux-rockchip@lists.infradead.org, michael.riesch@wolfvision.net, jbx6244@gmail.com, Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/7] dt-bindings: soc: grf: add rk3566-pipe-grf compatible Date: Sun, 27 Feb 2022 10:30:11 -0500 Message-Id: <20220227153016.950473-3-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220227153016.950473-1-pgwipeout@gmail.com> References: <20220227153016.950473-1-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The rk3566 requires special handling for the dwc3-otg clock in order for the port to function correctly. Add a binding for the rk3566-pipe-grf so we can handle setup with the grf driver. Signed-off-by: Peter Geis --- Documentation/devicetree/bindings/soc/rockchip/grf.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml b/Docu= mentation/devicetree/bindings/soc/rockchip/grf.yaml index 5079e9d24af6..75a2b8bb25fb 100644 --- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml +++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml @@ -15,6 +15,7 @@ properties: - items: - enum: - rockchip,rk3288-sgrf + - rockchip,rk3566-pipe-grf - rockchip,rk3568-pipe-grf - rockchip,rk3568-pipe-phy-grf - rockchip,rk3568-usb2phy-grf --=20 2.25.1 From nobody Tue Jun 23 20:19:29 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D79A0C4332F for ; Sun, 27 Feb 2022 15:30:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231513AbiB0PbF (ORCPT ); Sun, 27 Feb 2022 10:31:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231462AbiB0Pa7 (ORCPT ); Sun, 27 Feb 2022 10:30:59 -0500 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2B003FBEB for ; Sun, 27 Feb 2022 07:30:22 -0800 (PST) Received: by mail-qv1-xf29.google.com with SMTP id a1so10583377qvl.6 for ; Sun, 27 Feb 2022 07:30:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZtUJySmbIWUCXkZt6OYhMWHmPcZgwTz+ISBAU3SmGDQ=; b=N/u0A+od7mnhmo0ttIWI5u7uH+VOP2c9hsLk6Rwvuq64MmCYpSUikT2vIoUFHRLRqZ r/nNbb8nJEuaxvG+lwFVbHdMAaQl/aHXMKgUdPnrkmU+p6mF368niIveTyT44NZgNbiD tcgSoRjSqUIzc7UVGKPrdhLRbYZTSwbLWPtMMg5jip9EVZcXGFzbq73HndfBS/zzneLB gYg25f3GfePVUS7hxy422+gIp8HxHACeAQnlOrvGgMawRq8Fs3+WI5Cu7O1z+qe3xFDn wZFVVRZFXTDRH8kl3hBXtCXDrMjskt7w1Spo7ZR1FzxXqr8G/gWpntJNbmCr36MltT2t ARKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZtUJySmbIWUCXkZt6OYhMWHmPcZgwTz+ISBAU3SmGDQ=; b=EOzB6IF/7k6imGcnZN1T6F9ctDs6QTqjH/qDtQtZtehuoZxvnWwJSiLEEK/SkIoLp8 FEIgkwhs1cwaWoHVHkU/VGAbFoen7MBGmLUfKBcXeFRu/OkwafdGGVk/9CrkrsD1Z7bP 9rB9WofAq63CVfXaAj0c3J71waJdY4VB8eZBHWnC8/qE4Rzohh5YMg7Yq8geOMwPFY9C 3rLmstuzy/4ENPQVulAiUvOMkQ7YZ0QZlWDkrZn0qhnOwJc7Gq/c9f3a4U3rWoG3mnu5 il41LE10TfOAnNSUQwWaMXCkM5l/YzYbZRiyqk59ZvHz90dw5ryBXSwLgwzOryfG8Ot/ gQwg== X-Gm-Message-State: AOAM533L/ZJzLZjEIPtMqs6LGd5FzGYzpXTUfjQPu6MGH1XQhevFS/3a PnzFcEwsc4+wrWeKcUjMZxuaJoowRjbvmA== X-Google-Smtp-Source: ABdhPJwwGqnRp4WZw5csveWAlg4LO4iYmZynP772sOMTPLXz4bRnXBhnjOE5u7jMT9BtKP+KiczALw== X-Received: by 2002:ad4:5b89:0:b0:432:e725:2594 with SMTP id 9-20020ad45b89000000b00432e7252594mr5004735qvp.84.1645975821762; Sun, 27 Feb 2022 07:30:21 -0800 (PST) Received: from master-x64.sparksnet ([2601:153:980:85b1::10]) by smtp.gmail.com with ESMTPSA id s10-20020a05620a080a00b0062ce6f3f5d7sm3845767qks.16.2022.02.27.07.30.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Feb 2022 07:30:21 -0800 (PST) From: Peter Geis To: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org, michael.riesch@wolfvision.net, jbx6244@gmail.com, Peter Geis , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/7] soc: rockchip: set dwc3 clock for rk3566 Date: Sun, 27 Feb 2022 10:30:12 -0500 Message-Id: <20220227153016.950473-4-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220227153016.950473-1-pgwipeout@gmail.com> References: <20220227153016.950473-1-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The rk3566 dwc3 otg port clock is unavailable at boot, as it defaults to the combophy as the clock source. As combophy0 doesn't exist on rk3566, we need to set the clock source to the usb2 phy instead. Add handling to the grf driver to handle this on boot. Signed-off-by: Peter Geis --- drivers/soc/rockchip/grf.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/soc/rockchip/grf.c b/drivers/soc/rockchip/grf.c index 494cf2b5bf7b..384461b70684 100644 --- a/drivers/soc/rockchip/grf.c +++ b/drivers/soc/rockchip/grf.c @@ -108,6 +108,20 @@ static const struct rockchip_grf_info rk3399_grf __ini= tconst =3D { .num_values =3D ARRAY_SIZE(rk3399_defaults), }; =20 +#define RK3566_GRF_USB3OTG0_CON1 0x0104 + +static const struct rockchip_grf_value rk3566_defaults[] __initconst =3D { + { "usb3otg port switch", RK3566_GRF_USB3OTG0_CON1, HIWORD_UPDATE(0, 1, 12= ) }, + { "usb3otg clock switch", RK3566_GRF_USB3OTG0_CON1, HIWORD_UPDATE(1, 1, 7= ) }, + { "usb3otg disable usb3", RK3566_GRF_USB3OTG0_CON1, HIWORD_UPDATE(1, 1, 0= ) }, +}; + +static const struct rockchip_grf_info rk3566_pipegrf __initconst =3D { + .values =3D rk3566_defaults, + .num_values =3D ARRAY_SIZE(rk3566_defaults), +}; + + static const struct of_device_id rockchip_grf_dt_match[] __initconst =3D { { .compatible =3D "rockchip,rk3036-grf", @@ -130,6 +144,9 @@ static const struct of_device_id rockchip_grf_dt_match[= ] __initconst =3D { }, { .compatible =3D "rockchip,rk3399-grf", .data =3D (void *)&rk3399_grf, + }, { + .compatible =3D "rockchip,rk3566-pipe-grf", + .data =3D (void *)&rk3566_pipegrf, }, { /* sentinel */ }, }; --=20 2.25.1 From nobody Tue Jun 23 20:19:30 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 985DDC433FE for ; Sun, 27 Feb 2022 15:30:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231530AbiB0PbJ (ORCPT ); Sun, 27 Feb 2022 10:31:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231477AbiB0PbA (ORCPT ); Sun, 27 Feb 2022 10:31:00 -0500 Received: from mail-qv1-xf33.google.com (mail-qv1-xf33.google.com [IPv6:2607:f8b0:4864:20::f33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CD1A3FD9C; Sun, 27 Feb 2022 07:30:23 -0800 (PST) Received: by mail-qv1-xf33.google.com with SMTP id fc19so10561197qvb.7; Sun, 27 Feb 2022 07:30:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JPaFw68OuUtIuwUUWQ/YAMH/m6245D2UW9piC4irepM=; b=QjB3W0OjDdzllkWrrmQj4sqoi50Fvkt6qRrBwOXAUqncAhnM0ubVGdfmosWjbSAOqK SpjC5XeVyn5sxZftrpPDEzXijzLQ9ppZ8G6omobntjgUBWZIpiCLnJyuzAhU+MKn7oHh kUWlbpdTh6XP7k5W8A2VwZnyymPSpt8eHgqNQNo8I+sU7wsVkLjl+bmEUEyus35F0rKd 6SlD41h444MhU13w3dyabf+U+dhquTPZ3cYjqoP0BL7XRcYXg5Arae4LlA0IgsCv6aKf 9wkJXRm1b2DbU8uXh1Q8vq6/VdC/TmvyJQV/2Ss+n5LxBcYIjBY86U7EFC0pCFPkRMgj AXmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JPaFw68OuUtIuwUUWQ/YAMH/m6245D2UW9piC4irepM=; b=2ccwNCwfr0mYQvf4XeXi1qQEnN7UzCmzsZZcpeBu83PMIN7SzYiBxMwCWZw1BpMnVn aZKGz0wZ5HiW86aHQ0JVFcjfGhiMTtbzOzIzfPxg5pIXufnMi3psWXtsB2QXQjKrfd+O rdh38zmAFXppinKLxlp0r3ifFsoMpP2AdzMYfrfdBrRG1MuQJIz2PDlLw8PvNq6Ex2EF aOZRva3xF2GZF0n4imsXOrNLmctojU7ESP/NmMBJ/xvBadxx/g+x5jqGJljviS8Yo+4h RP7K5vICLCE2LsWDLmjruftHfz/jWgI6ujXse0gCIEhFNiHb8f+AtOqguZnIjRGACgFm XDgA== X-Gm-Message-State: AOAM532bjS39tJsjauvXB9TqwyNEZB+KD4D4rZCVowSTsevBuOXWSKoO 9xW14Ejrg1kuBS0I20Y6JsOqO2AcvRD+OQ== X-Google-Smtp-Source: ABdhPJwkNiMKD4sq0eim8Kc7aMuv/O+aOeFGkOcC5q2lyFBzrPzgjJY5l22E0FN1OyJTUxaIQic55A== X-Received: by 2002:a0c:e04c:0:b0:432:4007:b7de with SMTP id y12-20020a0ce04c000000b004324007b7demr11520611qvk.53.1645975822748; Sun, 27 Feb 2022 07:30:22 -0800 (PST) Received: from master-x64.sparksnet ([2601:153:980:85b1::10]) by smtp.gmail.com with ESMTPSA id s10-20020a05620a080a00b0062ce6f3f5d7sm3845767qks.16.2022.02.27.07.30.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Feb 2022 07:30:22 -0800 (PST) From: Peter Geis To: Felipe Balbi , Greg Kroah-Hartman Cc: linux-rockchip@lists.infradead.org, heiko@sntech.de, michael.riesch@wolfvision.net, jbx6244@gmail.com, Bin Yang , Peter Geis , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 4/7] usb: dwc3: core: do not use 3.0 clock when operating in 2.0 mode Date: Sun, 27 Feb 2022 10:30:13 -0500 Message-Id: <20220227153016.950473-5-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220227153016.950473-1-pgwipeout@gmail.com> References: <20220227153016.950473-1-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Bin Yang In the 3.0 device core, if the core is programmed to operate in 2.0 only, then setting the GUCTL1.DEV_FORCE_20_CLK_FOR_30_CLK makes the internal 2.0(utmi/ulpi) clock to be routed as the 3.0 (pipe) clock. Enabling this feature allows the pipe3 clock to be not-running when forcibly operating in 2.0 device mode. Signed-off-by: Bin Yang Signed-off-by: Peter Geis --- drivers/usb/dwc3/core.c | 5 +++++ drivers/usb/dwc3/core.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 18adddfba3da..416d83a055fe 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1167,6 +1167,11 @@ static int dwc3_core_init(struct dwc3 *dwc) if (dwc->parkmode_disable_ss_quirk) reg |=3D DWC3_GUCTL1_PARKMODE_DISABLE_SS; =20 + if (DWC3_VER_IS_WITHIN(DWC3, 290A, ANY) && + (dwc->maximum_speed =3D=3D USB_SPEED_HIGH || + dwc->maximum_speed =3D=3D USB_SPEED_FULL)) + reg |=3D DWC3_GUCTL1_DEV_FORCE_20_CLK_FOR_30_CLK; + dwc3_writel(dwc->regs, DWC3_GUCTL1, reg); } =20 diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index eb9c1efced05..ea3ca04406bb 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -259,6 +259,7 @@ /* Global User Control 1 Register */ #define DWC3_GUCTL1_DEV_DECOUPLE_L1L2_EVT BIT(31) #define DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS BIT(28) +#define DWC3_GUCTL1_DEV_FORCE_20_CLK_FOR_30_CLK BIT(26) #define DWC3_GUCTL1_DEV_L1_EXIT_BY_HW BIT(24) #define DWC3_GUCTL1_PARKMODE_DISABLE_SS BIT(17) =20 --=20 2.25.1 From nobody Tue Jun 23 20:19:30 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B17FDC433F5 for ; Sun, 27 Feb 2022 15:30:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231535AbiB0PbM (ORCPT ); Sun, 27 Feb 2022 10:31:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231493AbiB0PbC (ORCPT ); Sun, 27 Feb 2022 10:31:02 -0500 Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDC1A403E1; Sun, 27 Feb 2022 07:30:24 -0800 (PST) Received: by mail-qv1-xf34.google.com with SMTP id fc19so10561244qvb.7; Sun, 27 Feb 2022 07:30:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3eZl+223sl+0khRsd3wUqrr3mtzeFUiyhoAUr9E3jDI=; b=PygESFoK5ow14TVHuMhT0LLw9TBeCh5k8CfG2ey+b0L677CPvgCUqw5E9gPdveYO1s K/8RajahPgOPlmwWn1zvwjAhwE9/Se9vLjfyRrsYGixCc5xYYXrBBRB0JW0BAVcgVz7s FZLYZEfEcxJn1MAZaUO6BXOEhGuHqDEsGZ4+4bmz8/YgnR/kXBRBNdXqyCQPO9F5YBge L7DoRufiZ9AfJhCfdKsVLacusn6VkWppcMQOifuCuq8xk3tbv1xK7OygmewyQINkV5O5 Ru1pFlML5wWi0lS7Zlm1k9dPBhKLOtomoRtB77Abn64vLaDKBmhV56Y7iV1MPPTozgnW pnbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3eZl+223sl+0khRsd3wUqrr3mtzeFUiyhoAUr9E3jDI=; b=pqNY7xD7qWjPQPso0UyzZcaRl+p1+jO72qSJQFSjydh64uVWRrYA27BihT/itq7xet d5ZWulzij3OdOPcCqywtzetiGZ8rh9eLCorSK1Zil5zHzBVTNCdsIdRHGQZb5+UOiRLn zQaf2BprKDstepBDc3Ba+POGqMXgbfQVe5ZK48ehTEGhu/XsXftkhd/xRY8MjvyRro9A hpgRp9c+oPWNm8kHUZQm/iGFhV74qF19yqP6TshEfkwFD+7QaMuudUmUMlfkgGYnkYq7 TxXMWC+IWVIRVe8MfqSCW3MC5PGbEYZnshDDr/Ywy7UR23gv8RiBGZbsQ1evmNiXOHPd nsVQ== X-Gm-Message-State: AOAM532HI2VlQDkiO5lUE9jyUlpsXi4qofskXDeFVxy9cuGwLiW+w0F1 fGWj5kM6HwoUDlF3oMAjxWk= X-Google-Smtp-Source: ABdhPJz/IRhGVKuwsLuChwFhxAsEe2SRtfnGcK0RPln660/qisd1WULt8QJJjRYagFIpW1lnousJzg== X-Received: by 2002:a05:6214:1852:b0:432:dd08:56b1 with SMTP id d18-20020a056214185200b00432dd0856b1mr6379992qvy.3.1645975823982; Sun, 27 Feb 2022 07:30:23 -0800 (PST) Received: from master-x64.sparksnet ([2601:153:980:85b1::10]) by smtp.gmail.com with ESMTPSA id s10-20020a05620a080a00b0062ce6f3f5d7sm3845767qks.16.2022.02.27.07.30.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Feb 2022 07:30:23 -0800 (PST) From: Peter Geis To: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner Cc: linux-rockchip@lists.infradead.org, michael.riesch@wolfvision.net, jbx6244@gmail.com, Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 5/7] arm64: dts: rockchip: add rk356x dwc3 usb3 nodes Date: Sun, 27 Feb 2022 10:30:14 -0500 Message-Id: <20220227153016.950473-6-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220227153016.950473-1-pgwipeout@gmail.com> References: <20220227153016.950473-1-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add the dwc3 device nodes to the rk356x device trees. The rk3566 has one usb2 capable dwc3 otg controller and one usb3 capable dwc3 host controller. The rk3568 has one usb3 capable dwc3 otg controller and one usb3 capable dwc3 host controller. Signed-off-by: Peter Geis --- arch/arm64/boot/dts/rockchip/rk3566.dtsi | 11 ++++++++ arch/arm64/boot/dts/rockchip/rk3568.dtsi | 9 ++++++ arch/arm64/boot/dts/rockchip/rk356x.dtsi | 35 +++++++++++++++++++++++- 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3566.dtsi b/arch/arm64/boot/dts= /rockchip/rk3566.dtsi index 3839eef5e4f7..0b957068ff89 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3566.dtsi @@ -6,6 +6,10 @@ / { compatible =3D "rockchip,rk3566"; }; =20 +&pipegrf { + compatible =3D "rockchip,rk3566-pipe-grf", "syscon"; +}; + &power { power-domain@RK3568_PD_PIPE { reg =3D ; @@ -18,3 +22,10 @@ power-domain@RK3568_PD_PIPE { #power-domain-cells =3D <0>; }; }; + +&usb_host0_xhci { + phys =3D <&usb2phy0_otg>; + phy-names =3D "usb2-phy"; + extcon =3D <&usb2phy0>; + maximum-speed =3D "high-speed"; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3568.dtsi b/arch/arm64/boot/dts= /rockchip/rk3568.dtsi index 5b0f528d6818..8ba9334f9753 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3568.dtsi @@ -99,6 +99,10 @@ opp-1992000000 { }; }; =20 +&pipegrf { + compatible =3D "rockchip,rk3568-pipe-grf", "syscon"; +}; + &power { power-domain@RK3568_PD_PIPE { reg =3D ; @@ -114,3 +118,8 @@ power-domain@RK3568_PD_PIPE { #power-domain-cells =3D <0>; }; }; + +&usb_host0_xhci { + phys =3D <&usb2phy0_otg>, <&combphy0 PHY_TYPE_USB3>; + phy-names =3D "usb2-phy", "usb3-phy"; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts= /rockchip/rk356x.dtsi index 7cdef800cb3c..072bb9080cd6 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -230,6 +230,40 @@ scmi_shmem: sram@0 { }; }; =20 + usb_host0_xhci: usb@fcc00000 { + compatible =3D "snps,dwc3"; + reg =3D <0x0 0xfcc00000 0x0 0x400000>; + interrupts =3D ; + clocks =3D <&cru CLK_USB3OTG0_REF>, <&cru CLK_USB3OTG0_SUSPEND>, + <&cru ACLK_USB3OTG0>; + clock-names =3D "ref_clk", "suspend_clk", + "bus_clk"; + dr_mode =3D "host"; + phy_type =3D "utmi_wide"; + power-domains =3D <&power RK3568_PD_PIPE>; + resets =3D <&cru SRST_USB3OTG0>; + snps,dis_u2_susphy_quirk; + status =3D "disabled"; + }; + + usb_host1_xhci: usb@fd000000 { + compatible =3D "snps,dwc3"; + reg =3D <0x0 0xfd000000 0x0 0x400000>; + interrupts =3D ; + clocks =3D <&cru CLK_USB3OTG1_REF>, <&cru CLK_USB3OTG1_SUSPEND>, + <&cru ACLK_USB3OTG1>; + clock-names =3D "ref_clk", "suspend_clk", + "bus_clk"; + dr_mode =3D "host"; + phys =3D <&usb2phy0_host>, <&combphy1 PHY_TYPE_USB3>; + phy-names =3D "usb2-phy", "usb3-phy"; + phy_type =3D "utmi_wide"; + power-domains =3D <&power RK3568_PD_PIPE>; + resets =3D <&cru SRST_USB3OTG1>; + snps,dis_u2_susphy_quirk; + status =3D "disabled"; + }; + gic: interrupt-controller@fd400000 { compatible =3D "arm,gic-v3"; reg =3D <0x0 0xfd400000 0 0x10000>, /* GICD */ @@ -297,7 +331,6 @@ pmu_io_domains: io-domains { }; =20 pipegrf: syscon@fdc50000 { - compatible =3D "rockchip,rk3568-pipe-grf", "syscon"; reg =3D <0x0 0xfdc50000 0x0 0x1000>; }; =20 --=20 2.25.1 From nobody Tue Jun 23 20:19:30 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BF53C433F5 for ; Sun, 27 Feb 2022 15:30:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231542AbiB0PbP (ORCPT ); Sun, 27 Feb 2022 10:31:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231509AbiB0PbC (ORCPT ); Sun, 27 Feb 2022 10:31:02 -0500 Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C32A63FDAB; Sun, 27 Feb 2022 07:30:25 -0800 (PST) Received: by mail-qv1-xf2a.google.com with SMTP id j5so10514877qvs.13; Sun, 27 Feb 2022 07:30:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BiTCbZuuiqDpXPtBKnm7lrk6/Udlslh2uUBYoU46tJs=; b=jB3Bs3EV7b0tr5aaW5H0aQJpL0R6c0th6nflIfkIMfh7+LtdtG6Xw1wKMNP2PB6mXz W2OWFdKU3BUxOPUOvWmMJXtyIYKOSyuyHXdsbVI1wJo9QwajPFmLS/N1nLv0C2fcLYM2 XhkiM2NHARQvwkultLQ9CtaaYUmg9fwU+UoTJCZgP1mOJAZ+AFlreNX8QrteZXz4XHU2 Qyo1/ninC7R1yfazUCgmd/+/VweK14yyTyjtwFQYPcDHXkAsiFKCgDl893uPC4cOsBnW 1DYiHipAFQ9l/Xni1uHkUXRk49bDIWdGUXilsi5MVbTrq4EIyZ77CPTtKul4FC3yIqIq wk6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BiTCbZuuiqDpXPtBKnm7lrk6/Udlslh2uUBYoU46tJs=; b=L2xLPXrEo6CMHEItIOyrW8TCiRuoHYPh0SYu5xH8Ss9qDucY7L6O058Wl6vOYQ0lpv PoVvNjtYJxYHmf0eA9CaCh6omwB6KjGBFrGgTX1ImhAjZLHI29GyArGtjrnzjRmyRIsg YtLGJgFe6FfDIpDCAyf2TvBdc5krvosf0ZvePn3fFjNrQiUJgdsjg+y5DLqBjDygrY3A spLxekHmIp6aTYXIURKL2hkToGm3zjhpiZzBeSCFHJJ5aV7utcX8nrEkhDe72zQulx5D sdLlKefFrSADkOOlsTj2HAuxDSMR6EwR9nXJSQY/HhqOaHVQM37A6IYXOuqjiIsUVGga nQkg== X-Gm-Message-State: AOAM533P4LYH0jgAO8M3IF/xq3IQFe4sz+/uT7GoL9eTa3XLeFjP7GsN Wlv5wmzkJxySb228fuMQClo= X-Google-Smtp-Source: ABdhPJwhzzsUbaNu2GNX6hG+7RoLI3yIs08T4UJS9HpfV7hEI+6/L92WLdLG9Tvw6hv3JRe9TJVqnQ== X-Received: by 2002:ad4:596e:0:b0:42c:33e4:e496 with SMTP id eq14-20020ad4596e000000b0042c33e4e496mr11539543qvb.35.1645975824958; Sun, 27 Feb 2022 07:30:24 -0800 (PST) Received: from master-x64.sparksnet ([2601:153:980:85b1::10]) by smtp.gmail.com with ESMTPSA id s10-20020a05620a080a00b0062ce6f3f5d7sm3845767qks.16.2022.02.27.07.30.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Feb 2022 07:30:24 -0800 (PST) From: Peter Geis To: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner Cc: linux-rockchip@lists.infradead.org, michael.riesch@wolfvision.net, jbx6244@gmail.com, Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 6/7] arm64: dts: rockchip: enable dwc3 on quartz64-a Date: Sun, 27 Feb 2022 10:30:15 -0500 Message-Id: <20220227153016.950473-7-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220227153016.950473-1-pgwipeout@gmail.com> References: <20220227153016.950473-1-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The quartz64 model a has support for both the dwc3 otg port and the dwc3 host port. Add the otg power supply and dwc3 nodes to the device tree to enable support for these. Signed-off-by: Peter Geis --- .../boot/dts/rockchip/rk3566-quartz64-a.dts | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts b/arch/arm6= 4/boot/dts/rockchip/rk3566-quartz64-a.dts index dd7f4b9b686b..141a433429b5 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts @@ -151,6 +151,16 @@ vcc5v0_usb20_host: vcc5v0_usb20_host { vin-supply =3D <&vcc5v0_usb>; }; =20 + vcc5v0_usb20_otg: vcc5v0_usb20_otg { + compatible =3D "regulator-fixed"; + enable-active-high; + gpio =3D <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; + regulator-name =3D "vcc5v0_usb20_otg"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + vin-supply =3D <&dcdc_boost>; + }; + vcc3v3_sd: vcc3v3_sd { compatible =3D "regulator-fixed"; enable-active-low; @@ -187,6 +197,10 @@ vcc_wl: vcc_wl { }; }; =20 +&combphy1 { + status =3D "okay"; +}; + &cpu0 { cpu-supply =3D <&vdd_cpu>; }; @@ -672,6 +686,29 @@ &usb_host1_ohci { status =3D "okay"; }; =20 +&usb_host0_xhci { + status =3D "okay"; +}; + +/* usb3 controller is muxed with sata1 */ +&usb_host1_xhci { + status =3D "okay"; +}; + +&usb2phy0 { + status =3D "okay"; +}; + +&usb2phy0_host { + phy-supply =3D <&vcc5v0_usb20_host>; + status =3D "okay"; +}; + +&usb2phy0_otg { + phy-supply =3D <&vcc5v0_usb20_otg>; + status =3D "okay"; +}; + &usb2phy1 { status =3D "okay"; }; --=20 2.25.1 From nobody Tue Jun 23 20:19:30 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47CCBC433F5 for ; Sun, 27 Feb 2022 15:30:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231527AbiB0PbV (ORCPT ); Sun, 27 Feb 2022 10:31:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231515AbiB0PbF (ORCPT ); Sun, 27 Feb 2022 10:31:05 -0500 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C203E40A00; Sun, 27 Feb 2022 07:30:26 -0800 (PST) Received: by mail-qk1-x729.google.com with SMTP id b13so8551545qkj.12; Sun, 27 Feb 2022 07:30:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OHIHH7LBjO7n3w0TkyTvZ+CHhZPHMYRUZ96K/VbT0E0=; b=dqo1I6grQ/gBiqH+YPs7rXzhBD+bYuTqGeeOaI1GieS/LuXuyYCOf4SDuoUihIgUKI wmB98GeiOf2BtGiD47F0s2369fXjh0kq6UMFZp8ZioU4oEmdcbksndvsD8my0ClMng4H KrtuQYss4Pw3Ltj2HJsJWXw6ykBZp1gHzox4ECvCsN13uy4xpInoE94UI9kGZyWBcA9Y ogmnGkDDmzEInz6Um7XAIbKyAEnB3gfq+AAC4skkXDrTBS2bSNgEg2HXzP5AOPiJu1zF dR1ElE9m03h4tuNnBDpHnqSfOR5pZ27Js4ThB+oodojxkhohDSCGnIGcqnokDnjVqPcR I9Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OHIHH7LBjO7n3w0TkyTvZ+CHhZPHMYRUZ96K/VbT0E0=; b=cSxjVGjx1XWeQbNZSNooOgiSDY26/nwT+wgVOtZKtjNHke+oTuoU8/j+OtecOleW0e PX/1tuEQHsKxtE/aFRpvv1DGP5DZk5TIGUps/neQGhB2GOj9b3xGCnYG8mHH1gTmCxs3 rg+HaGLvaEvdCabiVKtPhmFj8rwriWV0wFg+ghnUqhCXUBV9/z0gZeCsvVnR0KTc3X6Q ai+R3gjYALC8MemJ4xlgbPxxu/Ht7XgRobHufotFrFg2DhVNhxrnKrbpdJBjS8aeRfsn PquNUjrF38/xEIs6st+texjeE21FZIwiXNtTUHaQwGo2lHuPfvNxuG5jQ2R1Bcm0GoyN kDxQ== X-Gm-Message-State: AOAM531z8hltWvlECGQLsDT9M5iFPGZHH57xGY+fkB124k8/QpOD+drk omJe7n4TnjBUy2sNb2Iu3wKDTPQ/xgh0jg== X-Google-Smtp-Source: ABdhPJxTAoe1idnBUg1yVcCCX5Wrzu4GMifkspHde49AFZZ3QzRabhGZqebkFr/DuC/6AhlQinm6+Q== X-Received: by 2002:a05:620a:13d1:b0:5f1:788d:cac9 with SMTP id g17-20020a05620a13d100b005f1788dcac9mr9478022qkl.608.1645975825899; Sun, 27 Feb 2022 07:30:25 -0800 (PST) Received: from master-x64.sparksnet ([2601:153:980:85b1::10]) by smtp.gmail.com with ESMTPSA id s10-20020a05620a080a00b0062ce6f3f5d7sm3845767qks.16.2022.02.27.07.30.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Feb 2022 07:30:25 -0800 (PST) From: Peter Geis To: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner Cc: linux-rockchip@lists.infradead.org, michael.riesch@wolfvision.net, jbx6244@gmail.com, Sascha Hauer , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 7/7] arm64: dts: rockchip: add usb3 support to rk3568-evb1-v10 Date: Sun, 27 Feb 2022 10:30:16 -0500 Message-Id: <20220227153016.950473-8-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220227153016.950473-1-pgwipeout@gmail.com> References: <20220227153016.950473-1-pgwipeout@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Michael Riesch The Rockchip RK3568 EVB1 features one USB 3.0 device-only (USB 2.0 OTG) port and one USB 3.0 host-only port. Activate the USB 3.0 controller nodes and phy nodes in the device tree. Signed-off-by: Sascha Hauer Signed-off-by: Michael Riesch --- .../boot/dts/rockchip/rk3568-evb1-v10.dts | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts b/arch/arm64/= boot/dts/rockchip/rk3568-evb1-v10.dts index a794a0ea5c70..622be8be9813 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-evb1-v10.dts @@ -103,6 +103,18 @@ vcc5v0_usb_host: vcc5v0-usb-host { vin-supply =3D <&vcc5v0_usb>; }; =20 + vcc5v0_usb_otg: vcc5v0-usb-otg { + compatible =3D "regulator-fixed"; + enable-active-high; + gpio =3D <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; + pinctrl-names =3D "default"; + pinctrl-0 =3D <&vcc5v0_usb_otg_en>; + regulator-name =3D "vcc5v0_usb_otg"; + regulator-min-microvolt =3D <5000000>; + regulator-max-microvolt =3D <5000000>; + vin-supply =3D <&vcc5v0_usb>; + }; + vcc3v3_lcd0_n: vcc3v3-lcd0-n { compatible =3D "regulator-fixed"; regulator-name =3D "vcc3v3_lcd0_n"; @@ -136,6 +148,14 @@ regulator-state-mem { }; }; =20 +&combphy0 { + status =3D "okay"; +}; + +&combphy1 { + status =3D "okay"; +}; + &cpu0 { cpu-supply =3D <&vdd_cpu>; }; @@ -507,6 +527,9 @@ usb { vcc5v0_usb_host_en: vcc5v0_usb_host_en { rockchip,pins =3D <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; }; + vcc5v0_usb_otg_en: vcc5v0_usb_otg_en { + rockchip,pins =3D <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; + }; }; }; =20 @@ -568,6 +591,11 @@ &usb_host0_ohci { status =3D "okay"; }; =20 +&usb_host0_xhci { + extcon =3D <&usb2phy0>; + status =3D "okay"; +}; + &usb_host1_ehci { status =3D "okay"; }; @@ -576,6 +604,24 @@ &usb_host1_ohci { status =3D "okay"; }; =20 +&usb_host1_xhci { + status =3D "okay"; +}; + +&usb2phy0 { + status =3D "okay"; +}; + +&usb2phy0_host { + phy-supply =3D <&vcc5v0_usb_host>; + status =3D "okay"; +}; + +&usb2phy0_otg { + vbus-supply =3D <&vcc5v0_usb_otg>; + status =3D "okay"; +}; + &usb2phy1 { status =3D "okay"; }; --=20 2.25.1