From patchwork Sun Feb 27 15:30:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12761882 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2AD9BC433EF for ; Sun, 27 Feb 2022 15:30:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=y9Uv1TZIcI42EdMQEIhBCHY2Ol23AYhXP6JFNMzA6Ic=; b=y4VA7FAt1nCA/7 HLarNaHSmx/eW5fP7PbBYSkQngOCK2aorfXJQ/Y8ZAt0/3hBdT3sFOOxaPVhGlohDMxwBE8GKwqgZ ziKHEsWlCkiYz/gjR60LucRZEWnjBgZP+2pHM+9pCTEP32n4g8NLAya5creK3uMKyBQFRTr6VNZU3 H1Es61QhGUhipURWLfvyPhfCLijSzcFT5hCb1nJdoqriGURu8CNOmiRP/vet8CD9mGQKwWd4n1cv8 D3iJ6YsBBqkSgtpA9COiJKqEJ3y2L+qSroQ2yy98hor4AHwoJhG+xmHF9CWnukH9aI7uXkZ89xzWH P/41r1iFRG8Ks1P4c9KQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLVK-009ZHg-RB; Sun, 27 Feb 2022 15:30:34 +0000 Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLV6-009ZAf-TX; Sun, 27 Feb 2022 15:30:22 +0000 Received: by mail-qt1-x831.google.com with SMTP id b23so6957325qtt.6; 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=gaZq4fprHicjjCD/i8LEXlDv9Rv2w3zYMPgVvK+jhp1KA2UE+sJd4qhAVQ3dC1irR8 /r7jwcOEWu0Q4ipR9/iQyAqEblviLXujIxRkukBmGsToWO0Ow5yv6lJs61s6T05a5sv6 dO4ZSlXaRTJEs5zx7XCqLf1LM53MNsMHcnog0gkgpbY8ZhwJcCvD8ds2vJw2QG4Qj57K o/pz8QLELx43h1k/JAGIBT9CepI8b2y7nh9AccT9v3dqxSIMMW/iiA6nxdlSIT/dkv6/ C4DsYa+eGg5nunV3nIgMPi/TzvoYMj7FIG8qea5njwMqkbbbn1E0nll4UHls/iAdbN9p TK7Q== X-Gm-Message-State: AOAM530wWBJr67V1StLphA01TaoeCGjcgSssgOeXxdlatG+T6gxW+PJT j9xpi5RRfKx/rzzfJOHYhPzdjXtNSy35rg== 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220227_073020_973225_0FAA77DD X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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/Documentation/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 From patchwork Sun Feb 27 15:30:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12761883 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8F7DC433F5 for ; Sun, 27 Feb 2022 15:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=0mHGbsjxXLiGIwFKVt5/aSOkyW7kZRelRcD+Im2xXmk=; b=quknBiALH7ZFXC d1NK++DZptoHmDIim7rCibX3qiSlA+IoqHXOw7LUAoJ7bngd6OrgOq4U4VFM8c/yqXBF4q7jBvY1R VWV2cOayQckVTyItHR+brBkiDfVchrL03Etva4pPb3KpRAYKvsb9QJ53QDYWJy3E573owP0MJZLUz N2OdpOCD72rb9Kzghm43MH/P0ryf0pimdiuY+8WVC9MAjUlr7TYbYlwWZQbrwsxYUfYjHkkrJ5DxG ID17MuG3kQkrXgizl6Y1GVczIZ/Ub6LQldfA7nrNBGy8ozSJx/kOiT1uTwt2Ty+iYOm6Nh7R5cjkd dnfUe8GsYLmfK9h9MSrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLVW-009ZNf-KA; Sun, 27 Feb 2022 15:30:46 +0000 Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLV7-009ZB6-UZ; Sun, 27 Feb 2022 15:30:23 +0000 Received: by mail-qt1-x82c.google.com with SMTP id a1so2401747qta.13; 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=iCQjMNtqpueyHJ/U1jIX41JaFzy38glZHw35mDS9pYabqmiAwZWnKP7ukLhX2gmC08 RmclNILnJIgol0PS1neqBuIhwBir31OqDE6+zXOpxA46d3V2lided6yAWNkMM8BX+UeS BohtfssqJ9h9/pPQImGx5bz+S6/hgUwGuAIZmPSE7gDvNKiNy3m+PDzfsY713x8L63J1 EEz1gtw/klZDBdbuoLQuL08mOGuUVT3RORNO61chIac8FqMx73GjA6Mw4c0xzHSxK0TH uces0euMKqFISbbOP3IGBq4q1eGJgdB/Kw3baf2c9F2p+xnGYsAsYk07Qg54QYcBUJUG 1+7A== X-Gm-Message-State: AOAM530YNKQJoQdxSRhYRPsbSDBtR731GD71shKen3ZcqyY75jTtLmuh tD1V97c8kR2dGjV99tEl7TI= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220227_073022_006191_8E6EAB0D X-CRM114-Status: GOOD ( 10.07 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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/Documentation/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 From patchwork Sun Feb 27 15:30:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12761884 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 817FDC433EF for ; Sun, 27 Feb 2022 15:31:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=JRkPQF7v61GWxXL5/2dFiMZ6hWzTK+JZLAey/E+5aog=; b=Qr2eeciscVbnjc OarrM7uNbdVKzip/ATkBjHoQNVZWFlAZNKEXPHqPAsmyqC4dtU6N14IK0dbOUyCfSu72YM2ufIuC5 NH1wfdjkTpTQPNyrc0KQFb5mS1oOyiAXUFcJRf+AoZeLbsj3wRtJcEOk0PnCKFcFGDyAdvH0HioP5 f6YfRh8y2Szz5J2RMgLy/b/+SpdhAttFC/f65JS1RicU8zyVleD8pNta9OiOjP9a6tkE3MvkdImSp V3Y/3tcMuqt3WUB3Fs/23v9gtSNTaiyrv443S5ORLmupregaP6EdAMtSU1jgsN7opvrAgxVuyMHzN 3/EsAuYFSYz0xV2ocYlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLVn-009ZWb-7H; Sun, 27 Feb 2022 15:31:03 +0000 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLV8-009ZBT-SA; Sun, 27 Feb 2022 15:30:24 +0000 Received: by mail-qv1-xf35.google.com with SMTP id g23so10596887qvb.4; 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=n0iMSgc63LvizljvH5ZEHtw9A+aivEJiYiqaOBBCFvC6VkoJNMAU06guWPJzq3XR6I fqdqX+hE90AlPjEfP4YAFpqTIuz2WvamlcSW1u6ACnp+AfiKgL4ga3PRHJ1S1IeLthQ/ 85rXhnnDCKwMDDZKU7GzaWDWScLa7FIWwptHjjXmmvWXFhesFNg8Qm2N5F6iYD4xJ44W DVo95IUKifzfTAraTxwFQI3/7JJgMVekmvFaoKUrQ53MuFmz/DxxFX8Z+6TlG//3hFHr nhxR4e3fFEsGdJPW+OwzuCvPUMdeQCpKgKYBjLbrV2tAKJDwoCq6r3eAGtgW1VHdEDS2 GA0A== X-Gm-Message-State: AOAM532hbK+SAgykmYrTvPYs5++T1LG3VST2DXQupree++VMB0/ngyQ+ 62QGgiIwYao31OIstu4rU3A= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220227_073022_934913_D55877EC X-CRM114-Status: GOOD ( 12.49 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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 __initconst = { .num_values = ARRAY_SIZE(rk3399_defaults), }; +#define RK3566_GRF_USB3OTG0_CON1 0x0104 + +static const struct rockchip_grf_value rk3566_defaults[] __initconst = { + { "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 = { + .values = rk3566_defaults, + .num_values = ARRAY_SIZE(rk3566_defaults), +}; + + static const struct of_device_id rockchip_grf_dt_match[] __initconst = { { .compatible = "rockchip,rk3036-grf", @@ -130,6 +144,9 @@ static const struct of_device_id rockchip_grf_dt_match[] __initconst = { }, { .compatible = "rockchip,rk3399-grf", .data = (void *)&rk3399_grf, + }, { + .compatible = "rockchip,rk3566-pipe-grf", + .data = (void *)&rk3566_pipegrf, }, { /* sentinel */ }, }; From patchwork Sun Feb 27 15:30:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12761885 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 37634C433EF for ; Sun, 27 Feb 2022 15:31:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=DjDRdOe5gytdCbP2P970M2APTQkldVYsy6oRZsKHlZU=; b=iyuh6uV2mApHRY ZPyFp01I+zxbwjA0tMrGiJw5ZU3zfKM8ZZ2f51nIeWiwQnk5O99fOFFEf2AKrUEEzWnDIRro2EGng g+ex+dkHXxDLJEqO5U9DSdXxk5QKogb892HXlWb/9polNWzfFj/gFIAr0fajSH+P9BIt7Eug/oFwB kwm+kBhOMl6/CH6tspVsdv2f6T3GK6WvcxK/OYa1xMYrM6GFUNDFDKuesvOy86vCAneaXSH5obwah pgmSx7Wg5S4BvJOnFQCa8gNk01u8zDHjmDwfRlY0KWDSvAnwO6DfLcpgfUiAEHz5JJJxg35u1zxMQ 5TFEqho3M8RkzF7E+/fA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLW4-009ZfA-Bj; Sun, 27 Feb 2022 15:31:20 +0000 Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLV9-009ZBr-S8 for linux-rockchip@lists.infradead.org; Sun, 27 Feb 2022 15:30:25 +0000 Received: by mail-qv1-xf2e.google.com with SMTP id e22so10546192qvf.9 for ; 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=v8fli++/LKOb6hpx075frVYrAnjvCltMCQBTe0R2F77vaBZNfj1B90Bc72yyEzwfyB X9I08OnPX1sfSrm8skhBozwY8UDxJ3eQFUvZ4IAf4ZctKPeegGJdxbNIMRb6ToODRBLD nsQi+Zd5lQtaqI+XHpiu6FrKAM0Z+ezIFhBvJ9Y4SHBkb95MNcbis5s3y7VVU2e83hFm 30cfBOh7CIv1yPW7Ejg+9+lyWU7tlEei+t0tVDH6vnvjRNG7wHjj4S2opYPjsLT73E4Y urI53mayai/I1TfLfDmZDj/hMynbMXF7TrdADazHXjqvkS4W0wnJ1nUG26h+cjTTfmtV BirQ== X-Gm-Message-State: AOAM532SCUwmsQXliAZgc/EZtblpXrQP/p4y2ILPFcAKWY+1olDbwvNe Da7DT9iXK+BHgo6P2gxG5/8= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220227_073023_938700_1A91AF6A X-CRM114-Status: GOOD ( 11.15 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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 |= DWC3_GUCTL1_PARKMODE_DISABLE_SS; + if (DWC3_VER_IS_WITHIN(DWC3, 290A, ANY) && + (dwc->maximum_speed == USB_SPEED_HIGH || + dwc->maximum_speed == USB_SPEED_FULL)) + reg |= DWC3_GUCTL1_DEV_FORCE_20_CLK_FOR_30_CLK; + dwc3_writel(dwc->regs, DWC3_GUCTL1, reg); } 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) From patchwork Sun Feb 27 15:30:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12761886 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3B90C433FE for ; Sun, 27 Feb 2022 15:31:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=eBv/uXi5phOOtheL6ShHA+o/qcwHg06SZPiAijr22uU=; b=G75x1YeLpW9qnK dJz/TCiOPScoLTQ0BUTHDRkDXlq9lRleG0np9UWzFKe5d/5LVGTKpbE+egiJJoZsC/e57WfYWTX44 esQpS5GULmmHQvahsLQfe/cq1EgsJU8ogn0nK7+YAdfGHRW5301Z4/hmaWENiARatn8iiv1Q8IIYG EV3gyR1A8yDxcmc7gCYD3ZKfWw3JWp19q1OLmPhUg0aemWSxJxQrap/SMZUXgIac/ugc3fJfDWMSz yyQdBCIo4ABNP8mu4HYyaBxnHwirzERub+KrSYJBV3sguDnAokZ3zY8FC3XSUNzCn5aesuZQYp9sa Dd/DqtIzNj/9jmlg8SZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLW5-009Zfp-Gz; Sun, 27 Feb 2022 15:31:21 +0000 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLVB-009ZCd-9g; Sun, 27 Feb 2022 15:30:26 +0000 Received: by mail-qv1-xf29.google.com with SMTP id ba20so10635715qvb.1; 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=SA+I3XLj74X5KWBQXDNKKzdU21t19BP7t4unhiyEUDxi85gmDUHMdlX/66ITz/xIUL MaVG9esa4Z+R7UUBJWJES1AibALrjwZvMRetfyosAnfpz675evkj62Pf5tJrXFR5/Amj X2R1ArbfimJv37/u5v+7wPOPjDhm3IJK4wbb5S/cr+5owQGUblJXv8uotaerzGwU1PTg FTZOK2oMkojxy+HSmWHfo+Hv/+yJEZ861m2wLNCvjDvi32XUCCn/wM1ulz/1qIFelYww f4vF6g0gPKpQ1Yfdmb9ctMjNjieDjcuNjQON/P6EFxb4YoQ5EJoFXiDONY8wLaROffG5 vPKw== X-Gm-Message-State: AOAM531SxyGk3dLOtqas65iqAbT0xbF4SYlLpbHN8a9a0hXv/hUgnKWS h+J6uwLHl5Ftq5rWW/IhkPE= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220227_073025_372102_1971A2EE X-CRM114-Status: GOOD ( 12.38 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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 = "rockchip,rk3566"; }; +&pipegrf { + compatible = "rockchip,rk3566-pipe-grf", "syscon"; +}; + &power { power-domain@RK3568_PD_PIPE { reg = ; @@ -18,3 +22,10 @@ power-domain@RK3568_PD_PIPE { #power-domain-cells = <0>; }; }; + +&usb_host0_xhci { + phys = <&usb2phy0_otg>; + phy-names = "usb2-phy"; + extcon = <&usb2phy0>; + maximum-speed = "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 { }; }; +&pipegrf { + compatible = "rockchip,rk3568-pipe-grf", "syscon"; +}; + &power { power-domain@RK3568_PD_PIPE { reg = ; @@ -114,3 +118,8 @@ power-domain@RK3568_PD_PIPE { #power-domain-cells = <0>; }; }; + +&usb_host0_xhci { + phys = <&usb2phy0_otg>, <&combphy0 PHY_TYPE_USB3>; + phy-names = "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 { }; }; + usb_host0_xhci: usb@fcc00000 { + compatible = "snps,dwc3"; + reg = <0x0 0xfcc00000 0x0 0x400000>; + interrupts = ; + clocks = <&cru CLK_USB3OTG0_REF>, <&cru CLK_USB3OTG0_SUSPEND>, + <&cru ACLK_USB3OTG0>; + clock-names = "ref_clk", "suspend_clk", + "bus_clk"; + dr_mode = "host"; + phy_type = "utmi_wide"; + power-domains = <&power RK3568_PD_PIPE>; + resets = <&cru SRST_USB3OTG0>; + snps,dis_u2_susphy_quirk; + status = "disabled"; + }; + + usb_host1_xhci: usb@fd000000 { + compatible = "snps,dwc3"; + reg = <0x0 0xfd000000 0x0 0x400000>; + interrupts = ; + clocks = <&cru CLK_USB3OTG1_REF>, <&cru CLK_USB3OTG1_SUSPEND>, + <&cru ACLK_USB3OTG1>; + clock-names = "ref_clk", "suspend_clk", + "bus_clk"; + dr_mode = "host"; + phys = <&usb2phy0_host>, <&combphy1 PHY_TYPE_USB3>; + phy-names = "usb2-phy", "usb3-phy"; + phy_type = "utmi_wide"; + power-domains = <&power RK3568_PD_PIPE>; + resets = <&cru SRST_USB3OTG1>; + snps,dis_u2_susphy_quirk; + status = "disabled"; + }; + gic: interrupt-controller@fd400000 { compatible = "arm,gic-v3"; reg = <0x0 0xfd400000 0 0x10000>, /* GICD */ @@ -297,7 +331,6 @@ pmu_io_domains: io-domains { }; pipegrf: syscon@fdc50000 { - compatible = "rockchip,rk3568-pipe-grf", "syscon"; reg = <0x0 0xfdc50000 0x0 0x1000>; }; From patchwork Sun Feb 27 15:30:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12761887 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3A3ACC433EF for ; Sun, 27 Feb 2022 15:31:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=9KxCqUP8KHtnT5cH1LouzM0lxrfHva+JudWjCieg+KU=; b=VlB5zdQveh5M5Y zqtgmhdIsJ11SvROlbYWapNVD2NCTEs/raA/lhaxXKtFKATH6OiDrwiSfAGPqlaGUFupMqwVJhb3X zv9JCEkB29MYu6keM5R1yaOnJo4Ho++mCh73FtpNA1a5NyPkfYmip4WZyLPSrJXN29BIRX5wRVjOU su6RsaTQ/KGWls3A2EWXTSkFfpg9f46MglAFmorPGMYNHZEOsyju6qJ13AJfE1RfC7/Y23j+EL+D7 lIZoB2XJkJFCkWEuRfHk/nNahEnXG5L5HB4L+g3OxVCc51isSOYr0xD6XaFCpC6w+MnYQI5Euttpe Z37y8vp5awv6g/lJnj9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLWN-009Zrr-Ef; Sun, 27 Feb 2022 15:31:39 +0000 Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLVC-009ZCm-9A; Sun, 27 Feb 2022 15:30:28 +0000 Received: by mail-qv1-xf36.google.com with SMTP id j11so10689897qvy.0; 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=W6CnH+B6vr/SUGUyQDsdaZ9bSVeh1Ce3Aj8voCVS1jShiNRwdO1/d0lFb70ug0KZM9 WRfOYbdwKhZ7Iokt9aDIi9xfbgzaUYFY9YY/nX9jJxWzsLBbQgm+qDbbr3DvUiXN2EUx q0Dwgsmyt6Ul73Gj1m5arXapn8sUTA4H6bJSF/orVI3DO+80RYKHRXy6F6UiXSUS9MW1 lF1VsdJgpleY6upeP77E7lrhfC7u+5JuQS3JNTx7T6LaGTgjdhlMq+yjZ+tyRH2ywP/a CROfgKK8YhcvqcoxgBTdHjMyEit350mVP1FJJFhDm6gLFqxbLyO+/Myb25F+4AKM/TbB oDCg== X-Gm-Message-State: AOAM531yklTikiB7xGsdX7rvzWY8YBEDIEwZ2mlJr0VdmtqITCdBMsf4 Ow2U3CbNpPnwHQl8X2U9S50= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220227_073026_347358_0522ED8E X-CRM114-Status: GOOD ( 11.56 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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/arm64/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 = <&vcc5v0_usb>; }; + vcc5v0_usb20_otg: vcc5v0_usb20_otg { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; + regulator-name = "vcc5v0_usb20_otg"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&dcdc_boost>; + }; + vcc3v3_sd: vcc3v3_sd { compatible = "regulator-fixed"; enable-active-low; @@ -187,6 +197,10 @@ vcc_wl: vcc_wl { }; }; +&combphy1 { + status = "okay"; +}; + &cpu0 { cpu-supply = <&vdd_cpu>; }; @@ -672,6 +686,29 @@ &usb_host1_ohci { status = "okay"; }; +&usb_host0_xhci { + status = "okay"; +}; + +/* usb3 controller is muxed with sata1 */ +&usb_host1_xhci { + status = "okay"; +}; + +&usb2phy0 { + status = "okay"; +}; + +&usb2phy0_host { + phy-supply = <&vcc5v0_usb20_host>; + status = "okay"; +}; + +&usb2phy0_otg { + phy-supply = <&vcc5v0_usb20_otg>; + status = "okay"; +}; + &usb2phy1 { status = "okay"; }; From patchwork Sun Feb 27 15:30:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12761888 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 11ECFC433F5 for ; Sun, 27 Feb 2022 15:32:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=9GTmNvs6M/L00zkurL5AHZSBKwcB2VzQuJx5vgwSups=; b=RfJOU8KfTVdChZ 94Bfs9oXcCx0gSS/6Y2o7s/zPpXLDXpl/QcFWvHXldi8AkcMeWfTcNPmZna/Tysnexcn4L1UiGcAx wPUmreiKoKKVEzZupT+vvxFe+gMo9znmeNtYp/u50jExLS2koxPncRcxA3kLPK3vXJDXk5/NplZ7w uV7+ALjiZ+UiaemfAnyYRa0kiP0TW3ny+BwYfqh3vZWbpXruxF618r7kxma4F2HmqNLSUp7T1BXUY x7jky9Eas3qbwe7enOeep93RBuoQgIDkC2i9cAXH75wzcB5Luurnrl575ZNfxZbQe8a+dm+scCUZj /unkoA8j6AhVz8IcXqnQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLWi-009a5R-QM; Sun, 27 Feb 2022 15:32:00 +0000 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOLVE-009ZDX-7h; Sun, 27 Feb 2022 15:30:30 +0000 Received: by mail-qk1-x72b.google.com with SMTP id j78so8598487qke.2; 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=5/a1SBrwqPSiIHl4629KrGvQsufxHV7XbqjDcCUvGwumDh61avJUFPTfiuOKSjj2D4 6LQX23vySJ9tomxnyq6puP/d/SJrXDQZ27qkES6WpIn87LYZxREHWoWRcYota+jtNfu8 8zrHYyJeLOiR5Siuwa+4WEo2SpUgLQHJOhERcQmbD7CJndprCDsSqYZYJ6496W7SnXx6 SwNOZLeD3H9DkJBfk+X1HLPzNf6FsqkJUY+AQb5s/ushjFS8chWKheOQU0Vv1ogS+rIe lTrHGbFyrV+QfcUYrv+qkPzlW/x6CNPDk5Jhs+7Uhyfb5QQTLsRiFvQGZ3N7rnbUg161 cY3g== X-Gm-Message-State: AOAM533eubXfT5leX9J7HtdQFOiFyyIrqDnj6EkquXOG7OYHRscyN8Az IkAh+eODIH+CigtA94Khmwc= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220227_073028_308347_4EB65190 X-CRM114-Status: GOOD ( 11.25 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org 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 = <&vcc5v0_usb>; }; + vcc5v0_usb_otg: vcc5v0-usb-otg { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_usb_otg_en>; + regulator-name = "vcc5v0_usb_otg"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc5v0_usb>; + }; + vcc3v3_lcd0_n: vcc3v3-lcd0-n { compatible = "regulator-fixed"; regulator-name = "vcc3v3_lcd0_n"; @@ -136,6 +148,14 @@ regulator-state-mem { }; }; +&combphy0 { + status = "okay"; +}; + +&combphy1 { + status = "okay"; +}; + &cpu0 { cpu-supply = <&vdd_cpu>; }; @@ -507,6 +527,9 @@ usb { vcc5v0_usb_host_en: vcc5v0_usb_host_en { rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; }; + vcc5v0_usb_otg_en: vcc5v0_usb_otg_en { + rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; + }; }; }; @@ -568,6 +591,11 @@ &usb_host0_ohci { status = "okay"; }; +&usb_host0_xhci { + extcon = <&usb2phy0>; + status = "okay"; +}; + &usb_host1_ehci { status = "okay"; }; @@ -576,6 +604,24 @@ &usb_host1_ohci { status = "okay"; }; +&usb_host1_xhci { + status = "okay"; +}; + +&usb2phy0 { + status = "okay"; +}; + +&usb2phy0_host { + phy-supply = <&vcc5v0_usb_host>; + status = "okay"; +}; + +&usb2phy0_otg { + vbus-supply = <&vcc5v0_usb_otg>; + status = "okay"; +}; + &usb2phy1 { status = "okay"; };