From patchwork Fri Mar 15 13:51:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 780562 Received: from box.trvn.ru (box.trvn.ru [194.87.146.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 4016F2E418; Fri, 15 Mar 2024 13:51:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.87.146.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710510718; cv=none; b=Y8rrhplqIv6VbVJ/BF9k3MVJgKUh6RMhK8pOkr1PweAmexF0DIhm3jlwNC8ci38CF8mUO604E2ckz8838OqlH0tgzUPbpz5LbZBZdBHo2ljRRyMjxvmiPW3ypoc+EJx36W2YLIaER+0MA0rrwktCw7OR05kISk904xrdpoLpOKQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710510718; c=relaxed/simple; bh=MMLcHJokdcrZX5tapxsxk9MOEOCy6mrRPWqgEtSNWMA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=d/QJltDIDD625Mt5kYTdAYaxe39QpTSvexx0BfNVKUxZfdOH4jTNfxhoK8Cef+GciGXmwkm0pZhjaSWxE3dghy5lYxXjAgx+y+vuSdl72nrp12Z3vTx7GwR5qxvJY3fxAKc8BPEe95GahyadGv4qQEytNpYYaxLhKSrM4DITBVo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=trvn.ru; spf=pass smtp.mailfrom=trvn.ru; dkim=pass (2048-bit key) header.d=trvn.ru header.i=@trvn.ru header.b=xxy8kxYf; arc=none smtp.client-ip=194.87.146.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=trvn.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=trvn.ru Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=trvn.ru header.i=@trvn.ru header.b="xxy8kxYf" Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id 1DE5641EF0; Fri, 15 Mar 2024 18:51:36 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1710510696; bh=MMLcHJokdcrZX5tapxsxk9MOEOCy6mrRPWqgEtSNWMA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=xxy8kxYfOlFEgkH3P8TxNY3RDMXTysILsaQWb+Aet//GgUcok+/VK8cAgTOLGjjt4 LxJBG8YqYi3s7u4QX98/WK0PorCNMFLQ5AV9EMs7Wxgyy60BSoClu223p02B3uS8F1 /6vxH89PubvjWOZ799UXq2kI0TjX7xa5mCYiFmcptr5MSjTsdMMPRloNc+tgRP43t5 8mYm5RnGokca/SPDxg40JyQREgs6DWQBVfJz68lkiPB6i2Um4Cj1GKS90YlyxbN/Pb V0+QlliAgqqnIvX4AeqAFTQTUb2sRQpw8qyR0l2kAf39GZJF3v7Vq989lnwCzF5alj GQJS73soSJBDQ== From: Nikita Travkin Date: Fri, 15 Mar 2024 18:51:15 +0500 Subject: [PATCH v5 1/4] dt-bindings: platform: Add Acer Aspire 1 EC Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240315-aspire1-ec-v5-1-f93381deff39@trvn.ru> References: <20240315-aspire1-ec-v5-0-f93381deff39@trvn.ru> In-Reply-To: <20240315-aspire1-ec-v5-0-f93381deff39@trvn.ru> To: Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , cros-qcom-dts-watchers@chromium.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Bryan O'Donoghue Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, platform-driver-x86@vger.kernel.org, Nikita Travkin X-Developer-Signature: v=1; a=openpgp-sha256; l=2056; i=nikita@trvn.ru; h=from:subject:message-id; bh=MMLcHJokdcrZX5tapxsxk9MOEOCy6mrRPWqgEtSNWMA=; b=owEBbQKS/ZANAwAIAUMc7O4oGb91AcsmYgBl9FJl1s0w28vFfb5wmB5kcBEPkAABTgUxBJiuu ReEcYhF0OCJAjMEAAEIAB0WIQTAhK9UUj+qg34uxUdDHOzuKBm/dQUCZfRSZQAKCRBDHOzuKBm/ dbCuD/4gBu5TlOhWt45gMihtRlgK1dbDires315S9k7yIeRikQwTXjp0u/AVTyeJXPJiGLJcJbs B+Yc9n1OfInJ3gqs0j0NW7G5n+1ucEZ1tOyCP+FsXiCIuCbM78RNjJcmi/GBfzstpEIM6RXsLN+ eFRk2NKafGEV9dh4fykIl6TWMuanl4yup/R+/vJtxNhJd38witTzAi7AH9S9FKENB5hZFR4r5eD Rb4BC6XYJAktomTRbdFdFVsVefRJ23+CubU3NjvfvIrSkXYdYWkpEUsEPlzquevdAr+GT1nsoTV GHoIbSNgpOMMMLb6icCLRJCEYfIIjMtiySRvkmwF9nhiLAhAxUWPiZcyKs17sonzzasUfX4b4Gk Yfbx4TUsiaAO+kWvmavGHGaeBOVEfGRhWBhUk80lVENq+3fa0/fEhRDNGrQ+MmmoEaZ0EPLl3yL wVkdztzKqFtJlkfHPk5ssszse+822i9svd/kwxwrmtcxBZ557tx9RegiYEfgKEjpQTdXy4pGLE5 ae7/oKrW3ecbJwMhcnQjyEb8Uf+U/Rhk+Ugd63soN5tSGINYPruj639ayxKRhkAlXnz2+QSyfNq KN5shnDr0v0v79hPtqsaLhW9yvnOsiVQXiuDKwKilZg2lYJwMg+jA/E61FEpjddLL4TrGyRXAOQ gu0K+XPHOcje+rg== X-Developer-Key: i=nikita@trvn.ru; a=openpgp; fpr=C084AF54523FAA837E2EC547431CECEE2819BF75 Add binding for the EC found in the Acer Aspire 1 laptop. Reviewed-by: Rob Herring Signed-off-by: Nikita Travkin --- .../bindings/platform/acer,aspire1-ec.yaml | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/Documentation/devicetree/bindings/platform/acer,aspire1-ec.yaml b/Documentation/devicetree/bindings/platform/acer,aspire1-ec.yaml new file mode 100644 index 000000000000..7cb0134134ff --- /dev/null +++ b/Documentation/devicetree/bindings/platform/acer,aspire1-ec.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/platform/acer,aspire1-ec.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Acer Aspire 1 Embedded Controller + +maintainers: + - Nikita Travkin + +description: + The Acer Aspire 1 laptop uses an embedded controller to control battery + and charging as well as to provide a set of misc features such as the + laptop lid status and HPD events for the USB Type-C DP alt mode. + +properties: + compatible: + const: acer,aspire1-ec + + reg: + const: 0x76 + + interrupts: + maxItems: 1 + + connector: + $ref: /schemas/connector/usb-connector.yaml# + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + embedded-controller@76 { + compatible = "acer,aspire1-ec"; + reg = <0x76>; + + interrupts-extended = <&tlmm 30 IRQ_TYPE_LEVEL_LOW>; + + connector { + compatible = "usb-c-connector"; + + port { + ec_dp_in: endpoint { + remote-endpoint = <&mdss_dp_out>; + }; + }; + }; + }; + }; From patchwork Fri Mar 15 13:51:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 780561 Received: from box.trvn.ru (box.trvn.ru [194.87.146.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 1C1382CCAD; Fri, 15 Mar 2024 13:51:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.87.146.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710510718; cv=none; b=QCu7/SbTZ0o9jNFQMr4h0yP21duPkxywui9e8Uah6Fi6RZW7UWas8gBlmIMgYWDmyQuEfQPbsKnDegsVpLqgik8vauzvEUCOytKFspwfvOEk5uFc1oF2hlH67Gy1OqAVyQ33aviygDxWTdHMCXNSXtdJGL10OSu9EdBvHYbCYyY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710510718; c=relaxed/simple; bh=JrN770EdBryMxnh0Oh99guIP9VQQameiq0rHefV8pac=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DyN7+c6m2cCUv4qBFL4tQFwP9PSN6nTdLgkqaq5AHeebN//TJc/NgvHFoqRR7Oe2FiEcFAMC1lAwBEJVECCRPhbIS8NaA7AGRX0RKbtHPMP4gn5YHYm7SjnmVOAFI9VnRc+db8/Z83ThMT7SDvjgmr1Q7p6gmrJe8+SV2PI9rW8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=trvn.ru; spf=pass smtp.mailfrom=trvn.ru; dkim=pass (2048-bit key) header.d=trvn.ru header.i=@trvn.ru header.b=VMsQ+k1v; arc=none smtp.client-ip=194.87.146.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=trvn.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=trvn.ru Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=trvn.ru header.i=@trvn.ru header.b="VMsQ+k1v" Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id E1B7F41EF2; Fri, 15 Mar 2024 18:51:36 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1710510697; bh=JrN770EdBryMxnh0Oh99guIP9VQQameiq0rHefV8pac=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=VMsQ+k1vmGItKQ5U6NmGqU2qDSQIF0phX2FNowWTobMMazdW9FkciUuNHGIKxRg/G fXihIuE0CBY1G/Q+FnpohDUeFBQlbm2FGpWfzI5IrQDimhujpnO4KDQQkC8v4pXcRh HEjWwxgwqfWzAenyuhBLK6SaKXJblDuJg0E/3K4NE0Eo9yfxrIICmeANy7pKFK3ZWu pK8R9bR3iW42dG7Z9RAXRU//1x0JUqKZ2XwrYBDP/DRM4GBbhs+VxKCMxXufyHyYIT 1gjxrqOZqo7o3gI4K1M8tmpLD1gDTfAyyKVd6EZoS2+WMC1jFid1pJKM67QYJT8VXF OMDtcJt25uHmQ== From: Nikita Travkin Date: Fri, 15 Mar 2024 18:51:16 +0500 Subject: [PATCH v5 2/4] platform: Add ARM64 platform directory Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240315-aspire1-ec-v5-2-f93381deff39@trvn.ru> References: <20240315-aspire1-ec-v5-0-f93381deff39@trvn.ru> In-Reply-To: <20240315-aspire1-ec-v5-0-f93381deff39@trvn.ru> To: Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , cros-qcom-dts-watchers@chromium.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Bryan O'Donoghue Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, platform-driver-x86@vger.kernel.org, Nikita Travkin X-Developer-Signature: v=1; a=openpgp-sha256; l=3905; i=nikita@trvn.ru; h=from:subject:message-id; bh=JrN770EdBryMxnh0Oh99guIP9VQQameiq0rHefV8pac=; b=owEBbQKS/ZANAwAIAUMc7O4oGb91AcsmYgBl9FJmunF3ZxQvDUhdFk9TYCpzrVtq7859rIaxQ GwZk1aqj/2JAjMEAAEIAB0WIQTAhK9UUj+qg34uxUdDHOzuKBm/dQUCZfRSZgAKCRBDHOzuKBm/ daiQEACNmmQYzv5oErLKVrAkzVYSfPoM5fJvDuVkkKvxaZA/sOhyjGdkLbuMn1lya8NRzfRWtvC 6OgqWbY8L2lhqmd+N78tzmB6jl22BorP1PSKz/5jscOJiCT3sMuMFHOgwumPEYxqL6Jv22xVXIE MD1Fyy7wYDi04qRoo87GEisXIukrvrw1y0XoOBAKDxAnl53r2/ga+slmjYqQJQ8gRcVIJkXtlpf kvx69Ruje0wrQTlFukRyAiDw67UoUno8Tdp2Oqp4SRVb+TJB1t4G9y+WVS3wbrxXK0aDxYrypjZ 20khUkQnE3lFCB/GZTOb/ms90TA7RXwt4ZdxdioS6b6oAJP+EZH/fB+iu/GqVdu6PUfCN8BoI1I vXLd5+DQaO2Qrz3TtHe5jARrI2GE4NM4Mm68APwCpjDiG9kcUhkmdLHJacdJhqLXjYll2Jlilzg RzJjKjPNwBfgNd5gvwoFo6S9zKxvcGzdkngc2c+BGk8bVtPXF2BEI1MEtT3sov0x59AiWdcMB6X 3WR1W0bTwHAAvV5a/ievw6612IqKZE1g4G9YaDpB07JQ6vA4zNitJ+NG4W7va2Q2aKq5IFa0AIG gXMTfLtlHSvsE80TfLi3m759tkEZgYIspjvX/mzTKo1hnPSKjH6mC/VUfq8gq1SX8rS4DBKnysQ ILD2vTNsuJffK7A== X-Developer-Key: i=nikita@trvn.ru; a=openpgp; fpr=C084AF54523FAA837E2EC547431CECEE2819BF75 Some ARM64 based laptops and computers require vendor/board specific drivers for their embedded controllers. Even though usually the most important functionality of those devices is implemented inside ACPI, unfortunately Linux doesn't currently have great support for ACPI on platforms like Qualcomm Snapdragon that are used in most ARM64 laptops today. Instead Linux relies on Device Tree for Qualcomm based devices and it's significantly easier to reimplement the EC functionality in a dedicated driver than to make use of ACPI code. This commit introduces a new platform/arm64 subdirectory to give a place to such drivers for EC-like devices. A new MAINTAINERS entry is added for this directory. Patches to files in this directory will be taken up by the platform-drivers-x86 team (i.e. Hans de Goede and Ilpo Järvinen) with additional review from Bryan O'Donoghue to represent ARM64 maintainers. Signed-off-by: Nikita Travkin Acked-by: Ilpo Järvinen --- MAINTAINERS | 10 ++++++++++ drivers/platform/Kconfig | 2 ++ drivers/platform/Makefile | 1 + drivers/platform/arm64/Kconfig | 19 +++++++++++++++++++ drivers/platform/arm64/Makefile | 6 ++++++ 5 files changed, 38 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 76b3714710c2..186338451099 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3050,6 +3050,16 @@ F: drivers/mmc/host/sdhci-of-arasan.c N: zynq N: xilinx +ARM64 PLATFORM DRIVERS +M: Hans de Goede +M: Ilpo Järvinen +R: Bryan O'Donoghue +L: platform-driver-x86@vger.kernel.org +S: Maintained +Q: https://patchwork.kernel.org/project/platform-driver-x86/list/ +T: git git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git +F: drivers/platform/arm64/ + ARM64 PORT (AARCH64 ARCHITECTURE) M: Catalin Marinas M: Will Deacon diff --git a/drivers/platform/Kconfig b/drivers/platform/Kconfig index 868b20361769..81a298517df2 100644 --- a/drivers/platform/Kconfig +++ b/drivers/platform/Kconfig @@ -14,3 +14,5 @@ source "drivers/platform/olpc/Kconfig" source "drivers/platform/surface/Kconfig" source "drivers/platform/x86/Kconfig" + +source "drivers/platform/arm64/Kconfig" diff --git a/drivers/platform/Makefile b/drivers/platform/Makefile index 41640172975a..fbbe4f77aa5d 100644 --- a/drivers/platform/Makefile +++ b/drivers/platform/Makefile @@ -11,3 +11,4 @@ obj-$(CONFIG_OLPC_EC) += olpc/ obj-$(CONFIG_GOLDFISH) += goldfish/ obj-$(CONFIG_CHROME_PLATFORMS) += chrome/ obj-$(CONFIG_SURFACE_PLATFORMS) += surface/ +obj-$(CONFIG_ARM64) += arm64/ diff --git a/drivers/platform/arm64/Kconfig b/drivers/platform/arm64/Kconfig new file mode 100644 index 000000000000..644b83ede093 --- /dev/null +++ b/drivers/platform/arm64/Kconfig @@ -0,0 +1,19 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# EC-like Drivers for aarch64 based devices. +# + +menuconfig ARM64_PLATFORM_DEVICES + bool "ARM64 Platform-Specific Device Drivers" + depends on ARM64 || COMPILE_TEST + default y + help + Say Y here to get to see options for platform-specific device drivers + for arm64 based devices, primarily EC-like device drivers. + This option alone does not add any kernel code. + + If you say N, all options in this submenu will be skipped and disabled. + +if ARM64_PLATFORM_DEVICES + +endif # ARM64_PLATFORM_DEVICES diff --git a/drivers/platform/arm64/Makefile b/drivers/platform/arm64/Makefile new file mode 100644 index 000000000000..f91cdc7155e2 --- /dev/null +++ b/drivers/platform/arm64/Makefile @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Makefile for linux/drivers/platform/arm64 +# +# This dir should only include drivers for EC-like devices. +# From patchwork Fri Mar 15 13:51:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Travkin X-Patchwork-Id: 780560 Received: from box.trvn.ru (box.trvn.ru [194.87.146.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 EB2C82C840; Fri, 15 Mar 2024 13:51:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.87.146.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710510719; cv=none; b=jC//6g0a25PK8ZDW9J2lnDQVe7yPAxNri4ajykWWHVG3jfnmx/GVBqLKs7qsxAog1Ufn2HFWsi27js44sxKK3Vp1GLKcS1B+AAAn8lOf6bwkhDSqwj4CaIWTVw+AGfs0h58skbQNwdtzNisJtnUTRk3bw4PhWKg5cd23YPv8El8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710510719; c=relaxed/simple; bh=jsye4iMlzYgMShc+YE+ty/P6/vvS30GKFX45O2KwmP0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OhZF20TqTQDPvwJrSoea37HdocVPTkXPyctMMdpT8WCvU5bHVhVDP90FNCmJWLbG7XSV48Hahi7D4kFsYlKQPmseshRrnlaiKt45Ign+krEo4dst4d2Te7TGZ9S88UJsYTgtLIwgTotbiORHjuQkJbQS2UpJUjIuWynfuYLyRRs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=trvn.ru; spf=pass smtp.mailfrom=trvn.ru; dkim=pass (2048-bit key) header.d=trvn.ru header.i=@trvn.ru header.b=ELqiRKgo; arc=none smtp.client-ip=194.87.146.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=trvn.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=trvn.ru Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=trvn.ru header.i=@trvn.ru header.b="ELqiRKgo" Received: from authenticated-user (box.trvn.ru [194.87.146.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.trvn.ru (Postfix) with ESMTPSA id 99E7A41EF5; Fri, 15 Mar 2024 18:51:38 +0500 (+05) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=trvn.ru; s=mail; t=1710510699; bh=jsye4iMlzYgMShc+YE+ty/P6/vvS30GKFX45O2KwmP0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ELqiRKgoMh/paed6/QeN0DzWJIDDh+sKv7npRojZQQgtjVE0BhAN9mLHyFm1fWOwR hAgBtEEYZwmt878Zv72lE+kEgZxouA5b3vx9kiRP1IYldRorXSqSlUoXgH6eb+CLZZ q/fZNKxASk1bgxksQJ5q+sdvMdh3x39X29WNjuK+6POViHoqprBVZKHS5FUh2ZYB56 PoRN2f9dUJ9ErF+8SdUlpHhmlKlu+zeIaY+sl6pn08/BmKapoD2LKqNmT7ky0bH1vy MnPHUuqGwMBamWvhKm7+Yk2gYSVjTcwraDiFnb4QazheBOemld9tv5TlrXJihxF2q1 n9I9e2rMZM4uA== From: Nikita Travkin Date: Fri, 15 Mar 2024 18:51:18 +0500 Subject: [PATCH v5 4/4] arm64: dts: qcom: acer-aspire1: Add embedded controller Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240315-aspire1-ec-v5-4-f93381deff39@trvn.ru> References: <20240315-aspire1-ec-v5-0-f93381deff39@trvn.ru> In-Reply-To: <20240315-aspire1-ec-v5-0-f93381deff39@trvn.ru> To: Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , cros-qcom-dts-watchers@chromium.org, Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Bryan O'Donoghue Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, platform-driver-x86@vger.kernel.org, Nikita Travkin X-Developer-Signature: v=1; a=openpgp-sha256; l=2209; i=nikita@trvn.ru; h=from:subject:message-id; bh=jsye4iMlzYgMShc+YE+ty/P6/vvS30GKFX45O2KwmP0=; b=owEBbQKS/ZANAwAIAUMc7O4oGb91AcsmYgBl9FJmccm+Xc7hgj8Q6v+gBqQukTnL3STU+cuEM TmuIGHG2jKJAjMEAAEIAB0WIQTAhK9UUj+qg34uxUdDHOzuKBm/dQUCZfRSZgAKCRBDHOzuKBm/ dQUAEACD/drXOfIJgA0gly7ofi/bbFZl5eYLRSRa6n5nS4fpElxHHThb/7q51vzHzt14N4SaPYv J0PHGX5ekFi7DAuuwoYo0b0ggS5i2BEdwRoHCOBRA0k8bng1gD5wU6z2QopoHd3nTzdZoVn4gxj wd0GtFsGcuM7OkstTVKBp3IIdpdsoYpWzrx3YduLDuER9WcftEnIKPV50hFI6LSR1Obv//learC ZT4zzaz69ZNuEEOKsM/yBN8ij5KoFDVcr5P4QZoiptRpUlAFKv5GiFf3sXMX42ar4KrP7+8C7VR MF8h3RL5kAOIwGXvtdS7gp9G8y2fv3RrtcaVippNj1sMab37kfJYq8A6q4oJTC9fWcwdDYMu7TH jwyNboh+2vfW31vShdg9eXnVCDFBPyC1+js3BVi1cvoFBAbLmmUzXTfJQXgB09el7CS9QNaJHdJ FgGZycezb38SnqEI6xgc5c9+gleeIRymuY4sNW1c30Ro5hVjYzEbvvUHh8kBypACqPHZ6jeDb5k g+6yxF58ridqGqfjUX5w5H0sdMrYmqnEuH3ZE6S+B1fj/n2zner8kHhyFlfhT9bho9BjfnGyZNe QZcGDC/ZUwJm/J79TDl007EpgmXcu2NUTvldW0C3InOwqL7IwAnK1rmjfsCB1hbOfek/DjQewVO Ox0VsgCJ+GPd6Vw== X-Developer-Key: i=nikita@trvn.ru; a=openpgp; fpr=C084AF54523FAA837E2EC547431CECEE2819BF75 The laptop contains an embedded controller that provides a set of features: - Battery and charger monitoring - USB Type-C DP alt mode HPD monitoring - Lid status detection - Small amount of keyboard configuration* [*] The keyboard is handled by the same EC but it has a dedicated i2c bus and is already enabled. This port only provides fn key behavior configuration. Add the EC to the device tree and describe the relationship between the EC-managed type-c port and the SoC DisplayPort. Reviewed-by: Konrad Dybcio Signed-off-by: Nikita Travkin --- arch/arm64/boot/dts/qcom/sc7180-acer-aspire1.dts | 40 +++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180-acer-aspire1.dts b/arch/arm64/boot/dts/qcom/sc7180-acer-aspire1.dts index 5afcb8212f49..3f0d3e33894a 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-acer-aspire1.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-acer-aspire1.dts @@ -255,7 +255,25 @@ &i2c2 { clock-frequency = <400000>; status = "okay"; - /* embedded-controller@76 */ + embedded-controller@76 { + compatible = "acer,aspire1-ec"; + reg = <0x76>; + + interrupts-extended = <&tlmm 30 IRQ_TYPE_LEVEL_LOW>; + + pinctrl-0 = <&ec_int_default>; + pinctrl-names = "default"; + + connector { + compatible = "usb-c-connector"; + + port { + ec_dp_in: endpoint { + remote-endpoint = <&mdss_dp_out>; + }; + }; + }; + }; }; &i2c4 { @@ -419,6 +437,19 @@ &mdss { status = "okay"; }; +&mdss_dp { + data-lanes = <0 1>; + + vdda-1p2-supply = <&vreg_l3c_1p2>; + vdda-0p9-supply = <&vreg_l4a_0p8>; + + status = "okay"; +}; + +&mdss_dp_out { + remote-endpoint = <&ec_dp_in>; +}; + &mdss_dsi0 { vdda-supply = <&vreg_l3c_1p2>; status = "okay"; @@ -857,6 +888,13 @@ codec_irq_default: codec-irq-deault-state { bias-disable; }; + ec_int_default: ec-int-default-state { + pins = "gpio30"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + edp_bridge_irq_default: edp-bridge-irq-default-state { pins = "gpio11"; function = "gpio";