From patchwork Wed Jul 28 12:25:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12405479 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 5CDFEC4320E for ; Wed, 28 Jul 2021 12:26:51 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2533360C3E for ; Wed, 28 Jul 2021 12:26:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2533360C3E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=JDhjD3PJstPMPYKYy9QEDjpN98PPAHoSELbNOjvMBCw=; b=azIAWsSRMSpD/d ssGrzc1Apoqhkfh8NmywEGCxQDrf9iTJw1ZGtazFTJCkQKsPNuonypcx6iE3uSju8Sh70ZGBVxeAm zDYIxKafZq7kfAjBjTiFVJmHj/8ngNKX6bEdeItwBXNoRgCqNizQjID6f6yLSfnT21oxbiEQ93d0K 9/jGHnm5Po+Ok1XAvJ4V5HktPfBSTOPPDGOhQwYyHTHnn3KUW3o3Di+mDl7SK9Nbg7uJH+iAi5sV3 S/8nFPOXI+6GST/EaNP96gPIh47AO35nOexwKvbaFBjMNAQLPnUBjEVHkllnbEojIR4mbhmA5E890 c5kvVHnJmRkYL0/AyetA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8ie6-000cms-WF; Wed, 28 Jul 2021 12:26:47 +0000 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8idh-000ced-HP; Wed, 28 Jul 2021 12:26:22 +0000 Received: by mail-qt1-x830.google.com with SMTP id g11so1150902qts.11; Wed, 28 Jul 2021 05:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cqVElBTymsj42U9y84VWCRYbnR5OUCvocbx2B46HwA4=; b=lfHZWifbnkRx73BjJ2DdNFoh76LTI/lR/JlGRqXWxJb8VDd5lGQmojCJBJ0S2JOHQA DUrgcauL4hNPhsLLPxolrKmT3lZ2aVwln3R6WyPmgqw3ADU2hx6Ie0q1F8vjs47yUUIx U6erLvl4z6Wc/te6l/4qlmIkyN7Hn9T26/D6XnHbwHTItUxU5wdQX9cVtf7YVBGGy0WI DkXEdn2ucXcIEAVN/POOmw2ylW8NEiqKfjboJwmFtpSBjhf2cHF+hmz8ijGA9fM2Ckrb lKB+if/AzXsndXcz9hWPyi95hUu6AkT0VA0gP9gaHifrZhz+mErtN5m81PTSDmk011uw W4Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cqVElBTymsj42U9y84VWCRYbnR5OUCvocbx2B46HwA4=; b=c7EPjdk7iGLvqT6afTfzrshUYBYIByEz8Q8Upp+EzOjdMIT3trSDiSg6MvN6NprfAP Ni2X8qaRY4of+DUMzPvEUEId/IOq9UnJW7lo/jNmKTLERr/BDp9I4I46TVkOdLBOpguf S9jsbp73n4TMdOuO3VmBtDKvJqalS4QbaocNt9FpROSzdEdHisnSJAYRCvLMGmUi/d+d KYkzlB6lqDMqe1+kHdVOjNOhk+QwwqKIdZcnvTKamiJKvnId4uook3GDuiXhgNEkJZRa VWEysdnQynqslidXhZvJVlQN1FZSV2+905apu72rvP0xAt2+HD6hf2J/LGiecKz/vW4n gFyg== X-Gm-Message-State: AOAM530lVxscxaOxWJZu2z0G5frI+U8d+7tFhbRkitRRzo9WW0rP8PsR yc+EwLHeRvymWgtmrstTvH4= X-Google-Smtp-Source: ABdhPJxg8GxOcLAwV95w2hX1hG2TcoDsu76sI3iNr3XLbBM4hoL0FeYRELgeOO/MKNl97IqbmxiNgg== X-Received: by 2002:a05:622a:50:: with SMTP id y16mr24452703qtw.322.1627475178609; Wed, 28 Jul 2021 05:26:18 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id z9sm2842972qtn.54.2021.07.28.05.26.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 05:26:18 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Peter Geis Subject: [RFC PATCH 1/9] dt-bindings: soc: rockchip: add rk3568-usb2phy-grf Date: Wed, 28 Jul 2021 08:25:58 -0400 Message-Id: <20210728122606.697619-2-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728122606.697619-1-pgwipeout@gmail.com> References: <20210728122606.697619-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_052621_627551_68D3B225 X-CRM114-Status: GOOD ( 10.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 Add the documentation for the rk3568-usb2phy-grf node, which is separate from the usb2phy node on this chip. 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 fa010df51a5c..3b0e06b6ea61 100644 --- a/Documentation/devicetree/bindings/soc/rockchip/grf.yaml +++ b/Documentation/devicetree/bindings/soc/rockchip/grf.yaml @@ -16,6 +16,7 @@ properties: - enum: - rockchip,rk3288-sgrf - rockchip,rv1108-usbgrf + - rockchip,rk3568-usb2phy-grf - const: syscon - items: - enum: From patchwork Wed Jul 28 12:25:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12405483 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 51866C4338F for ; Wed, 28 Jul 2021 12:27:42 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2357860C3E for ; Wed, 28 Jul 2021 12:27:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2357860C3E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=7DjjwKkQZevOZiFaXPZ2TViWSLa4h5+2DKJkmg/TJME=; b=Xk5E03e8g9a8ul d8YUT6oAeinASL8kpxyStcEDfy1zeEMao4K+zFPxGLdSlcTbwoX1OuseuEpg+vuaVxFD8y2phkfqP 34c1doIw9NOCBUTUzIu8p0AEU/bXyNhEUR036LojLw3FcAD1RVrIFgkzjBjtrOIAUF3oukSa0za/3 Eu3RGrajMX3r86EuWeZF8fvCBrqeSWS0M14yLAP6kLcNX6aOqqlPswUNUZ+Xt1l4YxvM8CusMugC1 GlWVHVDWhODCcrmvj3SB3m3ffKlv146dP47ABHDI6n/PxdOVt4PspyIcEz1TM+4lo+UMOtdUMa2qa mOgSNY/QeHmX4XWLKMlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8iew-000d38-1z; Wed, 28 Jul 2021 12:27:38 +0000 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8idh-000cee-Iu; Wed, 28 Jul 2021 12:26:23 +0000 Received: by mail-qk1-x72c.google.com with SMTP id 184so1979365qkh.1; Wed, 28 Jul 2021 05:26:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=saUJiNRMbvLZyMVotP5YuX5FwxQa4tigZr/kaBCa+Io=; b=K4v9CqjZNh8twTu5xrnxNT8X9vHL3NFu9kkZsyURLaTJnoNl2/ZwSIiaqs+cqWxZad bY/UrFOwxbuO/M3eiSRRA2ymTPp6vYxqfRXnRIq0Q0DGMvpq3qhL2+tIyagxaglPw7mO fc2+HnSt+RF7pC/FyHfKjOYOL3IQ1ixEbYK6Gw2i0+PIxY7oK4kmXIoTfj1HxpZJ85j5 w3/aVtYuvtcc1aiO76NoI7vsstxIhpe3BFfRViapKpgSZ4WJdtOEYF71Qn9SOrrGVTWn 55Od0ny66He0kH7hV/CAgTWp2YOyiZ69s2/1l1JPUMwT9P1/aLEaKOBiq4qp6iBgcfs6 9IrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=saUJiNRMbvLZyMVotP5YuX5FwxQa4tigZr/kaBCa+Io=; b=E5BLUHX3MB68HV2J1iXqr0BabB0EzcSbaObB4ldc1O9foC3EB46CPuWQfOOZ/yELzk PpFpQgyC0wcRopXD9ltLPd6iPwE37oVv1DgjcFIsmFkjjWgKCLBAz84SFR3AZck5W1TR 6N+0WYIDDs6IX7eBJEL0wYos9jrRqlQbMQq4EWobx9KpbS7+0NoRkFAHRTGsaNjyjAir /CnD1teIBoIS2j1IRXo4CKI+a5NdIIEEpzDpoP/P4ndT8s+J5shPD7pLmAYrZflXZUVA EC2bB1bf4Ds0qmFPFSrjVJn7clJg3ZZ2neluF9NkoyD7ey9MjsAe/Zjih4H6vfstqzA2 XjmA== X-Gm-Message-State: AOAM530TvVeG+cdjTD6IFnSrfaoXUZgHYzZroJKanfDBTooniM9/sWf2 F3LUPctz7MM/vhzTht4+4uo= X-Google-Smtp-Source: ABdhPJzxXx1BFjc1KWaI0txpLeQx/KnOb1DN/D+akRYwuwv1Ggv9+kkVmVBuLjNw7rZjDyPaTVd9mg== X-Received: by 2002:a05:620a:c86:: with SMTP id q6mr26855154qki.278.1627475179367; Wed, 28 Jul 2021 05:26:19 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id z9sm2842972qtn.54.2021.07.28.05.26.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 05:26:19 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Peter Geis Subject: [RFC PATCH 2/9] dt-bindings: phy: phy-rockchip-inno-usb2: add rk3568 documentation Date: Wed, 28 Jul 2021 08:25:59 -0400 Message-Id: <20210728122606.697619-3-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728122606.697619-1-pgwipeout@gmail.com> References: <20210728122606.697619-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_052621_664875_0BE3331D X-CRM114-Status: GOOD ( 11.43 ) 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 rk3568 usb2phy node is a standalone node with a single muxed interrupt. Add documentation for it to phy-rockchip-inno-usb2. Signed-off-by: Peter Geis --- .../devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml b/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml index 5bebd86bf8b6..f16fea5cad1c 100644 --- a/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml +++ b/Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.yaml @@ -18,6 +18,7 @@ properties: - rockchip,rk3328-usb2phy - rockchip,rk3366-usb2phy - rockchip,rk3399-usb2phy + - rockchip,rk3568-usb2phy - rockchip,rv1108-usb2phy reg: @@ -50,6 +51,9 @@ properties: description: Phandle to the extcon device providing the cable state for the otg phy. + interrupts: + description: Muxed interrupt for both ports + rockchip,usbgrf: $ref: /schemas/types.yaml#/definitions/phandle description: @@ -78,8 +82,6 @@ properties: required: - "#phy-cells" - - interrupts - - interrupt-names otg-port: type: object @@ -109,8 +111,6 @@ properties: required: - "#phy-cells" - - interrupts - - interrupt-names required: - compatible From patchwork Wed Jul 28 12:26:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12405481 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 5945AC4338F for ; Wed, 28 Jul 2021 12:27:40 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 1F35A60C3E for ; Wed, 28 Jul 2021 12:27:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1F35A60C3E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=Su2IJ22tK4QMOQoT18sgha2+MlU5lGW4ZApfOhWaqMQ=; b=uOiRxYzythypPi w2pn/O62G3nbLRbNY800IV+XQTYraJ42syquuZrFJAOSw0n1YIKVWmXwzJTLk1d/t6R/XXNWdDzQ8 XbkTEDf85HRQ06MWsEIhshBxxQl9siYrBjnrAUO9QIYTY4clf9tkp/urcjaivadvl8inUv9kE/xte hc0CVDBe+2bzpod8LLWblDxwJRR+TdRStkOzlbwGcqlTKActAZznY1ZSq7BiKFtqkqdNLKpSbDauY 0PO9HFLO7EhfMiTgGyRnfHN2PATcebqZ1ffWqr6TEYEFIAvdF/jvz660okVcd1resj2Xk8epd4vv2 xpUADhE6JpO2AKCEMsrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8ieu-000d2W-Hb; Wed, 28 Jul 2021 12:27:36 +0000 Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8idi-000cek-99; Wed, 28 Jul 2021 12:26:23 +0000 Received: by mail-qk1-x72d.google.com with SMTP id c9so1911444qkc.13; Wed, 28 Jul 2021 05:26:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0uGMLBbvQN8srNkNvfT+Pk/8+H4pNrxtnpo3vhHBUd8=; b=gNRzuSOY4nKjngNm7Tvd9GEhb9D25zo/YGvVGrukH8YRQNnbe9rvJuobZUu9KW+Uzw v8Aa9Sw21Apf8PnXKfVJ67Os5VGW+rT2TT8NJGYKiHKNjV94h7VQH1J7Th+6/E4MrWQl +YSHUZ0B93JeFMSdVDPpWWeMKBeO/9dFvQkPX/SzazJAazqYA+aywP1D/KaPiq7m3i2O nuO1O8+O/EmsH4J5hhAofTXEp7OGvHKUTxaJofTpvJ4fxlKhkZuUb3pl9w6JfYT5yaZS C2D1ur9LTdqyPc28wVSag3jKx6KcjFASZ1DLj0eGwkapw6+uNz3k+z3pbD00rFiri498 EGqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0uGMLBbvQN8srNkNvfT+Pk/8+H4pNrxtnpo3vhHBUd8=; b=ZXfMptBAaFEqkS9VbL9vz1GZbVPmDo5hVUxvlsCrpY8A/NR1l7b3AmFqgboJdEycL5 c2ZZ3hnhfqpJzhOj/LiN2icMmRCHT8/XpBzD+iu4JVFBwOIX3Nn+4PTZzutm4iD5rbSQ CLf/Bvci1MABhDfvdgx4foTST3TeUvFwDel3/dp8zSnnSk3ldQIwWPQtI2S8yRPEB4h7 HkDlbuTlvI9Bd9M1HWjSo0WWeJnQO/UJut3hNXr+qy5ozSSfyVCTRKWo5J8Ih3q19rzd OWbLhkcsgnTSVDjatlOUZLpXWA8p4ZXJZIi5GCMkmHHiv0teLmE5IECcrxwI4HLQPw25 mItA== X-Gm-Message-State: AOAM533sq9rBVi8+vwYF5mffuyVeKmEO4OJ4osJEwtKjUdYI2rip0cw1 frKtChuyaYjjFk/IfC31OqQ= X-Google-Smtp-Source: ABdhPJwYGB4iyvpoc8D3mrR5HxybYHOJ0Q1HhDsTfV3Ay9gHOJh3Y3rTnzBm0bWpIYVZZnaWK3Ww1Q== X-Received: by 2002:a37:487:: with SMTP id 129mr26373367qke.154.1627475180131; Wed, 28 Jul 2021 05:26:20 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id z9sm2842972qtn.54.2021.07.28.05.26.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 05:26:19 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Peter Geis Subject: [RFC PATCH 3/9] dt-bindings: usb: generic-ohci: increase maximum clocks Date: Wed, 28 Jul 2021 08:26:00 -0400 Message-Id: <20210728122606.697619-4-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728122606.697619-1-pgwipeout@gmail.com> References: <20210728122606.697619-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_052622_359083_41B46B81 X-CRM114-Status: GOOD ( 12.03 ) 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 rk3568 generic ohci controller has four clocks. Increase the maximum clocks in the documentation to account for this. Signed-off-by: Peter Geis --- Documentation/devicetree/bindings/usb/generic-ohci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/usb/generic-ohci.yaml b/Documentation/devicetree/bindings/usb/generic-ohci.yaml index 569777a76c90..850996e6f451 100644 --- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml +++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml @@ -59,7 +59,7 @@ properties: clocks: minItems: 1 - maxItems: 3 + maxItems: 4 description: | In case the Renesas R-Car Gen3 SoCs: - if a host only channel: first clock should be host. From patchwork Wed Jul 28 12:26:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12405485 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 9CF45C4338F for ; Wed, 28 Jul 2021 12:28:13 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6778760F9C for ; Wed, 28 Jul 2021 12:28:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6778760F9C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=4jtQq9IlMBC1gYIjIeCYdITCc7AigiI328qIQRHh9J4=; b=PhMy0+MXQZHF7O /nhyxKc+8EXOfibOJijcCk2M8CrVRZ2lrvWxt/tqmIyJb1LMzTlQWTyoEAmGYdBF45hiTQhTgcl1Z SCdzZ2Bm5aob4+l9Av1uT5Yd+BIBLPOPI6THyNDAt+D/759F6AyNfbtv7vWmJ/3VDN13DPf95Aw4/ RWqY+lJ2S4J38dnnWBOr8I3vlt1+xsCg2TlzEOy6WCND+XHijeQKkNq1QguOPYCl82fzMaltKvHD2 ToEPtoOAaGcn2ulzCey7m7mwJqhWvTogdCEJ4zUkH3UufhUf+liY6lBk10cyyMvIUpO7L4o1+ovBi VD18L1zyOLFZUQv0rk7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8ifS-000dLy-U4; Wed, 28 Jul 2021 12:28:10 +0000 Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8idi-000cel-24; Wed, 28 Jul 2021 12:26:24 +0000 Received: by mail-qk1-x733.google.com with SMTP id o13so1930316qkk.9; Wed, 28 Jul 2021 05:26:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ggW256M3SIcZiGvGqGuspKz5dguh2TkojKgtWRP6iJo=; b=HSmAocoULMxqdBe+Mx9uXxKQ44OgPTgw7kvx+SHAGhr4/9dAqyMGgpcmq1mRetpVvx CXcABsudaaeuf+JB29+OKe4cn71JOzr3Ecobv/L6PKM1lv99VpS2iqTu0WNLJIZF3SvQ HdUhsMNN/ZiMya2WeSAW18mExVKEBjm9qP7tnO90431gM2s8qLFGRdXWw9ECD0n8Guxa hakJzONVvCpc+18DmsRbv1wdWYX5a0PgRapWfeYj9P6zfdGEFonkIElCOTqvu8+suHp0 0MPAs/Q48yAczoK5GZzCG/TIJBxc0d63gjKAP4Npm/9IUTQ9WJjzza2tY5lkMxqhVMio eBpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ggW256M3SIcZiGvGqGuspKz5dguh2TkojKgtWRP6iJo=; b=S9ROquNpscZ59n8vJ8sdig0LFgTb5Y3YDmqRVwBeaL4N0b3BuslTfC7+J3hOXfMrIZ 9ZBPpqbGz7svRQFWUpTPwhpaaPDYwtI2jMnrdQ13CX5s3Ha5GyJN+wxDj6dxibyEGrT2 kZ1qtcCGMUOmxH3dh8pNH78HJHLHFXqSE38C4nZJz6/9ZrNs9SBm8R3hPK5Pd40OGe+u FGZOZLXKsM1XazMsl3zz3JQpHK7s2LUDIzNXuXCkE5g4RYh4NE6EEYPp0d3daZAvwyVn PqZ628bk64p/nznHNLc2Q8E/3zmgwDszy+uWk7C6o9hxaiAS7l7f4XWqlLfEyukG59Ey xXoA== X-Gm-Message-State: AOAM530ZIlRbKWPNBGKfR+LdaMDUF+o772SXeOerGosgRWa4eI1cgjPd ZnuNdGJr3qcONkvSubsVymc= X-Google-Smtp-Source: ABdhPJwG8Ql+7RxbtSJJqgwHW1eAPquMhI4GLv3UHYkGkUDR486INGiDbWaRkvdgXxBr43JSUT2LaA== X-Received: by 2002:a37:dcc2:: with SMTP id v185mr27461633qki.167.1627475180767; Wed, 28 Jul 2021 05:26:20 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id z9sm2842972qtn.54.2021.07.28.05.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 05:26:20 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Peter Geis Subject: [RFC PATCH 4/9] phy: phy-rockchip-inno-usb2: support #address_cells = 2 Date: Wed, 28 Jul 2021 08:26:01 -0400 Message-Id: <20210728122606.697619-5-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728122606.697619-1-pgwipeout@gmail.com> References: <20210728122606.697619-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_052622_141043_E5EA5340 X-CRM114-Status: GOOD ( 14.54 ) 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 New Rockchip devices have the usb phy nodes as standalone devices. These nodes have register nodes with #address_cells = 2, but only use 32 bit addresses. Adjust the driver to check if the returned address is "0", and adjust the index in that case. Signed-off-by: Peter Geis --- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c index beacac1dd253..5d2916143df7 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c @@ -1098,12 +1098,21 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev) rphy->usbgrf = NULL; } - if (of_property_read_u32(np, "reg", ®)) { + if (of_property_read_u32_index(np, "reg", 0, ®)) { dev_err(dev, "the reg property is not assigned in %pOFn node\n", np); return -EINVAL; } + /* support address_cells=2 */ + if (reg == 0) { + if (of_property_read_u32_index(np, "reg", 1, ®)) { + dev_err(dev, "the reg property is not assigned in %pOFn node\n", + np); + return -EINVAL; + } + } + rphy->dev = dev; phy_cfgs = match->data; rphy->chg_state = USB_CHG_STATE_UNDEFINED; From patchwork Wed Jul 28 12:26:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12405487 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 AACCDC4338F for ; Wed, 28 Jul 2021 12:28:16 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7BE6F60F9C for ; Wed, 28 Jul 2021 12:28:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7BE6F60F9C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=/C71Kc4e5Arg2agMre/YatC3tVJEALM7xJnZYx6s3Ik=; b=BO9UKCcxc/duzt WwWwib+fy8iP3TzddfiJUM1fCBEUwZXsu+2q/TyvOmA5bEXagUOdN+V31X05T6GLtD1jMFY//0BM0 VPO13ba0N4t5VMTdnd4zSo1U75RTgO+9/Fb3Rg2W1Ggw2J5kbcP4NAwD5qexiym29/kkgVzHwbswg dPz6HSbAgU8DfBd8Z9md3hvWXzWq0toD3eIS7rgEIRN9swVuWhzyC02PX52SvKun9HgX33h/RxV3G PUzn1lX6uBqWUTGway1mME/mJsQHrQCNYwHCkkZTiMHPXwkOZ7wurolOKML//lzWmASVnKPwUz+0w W87K7bxcLCQBDy6duHfw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8ifU-000dMf-4E; Wed, 28 Jul 2021 12:28:12 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8idi-000cfa-RP; Wed, 28 Jul 2021 12:26:24 +0000 Received: by mail-qt1-x832.google.com with SMTP id g11so1150994qts.11; Wed, 28 Jul 2021 05:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yXImnqZERav+3w/cyHb8wggYxQXzQW+9n8PpB8P0B2M=; b=nTf1Rh+IBTk37Ypl1bqpBx/ym8f/2c2cD3boqnDXbg49T69of7n1FZDMO2lodZfo+a FKJNsHP0XHimKRL+HQlTOcMoynXQ9O+9daG3gi72aE2zeB6DLbbU9JfsyBgQyxC9VB6f daLU/ljVyIzhnLLbfiJuAcZBXCUx5tVouRLb24L2gqz46/YJ6e7yizBxeBmp5N1+WXn6 5e0AMP9nmpTRllygLdkCHbRhcvDHefqLLp2+jUUQCum5pdeCxrzjOavdKnkqf2kQq6xM /TzWidxzOB7B6Q8oMYlBvLZ6uH0P9VaJGMKCmjefY85M1JWvC/SmORGEvlx4TGkOQnkG WhzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yXImnqZERav+3w/cyHb8wggYxQXzQW+9n8PpB8P0B2M=; b=s6cmXP+1hJ5P5hsWjsTU5Ex+KR9Oo3/wYODBs1xQvOhTSe01hc9bNRclcd0f5vWbhk E8U7ByQQMiCI5vSG1O8z78lg7bX71bQK3FY+wbOeE0eozV7g7CoBuY93siml1jjRM9nX okSLZzERmPOueKu9WGh6n9psOg91inqaqBZAJFQb28rid6tcUaPXdGBjUBfmz6vEI0+i h2a4Vu9HixU9CV4L6tZ3O4Qr+SJfednCAEXZrMd2iU4EKcp/TOVLQJ6IPDS8cGAu9EYR 3KRTh311wZz0fs5DgVHL7UdSAdNGX46U7yEl6fw5vxdnpaq0NkqkCCd9URjanWwnOkGZ pW5Q== X-Gm-Message-State: AOAM531XGXuDVo7VgR8AxFof1oKBRtjkkWeu8CnSXlJJqUS2cioMRXcC 9OqlBz8f/v597YUOqejM3Qs= X-Google-Smtp-Source: ABdhPJyWW6C88y7pL6cKMtwywRISt6YmNQd6o2KFh32MLgLwlTNoYrvvX7m/LDxvsGY6ke0R8rGdzg== X-Received: by 2002:ac8:5210:: with SMTP id r16mr16895190qtn.344.1627475181525; Wed, 28 Jul 2021 05:26:21 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id z9sm2842972qtn.54.2021.07.28.05.26.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 05:26:21 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Peter Geis Subject: [RFC PATCH 5/9] phy: phy-rockchip-inno-usb2: support standalone phy nodes Date: Wed, 28 Jul 2021 08:26:02 -0400 Message-Id: <20210728122606.697619-6-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728122606.697619-1-pgwipeout@gmail.com> References: <20210728122606.697619-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_052622_969431_867D7C01 X-CRM114-Status: GOOD ( 13.32 ) 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 New Rockchip devices have the usb2 phy devices as standalone nodes instead of children of the grf node. Allow the driver to find the grf node from a phandle. Signed-off-by: Peter Geis --- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c index 5d2916143df7..84a0c1d697da 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c @@ -1081,12 +1081,19 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev) return -EINVAL; } - if (!dev->parent || !dev->parent->of_node) - return -EINVAL; + if (!dev->parent || !dev->parent->of_node) { + rphy->grf = syscon_regmap_lookup_by_phandle(np, "rockchip,usbgrf"); + if (IS_ERR(rphy->grf)) { + dev_err(dev, "failed to locate usbgrf\n"); + return PTR_ERR(rphy->grf); + } + } - rphy->grf = syscon_node_to_regmap(dev->parent->of_node); - if (IS_ERR(rphy->grf)) - return PTR_ERR(rphy->grf); + else { + rphy->grf = syscon_node_to_regmap(dev->parent->of_node); + if (IS_ERR(rphy->grf)) + return PTR_ERR(rphy->grf); + } if (of_device_is_compatible(np, "rockchip,rv1108-usb2phy")) { rphy->usbgrf = From patchwork Wed Jul 28 12:26:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12405489 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 A3469C432BE for ; Wed, 28 Jul 2021 12:28:52 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 682ED60C3E for ; Wed, 28 Jul 2021 12:28:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 682ED60C3E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=iR0VZf5g+N16aQgghVQogmd3WyN9mX1EqpraMep1TAc=; b=gFbXfd2G2URxN8 Qp6LOg69aBKx17+wcgv9IIe5dIYdBB+WzdWvIPYCVqRMHWjpFgGWmB6B3j88C5f+qWGUKvVzLq4ap DNZiGvbX2QXyPikqLYiCFBpRjWaHzWW5eTNp8caXZirCm7utN27XlDAUYe/XkpAQGc0z88//lkZLX PkVOK11hzFUfK/Ntw53Jn8mssk5Q7vL+ZYIJXzoBdLC2g/40HScCUdpdFFMciqT15bEkrTQMf/0Jb 2BJ9Qe1SvvRrmuHy0Cc5Ct56Xm38C3yiQhq2VQyrhTENHP/2VxNWLSnP6uCSl4lkSXNTx7UAi0MkM 21+JsWCHHRWUaAHTlwog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8ig5-000dii-6h; Wed, 28 Jul 2021 12:28:49 +0000 Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8idj-000cg7-0F; Wed, 28 Jul 2021 12:26:25 +0000 Received: by mail-qk1-x733.google.com with SMTP id t66so2010306qkb.0; Wed, 28 Jul 2021 05:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sLsXOi/Vd6SWXJJX1GfqgWGuuId516J+Mh4hAEOUuFE=; b=a1N/dN4xR1XWNZDY/J2oCSI8VOFv6WyuuZc6bd9tByJFeMuPk0nLuph02ZsMRNmMJC As6MIuOfMHuoG0kLAqb6PTZlB2YOvprxnCe+oDd+q+XQjpsG3hIDiWuD9FfheeSzFq3L Y8+G/fpEK8FoWd2xyuRF9MqPMEP4Nc3L6MqOnHfLDvpi32dktXWmMZYG/QoP4GWtIiae F8x+hDSyPNgVx+xyg6VofwIXouKi9v8bqj6koUXSQTfTl/PyA0TtoHa/huwPqJsGw+CK 5afMnDrgcQxrFbqa6hew93JQHPmUVx1C+YVBeBeTpqtMH453Gq0tZm5BAYk12HEb1sXl 3YVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sLsXOi/Vd6SWXJJX1GfqgWGuuId516J+Mh4hAEOUuFE=; b=uW7Ogktf6uCALsieN8TcbJCVKFUQcMpo4QjH6qsAWJavSS5GC0+ujly2y0Lvd4sB1/ Q5SEllcCOmxkADmulca19hNO8QoLx50jIYp6B44THlvJsJj+M/u1GbgOTPrI0aqB3RG0 5Dxj+oxWAM69qfV7nPIxODUesG0CTH1EeRmzp+FgO8r7O+WrvNHDNv2ZB3gbtVtmkd1e T/QC2JhKCrX+mHzBHJbcwXq4xcCIXcbB15ohiMLG55nc9hvYq5EYVhf8Z5BYIysh/Ck8 yUjKcRdJ8PX31BSx2BziRUT1qjbkO2LU++Y594NPyvgIwIbhUnzi2NDaXeb83epLWgEq mrHA== X-Gm-Message-State: AOAM530w4Izf63wfcd/ZAzsF1oS9njZOuMb/AaAzC7t0362ha3doU7T5 KRpkNxgMrr07qwlZaRwPPVY= X-Google-Smtp-Source: ABdhPJzguoTTyVVCd2JnPZcYbW8796g1C5ngdVomfVwumL+wn6oZIGKb9Nkd0LNxQXyhLUJvIjQQEw== X-Received: by 2002:a37:40c2:: with SMTP id n185mr9799919qka.50.1627475182223; Wed, 28 Jul 2021 05:26:22 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id z9sm2842972qtn.54.2021.07.28.05.26.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 05:26:21 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Peter Geis Subject: [RFC PATCH 6/9] phy: phy-rockchip-inno-usb2: support muxed interrupts Date: Wed, 28 Jul 2021 08:26:03 -0400 Message-Id: <20210728122606.697619-7-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728122606.697619-1-pgwipeout@gmail.com> References: <20210728122606.697619-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_052623_120522_168A7C17 X-CRM114-Status: GOOD ( 22.23 ) 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 rk3568 usb2phy has a single muxed interrupt that handles all interrupts. Allow the driver to plug in only a single interrupt as necessary. This currently only supports the host configuration for the new phy. Signed-off-by: Peter Geis --- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 168 +++++++++++++----- 1 file changed, 119 insertions(+), 49 deletions(-) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c index 84a0c1d697da..fdeb2e7c937a 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c @@ -204,6 +204,7 @@ struct rockchip_usb2phy_port { * @dcd_retries: The retry count used to track Data contact * detection process. * @edev: extcon device for notification registration + * @irq: muxed interrupt for single irq configuration * @phy_cfg: phy register configuration, assigned by driver data. * @ports: phy port instance. */ @@ -218,6 +219,7 @@ struct rockchip_usb2phy { enum power_supply_type chg_type; u8 dcd_retries; struct extcon_dev *edev; + int irq; const struct rockchip_usb2phy_cfg *phy_cfg; struct rockchip_usb2phy_port ports[USB2PHY_NUM_PORTS]; }; @@ -934,6 +936,102 @@ static irqreturn_t rockchip_usb2phy_otg_mux_irq(int irq, void *data) return IRQ_NONE; } +static irqreturn_t rockchip_usb2phy_irq(int irq, void *data) +{ + struct rockchip_usb2phy *rphy = data; + struct rockchip_usb2phy_port *rport; + irqreturn_t ret = IRQ_NONE; + unsigned int index; + + for (index = 0; index < rphy->phy_cfg->num_ports; index++) { + rport = &rphy->ports[index]; + if (!rport->phy) + continue; + + /* Handle linestate irq for both otg port and host port */ + ret = rockchip_usb2phy_linestate_irq(irq, rport); + } + + return ret; +} + +static int rockchip_usb2phy_port_irq_init(struct rockchip_usb2phy *rphy, + struct rockchip_usb2phy_port *rport, + struct device_node *child_np) +{ + int ret; + + /* + * If the usb2 phy used combined irq for otg and host port, + * don't need to init otg and host port irq separately. + */ + if (rphy->irq > 0) + return 0; + + switch (rport->port_id) { + case USB2PHY_PORT_HOST: + rport->ls_irq = of_irq_get_byname(child_np, "linestate"); + if (rport->ls_irq < 0) { + dev_err(rphy->dev, "no linestate irq provided\n"); + return rport->ls_irq; + } + + ret = devm_request_threaded_irq(rphy->dev, rport->ls_irq, NULL, + rockchip_usb2phy_linestate_irq, + IRQF_ONESHOT, + "rockchip_usb2phy", rport); + if (ret) { + dev_err(rphy->dev, "failed to request linestate irq handle\n"); + return ret; + } + break; + case USB2PHY_PORT_OTG: + /* + * Some SoCs use one interrupt with otg-id/otg-bvalid/linestate + * interrupts muxed together, so probe the otg-mux interrupt first, + * if not found, then look for the regular interrupts one by one. + */ + rport->otg_mux_irq = of_irq_get_byname(child_np, "otg-mux"); + if (rport->otg_mux_irq > 0) { + ret = devm_request_threaded_irq(rphy->dev, rport->otg_mux_irq, + NULL, + rockchip_usb2phy_otg_mux_irq, + IRQF_ONESHOT, + "rockchip_usb2phy_otg", + rport); + if (ret) { + dev_err(rphy->dev, + "failed to request otg-mux irq handle\n"); + return ret; + } + } else { + rport->bvalid_irq = of_irq_get_byname(child_np, "otg-bvalid"); + if (rport->bvalid_irq < 0) { + dev_err(rphy->dev, "no vbus valid irq provided\n"); + ret = rport->bvalid_irq; + return ret; + } + + ret = devm_request_threaded_irq(rphy->dev, rport->bvalid_irq, + NULL, + rockchip_usb2phy_bvalid_irq, + IRQF_ONESHOT, + "rockchip_usb2phy_bvalid", + rport); + if (ret) { + dev_err(rphy->dev, + "failed to request otg-bvalid irq handle\n"); + return ret; + } + } + break; + default: + return -EINVAL; + } + + return 0; +} + static int rockchip_usb2phy_host_port_init(struct rockchip_usb2phy *rphy, struct rockchip_usb2phy_port *rport, struct device_node *child_np) @@ -947,18 +1045,9 @@ static int rockchip_usb2phy_host_port_init(struct rockchip_usb2phy *rphy, mutex_init(&rport->mutex); INIT_DELAYED_WORK(&rport->sm_work, rockchip_usb2phy_sm_work); - rport->ls_irq = of_irq_get_byname(child_np, "linestate"); - if (rport->ls_irq < 0) { - dev_err(rphy->dev, "no linestate irq provided\n"); - return rport->ls_irq; - } - - ret = devm_request_threaded_irq(rphy->dev, rport->ls_irq, NULL, - rockchip_usb2phy_linestate_irq, - IRQF_ONESHOT, - "rockchip_usb2phy", rport); + ret = rockchip_usb2phy_port_irq_init(rphy, rport, child_np); if (ret) { - dev_err(rphy->dev, "failed to request linestate irq handle\n"); + dev_err(rphy->dev, "failed to setup host irq\n"); return ret; } @@ -1007,44 +1096,10 @@ static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy, INIT_DELAYED_WORK(&rport->chg_work, rockchip_chg_detect_work); INIT_DELAYED_WORK(&rport->otg_sm_work, rockchip_usb2phy_otg_sm_work); - /* - * Some SoCs use one interrupt with otg-id/otg-bvalid/linestate - * interrupts muxed together, so probe the otg-mux interrupt first, - * if not found, then look for the regular interrupts one by one. - */ - rport->otg_mux_irq = of_irq_get_byname(child_np, "otg-mux"); - if (rport->otg_mux_irq > 0) { - ret = devm_request_threaded_irq(rphy->dev, rport->otg_mux_irq, - NULL, - rockchip_usb2phy_otg_mux_irq, - IRQF_ONESHOT, - "rockchip_usb2phy_otg", - rport); - if (ret) { - dev_err(rphy->dev, - "failed to request otg-mux irq handle\n"); - goto out; - } - } else { - rport->bvalid_irq = of_irq_get_byname(child_np, "otg-bvalid"); - if (rport->bvalid_irq < 0) { - dev_err(rphy->dev, "no vbus valid irq provided\n"); - ret = rport->bvalid_irq; - goto out; - } - - ret = devm_request_threaded_irq(rphy->dev, rport->bvalid_irq, - NULL, - rockchip_usb2phy_bvalid_irq, - IRQF_ONESHOT, - "rockchip_usb2phy_bvalid", - rport); - if (ret) { - dev_err(rphy->dev, - "failed to request otg-bvalid irq handle\n"); - goto out; - } - } + ret = rockchip_usb2phy_port_irq_init(rphy, rport, child_np); + if (ret) { + dev_err(rphy->dev, "failed to init irq for host port\n"); + goto out; if (!IS_ERR(rphy->edev)) { rport->event_nb.notifier_call = rockchip_otg_event; @@ -1124,6 +1179,7 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev) phy_cfgs = match->data; rphy->chg_state = USB_CHG_STATE_UNDEFINED; rphy->chg_type = POWER_SUPPLY_TYPE_UNKNOWN; + rphy->irq = platform_get_irq(pdev, 0); platform_set_drvdata(pdev, rphy); ret = rockchip_usb2phy_extcon_register(rphy); @@ -1201,6 +1257,20 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev) } provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); + + if (rphy->irq > 0) { + ret = devm_request_threaded_irq(rphy->dev, rphy->irq, NULL, + rockchip_usb2phy_irq, + IRQF_ONESHOT, + "rockchip_usb2phy", + rphy); + if (ret) { + dev_err(rphy->dev, + "failed to request usb2phy irq handle\n"); + goto put_child; + } + } + return PTR_ERR_OR_ZERO(provider); put_child: From patchwork Wed Jul 28 12:26:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12405491 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 D3B11C4320A for ; Wed, 28 Jul 2021 12:29:41 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A8B5D60F9C for ; Wed, 28 Jul 2021 12:29:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A8B5D60F9C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=kQWuB5rWwCYzE/lvGHL5jlEhegxC+2Bnhxi1v5F4Fd0=; b=bUUow7YxPi10Ti giHnFvhErggYyGpCUv2DBCd/kskzyWe/m2DbF7RSn+dAiA7AZGQlb1KKtWdiM/gvtYOjLYA+hlEdZ fTH6NIUL1Wlzxsz+1Je3T9rN5TqAv4eFlUDvzGsUkcKm/yaaeL32/Nit4O/I65ns2hOEEPA0h9w8Z b7lw/dHnWaM/JPvXfbDBISmMVMPJYYnEFTnKKPbYoWCAp6etXKGkNRYS4BpqUYIIvoioQJzmoRMNG q9Ead+Wgj1Tch4ryjnQMiBsRRU3OVn55nqYUV3OGBIqXhTu34BJdI3IBqcBUvT7gXN1f+B9iPyozU aLrHv4vEIoHLwKKBzGAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8igs-000e9F-HJ; Wed, 28 Jul 2021 12:29:38 +0000 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8idk-000cgw-FX; Wed, 28 Jul 2021 12:26:26 +0000 Received: by mail-qv1-xf33.google.com with SMTP id g6so1386834qvj.8; Wed, 28 Jul 2021 05:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4fH6A/BcmiXnSJNIz36CupSiUjhhUBPUWUzzeHlruOE=; b=JSpRYJD3Xeg1OyyvcOBaRRAySh9dHFQ+LDF8TSLOCuQCkUAdVhut5t7Irx/fbJsdmf t8zJHrKzFbEPZqAYwX2oTFXMnBCi11S/SVlNZxqXSiGdCeBrSDMwvfEY6tMsG3mFvKOJ R00UIScGLqQU/50cCqzaM4k0VvpA0c4aminIhDp+CRIXUgH8jdNSrJxrkV0vB6gGPMvy /+j8eJVer672MKIOt+6kjdfUB7TQqJkiJdWk4iy39B2yJiiun6nGENDwXSU/FPc1hSN7 2d9lvxvUijKClXt2jafEQ6bcR2uKmq//N/73J2kyOkK0QFXNah/EgybglOQ9wlb3y7zq kysQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4fH6A/BcmiXnSJNIz36CupSiUjhhUBPUWUzzeHlruOE=; b=tVNxDLcdh6Mnvq/6jdDMFltSZ8rj7evFu2vOnvlKqVRRVEBtcEDXqAfTWwfhQLhC2+ c5PC6REjNUSMKjkTEgryc5vGF4J8M/VYYizW5T37WyEwzItmXUUHImZGJ086lkKnn3Qv Q3wSGHbktCMBqP9CDuEKuspR00TSaK2fhX4/hlcmxQbHKymvaHZOUSs/gZmNcwgfZSla sh3pvl2i/G+h+/sxg920NQyjH622cCAQn34PfufHJSxOfNx+guHHwnxaIajRI9L0Ni6M ylxcA7KHpvcsQbOFNN44MOB8lufj89UAQa/D8rVwwi2fud5hsQcDdKHHKrc+ikoAn0sG aiig== X-Gm-Message-State: AOAM532ML1MqshqzOOKdx+vApiDHDA3MJiFuRxVjQgcpp78hlHCKMHf2 ple3miy6NhcIyT3pEQHD+wk= X-Google-Smtp-Source: ABdhPJxpFSDaJnDvXsK7PrU6zN/HgHLCfwmJN99VDxwvD9uv4fJKdCBhpQzD4KStC9OelKZ8BhyDXg== X-Received: by 2002:a05:6214:1d2e:: with SMTP id f14mr1841834qvd.17.1627475182901; Wed, 28 Jul 2021 05:26:22 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id z9sm2842972qtn.54.2021.07.28.05.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 05:26:22 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Peter Geis Subject: [RFC PATCH 7/9] phy: phy-rockchip-inno-usb2: add rk3568 support Date: Wed, 28 Jul 2021 08:26:04 -0400 Message-Id: <20210728122606.697619-8-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728122606.697619-1-pgwipeout@gmail.com> References: <20210728122606.697619-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_052624_594579_979D541C X-CRM114-Status: GOOD ( 13.96 ) 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 rk3568 usb2phy is a standalone device with a single muxed interrupt. Add support for the registers to the usb2phy driver. Signed-off-by: Peter Geis --- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c index fdeb2e7c937a..74420c439a07 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c @@ -1100,6 +1100,7 @@ static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy, if (ret) { dev_err(rphy->dev, "failed to init irq for host port\n"); goto out; + } if (!IS_ERR(rphy->edev)) { rport->event_nb.notifier_call = rockchip_otg_event; @@ -1509,6 +1510,69 @@ static const struct rockchip_usb2phy_cfg rk3399_phy_cfgs[] = { { /* sentinel */ } }; +static const struct rockchip_usb2phy_cfg rk3568_phy_cfgs[] = { + { + .reg = 0xfe8a0000, + .num_ports = 2, + .clkout_ctl = { 0x0008, 4, 4, 1, 0 }, + .port_cfgs = { + [USB2PHY_PORT_OTG] = { + .phy_sus = { 0x0000, 8, 0, 0, 0x1d1 }, + .bvalid_det_en = { 0x0080, 2, 2, 0, 1 }, + .bvalid_det_st = { 0x0084, 2, 2, 0, 1 }, + .bvalid_det_clr = { 0x0088, 2, 2, 0, 1 }, + .utmi_avalid = { 0x00c0, 10, 10, 0, 1 }, + .utmi_bvalid = { 0x00c0, 9, 9, 0, 1 }, + }, + [USB2PHY_PORT_HOST] = { + /* Select suspend control from controller */ + .phy_sus = { 0x0004, 8, 0, 0x1d2, 0x1d2 }, + .ls_det_en = { 0x0080, 1, 1, 0, 1 }, + .ls_det_st = { 0x0084, 1, 1, 0, 1 }, + .ls_det_clr = { 0x0088, 1, 1, 0, 1 }, + .utmi_ls = { 0x00c0, 17, 16, 0, 1 }, + .utmi_hstdet = { 0x00c0, 19, 19, 0, 1 } + } + }, + .chg_det = { + .opmode = { 0x0000, 3, 0, 5, 1 }, + .cp_det = { 0x00c0, 24, 24, 0, 1 }, + .dcp_det = { 0x00c0, 23, 23, 0, 1 }, + .dp_det = { 0x00c0, 25, 25, 0, 1 }, + .idm_sink_en = { 0x0008, 8, 8, 0, 1 }, + .idp_sink_en = { 0x0008, 7, 7, 0, 1 }, + .idp_src_en = { 0x0008, 9, 9, 0, 1 }, + .rdm_pdwn_en = { 0x0008, 10, 10, 0, 1 }, + .vdm_src_en = { 0x0008, 12, 12, 0, 1 }, + .vdp_src_en = { 0x0008, 11, 11, 0, 1 }, + }, + }, + { + .reg = 0xfe8b0000, + .num_ports = 2, + .clkout_ctl = { 0x0008, 4, 4, 1, 0 }, + .port_cfgs = { + [USB2PHY_PORT_OTG] = { + .phy_sus = { 0x0000, 8, 0, 0x1d2, 0x1d1 }, + .ls_det_en = { 0x0080, 0, 0, 0, 1 }, + .ls_det_st = { 0x0084, 0, 0, 0, 1 }, + .ls_det_clr = { 0x0088, 0, 0, 0, 1 }, + .utmi_ls = { 0x00c0, 5, 4, 0, 1 }, + .utmi_hstdet = { 0x00c0, 7, 7, 0, 1 } + }, + [USB2PHY_PORT_HOST] = { + .phy_sus = { 0x0004, 8, 0, 0x1d2, 0x1d1 }, + .ls_det_en = { 0x0080, 1, 1, 0, 1 }, + .ls_det_st = { 0x0084, 1, 1, 0, 1 }, + .ls_det_clr = { 0x0088, 1, 1, 0, 1 }, + .utmi_ls = { 0x00c0, 17, 16, 0, 1 }, + .utmi_hstdet = { 0x00c0, 19, 19, 0, 1 } + } + }, + }, + { /* sentinel */ } +}; + static const struct rockchip_usb2phy_cfg rv1108_phy_cfgs[] = { { .reg = 0x100, @@ -1558,6 +1622,7 @@ static const struct of_device_id rockchip_usb2phy_dt_match[] = { { .compatible = "rockchip,rk3328-usb2phy", .data = &rk3328_phy_cfgs }, { .compatible = "rockchip,rk3366-usb2phy", .data = &rk3366_phy_cfgs }, { .compatible = "rockchip,rk3399-usb2phy", .data = &rk3399_phy_cfgs }, + { .compatible = "rockchip,rk3568-usb2phy", .data = &rk3568_phy_cfgs }, { .compatible = "rockchip,rv1108-usb2phy", .data = &rv1108_phy_cfgs }, {} }; From patchwork Wed Jul 28 12:26:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12405527 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 BCCF8C432BE for ; Wed, 28 Jul 2021 12:30:26 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8D22C60C3E for ; Wed, 28 Jul 2021 12:30:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8D22C60C3E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=7O5eTWVocKx5FBmXvikYN6paDwV30V1r1TsLUVWYIjo=; b=s631hmuS5Zsbfb eTw8mXTfTDjNVDnhSt1fdJ70J0UF3vXRXZcKN5ZNX+UYZYhPGNJxygzQZq3Whg2RGrS2b4y+ca7fr 32H2DI+7LUWIqcGUHxM0at++mSb6eSo1VsBXBzhIen1mqAVYfT2tkm7BKXKyFV754+NfLDrAcClzT XHrxc+b3psiWKj31QruALK6MZ0izyOmS4V/1Dowyslt91LKPHIeisWjLUFzNtVKfI5Sp+ZVB2+jmC 0zimSHGIWNmMp0ZKMEVBcY+qOiKpvN9xexW/+ULJ+UNpCLkxO2v3a1yVZ5H0ssQyywB454ad8FnrK edNA7d88aK8bjVZpKShQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8ihb-000eWs-5y; Wed, 28 Jul 2021 12:30:23 +0000 Received: from mail-qk1-x732.google.com ([2607:f8b0:4864:20::732]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8idl-000chH-65; Wed, 28 Jul 2021 12:26:26 +0000 Received: by mail-qk1-x732.google.com with SMTP id az7so1955238qkb.5; Wed, 28 Jul 2021 05:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4uH698onlFb0zdOqNkiqHo9urf543v0Pr1mp3r+HBGM=; b=rIvE0rGozi1TOAqnrNqWmFKUQewYXNoEvkddzcR1KvaBj5AsmfR0SlhyLFeBQoiWM8 XG5du8LWProFfKYgrgLhb1apwVLfl6+hGDApfA1A834L84OMAEilyisnYHmEHZaeFEQ9 qad6GjjjA42xyAIAzuZtzFwFEACzEGxfXfzl5SS9mfv+XxawFMk3sY0D2iW1h4lDzsDj qJOP4XlI1d67FiD9ivMrL5RP8pC5JNTpOEXgQklF19eOtpJ+4bA5A3i0wuNVKjEfW3dS RdP5nR+d3NkIhTDpl2xiP2mH08Z5u6MVPidhQ56l7SVTeNsgOIHWnrP59muOeTS9ujaM uYwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4uH698onlFb0zdOqNkiqHo9urf543v0Pr1mp3r+HBGM=; b=Tdp8PBVDopwvXkIxDyKhCINcKj2w12r4Kpn4TrF7NLTJ/zESHtMdk7hQHipxfgelCw LzfRTbLNYKHSjb0uCkEVeH6/C76aGGPSOB7cjnxBhoXF/k3pg9LWd1QUvj2GR2v4HTv1 mlNwT5iCIZfN4L8FC2sa8jUsgrr4FMEe5rad+NruvO54nxi6tecDRQVpTHzFyaolKW2n PdZkHGy8PZYiz1ms7hwNXj+jUJm1qPSOrK8nLm+sL/6jstMe7Xsr6zpGnQdyPedJvrlQ pHMn3grvRWGEeHM5yfn6pRAfy+u/Veqtw9GNR2/Q0F3uk5ZfgoVTRG+BSMJ/mXO+sxip a8/A== X-Gm-Message-State: AOAM531HIvbSmkyVRFM1sry0DDrPMGbrvqds4IJLWRY+Xr4lrdCK6XkZ kYQoib/WXnTBGeu3u3DVsVlUPpezv3m7Vbuj X-Google-Smtp-Source: ABdhPJxZkroOt8pi1Kf/X5/MO0H5rMQygepNgso+s1+n4QSswvJKlg5/LcDcgNIUHovgsjbXK1xLZw== X-Received: by 2002:a05:620a:629:: with SMTP id 9mr26258526qkv.501.1627475183679; Wed, 28 Jul 2021 05:26:23 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id z9sm2842972qtn.54.2021.07.28.05.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 05:26:23 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Peter Geis Subject: [RFC PATCH 8/9] arm64: dts: rockchip: add usb2 nodes to rk3568 device tree Date: Wed, 28 Jul 2021 08:26:05 -0400 Message-Id: <20210728122606.697619-9-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728122606.697619-1-pgwipeout@gmail.com> References: <20210728122606.697619-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_052625_308712_6E6A6B0B X-CRM114-Status: GOOD ( 10.92 ) 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 requisite nodes to the rk3568 device tree to enable the usb2 device controllers. Includes the usb2phy nodes, usb2phy grf nodes, and usb2 controller nodes. Signed-off-by: Peter Geis --- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 97 ++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index 322971318d5a..ea254a58fc01 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -200,6 +200,50 @@ gic: interrupt-controller@fd400000 { msi-controller; }; + usb_host0_ehci: usb@fd800000 { + compatible = "generic-ehci"; + reg = <0x0 0xfd800000 0x0 0x40000>; + interrupts = ; + clocks = <&cru HCLK_USB2HOST0>, <&cru HCLK_USB2HOST0_ARB>, + <&cru PCLK_USB>, <&usb2phy1>; + phys = <&u2phy1_otg>; + phy-names = "usb"; + status = "disabled"; + }; + + usb_host0_ohci: usb@fd840000 { + compatible = "generic-ohci"; + reg = <0x0 0xfd840000 0x0 0x40000>; + interrupts = ; + clocks = <&cru HCLK_USB2HOST0>, <&cru HCLK_USB2HOST0_ARB>, + <&cru PCLK_USB>, <&usb2phy1>; + phys = <&u2phy1_otg>; + phy-names = "usb"; + status = "disabled"; + }; + + usb_host1_ehci: usb@fd880000 { + compatible = "generic-ehci"; + reg = <0x0 0xfd880000 0x0 0x40000>; + interrupts = ; + clocks = <&cru HCLK_USB2HOST1>, <&cru HCLK_USB2HOST1_ARB>, + <&cru PCLK_USB>, <&usb2phy1>; + phys = <&u2phy1_host>; + phy-names = "usb"; + status = "disabled"; + }; + + usb_host1_ohci: usb@fd8c0000 { + compatible = "generic-ohci"; + reg = <0x0 0xfd8c0000 0x0 0x40000>; + interrupts = ; + clocks = <&cru HCLK_USB2HOST1>, <&cru HCLK_USB2HOST1_ARB>, + <&cru PCLK_USB>, <&usb2phy1>; + phys = <&u2phy1_host>; + phy-names = "usb"; + status = "disabled"; + }; + pmugrf: syscon@fdc20000 { compatible = "rockchip,rk3568-pmugrf", "syscon", "simple-mfd"; reg = <0x0 0xfdc20000 0x0 0x10000>; @@ -210,6 +254,16 @@ grf: syscon@fdc60000 { reg = <0x0 0xfdc60000 0x0 0x10000>; }; + usb2phy0_grf: syscon@fdca0000 { + compatible = "rockchip,rk3568-usb2phy-grf", "syscon"; + reg = <0x0 0xfdca0000 0x0 0x8000>; + }; + + usb2phy1_grf: syscon@fdca8000 { + compatible = "rockchip,rk3568-usb2phy-grf", "syscon"; + reg = <0x0 0xfdca8000 0x0 0x8000>; + }; + pmucru: clock-controller@fdd00000 { compatible = "rockchip,rk3568-pmucru"; reg = <0x0 0xfdd00000 0x0 0x1000>; @@ -738,6 +792,49 @@ saradc: saradc@fe720000 { status = "disabled"; }; + usb2phy0: usb2-phy@fe8a0000 { + compatible = "rockchip,rk3568-usb2phy"; + reg = <0x0 0xfe8a0000 0x0 0x10000>; + clocks = <&pmucru CLK_USBPHY0_REF>; + clock-names = "phyclk"; + #clock-cells = <0>; + clock-output-names = "usb480m_phy"; + interrupts = ; + rockchip,usbgrf = <&usb2phy0_grf>; + status = "disabled"; + + u2phy0_host: host-port { + #phy-cells = <0>; + status = "disabled"; + }; + + u2phy0_otg: otg-port { + #phy-cells = <0>; + status = "disabled"; + }; + }; + + usb2phy1: usb2-phy@fe8b0000 { + compatible = "rockchip,rk3568-usb2phy"; + reg = <0x0 0xfe8b0000 0x0 0x10000>; + clocks = <&pmucru CLK_USBPHY1_REF>; + clock-names = "phyclk"; + #clock-cells = <0>; + interrupts = ; + rockchip,usbgrf = <&usb2phy1_grf>; + status = "disabled"; + + u2phy1_host: host-port { + #phy-cells = <0>; + status = "disabled"; + }; + + u2phy1_otg: otg-port { + #phy-cells = <0>; + status = "disabled"; + }; + }; + pinctrl: pinctrl { compatible = "rockchip,rk3568-pinctrl"; rockchip,grf = <&grf>; From patchwork Wed Jul 28 12:26:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12405529 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 93D53C432BE for ; Wed, 28 Jul 2021 12:31:10 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 62F1B60F9D for ; Wed, 28 Jul 2021 12:31:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 62F1B60F9D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=1Te7s78S6NBSrpUJXlAqw5Yu20mPJtToi1PYpz4Pzc8=; b=npieNOASnbbJ/J NVpEjPfvCZHysGb0rOnLxgHr9RM9ahqCHBCIZF41/Rl+4tAFGC3FBd7XVkxMjZzkcY75aypjLGA9c 87hLVcMLj2mIh1J2sWcqeaOfRPDu3FEf7/GEytNo3GeZEV+eBNyiQ+QPr5wsDt0LZJz7mBFfIOHVL GgMsoFo65f6Wc9SuirDdCQizag7Q3iKd8R8F4YXC1nQlUtnhChIKvKAGItQEpg09yU8r16zap+WR1 qRVRKas3OfpnTYFzCCAHB+FRSxQ6cKTZgcBQRwOOxHkHu5MREl96IGVwBemln0OmyvJhn6E05FAoU hFaFU2VZifg5z76EhMlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8iiJ-000esX-13; Wed, 28 Jul 2021 12:31:07 +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 1m8idm-000chy-0S; Wed, 28 Jul 2021 12:26:27 +0000 Received: by mail-qt1-x831.google.com with SMTP id m11so1161450qtx.7; Wed, 28 Jul 2021 05:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0vSamTyccptzOdkOr+v7GJn23T5SHRt0Wd7iQnG52jY=; b=NXvdypyXEa4o9r6QNCKGCY4jqgUM7FwQyguNMcp5lkIjpGB+WdZ7BFx1c/u3pIKVql xZ7WfbEzGHcLBeot5u0VCUkU5Xiz8M48dtv0Y8s72CnAs0Bbk4XmyyTY7d1TYUwCG9y7 jM9H8cynwnhtPLV5Iwk43QGh3VhSprSNKbi9f0CnLGJWoqplCV+PE4jm9VtYBqFWvA/l s/tveoUnL3gPAMnQUmt8k2Ym8/EJDJuHj9g45pxqRNQB6kqhYQ53F/WXTIHiTXbKQ4cF nwBhsYqwwxjTEhok3iIavyRoN1cXChF43DJ32V98m+qcUfsCT6RMv88RILDJT/uYiH8Z DXbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0vSamTyccptzOdkOr+v7GJn23T5SHRt0Wd7iQnG52jY=; b=KZLl8HrXRl+3WBHaHcFEYSDktFvIHBkRYaT0HdgmFxkBKcUHpdIs/ipJMjwWLms3An vZOja9s5r0rFabkjgm4wX8IZ/OSh4HaDHzNYkLUFlAk/ZwYHKq3VEuvcNIjF0X7fTNzp x6feaxC9PF8URAW+AYYGl3y6gqAAljP08+UUhVIwFatbKA2wss0+tqVQTtTgCWJuFu5X tPpurvflAuU5LwWdBHsvnBaJfJsK18jaNNCkJtLO6FPI0TJiKOXFMuLf5KNnlOCOasc4 I00GIIlwJDzkqfeWAqMTgbbNrwns/lBItuyifzwASEEbcWhqu0CCpxqnpgBjFFMzTkup 2n8g== X-Gm-Message-State: AOAM5310E86tQY6+RwzHEnkoKouhM+ybHwJcn4bqr7jHsd6f+xY9d+ya StftR8aur5rU5ZuU63lxsQw= X-Google-Smtp-Source: ABdhPJxEuwWpP6uwmOX2Y1/LpA8rCmWMqjso4HcdRbyYswOjdhURfWXgD7MdS+rY/ropyBbaKmfl1A== X-Received: by 2002:ac8:424b:: with SMTP id r11mr24146675qtm.188.1627475184575; Wed, 28 Jul 2021 05:26:24 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id z9sm2842972qtn.54.2021.07.28.05.26.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 05:26:24 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner , Kishon Vijay Abraham I , Vinod Koul Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, Peter Geis Subject: [RFC PATCH 9/9] arm64: dts: rockchip: add Quartz64-A usb2 support Date: Wed, 28 Jul 2021 08:26:06 -0400 Message-Id: <20210728122606.697619-10-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728122606.697619-1-pgwipeout@gmail.com> References: <20210728122606.697619-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_052626_105295_3CB9CB4C X-CRM114-Status: GOOD ( 12.02 ) 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 nodes and regulators to enable usb2 support on the Quartz64 Model A. Signed-off-by: Peter Geis --- .../boot/dts/rockchip/rk3566-quartz64-a.dts | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts index a3cdb6c2bec6..53ea5c13076b 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts @@ -75,6 +75,22 @@ vcc5v0_usb: vcc5v0_usb { vin-supply = <&vcc12v_dcin>; }; + /* all four ports are controlled by one gpio + * the host ports are sourced from vcc5v0_usb + * the otg port is sourced from vcc5v0_midu + */ + vcc5v0_usb20_host: vcc5v0_usb20_host { + compatible = "regulator-fixed"; + regulator-name = "vcc5v0_usb20_host"; + enable-active-high; + gpio = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_usb20_host_en>; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + vin-supply = <&vcc5v0_usb>; + }; + vcc3v3_sd: vcc3v3_sd { compatible = "regulator-fixed"; enable-active-low; @@ -367,6 +383,12 @@ pmic_int_l: pmic-int-l { }; }; + usb2 { + vcc5v0_usb20_host_en: vcc5v0-usb20-host-en { + rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + vcc_sd { vcc_sd_h: vcc-sd-h { rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; @@ -424,3 +446,33 @@ bluetooth { &uart2 { status = "okay"; }; + +&u2phy1_host { + phy-supply = <&vcc5v0_usb20_host>; + status = "okay"; +}; + +&u2phy1_otg { + phy-supply = <&vcc5v0_usb20_host>; + status = "okay"; +}; + +&usb2phy1 { + status = "okay"; +}; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb_host1_ehci { + status = "okay"; +}; + +&usb_host1_ohci { + status = "okay"; +};