From patchwork Mon Sep 18 17:32:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13390179 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7A5E7CD13D2 for ; Mon, 18 Sep 2023 17:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lvjoLLuKF4jYTAQdDSo9mlQCutYFr4R8sYTHh4dCHzM=; b=gpfuDD33nIS/9V binD4yD+a/blKcbyoJrgRSUYnW93IC9VrT181VrgrlsENRCHqlkVnJhzOJXAAh9cxv/h2xYXFq+rG gJvCU8oLhJAKpJwx3MODmK2klHHEuz11jpOf/YsDgSWBkwFeP6vVAnt3uvnYOHhFCqRUfbjLiQBJ+ f+Pgjt8u1sKXt6aG4aQxVykE8+8ZWsiB9AxrU6XWm40q/HkAwDAAM4iIAbPi0uffeA5DC3xOeZJ3/ 8HpMxpyYs1dyVMqTIUMuH3eUqUVjG6dN3tsc4IHQWrKDu/E9Wn1C3sNt9dibJA/UwOk0Dld0EOzsM nZ6e5vVy4OijJeNy2yMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiI7R-00Fzjl-2w; Mon, 18 Sep 2023 17:33:09 +0000 Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiI7M-00FziE-3A for linux-rockchip@lists.infradead.org; Mon, 18 Sep 2023 17:33:06 +0000 Received: by mail-ot1-x332.google.com with SMTP id 46e09a7af769-6bdacc5ed66so2606448a34.1 for ; Mon, 18 Sep 2023 10:33:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695058383; x=1695663183; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fOcE1gEVv8k+1mKB0BOnHrQMjIkGHZfrQmU9eoEzouw=; b=UjG6TOAne/BTaAJxsjcTRJpgxKsqNnRiAYcG3Uwrkru+n2vgLsxorADyUmcH6ICKo4 6EqgYNSh0gckrFbI2+lJK0VCkcIq/zI3npvO/0sEP/IMkM/L0dKmhZmQNwnNQjC5wm43 Ntrd6DwdEjgLLjnQqBNnQfsZ9D1Ct2hd8xNG6/zzzXCcpVo+V8smgBAisiy1En5EYKOZ kmo5UCSl0CQnTmesSvFNOv1bbAVvkVkqlcbs2Hp9wtBkt44RCglwsmvZOxJ5XRgsR+Bp VTtlpru74xISBFdiZbHWSGeIcgl/uFTByDAzpXsEFyiKwakSFRKXXNJDfW+09wn7uON6 ZqVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695058383; x=1695663183; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fOcE1gEVv8k+1mKB0BOnHrQMjIkGHZfrQmU9eoEzouw=; b=HKSaotJisAlOnXQEnWfoAvgzyRzlnW6GZxGHIp0Ww58Tl6KZY0wKhFs0HhyNv2BcPn gcnV6Ab8z3dvnaMYDw4r8quX48/wUrQivJKqsZ0pWDwfoPhNDLRt5wgVKG4NE2RYkT9m R6/cN90G/pwMMyKgfUbU340MOb4wV74JjnAR9bIqrFcxLDiqD362KH9Z/X+oE97Nq+Lu vbbwq2PyOou/TsYVa4HbXPraECg71aDwCS5offJ2i5HnUphHdNLedHYr+y/9CAvZi6kS 2vhjafVK7LI/O51NpTjq3CkpDqOLN45w53chreOGj+U4YOXEoYcXCfRf8wq8pEZcgsEw x/1A== X-Gm-Message-State: AOJu0YymLwPrrkPamkF3MkZu8W/WIexVtQP4FfWLTVJ8ZKFdRXV8+psX hZqblX0gTGTn8iQlWfpynzc= X-Google-Smtp-Source: AGHT+IHwJnfJ+vNpzCxFe1Y+gVZMxsNsok+2pobr3vm625PSwkZzk7Gd+IgfVNKsp37mzVgFeJHbdA== X-Received: by 2002:a05:6830:3493:b0:6bd:8067:21ec with SMTP id c19-20020a056830349300b006bd806721ecmr256313otu.15.1695058383320; Mon, 18 Sep 2023 10:33:03 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id z5-20020a056830128500b006bf0f95f702sm4315755otp.64.2023.09.18.10.33.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 10:33:03 -0700 (PDT) From: Chris Morgan To: devicetree@vger.kernel.org Cc: linux-rockchip@lists.infradead.org, jagan@edgeble.ai, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH V2 1/3] arm64: dts: rockchip: add PCIe to rk3588s-indiedroid-nova Date: Mon, 18 Sep 2023 12:32:53 -0500 Message-Id: <20230918173255.1325-2-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230918173255.1325-1-macroalpha82@gmail.com> References: <20230918173255.1325-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_103305_019221_9EC2BF7C X-CRM114-Status: GOOD ( 10.33 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Chris Morgan Add the necessary nodes to the Indiedroid Nova to activate the PCI express port that is used by the RTL8111 ethernet controller. Signed-off-by: Chris Morgan --- .../dts/rockchip/rk3588s-indiedroid-nova.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts index d1503a4b233a..646f49cc9e53 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts @@ -109,6 +109,10 @@ vcc5v0_usbdcin: vcc5v0-usbdcin-regulator { }; }; +&combphy0_ps { + status = "okay"; +}; + &cpu_l0 { cpu-supply = <&vdd_cpu_lit_s0>; }; @@ -348,6 +352,12 @@ i2s0_8ch_p0_0: endpoint { }; }; +&pcie2x1l2 { + pinctrl-0 = <&rtl8111_perstb>; + pinctrl-names = "default"; + status = "okay"; +}; + &pinctrl { bluetooth-pins { bt_reset: bt-reset { @@ -366,6 +376,12 @@ bt_wake_host: bt-wake-host { }; }; + ethernet-pins { + rtl8111_perstb: rtl8111-perstb { + rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + hym8563 { hym8563_int: hym8563-int { From patchwork Mon Sep 18 17:32:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13390180 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01C88CD37B0 for ; Mon, 18 Sep 2023 17:33:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Qds5HxpzUivJyb2eIe4yYSRJ282zE1qQmEz5g8YUUU4=; b=4bpyxvDlPB2Hi3 j0tJ19+5wDfCsOjB8EqsagblZ2NaIiGDw4juCLV8HlXZQ4eHeftkH2aVw9stnnNWFPzlKh+nQyskl ImBe/0lf1RIBY2eoRpq7xNmqyjU7kTc36DfkGaItgcxjtQFCVxU+1bpLMSD836rz1CIBulB3c3+Bn hAR3i0gcg71cPFErf+NijwPomc+mul+eLW+Jb9rFG5kStKw7WWIEe7DSBukTQ/2pmBUC9Wp9tNE7L ZB6F9drrp9T2S//YO96hx5hAAq0Mu2lBJXjpp0iJUOCKlQDzVLbtQlYNly3S26J0GHk6eXDZx8KVY Q6ZsA07wl8C+imZ07YaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiI7S-00Fzjy-0t; Mon, 18 Sep 2023 17:33:10 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiI7N-00FziF-29 for linux-rockchip@lists.infradead.org; Mon, 18 Sep 2023 17:33:07 +0000 Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-6c09d760cb9so3013055a34.2 for ; Mon, 18 Sep 2023 10:33:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695058384; x=1695663184; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=23RWTA42oeiWyX/+9q0UPnX5CmGzLdzzX40DGM4ZYYo=; b=X5OPZjISvGybH3cBsSh5fuxEuATWKrXwX3UIHz/2rgwcgUV6tlqx/+pbzWw8y/7Gyp 0sVBvbdixDQw/jSh4xyxl2yLbZ+WohnPchksTmVMiZsK6XoezRNOl4y524T7gAjrmJIt SHiG2OeQ4FxBJq4sE5kC4d+hAjrqnybFVBHixY92UvfR3mqjnr20oFIVK3rXoj5ilf0k /ePxTSj8t6pUcvUsr2TPaUOvjxU7l0kHTnsyVMCcJhWcHnZcI1HAYH95aDcLQtV6nLC+ 9HT9rZWpTa5F1gxPS0gn+iGBoika1kf2PY0D84bakF6cD1lITOXJtGp8hJaRf7vOqs0E Jheg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695058384; x=1695663184; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=23RWTA42oeiWyX/+9q0UPnX5CmGzLdzzX40DGM4ZYYo=; b=wnevxSjaBimI6Vpsn/HXYQtfhZHkZlCSCV5hHjA08Tr6bkSGuSg0QsLX2p5bZQ0f9D BSmXi8gpjPZqw/GFP/itnYwLp0yUOjVIPr+aZVkK6vMSTg0uw4bAmJqzQrPsUmXcBkjL FfFU6CIVExgSf2R78LBcmokbQQxCxNkxHWMG9z4Tdgs999z6whOeRAlvnmsyLmwxfoo0 0/Hu4emVEdiB2V3jabtHgJanYFSKQR5MDmzpxjTm+sETcUX06a6zjnmKe5MjIjl50vf9 VEc0PGChSvZfrw1JgVK5+XqDC1n5ui0Ov7nBLoJV2tapUraVIlnBgUGmXMtCWSD0KP1q 5uww== X-Gm-Message-State: AOJu0YxWdjWJFdddF3aDKOjtv9IkDnQkq/4O1SwSYcP/Znu83DSdyMJv EjkDFnU6T5vyIiEVCoX4ibA= X-Google-Smtp-Source: AGHT+IFhyJPfr37KhtqJ3wZPBJSB4Q0J4LL+BiQBQ2krz+QLEZPpXFJVQeJuBoTMWVVYL6p0kMeSxA== X-Received: by 2002:a9d:7dcb:0:b0:6bf:ef0:c69 with SMTP id k11-20020a9d7dcb000000b006bf0ef00c69mr9537847otn.34.1695058383965; Mon, 18 Sep 2023 10:33:03 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id z5-20020a056830128500b006bf0f95f702sm4315755otp.64.2023.09.18.10.33.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 10:33:03 -0700 (PDT) From: Chris Morgan To: devicetree@vger.kernel.org Cc: linux-rockchip@lists.infradead.org, jagan@edgeble.ai, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH V2 2/3] arm64: dts: rockchip: add USB2 to rk3588s-indiedroid Date: Mon, 18 Sep 2023 12:32:54 -0500 Message-Id: <20230918173255.1325-3-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230918173255.1325-1-macroalpha82@gmail.com> References: <20230918173255.1325-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_103305_704805_C1C58A12 X-CRM114-Status: GOOD ( 11.14 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Chris Morgan Enable USB2 (EHCI and OCHI mode) support for the Indiedroid Nova. This adds support for USB for the 4 full size USB-A ports. Note that USB 3 (the two blue full-size USB-A ports) is still outstanding, as is support for USB on the USB-C ports. The controller is not yet supported for these ports. Signed-off-by: Chris Morgan --- .../dts/rockchip/rk3588s-indiedroid-nova.dts | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts index 646f49cc9e53..1e2336d3065b 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts @@ -751,6 +751,24 @@ &tsadc { status = "okay"; }; +&u2phy2 { + status = "okay"; +}; + +&u2phy2_host { + phy-supply = <&vcc5v0_usb>; + status = "okay"; +}; + +&u2phy3 { + status = "okay"; +}; + +&u2phy3_host { + phy-supply = <&vcc5v0_usb>; + status = "okay"; +}; + &uart2 { pinctrl-0 = <&uart2m0_xfer>; status = "okay"; @@ -775,3 +793,19 @@ bluetooth { pinctrl-names = "default"; }; }; + +&usb_host0_ehci { + status = "okay"; +}; + +&usb_host0_ohci { + status = "okay"; +}; + +&usb_host1_ehci { + status = "okay"; +}; + +&usb_host1_ohci { + status = "okay"; +}; From patchwork Mon Sep 18 17:32:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Morgan X-Patchwork-Id: 13390178 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3B076CD37B0 for ; Mon, 18 Sep 2023 17:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fuksy62d8UFMI250MMhbkC1snvF5APQiwscFqJekv2I=; b=wDPtSyzESW2A8g ppRply3D+foSDkzTiFE7PI7m1Dxn1rD80Zs8ccnciHtasVH5Ls7teLxhu/6BGTggcWGk6zeKhXvID RnK3ppC/y82kv/BlOUZ90fU5smCUO8+iWjdGeI/aSnMcBmfLRtOxZAoIMCmSXKJGxgp0R3oSHneqf nllEgZxX8UNE9dq66+ynzKyR9RIsGayRvMivXfBgaffXkfjm/xLA4vzs6SchmHe8yB3+KpSpFrV+E /S+AFrb0W9IEGK5x5cwC/GtzzyqYGLWadWAvBknj0TG0IazZxmUA9hmn6CZHpZrk/1kxSpgr/9Co2 aNO9UxJhbjPb/lRF8amg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiI7S-00FzkA-26; Mon, 18 Sep 2023 17:33:10 +0000 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiI7N-00FziR-2y for linux-rockchip@lists.infradead.org; Mon, 18 Sep 2023 17:33:08 +0000 Received: by mail-ot1-x335.google.com with SMTP id 46e09a7af769-6bf01bcb1aeso2873616a34.3 for ; Mon, 18 Sep 2023 10:33:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695058384; x=1695663184; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XK3Zx4cA9xhlrAxpKhxgK0rFJrxd0HOs9F/T85uolkQ=; b=MG4vvIO5JX+pSee9ibi3NWnkkuaP0fsjmJORjEcCiB9EoBEIwTdvlsSUHmaidBXLmG z8VnUt3UjxSVMRKhXQJ4Tcuq/PBRlradiTu/Rz6fznlip6v2kCFx+UaYiQnl/lENYL6f 0w86/3yJ2z4wSzpgfdWFvFAl19HjwyyS3l7kRAczfuSn55rjMaliuKpk7aLktWXwGxJv PLLSY0e2bj6dJPmx3gfw6I/laHeuX4NAG+RX029d9jiJwb7v8uRX9Wv8gL1R5T0eKQfZ dnAzzK2HobFcko+rDUgokvDvvP5c9u9j12bzjEVZ5Tqf2dRv+/v2QeMx6knPfJeRAonX i4Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695058384; x=1695663184; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XK3Zx4cA9xhlrAxpKhxgK0rFJrxd0HOs9F/T85uolkQ=; b=n/20JDMGMt/3tDqFyvCWZzJ6tC6i1Jr4Rbpa6uWvMwPZJPeY/XYZDgEzwGRTqMmgyG vdVk3m8OemW1LDVW36p7dqrePk16o0hNKdR05lbTD+51QmpXXYvvPz0HqomYIixtsxyr n0FbVaz+5Zs/Z7vaaOZpEn+wc6NNbuox6NtcPpSp+9hDSd5xEsTkRNYbfROwbXv1OPVh nVmz+aylsczbBKzM9pbg8TGWEUBZ+G++Z6PhP4OtE7SY/SZ9NVngETwuF49jc1UbDGNC KCsBLjS4QfvJCNwB0eJwWn7qNqv0lXrrRlROEXKJJZE6DsOHDboZUF+9F3UOnoKUi2mU A71g== X-Gm-Message-State: AOJu0YwT5UNnsXGppg9cJFh5lM7l1+PYi/rK8rTDiZmBeaBjJ6eVhgvB MNh0Fm6yvjlD5PByEy7vSas= X-Google-Smtp-Source: AGHT+IG099pZXcuRlYWQ4u4WN0bBrYtPwrlrp3XmF1JITM2fdMwNCInhOudAchYGgcQDm9Og8WM1Qg== X-Received: by 2002:a9d:4f0b:0:b0:6be:c1b:ded4 with SMTP id d11-20020a9d4f0b000000b006be0c1bded4mr10608390otl.3.1695058384590; Mon, 18 Sep 2023 10:33:04 -0700 (PDT) Received: from localhost.localdomain ([75.28.21.198]) by smtp.gmail.com with ESMTPSA id z5-20020a056830128500b006bf0f95f702sm4315755otp.64.2023.09.18.10.33.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 10:33:04 -0700 (PDT) From: Chris Morgan To: devicetree@vger.kernel.org Cc: linux-rockchip@lists.infradead.org, jagan@edgeble.ai, heiko@sntech.de, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, Chris Morgan Subject: [PATCH V2 3/3] arm64: dts: rockchip: Add saradc node to Indiedroid Nova Date: Mon, 18 Sep 2023 12:32:55 -0500 Message-Id: <20230918173255.1325-4-macroalpha82@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230918173255.1325-1-macroalpha82@gmail.com> References: <20230918173255.1325-1-macroalpha82@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230918_103305_958821_2315AE88 X-CRM114-Status: GOOD ( 13.14 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: Chris Morgan Add ADC support for the Indiedroid Nova, as well as the two ADC buttons found on the device. The buttons are documented as "boot" and "recovery". The boot button is used by the bootloader to boot into USB recovery mode. The recovery button use is currently unknown. Signed-off-by: Chris Morgan --- .../dts/rockchip/rk3588s-indiedroid-nova.dts | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts index 1e2336d3065b..60f00ceb630e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts +++ b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts @@ -3,6 +3,7 @@ /dts-v1/; #include +#include #include #include #include "rk3588s.dtsi" @@ -11,6 +12,34 @@ / { model = "Indiedroid Nova"; compatible = "indiedroid,nova", "rockchip,rk3588s"; + adc-keys-0 { + compatible = "adc-keys"; + io-channel-names = "buttons"; + io-channels = <&saradc 0>; + keyup-threshold-microvolt = <1800000>; + poll-interval = <100>; + + button-boot { + label = "boot"; + linux,code = ; + press-threshold-microvolt = <18000>; + }; + }; + + adc-keys-1 { + compatible = "adc-keys"; + io-channel-names = "buttons"; + io-channels = <&saradc 1>; + keyup-threshold-microvolt = <1800000>; + poll-interval = <100>; + + button-recovery { + label = "recovery"; + linux,code = ; + press-threshold-microvolt = <18000>; + }; + }; + aliases { mmc0 = &sdhci; mmc1 = &sdmmc; @@ -410,6 +439,11 @@ typec5v_pwren: typec5v-pwren { }; }; +&saradc { + vref-supply = <&vcca_1v8_s0>; + status = "okay"; +}; + /* HS400 modes seemed to cause io errors. */ &sdhci { bus-width = <8>;