* [PATCH 0/6] ARM: dts: qcom: apq8074-dragonboard: enable additional devices
@ 2023-05-08 0:33 Dmitry Baryshkov
2023-05-08 0:33 ` [PATCH 1/6] dt-bindings: power: reset: qcom-pon: define pm8941-pon Dmitry Baryshkov
` (5 more replies)
0 siblings, 6 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2023-05-08 0:33 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Vinod Koul
Cc: linux-pm, devicetree, linux-arm-msm
Add support for buttons, LEDs and coincell charger found on the APQ8074
dragonboard device.
For PM8941 we don't have a defined field to store the reset reason.
Support wrapping pwrkey and resin, but without writing the reset
reason.
Dmitry Baryshkov (6):
dt-bindings: power: reset: qcom-pon: define pm8941-pon
power: reset: qcom-pon: add support for pm8941-pon
ARM: dts: qcom-pm8941: add resin support
ARM: dts: qcom: apq8074-dragonboard: add resin and gpio keys
ARM: dts: qcom: apq8074-dragonboard: add onboard leds
ARM: dts: qcom: apq8074-dragonboard: enable coincell charger
.../bindings/power/reset/qcom,pon.yaml | 2 +
.../arm/boot/dts/qcom-apq8074-dragonboard.dts | 71 +++++++++++++++++++
arch/arm/boot/dts/qcom-pm8941.dtsi | 22 ++++--
drivers/power/reset/qcom-pon.c | 22 ++++--
4 files changed, 105 insertions(+), 12 deletions(-)
--
2.39.2
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/6] dt-bindings: power: reset: qcom-pon: define pm8941-pon
2023-05-08 0:33 [PATCH 0/6] ARM: dts: qcom: apq8074-dragonboard: enable additional devices Dmitry Baryshkov
@ 2023-05-08 0:33 ` Dmitry Baryshkov
2023-05-08 1:26 ` Rob Herring
2023-05-08 9:13 ` Krzysztof Kozlowski
2023-05-08 0:33 ` [PATCH 2/6] power: reset: qcom-pon: add support for pm8941-pon Dmitry Baryshkov
` (4 subsequent siblings)
5 siblings, 2 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2023-05-08 0:33 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Vinod Koul
Cc: linux-pm, devicetree, linux-arm-msm
On PM8941 pon doesn't store the reset reason. However we still need the
wrapping node for pwrkey and resin nodes. Add bindings for pm8941-pon
device.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
Documentation/devicetree/bindings/power/reset/qcom,pon.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
index d96170eecbd2..0f4f55dd4eac 100644
--- a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
+++ b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
@@ -19,6 +19,7 @@ properties:
compatible:
enum:
- qcom,pm8916-pon
+ - qcom,pm8941-pon
- qcom,pms405-pon
- qcom,pm8998-pon
- qcom,pmk8350-pon
@@ -63,6 +64,7 @@ allOf:
contains:
enum:
- qcom,pm8916-pon
+ - qcom,pm8941-pon
- qcom,pms405-pon
- qcom,pm8998-pon
then:
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/6] power: reset: qcom-pon: add support for pm8941-pon
2023-05-08 0:33 [PATCH 0/6] ARM: dts: qcom: apq8074-dragonboard: enable additional devices Dmitry Baryshkov
2023-05-08 0:33 ` [PATCH 1/6] dt-bindings: power: reset: qcom-pon: define pm8941-pon Dmitry Baryshkov
@ 2023-05-08 0:33 ` Dmitry Baryshkov
2023-05-08 0:33 ` [PATCH 3/6] ARM: dts: qcom-pm8941: add resin support Dmitry Baryshkov
` (3 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2023-05-08 0:33 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Vinod Koul
Cc: linux-pm, devicetree, linux-arm-msm
For PM8941 we don't have a defined field to store the reset reason.
Support wrapping pwrkey and resin, but without writing the reset
reason.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/power/reset/qcom-pon.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/drivers/power/reset/qcom-pon.c b/drivers/power/reset/qcom-pon.c
index 16bc01738be9..d42475bc0ee6 100644
--- a/drivers/power/reset/qcom-pon.c
+++ b/drivers/power/reset/qcom-pon.c
@@ -17,6 +17,8 @@
#define GEN1_REASON_SHIFT 2
#define GEN2_REASON_SHIFT 1
+#define NO_REASON_SHIFT 0
+
struct pm8916_pon {
struct device *dev;
struct regmap *regmap;
@@ -45,6 +47,7 @@ static int pm8916_reboot_mode_write(struct reboot_mode_driver *reboot,
static int pm8916_pon_probe(struct platform_device *pdev)
{
struct pm8916_pon *pon;
+ long reason_shift;
int error;
pon = devm_kzalloc(&pdev->dev, sizeof(*pon), GFP_KERNEL);
@@ -64,13 +67,17 @@ static int pm8916_pon_probe(struct platform_device *pdev)
if (error)
return error;
- pon->reboot_mode.dev = &pdev->dev;
- pon->reason_shift = (long)of_device_get_match_data(&pdev->dev);
- pon->reboot_mode.write = pm8916_reboot_mode_write;
- error = devm_reboot_mode_register(&pdev->dev, &pon->reboot_mode);
- if (error) {
- dev_err(&pdev->dev, "can't register reboot mode\n");
- return error;
+ reason_shift = (long)of_device_get_match_data(&pdev->dev);
+
+ if (reason_shift != NO_REASON_SHIFT) {
+ pon->reboot_mode.dev = &pdev->dev;
+ pon->reason_shift = reason_shift;
+ pon->reboot_mode.write = pm8916_reboot_mode_write;
+ error = devm_reboot_mode_register(&pdev->dev, &pon->reboot_mode);
+ if (error) {
+ dev_err(&pdev->dev, "can't register reboot mode\n");
+ return error;
+ }
}
platform_set_drvdata(pdev, pon);
@@ -80,6 +87,7 @@ static int pm8916_pon_probe(struct platform_device *pdev)
static const struct of_device_id pm8916_pon_id_table[] = {
{ .compatible = "qcom,pm8916-pon", .data = (void *)GEN1_REASON_SHIFT },
+ { .compatible = "qcom,pm8941-pon", .data = (void *)NO_REASON_SHIFT },
{ .compatible = "qcom,pms405-pon", .data = (void *)GEN1_REASON_SHIFT },
{ .compatible = "qcom,pm8998-pon", .data = (void *)GEN2_REASON_SHIFT },
{ .compatible = "qcom,pmk8350-pon", .data = (void *)GEN2_REASON_SHIFT },
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 3/6] ARM: dts: qcom-pm8941: add resin support
2023-05-08 0:33 [PATCH 0/6] ARM: dts: qcom: apq8074-dragonboard: enable additional devices Dmitry Baryshkov
2023-05-08 0:33 ` [PATCH 1/6] dt-bindings: power: reset: qcom-pon: define pm8941-pon Dmitry Baryshkov
2023-05-08 0:33 ` [PATCH 2/6] power: reset: qcom-pon: add support for pm8941-pon Dmitry Baryshkov
@ 2023-05-08 0:33 ` Dmitry Baryshkov
2023-05-08 9:01 ` Konrad Dybcio
2023-05-08 0:33 ` [PATCH 4/6] ARM: dts: qcom: apq8074-dragonboard: add resin and gpio keys Dmitry Baryshkov
` (2 subsequent siblings)
5 siblings, 1 reply; 14+ messages in thread
From: Dmitry Baryshkov @ 2023-05-08 0:33 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Vinod Koul
Cc: linux-pm, devicetree, linux-arm-msm
Wrap existing pwrkey and new resin nodes into the new pon node to enable
volume-down key support on platforms using pm8941 PMIC.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm/boot/dts/qcom-pm8941.dtsi | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
index a821f0368a28..ce30946ccf58 100644
--- a/arch/arm/boot/dts/qcom-pm8941.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
@@ -19,12 +19,24 @@ rtc@6000 {
interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
};
- pwrkey@800 {
- compatible = "qcom,pm8941-pwrkey";
+ pon@800 {
+ compatible = "qcom,pm8916-pon";
reg = <0x800>;
- interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
- debounce = <15625>;
- bias-pull-up;
+
+ pwrkey {
+ compatible = "qcom,pm8941-pwrkey";
+ interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ };
+
+ pm8941_resin: resin {
+ compatible = "qcom,pm8941-resin";
+ interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
+ debounce = <15625>;
+ bias-pull-up;
+ status = "disabled";
+ };
};
usb_id: usb-detect@900 {
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 4/6] ARM: dts: qcom: apq8074-dragonboard: add resin and gpio keys
2023-05-08 0:33 [PATCH 0/6] ARM: dts: qcom: apq8074-dragonboard: enable additional devices Dmitry Baryshkov
` (2 preceding siblings ...)
2023-05-08 0:33 ` [PATCH 3/6] ARM: dts: qcom-pm8941: add resin support Dmitry Baryshkov
@ 2023-05-08 0:33 ` Dmitry Baryshkov
2023-05-08 9:01 ` Konrad Dybcio
2023-05-08 0:33 ` [PATCH 5/6] ARM: dts: qcom: apq8074-dragonboard: add onboard leds Dmitry Baryshkov
2023-05-08 0:33 ` [PATCH 6/6] ARM: dts: qcom: apq8074-dragonboard: enable coincell charger Dmitry Baryshkov
5 siblings, 1 reply; 14+ messages in thread
From: Dmitry Baryshkov @ 2023-05-08 0:33 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Vinod Koul
Cc: linux-pm, devicetree, linux-arm-msm
Add device nodes for resin (reset, volume-down) and gpio-keys
(volume-up, general key) device nodes.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
.../arm/boot/dts/qcom-apq8074-dragonboard.dts | 41 +++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
index 72f7e09a5bbf..2017bdf81677 100644
--- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
+++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include "qcom-msm8974.dtsi"
#include "qcom-pm8841.dtsi"
#include "qcom-pm8941.dtsi"
@@ -20,6 +22,26 @@ chosen {
stdout-path = "serial0:115200n8";
};
+ gpio-keys {
+ compatible = "gpio-keys";
+ autorepeat;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&msm_keys_default>;
+
+ button-volup {
+ label = "Volume Up";
+ linux,code = <KEY_VOLUMEUP>;
+ gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
+ };
+
+ button-general {
+ label = "General";
+ linux,code = <KEY_PROG1>;
+ gpios = <&pm8941_gpios 23 GPIO_ACTIVE_LOW>;
+ };
+ };
+
reserved-memory {
mpss_region: mpss@ac00000 {
reg = <0x0ac00000 0x2500000>;
@@ -90,6 +112,25 @@ &mdss {
status = "okay";
};
+&pm8941_gpios {
+ msm_keys_default: pm8941-gpio-keys-state {
+ pinconf {
+ pins = "gpio5", "gpio23";
+ function = "normal";
+ input-enable;
+ drive-push-pull;
+ bias-pull-up;
+ qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
+ power-source = <PM8941_GPIO_S3>; /* 1.8V */
+ };
+ };
+};
+
+&pm8941_resin {
+ status = "okay";
+ linux,code = <KEY_VOLUMEDOWN>;
+};
+
&pm8941_wled {
qcom,cs-out;
qcom,switching-freq = <3200>;
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 5/6] ARM: dts: qcom: apq8074-dragonboard: add onboard leds
2023-05-08 0:33 [PATCH 0/6] ARM: dts: qcom: apq8074-dragonboard: enable additional devices Dmitry Baryshkov
` (3 preceding siblings ...)
2023-05-08 0:33 ` [PATCH 4/6] ARM: dts: qcom: apq8074-dragonboard: add resin and gpio keys Dmitry Baryshkov
@ 2023-05-08 0:33 ` Dmitry Baryshkov
2023-05-08 9:02 ` Konrad Dybcio
2023-05-08 0:33 ` [PATCH 6/6] ARM: dts: qcom: apq8074-dragonboard: enable coincell charger Dmitry Baryshkov
5 siblings, 1 reply; 14+ messages in thread
From: Dmitry Baryshkov @ 2023-05-08 0:33 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Vinod Koul
Cc: linux-pm, devicetree, linux-arm-msm
The dragonboard as three LEDs: red, green and blue. Add corresponding
description.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
.../arm/boot/dts/qcom-apq8074-dragonboard.dts | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
index 2017bdf81677..16d609b85dfe 100644
--- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
+++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include "qcom-msm8974.dtsi"
#include "qcom-pm8841.dtsi"
@@ -126,6 +127,29 @@ pinconf {
};
};
+&pm8941_lpg {
+ qcom,power-source = <1>;
+ status = "okay";
+
+ led@5 {
+ reg = <5>;
+ color = <LED_COLOR_ID_BLUE>;
+ function = LED_FUNCTION_INDICATOR;
+ };
+
+ led@6 {
+ reg = <6>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_INDICATOR;
+ };
+
+ led@7 {
+ reg = <7>;
+ color = <LED_COLOR_ID_RED>;
+ function = LED_FUNCTION_INDICATOR;
+ };
+};
+
&pm8941_resin {
status = "okay";
linux,code = <KEY_VOLUMEDOWN>;
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 6/6] ARM: dts: qcom: apq8074-dragonboard: enable coincell charger
2023-05-08 0:33 [PATCH 0/6] ARM: dts: qcom: apq8074-dragonboard: enable additional devices Dmitry Baryshkov
` (4 preceding siblings ...)
2023-05-08 0:33 ` [PATCH 5/6] ARM: dts: qcom: apq8074-dragonboard: add onboard leds Dmitry Baryshkov
@ 2023-05-08 0:33 ` Dmitry Baryshkov
2023-05-08 9:02 ` Konrad Dybcio
5 siblings, 1 reply; 14+ messages in thread
From: Dmitry Baryshkov @ 2023-05-08 0:33 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Vinod Koul
Cc: linux-pm, devicetree, linux-arm-msm
Enable coincell charger for the coin battery which can be installed on
the APQ8074 dragonboard.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
index 16d609b85dfe..1d1c08674254 100644
--- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
+++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
@@ -113,6 +113,12 @@ &mdss {
status = "okay";
};
+&pm8941_coincell {
+ qcom,rset-ohms = <2100>;
+ qcom,vset-millivolts = <3000>;
+ status = "okay";
+};
+
&pm8941_gpios {
msm_keys_default: pm8941-gpio-keys-state {
pinconf {
--
2.39.2
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 1/6] dt-bindings: power: reset: qcom-pon: define pm8941-pon
2023-05-08 0:33 ` [PATCH 1/6] dt-bindings: power: reset: qcom-pon: define pm8941-pon Dmitry Baryshkov
@ 2023-05-08 1:26 ` Rob Herring
2023-05-08 9:13 ` Krzysztof Kozlowski
1 sibling, 0 replies; 14+ messages in thread
From: Rob Herring @ 2023-05-08 1:26 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Vinod Koul, Rob Herring, linux-pm, linux-arm-msm,
Bjorn Andersson, Konrad Dybcio, devicetree, Sebastian Reichel,
Andy Gross, Krzysztof Kozlowski
On Mon, 08 May 2023 03:33:04 +0300, Dmitry Baryshkov wrote:
> On PM8941 pon doesn't store the reset reason. However we still need the
> wrapping node for pwrkey and resin nodes. Add bindings for pm8941-pon
> device.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> Documentation/devicetree/bindings/power/reset/qcom,pon.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.example.dtb: camera-sensor@3c: port:endpoint:data-lanes: [[1]] is too short
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/rockchip-isp1.example.dtb: camera@3c: port:endpoint:data-lanes: [[1]] is too short
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/media/i2c/ovti,ov2685.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.example.dtb: pcie-ep@33800000: Unevaluated properties are not allowed ('assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' were unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-ep.yaml
doc reference errors (make refcheckdocs):
Documentation/usb/gadget_uvc.rst: Documentation/userspace-api/media/v4l/pixfmt-packed.yuv.rst
MAINTAINERS: Documentation/devicetree/bindings/pwm/pwm-apple.yaml
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230508003309.2363787-2-dmitry.baryshkov@linaro.org
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 3/6] ARM: dts: qcom-pm8941: add resin support
2023-05-08 0:33 ` [PATCH 3/6] ARM: dts: qcom-pm8941: add resin support Dmitry Baryshkov
@ 2023-05-08 9:01 ` Konrad Dybcio
0 siblings, 0 replies; 14+ messages in thread
From: Konrad Dybcio @ 2023-05-08 9:01 UTC (permalink / raw)
To: Dmitry Baryshkov, Sebastian Reichel, Rob Herring,
Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Vinod Koul
Cc: linux-pm, devicetree, linux-arm-msm
On 8.05.2023 02:33, Dmitry Baryshkov wrote:
> Wrap existing pwrkey and new resin nodes into the new pon node to enable
> volume-down key support on platforms using pm8941 PMIC.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> arch/arm/boot/dts/qcom-pm8941.dtsi | 22 +++++++++++++++++-----
> 1 file changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
> index a821f0368a28..ce30946ccf58 100644
> --- a/arch/arm/boot/dts/qcom-pm8941.dtsi
> +++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
> @@ -19,12 +19,24 @@ rtc@6000 {
> interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
> };
>
> - pwrkey@800 {
> - compatible = "qcom,pm8941-pwrkey";
> + pon@800 {
> + compatible = "qcom,pm8916-pon";
You just added a new one! :P
Konrad
> reg = <0x800>;
> - interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
> - debounce = <15625>;
> - bias-pull-up;
> +
> + pwrkey {
> + compatible = "qcom,pm8941-pwrkey";
> + interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
> + debounce = <15625>;
> + bias-pull-up;
> + };
> +
> + pm8941_resin: resin {
> + compatible = "qcom,pm8941-resin";
> + interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
> + debounce = <15625>;
> + bias-pull-up;
> + status = "disabled";
> + };
> };
>
> usb_id: usb-detect@900 {
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 4/6] ARM: dts: qcom: apq8074-dragonboard: add resin and gpio keys
2023-05-08 0:33 ` [PATCH 4/6] ARM: dts: qcom: apq8074-dragonboard: add resin and gpio keys Dmitry Baryshkov
@ 2023-05-08 9:01 ` Konrad Dybcio
0 siblings, 0 replies; 14+ messages in thread
From: Konrad Dybcio @ 2023-05-08 9:01 UTC (permalink / raw)
To: Dmitry Baryshkov, Sebastian Reichel, Rob Herring,
Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Vinod Koul
Cc: linux-pm, devicetree, linux-arm-msm
On 8.05.2023 02:33, Dmitry Baryshkov wrote:
> Add device nodes for resin (reset, volume-down) and gpio-keys
> (volume-up, general key) device nodes.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> .../arm/boot/dts/qcom-apq8074-dragonboard.dts | 41 +++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
> index 72f7e09a5bbf..2017bdf81677 100644
> --- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
> +++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
> @@ -1,5 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0
> #include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
> #include "qcom-msm8974.dtsi"
> #include "qcom-pm8841.dtsi"
> #include "qcom-pm8941.dtsi"
> @@ -20,6 +22,26 @@ chosen {
> stdout-path = "serial0:115200n8";
> };
>
> + gpio-keys {
> + compatible = "gpio-keys";
> + autorepeat;
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&msm_keys_default>;
property-n
property-names
> +
> + button-volup {
> + label = "Volume Up";
> + linux,code = <KEY_VOLUMEUP>;
> + gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
> + };
> +
> + button-general {
> + label = "General";
> + linux,code = <KEY_PROG1>;
> + gpios = <&pm8941_gpios 23 GPIO_ACTIVE_LOW>;
> + };
> + };
> +
> reserved-memory {
> mpss_region: mpss@ac00000 {
> reg = <0x0ac00000 0x2500000>;
> @@ -90,6 +112,25 @@ &mdss {
> status = "okay";
> };
>
> +&pm8941_gpios {
> + msm_keys_default: pm8941-gpio-keys-state {
> + pinconf {
unnecessary pinconf{} level
> + pins = "gpio5", "gpio23";
> + function = "normal";
> + input-enable;
> + drive-push-pull;
> + bias-pull-up;
> + qcom,drive-strength = <PMIC_GPIO_STRENGTH_NO>;
> + power-source = <PM8941_GPIO_S3>; /* 1.8V */
> + };
> + };
> +};
> +
> +&pm8941_resin {
> + status = "okay";
status last
> + linux,code = <KEY_VOLUMEDOWN>;
Konrad
> +};
> +
> &pm8941_wled {
> qcom,cs-out;
> qcom,switching-freq = <3200>;
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 5/6] ARM: dts: qcom: apq8074-dragonboard: add onboard leds
2023-05-08 0:33 ` [PATCH 5/6] ARM: dts: qcom: apq8074-dragonboard: add onboard leds Dmitry Baryshkov
@ 2023-05-08 9:02 ` Konrad Dybcio
0 siblings, 0 replies; 14+ messages in thread
From: Konrad Dybcio @ 2023-05-08 9:02 UTC (permalink / raw)
To: Dmitry Baryshkov, Sebastian Reichel, Rob Herring,
Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Vinod Koul
Cc: linux-pm, devicetree, linux-arm-msm
On 8.05.2023 02:33, Dmitry Baryshkov wrote:
> The dragonboard as three LEDs: red, green and blue. Add corresponding
> description.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> .../arm/boot/dts/qcom-apq8074-dragonboard.dts | 24 +++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
> index 2017bdf81677..16d609b85dfe 100644
> --- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
> +++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
> @@ -1,6 +1,7 @@
> // SPDX-License-Identifier: GPL-2.0
> #include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/input/input.h>
> +#include <dt-bindings/leds/common.h>
> #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
> #include "qcom-msm8974.dtsi"
> #include "qcom-pm8841.dtsi"
> @@ -126,6 +127,29 @@ pinconf {
> };
> };
>
> +&pm8941_lpg {
> + qcom,power-source = <1>;
> + status = "okay";
> +
> + led@5 {
> + reg = <5>;
> + color = <LED_COLOR_ID_BLUE>;
> + function = LED_FUNCTION_INDICATOR;
> + };
> +
> + led@6 {
> + reg = <6>;
> + color = <LED_COLOR_ID_GREEN>;
> + function = LED_FUNCTION_INDICATOR;
> + };
> +
> + led@7 {
> + reg = <7>;
> + color = <LED_COLOR_ID_RED>;
> + function = LED_FUNCTION_INDICATOR;
> + };
This introduces broken indentation
Konrad
> +};
> +
> &pm8941_resin {
> status = "okay";
> linux,code = <KEY_VOLUMEDOWN>;
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 6/6] ARM: dts: qcom: apq8074-dragonboard: enable coincell charger
2023-05-08 0:33 ` [PATCH 6/6] ARM: dts: qcom: apq8074-dragonboard: enable coincell charger Dmitry Baryshkov
@ 2023-05-08 9:02 ` Konrad Dybcio
2023-05-08 11:44 ` Dmitry Baryshkov
0 siblings, 1 reply; 14+ messages in thread
From: Konrad Dybcio @ 2023-05-08 9:02 UTC (permalink / raw)
To: Dmitry Baryshkov, Sebastian Reichel, Rob Herring,
Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Vinod Koul
Cc: linux-pm, devicetree, linux-arm-msm
On 8.05.2023 02:33, Dmitry Baryshkov wrote:
> Enable coincell charger for the coin battery which can be installed on
> the APQ8074 dragonboard.
Wait.. you can insert a CR2023 or whatever and charge it?
That's the most expensive and ridiculous charger.. I love it..
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
> arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
> index 16d609b85dfe..1d1c08674254 100644
> --- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
> +++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
> @@ -113,6 +113,12 @@ &mdss {
> status = "okay";
> };
>
> +&pm8941_coincell {
> + qcom,rset-ohms = <2100>;
> + qcom,vset-millivolts = <3000>;
> + status = "okay";
> +};
> +
> &pm8941_gpios {
> msm_keys_default: pm8941-gpio-keys-state {
> pinconf {
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/6] dt-bindings: power: reset: qcom-pon: define pm8941-pon
2023-05-08 0:33 ` [PATCH 1/6] dt-bindings: power: reset: qcom-pon: define pm8941-pon Dmitry Baryshkov
2023-05-08 1:26 ` Rob Herring
@ 2023-05-08 9:13 ` Krzysztof Kozlowski
1 sibling, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-08 9:13 UTC (permalink / raw)
To: Dmitry Baryshkov, Sebastian Reichel, Rob Herring,
Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Konrad Dybcio,
Vinod Koul
Cc: linux-pm, devicetree, linux-arm-msm
On 08/05/2023 02:33, Dmitry Baryshkov wrote:
> On PM8941 pon doesn't store the reset reason. However we still need the
> wrapping node for pwrkey and resin nodes. Add bindings for pm8941-pon
> device.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> Documentation/devicetree/bindings/power/reset/qcom,pon.yaml | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 6/6] ARM: dts: qcom: apq8074-dragonboard: enable coincell charger
2023-05-08 9:02 ` Konrad Dybcio
@ 2023-05-08 11:44 ` Dmitry Baryshkov
0 siblings, 0 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2023-05-08 11:44 UTC (permalink / raw)
To: Konrad Dybcio, Sebastian Reichel, Rob Herring,
Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Vinod Koul
Cc: linux-pm, devicetree, linux-arm-msm
On 08/05/2023 12:02, Konrad Dybcio wrote:
>
>
> On 8.05.2023 02:33, Dmitry Baryshkov wrote:
>> Enable coincell charger for the coin battery which can be installed on
>> the APQ8074 dragonboard.
> Wait.. you can insert a CR2023 or whatever and charge it?
>
> That's the most expensive and ridiculous charger.. I love it..
Not a 2023, it is something smaller. I will try finding a correct size.
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>
> Konrad
>> arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
>> index 16d609b85dfe..1d1c08674254 100644
>> --- a/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
>> +++ b/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
>> @@ -113,6 +113,12 @@ &mdss {
>> status = "okay";
>> };
>>
>> +&pm8941_coincell {
>> + qcom,rset-ohms = <2100>;
>> + qcom,vset-millivolts = <3000>;
>> + status = "okay";
>> +};
>> +
>> &pm8941_gpios {
>> msm_keys_default: pm8941-gpio-keys-state {
>> pinconf {
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2023-05-08 11:45 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-08 0:33 [PATCH 0/6] ARM: dts: qcom: apq8074-dragonboard: enable additional devices Dmitry Baryshkov
2023-05-08 0:33 ` [PATCH 1/6] dt-bindings: power: reset: qcom-pon: define pm8941-pon Dmitry Baryshkov
2023-05-08 1:26 ` Rob Herring
2023-05-08 9:13 ` Krzysztof Kozlowski
2023-05-08 0:33 ` [PATCH 2/6] power: reset: qcom-pon: add support for pm8941-pon Dmitry Baryshkov
2023-05-08 0:33 ` [PATCH 3/6] ARM: dts: qcom-pm8941: add resin support Dmitry Baryshkov
2023-05-08 9:01 ` Konrad Dybcio
2023-05-08 0:33 ` [PATCH 4/6] ARM: dts: qcom: apq8074-dragonboard: add resin and gpio keys Dmitry Baryshkov
2023-05-08 9:01 ` Konrad Dybcio
2023-05-08 0:33 ` [PATCH 5/6] ARM: dts: qcom: apq8074-dragonboard: add onboard leds Dmitry Baryshkov
2023-05-08 9:02 ` Konrad Dybcio
2023-05-08 0:33 ` [PATCH 6/6] ARM: dts: qcom: apq8074-dragonboard: enable coincell charger Dmitry Baryshkov
2023-05-08 9:02 ` Konrad Dybcio
2023-05-08 11:44 ` Dmitry Baryshkov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.