Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3280608lqp; Tue, 26 Mar 2024 05:12:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvnF1JiHqbtJimBL6A5lV490kiH5gMXQ8c2jtaLuBEup2nNFn1wIP6XRTIfRAPALIStRWlQ8S6UMBau657CXZtrZCDFzI/rRF8RqMYQQ== X-Google-Smtp-Source: AGHT+IE/wq3iKbJk2+oo0QOxXs7HPYcPPQAi7jVVWXPHL7CT3J9CaifokSPL+7tNTVp0Mfw14+rE X-Received: by 2002:a6b:f301:0:b0:7cf:2255:dd1d with SMTP id m1-20020a6bf301000000b007cf2255dd1dmr2378730ioh.17.1711455157217; Tue, 26 Mar 2024 05:12:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711455157; cv=pass; d=google.com; s=arc-20160816; b=ADAwEy1wJHUeygg0wBzvNVH1qsQo9VVzyUuwneLzq/HDwhiJdWbgFlnbFhM6ydAxaC 0ur+lZdEnnGNMvOb4CkQF8FDVuwOiXAXa1CXGXf/iSmsxNGnT3WbrYZoGQXwA12hrlF8 N/47capicmrunhH2fShqfus6yRpXzQkqM+qRBqHXeQDLAKZg2AtCy+ktDUs70rPlq4B3 xybUiGP5yqKfrppfGVfJHPBuUtOCVQ1bkGPf72ON/SwTvEOtDKaxjZDVOPHfGN3NQyoN FRnr+5YkgWAzUHwdTxvMnUAibUbqMjXdKQv1Lzdn9aJwfI5oRviloQEp8JkOp9ti0zr3 fYrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bICjqeBgbExpQ9TZiFeobKKJrNqHRWGNNCZMRulIA9c=; fh=hhuBv9KgsBgASDmQ2xuMY+4eUzfTYHUfJ4dLwQMcZu0=; b=nEiaWxtfKXxBg8dbUeO2R3KktVH2+tNoK+QaLsz/g0xrTPKjyC/uhVmlQ5GZfjQXq1 ya/W8ln+Se4mlM/7ru/dCX+Tysp1KwzZR0vqrEwkdDr6tgvXZFBWhsUgpMiASMnYjWYS HIyLDNUoXuRVX20D68j3NkL2Tk7J+Vt/X9A4gPWN4RHdCmmWieDanC42HrmdetqSSM5i 4oDkXNx707u0N8v7PpdK6E5a2ki2+as15zVN7I3SUnkc/Go7fHDbdpTY4TefSCJc1rjA FmRvBEvi6BV5w+zikyEOQhc8fzxRi4sWs2RuBlJ4E95+3dcB6uTGZ7XFv8ZKg1Q7v7X6 PgaQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Eal+KoH9; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-118946-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118946-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w27-20020a63475b000000b005dc15e82c4fsi9693114pgk.170.2024.03.26.05.12.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 05:12:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118946-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Eal+KoH9; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-118946-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118946-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C926B2E1892 for ; Tue, 26 Mar 2024 12:12:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 694D771B43; Tue, 26 Mar 2024 12:11:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Eal+KoH9" Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4322F6E61B; Tue, 26 Mar 2024 12:11:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711455109; cv=none; b=ETjRFXz38XU9Er7ZFHoEPEtD5BjV9dNt4+DG+zKlfnRE1EppXNjW6ZYchEOMdjIJSYn5nRxDiRpKZbdWTej9ZFJGHfgSms374WI5c3bwi8gFssb2XFGgW+/P45kcwEW+dVPIR2c4UvgQp8PVfLavHVwjE/DM48kCuvadTj+mtLE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711455109; c=relaxed/simple; bh=tPaFxkfC/vYbivzheYMc1edIfgO6phu1jfuDbjU5RrU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UuCDEBXuVW++yzMZjTIFQ9KEArAmq2EyvB2qe3CRh/H+6a+M7TGp6LJFkAGmM+bl/j/Y4QGFUxc4iLKZxGyzOFsqElTEzecbuIwdx9wfaLxjkXPmwbcfLQO+ETiylXfUs0SfvYxAFgHz7tKef7gFtMvvzAck/bwr/AVlLweWxjI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Eal+KoH9; arc=none smtp.client-ip=209.85.208.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-5688eaf1165so7465894a12.1; Tue, 26 Mar 2024 05:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711455105; x=1712059905; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=bICjqeBgbExpQ9TZiFeobKKJrNqHRWGNNCZMRulIA9c=; b=Eal+KoH91pGZ3f6omcYvU2dHMhQSjoGYCyGLMO/+Tn0MqaZEi0+W0hu3B5r/ckt9o0 NR+SuPATNraQsDDGDZxyKPiFem0IJT5ludaxe/htCRaoU2gtHgizjv+Wh0h1FZeKSerQ wNg59a3I1ZlJuOiQomK5l8Pg6xyaZ/ff1AURVwRTF95mQnYwdADTRHaqLrBlTGqeNbJl vYAdTFIBWMo5eLlKqXipHq+vvr+/eXY8ZFRKZjgmNGuc3D3BVKFL81fby+w/QFQh9XsN rjOVADcog1r1FwdSLin16ez0LNweQAO7izQlhIfJOAZLAaUbxTBDx/SpLEEKY5ChksCf cZlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711455105; x=1712059905; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bICjqeBgbExpQ9TZiFeobKKJrNqHRWGNNCZMRulIA9c=; b=QHk3KWgLhG5+WT5ty7QIpkcghi2mttugZaiI3EyFdh+wVZosO/4QHfPLhezNyCRWd8 wbEjXdnDRfuo335bD6WgvY3dAXvwSckqlMkKGeyH7aFvULU6gzocyNExh/nO2F/DPXMN HQzjzbywKk0v8VSJFiKoJYRAEl3oTxdQWpvTfbCr+fBOOuspwjbmqwc6s56jlC8VeMTR 1EOYNF2vrG7l936kLDMdQGRtC7hn40TnGAMRTJKj8mUzFoDw0NkxkIzJw1FP6vQq9R2C njzMOSYL/P/BhWBp+RFJLR0GcO/a7/abuYTTAaTb8RQfQJgQe7TmCyRUmJMtnTbEJP+1 eN9Q== X-Forwarded-Encrypted: i=1; AJvYcCU+3pUqzvbT1tl0Aso1J/k1DwgeocabC1MdBNSmg2JPiAwCEuTXpWhCpEoHyqxCKgVa97a1hloXbzRk7u661NC8CG8qLPIpSJj77V0PmGFz5Y5KrxWFx1JsyqvTVhBPImFCpV+ZUiEzsHsH3uOpSEJ2GhDJLlLa7YQf2JuMB9q6FmjQtr6W X-Gm-Message-State: AOJu0YyuTD7kcnwVqTo1yUnKqRxTy0m0LUAx0KL6q6piMOE8TbE9I/xx w/5FrUrnvT50iQP7aycorJy1G811WID6FS4yGBwLWnolJ3WhIU9c X-Received: by 2002:a17:906:5288:b0:a46:aed5:2553 with SMTP id c8-20020a170906528800b00a46aed52553mr7201483ejm.15.1711455105326; Tue, 26 Mar 2024 05:11:45 -0700 (PDT) Received: from standask-GA-A55M-S2HP (lu-nat-113-247.ehs.sk. [188.123.113.247]) by smtp.gmail.com with ESMTPSA id la2-20020a170907780200b00a4503a78dd5sm4188549ejc.17.2024.03.26.05.11.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 05:11:45 -0700 (PDT) Date: Tue, 26 Mar 2024 13:11:43 +0100 From: Stanislav Jakubek To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, phone-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] ARM: dts: qcom: Add support for Motorola Moto G (2013) Message-ID: <8c605fb9cff8364ea6ac321b5a3fc265c5686def.1711454680.git.stano.jakubek@gmail.com> References: <32c507337ab80c550fb1df08f7014d1e31eb4c32.1711454680.git.stano.jakubek@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <32c507337ab80c550fb1df08f7014d1e31eb4c32.1711454680.git.stano.jakubek@gmail.com> Add a device tree for the Motorola Moto G (2013) smartphone based on the Qualcomm MSM8226 SoC. Initially supported features: - Buttons (Volume Down/Up, Power) - eMMC - Hall Effect Sensor - SimpleFB display - TMP108 temperature sensor - Vibrator Note: the dhob and shob reserved-memory regions are seemingly a part of some Motorola specific (firmware?) mechanism, see [1]. [1] https://github.com/LineageOS/android_kernel_motorola_msm8226/blob/cm-14.1/Documentation/devicetree/bindings/misc/hob_ram.txt Signed-off-by: Stanislav Jakubek --- Changes in V2: - split hob-ram reserved-memory region into dhob and shob - add a note and a link to downstream documentation with more information about these regions arch/arm/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/msm8226-motorola-falcon.dts | 359 ++++++++++++++++++ 2 files changed, 360 insertions(+) create mode 100644 arch/arm/boot/dts/qcom/msm8226-motorola-falcon.dts diff --git a/arch/arm/boot/dts/qcom/Makefile b/arch/arm/boot/dts/qcom/Makefile index 6478a39b3be5..3eacbf5c0785 100644 --- a/arch/arm/boot/dts/qcom/Makefile +++ b/arch/arm/boot/dts/qcom/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 dtb-$(CONFIG_ARCH_QCOM) += \ + msm8226-motorola-falcon.dtb \ qcom-apq8016-sbc.dtb \ qcom-apq8026-asus-sparrow.dtb \ qcom-apq8026-huawei-sturgeon.dtb \ diff --git a/arch/arm/boot/dts/qcom/msm8226-motorola-falcon.dts b/arch/arm/boot/dts/qcom/msm8226-motorola-falcon.dts new file mode 100644 index 000000000000..029e1b1659c9 --- /dev/null +++ b/arch/arm/boot/dts/qcom/msm8226-motorola-falcon.dts @@ -0,0 +1,359 @@ +// SPDX-License-Identifier: BSD-3-Clause + +/dts-v1/; + +#include "qcom-msm8226.dtsi" +#include "pm8226.dtsi" + +/delete-node/ &smem_region; + +/ { + model = "Motorola Moto G (2013)"; + compatible = "motorola,falcon", "qcom,msm8226"; + chassis-type = "handset"; + + aliases { + mmc0 = &sdhc_1; + }; + + chosen { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + framebuffer@3200000 { + compatible = "simple-framebuffer"; + reg = <0x03200000 0x800000>; + width = <720>; + height = <1280>; + stride = <(720 * 3)>; + format = "r8g8b8"; + vsp-supply = <®_lcd_pos>; + vsn-supply = <®_lcd_neg>; + vddio-supply = <&vddio_disp_vreg>; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + + event-hall-sensor { + label = "Hall Effect Sensor"; + gpios = <&tlmm 51 GPIO_ACTIVE_LOW>; + linux,input-type = ; + linux,code = ; + linux,can-disable; + }; + + key-volume-up { + label = "Volume Up"; + gpios = <&tlmm 106 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <15>; + }; + }; + + vddio_disp_vreg: regulator-vddio-disp { + compatible = "regulator-fixed"; + regulator-name = "vddio_disp"; + gpio = <&tlmm 34 GPIO_ACTIVE_HIGH>; + vin-supply = <&pm8226_l8>; + startup-delay-us = <300>; + enable-active-high; + regulator-boot-on; + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + framebuffer@3200000 { + reg = <0x03200000 0x800000>; + no-map; + }; + + dhob@f500000 { + reg = <0x0f500000 0x40000>; + no-map; + }; + + shob@f540000 { + reg = <0x0f540000 0x2000>; + no-map; + }; + + smem_region: smem@fa00000 { + reg = <0x0fa00000 0x100000>; + no-map; + }; + + /* Actually <0x0fa00000 0x500000>, but first 100000 is smem */ + reserved@fb00000 { + reg = <0x0fb00000 0x400000>; + no-map; + }; + }; +}; + +&blsp1_i2c3 { + status = "okay"; + + regulator@3e { + compatible = "ti,tps65132"; + reg = <0x3e>; + pinctrl-0 = <®_lcd_default>; + pinctrl-names = "default"; + + reg_lcd_pos: outp { + regulator-name = "outp"; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <6000000>; + regulator-active-discharge = <1>; + regulator-boot-on; + enable-gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>; + }; + + reg_lcd_neg: outn { + regulator-name = "outn"; + regulator-min-microvolt = <4000000>; + regulator-max-microvolt = <6000000>; + regulator-active-discharge = <1>; + regulator-boot-on; + enable-gpios = <&tlmm 33 GPIO_ACTIVE_HIGH>; + }; + }; + + temperature-sensor@48 { + compatible = "ti,tmp108"; + reg = <0x48>; + interrupts-extended = <&tlmm 13 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&temp_alert_default>; + pinctrl-names = "default"; + #thermal-sensor-cells = <0>; + }; +}; + +&pm8226_resin { + linux,code = ; + status = "okay"; +}; + +&pm8226_vib { + status = "okay"; +}; + +&rpm_requests { + regulators { + compatible = "qcom,rpm-pm8226-regulators"; + + pm8226_s3: s3 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1300000>; + }; + + pm8226_s4: s4 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2200000>; + }; + + pm8226_s5: s5 { + regulator-min-microvolt = <1150000>; + regulator-max-microvolt = <1150000>; + }; + + pm8226_l1: l1 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; + + pm8226_l2: l2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + pm8226_l3: l3 { + regulator-min-microvolt = <750000>; + regulator-max-microvolt = <1337500>; + }; + + pm8226_l4: l4 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + pm8226_l5: l5 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + pm8226_l6: l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-allow-set-load; + }; + + pm8226_l7: l7 { + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <1850000>; + }; + + pm8226_l8: l8 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8226_l9: l9 { + regulator-min-microvolt = <2050000>; + regulator-max-microvolt = <2050000>; + }; + + pm8226_l10: l10 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8226_l12: l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8226_l14: l14 { + regulator-min-microvolt = <2750000>; + regulator-max-microvolt = <2750000>; + }; + + pm8226_l15: l15 { + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + }; + + pm8226_l16: l16 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3350000>; + }; + + pm8226_l17: l17 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + }; + + pm8226_l18: l18 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + }; + + pm8226_l19: l19 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + pm8226_l20: l20 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; + }; + + pm8226_l21: l21 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + regulator-allow-set-load; + }; + + pm8226_l22: l22 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; + + pm8226_l23: l23 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; + + pm8226_l24: l24 { + regulator-min-microvolt = <1300000>; + regulator-max-microvolt = <1350000>; + }; + + pm8226_l25: l25 { + regulator-min-microvolt = <1775000>; + regulator-max-microvolt = <2125000>; + }; + + pm8226_l26: l26 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; + + pm8226_l27: l27 { + regulator-min-microvolt = <2050000>; + regulator-max-microvolt = <2050000>; + }; + + pm8226_l28: l28 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3400000>; + regulator-boot-on; + }; + + pm8226_lvs1: lvs1 { + regulator-always-on; + }; + }; +}; + +&sdhc_1 { + vmmc-supply = <&pm8226_l17>; + vqmmc-supply = <&pm8226_l6>; + + bus-width = <8>; + non-removable; + + status = "okay"; +}; + +&smbb { + qcom,fast-charge-safe-current = <2000000>; + qcom,fast-charge-current-limit = <1900000>; + qcom,fast-charge-safe-voltage = <4400000>; + qcom,minimum-input-voltage = <4300000>; + + status = "okay"; +}; + +&tlmm { + reg_lcd_default: reg-lcd-default-state { + pins = "gpio31", "gpio33"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-high; + }; + + reg_vddio_disp_default: reg-vddio-disp-default-state { + pins = "gpio34"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-high; + }; + + temp_alert_default: temp-alert-default-state { + pins = "gpio13"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-disable; + }; +}; + +&usb { + extcon = <&smbb>; + dr_mode = "peripheral"; + status = "okay"; +}; + +&usb_hs_phy { + extcon = <&smbb>; + v1p8-supply = <&pm8226_l10>; + v3p3-supply = <&pm8226_l20>; +}; -- 2.34.1