Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp412538rdb; Thu, 5 Oct 2023 09:21:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGauq7lwkBep6PlTomerysRetUh0MjodpM8tnTuAk8+oDxPG9H308A/aIN18oIsgDa/aKmw X-Received: by 2002:a05:6358:5e12:b0:139:d5b9:87d3 with SMTP id q18-20020a0563585e1200b00139d5b987d3mr4163461rwn.5.1696522883301; Thu, 05 Oct 2023 09:21:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696522883; cv=none; d=google.com; s=arc-20160816; b=c3FdRFHQwB9gRXb7tGAvH80TAIdsCglPL2iYZUjlI3v6fWGMOEbANc4AnrLoK7SOgZ PO12jgSji2gUDW2Z7a544VjgRAuaEsikU0ab6RrQxIyl08xEuzzVtM/0M/KaXoS6b7iz Z659RybY5l4oILswH8OBvhMyZJkMBOzNVqR++guXMC2VnOyrdBQQ+jqQcali9KiDir5a t7uylUj6zFsvHwifwOXX16PsbRVBROjhebzngg3reVrgXPaXOElaUK4WfD548AUAkqHR lVL3Rz9IrSYVzTDit93z2y46T9fYS7XJrumdXJs+kQL/nSTpV62lY5u69uTEKH8FilvD rzEg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ltAzCgNJGq4NV4wM3vZkHwyIutshuXYXNmsM5SjryIs=; fh=GTJIzdjfRddsbECYS2NPf2cTBoGzj7EWzl+KjtEu2+s=; b=jOwXqs8a5C8i7TTYYI9VaWgGwkK5a2iBUD+1NSGNyXjBZYsGP/mWjjNh39ltt6arkO LnZRrMB7T+MaDBMGkNROoaCBMI1v1ExBKDMwJQIrBzYQZn93VBW+9JVd/yIJa5HyRSDL r8sBc6pulVVeFuWIDR4j+j85iTEpSvuQL5i2322pR0mX1HVZH+A7r3pNufS2sLeq8RZw MKQ2aMdjGpG/mij0CvJXAL9pFCTaUWlfSAiRxZUgO0NUtY+BOEeAgM19ZzvbDvxesEmD +Sdi6h7kupTqCAYLX8EfhsYUxQo7CSPG1hFFK/RagVuz6yDujV9TSEqmLEKmvfm9BS0O BVxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XqDzX8rP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id m16-20020a63fd50000000b00565eedb1cf8si1732797pgj.825.2023.10.05.09.21.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:21:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XqDzX8rP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EC3D9802A6F5; Thu, 5 Oct 2023 09:20:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243070AbjJEQTl (ORCPT + 99 others); Thu, 5 Oct 2023 12:19:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239202AbjJEQQA (ORCPT ); Thu, 5 Oct 2023 12:16:00 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B57D627B35; Thu, 5 Oct 2023 06:44:02 -0700 (PDT) Received: from jupiter.universe (dyndsl-091-248-132-024.ewe-ip-backbone.de [91.248.132.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id 4A4F4660731A; Thu, 5 Oct 2023 14:44:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1696513441; bh=RcJpTpb79ysiBy81p3dPq9Lfzg7r8A9jGzsGF4aBu2g=; h=From:To:Cc:Subject:Date:From; b=XqDzX8rPKgNqnx5SPZrzvPG5NeGmhI2LMLu5369GU1iu3ZlRtR1AAGyJee8NNHYiU hdcxisq89pJLSiTP/UqbSzeFdEWofsk0VlHQCnWnKgL+F6LxJwI8ByT6mZt/Cca8IK s71r32NkruvkVEPgH/jfL2cGEqJkpUpi1y7ztchMrwOOx2pYcIf6s50XIpurHYlp4D MGeW3mSbM3VUGj4iblaD/36utD9tKUWjMfsnKp8v/xCZGw/MpbXZXnHH+MeL5yIW6c x4FQ7x2chjlMVJMvVYTk0prEXVxllWKVibn5CWJUy//dnfilePJAhU0BWdyz+dVSOD GJ9Ptkdpx3n7A== Received: by jupiter.universe (Postfix, from userid 1000) id 1859A4800C3; Thu, 5 Oct 2023 15:43:59 +0200 (CEST) From: Sebastian Reichel To: Heiko Stuebner Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sebastian Reichel , kernel@collabora.com Subject: [PATCH v1 1/1] arm64: dts: rockchip: rk3588-evb1: add ADC buttons Date: Thu, 5 Oct 2023 15:43:57 +0200 Message-Id: <20231005134357.37171-1-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 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,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 05 Oct 2023 09:20:45 -0700 (PDT) The Rockchip EVB1 has a couple of buttons connected via an ADC line. Let's add them to its devicetree. Signed-off-by: Sebastian Reichel --- .../boot/dts/rockchip/rk3588-evb1-v10.dts | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts index c3fe58e39e99..b9d789d57862 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts @@ -7,6 +7,7 @@ /dts-v1/; #include +#include #include #include "rk3588.dtsi" @@ -23,6 +24,38 @@ chosen { stdout-path = "serial2:1500000n8"; }; + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 1>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1800000>; + poll-interval = <100>; + + button-vol-up { + label = "Volume Up"; + linux,code = ; + press-threshold-microvolt = <17000>; + }; + + button-vol-down { + label = "Volume Down"; + linux,code = ; + press-threshold-microvolt = <417000>; + }; + + button-menu { + label = "Menu"; + linux,code = ; + press-threshold-microvolt = <890000>; + }; + + button-escape { + label = "Escape"; + linux,code = ; + press-threshold-microvolt = <1235000>; + }; + }; + backlight: backlight { compatible = "pwm-backlight"; power-supply = <&vcc12v_dcin>; @@ -286,6 +319,11 @@ &pwm2 { status = "okay"; }; +&saradc { + vref-supply = <&vcc_1v8_s0>; + status = "okay"; +}; + &sdhci { bus-width = <8>; no-sdio; -- 2.40.1