From patchwork Wed Jul 28 18:00:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12406511 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 674FFC4320A for ; Wed, 28 Jul 2021 18:03:38 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 37C6060F02 for ; Wed, 28 Jul 2021 18:03:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 37C6060F02 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=Hz8EJhjOrZSWBFlZV2l5bIdL5uchUVhCiACt8GKEvdM=; b=vJizWC1e0bMcK1 IWYk3WXtLlTDdRCNY/yvlNBUpKvXf032UZB7ccY8e3N/uX/2IXIE4GfCe7SYoHtzFUc2AUa5WYn+L GoDA1JAoUhr6bQoIGdl/c4VWIps9lmL6vFIorM+3gRZImzWpXEXCEuEmhtHFiRQb9reWC3ObIp5EB ourXaIE62JvgfoRgWJVlm+oPG4slaKnbSK+GQ8cjmVXCmy0mMxuf7AWbdF8joI2rICffRm5zMHgcP py1gjE3yVD6+BMh9yRnSGv10MGbF9UI9RbfRFlIF1FII1ZVnXFHe3iRBeziwAeR62V3fveUJpLJVX 6kDqMJQBEV4XcWpCGeSA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nrv-001xxJ-EC; Wed, 28 Jul 2021 18:01:23 +0000 Received: from mail-qv1-xf2b.google.com ([2607:f8b0:4864:20::f2b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nrX-001xnA-L9; Wed, 28 Jul 2021 18:01:00 +0000 Received: by mail-qv1-xf2b.google.com with SMTP id d17so1971196qvn.13; Wed, 28 Jul 2021 11:00:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vXk/J4q5mPEjnLuepFqEKq93BJsZukmkkBYD3V+Z3Tk=; b=beFhaZVHfk7mxGVzvlrm0rAr2p1O/09MWnJmT0ut7HVMm6/cAi3kDjr9g+wxOuPF/w 59io64vS64AzA+1oeggt0h6Ua18feX03yXJj0NeUQlhAND2wrGoAqAaTsYoY6L9Udi3t 6u0Z//Phpn/Y9eC+AcrxmAiZvK2d39nkFcwoXMoH1+yE13kD0GdzyCU/21wTNchokQH8 2Kjn3hrmPGYQE0ah/xwM2u+yCSKCxXIFz4fCQjM3N5lkC+TdEfqDjsB5t/w2NqdkZjp3 6aQF8d45sVRRAWYJ7+qUXy26mY2vadhl3SV6kOnaHs+Se2R367o5v+B68PB0wOg15qo5 ZQMg== 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=vXk/J4q5mPEjnLuepFqEKq93BJsZukmkkBYD3V+Z3Tk=; b=f9x9benYyVIjLsodBYI8jEXqurjI3NaiQnzepI9ATsIhdxRKpjrqz5cC3HmyAOs4O3 0aSjVX/UohTogi0xvZceLEw41wT6ymCsIHNjZWFhtjb6+znDi58e1hA7wLTVIj4Vh7XU W9j71R/E8HYnhZeFXGbMItEa0iwGJhElI3XGrE0PYJVVSwiYzwZWNjE3AsdOkfhqZuXt o8GmCZjrM9S7WZZ3GpJLbyAaTaU/ZB1OFV8phlAi3GP+7GuQ2+tndFfDy1JckuWLjHy6 UAPBCG9RraCHhGYWeljSSkNH3kij+GxTO/p9tRbqrom7zMSY/Yh41NjsFr1EXbbwlf20 ASyw== X-Gm-Message-State: AOAM532ukwNMJsH2+VahItk41MYW+DEMovrwVG0vD/ZZpahUYpvm3XMa oe6rXbhqPgVF7se1hSreQUoYv3j3yk+VTSEt X-Google-Smtp-Source: ABdhPJxR95vQmYlTzhJ3BscYKr/cpb85sYBj4WPecIGS8wdPNanrwNCUsJga5A8c4jDPranJBAoFAw== X-Received: by 2002:ad4:5bee:: with SMTP id k14mr1411561qvc.10.1627495257347; Wed, 28 Jul 2021 11:00:57 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id r5sm223341qtm.75.2021.07.28.11.00.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 11:00:57 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner , Liang Chen Cc: Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/8] arm64: dts: rockchip: fix rk3568 mbi-alias Date: Wed, 28 Jul 2021 14:00:27 -0400 Message-Id: <20210728180034.717953-2-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728180034.717953-1-pgwipeout@gmail.com> References: <20210728180034.717953-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_110059_702326_1C9094EE X-CRM114-Status: GOOD ( 12.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The mbi-alias incorrectly points to 0xfd100000 when it should point to 0xfd410000. This fixes MSIs on rk3568. Fixes: a3adc0b9071d ("arm64: dts: rockchip: add core dtsi for RK3568 SoC") Signed-off-by: Peter Geis --- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index 322971318d5a..f7ecdfd66f86 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -195,7 +195,7 @@ gic: interrupt-controller@fd400000 { interrupts = ; interrupt-controller; #interrupt-cells = <3>; - mbi-alias = <0x0 0xfd100000>; + mbi-alias = <0x0 0xfd410000>; mbi-ranges = <296 24>; msi-controller; }; From patchwork Wed Jul 28 18:00:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12406515 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 5751EC4338F for ; Wed, 28 Jul 2021 18:04:32 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2A43E60EE2 for ; Wed, 28 Jul 2021 18:04:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2A43E60EE2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=AckiZR8xhlHrs+cVEs5LabPIw8I03ay7rj0OvR2wAXs=; b=hNY9C+HHa2kQad lTTbMUVtcW7YKIpougroZ0eBznGgPwBvdz0d9IdgXTNIhXyXh77fLEQhzCs6zhVJ1mTuMOS1xseI1 gKI/d01l83KmvxLj79TDCwiXfxI3n0CCh1phH+zMZqji9HgczsQiwrHPLd7S9VrQsSvoEQjrLFCZu kfY7mEgNbSlFHRJRujXwiGwpG/EFgO7/e3is/0Z6tUA7bQYW54N02yWNM1I1DLWvMSprPae9XF13S qncvOwYKoS2v8WqBFAtwI4qaADSx6ycSvgQFCy6zRVUSgpQwvwqV7CPLkdvU1ftC3C2DS0GCH2Lmf +xTL0d46UAXDpltIbxxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nsn-001yDX-D2; Wed, 28 Jul 2021 18:02:18 +0000 Received: from mail-qv1-xf32.google.com ([2607:f8b0:4864:20::f32]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nrX-001xnb-KX; Wed, 28 Jul 2021 18:01:01 +0000 Received: by mail-qv1-xf32.google.com with SMTP id jm13so1997330qvb.5; Wed, 28 Jul 2021 11:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rPqLjOXsqV94UI25n/9CxZKC1Erx0U3BkTkX0ji1T7I=; b=IbQtOFHYx1EjJ567K1P9YznQxwLwclrO6ezP9aDlFfDQdVBaFa0p14UXh2f5pEv2Ip ZVduQHDVa2ukcMv/h/gOEtdyhX82CwtnP9ND3hiKc7OzIboRSgUbosWOTtIeA2G4bmBD D81eVwcrwWFrEh/SncOy8qKPRZJGf13D5TCKDz5VuL0fYMLXI5ka3Jv0Ii3X4hKyXTUr tRBnTXUnyCX+ZuehdBZBK3Uh2WX3GGat1oWPtfVLsQW11XhcO8GGq9Sl4Bl5vTjPDCHv 6zIX3jViB1Yb1h0bs8GFgVsBMiEw9spPPAcfABg/p8opslmK5YWrYldrKbnnoaiJOwEn h09g== 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=rPqLjOXsqV94UI25n/9CxZKC1Erx0U3BkTkX0ji1T7I=; b=JvBRYtFMXFvLEi+C0NtGk0Ku+w7fDX3enLflAN5OibUX4NTEnrjZcJUGhDUVmUx9cX xnzqHdNnRA6BYl/Fy9VPHTabHc07zfPbRhW/67hFisLynTersTDGLrYTJMggPkhWSKW2 arOV7AA7isKwiLUkfQdW68fhHJQ1q0exH8wsrCgWirCcPlIvw2B+P/HlpGEL1L1iII80 t0azgGhcUah1wzQ7+Us0bkE8pVO49208CTJNadYJt/PGIRF8+ObpWYPXBHh6Um6Bo8Xg 9KophIG3fm8nOE7uOmXjyo4k3JPbdS0ajJcnNFOAS9UjCx7eqjKN51Qzkn6Uxin0prdh Hu2A== X-Gm-Message-State: AOAM532qhvqe2GCU4mIvvGCw0c75D/DrExh9xzDqR+CDzt1hf5Anjo8K IuClNjXkRPolqXayyQ8PzXM= X-Google-Smtp-Source: ABdhPJwfHlE/wHQhpc7paohVWmUOifKKt2PNUIlQQ+it5vD1Md0OsrvSP7Fg1/ufE1LIvCZeg15jgQ== X-Received: by 2002:a0c:ed51:: with SMTP id v17mr1292786qvq.20.1627495258206; Wed, 28 Jul 2021 11:00:58 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id r5sm223341qtm.75.2021.07.28.11.00.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 11:00:57 -0700 (PDT) From: Peter Geis To: Michael Turquette , Stephen Boyd , Heiko Stuebner Cc: Peter Geis , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/8] clk: rockchip: fix clk-pll rk356x early pll init Date: Wed, 28 Jul 2021 14:00:28 -0400 Message-Id: <20210728180034.717953-3-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728180034.717953-1-pgwipeout@gmail.com> References: <20210728180034.717953-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_110059_697870_8F08C509 X-CRM114-Status: GOOD ( 15.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The rk356x needs to reclock certain plls at boot. If the grf phandles are not linked in the cru and pmucru nodes, it is unable to apply any assigned-clock-rates at boot. Fix this by removing the check for the grf for selecting the utilized operations. "The rk3568 reuses the pll_rk3328-type which in turn is a modified pll_rk3036 and uses their ops. Which in turn means the pll shouldn't access the GRF at all, as it uses the pll's own register to check the locked state." Suggested-by: Heiko Stuebner Link: https://lore.kernel.org/linux-devicetree/20210728135534.703028-7-pgwipeout@gmail.com/ Fixes: c9c3c6eecc55 ("clk: rockchip: simplify GRF handling in pll clocks") Signed-off-by: Peter Geis --- drivers/clk/rockchip/clk-pll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/rockchip/clk-pll.c b/drivers/clk/rockchip/clk-pll.c index fe937bcdb487..f7827b3b7fc1 100644 --- a/drivers/clk/rockchip/clk-pll.c +++ b/drivers/clk/rockchip/clk-pll.c @@ -940,7 +940,7 @@ struct clk *rockchip_clk_register_pll(struct rockchip_clk_provider *ctx, switch (pll_type) { case pll_rk3036: case pll_rk3328: - if (!pll->rate_table || IS_ERR(ctx->grf)) + if (!pll->rate_table) init.ops = &rockchip_rk3036_pll_clk_norate_ops; else init.ops = &rockchip_rk3036_pll_clk_ops; From patchwork Wed Jul 28 18:00:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12406517 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 5B541C4338F for ; Wed, 28 Jul 2021 18:05:06 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2C53F60EE2 for ; Wed, 28 Jul 2021 18:05:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2C53F60EE2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=DoAVkK2jF65DKYMYGM91Npc1wemBvAnoy2uCjwKsCW0=; b=xV+3VcQRPO10Zc lgHdO9MEeDhBXzd54TPXQxU/0zjTDkdcpK3etkMPeThyZU0TruGpo9cI2mpBzhQOxghjysnXd+9IU rrPwpcqLbQirctoXzlv8vYICq/Ohg/SrQZL3m16AoCpti/GcAL3ZaTUrXftYm36hqapQc4XoqnR0M Bwdkf16P/AYrlekTJE9nfa50HhHSlYo5nbgB93gp0kZgq4W5i1G5qBdP4YnkkwYX9/ecJVryBxbQH OPwMO4pSL+W3eqojBDwKIePyNQu+y4uVlk+Wvn9hagCmFs2Xp7L5NNiaV9k9Gd/UoRY6nhLA44SEL N0ZB0FccgUIFwNGsQI0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8ntB-001yLs-Tf; Wed, 28 Jul 2021 18:02:42 +0000 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nrZ-001xom-Ly; Wed, 28 Jul 2021 18:01:06 +0000 Received: by mail-qt1-x82a.google.com with SMTP id l24so1989887qtj.4; Wed, 28 Jul 2021 11:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S56htb9vVkDrFmzApk71DTCJizGCv0+IZp82FWSdz/g=; b=owtO4XXjj6P6Rjd77xgdGJq/s1cIXPoVSiO7zCI14o5x9HuPAsV6xo+swVDwOS+ZjA ztTe4uNIBTc2IaR7dWUrUEv444EXFIJZy6s7fTrzROo+SKHeTIC/APTaUUNqsptqAjQ0 JUJ7Ied3+YGJjFVtJZFOlQ2mF9N3Aj/vpGoCfzQNunvA4+Ik2Of+hjrHK/9J309xfIjj 4UZiSMt+4qDj7ULdB+HUEI9y8pczBhA2zLfvQb3AC8H3OjvkXjxnAWA23bVWvT6eJVOv qRg+DZQmQ+QZPnN8KEAEs1Fn2ik2CCzzm48pRw9jXBkq0vSSIyR7vvtheY675Yq5MJUB OgVg== 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=S56htb9vVkDrFmzApk71DTCJizGCv0+IZp82FWSdz/g=; b=dVlk+sMdHSH+EXGmScyotFUKQ4APyftEE5sSoPWFiRykvnEPgD2dz5E1SEQB2hifM0 KO+Z+voYlY6iMXDAhBMDRPlL/h7p/5pXK+wrZIz/6b0nHjXUXXcMXmjKljOHoQC0Uv32 0HhAxEP9JfNlgvL2kH4G7OFNQCWNc3jNnEs/EyeaZdT6X27lXMJo+EjMVSoNlmN5520F Ji1P0NxD9gUGL7wwM+1kKo2+7foOadiBQ/ggcYpIXL+2ijbdJVy9FmiqoLyMxh9i9bXG PgUfOZpy7/baVzOfhbnbvZdBCuK6jJp+jWqJasw+LFkNxUDXkJxgNUOYvMhaKcaVa09Q eZ5Q== X-Gm-Message-State: AOAM530MWUgOKjO8YVeioF0xi7S2pEcNfNu2PBJrp2tdVwwY2m5Ft7Um 8/qpg6ffMT3ZIAltKbdawJ0= X-Google-Smtp-Source: ABdhPJwXiOweFs0EgI4O/K88VOjku0nSLXkG/t0a1JDtXJczLMHrFHl2a0of4XrY2CunDR50P4P/hg== X-Received: by 2002:ac8:4d9b:: with SMTP id a27mr688003qtw.351.1627495259053; Wed, 28 Jul 2021 11:00:59 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id r5sm223341qtm.75.2021.07.28.11.00.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 11:00:58 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner Cc: Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/8] arm64: dts: rockchip: add rk356x gpio debounce clocks Date: Wed, 28 Jul 2021 14:00:29 -0400 Message-Id: <20210728180034.717953-4-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728180034.717953-1-pgwipeout@gmail.com> References: <20210728180034.717953-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_110104_658010_D948CDA5 X-CRM114-Status: GOOD ( 13.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The rk356x added a debounce clock to the gpio devices. This clock is necessary for the new v2 gpio driver to bind. Add the clocks to the rk356x device tree. Signed-off-by: Peter Geis --- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index f7ecdfd66f86..c2aa7aeec58d 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -750,7 +750,7 @@ gpio0: gpio@fdd60000 { compatible = "rockchip,gpio-bank"; reg = <0x0 0xfdd60000 0x0 0x100>; interrupts = ; - clocks = <&pmucru PCLK_GPIO0>; + clocks = <&pmucru PCLK_GPIO0>, <&pmucru DBCLK_GPIO0>; gpio-controller; #gpio-cells = <2>; interrupt-controller; @@ -761,7 +761,7 @@ gpio1: gpio@fe740000 { compatible = "rockchip,gpio-bank"; reg = <0x0 0xfe740000 0x0 0x100>; interrupts = ; - clocks = <&cru PCLK_GPIO1>; + clocks = <&cru PCLK_GPIO1>, <&cru DBCLK_GPIO1>; gpio-controller; #gpio-cells = <2>; interrupt-controller; @@ -772,7 +772,7 @@ gpio2: gpio@fe750000 { compatible = "rockchip,gpio-bank"; reg = <0x0 0xfe750000 0x0 0x100>; interrupts = ; - clocks = <&cru PCLK_GPIO2>; + clocks = <&cru PCLK_GPIO2>, <&cru DBCLK_GPIO2>; gpio-controller; #gpio-cells = <2>; interrupt-controller; @@ -783,7 +783,7 @@ gpio3: gpio@fe760000 { compatible = "rockchip,gpio-bank"; reg = <0x0 0xfe760000 0x0 0x100>; interrupts = ; - clocks = <&cru PCLK_GPIO3>; + clocks = <&cru PCLK_GPIO3>, <&cru DBCLK_GPIO3>; gpio-controller; #gpio-cells = <2>; interrupt-controller; @@ -794,7 +794,7 @@ gpio4: gpio@fe770000 { compatible = "rockchip,gpio-bank"; reg = <0x0 0xfe770000 0x0 0x100>; interrupts = ; - clocks = <&cru PCLK_GPIO4>; + clocks = <&cru PCLK_GPIO4>, <&cru DBCLK_GPIO4>; gpio-controller; #gpio-cells = <2>; interrupt-controller; From patchwork Wed Jul 28 18:00:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12406513 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 08C96C4338F for ; Wed, 28 Jul 2021 18:04:05 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C72B160EB9 for ; Wed, 28 Jul 2021 18:04:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C72B160EB9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=W4wPXdz/p1kpu3G86baR+tUGSx3tcmMOrR62t0Kwf44=; b=lYGCpdbgrWLfN8 G3W8D58JmxTL3/TGb9mM4RwfypUPrUHFRTmdece/bduL/66QwbsD/Ys378oU6P4ysBtXnyW6gDx7e 5ArG/b8TPAnuKLjijScosvPRp72dHkQ8h/KoDJWX3RGj952ZCK0wc6KWlPm5xXmJZ8Klo1pg7Ri46 cx0q5DZoC6iCTkvHjre6oW14eZOJnUaZiSMIqikpaFnotaaqd96OImLAPoFhVVs31UkHQJzqBaEa4 Gopa6VzBHwYjsBxeshGg72qVKb2P7i+h1xZdlyu92ewsY8wucDSFHpu+sngBbotCg/tVoUlZxt84d tYYVR2sIKCzr61OJf4Yw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nsG-001y3C-Tq; Wed, 28 Jul 2021 18:01:45 +0000 Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nrZ-001xog-H6; Wed, 28 Jul 2021 18:01:03 +0000 Received: by mail-qv1-xf29.google.com with SMTP id s11so1990550qvz.7; Wed, 28 Jul 2021 11:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EK6nzEkguohvBwXyakdiH/QJLGvW91jjn3gEUQ1x4MM=; b=Mu8W82VYfuKO/sPs6CaFtxNPJxGUIXY4jRnrfbwEZdJ9HL6WuGewBegPXmAplt+7tZ he4KGNfrl+69Z0BlosYNmNkRZAk63sbgZi6ZWr8uFaU+ibqPW+5FfDNXf6fBdt1eWSNx yNhd2kQVGJK4Bv4NkAYon2c8kFK7o8fcVMBcx5v2MLG1RgghDp0a2gUKajhCcp8uiSuw fxzn99ZIQpnKOXrK9eKLNLN85Cz3JMY1zzr+Jw2OsP/TsI7E6IrMN0uOQIEKl37QjMRR M8HX94Xb5HV0bBSeVP1FBJNI0xyN+f3+Rcej901RnmTVrG8G479cnhPI9wEhWT59nvg/ XX0w== 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=EK6nzEkguohvBwXyakdiH/QJLGvW91jjn3gEUQ1x4MM=; b=tZ3JJk9CTHjLWtQiBWMAwvraAERSCLGt4dBQlfp6DC8/uS9JVnB8gj8G0Mnz0q4OpF nJF7sY/nazfWfwATaRNQ0jr1goX3qCpKNATlE17imfxAuBhQ3Kqdx364PeWe32MRpl5w 6VVXD/b+4DR5z/iXXsTwASe2ET9NdOHfTuqMf8pXgnO2UmPJJl3jCenOoohdyCUnauwm DoumGWSB6hf3rVfEb1HPH/yFJ5dE4YfiRSbUZpjOwLxu2EHICW9aLTAfuflMm710sfNe BMMcU76J40WDSam9pQvo9vEAvaQi/CXOmEV8syUwGOSCmfsEHjJS8BC+N9QorJEDwd09 Qivg== X-Gm-Message-State: AOAM533qsk81AOPWrp0GvOq/mw9FP5YMPpwK3sFVjPh9njuD2ZFV79Tt y3kN5T2Zyratp9VWf7+P9KU= X-Google-Smtp-Source: ABdhPJwCXPPiJQZuLfP1ol4AjxtHB4IjrlQ1qXsD7VJt/scQ7ewVpgFAFdDzeAs4Fdhh/pOjWLLAjg== X-Received: by 2002:a05:6214:1cb:: with SMTP id c11mr1225044qvt.47.1627495260103; Wed, 28 Jul 2021 11:01:00 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id r5sm223341qtm.75.2021.07.28.11.00.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 11:00:59 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner Cc: Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/8] arm64: dts: rockchip: add rk356x gmac1 node Date: Wed, 28 Jul 2021 14:00:30 -0400 Message-Id: <20210728180034.717953-5-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728180034.717953-1-pgwipeout@gmail.com> References: <20210728180034.717953-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_110101_615429_B4CF0384 X-CRM114-Status: GOOD ( 11.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the gmac1 controller to the rk356x device tree. This is the controller common to both the rk3568 and rk3566. Signed-off-by: Peter Geis --- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index c2aa7aeec58d..fbd9f1c366ff 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -344,6 +344,53 @@ sdmmc2: mmc@fe000000 { status = "disabled"; }; + gmac1: ethernet@fe010000 { + compatible = "rockchip,rk3568-gmac", "snps,dwmac-4.20a"; + reg = <0x0 0xfe010000 0x0 0x10000>; + interrupts = , + ; + interrupt-names = "macirq", "eth_wake_irq"; + clocks = <&cru SCLK_GMAC1>, <&cru SCLK_GMAC1_RX_TX>, + <&cru SCLK_GMAC1_RX_TX>, <&cru CLK_MAC1_REFOUT>, + <&cru ACLK_GMAC1>, <&cru PCLK_GMAC1>, + <&cru SCLK_GMAC1_RX_TX>, <&cru CLK_GMAC1_PTP_REF>; + clock-names = "stmmaceth", "mac_clk_rx", + "mac_clk_tx", "clk_mac_refout", + "aclk_mac", "pclk_mac", + "clk_mac_speed", "ptp_ref"; + resets = <&cru SRST_A_GMAC1>; + reset-names = "stmmaceth"; + rockchip,grf = <&grf>; + snps,mixed-burst; + snps,tso; + snps,axi-config = <&gmac1_stmmac_axi_setup>; + snps,mtl-rx-config = <&gmac1_mtl_rx_setup>; + snps,mtl-tx-config = <&gmac1_mtl_tx_setup>; + status = "disabled"; + + mdio1: mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <0x1>; + #size-cells = <0x0>; + }; + + gmac1_stmmac_axi_setup: stmmac-axi-config { + snps,wr_osr_lmt = <4>; + snps,rd_osr_lmt = <8>; + snps,blen = <0 0 0 0 16 8 4>; + }; + + gmac1_mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use = <1>; + queue0 {}; + }; + + gmac1_mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use = <1>; + queue0 {}; + }; + }; + qos_gpu: qos@fe128000 { compatible = "rockchip,rk3568-qos", "syscon"; reg = <0x0 0xfe128000 0x0 0x20>; From patchwork Wed Jul 28 18:00:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12406531 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 87E67C4338F for ; Wed, 28 Jul 2021 18:05:33 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 4E04A60EE2 for ; Wed, 28 Jul 2021 18:05:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4E04A60EE2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=5fsSJyoimEx9dLS9Mx+kAdiB0Ezx5p0ACuhfQMvsFLM=; b=mOTeMn4VzMohRS 1XLDaxi7QHzAEZxRSrJFixG6oExnhSTt3PgEpaJq+NXe/8Tz8oqi6dK8H0deKqQKrJ8Ag+X9i0zj4 SEFfa0V1v4OA4/NPfRWX+0dflV0+sSLAQc+GAQOTV06CykUEnFJuEQJg6IfUxFE+lyILmTsi+1y// ui/DwjMrDVLTFuPTFeLeRegNCE4R+Q/hZpw+hCP/Qo1xpYQkE8aEVcG+0THAfPaBh2cwimrFgcwXy 2W5IYeDcZl+6qG6N7i3a6xIpHd4ppae1/Pnx0BNC50DXYzG0XJDP/cqdMMRIwPuRkuEJVICzlsPJO XoOWd8utYYNmV+vCzdQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8ntm-001ydi-J3; Wed, 28 Jul 2021 18:03:18 +0000 Received: from mail-qk1-x731.google.com ([2607:f8b0:4864:20::731]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nra-001xpv-Qm; Wed, 28 Jul 2021 18:01:06 +0000 Received: by mail-qk1-x731.google.com with SMTP id z24so3088200qkz.7; Wed, 28 Jul 2021 11:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hlccHpa8acGXb7hg5ss9czD81tD5ZKFSFRVC1kWUrxw=; b=Ojz77QqKjmVztoMw3rsxwbE690JvJsOr2S8VEZWpAA5pf7u2buke7yp4IJ0NoaXvc1 UwC6gt+9oj969NZ1poLr9aD1sudJr2kcGqllK12KJSWINb0XdcL8BUU0GcW2vMtEgd+Z MXI+f7XlI/LWHSOYmO+BXY4B6d5mqS3XGwjklvxeN4UK5Qd/d6A83ImexLtp3WoITgI7 LeJ2EaMuoJa6T+i7lmXMOiyRnW715+g6WdjMjulFdp/lXkUj7aIWML38K5W9QivAnExw GM7RWAi/MNYkDU/e43XL5fPjq9fPABMbh2CzEYGhbu2s5P/PP95E/EBvQO6UB+XB2YG9 PzZA== 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=hlccHpa8acGXb7hg5ss9czD81tD5ZKFSFRVC1kWUrxw=; b=PZrlzluoOUA+2Z0/TBieBUISUFzVc0NryMPYlcwaIpT60SQ5Wh8nNsFT9FdaQstABJ JIzveXUnWTdE1ioqaJL2HCAeXe7qnXSOx+/SNs1k59Hb02qHayBPEUwcK51f6QbvEz0p fBhu1E7A/+wnv7AMhD/G+84Q5rfc/aUTcgWiLSJ8vpYc9AqAFkfaxjqU0vqq0gkzTxuC v5QdQXCRXYXXjX8tA5FOX5HldibVnZK2euF82xjY1H4TQ3HJy+DutedybQo5O/nyGH2x V2/tk3d8qrbUE6HuEVs9isxS6BMHS4B5MqsfHSXJsaPqdOpXW4u+DXTT4UdKihL9RiNh qyWg== X-Gm-Message-State: AOAM5323KjzJL8HWOwef2nG7HRs5sHBStiM/XCAzpNjU/LvhT+RX9on4 GE8+1XXs3g7Y9THl+7W5GfI= X-Google-Smtp-Source: ABdhPJwtPXGltmuVn4d51nUTh5OWU+sQ7JKCW1/OCoG25HkG/Rhw0OCR3b+6aoShqcjmf6mFLgugQA== X-Received: by 2002:a05:620a:1322:: with SMTP id p2mr924099qkj.432.1627495261134; Wed, 28 Jul 2021 11:01:01 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id r5sm223341qtm.75.2021.07.28.11.01.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 11:01:00 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner Cc: Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/8] arm64: dts: rockchip: add rk3568 tsadc nodes Date: Wed, 28 Jul 2021 14:00:31 -0400 Message-Id: <20210728180034.717953-6-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728180034.717953-1-pgwipeout@gmail.com> References: <20210728180034.717953-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_110104_681162_8342CE67 X-CRM114-Status: GOOD ( 13.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the thermal and tsadc nodes to the rk3568 device tree. There are two sensors, one for the cpu, one for the gpu. Signed-off-by: Peter Geis --- .../boot/dts/rockchip/rk3568-pinctrl.dtsi | 7 ++ arch/arm64/boot/dts/rockchip/rk356x.dtsi | 70 +++++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3568-pinctrl.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-pinctrl.dtsi index a588ca95ace2..3b1efaf2646e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-pinctrl.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3568-pinctrl.dtsi @@ -2420,6 +2420,13 @@ spi3m1_cs1: spi3m1-cs1 { }; tsadc { + /omit-if-no-ref/ + tsadc_pin: tsadc-pin { + rockchip,pins = + /* tsadc_pin */ + <0 RK_PA1 0 &pcfg_pull_none>; + }; + /omit-if-no-ref/ tsadcm0_shut: tsadcm0-shut { rockchip,pins = diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index fbd9f1c366ff..c74072941da1 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -50,6 +50,7 @@ cpu0: cpu@0 { compatible = "arm,cortex-a55"; reg = <0x0 0x0>; clocks = <&scmi_clk 0>; + #cooling-cells = <2>; enable-method = "psci"; operating-points-v2 = <&cpu0_opp_table>; }; @@ -58,6 +59,7 @@ cpu1: cpu@100 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x0 0x100>; + #cooling-cells = <2>; enable-method = "psci"; operating-points-v2 = <&cpu0_opp_table>; }; @@ -66,6 +68,7 @@ cpu2: cpu@200 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x0 0x200>; + #cooling-cells = <2>; enable-method = "psci"; operating-points-v2 = <&cpu0_opp_table>; }; @@ -74,6 +77,7 @@ cpu3: cpu@300 { device_type = "cpu"; compatible = "arm,cortex-a55"; reg = <0x0 0x300>; + #cooling-cells = <2>; enable-method = "psci"; operating-points-v2 = <&cpu0_opp_table>; }; @@ -773,6 +777,72 @@ uart9: serial@fe6d0000 { status = "disabled"; }; + thermal_zones: thermal-zones { + cpu_thermal: cpu-thermal { + polling-delay-passive = <100>; + polling-delay = <1000>; + + thermal-sensors = <&tsadc 0>; + + trips { + cpu_alert0: cpu_alert0 { + temperature = <70000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_alert1: cpu_alert1 { + temperature = <75000>; + hysteresis = <2000>; + type = "passive"; + }; + cpu_crit: cpu_crit { + temperature = <95000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map0 { + trip = <&cpu_alert0>; + cooling-device = + <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; + }; + + gpu_thermal: gpu-thermal { + polling-delay-passive = <20>; /* milliseconds */ + polling-delay = <1000>; /* milliseconds */ + + thermal-sensors = <&tsadc 1>; + }; + }; + + tsadc: tsadc@fe710000 { + compatible = "rockchip,rk3568-tsadc"; + reg = <0x0 0xfe710000 0x0 0x100>; + interrupts = ; + assigned-clocks = <&cru CLK_TSADC_TSEN>, <&cru CLK_TSADC>; + assigned-clock-rates = <17000000>, <700000>; + clocks = <&cru CLK_TSADC>, <&cru PCLK_TSADC>; + clock-names = "tsadc", "apb_pclk"; + resets = <&cru SRST_TSADC>, <&cru SRST_P_TSADC>, + <&cru SRST_TSADCPHY>; + reset-names = "tsadc", "tsadc-apb", "tsadc-phy"; + rockchip,grf = <&grf>; + rockchip,hw-tshut-temp = <95000>; + pinctrl-names = "init", "default", "sleep"; + pinctrl-0 = <&tsadc_pin>; + pinctrl-1 = <&tsadc_shutorg>; + pinctrl-2 = <&tsadc_pin>; + #thermal-sensor-cells = <1>; + status = "disabled"; + }; + saradc: saradc@fe720000 { compatible = "rockchip,rk3568-saradc", "rockchip,rk3399-saradc"; reg = <0x0 0xfe720000 0x0 0x100>; From patchwork Wed Jul 28 18:00:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12406535 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 476DAC4338F for ; Wed, 28 Jul 2021 18:06:43 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0A8B46101E for ; Wed, 28 Jul 2021 18:06:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0A8B46101E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=98Yex1jBCwy/Bh8STiiErJItyLCcDVeejDhH3Rp5mno=; b=FAtrWJGu8PQIC5 asT55nAR70AX1FxUYi8Lvhf1JN6FGqOcW/qK+bKxzj3ZyD8kZg/d4pkyxt/9EczO6Et57y4BvKICr Ke2lvhEU1IuLU2ooynTKscYmXAGSVn5lIR5IZvXc4etRseCJ68UG+jX3wpYkDK/Y82YOkd2QzmGAb 0IWkKqTnG1zej7/6s8dzs33cUZxJSQmW3p2FT1THXmu1U43MSehkU3JcuGnwzgVOgOmO36gwbVucN eF+yUJs8qYQQtjb5xZeKLOchQEXxTF50dHLNObCUGptBNJU301MkuBc7IDSmxqRx/5Ug1HCEqJYvg jSW3vbxXhDsXNsYljjcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nur-001z81-TS; Wed, 28 Jul 2021 18:04:26 +0000 Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nrb-001xpw-Hn; Wed, 28 Jul 2021 18:01:07 +0000 Received: by mail-qk1-x730.google.com with SMTP id 190so3060013qkk.12; Wed, 28 Jul 2021 11:01:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=r4bT7HeLBcKZhFeUiGhpGlFbEiM6IKHw69zvHFi+0OI=; b=k87taw6f0eEdVXbKKkk6UFP9RjT3t9HXI0prijEFlGB8eOl8fnZour12xrVFdzTfYj ZWysXL8dSqWJ/R1Jt3kTMcRoi8+s8Xnm+FOd1YjGWVYLaOcgdPUykIptnsTv45HqyZw8 AUosu/VBPpV+3OagQnkAKmmXYttvAlHA6eVq1y16V3PyJbKMqSWCUa1CufXrh6uZqanC ccGS5YoBx8r/9NF0AIpW6gLbPn5tNS5hzvS+jG2V1XpwOo6eMj3KOFys+iV9GWJTJh+8 gHWkumozvaRbQMT8b3y9Gc8sFx7vzkCyp1zO84VthbB8uvKPT00lk/vOzcwkxBf0wQ7W 0BGQ== 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=r4bT7HeLBcKZhFeUiGhpGlFbEiM6IKHw69zvHFi+0OI=; b=f9tYUvazH8e8RfnmxvULvDm4kzveekwPiWoMmeoy+CS/5y69GqH7uR43P3Jz0+CYkf oPf55bUc3A6Uk/htJj1rKpKl0iIbXfxIkG0w9rY8TQDbWam1V7r6C7GIb6XoGLG1MXqA lFfC3vjVXSzA3SXd8xMJlEQ17SoGYW01NjdBLhVDY/FcFFO3SEWS5u/vUGlxoNj4Pb5i Eozha9j4M52wHxmNvclDT1X3WGQ0dDE+B/TDfn9hTikfY0FCLBg6WnLWi4QY81jH+7ar XkvmJ41a2Vty3v8DftTkmmFr/AdYnf1gs5GfjiU6o3e1Vnio0sXsk83ZVY4EO8worZ90 UlkA== X-Gm-Message-State: AOAM531M8TsJiQQpUti0OGlqGWEY/rYe0oOBnqlRH2sT5PD3x7pvpX6q LNYpyANwkU6lXd81Dhcckvo= X-Google-Smtp-Source: ABdhPJxhUi4M6oeb56hQKhC4KGdtinmzDqTAdwG8q8BTHFBHy8Nmr0fLMHKPJSjIi1vEdsEdq11KKw== X-Received: by 2002:ae9:ed56:: with SMTP id c83mr896641qkg.101.1627495262173; Wed, 28 Jul 2021 11:01:02 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id r5sm223341qtm.75.2021.07.28.11.01.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 11:01:01 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner Cc: Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 6/8] arm64: dts: rockchip: adjust rk3568 pll clocks Date: Wed, 28 Jul 2021 14:00:32 -0400 Message-Id: <20210728180034.717953-7-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728180034.717953-1-pgwipeout@gmail.com> References: <20210728180034.717953-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_110104_697673_9822FA79 X-CRM114-Status: GOOD ( 11.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The rk3568 gpll should run at 1200mhz and the ppll should run at 200mhz. These are set incorrectly by the bootloader, so fix them here. Signed-off-by: Peter Geis --- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi index c74072941da1..66d1919dd7eb 100644 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi @@ -226,6 +226,8 @@ cru: clock-controller@fdd20000 { reg = <0x0 0xfdd20000 0x0 0x1000>; #clock-cells = <1>; #reset-cells = <1>; + assigned-clocks = <&cru PLL_GPLL>, <&pmucru PLL_PPLL>; + assigned-clock-rates = <1200000000>, <200000000>; }; i2c0: i2c@fdd40000 { From patchwork Wed Jul 28 18:00:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12406533 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 6324AC4338F for ; Wed, 28 Jul 2021 18:06:15 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 30F1960F91 for ; Wed, 28 Jul 2021 18:06:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 30F1960F91 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=UQ09oGZQA3Pj2J42DiNpf5vurRTQx5Dih7wxcbtWXAE=; b=r2ji+f+1oRsIgG fIlsl6CuS3qSoee8rrl5fmwhCrT4ZuzweN90Xml5iXt0B64/a5kZvoclCpmq/dOTM8obLPXxnf9Ej bt11HxDURiOfn60jyjpLxosM7yv+NdzTrjWOUoZ1Z+EdKKGlpsmSq9LarUwARb+wE/KU7bgaGOrhD q9fCawymXOoSNKVQjn7ia1J5AClLNhwpbdp3woW6EBKwj5ucAvSwBKnVsG4t7bE0av0zfpbr31rLw YKHEpqYXLV9rcIQpdwEXCx4Ox9Qr4p0dl2C+HWrFwk4WwMFsMGLD5UelMmAgf6qdYmiyYdqAoj6Sp 1Gpesmn4qB99zsqb0J9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nuF-001yrl-OO; Wed, 28 Jul 2021 18:03:48 +0000 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nrc-001xpz-PZ; Wed, 28 Jul 2021 18:01:08 +0000 Received: by mail-qk1-x72b.google.com with SMTP id 129so3101190qkg.4; Wed, 28 Jul 2021 11:01:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OkK6x6zm6GWAYlSexAP9I420ulpovKLeZWcigiEH4qE=; b=rfa/0mI5PgYXeAiHADQGinO4cVfzsm2WrTDv0/QZj8NgCuAWcQaxNYTB5alyA4Dw+j qJLSw4gdjZ8yoZXH18o5NuSyG0N3G+sulL4Zj5HW8Ldvkf1x41jpi/jD2ravFQbCrPTb 3FUz+iO9FO9fNzctfNas7AsGyZpa0386kPqk8SHToxTJkZMGW+nrzJVlr++zxSdUQ5uE jwsM00xrqXmjfIvBTZeAs5HG15EW7U6kCUBEGpZpu46NipWZbDdZ9KjogLsBFmkP5o8O 7GC0Yq88iilX8Xn7epXTqF0ML6XMlb4cQFLf7NGxRNGoHSA/S1OXvcmtRCNpURHIOdAR aXJg== 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=OkK6x6zm6GWAYlSexAP9I420ulpovKLeZWcigiEH4qE=; b=c9TYckDMUYHUwQg/SPbq9SOg30kY4VOP5FiJPneSBVXvl3TTyA7+kI9bYYMkIY05tX LWH+GY6Uji/6dZeP8wM3nfGhwTeRnbrXfDDt59jp/EnM2iUEiEjox0kfVacLsRL3e612 avrdkmjKURLojYwMeCEyVlexQc1Jxs99Qx4ctmqZmpCO+yNleQAuaXBPKmYxtaggDC6X 4g2XDH9AsmzczkXhHVTxDU9kPzCYKrPmdQjUTE7rG/mIBrn9QNj523eHxn+1rFUGjXu1 tPNeA0t0S7lue7ruv0zxCRpyvghfHNZMBTN6a46nt9dXD/tSQ9C6oHQ78hn5w7gmSiSP Ze7g== X-Gm-Message-State: AOAM532lL9fa/xBYTWcppBCoGDTqEmoon/NOHT8WZ5OM4IJpXFZui54t NTCsGDBlzSzFO9s+EbklmgPOa6Ly8JhPyWcK X-Google-Smtp-Source: ABdhPJweete4r2BIayV6eiYOYWBt8ZtcIm0PWhCwh6+YQZB/vt+uFHtHFfdC+CjMTubMKuVK3Pileg== X-Received: by 2002:a37:7141:: with SMTP id m62mr922459qkc.496.1627495263435; Wed, 28 Jul 2021 11:01:03 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id r5sm223341qtm.75.2021.07.28.11.01.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 11:01:02 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner Cc: Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 7/8] arm64: dts: rockchip: enable gmac node on quartz64-a Date: Wed, 28 Jul 2021 14:00:33 -0400 Message-Id: <20210728180034.717953-8-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728180034.717953-1-pgwipeout@gmail.com> References: <20210728180034.717953-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_110104_926700_D1A00858 X-CRM114-Status: GOOD ( 12.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Enable the gmac controller on the Pine64 Quartz64 Model A. Signed-off-by: Peter Geis --- .../boot/dts/rockchip/rk3566-quartz64-a.dts | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts index a3cdb6c2bec6..b239f314b38a 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts @@ -11,6 +11,7 @@ / { compatible = "pine64,quartz64-a", "rockchip,rk3566"; aliases { + ethernet0 = &gmac1; mmc0 = &sdmmc0; mmc1 = &sdhci; }; @@ -19,6 +20,13 @@ chosen: chosen { stdout-path = "serial2:1500000n8"; }; + gmac1_clkin: external-gmac1-clock { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "gmac1_clkin"; + #clock-cells = <0>; + }; + leds { compatible = "gpio-leds"; @@ -116,6 +124,29 @@ &cpu3 { cpu-supply = <&vdd_cpu>; }; +&gmac1 { + assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>; + assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>; + clock_in_out = "input"; + phy-supply = <&vcc_3v3>; + phy-mode = "rgmii"; + pinctrl-names = "default"; + pinctrl-0 = <&gmac1m0_miim + &gmac1m0_tx_bus2 + &gmac1m0_rx_bus2 + &gmac1m0_rgmii_clk + &gmac1m0_clkinout + &gmac1m0_rgmii_bus>; + snps,reset-gpio = <&gpio0 RK_PC3 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + /* Reset time is 20ms, 100ms for rtl8211f */ + snps,reset-delays-us = <0 20000 100000>; + tx_delay = <0x30>; + rx_delay = <0x10>; + phy-handle = <&rgmii_phy1>; + status = "okay"; +}; + &i2c0 { status = "okay"; @@ -336,6 +367,13 @@ regulator-state-mem { }; }; +&mdio1 { + rgmii_phy1: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; +}; + &pinctrl { bt { bt_enable_h: bt-enable-h { From patchwork Wed Jul 28 18:00:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Geis X-Patchwork-Id: 12406537 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 E01B7C4338F for ; Wed, 28 Jul 2021 18:07:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id ABFA860F00 for ; Wed, 28 Jul 2021 18:07:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org ABFA860F00 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=fADJPl7NucuZJI8NDOzBwU/B4eLauFwpPGpivVdpwpA=; b=pHDHp40v4jgV6m 42yE09frUHR4fWoWoAaF6uwmFPNvp5VOJ7EajGYmkQXZs8Mj5GhVfj0ob144eJ/zrUSIvYnxf2iWM A2hsdRHsYDTGUnFunqcxjN4NDAXwcADwVT/PI8RT7Cnb2snTBUCrBaDjE2VgUF2quQCWAU7rgruKs aJGsi7xmMePRQtVd8h1Tutlg9NEEFE7V0pkIGemiXv/gEHFHsEFHIaKUFNSlwslDwFjGKpxrXQq0S 1nC07VEto51kboeS6RDxIZOFtjuZZNs4PjC7Qs1p9qazkibs6m4HlpjyUceor5nN+hGWutbivthOu oJ4oQuT6Tbl376evXjQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nvc-001zUx-G0; Wed, 28 Jul 2021 18:05:13 +0000 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m8nre-001xrk-CG; Wed, 28 Jul 2021 18:01:08 +0000 Received: by mail-qk1-x72c.google.com with SMTP id t68so3085997qkf.8; Wed, 28 Jul 2021 11:01:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A7JOWTCTU3mD3oDw+k1gzAhKjoRm+3hquu6wc2UO4Yo=; b=NhfcLtyU22TcWSCOGXGgpZ+wknGxJBUJ5IiOpFCdLpmp46UYw742rMBwYjXqbZjzw1 SdxLvYFtMWyj3r3NDGQiApGAVSArPmipjdGr7W7vnGvlZEYFkwguPDrommUZGF//UtGW 0sbF2FhEItBqfeeoh+B+wC9+QKKaAxmot5SVomrGF4zhThnE2iXwvzvdDUbmdzpePTI3 xS5dyhHaBV2oq0AT54Ti8A+g/T9BzEJxFqttkI3QnhOdKw4mQ5pb74XYLc2h3HdHsn9i 5T/lISfJUU/zjOEA9lQiRHXkVZ36TUHUrewd0m/dtgLG2CD/SdgZxISNlGHfyPrp9cjP frTA== 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=A7JOWTCTU3mD3oDw+k1gzAhKjoRm+3hquu6wc2UO4Yo=; b=AyjFvaWKGz7EOy807Nm++Q/hMELacyyuv2OdpfckYdmwi1vvsvVnfqMRvDbcROea1B vfkqt3k2ztr5hLrA+SAVXUGVXa+aDPYV+Wk3HGT5rhCgCnHvcjhm4/vLjm4IqLA/kF+D 75ReUFcgKPL1Phv+Hnhs9b2g3SVwm6UVIl72e2Z8EfkPjaD4/vD7B3NXofTv5ViNYWXW aBzyA/Z8eZgA0EWMgMdmZdrUs0rEVnlR9f8T+OzczkM9Y5VRpsYvegYVGT212MOsyZQk RuS9Awx6MQ4XPEbbnYYStMWuSMcjy6oAuno7qaWrjiWr1Q6R/A8M8GrdUHwrVpl9TYkE uB+g== X-Gm-Message-State: AOAM531zehUH1RoI/LM8dVnyGon8N7y+55Wr8Ttk+WcYTO+Kro7TKFtx XtsAa/IiGdrROc3GZzC1g/c= X-Google-Smtp-Source: ABdhPJwAeS8EcjSx8OOrubvq4e88OEay+SE8dd0bRnV9hpQSSmPWnW1xeHm+IBfMailcCNtrvqYvCQ== X-Received: by 2002:a37:5d7:: with SMTP id 206mr969388qkf.170.1627495264946; Wed, 28 Jul 2021 11:01:04 -0700 (PDT) Received: from master-laptop.sparksnet ([2601:153:980:85b1:b58:2ae8:d75f:660a]) by smtp.gmail.com with ESMTPSA id r5sm223341qtm.75.2021.07.28.11.01.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 11:01:04 -0700 (PDT) From: Peter Geis To: Rob Herring , Heiko Stuebner Cc: Peter Geis , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 8/8] arm64: dts: rockchip: add thermal support to Quartz64 Model A Date: Wed, 28 Jul 2021 14:00:34 -0400 Message-Id: <20210728180034.717953-9-pgwipeout@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210728180034.717953-1-pgwipeout@gmail.com> References: <20210728180034.717953-1-pgwipeout@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210728_110106_508299_3246EE09 X-CRM114-Status: GOOD ( 12.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add the thermal nodes for the Quartz64 Model A. The Model A supports a single speed gpio fan. Signed-off-by: Peter Geis --- .../boot/dts/rockchip/rk3566-quartz64-a.dts | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts index b239f314b38a..a244f7b87e38 100644 --- a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts +++ b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts @@ -27,6 +27,14 @@ gmac1_clkin: external-gmac1-clock { #clock-cells = <0>; }; + fan: gpio_fan { + compatible = "gpio-fan"; + gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>; + gpio-fan,speed-map = <0 0 + 4500 1>; + #cooling-cells = <2>; + }; + leds { compatible = "gpio-leds"; @@ -124,6 +132,23 @@ &cpu3 { cpu-supply = <&vdd_cpu>; }; +&cpu_thermal { + trips { + cpu_hot: cpu_hot { + temperature = <55000>; + hysteresis = <2000>; + type = "active"; + }; + }; + + cooling-maps { + map1 { + trip = <&cpu_hot>; + cooling-device = <&fan THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + }; + }; +}; + &gmac1 { assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>; assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&cru SCLK_GMAC1>, <&gmac1_clkin>; @@ -433,6 +458,14 @@ &sdmmc0 { status = "okay"; }; +&tsadc { + /* tshut mode 0:CRU 1:GPIO */ + rockchip,hw-tshut-mode = <1>; + /* tshut polarity 0:LOW 1:HIGH */ + rockchip,hw-tshut-polarity = <0>; + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_xfer>;