Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp80839imi; Thu, 21 Jul 2022 16:26:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vT4hXl4rt/dVb46ERRWmzpNvJxzekLRjW0HX9yVgu7EMkYppJfViv0Qr86xk2P6RTofGnH X-Received: by 2002:a17:90b:60c:b0:1f2:824:da91 with SMTP id gb12-20020a17090b060c00b001f20824da91mr843944pjb.203.1658446009824; Thu, 21 Jul 2022 16:26:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658446009; cv=none; d=google.com; s=arc-20160816; b=xVA0BaiUNQIX9OlxKnKC2nahsfhPvV7rzpTSwCbfrlLPjYL0I0YHxKwg0GQKYX33Q0 yvHbzzUQVxOhpjKmyA/blTJueS8ZMTN7PNx0vFIzYHqWBm3TBD713S7Rvlz+U+bDglYA YX9ku+72LIKnqvTAq0ljGmnn4AcqFSgZrxiabhNFsV7qsB7chKAYi1kaI9qdM3MHCR+I TcNUIMugqxWMCnQ35t3tOE6WNPv+lYlSEW274PCl3RG/wsqtqofGzx5XzvgSTIXIfMKZ mq0D7wdFN8//TfYcZ68nY0B+U+ScuVq/xrdKivXfomzFcvkhLLdKZB6aO2wUeiOwwUYU 46KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MSkUUlyMJE2foz0VsmQ0i0RKYxHSxeQOD555VjYSQww=; b=i2jIHBht0bkOKKeJ9dH9cIbWIXIKmiBP6GP+H1cWPfwbKwRzPdjtxOToSgoU/oKewh cuxwfuXwoHfklVtkk8sRkdKuhmsGaQe6qnmer58WfhLbSWzLEObk9AL9Mr6R8vE/zv1M Lc6UDsN+R1a+MJT8XhHd2aP9c74oEfZGHfZ62T+HncsQPGt+qUaAAzjEWUBmbxmxuqfB 6lPCn0nqWHlJ+Zw6hC5dGd+vXrvRNrAH2C5Ei9+HLOI1nhRPhpCRu21MD4lBNpW3uupO yTSWlbXzWN0TxNQDzbbELxFK5xHEHlZ+Z+sfAdRB1U52axZBd6/JFx5c2y43T92UnxJ5 6G6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jlVxWsKN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 137-20020a62168f000000b0050dcc1acf09si3837286pfw.111.2022.07.21.16.25.50; Thu, 21 Jul 2022 16:26:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jlVxWsKN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233530AbiGUXF6 (ORCPT + 99 others); Thu, 21 Jul 2022 19:05:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233181AbiGUXFr (ORCPT ); Thu, 21 Jul 2022 19:05:47 -0400 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DB0C8D5FB; Thu, 21 Jul 2022 16:05:45 -0700 (PDT) Received: by mail-lj1-x22d.google.com with SMTP id q7so3517242lji.12; Thu, 21 Jul 2022 16:05:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MSkUUlyMJE2foz0VsmQ0i0RKYxHSxeQOD555VjYSQww=; b=jlVxWsKNimO9Ug7nYb3XvGGV69KvPLgd4IknzcD2EM8UP81Ry6LyADaI0W3Q9eEg/J KF4ORJfMImg4vqdGdiUZVvBFx6VYYMoSk6//aOI0BTdeVIkDAY0YnRS7dUCbwibQKeW/ GQjfcGv4PKuNaJwOOCwGkNzwdN1puzPtiu25pq/hlgNp9Y0n1raCDPmASPWiGOS3FjUc 4jSZJ/s0zb6HIFTIB9seQ7OtpR7+gDuzdUfmQa0ZHJ0LyC0KsUk8IUuKZ9vGHD1SGn+A G2hjhh0R5483naKipLuF2EdvYP6wmIgt/Nztm9b68KwmjHG0E/HMHWpGRqzab8cmhG34 VucQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MSkUUlyMJE2foz0VsmQ0i0RKYxHSxeQOD555VjYSQww=; b=N2GM72ySwqc05mK1uopars9W6vBeL+eHuTfZeTGviAngXlb/+hhm01ENx+PHKZC2BG CfWMxqk8N+vdKDG6zdz3+eGS7Jism0+0mZoyuSiXHQAs261kfRvfChZ9a1auVSaTC+LH JR5ROuD2fLdXnYkAaheYMJSTvAkOCSc8N7ZYX3TqmVOHpiwV/4OQCPBkJEY/H+px4J+H FxmzA3jUv+vO8SNAObSNg83dl+kC7vy5TLlyf+EV3aMEGQcteaXSqVZBD2hwxXhYs1El 2BgHu3CgzC+tr3tsUbHGVCEXlXDbcDBKcJ9AE9LL+EcUj6QRM6nyn0lUxheakWCec7qW Q2tA== X-Gm-Message-State: AJIora8xwk71/i5vWAaJvzPBefx2ZxsxgHrQLWUd6Vw8U3qDsmIrEfqY cQVwgl4wZUYu8EtgQ6eAHR78ko4fSBKlew75JH0= X-Received: by 2002:a2e:9085:0:b0:25d:aa4b:36a3 with SMTP id l5-20020a2e9085000000b0025daa4b36a3mr219531ljg.33.1658444743868; Thu, 21 Jul 2022 16:05:43 -0700 (PDT) Received: from i-vetokaappi.home.lan (dsl-hkibng42-5673c7-93.dhcp.inet.fi. [86.115.199.93]) by smtp.gmail.com with ESMTPSA id g31-20020a0565123b9f00b0047fb0d5e049sm701360lfv.273.2022.07.21.16.05.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 16:05:43 -0700 (PDT) From: =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, =?UTF-8?q?Matti=20Lehtim=C3=A4ki?= , Arnd Bergmann , Olof Johansson , soc@kernel.org, Rob Herring , Krzysztof Kozlowski , Andy Gross , Bjorn Andersson , Konrad Dybcio , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] ARM: dts: qcom: Add support for Samsung Galaxy Tab 4 10.1 (SM-T530) Date: Fri, 22 Jul 2022 02:02:30 +0300 Message-Id: <20220721230231.98886-4-matti.lehtimaki@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220721230231.98886-1-matti.lehtimaki@gmail.com> References: <20220721230231.98886-1-matti.lehtimaki@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add a device tree for the Samsung Galaxy Tab 4 10.1 (SM-T530) wifi tablet based on the apq8026 platform. Currently supported are accelerometer sensor, hall sensor, internal storage, physical buttons (power & volume), screen (based on simple-framebuffer set up by the bootloader) sdcard, touchscreen and USB. Signed-off-by: Matti Lehtimäki --- Changes in v2: - Change codename to matisse-wifi - Remove msm-id, not needed when lk2nd is used - Remove unused labels from reserved memory regions - Rename muic node --- arch/arm/boot/dts/Makefile | 1 + .../dts/qcom-apq8026-samsung-matisse-wifi.dts | 469 ++++++++++++++++++ 2 files changed, 470 insertions(+) create mode 100644 arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 5112f493f494..8bac4f4f8656 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1010,6 +1010,7 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-apq8016-sbc.dtb \ qcom-apq8026-asus-sparrow.dtb \ qcom-apq8026-lg-lenok.dtb \ + qcom-apq8026-samsung-matisse-wifi.dtb \ qcom-apq8060-dragonboard.dtb \ qcom-apq8064-cm-qs600.dtb \ qcom-apq8064-ifc6410.dtb \ diff --git a/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts b/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts new file mode 100644 index 000000000000..621e0a337724 --- /dev/null +++ b/arch/arm/boot/dts/qcom-apq8026-samsung-matisse-wifi.dts @@ -0,0 +1,469 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2022, Matti Lehtimäki + */ + +/dts-v1/; + +#include "qcom-msm8226.dtsi" +#include "qcom-pm8226.dtsi" +#include + +/delete-node/ &smem_region; + +/ { + model = "Samsung Galaxy Tab 4 10.1"; + compatible = "samsung,matisse-wifi", "qcom,apq8026"; + chassis-type = "tablet"; + + aliases { + mmc0 = &sdhc_1; /* SDC1 eMMC slot */ + mmc1 = &sdhc_2; /* SDC2 SD card slot */ + display0 = &framebuffer0; + }; + + chosen { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + stdout-path = "display0"; + + framebuffer0: framebuffer@3200000 { + compatible = "simple-framebuffer"; + reg = <0x3200000 0x800000>; + width = <1280>; + height = <800>; + stride = <(1280 * 3)>; + format = "r8g8b8"; + }; + }; + + gpio-hall-sensor { + compatible = "gpio-keys"; + + event-hall-sensor { + label = "Hall Effect Sensor"; + gpios = <&tlmm 110 GPIO_ACTIVE_HIGH>; + interrupts = <&tlmm 110 IRQ_TYPE_EDGE_FALLING>; + linux,input-type = ; + linux,code = ; + debounce-interval = <15>; + wakeup-source; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + autorepeat; + + key-home { + label = "Home"; + gpios = <&tlmm 108 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <15>; + }; + + key-volume-down { + label = "Volume Down"; + gpios = <&tlmm 107 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <15>; + }; + + key-volume-up { + label = "Volume Up"; + gpios = <&tlmm 106 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <15>; + }; + }; + + i2c-muic { + compatible = "i2c-gpio"; + sda-gpios = <&tlmm 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + scl-gpios = <&tlmm 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + + pinctrl-names = "default"; + pinctrl-0 = <&muic_i2c_default_state>; + + #address-cells = <1>; + #size-cells = <0>; + + muic: usb-switch@25 { + compatible = "siliconmitus,sm5502-muic"; + reg = <0x25>; + + interrupt-parent = <&tlmm>; + interrupts = <67 IRQ_TYPE_EDGE_FALLING>; + + pinctrl-names = "default"; + pinctrl-0 = <&muic_int_default_state>; + }; + }; + + reg_tsp_1p8v: regulator-tsp-1p8v { + compatible = "regulator-fixed"; + regulator-name = "tsp_1p8v"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + + gpio = <&tlmm 31 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&tsp_en_default_state>; + }; + + reg_tsp_3p3v: regulator-tsp-3p3v { + compatible = "regulator-fixed"; + regulator-name = "tsp_3p3v"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&tlmm 73 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&tsp_en1_default_state>; + }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + framebuffer@3200000 { + reg = <0x3200000 0x800000>; + no-map; + }; + + mpss@8400000 { + reg = <0x08400000 0x1f00000>; + no-map; + }; + + mba@a300000 { + reg = <0x0a300000 0x100000>; + no-map; + }; + + reserved@cb00000 { + reg = <0x0cb00000 0x700000>; + no-map; + }; + + wcnss@d200000 { + reg = <0x0d200000 0x700000>; + no-map; + }; + + adsp@d900000 { + reg = <0x0d900000 0x1800000>; + no-map; + }; + + venus@f100000 { + reg = <0x0f100000 0x500000>; + no-map; + }; + + smem_region: smem@fa00000 { + reg = <0xfa00000 0x100000>; + no-map; + }; + + reserved@fb00000 { + reg = <0x0fb00000 0x260000>; + no-map; + }; + + rfsa@fd60000 { + reg = <0x0fd60000 0x20000>; + no-map; + }; + + rmtfs@fd80000 { + compatible = "qcom,rmtfs-mem"; + reg = <0x0fd80000 0x180000>; + no-map; + + qcom,client-id = <1>; + }; + }; +}; + +&blsp1_i2c2 { + status = "okay"; + + accelerometer@1d { + compatible = "st,lis2hh12"; + reg = <0x1d>; + + interrupt-parent = <&tlmm>; + interrupts = <54 IRQ_TYPE_LEVEL_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&accel_int_default_state>; + + st,drdy-int-pin = <1>; + + vdd-supply = <&pm8226_l19>; + vddio-supply = <&pm8226_lvs1>; + }; +}; + +&blsp1_i2c5 { + status = "okay"; + + touchscreen@4a { + compatible = "atmel,maxtouch"; + reg = <0x4a>; + + interrupt-parent = <&tlmm>; + interrupts = <17 IRQ_TYPE_LEVEL_LOW>; + + pinctrl-names = "default"; + pinctrl-0 = <&tsp_int_rst_default_state>; + + reset-gpios = <&pm8226_gpios 6 GPIO_ACTIVE_LOW>; + + vdd-supply = <®_tsp_1p8v>; + vdda-supply = <®_tsp_3p3v>; + }; +}; + +&rpm_requests { + pm8226-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 = <1800000>; + }; + + 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>; + regulator-always-on; + }; + + 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-always-on; + }; + + pm8226_l7: l7 { + regulator-min-microvolt = <1850000>; + regulator-max-microvolt = <1850000>; + }; + + pm8226_l8: l8 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + 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 = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + pm8226_l16: l16 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3350000>; + }; + + pm8226_l17: l17 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + + regulator-system-load = <200000>; + regulator-allow-set-load; + regulator-always-on; + }; + + pm8226_l18: l18 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + }; + + pm8226_l19: l19 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <3000000>; + }; + + pm8226_l20: l20 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; + }; + + pm8226_l21: l21 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; + + pm8226_l22: l22 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3000000>; + }; + + pm8226_l23: l23 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + 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 = <1300000>; + }; + + pm8226_l27: l27 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8226_l28: l28 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; + + pm8226_lvs1: lvs1 {}; + }; +}; + +&sdhc_1 { + status = "okay"; + + vmmc-supply = <&pm8226_l17>; + vqmmc-supply = <&pm8226_l6>; + + bus-width = <8>; + non-removable; +}; + +&sdhc_2 { + status = "okay"; + + vmmc-supply = <&pm8226_l18>; + vqmmc-supply = <&pm8226_l21>; + + bus-width = <8>; + cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; +}; + +&tlmm { + accel_int_default_state: accel-int-default-state { + pins = "gpio54"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + muic_i2c_default_state: muic-i2c-default-state { + pins = "gpio14", "gpio15"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + muic_int_default_state: muic-int-default-state { + pins = "gpio67"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + tsp_en_default_state: tsp-en-default-state { + pins = "gpio31"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + tsp_en1_default_state: tsp-en1-default-state { + pins = "gpio73"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + tsp_int_rst_default_state: tsp-int-rst-default-state { + pins = "gpio17"; + function = "gpio"; + drive-strength = <10>; + bias-pull-up; + }; +}; + +&usb { + status = "okay"; + extcon = <&muic>, <&muic>; +}; + +&usb_hs_phy { + extcon = <&muic>; + v1p8-supply = <&pm8226_l10>; + v3p3-supply = <&pm8226_l20>; +}; -- 2.34.1