From patchwork Tue Feb 27 11:52:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 13573617 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 79F21C54798 for ; Tue, 27 Feb 2024 11:53:30 +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=idEtk/Njq/uvL8/VLD5lTM55WBLFdPaPuNU2ERsqTzc=; b=bUcPImXQcOWorM 86NzftL38lzxgM93Wa1uN9BqA8B55YjFmkRFcMQCfeWgtw4TdRju0QvtTbwgxmJcTaqT+q39gOD7W w7xzkhp47gdzRdZ8a783HlYApMRzy/U1dOljtXPKjbFpcOkeOLwI58hbJi2t68I8hD//q1GSqqAsP NdD0MP/GdWcgN0/+KSoSm8+szQNE1smY3eCuYggbKbxWs4ziIL1ODRBmg9nX5gWqM8GRSBpJiXdOa ObyzZddPALRGKPXkIEZdnrFCMc9P9EgzFI0QxrUdqbIqS0g7hGZ23Csh4YoHVUjDZmO8gjH6bqOkw lg7dfCVZk2ERQi0Yb+pQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rew1W-0000000511H-278Y; Tue, 27 Feb 2024 11:53:26 +0000 Received: from master.debian.org ([2001:41b8:202:deb:216:36ff:fe40:4001]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rew15-000000050pe-36R1; Tue, 27 Feb 2024 11:53:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.master; h=Content-Transfer-Encoding:Content-Type:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID :Content-Description; bh=MNjM4sKWc6EVyuSoSJar6AQqTqLQhUbvZgc3em3wuAk=; b=sx3V 4GXFVfSDsPrqpp1cMUxvQEqyJmCfSPM3H3d+7Vu0trwbjwT2gpPnJocodS19/iNLQRWIN5gpATn8a Sy2lC9hc8ki4zG820+LUNDBUEJG74eJCdIUimxbtPSN2eOrbglBkDAfUxJ4W0cY5rce7JqiqyuVzP +cNlKQzPMnFN/+RdZ3oxI9Gs2ToNkg/0gt93d4k+/oDv3S5964TypveQpbaOt4RQjOrsLL+S3b9aV s0KlXtgNM5wvacoWTsv2iLoA41b4Yh0FmfCFFV2ZLTnx4swSARLzqbL0jO8MrRFT0udKYMJ+woq58 dA5WF3hYigGw9gAQ0ie+uMZQ0hBPng==; Received: from ukleinek by master.debian.org with local (Exim 4.94.2) (envelope-from ) id 1rew11-005f8x-1h; Tue, 27 Feb 2024 11:52:55 +0000 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Subject: [PATCH 2/2] arm64: dts: rockchip: Add basic support for QNAP TS-433 Date: Tue, 27 Feb 2024 12:52:37 +0100 Message-ID: <0d9fa5d730ac1cb91261b25b6809fcef3a12f03a.1709034476.git.ukleinek@debian.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3188; i=ukleinek@debian.org; h=from:subject:message-id; bh=0/KQgzCRTqQpKGH2iEZhXMAV6et+cwrsmr3lJKOcLps=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBl3c0I48qcXyDJrhVKlUfCsiHDANQobD3jG2JM9 6njmEYh13CJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZd3NCAAKCRCPgPtYfRL+ ThOiB/9OX3oap/SoHCeoVjXQd7gVtPEYmvQ6Qrktl2EOK7xsiGoLeoTKXl/iB275jwE3PEQl2+N lGoVA8TK0XacViyMyPH8HadpEWT7OzdzRFCG1nWxWXeHzzkVwNL+W/LuEmuBNP8vHBYSaSUXby2 Ws6WM/4hItx02hvtq6M1HbulxokPACaOU4w6dI4e+WN9jfcqFW9kd0OVAOD4DwT7VJcDK2K/88k xLxLEH4HYYYAKE//sr3QkAgWTl54y/QgLnQMbk1o4DkChKR7qKnW8lLY39ESeMiOIs8StYRtboE lVxAk7fCa12jcfM/Ml7JkqxGLKxs/AejVbJY4uO+I6Q9FeNr X-Developer-Key: i=ukleinek@debian.org; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240227_035259_952861_2493AC50 X-CRM114-Status: GOOD ( 14.90 ) 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 This is enough to make eMMC, networking, UART (console), RTC and a hard disk accessible. Still missing are (at least): USB, LEDs, regulators, fan. Signed-off-by: Uwe Kleine-König --- arch/arm64/boot/dts/rockchip/Makefile | 1 + .../boot/dts/rockchip/rk3568-qnap-ts433.dts | 86 +++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile index a7b30e11beaf..a28a6d445929 100644 --- a/arch/arm64/boot/dts/rockchip/Makefile +++ b/arch/arm64/boot/dts/rockchip/Makefile @@ -98,6 +98,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-lubancat-2.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-odroid-m1.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-qnap-ts433.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-roc-pc.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb diff --git a/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts new file mode 100644 index 000000000000..ba7137f80075 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3568-qnap-ts433.dts @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2021 Rockchip Electronics Co., Ltd. + * Copyright (c) 2024 Uwe Kleine-König + */ + +/dts-v1/; + +#include +#include "rk3568.dtsi" + +/ { + model = "Qnap TS-433-4G NAS System 4-Bay"; + compatible = "qnap,ts433", "rockchip,rk3568"; +}; + +&i2c0 { + pmic@20 { + compatible = "rockchip,rk809"; + reg = <0x20>; + interrupt-parent = <&gpio0>; + interrupts = <3 IRQ_TYPE_LEVEL_LOW>; + }; +}; + +&i2c1 { + status = "okay"; + + rtc@51 { + compatible = "microcrystal,rv8263"; + reg = <0x51>; + wakeup-source; + }; +}; + +&gmac0 { + assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>; + assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>; + assigned-clock-rates = <0>, <125000000>; + clock_in_out = "output"; + phy-handle = <&rgmii_phy0>; + phy-mode = "rgmii"; + pinctrl-names = "default"; + pinctrl-0 = <&gmac0_miim + &gmac0_tx_bus2 + &gmac0_rx_bus2 + &gmac0_rgmii_clk + &gmac0_rgmii_bus>; + rx_delay = <0x2f>; + tx_delay = <0x3c>; + status = "okay"; +}; + +&mdio0 { + rgmii_phy0: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0x0>; + }; +}; + +&pcie30phy { + status = "okay"; +}; + +&pcie3x1 { + /* The downstream dts has: rockchip,bifurcation, XXX: find out what this is about */ + reset-gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>; + status = "okay"; +}; + +&sdhci { + bus-width = <8>; + max-frequency = <200000000>; + non-removable; + status = "okay"; +}; + +/* + * Pins available on CN2 connector at TTL voltage level (3V3). + * ,_ _. + * |1234| 1=TX 2=VCC + * `----' 3=RX 4=GND + */ +&uart2 { + status = "okay"; +};