From patchwork Thu Jun 6 14:33:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13688600 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 0F098C27C54 for ; Thu, 6 Jun 2024 14:38:03 +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=lRxuxJ1egVndTv1QpIP4SdrIC6DE8KtfnYOcQJRC424=; b=zccif/hnAkkRj1 fr60NImFcq4U0faEQ36V8nWS3jtyy69JPS5XWh/XLQ834WUdfvq3xh8LNJ1oofr2k1vY2M7R+H5V2 GJz+Rv3oOU9hQUJa9hu2fGbJz/ZIAbd178FrOSWkawadmuJnv6jinlgVkxKhzm0KZV2ju9oJLUifZ QnT6Bcik7J2Cq6k9JYnqgsJlvjIqxFptoohF46M//NskXd0osIAeItgV1LuWtEzllSGmQHwKC2zc+ pBcPpJkjFBUfoQVWJdTkNBC6Wkt6Rj8cyckQIiS37UvNCaWDmH3YUkWyEHmtiupem3ysq5vuBJ3MR 2CP2lLLx4oGm+Epw7duw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEFP-0000000A6sm-2HN7; Thu, 06 Jun 2024 14:37:47 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEF8-0000000A6eU-39Mf; Thu, 06 Jun 2024 14:37:34 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2e6f33150bcso10660361fa.2; Thu, 06 Jun 2024 07:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717684647; x=1718289447; 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=SwbtZSg+KieEl718DTPhm+GILj3m52AXbprU8PF/yug=; b=l+OHYm1+bE0JokFUVbn9bNws5FVxDjUZW92iZzhZwWsWTHKji7ameafBZJoKTfYFNw Q/xNrKu6Tc9Nm3BWQcZMheHiFBonlQ/DWAi/xyw/KzLHcCEgTh2ypO+dSSODSmhmyWGj OeQDadJT4iporg+9OnvGnclZtI5pyKgbOV9gULgIcwx9rMdAPuysYt/QIQVsllmle1jp aQwRKMfQawz2OtGN1lBtYDhmTXWbwnuqcq9ET97DnbJpf8xiU7N3Op+h70LH0aV00BT1 bb8CkHWdyp2Uo1rnbKDOo2DOo3SPSqo2ypsp50JXLljxnHsGNeIAOejnpqfsQPfSwomN /r3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717684647; x=1718289447; 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=SwbtZSg+KieEl718DTPhm+GILj3m52AXbprU8PF/yug=; b=bpEWwLd8dYk+P+9hvVvOqGDME8spvdwRd6/1nrOpXuNBQU0kzM1ypnZgtEM1KBFodP 78uk/JDLhfCPUd2nSdq2rmzY+CJ6Dzy1AFnz9QeLCTCdljjcWgm8lwMiTvz4Ikybbedj JaY24ff+/pvwWpyeTj3vtcJVjDNz9NnpEHa6jnlPL7kUtY9T6Yn9TzG8AhUYv6SEcyRl abj68iAnONcPEszvs8c6zPv+42GUFEA4Kpm21mJwj3LSa7FkJCkhG1p3MqCzLLrGtPlP wgundhL/Y0CqDyaH4JFDdQdeKY/HR/nvdvJqSAnkOUhSw8VztTMPIxDBr9uQ+jtvfixR bQVg== X-Forwarded-Encrypted: i=1; AJvYcCWNxy2KwnB+oh2gDoSItq2DXp1tPgBrErteB7yC/tN9jA2zOi5HUe0xsXP3hSbz1S8LDc4Z8XmLHFlXjRyl7+NZD7/T+SMftMAWXfZ1jCon4SBofz1HGHvgifnCrW0bGNpxcFn4oD4Ndm0GQqoDdmcM27yGFMASjU0= X-Gm-Message-State: AOJu0Ywba4dAbY9d2H+SOYYmR0QuUbIMhLrlqimvd00aNIil7KTJL/Lr DD4Ht2PQ66uHhznWMmdmrs5sgafbkNq/J1WI+0Gm9K1bkMBM6X6za5B4 X-Google-Smtp-Source: AGHT+IH1deup0gJuPwta9k775MNhv8GAL/BikALDm1EyiQnDESfz6dwxMRWHIj+6oNfeitvvhv7KfA== X-Received: by 2002:a2e:9ac6:0:b0:2de:74b1:6007 with SMTP id 38308e7fff4ca-2eac7a72de1mr38708601fa.36.1717684646965; Thu, 06 Jun 2024 07:37:26 -0700 (PDT) Received: from U4.lan ([2a02:810b:f40:4600:ed9f:91b7:21f2:3109]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57aae1008adsm1190925a12.38.2024.06.06.07.37.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:37:26 -0700 (PDT) From: Alex Bee To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Alex Bee Subject: [PATCH v3 1/5] clk: rockchip: rk3128: Drop CLK_NR_CLKS usage Date: Thu, 6 Jun 2024 16:33:58 +0200 Message-ID: <20240606143401.32454-3-knaerzche@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240606143401.32454-2-knaerzche@gmail.com> References: <20240606143401.32454-2-knaerzche@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240606_073730_915695_7B33B600 X-CRM114-Status: GOOD ( 12.43 ) 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 In order to get rid of CLK_NR_CLKS and be able to drop it from the bindings, use rockchip_clk_find_max_clk_id helper to find the highest clock id. Signed-off-by: Alex Bee --- changes since v1: - new patch drivers/clk/rockchip/clk-rk3128.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/clk/rockchip/clk-rk3128.c b/drivers/clk/rockchip/clk-rk3128.c index d076b7971f33..40e0e4556d59 100644 --- a/drivers/clk/rockchip/clk-rk3128.c +++ b/drivers/clk/rockchip/clk-rk3128.c @@ -569,18 +569,22 @@ static const char *const rk3128_critical_clocks[] __initconst = { "sclk_timer5", }; -static struct rockchip_clk_provider *__init rk3128_common_clk_init(struct device_node *np) +static struct rockchip_clk_provider *__init rk3128_common_clk_init(struct device_node *np, + unsigned long soc_nr_clks) { struct rockchip_clk_provider *ctx; + unsigned long common_nr_clks; void __iomem *reg_base; + common_nr_clks = rockchip_clk_find_max_clk_id(common_clk_branches, + ARRAY_SIZE(common_clk_branches)) + 1; reg_base = of_iomap(np, 0); if (!reg_base) { pr_err("%s: could not map cru region\n", __func__); return ERR_PTR(-ENOMEM); } - ctx = rockchip_clk_init(np, reg_base, CLK_NR_CLKS); + ctx = rockchip_clk_init(np, reg_base, max(common_nr_clks, soc_nr_clks)); if (IS_ERR(ctx)) { pr_err("%s: rockchip clk init failed\n", __func__); iounmap(reg_base); @@ -609,8 +613,12 @@ static struct rockchip_clk_provider *__init rk3128_common_clk_init(struct device static void __init rk3126_clk_init(struct device_node *np) { struct rockchip_clk_provider *ctx; + unsigned long soc_nr_clks; - ctx = rk3128_common_clk_init(np); + soc_nr_clks = rockchip_clk_find_max_clk_id(rk3126_clk_branches, + ARRAY_SIZE(rk3126_clk_branches)) + 1; + + ctx = rk3128_common_clk_init(np, soc_nr_clks); if (IS_ERR(ctx)) return; @@ -627,8 +635,12 @@ CLK_OF_DECLARE(rk3126_cru, "rockchip,rk3126-cru", rk3126_clk_init); static void __init rk3128_clk_init(struct device_node *np) { struct rockchip_clk_provider *ctx; + unsigned long soc_nr_clks; + + soc_nr_clks = rockchip_clk_find_max_clk_id(rk3128_clk_branches, + ARRAY_SIZE(rk3128_clk_branches)) + 1; - ctx = rk3128_common_clk_init(np); + ctx = rk3128_common_clk_init(np, soc_nr_clks); if (IS_ERR(ctx)) return; From patchwork Thu Jun 6 14:33:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13688597 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 248AAC25B75 for ; Thu, 6 Jun 2024 14:37:48 +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=lnTudHy4az1FcpHNFHQik5gOqcOfmcPg0W777nebAeI=; b=0upkPOy4/xqeOO VbHsbBgqXNo0iM52OP2Ge0250AN/0t645X8n0P4jH1hYIcHFoLdYhV+fqPKsFAVmlZ5G2wYpk/n8h NRGK7egE17ZrS0hteHVszvI5IiOXEtf3lbNxQ6AII+5TljRtVhL2Wvg5K399ixuSmFl2VmK6WKYgt 4rWSlq7mEMSv4EOA1n5nTNCTcPTx4wgvkCRWFO1zlRXpC8SYAKpYtLaHSS7CPeR19nIl/ea/8G4cL ibKvvl7hKZewKgVS2dgMS06ika5rDi317K595/ZaMACaWyeTiCS8y52ouD1knanzpgh26tro3EdZt Zh8kPMW//g4XboI+ioYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEFB-0000000A6hK-08Ay; Thu, 06 Jun 2024 14:37:33 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEF7-0000000A6ds-11q3; Thu, 06 Jun 2024 14:37:30 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-572c65cea55so458698a12.0; Thu, 06 Jun 2024 07:37:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717684648; x=1718289448; 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=i9rzNDKvRTHIQEHFX1fo6SI12nhA/uBVeoZf8XBGrf4=; b=IHKDcJovpvv9vls87vaXKR/q8L5TYq/vT7iiQf/zbgyhOoPcF9JnkYT8cBcJcrWHBv fvEi58K5InYIQyBb2r5aUK3z2tDYx/Xz2JfRJ8LT7cCIhaGW7KqvWO06BY/YvOk/5C/p Ued5H/COYZfnZz1wwxMI6gcaDgt39Bbz7YU8ZR/ptXnHxipAoY1wzyUzpNSjE2jYCj7N JRGbHvIOYc3jreGy0kswMg7IAjmsryafcEGvMNk1hnvxwxG3yCnXQ6/Q4oMKmrJCpMhF MHAv6xUOKAs2rQmI2mcVCUyk28/QftedjWsVdMP2+/xCRgAQiOc72LuraIiZZplzOnMa CSTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717684648; x=1718289448; 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=i9rzNDKvRTHIQEHFX1fo6SI12nhA/uBVeoZf8XBGrf4=; b=paSyscp1ILmD7a79UOHpVLzWrp+elz7sfk6HEd/oCNGehT+g0b831Qn055n8fQXh+U ArH9fBGmt+zvpBXejreTKtuO+wofeyny6FkqOYs5jW7DFkXc3W6WMfH+ONkmUtAL/OH9 sL/U2dniifjgFhtdPMGomVigKAdRdfrjzxvx2Kr7mIFz32XctS+8yukc29BQKVC+VBMy vUmzJq+q3LEtHq91vG8dtakH5YHWUCylwbAAXNkDOUoFwxFNZGgQ36dH4L1hN534rSKw 8xgdm0ax9cudZ4m1pFyEiAABOZnzKvsstR+CefZ9ntVtk8Xt2BpuH6OTM7Ux8ScaDac3 zL1g== X-Forwarded-Encrypted: i=1; AJvYcCX3nsWbakfuxsThAOxBJXKjpKRHO3iU4ScP4/XxU3siXI3Iq0uW82E4ilLeVktVQ0Zx2hTvtSdofV17+8hIt2sz3N/UvM8ZZwlByg262nUkbldlQIO0VMh7ECpY+5CZpWJn23PIdSYIw6GGYu6Acd8y1jVSCWV+i1A= X-Gm-Message-State: AOJu0Yz7i/wBX2cq0q6CwH91Cp8HLCoqj0QIf95q5yCeAgy3KVenRwiR 5JT+ckhFgDwLUh9fHqdaoZNXLv2UkDHnViiSa61snnpC/b3jT3I= X-Google-Smtp-Source: AGHT+IEZD1zCh1WfCvxH/MGx6QPAzngQWbhVxcZUWrSClLiSnL+TIe5o63jAqNH0QIyeu9gKgFaxhw== X-Received: by 2002:a50:a6ca:0:b0:575:2a03:8ff6 with SMTP id 4fb4d7f45d1cf-57aa55ae244mr2678406a12.16.1717684647657; Thu, 06 Jun 2024 07:37:27 -0700 (PDT) Received: from U4.lan ([2a02:810b:f40:4600:ed9f:91b7:21f2:3109]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57aae1008adsm1190925a12.38.2024.06.06.07.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:37:27 -0700 (PDT) From: Alex Bee To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Alex Bee , Krzysztof Kozlowski Subject: [PATCH v3 2/5] dt-bindings: clock: rk3128: Drop CLK_NR_CLKS Date: Thu, 6 Jun 2024 16:33:59 +0200 Message-ID: <20240606143401.32454-4-knaerzche@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240606143401.32454-2-knaerzche@gmail.com> References: <20240606143401.32454-2-knaerzche@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240606_073729_313473_63C27AD8 X-CRM114-Status: GOOD ( 10.32 ) 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 CLK_NR_CLKS should not be part of the binding. Let's drop it, since the kernel code no longer uses it either. Signed-off-by: Alex Bee Acked-by: Krzysztof Kozlowski Acked-by: Conor Dooley --- changes since v1: - new patch include/dt-bindings/clock/rk3128-cru.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/dt-bindings/clock/rk3128-cru.h b/include/dt-bindings/clock/rk3128-cru.h index 1be455ba4985..2616a8791c14 100644 --- a/include/dt-bindings/clock/rk3128-cru.h +++ b/include/dt-bindings/clock/rk3128-cru.h @@ -145,8 +145,6 @@ #define HCLK_CRYPTO 476 #define HCLK_PERI 478 -#define CLK_NR_CLKS (HCLK_PERI + 1) - /* soft-reset indices */ #define SRST_CORE0_PO 0 #define SRST_CORE1_PO 1 From patchwork Thu Jun 6 14:34:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13688598 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 6E932C27C54 for ; Thu, 6 Jun 2024 14:37:59 +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=OnRseHBVmYAIm9qdkWspoJYx8FjgiwA1vATzATNLjyY=; b=1I3RPo3uS1c2Gz 7840DqqH6wWxJUs7Rh+/Ntz5Y4RyLuohvHy3kCOTTOx8bRtHmdFxmN/lNz+w1YeEt4Z16xdaOTEj8 ameDO/8DbPVn2hfcW0s65lkPbIEj1cN62T+G+RmxQce6bAi5b2z4SP6EzL7TGJY0xpKdN+xTyfGD0 KcauANumSKXIgqDn5OXVfEZWqwgpFF2wdhjFNn2Gkq1x2cpOEWklZRzS0Ie4BMaGTLiNMpF+RKfge G2Ls5Dc05SIR9kUnyWJSkmqDZhnSq+1cAQLaI5UttvkbaQ764TnbX+FzXwed0n3FR38MSE6B6slAn nro+70FBfLSFk3u1PVfg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEFN-0000000A6rT-47A9; Thu, 06 Jun 2024 14:37:46 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEF8-0000000A6eY-2ncy; Thu, 06 Jun 2024 14:37:32 +0000 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-57a677d3d79so4101109a12.1; Thu, 06 Jun 2024 07:37:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717684649; x=1718289449; 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=REl0Xx4fomFhEoX2hAlcG1iEdQqTsDARw0lBKW2BPss=; b=SQHmBpiiRwuZCAZ5n1DuWW//srAFEVk7cVJV0TM83Js9GtlaaWEfVUVxRV0VbhVCuZ troqcLYSYQ1oV3Ax7z2gqaNJ45CZi1v77igDLsj2S3p7rjV5HnFQl1ZmZ0Mver9yswyn gKVITrKN1/sw1IGuDx6+vgKgr/Up87Km1JpC/R+yrSU9gj2ceF8YmktQcWN1p8eEIwRQ NcuT5cOL2lM/NeUPMuqUl/4WhSM5HVQg74QRGlresJ8hu6UtkiG08KGcRzoqOdk2khDB PdxB8aa+Z7pUdvG5GRs3WLEHPWCW+gFaLHm/jqA/jgHdMOMOK30JVcCm8Z5K9MJDZ7gu GXew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717684649; x=1718289449; 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=REl0Xx4fomFhEoX2hAlcG1iEdQqTsDARw0lBKW2BPss=; b=mrDITyNFRsYsstRAnXe83F7LlD0mfdXWluGKrDdkzI2IPbzeS1EQw5jV7uuknG1EQh glqXyAZCdM+4HOydZwYoacNquLBe7FuPrOfzS1pjk4yOD8cQWJ8aVK6dRn3yV059fzaW GywDkEtNcp/TsDP0BbYfcynzSCvxXLwoQTV5HFLQ6nTlIBAbcR6KNZJVpbKnjP9O2pud Z1H7Z4KdOB14Z06ZbSX6ZcVKqCYiZ1PZwBs6EKdP8Pfj95F5lmi59X9eMxKXXBTXXW1Z HG/JExLFgQ13W9slb9cIxzpWDLInPWwBUOSct9BqSunx6wkzJG4SKlz7Zc5HjLOUdeh8 Y6Og== X-Forwarded-Encrypted: i=1; AJvYcCWg81to0S50e4ie7gllyo2tIB6pYWXorq11FMnaGOCcNoi6zBRgI4fxt+4SUGf1hUN2nAL08cUoRVGo2Eu0KZ9uMIARPjHQ53NKAsCebe4JvX9DnGFjnvrfYiLFYNh+r70yuGUMZZyv0IqB+lc7Ihlz4Y0s73bR+ho= X-Gm-Message-State: AOJu0Yy3diD3Ik0ROAMPAcFZVulXADPZiTSOG/t48vEHof0vBbY0+XNj ISSJB5suGdEyMzNuIrlT5Tto8LSXboypyM0gIpDBFhVGG1pJDFU= X-Google-Smtp-Source: AGHT+IGtqB4Yqpf33WXk7lsyzw0x62MTsqjUTwKDFtbYVmSJtlwiER+p6JD5MO3ffaIRJsgfC7IDMg== X-Received: by 2002:a05:6402:446:b0:57c:46f7:a49c with SMTP id 4fb4d7f45d1cf-57c46f7ac1cmr819478a12.7.1717684648412; Thu, 06 Jun 2024 07:37:28 -0700 (PDT) Received: from U4.lan ([2a02:810b:f40:4600:ed9f:91b7:21f2:3109]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57aae1008adsm1190925a12.38.2024.06.06.07.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:37:28 -0700 (PDT) From: Alex Bee To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Alex Bee , Krzysztof Kozlowski Subject: [PATCH v3 3/5] dt-bindings: clock: rk3128: Add HCLK_SFC Date: Thu, 6 Jun 2024 16:34:00 +0200 Message-ID: <20240606143401.32454-5-knaerzche@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240606143401.32454-2-knaerzche@gmail.com> References: <20240606143401.32454-2-knaerzche@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240606_073730_822148_9FA783C0 X-CRM114-Status: UNSURE ( 9.69 ) X-CRM114-Notice: Please train this message. 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 a clock id for SFC's AHB clock. Signed-off-by: Alex Bee Acked-by: Krzysztof Kozlowski --- changes since v1: - add new clock id at the end include/dt-bindings/clock/rk3128-cru.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/dt-bindings/clock/rk3128-cru.h b/include/dt-bindings/clock/rk3128-cru.h index 2616a8791c14..b609fcf96508 100644 --- a/include/dt-bindings/clock/rk3128-cru.h +++ b/include/dt-bindings/clock/rk3128-cru.h @@ -144,6 +144,7 @@ #define HCLK_TSP 475 #define HCLK_CRYPTO 476 #define HCLK_PERI 478 +#define HCLK_SFC 479 /* soft-reset indices */ #define SRST_CORE0_PO 0 From patchwork Thu Jun 6 14:34:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13688599 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 A158AC25B75 for ; Thu, 6 Jun 2024 14:38:01 +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=NY4tu7gBjbMOdfrkNaqB9MeDR6zF+6ciX4JvmacPhOU=; b=0Rt9fdc994X/ra x9JWzra28E1QJtdg02CmBYyPyRW5eYnD7l6YaZYlNoArpEcjY2/qjllBqLAepIrvvRhq+aGCDFpyu 8rHiwKcYjkID46490GsDe3gvLWVNiYb+qxTXBWpxbIfmR/ihETDKD7JWM4lHHZYra1glpH489T9u9 hvUH5VBrPcHvajhAsfj5zWudQ1/9ttT5Gj9RbvUqV48pnULer/+zWgjZRjcQjsmF2FsPe2vGexfBD u/5Z4yAPn2HsGxyvztXYfrjx8Lf0JY+wtQrz9zUBfwJx6/ydG/iDtEIfHNe/ek9OaWhwuY3J+cq/e qmXWb9uhmwnmcXW+dThg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEFR-0000000A6uD-1EjH; Thu, 06 Jun 2024 14:37:49 +0000 Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEF9-0000000A6fC-0ms7; Thu, 06 Jun 2024 14:37:34 +0000 Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2ead2c6b50bso8585111fa.0; Thu, 06 Jun 2024 07:37:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717684649; x=1718289449; 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=fk9rPd7/DZbkWMr4RLdz9e3yLOVFGIh3KC1NJKidnyE=; b=UfOHOtOmcPyHeWh1inJ7PRdI4E4y+Z/ruTVQf4c7yQvuD+8yUqrHxtlAPjHtGc40pM waVcf0bk9lLJYfa3VfUT3Ya77/I9n4wLWgqxtZIsNUj0dJ1d6g/mJgcEjKBdZuSIUtsQ iiIpYOgVPNMxPLgCrR8O/29wsQkjq1F1HkuOrlYaQNecoEaf1gZCJU/jsIX0Uq1nD5Im 2G166kDuirwqDDJrZ5/QFE2AtrmFr+Z75TstokX/T8iJWr8i6E779nUdldiVw19ymLNR p5z3X9C1gKAcVXHm01peoKNi8oO7IVyJuoyVqmufIuvO+lmDjEH18KvsfLM1tDzMlS1k 7A4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717684649; x=1718289449; 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=fk9rPd7/DZbkWMr4RLdz9e3yLOVFGIh3KC1NJKidnyE=; b=w60TlaT5Tw3JTeLq3K7mzyiHViRZZ+TpR/QIrKDPRl15yua1GmLccIBluNF/fKsWPL XLBgmGuHw8yVh52N2WCokBrP94C+tHWnxC4HjxaRPBFSAMIOAPcG8qbT8RMGvOYh8n1T 5+NmLmUT5f/D2GFOH0jHccj2Q5CTJsNQWAYOgaJbx/g0l75Pm0ln46vx53JsKWt34BKJ LcyXw9+N4FIBWJBnHpg9RsrhgF8uMVd6cPLcSPoBbqa0gmSTvnbBl2+TXJhSjJ4Mxlb5 otCgIM2bVdEQMqJbiabWr1SkHNN4aMgrRw5+cPITE3MrGKP0Sh4BtN9c7VINLYI8dMvh J5Bg== X-Forwarded-Encrypted: i=1; AJvYcCX6qvuV69idNpU5mCsWwv1fu8TaI7ffvUIH6tStzISE4n+9U3jMFnRoqPDgEi/Ko17q+Jj/IptqNnjmtnU1G6zpSnzrkDHqVQXsQO5VejS5mcqi3h377bkBFqxTr0A3JfRDCu3TNQviLJyoFi/JMjgMAd41HjRi6QA= X-Gm-Message-State: AOJu0Yxz+hsdzW7HORn5/Wh7Pdz8/O8twxZHmY3L4lwpCxS9rl/A/yKw 3bBPXJMkxjV2Fx3xMXBuatbkSf8vPJhiT2asOFDSFv3ekNooO1E= X-Google-Smtp-Source: AGHT+IG8owqtLInvHSMcTogX+8tbyB5zZGMHSBrm8ZaQaQLzzEArYPr/Dm2UILk8RcGLuXsPT9EyTA== X-Received: by 2002:a2e:b790:0:b0:2ea:cf86:c0a8 with SMTP id 38308e7fff4ca-2eacf86c218mr18265491fa.37.1717684649040; Thu, 06 Jun 2024 07:37:29 -0700 (PDT) Received: from U4.lan ([2a02:810b:f40:4600:ed9f:91b7:21f2:3109]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57aae1008adsm1190925a12.38.2024.06.06.07.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:37:28 -0700 (PDT) From: Alex Bee To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Alex Bee Subject: [PATCH v3 4/5] clk: rockchip: Add HCLK_SFC for RK3128 Date: Thu, 6 Jun 2024 16:34:01 +0200 Message-ID: <20240606143401.32454-6-knaerzche@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240606143401.32454-2-knaerzche@gmail.com> References: <20240606143401.32454-2-knaerzche@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240606_073731_269343_CC1ADBAF X-CRM114-Status: GOOD ( 10.38 ) 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 SFC IP exists only in RK3128 version of the SoC, thus the clock gets added to rk3128_clk_branches. Signed-off-by: Alex Bee --- changes since v1: - none drivers/clk/rockchip/clk-rk3128.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/rockchip/clk-rk3128.c b/drivers/clk/rockchip/clk-rk3128.c index 40e0e4556d59..7c3d92af12df 100644 --- a/drivers/clk/rockchip/clk-rk3128.c +++ b/drivers/clk/rockchip/clk-rk3128.c @@ -553,6 +553,7 @@ static struct rockchip_clk_branch rk3128_clk_branches[] __initdata = { RK2928_CLKSEL_CON(11), 14, 2, MFLAGS, 8, 5, DFLAGS, RK2928_CLKGATE_CON(3), 15, GFLAGS), + GATE(HCLK_SFC, "hclk_sfc", "hclk_peri", 0, RK2928_CLKGATE_CON(7), 1, GFLAGS), GATE(HCLK_GPS, "hclk_gps", "aclk_peri", 0, RK2928_CLKGATE_CON(3), 14, GFLAGS), GATE(PCLK_HDMI, "pclk_hdmi", "pclk_cpu", 0, RK2928_CLKGATE_CON(3), 8, GFLAGS), }; From patchwork Thu Jun 6 14:34:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 13688601 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 1FEA8C25B75 for ; Thu, 6 Jun 2024 14:38:11 +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=wF8/9/yqG/lYHc+5Kw2ZBG1QY9xmH0ZdgTYCRPs+i7M=; b=liHWICjYkf6Ggp mDXG8fEIyN+Y3vlT/hFp0O6U4TVLihVSe8QF9RFwaY1CyUpqGNc4lrVHKzaXCTV3QvSM6wq9YzyBz xyaC/QDsDe5Ja5BESZOVzsOZlUdFF6qwoM/1lVlFLG5x3PwhvAIoIbotQRPwBQuMh2r8jqNacEkkM o9+r1zb3d07jhLmPNQkGtMw+1mh59k1wK4k1KudfhVfSIyhe1/RS2r+0JWPHtOS6H78en2SNu3f3B cauZbU9NJ4LpGSEkpp7Kpo0oEvNsDsRKCFQeUkoxDLqRH9mrzwZXQJUJpqeo/UW//qgmJOhW2E8LT tzWMMlnm+pmgTmn8ihBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEFW-0000000A6y0-0ehb; Thu, 06 Jun 2024 14:37:54 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sFEF9-0000000A6fZ-4AsM; Thu, 06 Jun 2024 14:37:35 +0000 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-572c65cea55so458760a12.0; Thu, 06 Jun 2024 07:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717684650; x=1718289450; 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=6e1IO8wa8L/zyDqKfvDJQSO9H57/3PySfWDoeUhjP78=; b=VOYqdrdL5vKuiMjhx7Pd8MmRzLCIsCAiMkMqzbbUcCpuvnwDGvIHHFZaLmpnWKQp1f +5OKJAwxxVOs3lncxfNSQ+Oq0rD4IZ8vb4Ml23o2x9F1VDREY+0r+CAXDjsowSBQubyX 9WT0UKEqmW44Z8R48xIInGS9YAZmOSe9YHHdbdAL/wB3yu7CrWZzjloSp7q1Amnhna7K TvDcVqOXrxCemhjZmTbWe3zotnULYmT2c9k9E8hBbLPbWQSn010/0G8QVT89OrE7Ybe8 jbqZmaIZ82eI+WKB6e8sSbNwPL/KM2KgNheORSOLjuMESYk/uSG+BFkOuRpT7Jq8iN/5 hw8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717684650; x=1718289450; 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=6e1IO8wa8L/zyDqKfvDJQSO9H57/3PySfWDoeUhjP78=; b=t4NfwwnhtC1zGKU+njp6lGptgdT11t0dRzbkSDCmiM+qTT7L/q27v/IB9nkN/yg0Oa slEeBRi9faQtou9QJ7tIR31cXfmhnIAvV0TSi07RkeWKK7lG6Csh/C5c7KKvFxcGZNGZ I1xUpa1PfXwuoHZ9aRu6Q8X0XouL040jYbR9Dkgzh1REBX2h1t7XDcq/XZA5Pysi7c3C XVyPwo/kbL0KYDwmVhqdwdVSLoxoVT4qcy1htNWBifLnBemQeBHvTvduTNS2PMBHvEp0 LlqaytWtubnid0ive/it68z5Zm+rsdBEEoJYwjEoeVa3HfFPjEu0UtHRVNxp3VFiXZKr BLWg== X-Forwarded-Encrypted: i=1; AJvYcCW5v2zgm2IW4vkSWTR7hdtVYuQvjTR4nNO7psSwPA8mLfU1FMPRcwtuHo7jD/7D+xcPGKNsc+b5CicOLJurrTnIrmWPA8dbLVjHahZEx7wZbGCBMJ0pl3PLKoHYDoyOu+8p34OeHGqpwgJy8GAO2NIwjypSjAkOJo8= X-Gm-Message-State: AOJu0YzjyLSzo2BMsOmRo01Pch3m5q4KcB5DLxC8F7IUEN1wZLesezrb q3mxKDDBDGJzWVe7psX9DwK2wUmVYVxXNWzPubvOcNCUh5qfFyk= X-Google-Smtp-Source: AGHT+IGTguIsiQuctF52YO2KaIAv/wxplXc7Xf93KtnhaWBBwggvhPDzJlNlzZ3hmNeOjD5ieyF3QQ== X-Received: by 2002:a50:d7db:0:b0:578:69be:6e7a with SMTP id 4fb4d7f45d1cf-57aa53e0569mr2595265a12.1.1717684649733; Thu, 06 Jun 2024 07:37:29 -0700 (PDT) Received: from U4.lan ([2a02:810b:f40:4600:ed9f:91b7:21f2:3109]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57aae1008adsm1190925a12.38.2024.06.06.07.37.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:37:29 -0700 (PDT) From: Alex Bee To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner Cc: Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Alex Bee Subject: [PATCH v3 5/5] ARM: dts: rockchip: Add SFC for RK3128 Date: Thu, 6 Jun 2024 16:34:02 +0200 Message-ID: <20240606143401.32454-7-knaerzche@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240606143401.32454-2-knaerzche@gmail.com> References: <20240606143401.32454-2-knaerzche@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240606_073732_127412_71D3B5C0 X-CRM114-Status: GOOD ( 11.80 ) 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 Serial Flash Controller and it's pincontrols. Signed-off-by: Alex Bee --- changes since v2: Fixed pinux settings for the chipselect pincontrols which originated from contradictory documentation: Datasheet [0] (page 29/31) says it is func4 (when start counting with func1), while TRM [1] (page 185) says func3 (register value 0x2). It turned out TRM is correct as with setting cs pincontrols to func4 the spi chip is not detected, while func3 is fine. [0] https://www.armdesigner.com/download/Rockchip_RK3128_datasheet_V1.2.pdf, [1] https://www.t-firefly.com/download/fireprime/docs/rk3128_trm/chapter-5-general-register-file(grf).pdf arch/arm/boot/dts/rockchip/rk3128.dtsi | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/rockchip/rk3128.dtsi b/arch/arm/boot/dts/rockchip/rk3128.dtsi index a7ab0904564f..c37aed28bd10 100644 --- a/arch/arm/boot/dts/rockchip/rk3128.dtsi +++ b/arch/arm/boot/dts/rockchip/rk3128.dtsi @@ -399,6 +399,15 @@ usb_host_ohci: usb@101e0000 { status = "disabled"; }; + sfc: spi@1020c000 { + compatible = "rockchip,sfc"; + reg = <0x1020c000 0x8000>; + interrupts = ; + clocks = <&cru SCLK_SFC>, <&cru HCLK_SFC>; + clock-names = "clk_sfc", "hclk_sfc"; + status = "disabled"; + }; + sdmmc: mmc@10214000 { compatible = "rockchip,rk3128-dw-mshc", "rockchip,rk3288-dw-mshc"; reg = <0x10214000 0x4000>; @@ -1155,6 +1164,32 @@ sdmmc_bus4: sdmmc-bus4 { }; }; + sfc { + sfc_bus2: sfc-bus2 { + rockchip,pins = <1 RK_PD0 3 &pcfg_pull_default>, + <1 RK_PD1 3 &pcfg_pull_default>; + }; + + sfc_bus4: sfc-bus4 { + rockchip,pins = <1 RK_PD0 3 &pcfg_pull_default>, + <1 RK_PD1 3 &pcfg_pull_default>, + <1 RK_PD2 3 &pcfg_pull_default>, + <1 RK_PD3 3 &pcfg_pull_default>; + }; + + sfc_clk: sfc-clk { + rockchip,pins = <2 RK_PA4 3 &pcfg_pull_none>; + }; + + sfc_cs0: sfc-cs0 { + rockchip,pins = <2 RK_PA2 2 &pcfg_pull_default>; + }; + + sfc_cs1: sfc-cs1 { + rockchip,pins = <2 RK_PA3 2 &pcfg_pull_default>; + }; + }; + spdif { spdif_tx: spdif-tx { rockchip,pins = <3 RK_PD3 1 &pcfg_pull_none>;