From patchwork Thu May 13 11:46:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 12255637 X-Patchwork-Delegate: geert@linux-m68k.org 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 6AF52C43461 for ; Thu, 13 May 2021 11:46:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 479A161152 for ; Thu, 13 May 2021 11:46:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232051AbhEMLru (ORCPT ); Thu, 13 May 2021 07:47:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231738AbhEMLrs (ORCPT ); Thu, 13 May 2021 07:47:48 -0400 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4123C061574; Thu, 13 May 2021 04:46:37 -0700 (PDT) Received: by mail-io1-xd2a.google.com with SMTP id p8so24559838iol.11; Thu, 13 May 2021 04:46:37 -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; bh=BK4qT11Jcy2nrTMBkQncpXyFc35XEEjYCK/MCqvtRuY=; b=jIjh5Hn+VtVG5LtWuuAqzs91VERchHii1B5R9VriyZB0old767hT16jywsD9Ix0mzr lj5jC/x5KdNdK/ZBZffjolitnRPVrWxZd1rKJVYumb+NCSV/r9V/Bi4qycFxrsjueoEF YQrIe6qKGMbN5t6nRG2c6WwbOyszZJH4EBZD7VMTQ9puazrf/o9Vh8z4EXsd7nJ/Obyo Y/EK1ADBXLnYbwKq16j5LQTovFJAVz0Bv7wD/hqvkpCqdfBkMi3STayOO4Kco+11VNZA RbsoYQd+eE3xkRFMSYx0bQCBonAq88b/kScAysihJJFkfclV9mQmLcuRVEUi9OvwXvsU Sk6w== 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; bh=BK4qT11Jcy2nrTMBkQncpXyFc35XEEjYCK/MCqvtRuY=; b=Se8TJoAOk7A7HW0+79YXEPXmkpbE1RudGm4O7FSjHaXkXSMgA0050KsKufvqZhyD1h ic7CPspctmjl9LnOq9/qaHIKfrpUlWke4rgbjuV+pGExkXysYwsxsj3RSvd6DkeLTVM1 8jEHQfPDNAscM4mWIYPS5Ca0XuF4FgLPwKObRKJE7nct1QMlPFzudbftj1RGehZgKFuu C6eta6z41aOic1mSBUONogKfZIl5UX62jZrNNCEoYKt3Wi0PQnr1u6ekIBmPxURGogC5 8wLCnA1b0K7zsFkIb/AQmDCwDBbEj3MLg8yr4DMuWbNoYZdE76awO50NQ75mh5v6gJez onAA== X-Gm-Message-State: AOAM532bqwqjR4F/JbB7WBWcgnqWMqSmrZv9PqFoUOrsXoE6D4kaP7GQ Q3N6N0BJg5Uo2LkW8kSQfEQ= X-Google-Smtp-Source: ABdhPJwMns8v9R5jX+V3mJ70Y1UWJL5D0BVlKjaR4sY4/Mc9zGc0VuwxuWjBBPAyjUblBtXOCsGl1g== X-Received: by 2002:a05:6602:70d:: with SMTP id f13mr31647503iox.16.1620906396431; Thu, 13 May 2021 04:46:36 -0700 (PDT) Received: from aford-OptiPlex-7050.logicpd.com ([174.46.170.158]) by smtp.gmail.com with ESMTPSA id x13sm1298192ilv.88.2021.05.13.04.46.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 04:46:35 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: aford@beaconembedded.com, Adam Ford , Geert Uytterhoeven , Magnus Damm , Rob Herring , Catalin Marinas , Will Deacon , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] arm64: dts: renesas: beacon: Fix USB extal reference Date: Thu, 13 May 2021 06:46:15 -0500 Message-Id: <20210513114617.30191-1-aford173@gmail.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The USB extal clock reference isn't associated to a crystal, it's assoicated to a programmable clock, so remove the extal reference, add the usb2_clksel. Since usb_extal is referenced by the versaclock, reference it here so the usb2_clksel can get the proper clock speed of 50MHz. Signed-off-by: Adam Ford Reviewed-by: Geert Uytterhoeven diff --git a/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi b/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi index 8d3a4d6ee885..bd3d26b2a2bb 100644 --- a/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi +++ b/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi @@ -319,8 +319,10 @@ status = "okay"; }; -&usb_extal_clk { - clock-frequency = <50000000>; +&usb2_clksel { + clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, + <&versaclock5 3>, <&usb3s0_clk>; + status = "okay"; }; &usb3s0_clk { From patchwork Thu May 13 11:46:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 12255635 X-Patchwork-Delegate: geert@linux-m68k.org 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 BE9C0C433B4 for ; Thu, 13 May 2021 11:46:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 983A861106 for ; Thu, 13 May 2021 11:46:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232005AbhEMLrt (ORCPT ); Thu, 13 May 2021 07:47:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232079AbhEMLrr (ORCPT ); Thu, 13 May 2021 07:47:47 -0400 Received: from mail-il1-x130.google.com (mail-il1-x130.google.com [IPv6:2607:f8b0:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58F32C06174A; Thu, 13 May 2021 04:46:38 -0700 (PDT) Received: by mail-il1-x130.google.com with SMTP id h6so22753165ila.7; Thu, 13 May 2021 04:46:38 -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; bh=YWflmdmJROYCQ/WWF6G14ySD96EARIxVpZed3YC02QM=; b=GTynuP3ATFH2UNurhyElbfUGJz6ocQH8ANB2j8yMKo/o3JwBjaDePB8CV17RHpbL4F gCn/64Q99jZWD8tBt00pck/Kz2j+7DfgDCZe07jAHswUPasG2f3EdR3SxFL10JPQvzS4 dNrSvXf3uXBwZsgU2t60+TnbJninUH80TvlmgnWO0SvSTEfVu/4TnC4dcKnpVPqouoFz KMyfWdYn0BG8I6WYTvinFqwmPpR9+k7G0vYuXxh84FsBW1oCkoBIbMqlGpJUp/dxzVDh JKbqGK7C1NPjhmTNrgLeUwgXHhFeIlAEG3+P/YR0+/GFRtIa2mi/n9u+s+P3Fpk8uM6F 6wtw== 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; bh=YWflmdmJROYCQ/WWF6G14ySD96EARIxVpZed3YC02QM=; b=jNYD3c4hodAC7syzbssodnWc346ZjKewBz/u8NbOUr9mBjMR6taTbbCSPXCF1tqzRG 9NVhkuqa/pW1Xw74wdOzLF3KWWBfQfc/UPV0GErvqe374PqsRaNbxeUOZo2Dy5wc7pni fFOokw9Z+h2E1vPgEX2TuHAVZxtgKDjJKcj3Av2WMCmO/Yi+pR9tdCEZAqAd3pyjNnLS 1FBxkxNWNc9GamJG9/nZIChliNRRd3bGXRY68h6SzR0PsFzwxc9YCkmJfsnCxLffo12D MjPVeu0wS8XZyR+Oi4jQQtyuwOHLnawv5OnI2lxzR95cZd7O86kwir3FqodBgDNSuglA MALA== X-Gm-Message-State: AOAM5322tLxLFf8DwxN9xNgEaGsnzQl7idenvluEiKo1jPjWPaIP5XRy g1S3fhaz2Uol5rh8/trnHl3ParTD7COCkQ== X-Google-Smtp-Source: ABdhPJwNMPENaPPMMzaTIrTBV5CMY//WPW2NZLDEFjSOzRIxzVF0pNdioqH9niLxDAdMwDrO0OCpyw== X-Received: by 2002:a92:6b02:: with SMTP id g2mr17449240ilc.23.1620906397710; Thu, 13 May 2021 04:46:37 -0700 (PDT) Received: from aford-OptiPlex-7050.logicpd.com ([174.46.170.158]) by smtp.gmail.com with ESMTPSA id x13sm1298192ilv.88.2021.05.13.04.46.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 04:46:37 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: aford@beaconembedded.com, Adam Ford , Geert Uytterhoeven , Magnus Damm , Rob Herring , Catalin Marinas , Will Deacon , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] arm64: dts: renesas: beacon: Fix USB ref clock references Date: Thu, 13 May 2021 06:46:16 -0500 Message-Id: <20210513114617.30191-2-aford173@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210513114617.30191-1-aford173@gmail.com> References: <20210513114617.30191-1-aford173@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The RZ/G2 boards expect there to be a external clock reference for USB2 EHCI controllers. For the Beacon boards, this reference clock is controlled by a programmable verasaclock. Because the RZ/G2 family have a special clock driver when using an external clock, the third clock reference in the EHCI node needs to point to this special clock, called usb2_clksel. Since the usb2_clksel does not keep the usb_extal clock enabled, the 4th clock entry for the EHCI nodes needs to reference it to keep the clock running and make USB functional. Signed-off-by: Adam Ford Reviewed-by: Geert Uytterhoeven diff --git a/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi b/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi index d8046fedf9c1..e3c8b2fe143e 100644 --- a/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi +++ b/arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi @@ -271,12 +271,12 @@ &ehci0 { dr_mode = "otg"; status = "okay"; - clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>; + clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, <&usb2_clksel>, <&versaclock5 3>; }; &ehci1 { status = "okay"; - clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>; + clocks = <&cpg CPG_MOD 703>, <&cpg CPG_MOD 704>, <&usb2_clksel>, <&versaclock5 3>; }; &hdmi0 { From patchwork Thu May 13 11:46:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 12255639 X-Patchwork-Delegate: geert@linux-m68k.org 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 9D7D7C433B4 for ; Thu, 13 May 2021 11:46:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 76E7861152 for ; Thu, 13 May 2021 11:46:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232696AbhEMLrw (ORCPT ); Thu, 13 May 2021 07:47:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232106AbhEMLru (ORCPT ); Thu, 13 May 2021 07:47:50 -0400 Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CDE5C06175F; Thu, 13 May 2021 04:46:39 -0700 (PDT) Received: by mail-il1-x12c.google.com with SMTP id e14so22725338ils.12; Thu, 13 May 2021 04:46:39 -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; bh=Rm89In9VFgXIxrvmbcLZClWvwBKBEh2Q5L+7MRo67Ho=; b=SJaLe9Zy5ycMUyRgFr43qRxDs35epaWnNzYIYXRnTU32HE0hWQsaruvP9WeJ3tUEFC I8EyDVXOl7qax0ttNsr+M5JgjFgdozLNLloiKm81joRa1hHe4hLpFr5Caw/OFZnF9Nrt sjemsJnMpkBs56Q6kOnjd09qo5Rg6L/KVU6+vp5/tcRv7WsUWai7REWjZnUxnK8IEFWU yJ1CHGcnV34w2LtpDR3+85REc84NOGJ6mcEjCM2rcNl2SG57bMYJl4pdtRFeYCmBQSuQ 5F+Udu/TTY30UYkW7yc05ZbwR0xjJ3bhgnoz4QKNr9079w1p9VE/fJe4a+b9cKqcF6IM bJAQ== 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; bh=Rm89In9VFgXIxrvmbcLZClWvwBKBEh2Q5L+7MRo67Ho=; b=tuLu7ft7q0dfzE//kOu/oD9GUpRpYND+J8QF5zu/arYfvfxmk9IRRl+N8y9yb2YNqL DmLQemPzyxcVQMpMmuUk74K3YtJKTWUZMWW8F8sTLBhYixCjBgwlQGRkplmZBTgOwWaD bSouxp9AQ8cjbfdSCSDKARBfdcuxndQd8OTQEEKLKxCtFALWxwL4Yz/uczZI4NCAAYWI WJuEz2LKUEhPqMx335/7Da51Qg8nWL706I7Bu3qShJLe+vGZW73zZDyufyEhArB0husk HbVUxz6T94j/wqo7/FuErnFrcdNTX5nLYoPfEGA7rI+qMy1K92neXTyhs8PEWGd+4ncs 7TlQ== X-Gm-Message-State: AOAM533GEJxCRNkc0h93m/mnJRcMjqzXLC88RrUMM+/T5RjaGoPsxuvA aXNFvTbNITEiaVOc1bzwdwk= X-Google-Smtp-Source: ABdhPJyXKOm4TyYEisCK+GMqYFhJFX9a3p/X+xRQOqdAcu+fYr2cM05ikYn20cVPJok9l1uLlyrpSQ== X-Received: by 2002:a05:6e02:1b83:: with SMTP id h3mr19359239ili.199.1620906398843; Thu, 13 May 2021 04:46:38 -0700 (PDT) Received: from aford-OptiPlex-7050.logicpd.com ([174.46.170.158]) by smtp.gmail.com with ESMTPSA id x13sm1298192ilv.88.2021.05.13.04.46.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 04:46:38 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: aford@beaconembedded.com, Adam Ford , Geert Uytterhoeven , Magnus Damm , Rob Herring , Catalin Marinas , Will Deacon , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] arm64: defconfig: Enable usb2_clksel for rcar3 and RZ/G2 Date: Thu, 13 May 2021 06:46:17 -0500 Message-Id: <20210513114617.30191-3-aford173@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210513114617.30191-1-aford173@gmail.com> References: <20210513114617.30191-1-aford173@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org There is a clock driver that's needed when using an external USB reference clock called usb2_clksel. Enable it in the defconfig. Signed-off-by: Adam Ford Reviewed-by: Geert Uytterhoeven diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 08c6f769df9a..c1110fc20cdb 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -987,6 +987,7 @@ CONFIG_SM_GPUCC_8250=y CONFIG_SM_DISPCC_8250=y CONFIG_QCOM_HFPLL=y CONFIG_CLK_GFM_LPASS_SM8250=m +CONFIG_CLK_RCAR_USB2_CLOCK_SEL=y CONFIG_HWSPINLOCK=y CONFIG_HWSPINLOCK_QCOM=y CONFIG_ARM_MHU=y