From patchwork Mon Feb 19 22:34:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammed Efe Cetin X-Patchwork-Id: 203303 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp75254dyc; Mon, 19 Feb 2024 14:41:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV89PqtLW668IYN1WI8fba603xyLkbzXvXBmIz6DAO9KMKEnILI4qRM9j/lKS1qfnxKJ2zMvjmjuIk2S04HsRGWtVdlNw== X-Google-Smtp-Source: AGHT+IFRr9vcJLnn89gg574LFfbghbgD8MZdsCNgQsXx2QmnpQL21yp/b9BKUaSM7v5dSCLWC1xa X-Received: by 2002:a05:6870:420b:b0:21e:f5a7:5b7 with SMTP id u11-20020a056870420b00b0021ef5a705b7mr2592659oac.29.1708382505551; Mon, 19 Feb 2024 14:41:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708382505; cv=pass; d=google.com; s=arc-20160816; b=pn7oaWheQTsUNOIWMEweso4aGqUo2nvh96/HA9rYdhXCH6dGmUUlbsxwU4BnOAjcP2 1Q5f/TVGw0dBA9MlZMp0fFoMEAFr7fQQtHBYWLvcuSxaP7vxMM5B5xcEqnadEH33+qcI jBgXPQU0tMTd3R5tzXNdamyIpGkhGf/BIn0hl/tqVLcKXzYYa0F/Oarj459i7QtyR7k8 lnzO6TtivBXSY1kIJG+2eHjnV1QZSEfyR2Gsd4+U9GbjJxJH0/i36d3rUEF2cGTLkZEW uQhrL2pWjUzP1d6lr4sdGU8RmnI7nhbiRNEsfzo5eLxH+fM/iMu5uKdpO9qvKm3ci1XX WTqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ueyLOZc7B83IQ6uzxnld32qnUQjpyIZJagirXKNDJ58=; fh=V8Ef4H2uJkQZDuPIgc3s0n5U+QDYdOIQgtOD60pTxX4=; b=E6aajpkkfoFRtcO0mD3vKFbXoaI2FOQef89IvjOidn08vHq3HeyZEpNZNy3uLPm/Fg 9fRisFiq5V330pdm6zxHyajx7+X/o7NjWxLIwcZihZ97LPjAU7z2d/a0sLuqLvNZzdB2 wCcvlWn2gcCZNDefj/52ye121JPo//JUDNCUtz3qJ+GlrmEsNd+9pRpv4517JM+nEpYW QSkcrnJqZV7s/vCAC3GYvhQl5zCQ32JnsXzndG/GnAoXQ8Zcno5UN/iHi0yr0m6XSueL l+YtbXym5vlOQ8X9FoYEQ6G9pVw2Bpz7+QD1claEuNRMZZgS+49sJ1tfPlReS/25ap42 WrMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@6tel.net header.s=mail header.b=Badhxm+I; arc=pass (i=1 spf=pass spfdomain=6tel.net dkim=pass dkdomain=6tel.net); spf=pass (google.com: domain of linux-kernel+bounces-72073-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72073-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id i10-20020a65484a000000b005dc80f256ccsi5025216pgs.849.2024.02.19.14.41.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 14:41:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72073-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@6tel.net header.s=mail header.b=Badhxm+I; arc=pass (i=1 spf=pass spfdomain=6tel.net dkim=pass dkdomain=6tel.net); spf=pass (google.com: domain of linux-kernel+bounces-72073-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72073-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 98F64B23B61 for ; Mon, 19 Feb 2024 22:37:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8165E5A105; Mon, 19 Feb 2024 22:35:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=6tel.net header.i=@6tel.net header.b="Badhxm+I" Received: from forward500c.mail.yandex.net (forward500c.mail.yandex.net [178.154.239.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCD0353E30; Mon, 19 Feb 2024 22:35:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.154.239.208 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708382131; cv=none; b=LinLhY+9v1Sh5Y4VAnG1rGNoPgOCGd4+AokLy7QgQIKjJe9scTj+85GTFzFWMbyypcr6oyEyvfdvxIkaScK4p9P8JjQoSEQyhC/1ZpzGKF5czI4LQvOL1H74LKxK4bEYRPHhkv6GGOS6s4Qp262NkCqkcz0+WFwB+SFHWxGazyM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708382131; c=relaxed/simple; bh=eMg/ntcnSGsveyRs2+mVAGmH9JL2cC6ThpMt223qU+s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XkFK6ElkTYxhj8sQdNbOw9vsv+lkUhctlXy9NE6dKG4+H04mh1gcniuMqmfo4wKKAAA4NkdktOQjyl6KWogyu6ceGATD/i0MDI4soD+CXP+JGbafirVPeYiHi82C9xJnozOZuaJZOKv20ycRWFZt+X+n1BfOZ014z+f8BC9ozLc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=6tel.net; spf=pass smtp.mailfrom=6tel.net; dkim=pass (1024-bit key) header.d=6tel.net header.i=@6tel.net header.b=Badhxm+I; arc=none smtp.client-ip=178.154.239.208 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=6tel.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=6tel.net Received: from mail-nwsmtp-smtp-production-main-46.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-46.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:3285:0:640:fd1e:0]) by forward500c.mail.yandex.net (Yandex) with ESMTPS id 5B18F60EFA; Tue, 20 Feb 2024 01:35:22 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-46.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id bYZIDNh7RSw0-9HqUFJ1q; Tue, 20 Feb 2024 01:35:21 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6tel.net; s=mail; t=1708382121; bh=ueyLOZc7B83IQ6uzxnld32qnUQjpyIZJagirXKNDJ58=; h=Message-ID:Date:In-Reply-To:Cc:Subject:References:To:From; b=Badhxm+Iu1+MfBrvQtqg5tRId7aDKWdDmWMqIlj6HmK6nt+bLoeN7af88cxe7X0RQ tEU9FBhUpqDsLFjqx93Hi9bCiC5FT3FiAe7STBzCr0Vw9/3pfYfEgC8sdQLVjYNyS8 X+OV8jYps0ouEz/mwSV/9zby15Eq9Fmv5mccmeCE= Authentication-Results: mail-nwsmtp-smtp-production-main-46.myt.yp-c.yandex.net; dkim=pass header.i=@6tel.net From: efectn@6tel.net To: linux-rockchip@lists.infradead.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, heiko@sntech.de, sebastian.reichel@collabora.com, Muhammed Efe Cetin Subject: [PATCH 6/9] arm64: dts: rockchip: Add saradc and adc buttons to Khadas Edge 2 and enable tsadc Date: Tue, 20 Feb 2024 01:34:22 +0300 Message-ID: <03feaafefd0c13268ba1630251558749654a567d.1708381247.git.efectn@protonmail.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <5a7bd2cd8703e51382abfc11242de59d45286477.1708381247.git.efectn@protonmail.com> References: <5a7bd2cd8703e51382abfc11242de59d45286477.1708381247.git.efectn@protonmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791368894580338665 X-GMAIL-MSGID: 1791368894580338665 From: Muhammed Efe Cetin This commit enables tsadc, saradc and the function button on saradc line for Khadas Edge 2. Signed-off-by: Muhammed Efe Cetin --- .../dts/rockchip/rk3588s-khadas-edge2.dts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts index 5a3b52e62dce..dfcdbec3534d 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts @@ -3,6 +3,7 @@ /dts-v1/; #include +#include #include #include #include "rk3588s.dtsi" @@ -20,6 +21,20 @@ 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-function { + label = "Function"; + linux,code = ; + press-threshold-microvolt = <17000>; + }; + }; + ir-receiver { compatible = "gpio-ir-receiver"; gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_LOW>; @@ -257,6 +272,11 @@ &pwm15 { status = "okay"; }; +&saradc { + vref-supply = <&avcc_1v8_s0>; + status = "okay"; +}; + &sdhci { bus-width = <8>; no-sdio; @@ -604,6 +624,10 @@ regulator-state-mem { }; }; +&tsadc { + status = "okay"; +}; + &uart2 { pinctrl-0 = <&uart2m0_xfer>; status = "okay";