Re: [PATCH 2/2] ARM: dts: qcom: msm8926-motorola-peregrine: Add initial device tree
From: Krzysztof Kozlowski
Date: Thu Dec 14 2023 - 02:34:08 EST
On 13/12/2023 21:33, André Apitzsch wrote:
> This dts adds support for Motorola Moto G 4G released in 2013.
>
> Add a device tree with initial support for:
>
> - GPIO keys
> - Hall sensor
> - SDHCI
> - Vibrator
>
> Signed-off-by: André Apitzsch <git@xxxxxxxxxxx>
> ---
> arch/arm/boot/dts/qcom/Makefile | 1 +
> .../dts/qcom/qcom-msm8926-motorola-peregrine.dts | 297 +++++++++++++++++++++
> 2 files changed, 298 insertions(+)
>
> diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile
> index 0cb272f4fa45..9cc1e14e6cd0 100644
> --- a/arch/arm/boot/dts/qcom/Makefile
> +++ b/arch/arm/boot/dts/qcom/Makefile
> @@ -35,6 +35,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \
> qcom-msm8926-htc-memul.dtb \
> qcom-msm8926-microsoft-superman-lte.dtb \
> qcom-msm8926-microsoft-tesla.dtb \
> + qcom-msm8926-motorola-peregrine.dtb \
> qcom-msm8960-cdp.dtb \
> qcom-msm8960-samsung-expressatt.dtb \
> qcom-msm8974-lge-nexus5-hammerhead.dtb \
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts b/arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts
> new file mode 100644
> index 000000000000..3c5256120502
> --- /dev/null
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts
> @@ -0,0 +1,297 @@
> +// SPDX-License-Identifier: BSD-3-Clause
> +
> +/dts-v1/;
> +
> +#include "qcom-msm8226.dtsi"
> +#include "pm8226.dtsi"
> +
> +/delete-node/ &smem_region;
> +
> +/ {
> + model = "Motorola Moto G 4G";
> + compatible = "motorola,peregrine", "qcom,msm8926", "qcom,msm8226";
> + chassis-type = "handset";
> +
> + aliases {
> + mmc0 = &sdhc_1; /* SDC1 eMMC slot */
> + mmc1 = &sdhc_2; /* SDC2 SD card slot */
> + };
> +
> + chosen {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + framebuffer0: framebuffer@3200000 {
> + compatible = "simple-framebuffer";
> + reg = <0x03200000 0x800000>;
> + width = <720>;
> + height = <1280>;
> + stride = <(720 * 3)>;
> + format = "r8g8b8";
> + };
> + };
> +
> + gpio-hall-sensor {
> + compatible = "gpio-keys";
> +
> + label = "GPIO Hall Effect Sensor";
> +
> + event-hall-sensor {
> + label = "Hall Effect Sensor";
> + gpios = <&tlmm 51 GPIO_ACTIVE_LOW>;
> + linux,input-type = <EV_SW>;
> + linux,code = <SW_LID>;
> + linux,can-disable;
> + };
> + };
> +
> + gpio-keys {
No need to have two nodes for gpio-keys. Combine them.
> + compatible = "gpio-keys";
> +
> + key-volume-up {
> + label = "Volume Up";
Best regards,
Krzysztof