From patchwork Thu Dec 2 19:16:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarrett Schultz X-Patchwork-Id: 519824 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC0E2C433FE for ; Thu, 2 Dec 2021 19:16:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376694AbhLBTUC (ORCPT ); Thu, 2 Dec 2021 14:20:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356107AbhLBTT7 (ORCPT ); Thu, 2 Dec 2021 14:19:59 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA1D7C06174A; Thu, 2 Dec 2021 11:16:36 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id gx15-20020a17090b124f00b001a695f3734aso591869pjb.0; Thu, 02 Dec 2021 11:16:36 -0800 (PST) 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=Yfo3jQf5Izn7ae1GOMCWN+TGqqxxN60vrwflAXtqxVw=; b=ZxD324Maya4Q9n+VejVjyEKZtNkI+Pf6W5HlKHwalRLfUbExybr7ADZRTCh87YLwjL lMJCCNvo6+swwhedbcx9DYqXywAIhEzt7g/otZx6LwoK3T/2kyewpLGdnDR8cmflNjy/ qbn4guiJTbhDvs8QFIe418SwLyUlI5zwvpO9Tj20Zx6gn++l0QqgOL0iCNK611tRR/oY vVAN+7U8M4Oq72OjV5XvE9inf4LoQKmQDCJ1NpHNHtln2+wM2h9jukoUSPHNGAyk1UV2 mD+m+x10Bk6Jdzyc/+RnR4kdK2E/9f70OOg4xpaYBsl0IQQBG1vFbGFi3AfNM24MloGB 7bOw== 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=Yfo3jQf5Izn7ae1GOMCWN+TGqqxxN60vrwflAXtqxVw=; b=278XpxFx0e5/0w+g9AmK+Sf6IbEOGNIDpffNHiayA7nbeauSSv6VtHrrUcu3hNinUx r9+RIc8T7VXHu2Ifm8d55FhKA9vAMhzV4/gww2UrBpWaeE3FOfvtMfPO9xKa43v1rEjj KkV9Vy+WPGj44VIqcGXw5U7uFAH2PMUW9nIumah9SVrOohtepxZOOA16lA56E/0eduxQ P0/v4A8gJqwgCjooeI9bCxdy6k8oKmUL+y9LGNVftLlh9LE2iGXXuaTl9Zwl6/GkJ2FO QoGTJUrE9H8LrRI0+vX4FZ1NjhJRtOjXgbK9v0MBXYLNPjMBdG8WcZ+3Z7lrXXJUCJjx gV2Q== X-Gm-Message-State: AOAM530/ofE0OcJmgCJDTe2dOs0yLxNFdorrzpMPzUUH8LEbVZLJIKhK DoHj0kWl5r37ieNj7HKM49GFlCzBro8= X-Google-Smtp-Source: ABdhPJwAvl+e+E1j483etc0u7bmpoCkkWnGwNGhkcgDqydeD8Pf5oXt8BLdgnhko0QMkrZeFbSKZqA== X-Received: by 2002:a17:90a:1b2e:: with SMTP id q43mr8019429pjq.56.1638472596470; Thu, 02 Dec 2021 11:16:36 -0800 (PST) Received: from jaschultz-Thelio-Major.corp.microsoft.com ([2001:4898:80e8:37:517f:74c7:9fe9:b5e8]) by smtp.gmail.com with ESMTPSA id x14sm289897pjl.27.2021.12.02.11.16.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 11:16:36 -0800 (PST) From: Jarrett Schultz X-Google-Original-From: Jarrett Schultz To: Rob Herring , Andy Gross , Bjorn Andersson , Hans de Goede , Mark Gross , Maximilian Luz Cc: linux-arm-msm@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Felipe Balbi , Jarrett Schultz Subject: [PATCH 1/5] dt-bindings: platform: microsoft: Document surface xbl Date: Thu, 2 Dec 2021 11:16:26 -0800 Message-Id: <20211202191630.12450-2-jaschultz@microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211202191630.12450-1-jaschultz@microsoft.com> References: <20211202191630.12450-1-jaschultz@microsoft.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Introduce yaml for surface xbl driver. Signed-off-by: Jarrett Schultz --- Changes in v3: - Updated description to only pertain to the hardware - Updated the required field to properly reflect the binding - Removed the first example - Fixed the size of the reg field in the second example --- Changes in v2: - Removed json-schema dependence - Elaborated on description of driver - Updated example --- .../platform/microsoft/surface-xbl.yaml | 69 +++++++++++++++++++ MAINTAINERS | 7 ++ 2 files changed, 76 insertions(+) create mode 100644 Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml diff --git a/Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml b/Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml new file mode 100644 index 000000000000..a661cfedd8fa --- /dev/null +++ b/Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/platform/microsoft/surface-xbl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Surface Extensible Bootloader for Microsoft Surface Duo + +maintainers: + - Jarrett Schultz + +description: | + Defined to expose information that is used during production when + device is in manufacturing mode. Some of the information included + in this imem section is - + * board_id + * battery_present + * hw_init_retries + * is_customer_mode + * is_act_mode + * pmic_reset_reason + * touch_fw_version + * ocp_error_location + See sysfs documentation for more information. + +properties: + compatible: + const: simple-mfd + + reg: + maxItems: 1 + + properties: + compatible: + const: microsoft,sm8150-surface-duo-xbl + +# reg: +# maxItems: 1 + +# additionalProperties: false + +# required: +# - compatible +# - reg + +additionalProperties: false + +required: + - compatible + - reg + - ranges + - "#address-cells" + - "#size-cells" + +examples: + - | + imem@146bf000 { + compatible = "simple-mfd"; + reg = <0x146bf000 0x1000>; + ranges = <0x0 0x146bf000 0x1000>; + + #address-cells = <1>; + #size-cells = <1>; + + xbl@a94 { + compatible = "microsoft,sm8150-surface-duo-xbl"; + reg = <0xa94 0x100>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 913856599623..0daa416a2aba 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12650,6 +12650,13 @@ F: Documentation/driver-api/surface_aggregator/clients/dtx.rst F: drivers/platform/surface/surface_dtx.c F: include/uapi/linux/surface_aggregator/dtx.h +MICROSOFT SURFACE DUO XBL DRIVER +M: Jarrett Schultz +L: linux-arm-msm@vger.kernel.org +L: platform-driver-x86@vger.kernel.org +S: Supported +F: Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml + MICROSOFT SURFACE GPE LID SUPPORT DRIVER M: Maximilian Luz L: platform-driver-x86@vger.kernel.org From patchwork Thu Dec 2 19:16:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarrett Schultz X-Patchwork-Id: 519822 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44151C001B6 for ; Thu, 2 Dec 2021 19:16:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376789AbhLBTUL (ORCPT ); Thu, 2 Dec 2021 14:20:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376361AbhLBTUB (ORCPT ); Thu, 2 Dec 2021 14:20:01 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F117EC061757; Thu, 2 Dec 2021 11:16:37 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id b11so392584pld.12; Thu, 02 Dec 2021 11:16:37 -0800 (PST) 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=qvLTgGZG4bYn9DGJF1rWTWzAv7yNl0un9HiwPetaqA0=; b=B/JGkrFUJMSUx1kx85cCmBmGLIsRg96OK3u1/HQ3dxsaJHAauqjSWNOXI8XifhxH4Q FXF4zXv2fGNFisz5MdTgVeInPg8DWz2FGDZBmGjnF57EPtHXeVCVv/IOV2Q+dTH+cwaj J/0ZXty/WZLaO5NA6lxHAElfQPlvXZ7hqV/L1OuxALYNYj08uiehB9wovwNEQstm5kFL zYZV1ysmbk4LxwzV+CgJRREdnQC9zTQMuPDVPS32+ONBEUwJXHDtzZc4wB5C9xuUrnOz 7eQTaQBKZt2dN5P+hrv2ZLg0VKpH9bSbqKcsPCQzx8oo0qo42a0ShJE0JqarvZOChjb8 tghA== 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=qvLTgGZG4bYn9DGJF1rWTWzAv7yNl0un9HiwPetaqA0=; b=j41WiLOHftsHYYfpCX2oT7e2ur7ZuNxn0I9LoiLA2tdRwGjg6/dQAcNlDg+C2pgaDC ILMNh/4KU9uN4iYCd6l2YZcDk88q4tDPsfBWhSNa7/1XU5fa79L0LBf2zrxS2asJoT/5 bSzTU83xO5/E6n8dP7vN3F8c5suLvTpwEdDcUQrIBADftUNPZyE5L8xA59ZRd2zCnjTM OyuiY8QxCWw6eyopItZYcTSfio2DXbUj5Rs1EIWiWWLV/zn9kErF2IpVDjfMpy4itFRz aRGJlAfTfG0dfnm0fqqqCRiJkQxXwajM9TlTbiT91md7anOtM9KIN2Gd+fjt1E1tzM8E 4hdg== X-Gm-Message-State: AOAM531vL1j4nD/6lDUE+k5XrB5RfvjOP2J+njsdx4Enjh0HgtC/HiqR jz3fMfjpqF/cNBph1Q0KINU= X-Google-Smtp-Source: ABdhPJzpg/GFbT+i6QUzSUt93XI3COPH+h0B9GZHT3Kalaag/a4UNffRexF3QXgfCTDVXy3aN0iYvA== X-Received: by 2002:a17:90b:1bd1:: with SMTP id oa17mr8097403pjb.246.1638472597529; Thu, 02 Dec 2021 11:16:37 -0800 (PST) Received: from jaschultz-Thelio-Major.corp.microsoft.com ([2001:4898:80e8:37:517f:74c7:9fe9:b5e8]) by smtp.gmail.com with ESMTPSA id x14sm289897pjl.27.2021.12.02.11.16.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 11:16:36 -0800 (PST) From: Jarrett Schultz X-Google-Original-From: Jarrett Schultz To: Rob Herring , Andy Gross , Bjorn Andersson , Hans de Goede , Mark Gross , Maximilian Luz Cc: linux-arm-msm@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Felipe Balbi , Jarrett Schultz Subject: [PATCH 2/5] platform: surface: Propagate ACPI Dependency Date: Thu, 2 Dec 2021 11:16:27 -0800 Message-Id: <20211202191630.12450-3-jaschultz@microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211202191630.12450-1-jaschultz@microsoft.com> References: <20211202191630.12450-1-jaschultz@microsoft.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Since the Surface XBL Driver does not depend on ACPI, the platform/surface directory as a whole no longer depends on ACPI. With respect to this, the ACPI dependency is moved into each config that depends on ACPI individually. Signed-off-by: Jarrett Schultz --- Changes in v3: - Further propagated ACPI dependecy to SURFACE_AGGREGATOR --- Changes in v2: - Created to propagate ACPI dependency --- drivers/platform/surface/Kconfig | 7 ++++++- drivers/platform/surface/aggregator/Kconfig | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/platform/surface/Kconfig b/drivers/platform/surface/Kconfig index 3105f651614f..5f0578e25f71 100644 --- a/drivers/platform/surface/Kconfig +++ b/drivers/platform/surface/Kconfig @@ -5,7 +5,6 @@ menuconfig SURFACE_PLATFORMS bool "Microsoft Surface Platform-Specific Device Drivers" - depends on ACPI default y help Say Y here to get to see options for platform-specific device drivers @@ -30,12 +29,14 @@ config SURFACE3_WMI config SURFACE_3_BUTTON tristate "Power/home/volume buttons driver for Microsoft Surface 3 tablet" + depends on ACPI depends on KEYBOARD_GPIO && I2C help This driver handles the power/home/volume buttons on the Microsoft Surface 3 tablet. config SURFACE_3_POWER_OPREGION tristate "Surface 3 battery platform operation region support" + depends on ACPI depends on I2C help This driver provides support for ACPI operation @@ -126,6 +127,7 @@ config SURFACE_DTX config SURFACE_GPE tristate "Surface GPE/Lid Support Driver" + depends on ACPI depends on DMI help This driver marks the GPEs related to the ACPI lid device found on @@ -135,6 +137,7 @@ config SURFACE_GPE config SURFACE_HOTPLUG tristate "Surface Hot-Plug Driver" + depends on ACPI depends on GPIOLIB help Driver for out-of-band hot-plug event signaling on Microsoft Surface @@ -154,6 +157,7 @@ config SURFACE_HOTPLUG config SURFACE_PLATFORM_PROFILE tristate "Surface Platform Profile Driver" + depends on ACPI depends on SURFACE_AGGREGATOR_REGISTRY select ACPI_PLATFORM_PROFILE help @@ -176,6 +180,7 @@ config SURFACE_PLATFORM_PROFILE config SURFACE_PRO3_BUTTON tristate "Power/home/volume buttons driver for Microsoft Surface Pro 3/4 tablet" + depends on ACPI depends on INPUT help This driver handles the power/home/volume buttons on the Microsoft Surface Pro 3/4 tablet. diff --git a/drivers/platform/surface/aggregator/Kconfig b/drivers/platform/surface/aggregator/Kconfig index fd6dc452f3e8..cab020324256 100644 --- a/drivers/platform/surface/aggregator/Kconfig +++ b/drivers/platform/surface/aggregator/Kconfig @@ -4,6 +4,7 @@ menuconfig SURFACE_AGGREGATOR tristate "Microsoft Surface System Aggregator Module Subsystem and Drivers" depends on SERIAL_DEV_BUS + depends on ACPI select CRC_CCITT help The Surface System Aggregator Module (Surface SAM or SSAM) is an From patchwork Thu Dec 2 19:16:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarrett Schultz X-Patchwork-Id: 520240 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D5E5C43219 for ; Thu, 2 Dec 2021 19:16:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376769AbhLBTUJ (ORCPT ); Thu, 2 Dec 2021 14:20:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376698AbhLBTUC (ORCPT ); Thu, 2 Dec 2021 14:20:02 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08D4CC06174A; Thu, 2 Dec 2021 11:16:39 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id n8so426417plf.4; Thu, 02 Dec 2021 11:16:39 -0800 (PST) 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=DChq+runyuoKezCwzz3rPMHe9RvY3OViZ3BA2aHQIac=; b=dOZJNunx6j1wi2vztGqXp6R79XSYNDor8ANbZ0074eyPeDOqgjjlcjL2/gI567SmKM JfYva+/x1qMFiCSb4w4CGU7V2EfUhDFdPh6fnsdwV/ivp/uSF1H1oOD797NV9Aj0ewmb yxlM/nu/Ed8omG2BaVdC5RHYqVzTkC24oOtGlQkpXEr4Ohy1p4S1cTRLlfkXAuKtijTD 6GdIO6vBjNRJi/X6Cf1OnX4VeO776tQrcpy6AUH2a8mjvC9AmEcPs9bCW3ue9+yeqXLS 1m9AvyVVlNV5W2+p01yymy8co6NqUXKs4OP/M9CPZ2EptN0sgwGD7tqmgL32SBBvJ/s5 kAyg== 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=DChq+runyuoKezCwzz3rPMHe9RvY3OViZ3BA2aHQIac=; b=AT5GyllHtvaOcCuATN4X30M/y50+BhjaNpVJLyPBNiQ6wUUZcZ+ARHNFZ6n5dPMp6b gANkle5dUdOJmiL3Z6xJnJyiCm8rv8RZHDuqysOXxZyjfuMOoU1B6ncbdkVusO40a3AI feOqu5qHOfTx7hvNaxz5mi1KAnYPQ3R6LMUUuQS8WrDuS4IbE3mnvjsJZNL1vfzPZ8E8 lKPP5RwJkIPFBbdcB8h8X9IDe33tfnJ3+BeRwN5wMd5np0uPS2h8P0mC0hapCqMs3tKi hBkOHJ+eVZQh4drkzvwIv4zx6Euu9DvoKj8bAzSHin9vTn8BrD4aOEyYXsOqzaCFOIFN e2EA== X-Gm-Message-State: AOAM532/hpa4CL7F8BPraz0Is4zBP0Jz3okcSHWvfatlM92cve+Zh6m4 UqFOL4pJB0bb/RXvO5l5AHA= X-Google-Smtp-Source: ABdhPJzb01rz4pb86Ea1YkSIf0RE9x8VjRZJvk89mnC+Jrdvp+p9YOCk9q1mouPXf9WlKMxkKHYMrQ== X-Received: by 2002:a17:90b:128d:: with SMTP id fw13mr8077975pjb.50.1638472598419; Thu, 02 Dec 2021 11:16:38 -0800 (PST) Received: from jaschultz-Thelio-Major.corp.microsoft.com ([2001:4898:80e8:37:517f:74c7:9fe9:b5e8]) by smtp.gmail.com with ESMTPSA id x14sm289897pjl.27.2021.12.02.11.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 11:16:38 -0800 (PST) From: Jarrett Schultz X-Google-Original-From: Jarrett Schultz To: Rob Herring , Andy Gross , Bjorn Andersson , Hans de Goede , Mark Gross , Maximilian Luz Cc: linux-arm-msm@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Felipe Balbi , Jarrett Schultz Subject: [PATCH 3/5] platform: surface: Add surface xbl Date: Thu, 2 Dec 2021 11:16:28 -0800 Message-Id: <20211202191630.12450-4-jaschultz@microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211202191630.12450-1-jaschultz@microsoft.com> References: <20211202191630.12450-1-jaschultz@microsoft.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Introduce support for the Extensible Boot Loader driver found on the Surface Duo. Makes device information available to users via sysfs. Signed-off-by: Jarrett Schultz --- Changed in v3: - Updated several descriptions in the yaml to be more descriptive - Renamed files to use an underscore instead of a dash --- Changes in v2: - Added types.h inclusion and removed unused inclusions - Minor updates to code and acronym style - Remove __packed attribute on driver struct - Use .dev_groups for sysfs - Added more in-depth description of driver in Kconfig - Changed target KernelVersion in sysfs documentation --- .../ABI/testing/sysfs-platform-surface-xbl | 79 ++++++++ MAINTAINERS | 2 + drivers/platform/surface/Kconfig | 12 ++ drivers/platform/surface/Makefile | 1 + drivers/platform/surface/surface_xbl.c | 186 ++++++++++++++++++ 5 files changed, 280 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-platform-surface-xbl create mode 100644 drivers/platform/surface/surface_xbl.c diff --git a/Documentation/ABI/testing/sysfs-platform-surface-xbl b/Documentation/ABI/testing/sysfs-platform-surface-xbl new file mode 100644 index 000000000000..505a662d8511 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-platform-surface-xbl @@ -0,0 +1,79 @@ +What: /sys/devices/platform/146bfa94.xbl/battery_present +Date: October 2021 +KernelVersion: 5.16 +Contact: jaschultz@microsoft.com +Description: + Read only. It returns whether the battery is present. Valid + values are: + 0 - battery absent + 1 - battery present + +What: /sys/devices/platform/146bfa94.xbl/board_id +Date: October 2021 +KernelVersion: 5.16 +Contact: jaschultz@microsoft.com +Description: + Read only. It returns a Microsoft specific board id. + +What: /sys/devices/platform/146bfa94.xbl/hw_init_retries +Date: October 2021 +KernelVersion: 5.16 +Contact: jaschultz@microsoft.com +Description: + Read only. It returns a Microsoft specific value related to the + retries attempted to properly initialize the battery charging + subsystem. + +What: /sys/devices/platform/146bfa94.xbl/is_act_mode +Date: October 2021 +KernelVersion: 5.16 +Contact: jaschultz@microsoft.com +Description: + Read only. It returns whether ACT mode is enabled. Valid values + are: + 0 - ACT disabled + 1 - ACT enabled + + ACT mode is used to run checks and put the device to shipmode + at factory. + +What: /sys/devices/platform/146bfa94.xbl/is_customer_mode +Date: October 2021 +KernelVersion: 5.16 +Contact: jaschultz@microsoft.com +Description: + + mode. Valid values are: + 0 - Not in manufacturing mode + 1 - In manufacturing mode + +What: /sys/devices/platform/146bfa94.xbl/ocp_error_location +Date: October 2021 +KernelVersion: 5.16 +Contact: jaschultz@microsoft.com +Description: + Read only. It returns 0 or the id of the power rail which has the + OCP error. Valid values are: + Bit(s) Meaning + 15 More than one OCP error occurred + 14-12 PMIC + 11-7 SMPS + 6-2 LDO + 1-0 BOB + +What: /sys/devices/platform/146bfa94.xbl/pmic_reset_reason +Date: October 2021 +KernelVersion: 5.16 +Contact: jaschultz@microsoft.com +Description: + Read only. It returns the reason for the reset. Valid values + are: + 0 - no reason lol + 9 - Battery driver triggered + +What: /sys/devices/platform/146bfa94.xbl/touch_fw_version +Date: October 2021 +KernelVersion: 5.16 +Contact: jaschultz@microsoft.com +Description: + Read only. It returns the version of the firmware. diff --git a/MAINTAINERS b/MAINTAINERS index 0daa416a2aba..4f04f7afa3e1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12655,7 +12655,9 @@ M: Jarrett Schultz L: linux-arm-msm@vger.kernel.org L: platform-driver-x86@vger.kernel.org S: Supported +F: Documentation/ABI/testing/sysfs-platform-surface-xbl F: Documentation/devicetree/bindings/platform/microsoft/surface-xbl.yaml +F: drivers/platform/surface/surface-xbl.c MICROSOFT SURFACE GPE LID SUPPORT DRIVER M: Maximilian Luz diff --git a/drivers/platform/surface/Kconfig b/drivers/platform/surface/Kconfig index 5f0578e25f71..96d6030d8d49 100644 --- a/drivers/platform/surface/Kconfig +++ b/drivers/platform/surface/Kconfig @@ -185,6 +185,18 @@ config SURFACE_PRO3_BUTTON help This driver handles the power/home/volume buttons on the Microsoft Surface Pro 3/4 tablet. +config SURFACE_XBL + tristate "Surface XBL Driver" + depends on ARM64 || COMPILE_TEST + depends on OF + help + If you say 'Y' to this option, support will be included for the + Surface Extensible Boot Loader (XBL) Driver. This driver exposes + information about the device through sysfs. + + This driver can also be built as a module. If so, the module + will be called surface-xbl. + source "drivers/platform/surface/aggregator/Kconfig" endif # SURFACE_PLATFORMS diff --git a/drivers/platform/surface/Makefile b/drivers/platform/surface/Makefile index 32889482de55..eef05d247f75 100644 --- a/drivers/platform/surface/Makefile +++ b/drivers/platform/surface/Makefile @@ -16,3 +16,4 @@ obj-$(CONFIG_SURFACE_GPE) += surface_gpe.o obj-$(CONFIG_SURFACE_HOTPLUG) += surface_hotplug.o obj-$(CONFIG_SURFACE_PLATFORM_PROFILE) += surface_platform_profile.o obj-$(CONFIG_SURFACE_PRO3_BUTTON) += surfacepro3_button.o +obj-$(CONFIG_SURFACE_XBL) += surface_xbl.o diff --git a/drivers/platform/surface/surface_xbl.c b/drivers/platform/surface/surface_xbl.c new file mode 100644 index 000000000000..e6272b704526 --- /dev/null +++ b/drivers/platform/surface/surface_xbl.c @@ -0,0 +1,186 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Surface eXtensible Boot Loader (XBL) + * + * Copyright (C) 2021 Microsoft Corporation + * Author: Jarrett Schultz + */ + +#include +#include +#include +#include +#include + +#define SURFACE_XBL_MAX_VERSION_LEN 16 +#define SURFACE_XBL_BOARD_ID 0 +#define SURFACE_XBL_BATTERY_PRESENT 1 +#define SURFACE_XBL_HW_INIT_RETRIES 2 +#define SURFACE_XBL_IS_CUSTOMER_MODE 3 +#define SURFACE_XBL_IS_ACT_MODE 4 +#define SURFACE_XBL_PMIC_RESET_REASON 5 +#define SURFACE_XBL_TOUCH_FW_VERSION 6 +#define SURFACE_XBL_OCP_ERROR_LOCATION \ + (SURFACE_XBL_TOUCH_FW_VERSION + \ + SURFACE_XBL_MAX_VERSION_LEN) + +struct surface_xbl { + struct device *dev; + + u8 board_id; + u8 battery_present; + u8 hw_init_retries; + u8 is_customer_mode; + u8 is_act_mode; + u8 pmic_reset_reason; + char touch_fw_version[SURFACE_XBL_MAX_VERSION_LEN]; + u16 ocp_error_location; +}; + +static ssize_t +board_id_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct surface_xbl *sxbl = dev_get_drvdata(dev); + + return sysfs_emit(buf, "%d\n", sxbl->board_id); +} +static DEVICE_ATTR_RO(board_id); + +static ssize_t +battery_present_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct surface_xbl *sxbl = dev_get_drvdata(dev); + + return sysfs_emit(buf, "%d\n", sxbl->battery_present); +} +static DEVICE_ATTR_RO(battery_present); + +static ssize_t +hw_init_retries_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct surface_xbl *sxbl = dev_get_drvdata(dev); + + return sysfs_emit(buf, "%d\n", sxbl->hw_init_retries); +} +static DEVICE_ATTR_RO(hw_init_retries); + +static ssize_t +is_customer_mode_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct surface_xbl *sxbl = dev_get_drvdata(dev); + + return sysfs_emit(buf, "%d\n", sxbl->is_customer_mode); +} +static DEVICE_ATTR_RO(is_customer_mode); + +static ssize_t +is_act_mode_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct surface_xbl *sxbl = dev_get_drvdata(dev); + + return sysfs_emit(buf, "%d\n", sxbl->is_act_mode); +} +static DEVICE_ATTR_RO(is_act_mode); + +static ssize_t +pmic_reset_reason_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct surface_xbl *sxbl = dev_get_drvdata(dev); + + return sysfs_emit(buf, "%d\n", sxbl->pmic_reset_reason); +} +static DEVICE_ATTR_RO(pmic_reset_reason); + +static ssize_t +touch_fw_version_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct surface_xbl *sxbl = dev_get_drvdata(dev); + + return sysfs_emit(buf, "0x%s\n", sxbl->touch_fw_version); +} +static DEVICE_ATTR_RO(touch_fw_version); + +static ssize_t +ocp_error_location_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct surface_xbl *sxbl = dev_get_drvdata(dev); + + return sysfs_emit(buf, "%d\n", sxbl->ocp_error_location); +} +static DEVICE_ATTR_RO(ocp_error_location); + +static struct attribute *xbl_attrs[] = { + &dev_attr_board_id.attr, + &dev_attr_battery_present.attr, + &dev_attr_hw_init_retries.attr, + &dev_attr_is_customer_mode.attr, + &dev_attr_is_act_mode.attr, + &dev_attr_pmic_reset_reason.attr, + &dev_attr_touch_fw_version.attr, + &dev_attr_ocp_error_location.attr, + NULL +}; + +static const struct attribute_group xbl_attr_group = { + .attrs = xbl_attrs, +}; + +const struct attribute_group *xbl_sysfs_groups[] = { + &xbl_attr_group, + NULL +}; + +static int surface_xbl_probe(struct platform_device *pdev) +{ + struct surface_xbl *sxbl; + void __iomem *regs; + int i; + + sxbl = devm_kzalloc(&pdev->dev, sizeof(*sxbl), GFP_KERNEL); + if (!sxbl) + return -ENOMEM; + + sxbl->dev = &pdev->dev; + + regs = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(regs)) + return PTR_ERR(regs); + + platform_set_drvdata(pdev, sxbl); + + sxbl->board_id = readb(regs + SURFACE_XBL_BOARD_ID); + sxbl->battery_present = readb(regs + SURFACE_XBL_BATTERY_PRESENT); + sxbl->hw_init_retries = readb(regs + SURFACE_XBL_HW_INIT_RETRIES); + sxbl->is_customer_mode = readb(regs + SURFACE_XBL_IS_CUSTOMER_MODE); + sxbl->is_act_mode = readb(regs + SURFACE_XBL_IS_ACT_MODE); + sxbl->pmic_reset_reason = readb(regs + SURFACE_XBL_PMIC_RESET_REASON); + + for (i = 0; i < SURFACE_XBL_MAX_VERSION_LEN; i++) + sxbl->touch_fw_version[i] = readb(regs + SURFACE_XBL_TOUCH_FW_VERSION + i); + + sxbl->ocp_error_location = readb(regs + SURFACE_XBL_OCP_ERROR_LOCATION); + + return 0; +} + +static const struct of_device_id surface_xbl_of_match[] = { + { + .compatible = "microsoft,sm8150-surface-duo-xbl" + }, + { } +}; +MODULE_DEVICE_TABLE(of, surface_xbl_of_match); + +static struct platform_driver surface_xbl_driver = { + .driver = { + .name = "surface-xbl", + .of_match_table = surface_xbl_of_match, + .dev_groups = xbl_sysfs_groups + }, + .probe = surface_xbl_probe, +}; +module_platform_driver(surface_xbl_driver); + +MODULE_AUTHOR("Jarrett Schultz "); +MODULE_DESCRIPTION("Surface Extensible Bootloader"); +MODULE_LICENSE("GPL"); From patchwork Thu Dec 2 19:16:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarrett Schultz X-Patchwork-Id: 519823 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7965FC4332F for ; Thu, 2 Dec 2021 19:16:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376715AbhLBTUJ (ORCPT ); Thu, 2 Dec 2021 14:20:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376700AbhLBTUD (ORCPT ); Thu, 2 Dec 2021 14:20:03 -0500 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1596C061759; Thu, 2 Dec 2021 11:16:39 -0800 (PST) Received: by mail-pg1-x531.google.com with SMTP id m15so685787pgu.11; Thu, 02 Dec 2021 11:16:39 -0800 (PST) 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=4f8Dvme7pLW3dtVQrEYhboJoVI/hxfZihp2fMPO4X/Q=; b=k6WtECBb84sXQ1YVFL3lC3DqtJQJ+LC1qvcBkDI9pWfBlRsIu3plHo2F7DgLqOcpC1 SR4UlQQyADW27XvQPzEOg4YA6rIHRsqVPJgiJVmBH25N3SNdziF+/F/R9n1qxs3hrVgS c3CxG0qjtMrafBMnP3Xibq8QsDKtK1f7DwER90/ElfSb5GvMEfpQTd9gajQyMoh4Br+L sq7nbOUP+e/++a1janXtX2weFSFZuLQOqAUL3OKvwEw+FyNAE5G90V/aEFZ4B8GvqKYg rK9Seye0PVmYb1vU9Vj4fPkWQKZB31/5D4XwLzCH4IgEfqkmvA+8Gn028obwx3ERyN1G n28w== 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=4f8Dvme7pLW3dtVQrEYhboJoVI/hxfZihp2fMPO4X/Q=; b=pBKopl94YslCOzEgdvBIKgBmq4Od1TkxjSIzjJzXZxt4//QaOiHxovqx/eGiawuw1y /BJ6QnUKxr+nN3dzWpe+dDEiixQRYXNn5SRaEVFglxsGdux2worz0QOjWLNxww5jagVg F0zVI1lkUm79yZZenh8sntxcuRgcmHOq/nIsknzTs3pFybZpIqfNcTcZ27IAJ4F9NrNI CTOeY3nc1+qnTDtH2MUoQ4P4i3/FhWHY0MqhuN2T1/XmmOvoePW8Jc0V2oYuTAXKutUL Wj4Jf6S/P4CVX+rD3wqtxUjGobiyctB28mIeosg1PUpbCMG5awWzcV0MdRwb5CsANWzj lywg== X-Gm-Message-State: AOAM533kl+Ol3SQmtM3iw+WceRbB6R4kcPfEWdgDzm7qcOvhEyWDTdBB 0gM1qQKocbhueusmj0mynnI= X-Google-Smtp-Source: ABdhPJxwJycOfRhjkzIlJc8JfZKoidNtDyJG9woEMOQd4CQ712KoQDMh+BDZFaj0vLCXbaXW01BKmA== X-Received: by 2002:a05:6a00:a8e:b0:4a4:ec38:b66a with SMTP id b14-20020a056a000a8e00b004a4ec38b66amr14425322pfl.7.1638472599367; Thu, 02 Dec 2021 11:16:39 -0800 (PST) Received: from jaschultz-Thelio-Major.corp.microsoft.com ([2001:4898:80e8:37:517f:74c7:9fe9:b5e8]) by smtp.gmail.com with ESMTPSA id x14sm289897pjl.27.2021.12.02.11.16.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 11:16:38 -0800 (PST) From: Jarrett Schultz X-Google-Original-From: Jarrett Schultz To: Rob Herring , Andy Gross , Bjorn Andersson , Hans de Goede , Mark Gross , Maximilian Luz Cc: linux-arm-msm@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Felipe Balbi , Jarrett Schultz Subject: [PATCH 4/5] arm64: dts: qcom: sm8150: Add imem section Date: Thu, 2 Dec 2021 11:16:29 -0800 Message-Id: <20211202191630.12450-5-jaschultz@microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211202191630.12450-1-jaschultz@microsoft.com> References: <20211202191630.12450-1-jaschultz@microsoft.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Introduce the imem section in preparation for the surface xbl driver. Signed-off-by: Jarrett Schultz Reviewed-by: Bjorn Andersson --- Changes in v3: - N/A --- Changes in v2: - Created to properly reference the xbl section inside of imem --- arch/arm64/boot/dts/qcom/sm8150.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi index 81b4ff2cc4cd..bcfcb7306cdc 100644 --- a/arch/arm64/boot/dts/qcom/sm8150.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi @@ -1175,6 +1175,14 @@ gpi_dma1: dma-controller@a00000 { status = "disabled"; }; + imem: imem@146bf000 { + compatible = "simple-mfd"; + reg = <0x0 0x146bf000 0x0 0x1000>; + ranges = <0x0 0x0 0x146bf000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; + }; + qupv3_id_1: geniqup@ac0000 { compatible = "qcom,geni-se-qup"; reg = <0x0 0x00ac0000 0x0 0x6000>; From patchwork Thu Dec 2 19:16:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarrett Schultz X-Patchwork-Id: 520241 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5446FC433FE for ; Thu, 2 Dec 2021 19:16:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376734AbhLBTUH (ORCPT ); Thu, 2 Dec 2021 14:20:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376706AbhLBTUD (ORCPT ); Thu, 2 Dec 2021 14:20:03 -0500 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF438C06174A; Thu, 2 Dec 2021 11:16:40 -0800 (PST) Received: by mail-pg1-x52e.google.com with SMTP id k4so697769pgb.8; Thu, 02 Dec 2021 11:16:40 -0800 (PST) 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=icZeasEa5qBq3L8d5srtUANYqE41LiH/z3sgJm+fPJk=; b=mqbD/6pSOGpoiznFKyrI4XqOazyzb74jum4qEY7J66AGmj7jxs/Yu4CwHTHNdDqTc+ FN6/q2YOlbxUY3TWstoFCyhXwx8GOb8FUiUbrLWZNBsfUFvdcQods66rKkgLHzfbCsx0 GO2NxijCurY7kbM/abAkt2GMoyQYwH1Sx/mopV4n2xNbAZpXAL89J3BxUqJfFRX/IRxW dSN5Hxd6ALDxndArAlCfFZxYWb6V1usbiPeJcbsHGmiRFf7xYty/vUUrcIjC/UG+WF1V y5Re89VD0GPILs6x655gOrh1z7/IUrJCLGkCQAROOKGpbra4FVhYk6fciqBwnWHldWXM gVEg== 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=icZeasEa5qBq3L8d5srtUANYqE41LiH/z3sgJm+fPJk=; b=ghC7lBu6SDKU9PUpA85wD+cJr1Ou+0PuuHhKksLx3gZKuaHZ+5Xj7VQ9si+uUCxHcd 2emofqybX3jiguox3dj82GguKxa+KH0QHCsHp7uSEhiwSaFfSW5ffdeNVgq9kIVxnKL8 Q+CnJaA40aYs4YOdwTU2236frFzPBRx4MBmH5/cKbeFnmlbEmqzEAxnOwFB29/Vu//iO rO6yChSZhQxhzjSrMUeh4SyDnp5y544a6UZXpDwWHwbixgw3n6SwdroK/66uqcOXDla0 uBozY4AyjSXSiAH3cE0V+M052vCa8VnD/esaZjPQm28KD819O82iixLV4uCRt3RMDzB+ W9Bg== X-Gm-Message-State: AOAM530DgKdZqvhpXMwvB0fpKFB01S6BFQLbv80hmx85NfZ6KnRY35lU ZzZPOX8/VYgoTGUSFLa2vwXHCGs26no= X-Google-Smtp-Source: ABdhPJyGMARj3AkzMfhyvvlcCbMFPzdg3jD2tNeAfYl/NHsTkBLla9Yo3mGMLKbH76yqyZuHqiYFkg== X-Received: by 2002:a05:6a00:1905:b0:4a8:2f86:3f18 with SMTP id y5-20020a056a00190500b004a82f863f18mr14665364pfi.52.1638472600288; Thu, 02 Dec 2021 11:16:40 -0800 (PST) Received: from jaschultz-Thelio-Major.corp.microsoft.com ([2001:4898:80e8:37:517f:74c7:9fe9:b5e8]) by smtp.gmail.com with ESMTPSA id x14sm289897pjl.27.2021.12.02.11.16.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 11:16:39 -0800 (PST) From: Jarrett Schultz X-Google-Original-From: Jarrett Schultz To: Rob Herring , Andy Gross , Bjorn Andersson , Hans de Goede , Mark Gross , Maximilian Luz Cc: linux-arm-msm@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Felipe Balbi , Jarrett Schultz Subject: [PATCH 5/5] arm64: dts: qcom: surface-duo: Add surface xbl Date: Thu, 2 Dec 2021 11:16:30 -0800 Message-Id: <20211202191630.12450-6-jaschultz@microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211202191630.12450-1-jaschultz@microsoft.com> References: <20211202191630.12450-1-jaschultz@microsoft.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Introduce device tree source for the surface xbl driver. Signed-off-by: Jarrett Schultz --- Changes in v3: - N/A --- Changes in v2: - Updated to reference an offset inside of imem --- .../boot/dts/qcom/sm8150-microsoft-surface-duo.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dts b/arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dts index 5901c28e6696..abb7964daac4 100644 --- a/arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dts +++ b/arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dts @@ -430,6 +430,16 @@ &i2c19 { /* MAX34417 @ 0x1e */ }; +&imem { + status = "okay"; + + xbl@a94 { + compatible = "microsoft,sm8150-surface-duo-xbl"; + reg = <0xa94 0x100>; + status = "okay"; + }; +}; + &pon { pwrkey { status = "okay";