From patchwork Fri Jul 22 16:32:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 592560 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 2532AC43334 for ; Fri, 22 Jul 2022 16:32:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235715AbiGVQcw (ORCPT ); Fri, 22 Jul 2022 12:32:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229850AbiGVQcv (ORCPT ); Fri, 22 Jul 2022 12:32:51 -0400 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC12393697 for ; Fri, 22 Jul 2022 09:32:49 -0700 (PDT) Received: by mail-pl1-x62b.google.com with SMTP id d7so4973326plr.9 for ; Fri, 22 Jul 2022 09:32:49 -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=pHkzVngUg8JraIw7WAXXxeWawYCL64dfVzj3JndI8ec=; b=DE2j5M49eA0g6LUo3qmfRgAkAVCAZ25hPgegh6+UVPoOmTzpn8rAXFkIP0oOfwXvha UztqAnN2YyS9d8hnn7uqvYA3yyl1F1VywFKiMoYWa+giIVfo/vo1+HQzt+DEkym5RUDO WhiCT49Jgu0Rreh3e8zCKN1zUEw+zKQUtTHgk= 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=pHkzVngUg8JraIw7WAXXxeWawYCL64dfVzj3JndI8ec=; b=TaNd/+ZP9snErMNumfVP1+UfmZKACWOLgOz1Kk1FaGMtwrI+8zs0wlfKDOq9MwtMps znGBixc9msbx+BEX3tB9DW7eb961IxN8WyVmEzPoMUUelKsy+ryMT9p/y0WNEcFfpT/q SwqWWSdcb5smBvhq6ZTpiMStXoPfpN3KKvUjAvkMkPl+jPpJFLcaAiOUmZGnAGi/cDuG Eb3b+5wdgTlXfbq7NNgRPFih3egPr4apgcw8nAjdXsW+y7wDWauA8jTyNGESWPkipS+l n7KmDk/xo6oKlWGR4TbViMT76hZ3Gqm/fkCh9WevZFXZ6PdT9ZPLTR3gTvGbwuhGgXOx +VIw== X-Gm-Message-State: AJIora8zgm33UCrOrMAFXr91bBgf8fTyaSt+jn6y7QIGFlK7bshXE/SW CuuwKpU5VRI/aROTjhZq4dGP7A== X-Google-Smtp-Source: AGRyM1uRxtJn7DjJ7STDDPVY6rF/tZpRTUckHUDOghrPwyx+1x6dBFGv2TK/4Y/5TjP2KcWVjgY+gg== X-Received: by 2002:a17:902:bb91:b0:16c:3f7f:6df0 with SMTP id m17-20020a170902bb9100b0016c3f7f6df0mr672035pls.99.1658507569276; Fri, 22 Jul 2022 09:32:49 -0700 (PDT) Received: from localhost ([2620:15c:11a:202:42b0:2897:3725:985a]) by smtp.gmail.com with UTF8SMTPSA id u8-20020a1709026e0800b001640aad2f71sm3943818plk.180.2022.07.22.09.32.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Jul 2022 09:32:48 -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 , Konrad Dybcio , Krzysztof Kozlowski Subject: [PATCH v24 1/2] arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub Date: Fri, 22 Jul 2022 09:32:44 -0700 Message-Id: <20220722093238.v24.1.I7a1a6448d50bdd38e6082204a9818c59cc7a9bfd@changeid> X-Mailer: git-send-email 2.37.1.359.gd136c6c3e2-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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. For anyone using trogdor-based devices on Linux, it should be noted that this requires "CONFIG_USB_ONBOARD_HUB=y". Signed-off-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson --- This series depends on 3a6bf4a08142 ("usb: core: hub: Create platform devices for onboard hubs in hub_probe()") which landed in -next [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next&id=3a6bf4a08142826698121bef16b244dcf50a6431 Changes in v24: - renamed 'companion-hub' to 'peer-hub' according to the change in the binding Changes in v23: - added note about enabling CONFIG_USB_ONBOARD_HUB to the commit message 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 bfbf26fd2cd4..d49de65aa960 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 d45a59afd7fc..80c7108bc51b 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 59a23d0e9651..bc097d1b1b23 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts @@ -44,17 +44,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"; }; @@ -63,6 +52,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 b5f534db135a..eae22e6e97c1 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi @@ -299,7 +299,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>; + peer-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>; + peer-hub = <&usb_hub_2_x>; + }; }; &usb_1_hsphy { From patchwork Fri Jul 22 16:32:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 592973 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 92820C433EF for ; Fri, 22 Jul 2022 16:33:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235721AbiGVQdA (ORCPT ); Fri, 22 Jul 2022 12:33:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235751AbiGVQc7 (ORCPT ); Fri, 22 Jul 2022 12:32:59 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2B659965B for ; Fri, 22 Jul 2022 09:32:56 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id r186so4859869pgr.2 for ; Fri, 22 Jul 2022 09:32:56 -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=IusqkAi12UkDRpxOqe5d+steBgvYPF1P177Hc5F7MjQ=; b=DpCEW4VfqPFdfl/zi4G3wiRIJC5E6AT1Fp15VyxrdjVkV7k/smBEKKfZPOBrN5xL2y R0kWUB7XgPKpG1gklBR1k/B12m3qGBj4vQljirixvhrVKxbmUj9gniiCQcdaMHa9PBSi 6YZPQjh76JQ6pzsHyTGOUsznK2sx9R/6IZ+zE= 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=IusqkAi12UkDRpxOqe5d+steBgvYPF1P177Hc5F7MjQ=; b=0LfPu4OOpIOSLZD4iiNAdO3Zx71DGdKK1+KxPUxHzQiVbxl6TIJyD5SpcgUh+kkyO7 4ux2JMXLWIg+3sSKN7AqfIdFZeQZC6laS+5IG+MdAb4hYEVfuVc6F8NJ+s1Nr2sshvI2 f9/SWFTpybetXuhF/RNIaR9EPgIvb4V/6w3aKhd3gJErl7GXtGb5zhPENH8eDbYKoiLL I0HDBiEDObNSOwbtv88HNGJimJCB/4zjpVJOCbNRoM/E0XpCK9OOhih96latZQLD7aVQ cIwY27Gr6gPXZMOdUYyfcOD0LUOep9fPZXVT+2gXPsC22nKkOfM+kZZonwwjVfw/TggG b6Nw== X-Gm-Message-State: AJIora+z3vQP/fAKEeN8r8E/dHzjjoVZTy08zBTCl8V6hGR4g4UmTjbB LuJy5ytcwwwIysW9WUclW0Zs9w== X-Google-Smtp-Source: AGRyM1tQGj7yROA244zt5l+vYLlHTkva9Qxq523ok9iT1yZ78hqApGuetIH3LfAEimjd/KI2mMzayQ== X-Received: by 2002:a63:164d:0:b0:416:4bc:1c28 with SMTP id 13-20020a63164d000000b0041604bc1c28mr532460pgw.302.1658507571832; Fri, 22 Jul 2022 09:32:51 -0700 (PDT) Received: from localhost ([2620:15c:11a:202:42b0:2897:3725:985a]) by smtp.gmail.com with UTF8SMTPSA id u12-20020a170902e80c00b0016a11b7472csm3987832plg.166.2022.07.22.09.32.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 Jul 2022 09:32:50 -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 , Konrad Dybcio , Krzysztof Kozlowski Subject: [PATCH v24 2/2] arm64: dts: qcom: sc7280-herobrine: Add nodes for onboard USB hub Date: Fri, 22 Jul 2022 09:32:45 -0700 Message-Id: <20220722093238.v24.2.I18481b296484eec47bdc292a31fa46fa8c655ca9@changeid> X-Mailer: git-send-email 2.37.1.359.gd136c6c3e2-goog In-Reply-To: <20220722093238.v24.1.I7a1a6448d50bdd38e6082204a9818c59cc7a9bfd@changeid> References: <20220722093238.v24.1.I7a1a6448d50bdd38e6082204a9818c59cc7a9bfd@changeid> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@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. This requires "CONFIG_USB_ONBOARD_HUB=y". Signed-off-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson --- Changes in v24: - renamed 'companion-hub' to 'peer-hub' according to the change in the binding Changes in v23: - added note about CONFIG_USB_ONBOARD_HUB to the commit message - added 'Reviewed-by' tags from Stephen and Doug 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 3f8996c00b05..1fd381a903de 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi @@ -144,8 +144,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; @@ -596,6 +596,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>; + peer-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>; + peer-hub = <&usb_hub_2_x>; + }; }; &usb_1_hsphy {