From patchwork Tue Mar 26 17:28:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13604762 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 665F9C6FD1F for ; Tue, 26 Mar 2024 17:28:44 +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: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:In-Reply-To:References: List-Owner; bh=NJD/Fv7qt5uufVAPT/LaoaHKx96oYnKYv1E+fRMZPpc=; b=rVHmOmQIQvjn5R p249Ut8DhoV/EQJ03tFzX5/1kmiBA4ob5oFOqWrKrasUf6fj5cugu/SxalyNcfruEWRau2HHIh3PF BhCUTW6/fVJrq/QDeb8Xlo3eW6fhQWtHPHQwYvx8SDvNFZp5wEhbb5IPkIKIhG2KGmOwmlkG2aoOh BWCYqJDQ6Nt+XnmLef6rPyqcGaB8mSCtdaY3eM+4GfdBZR7OlzibzMaCzVmknGkI7DzkFxDzBAVNQ M9TD5jOC6CG+1MrAMoMJDuWRxv3N2zEQzksVefinXyXWtH2QfBxcfVKn4HI/hfj2tqFr182/7LolC q6WsZFkoDwv/yz7h4U5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpAb5-00000005j8t-31zp; Tue, 26 Mar 2024 17:28:27 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpAaz-00000005j4U-3SLK for linux-arm-kernel@lists.infradead.org; Tue, 26 Mar 2024 17:28:23 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-414866f92beso16826915e9.3 for ; Tue, 26 Mar 2024 10:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711474100; x=1712078900; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=34whjUG6Zl1XJm4VzRMa0tnbaz/35qwlfAZRIoFZ8E4=; b=p9uyItcmpFz42EVMLL6w0R7NfRfsWVum4LuXDeGLTA3eGFHrGLCljnBIsoeYjCC7eJ Zx7b5gygVvJwIM/CqrFY3XKkYhyFsAkDAhLNcdFryUvcAKBGwjpv2IKOXUV7QPm7UEeE /9vxPBu3nzLlitqiuAK+DMVDTNvXN3SJJ1hau+KY4titxebkhAJqc/byu145MnDu7YbM BcGW8MMCCpFVqR+34RNdfFD6ZHktEPjOrk1xbGGSWNGLoUUVMtXQscS2TxfAn54xJGSL lD8Mn97cXEwXoqrBq7PuAwZTZtFhYTaBzoedYUDkGqKP2cQ/7chisRvYGeH9frAsDSfF qsoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711474100; x=1712078900; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=34whjUG6Zl1XJm4VzRMa0tnbaz/35qwlfAZRIoFZ8E4=; b=awIfvAJDlDT9CK366jolWrVDLSLn9U9cqLvDsDHYKnrecgMvyQG953QW3h03lfLrhA hhKTKUQytferPJ/sc1/Xf3jl+a7IFhluO4n1eW/cFVXN7xrUF4dsTN2ZKfq5aQvlTio/ tV5liTSKOWZF4CGUWkM7Dg+OlZkRke+MUVaDqROUa9EujLdDmXGreA9rpb6RzqmFSRnw Kj/GnxPkvhDXzTGZLkOcY+AfojJ8uSANH/hA9BRCoq6vRqMvoDx/Be6dVPEHZUsCwxtf 2OmnQilgPXIkPy9PoglpMdlaaWfm84R2op/gj537HxLmH3lO6ola8unsOEvLk2Ao/VGc uLyA== X-Forwarded-Encrypted: i=1; AJvYcCWqMshoP4OV08YIwy3gy3wd8cOXQjarhrYnU1N9KttcFRCtkGiBTU5tyGYsRRjfwqWs1J3JjSr+9ZQAF/Grzeq0PJoshxIsLuPuTdS2NxSTKDxM5ek= X-Gm-Message-State: AOJu0YzfEF9BorjQoLfzIMhuoCMP1E2Q7TcFYc0nPjDMheVa3T3S66+W hwIZuM3aDR/fpaV0s7tjW3G6DGEtRdoczqvZUarzrvz99JVTPCa681PHQ/OOeC8= X-Google-Smtp-Source: AGHT+IGVsI/cgzBwB19eGGlN8u5ea7DLBa4HSFT2VWsIzl7t0W0L/UkrdqHMsvGdc4yOzHzhWAb+lg== X-Received: by 2002:a05:600c:3149:b0:413:3160:840f with SMTP id h9-20020a05600c314900b004133160840fmr201412wmo.0.1711474099691; Tue, 26 Mar 2024 10:28:19 -0700 (PDT) Received: from ta2.c.googlers.com.com (158.100.79.34.bc.googleusercontent.com. [34.79.100.158]) by smtp.gmail.com with ESMTPSA id fl12-20020a05600c0b8c00b004148f9c5822sm2063281wmb.22.2024.03.26.10.28.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 10:28:19 -0700 (PDT) From: Tudor Ambarus To: peter.griffin@linaro.org, krzysztof.kozlowski@linaro.org Cc: alim.akhtar@samsung.com, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, willmcvicker@google.com, kernel-team@android.com, s.nawrocki@samsung.com, cw00.choi@samsung.com, mturquette@baylibre.com, sboyd@kernel.org, semen.protsenko@linaro.org, linux-clk@vger.kernel.org, jaewon02.kim@samsung.com, Tudor Ambarus Subject: [PATCH v2 0/3] clk: samsung: introduce nMUX to reparent MUX clocks Date: Tue, 26 Mar 2024 17:28:10 +0000 Message-ID: <20240326172813.801470-1-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.44.0.396.g6e790dbe36-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240326_102822_007365_0AD58E4D X-CRM114-Status: UNSURE ( 9.95 ) 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 All samsung MUX clocks that are defined with MUX() set the CLK_SET_RATE_NO_REPARENT flag in __MUX(), which prevents MUXes to be reparented during clk_set_rate(). Introduce nMUX() for MUX clocks that can be reparented. nMUX is used in GS101 to reparent the USI MUX to OSCCLK on low SPI clock rates. Each instance of the USI IP in GS101 has its own MUX_USI clock, thus the reparenting of a MUX_USI clock corresponds to a single instance of the USI IP. We allow the reparenting of the MUX_USIx clocks to OSCCLK. The datasheet mentions OSCCLK just in the low-power mode context, but the downstream driver reparents too the MUX_USI clocks to OSCCLK. Follow the downstream driver and do the same. Tested with USI6 and USI13 SPI. Find discussion on MUX reparenting to OSCCLK at: https://lore.kernel.org/linux-samsung-soc/d508dfc1-bc28-4470-92aa-cf71915966f4@linaro.org/ v2: - reword commit messages - drop exynos850 patch on Sam's request v1: https://lore.kernel.org/linux-samsung-soc/20240229122021.1901785-1-tudor.ambarus@linaro.org/ Tudor Ambarus (3): clk: samsung: introduce nMUX for MUX clks that can reparented clk: samsung: gs101: propagate PERIC1 USI SPI clock rate clk: samsung: gs101: propagate PERIC0 USI SPI clock rate drivers/clk/samsung/clk-gs101.c | 225 +++++++++++++++++--------------- drivers/clk/samsung/clk.h | 20 +++ 2 files changed, 140 insertions(+), 105 deletions(-)