From patchwork Wed Apr 27 00:03:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 566825 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 018C4C4332F for ; Wed, 27 Apr 2022 00:03:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356298AbiD0AGs (ORCPT ); Tue, 26 Apr 2022 20:06:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356290AbiD0AGk (ORCPT ); Tue, 26 Apr 2022 20:06:40 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBEE0177CA5 for ; Tue, 26 Apr 2022 17:03:28 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id n18so198418plg.5 for ; Tue, 26 Apr 2022 17:03:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=skYmy7mDp8VkwkIYeSIvj9eObp9HyYJK6LGiZ8mFdns=; b=hgQ+CYdwkgq69T5ogIfrpqlAKwoTI1polr2akEzbMkMygNHIn+sHvS9Y83z1QXouzx LAMZVASWKetLoEeOWX5ypKBmHTTGbdbCgBJvDpA0fzoGHweGU1z99Tny3k4/rw4xKL8/ hwmz2a1BHhNbdQXRYi4bUDU5OpcssGZi3H7+E= 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:mime-version :content-transfer-encoding; bh=skYmy7mDp8VkwkIYeSIvj9eObp9HyYJK6LGiZ8mFdns=; b=dDS1XyWxTSINAkB2+5QP40n1k2mSwKD9pfkIkvTVYgbKn40UPR6ovuZ5GIC71QIJ99 3Nu4ascnQFaxMhG8LZ6O33uaDpLmpJMhpMJbpBHCuH6XDTfkjb/uj70UzJU8pZ5GQY8T k2HS/G+lkr435RG+8m6H7TVTnV/aZzF3piCNoDJ2sm6Tcm3bllAJO8JX4HJO9/H8EIyb 1jpTcHN+bx6gEpZSmUGXxeeBezmreJETFFBMcCivRIr9P0iR9tvUCdoh50Ff16IIqed5 Vhqe3GiV6QuxQtkUwVNEgIiPGt8k+VyGIkkZ0CO001gAu6i/NT1QW2vl9FfyabJ/wGaT rrUg== X-Gm-Message-State: AOAM5327MGbQ4V0A7gTrIb8gg9UO4kyMA959iGoY1LN3vOsZZvwF7E8/ GgjjH8LWffKVfRIUh0BL9O5sIw== X-Google-Smtp-Source: ABdhPJzJl0+4YriFVH8yyLJ482pJPHNXb7/AetgqAtUkLxZL1tBDyDP1UmkCmyexc/SI6cCSIPb0Qw== X-Received: by 2002:a17:90b:4b12:b0:1d2:8bda:ef7 with SMTP id lx18-20020a17090b4b1200b001d28bda0ef7mr40930138pjb.174.1651017808397; Tue, 26 Apr 2022 17:03:28 -0700 (PDT) Received: from localhost ([2620:15c:202:201:a9a2:8a58:9d04:ba68]) by smtp.gmail.com with UTF8SMTPSA id j1-20020a17090adc8100b001d9424e49c1sm4313740pjv.44.2022.04.26.17.03.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Apr 2022 17:03:27 -0700 (PDT) From: Matthias Kaehlcke To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Douglas Anderson , Stephen Boyd Cc: Matthias Kaehlcke Subject: [PATCH v22 1/2] arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub Date: Tue, 26 Apr 2022 17:03:22 -0700 Message-Id: <20220426170306.v22.1.I7a1a6448d50bdd38e6082204a9818c59cc7a9bfd@changeid> X-Mailer: git-send-email 2.36.0.rc2.479.g8af0fa9b8e-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add nodes for the onboard USB hub on trogdor devices. Remove the 'always-on' property from the hub regulator, since the regulator is now managed by the onboard_usb_hub driver. Signed-off-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson --- Depends on "usb: misc: Add onboard_usb_hub driver" [1] which landed in https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-testing This patch was split off the above series. [1] https://patchwork.kernel.org/project/linux-usb/list/?series=615531&state=%2A&archive=both Changes in v22: - none Changes in v21: - patch dropped from onboard_usb_hub series Changes in v20: - renamed hub labels to 'usb_hub_2/3_x' - added comment for 'regulator-boot-on' of 'pp3300_hub' - added 'Reviewed-by' tags from Stephen and Doug Changes in v19: - none Changes in v18: - also adjust config for pompom rev1 Changes in v17: - none Changes in v16: - none Changes in v15: - none Changes in v14: - none Changes in v13: - none Changes in v12: - none Changes in v11: - rebased on qcom/arm64-for-5.14 (with the rest of the series) Changes in v10: - keep 'regulator-boot-on' property - updated commit message Changes in v9: - none Changes in v8: - none Changes in v7: - rebased on qcom/arm64-for-5.13 (with the rest of the series) Changes in v6: - added 'companion-hub' entry to both USB devices - added 'vdd-supply' also to hub@2 Changes in v5: - patch added to the series .../boot/dts/qcom/sc7180-trogdor-lazor-r0.dts | 19 ++++++++---------- .../boot/dts/qcom/sc7180-trogdor-lazor-r1.dts | 12 +++++------ .../dts/qcom/sc7180-trogdor-pompom-r1.dts | 11 ++++------ .../arm64/boot/dts/qcom/sc7180-trogdor-r1.dts | 19 ++++++++---------- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 20 ++++++++++++++++++- 5 files changed, 44 insertions(+), 37 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts index b142006478ea..caa2d3db4bc4 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts @@ -16,17 +16,6 @@ / { compatible = "google,lazor-rev0", "qcom,sc7180"; }; -&pp3300_hub { - /* pp3300_l7c is used to power the USB hub */ - /delete-property/regulator-always-on; - /delete-property/regulator-boot-on; -}; - -&pp3300_l7c { - regulator-always-on; - regulator-boot-on; -}; - &sn65dsi86_out { /* * Lane 0 was incorrectly mapped on the cable, but we've now decided @@ -35,3 +24,11 @@ &sn65dsi86_out { */ lane-polarities = <1 0>; }; + +&usb_hub_2_x { + vdd-supply = <&pp3300_l7c>; +}; + +&usb_hub_3_x { + vdd-supply = <&pp3300_l7c>; +}; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts index 59740799fa3a..0dc50ed62c46 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts @@ -16,13 +16,11 @@ / { compatible = "google,lazor-rev1", "google,lazor-rev2", "qcom,sc7180"; }; -&pp3300_hub { - /* pp3300_l7c is used to power the USB hub */ - /delete-property/regulator-always-on; - /delete-property/regulator-boot-on; + +&usb_hub_2_x { + vdd-supply = <&pp3300_l7c>; }; -&pp3300_l7c { - regulator-always-on; - regulator-boot-on; +&usb_hub_3_x { + vdd-supply = <&pp3300_l7c>; }; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r1.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r1.dts index 76a130bad60a..8467ff41e6d5 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r1.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom-r1.dts @@ -34,13 +34,10 @@ &pm6150_adc_tm { /delete-node/ charger-thermistor@0; }; -&pp3300_hub { - /* pp3300_l7c is used to power the USB hub */ - /delete-property/regulator-always-on; - /delete-property/regulator-boot-on; +&usb_hub_2_x { + vdd-supply = <&pp3300_l7c>; }; -&pp3300_l7c { - regulator-always-on; - regulator-boot-on; +&usb_hub_3_x { + vdd-supply = <&pp3300_l7c>; }; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts index 457c25499863..0cbb7a68d58b 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts @@ -43,17 +43,6 @@ &panel { compatible = "auo,b116xa01"; }; -&pp3300_hub { - /* pp3300_l7c is used to power the USB hub */ - /delete-property/regulator-always-on; - /delete-property/regulator-boot-on; -}; - -&pp3300_l7c { - regulator-always-on; - regulator-boot-on; -}; - &sdhc_2 { status = "okay"; }; @@ -62,6 +51,14 @@ &trackpad { interrupts = <58 IRQ_TYPE_EDGE_FALLING>; }; +&usb_hub_2_x { + vdd-supply = <&pp3300_l7c>; +}; + +&usb_hub_3_x { + vdd-supply = <&pp3300_l7c>; +}; + /* PINCTRL - modifications to sc7180-trogdor.dtsi */ &trackpad_int_1v8_odl { diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi index b0efb354458c..39e1121c5d77 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi @@ -296,7 +296,7 @@ pp3300_hub: pp3300-hub-regulator { pinctrl-names = "default"; pinctrl-0 = <&en_pp3300_hub>; - regulator-always-on; + /* The BIOS leaves this regulator on */ regulator-boot-on; vin-supply = <&pp3300_a>; @@ -936,6 +936,24 @@ &usb_1 { &usb_1_dwc3 { dr_mode = "host"; + #address-cells = <1>; + #size-cells = <0>; + + /* 2.x hub on port 1 */ + usb_hub_2_x: hub@1 { + compatible = "usbbda,5411"; + reg = <1>; + vdd-supply = <&pp3300_hub>; + companion-hub = <&usb_hub_3_x>; + }; + + /* 3.x hub on port 2 */ + usb_hub_3_x: hub@2 { + compatible = "usbbda,411"; + reg = <2>; + vdd-supply = <&pp3300_hub>; + companion-hub = <&usb_hub_2_x>; + }; }; &usb_1_hsphy { From patchwork Wed Apr 27 00:03:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 567273 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 60808C433F5 for ; Wed, 27 Apr 2022 00:03:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356300AbiD0AGr (ORCPT ); Tue, 26 Apr 2022 20:06:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356276AbiD0AGk (ORCPT ); Tue, 26 Apr 2022 20:06:40 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A423D177CB9 for ; Tue, 26 Apr 2022 17:03:30 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id e24so45147pjt.2 for ; Tue, 26 Apr 2022 17:03:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0GmEIX1GlLfTlvVrOCSpfIb3y6H22vbw5n+bX9zbtPk=; b=BpOzaqkng57OfFPssDa8a29JJ2oL8dkDDC1EEN35Qstu7ZxpLy6Erz+S533qY2Pyuv lQ1qbOlLL+JfJXI/mPqlFpZF3d7EJy8x4y3+AyQk9NCcnsw4Mf3muJAxIhJMH+q7fFaQ 8LnVp0mDH1rOZ9B2yqKedwTbAeOPUPlOjK7f0= 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=0GmEIX1GlLfTlvVrOCSpfIb3y6H22vbw5n+bX9zbtPk=; b=oQ0TEPYMXNYJpn2IDF2e30sE68SEYIz3RRdOLeIepWeSHBX4Hm7oq7oKs6mmlo8G1A 3jTAYuJcnlvWeal7QhCMqgDVGJQy+RSJzQAVnKPpNElUQndQvfrqWq6dpxyGh5zuMsI/ 1V9v49IavdJtJl3Mk+oqrIVhFqzQwLCgXq92z7azSHjNpkKMheWEVweHp6aZy2KG6huY ABBjBbFDW18C8+0ageZ2C8UJ/xcA2+rXQL2tx4nC05vKKSbUZgEbLG4EKd70lO/2RA/z VGOJCTYUln6S3EzHS2oamxa4ZrwXDSzIx7h6st0dYyJTe2MKSBRGo+1WBgzEULlgz++N ggMA== X-Gm-Message-State: AOAM5313GjD2FdKGAraFtmXlFf53w2GtMFEuFlIHcvgrz3oQYUs53ANc 3fJHCldJ1ZwaVjlw5DL6eW7wng== X-Google-Smtp-Source: ABdhPJy8mmvU8CSUFstqZ4eSmmRZ++ZALKeAMtDS58ZkJvleqjLEopzPJg34ynBpjMxjtzlTbsYmfg== X-Received: by 2002:a17:90a:9308:b0:1cb:a048:c140 with SMTP id p8-20020a17090a930800b001cba048c140mr30051370pjo.221.1651017810189; Tue, 26 Apr 2022 17:03:30 -0700 (PDT) Received: from localhost ([2620:15c:202:201:a9a2:8a58:9d04:ba68]) by smtp.gmail.com with UTF8SMTPSA id j1-20020a17090adc8100b001d9424e49c1sm4313819pjv.44.2022.04.26.17.03.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Apr 2022 17:03:29 -0700 (PDT) From: Matthias Kaehlcke To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Douglas Anderson , Stephen Boyd Cc: Matthias Kaehlcke Subject: [PATCH v22 2/2] arm64: dts: qcom: sc7280-herobrine: Add nodes for onboard USB hub Date: Tue, 26 Apr 2022 17:03:23 -0700 Message-Id: <20220426170306.v22.2.I18481b296484eec47bdc292a31fa46fa8c655ca9@changeid> X-Mailer: git-send-email 2.36.0.rc2.479.g8af0fa9b8e-goog In-Reply-To: <20220426170306.v22.1.I7a1a6448d50bdd38e6082204a9818c59cc7a9bfd@changeid> References: <20220426170306.v22.1.I7a1a6448d50bdd38e6082204a9818c59cc7a9bfd@changeid> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add nodes for the onboard USB hub on herobrine devices. Remove the 'always-on' property from the hub regulator, since the regulator is now managed by the onboard_usb_hub driver. Signed-off-by: Matthias Kaehlcke --- Changes in v22: - patch added to the series .../arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi index d58045dd7334..46937d21b229 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi @@ -143,8 +143,8 @@ pp3300_hub: pp3300-hub-regulator { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; + /* The BIOS leaves this regulator on */ regulator-boot-on; - regulator-always-on; gpio = <&tlmm 157 GPIO_ACTIVE_HIGH>; enable-active-high; @@ -560,6 +560,25 @@ &usb_1 { &usb_1_dwc3 { dr_mode = "host"; + + #address-cells = <1>; + #size-cells = <0>; + + /* 2.x hub on port 1 */ + usb_hub_2_x: hub@1 { + compatible = "usbbda,5411"; + reg = <1>; + vdd-supply = <&pp3300_hub>; + companion-hub = <&usb_hub_3_x>; + }; + + /* 3.x hub on port 2 */ + usb_hub_3_x: hub@2 { + compatible = "usbbda,411"; + reg = <2>; + vdd-supply = <&pp3300_hub>; + companion-hub = <&usb_hub_2_x>; + }; }; &usb_1_hsphy {