From patchwork Fri Apr 19 10:09:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13636138 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 7FC4BC4345F for ; Fri, 19 Apr 2024 10:09:50 +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=B5fjQAXPI3FXT0vPiIajTs5ctVRX98Degc97QH5ld9E=; b=jzFpn3D9flnJ6Z SgBJCnqNvj4hll5GTFM4FUHsD5Hq6W6XX9BikUdp51Jmo9x/xQ/TPzLLSVaQdRA8mj/WZYr7bBwts GecPBRFOr+pVVB8hERXik8XIry9h35vWRuiuGgrUaSY6YN0Wt9XcobU6ks9CUGqEHy3fIdoCZjG60 kOHtgiB2R+u0M8qW+Atmpt6cxIvKF5OXailiCaktEkq/AYQ97YO0wCd1KsS1L4sMuIc3LIVFSpPnS N0wqJvNXlgi6XXF7UKmWWKwPGKeklukQNKz4TJymQndZ7roTZorvRyi7Ejse4/W2qsj+N0UQdLepG l/i06ycvBW07wnSSCqLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxlBU-00000005E9t-34IQ; Fri, 19 Apr 2024 10:09:32 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxlBQ-00000005E8g-2hgv for linux-arm-kernel@lists.infradead.org; Fri, 19 Apr 2024 10:09:31 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-415515178ceso13332315e9.0 for ; Fri, 19 Apr 2024 03:09:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713521362; x=1714126162; 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=3XsfVisx7vvQLrO4aI9sNPKlohq0De0eJkgncDmesfI=; b=Y9U7Myuvwn0Tc2FiszKRzpN6Y8nCrbjbaqHYqMJBZpodT396nQNSUac4iON8ZKFR/l CNajPotlI+Ybx43g7Ew2M8FE9L/SdjQLn8esNmmO4wei7Lc/Ob5fMsL34Pf/wV7yNGpO /YNT+sz61VCNiwNHUn1UX21W0UHWf3z3xPCpUZsPtaWfJq7e8EJ8P2hgMQv7LuBLkWS1 QYraH6SMu0dfuqNk8xnzgLSIhLT97IZBDjsze4xha9upvP7VOrPxC5TQnGXuqPb8arHG bCCZHMEVBo6H3s/9Z1KN+pIqC28YgQP8NDO4aHHR0Hpj6a3/iublXXYqMNrvz4OA6QDu U31Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713521362; x=1714126162; 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=3XsfVisx7vvQLrO4aI9sNPKlohq0De0eJkgncDmesfI=; b=LGUUqP8IAKZkYRDicfCmOl7Mx7sLqFvfFXe43rB6ECKb2BsrM2cPbJL5RSI2Alz/rG nr9OasocKvOIWDwUB9RYOs9fT29zShmV6FSclbxwWW4Z62jphzrHlXZhm157ouOqV0Yh fhD9/PQCKkS3N3fjVjmdY2pwcbkc9XTka1jHPMtkHGFyYO0C3aLKFlQZn4trr/qxq7mR dTZyhYYr/ftKN5oEn5z0clnVeKWbz4O+IWDsVWND8mcZD7Ez9u8CvBqxaH3cidFG8rlL VeqnhHKW69BGjq/KsnT2/pGY956sKpqxV1W9t6WyO/CxmHn2C9M9NkKV2k951pw49KGQ AxJQ== X-Forwarded-Encrypted: i=1; AJvYcCUiDae6Bv2PXgLodnfzLcVIKLnQjXZOF/Zf2GGZsCn7knRqunAWI/zHveQVnIv0AJkYVSkvi4ZJNTjhi9ERau0Od3DCIKDOysdnxGaGA200nl5NcqA= X-Gm-Message-State: AOJu0Yz9ygwS7yjqNv/H4LBFF78JFRApOaU5Hp/KMx9a+nGMecWOtSJA jzeMR8jt7nS3PrkTYmGPr8J+qrSW6gmDgvZYTc8DPLb0cXIDOXmPsZUAl+Ilj0M= X-Google-Smtp-Source: AGHT+IF5r2AfR9N1McmRxV5AGkdHrqHz9qxcGz7y9EMh39vMYowFt2/VkhtWhbgWeXKir0ptJdzDsg== X-Received: by 2002:a05:600c:3b11:b0:418:17e9:c23f with SMTP id m17-20020a05600c3b1100b0041817e9c23fmr935432wms.31.1713521361584; Fri, 19 Apr 2024 03:09:21 -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 p13-20020adfe60d000000b00349b73143e7sm4061773wrm.75.2024.04.19.03.09.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 03:09:20 -0700 (PDT) From: Tudor Ambarus To: peter.griffin@linaro.org, krzysztof.kozlowski@linaro.org Cc: s.nawrocki@samsung.com, cw00.choi@samsung.com, alim.akhtar@samsung.com, mturquette@baylibre.com, sboyd@kernel.org, semen.protsenko@linaro.org, andre.draszik@linaro.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, willmcvicker@google.com, kernel-team@android.com, Tudor Ambarus Subject: [PATCH v4 0/2] clk: samsung: introduce nMUX to reparent MUX clocks Date: Fri, 19 Apr 2024 10:09:13 +0000 Message-ID: <20240419100915.2168573-1-tudor.ambarus@linaro.org> X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240419_030928_806036_49D68B4C X-CRM114-Status: GOOD ( 11.84 ) 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 v4: - squash nMUX patch with the PERIC0 patch so that it becomes a single entity fixing the introduction of the PERIC0 clocks. PERIC1 fix comes after, as the PERIC1 clocks were introduced after PERIC0. - fix the fixes tag of the PERIC1 patch. v3: - update first patch: - remove __nMUX() as it duplicated __MUX() with an exception on flags. - update commit message - update comment and say that nMUX() shall be used where MUX reparenting on clock rate chage is allowed - collect R-b, A-b tags 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/ 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/ Tudor Ambarus (2): clk: samsung: gs101: propagate PERIC0 USI SPI clock rate clk: samsung: gs101: propagate PERIC1 USI SPI clock rate drivers/clk/samsung/clk-gs101.c | 225 +++++++++++++++++--------------- drivers/clk/samsung/clk.h | 11 +- 2 files changed, 129 insertions(+), 107 deletions(-)