Re: [PATCH v2 2/6] ARM: dts: qcom: add common dt for MSM8x26 Lumias along with Nokia Lumia 630

From: Konrad Dybcio
Date: Sat Aug 26 2023 - 05:52:53 EST


On 13.08.2023 17:23, Rayyan Ansari wrote:
> Add a common device tree for Lumia phones based on the Qualcomm MSM8x26
> family of chipsets.
>
> Currently supports:
> - Framebuffer
> - Touchscreen
> - Keys
> - Regulators
> - MMC
> - USB
> - UART
>
> Also add an initial device tree for the Nokia Lumia 630, codenamed
> "moneypenny".
>
> Co-authored-by: Dominik Kobinski <dominikkobinski314@xxxxxxxxx>
> Co-authored-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@xxxxxxxxx>
> Co-authored-by: Jack Matthews <jm5112356@xxxxxxxxx>
> Signed-off-by: Dominik Kobinski <dominikkobinski314@xxxxxxxxx>
> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@xxxxxxxxx>
> Signed-off-by: Jack Matthews <jm5112356@xxxxxxxxx>
> Signed-off-by: Rayyan Ansari <rayyan@xxxxxxxxx>
> ---
> arch/arm/boot/dts/qcom/Makefile | 1 +
> .../qcom/qcom-msm8226-microsoft-common.dtsi | 329 ++++++++++++++++++
> .../qcom-msm8226-microsoft-moneypenny.dts | 23 ++
> 3 files changed, 353 insertions(+)
> create mode 100644 arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi
> create mode 100644 arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-moneypenny.dts
>
> diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile
> index 3dfb1c8cefb8..b2569059ce8d 100644
> --- a/arch/arm/boot/dts/qcom/Makefile
> +++ b/arch/arm/boot/dts/qcom/Makefile
> @@ -23,6 +23,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
> qcom-ipq4019-ap.dk07.1-c2.dtb \
> qcom-ipq8064-ap148.dtb \
> qcom-ipq8064-rb3011.dtb \
> + qcom-msm8226-microsoft-moneypenny.dtb \
> qcom-msm8226-samsung-s3ve3g.dtb \
> qcom-msm8660-surf.dtb \
> qcom-msm8916-samsung-e5.dtb \
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi
> new file mode 100644
> index 000000000000..ddfe7965f564
> --- /dev/null
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8226-microsoft-common.dtsi
> @@ -0,0 +1,329 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +/*
> + * Common Board Device Tree for Microsoft MSM8x26-based Lumias
> + *
> + * Copyright (c) 2023, Jack Matthews <jm5112356@xxxxxxxxx>
> + * Copyright (c) 2023, Ivaylo Ivanov <ivo.ivanov.ivanov1@xxxxxxxxx>
> + * Copyright (c) 2023, Dominik Kobinski <dominikkobinski314@xxxxxxxxx>
> + * Copyright (c) 2023, Rayyan Ansari <rayyan@xxxxxxxxx>
> + */
> +
> +#include "qcom-msm8226.dtsi"
> +#include "qcom-pm8226.dtsi"
> +#include <dt-bindings/input/input.h>
> +
> +/*
> + * Delete all generic (msm8226.dtsi) reserved
> + * memory mappings which are different on these devices.
> + */
> +/delete-node/ &smem_region;
> +
> +/ {
> + aliases {
> + mmc0 = &sdhc_1; /* eMMC */
> + mmc1 = &sdhc_2; /* microSD */
> + display0 = &framebuffer;
> + };
> +
> + chosen {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + stdout-path = "display0";
> +
> + framebuffer: framebuffer@3200000 {
> + compatible = "simple-framebuffer";
> + reg = <0x3200000 0x800000>;
> + format = "a8r8g8b8";
> + width = <720>;
> + height = <1280>;
> + stride = <(720 * 4)>;
> +
> + clocks = <&mmcc MDSS_AHB_CLK>,
> + <&mmcc MDSS_AXI_CLK>,
> + <&mmcc MDSS_BYTE0_CLK>,
> + <&mmcc MDSS_MDP_CLK>,
> + <&mmcc MDSS_PCLK0_CLK>,
> + <&mmcc MDSS_VSYNC_CLK>;
> + power-domains = <&mmcc MDSS_GDSC>;
> + };
> + };
> +
> + gpio_keys: gpio-keys {
> + compatible = "gpio-keys";
> +
> + pinctrl-0 = <&gpio_keys_default>;
> + pinctrl-names = "default";
> +
> + label = "GPIO Buttons";
> +
> + key-volume-up {
> + label = "Volume Up";
> + gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
> + linux,code = <KEY_VOLUMEUP>;
> + };
> + };
> +
> + /*
> + * This device being a WP platform has a different
> + * memory layout than other Android based devices.
> + * This smem memory region is directly copied from
> + * the original UEFI firmware.
> + */
> + reserved-memory {
> + display_reserved: framebuffer@3200000 {
> + reg = <0x3200000 0x800000>;
> + no-map;
> + };
> +
> + smem_region: smem@fa00000 {
> + reg = <0xfa00000 0x100000>;
Padding the addr field to 8 hex digits would make this easier to
compare

[...]

> + touchscreen_default: touchscreen-default-state {
> + irq-pins {
> + pins = "gpio17";
> + function = "gpio";
> +
> + drive-strength = <8>;
Drop newline above

Konrad