From patchwork Thu Mar 28 12:34:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13608473 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 2D479C54E64 for ; Thu, 28 Mar 2024 12:35: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: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=kEcl3facin2yH/GWtetX9r2nnBf/ibTipP/q2irNWVw=; b=GkA9fb1wRciTcA +m0zsHm5macoBC+MdJ0YK/B+ZDNQtLInwWtl8IVVuYp8ai/h/WXnWYCrSzP6zVH58HpDjtYIzNREQ 5atbAoc59JpxsB3D19ua27Ld4ipQmzB84C8B3/5ZAJwvLrmZylG6H5u/KvKmONyyeKc67e2saelSs 7zGkidaCakXM8ezPlUc2jEODfLx14BXe8ue4vKoZOkj0EvypNZcxxsjLgAZa4jZcZUCU56h3NZhZg 5f+41Ze3zWSCsSNvrGX7YbVlUCM+8PYTt1PDueyS/fZUKYi+KujA27PVx+o7hvWfRT8aDRzKU7Tfm gyYGpBsNXgKtp4sQb8/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpoy2-0000000DvcX-3EPU; Thu, 28 Mar 2024 12:34:50 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpoxz-0000000DvZx-0gky for linux-arm-kernel@lists.infradead.org; Thu, 28 Mar 2024 12:34:49 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-41545616455so3392015e9.0 for ; Thu, 28 Mar 2024 05:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711629285; x=1712234085; 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=0wFpD+++a2qGN194PQlW/ydpKP0vxDJuH65l8GmtaME=; b=OeIRRBqSsEzPFeIGc3hV0g+AQYVP4jTIMDjr1NiJsNNZ6uXnsB3QfWhqJnNKkpahvo PfhNLTsmIgeIRgSPj5FgIbxotMfLNeIOS6nUEUXaGSdzIEUJfw4h1WsH1n2p6pM/F4p1 xvHl8BsfM3bbaqHJ4wAw1NO/esDTKsxtoo2PnSwyNAG6G1YoR7TxzZ7Q0B5FBP0s88of PZzD0PFZ08/1EshUqZ+8t3dAdOxlrj/P0BU9kWvOkmr5VEq6jdLh08hWka18lH8ST/fa R2/AAPyflHT7MXb7HO+nzfOKbZlWnK9UGsL5NtdUfvt1MSXFFddRJ0XfjlPgTqP1x210 9wlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711629285; x=1712234085; 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=0wFpD+++a2qGN194PQlW/ydpKP0vxDJuH65l8GmtaME=; b=qofe5OI6khz4gjy4xDHVvS93T9M3PIxGVYRi+22+Ss7lb9gMXIY4o80LWdZTk8T02N 5mOo+gD9yJSzCUwBlweQAKSW4Hh5NeJ/P9Gd6kyFbsKq+1t05LaCMXXL6brqkwpD5L0x dY+o7WMh/ss43YBMQEIpKhcrtdv73pvsPs3UcQtrwAlQ9SYSTYrgGqBg4VH3EdpNUraz ICyXlo2xgYiHnv/FugT08bZWFRT6KyO9zx6oRAvzHpuhLWSPRqqsILWwS4+TfEFAn4HG 8RnRExYC+l/uRS+eD8GsMN6byWLXFChsASvdyWhjjz/WbiIuOl6efxUqjjLOH8ZtYh2o yWtw== X-Forwarded-Encrypted: i=1; AJvYcCW5Vyp+mHY29MUUYdZ18ymugzuBp5XoEM6PCBPaiOTpxsj3pFln8j6sS/mywYNaDrLx/11dj3YxzP/EdMBvxyVzhzmOZ3jjmeBZGq2tDcouKcFmlB4= X-Gm-Message-State: AOJu0YzTdRptMZ/nYeQQngwoVvuJ7x/DE5hQcfQEkxc19aVqBLjbLiUq 3VGuMnyoHgiF+ExxNdq2WIxWLD4hBtx36pWeb409NdTa52su9O8dhhKnaULseSg= X-Google-Smtp-Source: AGHT+IGeWvo/4NVkNv2RtRW6WUniovQcsePcpHiG6m59zjQV4C3QR40TEwzrJzXenDVVjdliNkIBvg== X-Received: by 2002:a5d:6448:0:b0:33e:c316:2a51 with SMTP id d8-20020a5d6448000000b0033ec3162a51mr1524284wrw.27.1711629284889; Thu, 28 Mar 2024 05:34:44 -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 u6-20020adfa186000000b00341e2146b53sm1639671wru.106.2024.03.28.05.34.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 05:34:44 -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 v3 0/3] clk: samsung: introduce nMUX to reparent MUX clocks Date: Thu, 28 Mar 2024 12:34:37 +0000 Message-ID: <20240328123440.1387823-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-20240328_053447_234503_143C5A40 X-CRM114-Status: GOOD ( 10.99 ) 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 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 (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 | 11 +- 2 files changed, 129 insertions(+), 107 deletions(-)