* [PATCH 3/7] ARM: dts: qcom: pm8226: add smbb charger node
2021-11-18 21:02 [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226 Luca Weiss
@ 2021-11-18 21:02 ` Luca Weiss
2021-11-18 21:02 ` [PATCH 4/7] ARM: dts: qcom: apq8026-lg-lenok: configure SMBB charger Luca Weiss
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Luca Weiss @ 2021-11-18 21:02 UTC (permalink / raw)
To: linux-arm-msm
Cc: ~postmarketos/upstreaming, phone-devel, Luca Weiss, Andy Gross,
Bjorn Andersson, Rob Herring, devicetree, linux-kernel
Add a node for the battery charger included in pm8226.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
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 {
--
2.34.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/7] ARM: dts: qcom: apq8026-lg-lenok: configure SMBB charger
2021-11-18 21:02 [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226 Luca Weiss
2021-11-18 21:02 ` [PATCH 3/7] ARM: dts: qcom: pm8226: add smbb charger node Luca Weiss
@ 2021-11-18 21:02 ` Luca Weiss
2021-11-18 21:02 ` [PATCH 5/7] dt-bindings: phy: qcom,usb-hs-phy: add MSM8226 compatible Luca Weiss
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Luca Weiss @ 2021-11-18 21:02 UTC (permalink / raw)
To: linux-arm-msm
Cc: ~postmarketos/upstreaming, phone-devel, Luca Weiss, Andy Gross,
Bjorn Andersson, Rob Herring, devicetree, linux-kernel
Configure the SMBB charger according to the downstream kernel, some
values are rounded according to driver warnings.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
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 {
--
2.34.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 5/7] dt-bindings: phy: qcom,usb-hs-phy: add MSM8226 compatible
2021-11-18 21:02 [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226 Luca Weiss
2021-11-18 21:02 ` [PATCH 3/7] ARM: dts: qcom: pm8226: add smbb charger node Luca Weiss
2021-11-18 21:02 ` [PATCH 4/7] ARM: dts: qcom: apq8026-lg-lenok: configure SMBB charger Luca Weiss
@ 2021-11-18 21:02 ` Luca Weiss
2021-11-29 23:11 ` Rob Herring
2021-11-18 21:02 ` [PATCH 6/7] ARM: dts: qcom: msm8226: add USB node Luca Weiss
` (3 subsequent siblings)
6 siblings, 1 reply; 10+ messages in thread
From: Luca Weiss @ 2021-11-18 21:02 UTC (permalink / raw)
To: linux-arm-msm
Cc: ~postmarketos/upstreaming, phone-devel, Luca Weiss, Andy Gross,
Bjorn Andersson, Kishon Vijay Abraham I, Vinod Koul, Rob Herring,
linux-phy, devicetree, linux-kernel
Add a compatible for MSM8226 which also uses the USB HS PHY.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
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"
--
2.34.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 5/7] dt-bindings: phy: qcom,usb-hs-phy: add MSM8226 compatible
2021-11-18 21:02 ` [PATCH 5/7] dt-bindings: phy: qcom,usb-hs-phy: add MSM8226 compatible Luca Weiss
@ 2021-11-29 23:11 ` Rob Herring
0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2021-11-29 23:11 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, linux-arm-msm,
Andy Gross, Rob Herring, devicetree, linux-phy,
Kishon Vijay Abraham I, Bjorn Andersson, linux-kernel,
Vinod Koul
On Thu, 18 Nov 2021 22:02:08 +0100, Luca Weiss wrote:
> Add a compatible for MSM8226 which also uses the USB HS PHY.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
> Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt | 1 +
> 1 file changed, 1 insertion(+)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 6/7] ARM: dts: qcom: msm8226: add USB node
2021-11-18 21:02 [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226 Luca Weiss
` (2 preceding siblings ...)
2021-11-18 21:02 ` [PATCH 5/7] dt-bindings: phy: qcom,usb-hs-phy: add MSM8226 compatible Luca Weiss
@ 2021-11-18 21:02 ` Luca Weiss
2021-11-18 21:02 ` [PATCH 7/7] ARM: dts: qcom: apq8026-lg-lenok: enable USB Luca Weiss
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Luca Weiss @ 2021-11-18 21:02 UTC (permalink / raw)
To: linux-arm-msm
Cc: ~postmarketos/upstreaming, phone-devel, Luca Weiss, Andy Gross,
Bjorn Andersson, Rob Herring, devicetree, linux-kernel
Add a node describing the MSM8226 USB controller and phy.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
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 <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/qcom,gcc-msm8974.h>
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/reset/qcom,gcc-msm8974.h>
/ {
#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 = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
+ 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>;
--
2.34.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 7/7] ARM: dts: qcom: apq8026-lg-lenok: enable USB
2021-11-18 21:02 [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226 Luca Weiss
` (3 preceding siblings ...)
2021-11-18 21:02 ` [PATCH 6/7] ARM: dts: qcom: msm8226: add USB node Luca Weiss
@ 2021-11-18 21:02 ` Luca Weiss
2021-11-29 23:11 ` [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226 Rob Herring
2022-01-31 18:24 ` (subset) " Bjorn Andersson
6 siblings, 0 replies; 10+ messages in thread
From: Luca Weiss @ 2021-11-18 21:02 UTC (permalink / raw)
To: linux-arm-msm
Cc: ~postmarketos/upstreaming, phone-devel, Luca Weiss, Andy Gross,
Bjorn Andersson, Rob Herring, devicetree, linux-kernel
Enable the USB nodes so it becomes usable on the device.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
---
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>;
+};
--
2.34.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226
2021-11-18 21:02 [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226 Luca Weiss
` (4 preceding siblings ...)
2021-11-18 21:02 ` [PATCH 7/7] ARM: dts: qcom: apq8026-lg-lenok: enable USB Luca Weiss
@ 2021-11-29 23:11 ` Rob Herring
2021-11-30 11:02 ` Sebastian Reichel
2022-01-31 18:24 ` (subset) " Bjorn Andersson
6 siblings, 1 reply; 10+ messages in thread
From: Rob Herring @ 2021-11-29 23:11 UTC (permalink / raw)
To: Luca Weiss
Cc: linux-kernel, ~postmarketos/upstreaming, linux-arm-msm,
Sebastian Reichel, Rob Herring, devicetree, phone-devel,
linux-pm
On Thu, 18 Nov 2021 22:02:04 +0100, Luca Weiss wrote:
> The charger in PM8226 (used in MSM8226) is similar to the charger in
> PM8941.
>
> Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> ---
> .../devicetree/bindings/power/supply/qcom,pm8941-charger.yaml | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226
2021-11-29 23:11 ` [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226 Rob Herring
@ 2021-11-30 11:02 ` Sebastian Reichel
0 siblings, 0 replies; 10+ messages in thread
From: Sebastian Reichel @ 2021-11-30 11:02 UTC (permalink / raw)
To: Rob Herring
Cc: Luca Weiss, linux-kernel, ~postmarketos/upstreaming,
linux-arm-msm, Rob Herring, devicetree, phone-devel, linux-pm
[-- Attachment #1: Type: text/plain, Size: 494 bytes --]
Hi,
On Mon, Nov 29, 2021 at 05:11:00PM -0600, Rob Herring wrote:
> On Thu, 18 Nov 2021 22:02:04 +0100, Luca Weiss wrote:
> > The charger in PM8226 (used in MSM8226) is similar to the charger in
> > PM8941.
> >
> > Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
> > ---
> > .../devicetree/bindings/power/supply/qcom,pm8941-charger.yaml | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
>
> Acked-by: Rob Herring <robh@kernel.org>
Thanks, queued.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: (subset) [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226
2021-11-18 21:02 [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226 Luca Weiss
` (5 preceding siblings ...)
2021-11-29 23:11 ` [PATCH 1/7] dt-bindings: power: supply: pm8941-charger: add pm8226 Rob Herring
@ 2022-01-31 18:24 ` Bjorn Andersson
6 siblings, 0 replies; 10+ messages in thread
From: Bjorn Andersson @ 2022-01-31 18:24 UTC (permalink / raw)
To: linux-arm-msm, Luca Weiss
Cc: phone-devel, devicetree, ~postmarketos/upstreaming, Rob Herring,
linux-pm, Sebastian Reichel, linux-kernel
On Thu, 18 Nov 2021 22:02:04 +0100, Luca Weiss wrote:
> The charger in PM8226 (used in MSM8226) is similar to the charger in
> PM8941.
>
>
Applied, thanks!
[3/7] ARM: dts: qcom: pm8226: add smbb charger node
commit: b64192272cb65b0fddb97dba7c4f244452954a85
[4/7] ARM: dts: qcom: apq8026-lg-lenok: configure SMBB charger
commit: 0bbcddc5f0365937ed53ebf7daa98134a6ebce8d
[5/7] dt-bindings: phy: qcom,usb-hs-phy: add MSM8226 compatible
commit: c04421c68fd40ee33df87eea69c1a447b7985d0d
[6/7] ARM: dts: qcom: msm8226: add USB node
commit: 1a34117f2e145f158c339ad9d296c0c1c42bc504
[7/7] ARM: dts: qcom: apq8026-lg-lenok: enable USB
commit: f8565bd5404fcd6f87ee1e2d585541fbb457612d
Best regards,
--
Bjorn Andersson <bjorn.andersson@linaro.org>
^ permalink raw reply [flat|nested] 10+ messages in thread