Message ID | 20200604004331.669936-1-dmitry.baryshkov@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | [1/7] arm64: dts: qcom: pm8009: Add base dts file | expand |
On Thu, Jun 04, 2020 at 03:43:25AM +0300, Dmitry Baryshkov wrote: > Add base DTS file for pm8009 along with GPIOs and power-on nodes. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- > arch/arm64/boot/dts/qcom/pm8009.dtsi | 40 ++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > create mode 100644 arch/arm64/boot/dts/qcom/pm8009.dtsi > > diff --git a/arch/arm64/boot/dts/qcom/pm8009.dtsi b/arch/arm64/boot/dts/qcom/pm8009.dtsi > new file mode 100644 > index 000000000000..9f3e19b5bd00 > --- /dev/null > +++ b/arch/arm64/boot/dts/qcom/pm8009.dtsi > @@ -0,0 +1,40 @@ > +// SPDX-License-Identifier: BSD-3-Clause > +/* > + * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. > + * Copyright (c) 2019, Linaro Limited 2020 > + */ > + > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/interrupt-controller/irq.h> > +#include <dt-bindings/spmi/spmi.h> > +#include <dt-bindings/iio/qcom,spmi-vadc.h> Sort includes alphabetically. Thanks, Mani > + > +&spmi_bus { > + pmic@a { > + compatible = "qcom,pm8009", "qcom,spmi-pmic"; > + reg = <0xa SPMI_USID>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + power-on@800 { > + compatible = "qcom,pm8916-pon"; > + reg = <0x0800>; > + }; > + > + pm8009_gpios: gpio@c000 { > + compatible = "qcom,pm8005-gpio"; > + reg = <0xc000>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + }; > + > + pmic@b { > + compatible = "qcom,pm8009", "qcom,spmi-pmic"; > + reg = <0xb SPMI_USID>; > + #address-cells = <1>; > + #size-cells = <0>; > + }; > +}; > -- > 2.26.2 >
On 04-06-20, 03:43, Dmitry Baryshkov wrote: > Add base DTS file for pm8009 along with GPIOs and power-on nodes. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- > arch/arm64/boot/dts/qcom/pm8009.dtsi | 40 ++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > create mode 100644 arch/arm64/boot/dts/qcom/pm8009.dtsi > > diff --git a/arch/arm64/boot/dts/qcom/pm8009.dtsi b/arch/arm64/boot/dts/qcom/pm8009.dtsi > new file mode 100644 > index 000000000000..9f3e19b5bd00 > --- /dev/null > +++ b/arch/arm64/boot/dts/qcom/pm8009.dtsi > @@ -0,0 +1,40 @@ > +// SPDX-License-Identifier: BSD-3-Clause > +/* > + * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. > + * Copyright (c) 2019, Linaro Limited We are in 2020 :) > + */ > + > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/interrupt-controller/irq.h> DO you need these headers for base patch, we should add them when adding uses of this file > +#include <dt-bindings/spmi/spmi.h> > +#include <dt-bindings/iio/qcom,spmi-vadc.h> This one too > + > +&spmi_bus { > + pmic@a { > + compatible = "qcom,pm8009", "qcom,spmi-pmic"; > + reg = <0xa SPMI_USID>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + power-on@800 { > + compatible = "qcom,pm8916-pon"; > + reg = <0x0800>; > + }; > + > + pm8009_gpios: gpio@c000 { > + compatible = "qcom,pm8005-gpio"; > + reg = <0xc000>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + }; > + > + pmic@b { > + compatible = "qcom,pm8009", "qcom,spmi-pmic"; > + reg = <0xb SPMI_USID>; > + #address-cells = <1>; > + #size-cells = <0>; > + }; > +}; > -- > 2.26.2 -- ~Vinod
On Wed 03 Jun 17:43 PDT 2020, Dmitry Baryshkov wrote: > Add base DTS file for pm8009 along with GPIOs and power-on nodes. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- > arch/arm64/boot/dts/qcom/pm8009.dtsi | 40 ++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > create mode 100644 arch/arm64/boot/dts/qcom/pm8009.dtsi > > diff --git a/arch/arm64/boot/dts/qcom/pm8009.dtsi b/arch/arm64/boot/dts/qcom/pm8009.dtsi > new file mode 100644 > index 000000000000..9f3e19b5bd00 > --- /dev/null > +++ b/arch/arm64/boot/dts/qcom/pm8009.dtsi > @@ -0,0 +1,40 @@ > +// SPDX-License-Identifier: BSD-3-Clause > +/* > + * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. > + * Copyright (c) 2019, Linaro Limited > + */ > + > +#include <dt-bindings/input/input.h> > +#include <dt-bindings/interrupt-controller/irq.h> > +#include <dt-bindings/spmi/spmi.h> > +#include <dt-bindings/iio/qcom,spmi-vadc.h> > + > +&spmi_bus { > + pmic@a { > + compatible = "qcom,pm8009", "qcom,spmi-pmic"; > + reg = <0xa SPMI_USID>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + power-on@800 { Please name this "pon", just for consistency. > + compatible = "qcom,pm8916-pon"; Can you confirm that pm8009 is subtype 1, and hence the reboot reason going into RB_SPARE should be shifted 2 steps, rather than 1 as in the newer PMICs? Would be nice if we had a generic compatible that read the subtype, rather than having to add new compatibles for each pmic (or use the old ones)... Regards, Bjorn > + reg = <0x0800>; > + }; > + > + pm8009_gpios: gpio@c000 { > + compatible = "qcom,pm8005-gpio"; > + reg = <0xc000>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + }; > + > + pmic@b { > + compatible = "qcom,pm8009", "qcom,spmi-pmic"; > + reg = <0xb SPMI_USID>; > + #address-cells = <1>; > + #size-cells = <0>; > + }; > +}; > -- > 2.26.2 >
On Sun, 21 Jun 2020 at 09:45, Bjorn Andersson <bjorn.andersson@linaro.org> wrote: > > On Wed 03 Jun 17:43 PDT 2020, Dmitry Baryshkov wrote: > > > Add base DTS file for pm8009 along with GPIOs and power-on nodes. > > > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > --- > > arch/arm64/boot/dts/qcom/pm8009.dtsi | 40 ++++++++++++++++++++++++++++ > > 1 file changed, 40 insertions(+) > > create mode 100644 arch/arm64/boot/dts/qcom/pm8009.dtsi > > > > diff --git a/arch/arm64/boot/dts/qcom/pm8009.dtsi b/arch/arm64/boot/dts/qcom/pm8009.dtsi > > new file mode 100644 > > index 000000000000..9f3e19b5bd00 > > --- /dev/null > > +++ b/arch/arm64/boot/dts/qcom/pm8009.dtsi > > @@ -0,0 +1,40 @@ > > +// SPDX-License-Identifier: BSD-3-Clause > > +/* > > + * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. > > + * Copyright (c) 2019, Linaro Limited > > + */ > > + > > +#include <dt-bindings/input/input.h> > > +#include <dt-bindings/interrupt-controller/irq.h> > > +#include <dt-bindings/spmi/spmi.h> > > +#include <dt-bindings/iio/qcom,spmi-vadc.h> > > + > > +&spmi_bus { > > + pmic@a { > > + compatible = "qcom,pm8009", "qcom,spmi-pmic"; > > + reg = <0xa SPMI_USID>; > > + #address-cells = <1>; > > + #size-cells = <0>; > > + > > + power-on@800 { > > Please name this "pon", just for consistency. > > > + compatible = "qcom,pm8916-pon"; > > Can you confirm that pm8009 is subtype 1, and hence the reboot reason > going into RB_SPARE should be shifted 2 steps, rather than 1 as in the > newer PMICs? For pm8009 the subtype reads as 0x07, while according to msm-4.19 gen2 handling is only enabled for subtypes 0x04 and 0x05. > Would be nice if we had a generic compatible that read the subtype, > rather than having to add new compatibles for each pmic (or use the old > ones)... Will do it in a separate patch. -- With best wishes Dmitry
diff --git a/arch/arm64/boot/dts/qcom/pm8009.dtsi b/arch/arm64/boot/dts/qcom/pm8009.dtsi new file mode 100644 index 000000000000..9f3e19b5bd00 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/pm8009.dtsi @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2019, Linaro Limited + */ + +#include <dt-bindings/input/input.h> +#include <dt-bindings/interrupt-controller/irq.h> +#include <dt-bindings/spmi/spmi.h> +#include <dt-bindings/iio/qcom,spmi-vadc.h> + +&spmi_bus { + pmic@a { + compatible = "qcom,pm8009", "qcom,spmi-pmic"; + reg = <0xa SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + power-on@800 { + compatible = "qcom,pm8916-pon"; + reg = <0x0800>; + }; + + pm8009_gpios: gpio@c000 { + compatible = "qcom,pm8005-gpio"; + reg = <0xc000>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; + + pmic@b { + compatible = "qcom,pm8009", "qcom,spmi-pmic"; + reg = <0xb SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + }; +};
Add base DTS file for pm8009 along with GPIOs and power-on nodes. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- arch/arm64/boot/dts/qcom/pm8009.dtsi | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/pm8009.dtsi -- 2.26.2