Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp529257lqt; Fri, 19 Apr 2024 03:09:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUhF9vfPEyvoK0M7WT3sjQfY+VW7Gz+z/zJ8ktcnMSsvQr8/ixacuM6NvLbkL/ICRek63uNsTnBsC/so0SWgRFbnOhgYVrt46aXeFFUkw== X-Google-Smtp-Source: AGHT+IG1tGiM0u6FiBMOWEtUmpbm3FcAxE+KviHFpnTa7fY/LMytTGFRMJW94x8EWkHpgod9Uun9 X-Received: by 2002:a05:6a21:1690:b0:1ac:5040:2a72 with SMTP id np16-20020a056a21169000b001ac50402a72mr278218pzb.59.1713521372237; Fri, 19 Apr 2024 03:09:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713521372; cv=pass; d=google.com; s=arc-20160816; b=LKUmy/Dueamx3n18Vccv97f3r6DY6EVZGzaSaKsn8NoqvH1Azn8bpY62gMp476arrp +Pe1mwYPqz0rgdHyEo0iEi9Fm1oC3Sw9usBi4/AMb2AcOSHl9345up9lLKfsaob6Wmlr vWojPbL+QZO4fSfrbAoiMAp1LRu+N0tWw9t67t9/wSFb3Pnd7peDpIXWPZYVlt3vLdDF Lcv6vqy+49A/hsPIx6l4lPqfwrIx9HVssu2Ue6eGs11LMMnNkHeHDu+kzX+NTvnZ8F/z WNEPuoRiHuXGx0E/zJfW8aXknjic1clQbXaWWFpxZAR2zB048LeJKk/4zXyrdQQ1IVUd RPTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=3XsfVisx7vvQLrO4aI9sNPKlohq0De0eJkgncDmesfI=; fh=QWQbXyY2SYSxUDXOfZ6zFn8fUEbNuL/a+bvFhdqYNVA=; b=jHtiaIyeRR1pRcIKPMZ2+atazF9lYrWuCzJyDUobggpjMVM7NO/z9XLYn8yA2y8cY5 +pfcW5pNVWcznEmWvGD7omG2BmVKS90xq1i3rHkdof+y8hvG+wAs+X/2r133Z0piaubY 0NNcV2x6S1fyOE2fXpm8PkVln37KBUqe2WjkSiYmA+XO6QXI5MD3AN2pp9y6YW6TZZFh T+8Jf/ZOJUrFh1izVrcQYU05OBEpiGNqIBPXQr779imlZM+mJ9/8FTuMPeR1iUrILbiV 6FnlhZZtCNffWLjyepS3dx8QMBUBGyMz1AJuwBd7dK75SsGgytsn1G9ErdzhVYlXnFRu sB1w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iUQoBSRM; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-151286-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151286-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q4-20020a170902f34400b001e5e62f8ea0si2808298ple.156.2024.04.19.03.09.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 03:09:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151286-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iUQoBSRM; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-151286-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151286-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D57B1284113 for ; Fri, 19 Apr 2024 10:09:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B20F17CF1A; Fri, 19 Apr 2024 10:09:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="iUQoBSRM" Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 469A578276 for ; Fri, 19 Apr 2024 10:09:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713521364; cv=none; b=TQRRianDUzudVxxTUIHgbVfEnjOqJJjbZD6txYXIpmduM0DdDS5rfuUnmx27f/MpViSj90R+jdiBxVkDZj/bikWKKp458VKuVKb6zavh39ncdMOh9nLpWWJDD1pIBAbyOJyHzn+BhhEOja7ew9elQRqmUw2+xx67Y3Im1y3hq1A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713521364; c=relaxed/simple; bh=oo0dGqbZTiSgdkttMffHRviYzeWZlgJGSQoIGvcpLp0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=nqVzjsWtCkjj8vzgvPNyrVhqwyrMhZIJx95HSV5rAim51y5hCNQgMlnXIaNwlIELKdzv/7cxqBtjREbRbR9Z6KVrSMmTaUHWs/nnrgbUUj3EAtJTUw0mXO0vUeO6uRmKx96jjkG8cwpoR4Kud2p7vGcGjEbZrM4yS4zDNwfi3Gs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=iUQoBSRM; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-418dcaa77d5so12852405e9.2 for ; Fri, 19 Apr 2024 03:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713521362; x=1714126162; darn=vger.kernel.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=iUQoBSRMZPSwLn20QrEWlBF0LdRueDoCf89kp54WHuUPa5Ei4YHgEnDHC3jW02546c MuCIWT7aMZNKNVCbjXo5krBRwRDaY8JtsgGTUuZw9W1Kq9U3Qqe3fvEVQumyASopZaiT xkz8od+EAlEvIritcX1QEYSgEgFNRtPHOaCd/6Q3IIXKLYPqSwZUmaL5Cy30cT7F9ihy Nsmc9oa1psXm5021evrSUqzgsGgDBC2SPf0NTNFeNt0rWuNzivCbQtis9fai27KXWbvl +GwPsxVJW9SqEGhJY2UxR5hUm3sqrOwo7DxU96B1uZ4SHD9cmb4VebfzsgWotHyTuWOp fS+g== 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=NmzIP6KcHt7zqMITzwh6GCQs8Gxm1kMXCtVx9g9mP63h5k/Ro5fP1r5A5AojG9qhiv NpPO6QphzMFJ866zQlMgJ47NrTNtp6h79JPcmXMGFffKfaOB7LptaRwlQ9bipDEaZfVG P32sqf+DjP0cVkDgsRPpMHCtp3YI/GI5xsEHsS9XKnLrGWD/s+L7aHiqtl9VY5DFDBGS yzjR3C9HpCA5syGwZeZ+L1iCO5ARz/bji0XS0ogP1SRETZV9n1ryenNjvQqhtQqKw6xH z73Padyt/ek68pG75xnSOMlt95JUdbFx4YF5VwccSWhpWZeRRXNW01DV6mjPQxr7Qsct bANQ== X-Forwarded-Encrypted: i=1; AJvYcCW13oz4DP1hpEluYxXlxHsvrdbbmQLXjCKSdG4uxvh0w14HnWN4v9MXY/qb4zzE6DOuLeoBt7UB0ZsJx7rqso2MEXsR/sWDCGVXI2+5 X-Gm-Message-State: AOJu0YyV0RtsJMMCUUfq5+rhhS1TELIsU26/CrGiYsS0KNQNSnEeZZ3O q6/49oTyQE3CTOmBWjSy2aAteqdyy3epa2aotmut7SAl8mwm0qLA7rPjLY4QtrA= 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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(-) -- 2.44.0.769.g3c40516874-goog