From patchwork Thu Nov 18 21:02:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12627715 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4CBEC433FE for ; Thu, 18 Nov 2021 21:02:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB95561A86 for ; Thu, 18 Nov 2021 21:02:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232949AbhKRVFx (ORCPT ); Thu, 18 Nov 2021 16:05:53 -0500 Received: from mail.z3ntu.xyz ([128.199.32.197]:36926 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230422AbhKRVFx (ORCPT ); Thu, 18 Nov 2021 16:05:53 -0500 Received: from localhost.localdomain (ip-213-127-109-54.ip.prioritytelecom.net [213.127.109.54]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id E68AECAD7C; Thu, 18 Nov 2021 21:02:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1637269371; bh=8tlSrro64Z/lABOoSyH9T70DBxFcqqceD5mOCWLL68M=; h=From:To:Cc:Subject:Date; b=o5tjir4D7XXdxYNTREpyc/K2jbBGwHuKmtlPDSNdqDTEFDplpeYsdiFrb97nT1RdK X93Rva4ViI6MxqKg0ELys2ZYydXLOdnfAjtmIEmr2OWA0cJvCGu+73XfFuir7mrv3a vwQdmV8B1GnGHC0zWVBI+uDcV8jy4zao23nC6CV4= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Sebastian Reichel , Rob Herring , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226 Date: Thu, 18 Nov 2021 22:02:04 +0100 Message-Id: <20211118210210.160895-1-luca@z3ntu.xyz> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The charger in PM8226 (used in MSM8226) is similar to the charger in PM8941. Signed-off-by: Luca Weiss Acked-by: Rob Herring --- .../devicetree/bindings/power/supply/qcom,pm8941-charger.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/power/supply/qcom,pm8941-charger.yaml b/Documentation/devicetree/bindings/power/supply/qcom,pm8941-charger.yaml index bc8904872d1b..caeff68c66d5 100644 --- a/Documentation/devicetree/bindings/power/supply/qcom,pm8941-charger.yaml +++ b/Documentation/devicetree/bindings/power/supply/qcom,pm8941-charger.yaml @@ -11,7 +11,9 @@ maintainers: properties: compatible: - const: qcom,pm8941-charger + enum: + - qcom,pm8226-charger + - qcom,pm8941-charger reg: maxItems: 1 From patchwork Thu Nov 18 21:02:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12627725 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8356C4167E for ; Thu, 18 Nov 2021 21:03:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85A5061A07 for ; Thu, 18 Nov 2021 21:03:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233156AbhKRVFx (ORCPT ); Thu, 18 Nov 2021 16:05:53 -0500 Received: from mail.z3ntu.xyz ([128.199.32.197]:36936 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231950AbhKRVFx (ORCPT ); Thu, 18 Nov 2021 16:05:53 -0500 Received: from localhost.localdomain (ip-213-127-109-54.ip.prioritytelecom.net [213.127.109.54]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 5667BCADFE; Thu, 18 Nov 2021 21:02:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1637269371; bh=VkZLd4MrD1jYefgkbKqN/uBus6sSvz99v85KNgNeEo4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WhArt4LnAT0NYc1Te9WK/DU1BrV1BFN3qq03WK/VfTMLGArhJN+vVjRJrrcSm5g8S XDSdd4xtzhCgaAvgZa6a1y7KTLc/oWPclRtm3YL7GG5caGPJcPGRO063cgNV6Ph83R XGxS8TN+TW+lfISRVtsS6vuyADHQ1FfXfSZgQI5E= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , Sebastian Reichel , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] power: supply: qcom_smbb: support pm8226 Date: Thu, 18 Nov 2021 22:02:05 +0100 Message-Id: <20211118210210.160895-2-luca@z3ntu.xyz> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211118210210.160895-1-luca@z3ntu.xyz> References: <20211118210210.160895-1-luca@z3ntu.xyz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org PM8226 (used in MSM8226) has v1 smbb hardware and works fine with the current driver. Signed-off-by: Luca Weiss --- drivers/power/supply/qcom_smbb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/qcom_smbb.c b/drivers/power/supply/qcom_smbb.c index 84cc9fba029d..bd50124eef9f 100644 --- a/drivers/power/supply/qcom_smbb.c +++ b/drivers/power/supply/qcom_smbb.c @@ -863,8 +863,8 @@ static int smbb_charger_probe(struct platform_device *pdev) } chg->revision += 1; - if (chg->revision != 2 && chg->revision != 3) { - dev_err(&pdev->dev, "v1 hardware not supported\n"); + if (chg->revision != 1 && chg->revision != 2 && chg->revision != 3) { + dev_err(&pdev->dev, "v%d hardware not supported\n", chg->revision); return -ENODEV; } dev_info(&pdev->dev, "Initializing SMBB rev %u", chg->revision); @@ -1012,6 +1012,7 @@ static int smbb_charger_remove(struct platform_device *pdev) } static const struct of_device_id smbb_charger_id_table[] = { + { .compatible = "qcom,pm8226-charger" }, { .compatible = "qcom,pm8941-charger" }, { } }; From patchwork Thu Nov 18 21:02:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12627717 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96DDCC433FE for ; Thu, 18 Nov 2021 21:02:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 82CB361546 for ; Thu, 18 Nov 2021 21:02:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233668AbhKRVF6 (ORCPT ); Thu, 18 Nov 2021 16:05:58 -0500 Received: from mail.z3ntu.xyz ([128.199.32.197]:36946 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233120AbhKRVFy (ORCPT ); Thu, 18 Nov 2021 16:05:54 -0500 Received: from localhost.localdomain (ip-213-127-109-54.ip.prioritytelecom.net [213.127.109.54]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id BD6B9CADFF; Thu, 18 Nov 2021 21:02:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1637269372; bh=p1hst4gpIVKupZAuytjyoSn3oOA9pER7aVHo2xuyQS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=a5iAkFFrpBvkoivXS8ulJ+ouiqbx+ONmvP7hvSFSyRUsMLctSepJ6/UKFGEChRAS+ ZwLhXQq7/g1tZxQjzd+Iv3vIYyBVRFMI8/EJfHUZcwrL6fN6oz1g8kzftrNVU0Szwi lo/4Ar0Rmsp4kTxjWGoxcuPUfRDP2WTI07aZv5BI= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/7] ARM: dts: qcom: pm8226: add smbb charger node Date: Thu, 18 Nov 2021 22:02:06 +0100 Message-Id: <20211118210210.160895-3-luca@z3ntu.xyz> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211118210210.160895-1-luca@z3ntu.xyz> References: <20211118210210.160895-1-luca@z3ntu.xyz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add a node for the battery charger included in pm8226. Signed-off-by: Luca Weiss --- arch/arm/boot/dts/qcom-pm8226.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm/boot/dts/qcom-pm8226.dtsi b/arch/arm/boot/dts/qcom-pm8226.dtsi index dddb5150dfd7..666bc6350c50 100644 --- a/arch/arm/boot/dts/qcom-pm8226.dtsi +++ b/arch/arm/boot/dts/qcom-pm8226.dtsi @@ -16,6 +16,29 @@ pwrkey@800 { debounce = <15625>; bias-pull-up; }; + + smbb: charger@1000 { + compatible = "qcom,pm8226-charger"; + reg = <0x1000>; + interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>, + <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "chg-done", + "chg-fast", + "chg-trkl", + "bat-temp-ok", + "bat-present", + "chg-gone", + "usb-valid", + "dc-valid"; + + chg_otg: otg-vbus { }; + }; }; pm8226_1: pm8226@1 { From patchwork Thu Nov 18 21:02:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12627723 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75546C4167D for ; Thu, 18 Nov 2021 21:03:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6286161B1E for ; Thu, 18 Nov 2021 21:03:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233417AbhKRVF4 (ORCPT ); Thu, 18 Nov 2021 16:05:56 -0500 Received: from mail.z3ntu.xyz ([128.199.32.197]:36954 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233205AbhKRVFy (ORCPT ); Thu, 18 Nov 2021 16:05:54 -0500 Received: from localhost.localdomain (ip-213-127-109-54.ip.prioritytelecom.net [213.127.109.54]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id E727BCAD7C; Thu, 18 Nov 2021 21:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1637269373; bh=MiE+Odw8LejlaQe/AOr6z4tZi+RYMHJyotf1y9D3uqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=IcSTjBOWb7q6k3OqTHaaeaM76bFQsd5Eko9oMEsoEbcE+ONdmW8dcEv1mtYmut/nX frOqtsby94KkulZ4DZ460Aa5eQBjv+PucvUXlMaEl71J4wHqfRtX5t+oz9VDjr4lqz kkkUw5Wxgwd6jooEmWQ3RHCg+LHyIl+wFmNB7uNY= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] ARM: dts: qcom: apq8026-lg-lenok: configure SMBB charger Date: Thu, 18 Nov 2021 22:02:07 +0100 Message-Id: <20211118210210.160895-4-luca@z3ntu.xyz> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211118210210.160895-1-luca@z3ntu.xyz> References: <20211118210210.160895-1-luca@z3ntu.xyz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Configure the SMBB charger according to the downstream kernel, some values are rounded according to driver warnings. Signed-off-by: Luca Weiss --- arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts b/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts index b19522ad91a0..4e7a596d6101 100644 --- a/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts +++ b/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts @@ -209,6 +209,15 @@ &sdhc_1 { pinctrl-0 = <&sdhc1_pin_a>; }; +&smbb { + qcom,fast-charge-safe-current = <450000>; + qcom,fast-charge-current-limit = <400000>; + qcom,fast-charge-safe-voltage = <4350000>; + qcom,fast-charge-high-threshold-voltage = <4350000>; + qcom,auto-recharge-threshold-voltage = <4240000>; + qcom,minimum-input-voltage = <4450000>; +}; + &tlmm { sdhc1_pin_a: sdhc1-pin-active { clk { From patchwork Thu Nov 18 21:02:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12627721 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6596CC433F5 for ; Thu, 18 Nov 2021 21:03:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 473D96139F for ; Thu, 18 Nov 2021 21:03:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233526AbhKRVF4 (ORCPT ); Thu, 18 Nov 2021 16:05:56 -0500 Received: from mail.z3ntu.xyz ([128.199.32.197]:36964 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233319AbhKRVFz (ORCPT ); Thu, 18 Nov 2021 16:05:55 -0500 Received: from localhost.localdomain (ip-213-127-109-54.ip.prioritytelecom.net [213.127.109.54]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 6427BCADFE; Thu, 18 Nov 2021 21:02:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1637269373; bh=hVhf8M1vf/Y7SjzoLmES1H4b9X86FBqukDCU7O27VBg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sNAnKr46DkWHRcjSZ88Z0LG2AXaerQPLd7LkLWjypugwTiOUZ0aSG/3v0yk7Sskcz JKX7CoeMzhUo1TAElTagDyYbm1fIcMcozA17/HL2S52HPC7kQLfkpZQgONGEPvrX1F kc+PETY67XiMrQ/RDqnETj6qjvnCJw0c1Gom7M3s= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , Kishon Vijay Abraham I , Vinod Koul , Rob Herring , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] dt-bindings: phy: qcom,usb-hs-phy: add MSM8226 compatible Date: Thu, 18 Nov 2021 22:02:08 +0100 Message-Id: <20211118210210.160895-5-luca@z3ntu.xyz> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211118210210.160895-1-luca@z3ntu.xyz> References: <20211118210210.160895-1-luca@z3ntu.xyz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add a compatible for MSM8226 which also uses the USB HS PHY. Signed-off-by: Luca Weiss Acked-by: Rob Herring --- Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt index b3b75c1e6285..6814dccb390c 100644 --- a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt +++ b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt @@ -9,6 +9,7 @@ PROPERTIES following: "qcom,usb-hs-phy-apq8064" + "qcom,usb-hs-phy-msm8226" "qcom,usb-hs-phy-msm8916" "qcom,usb-hs-phy-msm8974" From patchwork Thu Nov 18 21:02:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12627719 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCBE3C433EF for ; Thu, 18 Nov 2021 21:03:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C93B06139F for ; Thu, 18 Nov 2021 21:03:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233613AbhKRVF5 (ORCPT ); Thu, 18 Nov 2021 16:05:57 -0500 Received: from mail.z3ntu.xyz ([128.199.32.197]:36972 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231950AbhKRVF4 (ORCPT ); Thu, 18 Nov 2021 16:05:56 -0500 Received: from localhost.localdomain (ip-213-127-109-54.ip.prioritytelecom.net [213.127.109.54]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id 142C5CAE00; Thu, 18 Nov 2021 21:02:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1637269374; bh=89R9eZrI3Jpd1FwYGe9ohAPLXnKdr6Sx1Vas99ytQ4A=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=idwqDYPfh/0uq2HsKEuPIWCqDEojhUjtzcdGBgLUMP2XNZEDPqBFTV06hQfQvSEbd vTtufSMJLr2i5aE3NTjBXD/eWQd1Y+2x7MgSFc3r6lOpq4fB6jq/zKIOQDn+HgecrB /I+mC1VjclF88nYr08v8aw4xtUjoyz/Qpoc2l7LY= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] ARM: dts: qcom: msm8226: add USB node Date: Thu, 18 Nov 2021 22:02:09 +0100 Message-Id: <20211118210210.160895-6-luca@z3ntu.xyz> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211118210210.160895-1-luca@z3ntu.xyz> References: <20211118210210.160895-1-luca@z3ntu.xyz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add a node describing the MSM8226 USB controller and phy. Signed-off-by: Luca Weiss --- arch/arm/boot/dts/qcom-msm8226.dtsi | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm/boot/dts/qcom-msm8226.dtsi b/arch/arm/boot/dts/qcom-msm8226.dtsi index 7d48599502b3..103c0ab70814 100644 --- a/arch/arm/boot/dts/qcom-msm8226.dtsi +++ b/arch/arm/boot/dts/qcom-msm8226.dtsi @@ -8,6 +8,7 @@ #include #include #include +#include / { #address-cells = <1>; @@ -229,6 +230,44 @@ blsp1_i2c5: i2c@f9927000 { #size-cells = <0>; }; + usb: usb@f9a55000 { + compatible = "qcom,ci-hdrc"; + reg = <0xf9a55000 0x200>, + <0xf9a55200 0x200>; + interrupts = ; + clocks = <&gcc GCC_USB_HS_AHB_CLK>, + <&gcc GCC_USB_HS_SYSTEM_CLK>; + clock-names = "iface", "core"; + assigned-clocks = <&gcc GCC_USB_HS_SYSTEM_CLK>; + assigned-clock-rates = <75000000>; + resets = <&gcc GCC_USB_HS_BCR>; + reset-names = "core"; + phy_type = "ulpi"; + dr_mode = "otg"; + hnp-disable; + srp-disable; + adp-disable; + ahb-burst-config = <0>; + phy-names = "usb-phy"; + phys = <&usb_hs_phy>; + status = "disabled"; + #reset-cells = <1>; + + ulpi { + usb_hs_phy: phy { + compatible = "qcom,usb-hs-phy-msm8226", + "qcom,usb-hs-phy"; + #phy-cells = <0>; + clocks = <&xo_board>, <&gcc GCC_USB2A_PHY_SLEEP_CLK>; + clock-names = "ref", "sleep"; + resets = <&gcc GCC_USB2A_PHY_BCR>, <&usb 0>; + reset-names = "phy", "por"; + qcom,init-seq = /bits/ 8 <0x0 0x44 + 0x1 0x68 0x2 0x24 0x3 0x13>; + }; + }; + }; + gcc: clock-controller@fc400000 { compatible = "qcom,gcc-msm8226"; reg = <0xfc400000 0x4000>; From patchwork Thu Nov 18 21:02:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 12627727 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAF21C433EF for ; Thu, 18 Nov 2021 21:03:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D723661929 for ; Thu, 18 Nov 2021 21:03:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233205AbhKRVGG (ORCPT ); Thu, 18 Nov 2021 16:06:06 -0500 Received: from mail.z3ntu.xyz ([128.199.32.197]:36954 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233364AbhKRVF4 (ORCPT ); Thu, 18 Nov 2021 16:05:56 -0500 Received: from localhost.localdomain (ip-213-127-109-54.ip.prioritytelecom.net [213.127.109.54]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id A7DE4CADFF; Thu, 18 Nov 2021 21:02:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1637269375; bh=//NLGnbvC246qJGsO6ju7lPD/sC++Pv0JTa54viAtSE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=kUswCj6csKemSJ8by6sKFzsv/JnHyPoD9KE/4AXBLlkK2ZtUi1OZxyXj7J0wiDTh1 +d/aZ/cTP3UFecpALOcrlrET4BX6Q9V8+G7QneMNJG/D8qBzgxY4+3swO0AkNj7bDe 2bAQMrOJ/dDVqkR6PcgBGDFukg3FgCBKS3vDNcnA= From: Luca Weiss To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Luca Weiss , Andy Gross , Bjorn Andersson , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/7] ARM: dts: qcom: apq8026-lg-lenok: enable USB Date: Thu, 18 Nov 2021 22:02:10 +0100 Message-Id: <20211118210210.160895-7-luca@z3ntu.xyz> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211118210210.160895-1-luca@z3ntu.xyz> References: <20211118210210.160895-1-luca@z3ntu.xyz> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Enable the USB nodes so it becomes usable on the device. Signed-off-by: Luca Weiss --- arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts b/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts index 4e7a596d6101..1519544029e7 100644 --- a/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts +++ b/arch/arm/boot/dts/qcom-apq8026-lg-lenok.dts @@ -253,3 +253,15 @@ reset { }; }; }; + +&usb { + status = "okay"; + extcon = <&smbb>; + dr_mode = "peripheral"; +}; + +&usb_hs_phy { + extcon = <&smbb>; + v1p8-supply = <&pm8226_l10>; + v3p3-supply = <&pm8226_l20>; +};