From patchwork Fri May 14 12:05:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ikjoon Jang X-Patchwork-Id: 12257605 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F132C433B4 for ; Fri, 14 May 2021 12:05:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6835061458 for ; Fri, 14 May 2021 12:05:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232747AbhENMGZ (ORCPT ); Fri, 14 May 2021 08:06:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232710AbhENMGZ (ORCPT ); Fri, 14 May 2021 08:06:25 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6908CC06174A for ; Fri, 14 May 2021 05:05:14 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id n6-20020a17090ac686b029015d2f7aeea8so548304pjt.1 for ; Fri, 14 May 2021 05:05:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ESz1m+xFUF72VscU5fWkJoT2mNgqOdvTW7GhFogGpow=; b=jlLMKB+F/SNGEYmoZGhZ5YtkM3COzY94C5Ivz+iYkjUmqI2lLnk4k6ZlSvm1tbAFrL 4CatoS/pHf+J0nmYUQ2qGObJ35+qtUdDEGjYQ6dR2xuafEBAbonWclGOYfp4TScaZDyE RVxAypldZSDnc6ZJnYTa89lgL8Lu1GIg4vkpQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ESz1m+xFUF72VscU5fWkJoT2mNgqOdvTW7GhFogGpow=; b=jWKaThFxUi8u9NjM+K0UDrmcTueg0VxF9DTZqSSFjslrnwhy2ckwRlf7sQ0cqM2e2f +EJYyANcT8E9gd6k1RH+msPhy+9tHWQONtyGI4v+EkRYTjSgtaU9UIo9IUXL6BGAI2j7 s+lV6O0spUuJxNd8v1jGbXTXrVqUUfDI9M80whs+D+zIJtUt/UEyqTZ8xuag/7Jhy07F ePxY7YX8IzPq6zYbfR87nYziVCUkv5YOUD5qWjrUjBt92jcaLD1c0NgV4E0EoY35Q9yK 0KkedEfxyA91JvrLiF8cMaKNf/3yEQ2V8jGP+eDu7QHzQgS2UEvQB1rtilq04fL11Srv arXQ== X-Gm-Message-State: AOAM532TABNeYZZiGqK8k/+oCWpFA4QpuYgAg6YZJG1ytO5SkKUUxGiw L8ni+wtaFbMuc8j7+524cJ12Gw== X-Google-Smtp-Source: ABdhPJxqR+M96mho41Ct8cnfTqOd9Wenm8xCKMaP6Cs7rBEAt2Gh3Wb8X7EhF1DQX9+x5g4tQFQzHw== X-Received: by 2002:a17:90a:c217:: with SMTP id e23mr10653652pjt.43.1620993913826; Fri, 14 May 2021 05:05:13 -0700 (PDT) Received: from ikjn-p920.tpe.corp.google.com ([2401:fa00:1:b:7641:4b1d:694e:6ea2]) by smtp.gmail.com with ESMTPSA id q24sm4117786pgb.19.2021.05.14.05.05.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 05:05:13 -0700 (PDT) From: Ikjoon Jang To: devicetree@vger.kernel.org, Lee Jones Cc: Stephen Boyd , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Benson Leung , Guenter Roeck , Jiri Kosina , Enric Balletbo i Serra , Hsin-Yi Wang , Ikjoon Jang , Rob Herring , Rob Herring Subject: [PATCH v7 1/2] mfd: google,cros-ec: add DT bindings for a baseboard's switch device Date: Fri, 14 May 2021 20:05:05 +0800 Message-Id: <20210514120506.264838-1-ikjn@chromium.org> X-Mailer: git-send-email 2.31.1.751.gd2f1c929bd-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This is for ChromeOS tablets which have a 'cros_cbas' switch device in the "Whiskers" base board. This device can be instantiated only by device tree on ARM platforms. ChromeOS EC doesn't provide a way to probe the device. Signed-off-by: Ikjoon Jang Reviewed-by: Rob Herring Acked-by: Enric Balletbo i Serra --- Changes in v7: - no changes from v6 Changes in v6: - Remove a label for cbas node in a example Changes in v5: - Add missing blank lines and change the description property's position. - Add a note to description: "this device cannot be detected at runtime." Changes in v4: - Define cros-cbase bindings inside google,cros-ec.yaml instead of a separated binding document. .../bindings/mfd/google,cros-ec.yaml | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml index 76bf16ee27ec..929c17552d8b 100644 --- a/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml +++ b/Documentation/devicetree/bindings/mfd/google,cros-ec.yaml @@ -114,6 +114,22 @@ properties: - "#address-cells" - "#size-cells" + cbas: + type: object + + description: + This device is used to signal when a detachable base is attached + to a Chrome OS tablet. This device cannot be detected at runtime. + + properties: + compatible: + const: google,cros-cbas + + required: + - compatible + + additionalProperties: false + patternProperties: "^i2c-tunnel[0-9]*$": type: object @@ -180,6 +196,10 @@ examples: interrupts = <99 0>; interrupt-parent = <&gpio7>; spi-max-frequency = <5000000>; + + cbas { + compatible = "google,cros-cbas"; + }; }; }; From patchwork Fri May 14 12:05:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ikjoon Jang X-Patchwork-Id: 12257607 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FE80C433B4 for ; Fri, 14 May 2021 12:05:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F25EF613F2 for ; Fri, 14 May 2021 12:05:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232952AbhENMGd (ORCPT ); Fri, 14 May 2021 08:06:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232409AbhENMG3 (ORCPT ); Fri, 14 May 2021 08:06:29 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B1FAC06174A for ; Fri, 14 May 2021 05:05:17 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id b13-20020a17090a8c8db029015cd97baea9so1250834pjo.0 for ; Fri, 14 May 2021 05:05:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LQYcCupFxg8InoP1/2l4FLzi8zH3ZsXDMqBqASZIVVw=; b=h+oc/D3mYJDcntABEZ7Xencts0Pcq4IP1wsAn22ViNoE8u10MaXUcYFxtvJdiEfiV9 XrKR63MUl98qE31wy4jHiZXJQ9su4mubotYfQ8BdnhRvX2w546zD6PISKWPSNJypKdDd o5pPKzmyociU/gI83QN42ywVCdKDNG6V50DYE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LQYcCupFxg8InoP1/2l4FLzi8zH3ZsXDMqBqASZIVVw=; b=GFPJXYx4lS/C/KlgWb8cCQwbJq8oIZn8x4lXONz/NqYqSLBfONyHttOZWjFQJG5plp KnQP1oYc7L6hsaZJaFmvIcLSFubyOeHVe53LYjbrpyrBVcHa0YPHhuOcHc08+7rB/31j nFO73EKqQzUtlxx6tiirFdwhM16glNzwz1Ail13fUeOs8OYLQgJTfYrfVxajas/x36Yy UYUftmDR0SYzmLYCBQaaAc5d5LNHGfy2T79B68ysqNH6wA55Abd5k2JE7V351/eeNOrQ al8Yeo3zXnK/qQ/Zg88+eHaYWda24ded0plWZ1e99GgZrzgO7AQJUymtVLce/fC9HULD CkCg== X-Gm-Message-State: AOAM531XvnXRqzmKwg+dFO1ChdS20Xqse92LNUAHfnAgPDb+Wez32xnq kIFQktDzLzhZftz0aGvKgo59TA== X-Google-Smtp-Source: ABdhPJxTGEutiLz4dIZ95IKEFr/dFQx3NVMgYvn0N6sOU8DscXO53wP3u6K6hMm1/3zSOWBZprpNdQ== X-Received: by 2002:a17:902:d508:b029:ef:b008:f4ad with SMTP id b8-20020a170902d508b02900efb008f4admr4040933plg.8.1620993916755; Fri, 14 May 2021 05:05:16 -0700 (PDT) Received: from ikjn-p920.tpe.corp.google.com ([2401:fa00:1:b:7641:4b1d:694e:6ea2]) by smtp.gmail.com with ESMTPSA id q24sm4117786pgb.19.2021.05.14.05.05.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 05:05:16 -0700 (PDT) From: Ikjoon Jang To: devicetree@vger.kernel.org, Lee Jones Cc: Stephen Boyd , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Benson Leung , Guenter Roeck , Jiri Kosina , Enric Balletbo i Serra , Hsin-Yi Wang , Ikjoon Jang , Matthias Brugger , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v7 2/2] arm64: dts: mt8183: add cbas node under cros_ec Date: Fri, 14 May 2021 20:05:06 +0800 Message-Id: <20210514120506.264838-2-ikjn@chromium.org> X-Mailer: git-send-email 2.31.1.751.gd2f1c929bd-goog In-Reply-To: <20210514120506.264838-1-ikjn@chromium.org> References: <20210514120506.264838-1-ikjn@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Add a 'cbas' device node for supporting tablet mode switch in kukui devices. Kukui platforms with detacheable base have an additional input device under cros-ec, which reports SW_TABLET_MODE regarding its base state (e.g. base flipped or detached). Signed-off-by: Ikjoon Jang --- Changes in v7: - remove a label from cbas node - fix an erratum in commit message (table --> tablet) - dt-binding patchess merged altogether with mt8183 dts arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi index ff56bcfa3370..1512605a438e 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi @@ -816,6 +816,10 @@ usbc_extcon: extcon0 { compatible = "google,extcon-usbc-cros-ec"; google,usb-port-id = <0>; }; + + cbas { + compatible = "google,cros-cbas"; + }; }; };