From patchwork Wed Nov 30 08:14:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 13059531 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 847FCC47088 for ; Wed, 30 Nov 2022 08:15:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234480AbiK3IPO (ORCPT ); Wed, 30 Nov 2022 03:15:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234454AbiK3IPL (ORCPT ); Wed, 30 Nov 2022 03:15:11 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C4E95214C for ; Wed, 30 Nov 2022 00:15:10 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id z20so22963951edc.13 for ; Wed, 30 Nov 2022 00:15:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fM26/BX7+YrKiOIeW+5b8oCcE7ugPPDIGDOxKigOBdQ=; b=LX+1ED3kWIxIqw76sso+qroMFs0A6QxNMQguadkwKZLk517JN6fLHqu3y7lGjzJ4bA UqaPfWpfnPMsBuMdilvJqN+yS/XhAr7Uzdu814NIxSbyLBUD8YHBACVPp/be+onceYde ta1yARryDQxUdwiFwP5zzP4QFZ4YzTsChfg53onGCozqwfPD5XZ6IaVFvQOuJ2+HsxPK 6NnvNpnneSfllRSRlJhoThwqCA4F9sZIgziLXgW7Lx0ztB/je6pKZ5fGjK9EAJfrG3cd 1MQyUfmQjasrHF71DylYM+5VpdYsdqTezloS6P3w9sQS18GgDB3mrHitOXks1/SfFUfn uK3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fM26/BX7+YrKiOIeW+5b8oCcE7ugPPDIGDOxKigOBdQ=; b=k6OfIx0ir4l91g+SL0FOfZxOtXhPDtSUuOzwJUUTQ78OGzeeZiHT0D2CbUJu1Q2p5l 0zIWwjBgqEgQUzHC9xpc1e1o7N7fv9OzmMx02DS/mGarefqXr5POuo+ELaR5TxkfRp3T 4iZ7Sp3Lv/m3cNYERva3EeJy4LQts17cACymsYC/vTZ46YX8q3l+r+8NH0uYUe4lCMtJ iX96JwKdz3+TuJm1QQu5FPgHVS9Hl4hJu0YGcEtHqmF5edmRO1F4npaLmSc185ZdBmR1 EA/VWUM8FTe4odtrlbaG8F08MQ4qT9Ac3o3UllOz13u3K10xoizN1GDsKDXSPZHGJl/U JFVg== X-Gm-Message-State: ANoB5pmPhf1TeizCBDcek4I6Sz9IuqEHQD/gcddEAkXdyL5bULgS50zZ KKZFZNSbreLmN/hIarJX70pFP/NRQY474w== X-Google-Smtp-Source: AA0mqf5w3rhlhkRUpiuUNjUaAMTdzJVhpCXqWtNJKHHVhNIBxZGHsNyQoMRtZ6RBZOxDdApp7Su9Qg== X-Received: by 2002:aa7:d555:0:b0:464:6485:419b with SMTP id u21-20020aa7d555000000b004646485419bmr41081784edr.382.1669796108510; Wed, 30 Nov 2022 00:15:08 -0800 (PST) Received: from otso.. (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id jw11-20020a17090776ab00b0074134543f82sm358285ejc.90.2022.11.30.00.15.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 00:15:08 -0800 (PST) From: Luca Weiss To: linux-arm-msm@vger.kernel.org, Johan Hovold Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/3] arm64: dts: qcom: sm6350: Use specific qmpphy compatible Date: Wed, 30 Nov 2022 09:14:29 +0100 Message-Id: <20221130081430.67831-3-luca.weiss@fairphone.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221130081430.67831-1-luca.weiss@fairphone.com> References: <20221130081430.67831-1-luca.weiss@fairphone.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The sc7180 phy compatible works fine for some cases, but it turns out sm6350 does need proper phy configuration in the driver, so use the newly added sm6350 compatible. Because the sm6350 compatible is using the new binding, we need to change the node quite a bit to match it. This fixes qmpphy init when no USB cable is plugged in during bootloader stage. Signed-off-by: Luca Weiss Reviewed-by: Johan Hovold --- Changes since v2: * Rebase on https://lore.kernel.org/all/20221111094729.11842-2-johan+linaro@kernel.org/ While this commit deletes the changes there it's still good to get it in for completeness * Fix clocks, add power-domain arch/arm64/boot/dts/qcom/sm6350.dtsi | 50 ++++++++-------------------- 1 file changed, 14 insertions(+), 36 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi index 43324bf291c3..cb48f03a6cc9 100644 --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -1119,49 +1120,26 @@ usb_1_hsphy: phy@88e3000 { resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>; }; - usb_1_qmpphy: phy@88e9000 { - compatible = "qcom,sc7180-qmp-usb3-dp-phy"; - reg = <0 0x088e9000 0 0x200>, - <0 0x088e8000 0 0x40>, - <0 0x088ea000 0 0x200>; - status = "disabled"; - #address-cells = <2>; - #size-cells = <2>; - ranges; + usb_1_qmpphy: phy@88e8000 { + compatible = "qcom,sm6350-qmp-usb3-dp-phy"; + reg = <0 0x088e8000 0 0x3000>; clocks = <&gcc GCC_USB3_PRIM_PHY_AUX_CLK>, - <&xo_board>, - <&rpmhcc RPMH_QLINK_CLK>, - <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>; - clock-names = "aux", "cfg_ahb", "ref", "com_aux"; + <&gcc GCC_USB3_PRIM_CLKREF_CLK>, + <&gcc GCC_USB3_PRIM_PHY_COM_AUX_CLK>, + <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; + clock-names = "aux", "ref", "com_aux", "usb3_pipe"; + + power-domains = <&gcc USB30_PRIM_GDSC>; resets = <&gcc GCC_USB3_DP_PHY_PRIM_BCR>, <&gcc GCC_USB3_PHY_PRIM_BCR>; reset-names = "phy", "common"; - usb_1_ssphy: usb3-phy@88e9200 { - reg = <0 0x088e9200 0 0x200>, - <0 0x088e9400 0 0x200>, - <0 0x088e9c00 0 0x400>, - <0 0x088e9600 0 0x200>, - <0 0x088e9800 0 0x200>, - <0 0x088e9a00 0 0x100>; - #clock-cells = <0>; - #phy-cells = <0>; - clocks = <&gcc GCC_USB3_PRIM_PHY_PIPE_CLK>; - clock-names = "pipe0"; - clock-output-names = "usb3_phy_pipe_clk_src"; - }; + #clock-cells = <1>; + #phy-cells = <1>; - dp_phy: dp-phy@88ea200 { - reg = <0 0x088ea200 0 0x200>, - <0 0x088ea400 0 0x200>, - <0 0x088eaa00 0 0x200>, - <0 0x088ea600 0 0x200>, - <0 0x088ea800 0 0x200>; - #phy-cells = <0>; - #clock-cells = <1>; - }; + status = "disabled"; }; dc_noc: interconnect@9160000 { @@ -1235,7 +1213,7 @@ usb_1_dwc3: usb@a600000 { snps,dis_enblslpm_quirk; snps,has-lpm-erratum; snps,hird-threshold = /bits/ 8 <0x10>; - phys = <&usb_1_hsphy>, <&usb_1_ssphy>; + phys = <&usb_1_hsphy>, <&usb_1_qmpphy QMP_USB43DP_USB3_PHY>; phy-names = "usb2-phy", "usb3-phy"; }; };