From patchwork Tue Aug 6 12:11:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Virag X-Patchwork-Id: 817622 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (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 028B71C6891; Tue, 6 Aug 2024 12:11:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946293; cv=none; b=Y2SCnU1hDhsVcHXtu78z/swPdOnNiyEuC9xQH4Kmvafy+1uJ9dhloltDRvWj7X65K2s5zxjGH1oNerEOzLOVpC0mg6sfBNL4IQHCGCABuWQdQECFW3FHUS39XXeTN4OMXTGXDm5K/n0J59aQGwmIjupFa6Fg1NvbwHn9AWbFOOE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946293; c=relaxed/simple; bh=7GiRoGmJLDErspUscRFHW3SVsSvcjaniCprxhr2WmLU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SW+ZTLv8IMiZILJzmDZDdDLupdXW11jb8wxnqpiJuOPAA+kalzdPjXRDomSKpAk2Fz9w6dW7pX0yQiD3ONVQH1MAfepf5xz3EJZdxj0CL6UYQYkEfmqgdje1/R921Uvm9TiuGNYvFvd7iIxetXKDqhM9Y/K+If/5EwDhStWZisI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hVKkKDNz; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hVKkKDNz" Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-52efd08e6d9so1028027e87.1; Tue, 06 Aug 2024 05:11:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722946290; x=1723551090; darn=vger.kernel.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=cjHC3HTfFfqBvl70BeunbeIG1gwZ0SxmbRT6QMGAa/Y=; b=hVKkKDNzjV1b4TPsjAd/L/biVpe48GBZ5hKoV+Vl5dE2ktqPGburD/N+arc/8puizO OvUSDP5KXj+roNNwDpDiRtPvZ4yLLZTUy9x+jYM5+MAuuR0v+iuveUi9Q2GtVAuyATGY e9+xjRF7zVn3HJGrnwdtIOlIAJ0qSq4o38VtSOCWLhsNVXhN240Z1Q8VJLcZEpglTb+B uJhBOj3o420SmLnep1bl4kQsmhs5UmchOswj2dhvUy8u4dviYjCGpcKhgCBRXF+mBceG dNaF292i4hdcWIdjtOJaP+eMnydX++ggEU6IqlcpcHa3GOVXUnb+kGoiP7/VukCFFMcD 6V6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722946290; x=1723551090; 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=cjHC3HTfFfqBvl70BeunbeIG1gwZ0SxmbRT6QMGAa/Y=; b=GGMMZKQowCQkeDn2iLaSmCem5CPvspXYTYdyoITENMS0A0uFz+5DoD2Ya6MN7Pq3oX Sqx8xeUGvnCrh/5CX9ttBPcVrx5f5YH3Ouo+Ei0GhfmtXek92DDrJGTnCNcMtM+5i73I yPGtqG9rdLuQpZG3YakpUG9OejtYsvKFgzS7UZFdu+Qrn5A0IbQW1gX0HxBUiakgN5yB Cb0eHBJ7sSvWXCzMNDs304jGMysDOfVh7vbebU/QmCqvyuTfJZsZuAl9D2Y47eTzAIYf IwoLrX7CdHzKevW8AWF3qHSsIY3RPB5CxF3ZpD4wPNEcyurOjTme9LmIE/G+uipq2neV zhAQ== X-Forwarded-Encrypted: i=1; AJvYcCUbWSgjJg5rWPVV62aUkSsvZQrn5dOtDfJ8CUMn12cjch9kWIx2MRJ6FGnEMB++G9b4FJGj8v2S0Tu1TtYRYR9I26EvARBYA82i/R8GmktUH+HXErVr3LJg+/rg/E4S9rly5YbiP+D7acwa61JErNrmODcO+3zVkZkL4mWTwqhMvN1qPl6z3f6XjMoOZLx8Z66OVKbgXKo3slewWxljilWYuQi8B+xP X-Gm-Message-State: AOJu0Yyz5KnN1/0LXk2FiYPehwewNA/PbxCoc/EwymJX8PGKs78OgIxS BpIZfMxojM5TIMMRRj5FFXCxvjvWF8aLdGsoMKny7uP6lNFqXRpL X-Google-Smtp-Source: AGHT+IFlQRuGQP0Gc8zcIPXHKIel/qOkAVK8ZtVTqhuzLGbG3UrBXcw+xuLmF0ETP/3Q62eOPi03PQ== X-Received: by 2002:a05:6512:131e:b0:52c:952a:67da with SMTP id 2adb3069b0e04-530bb4d6d4fmr9824609e87.55.1722946289592; Tue, 06 Aug 2024 05:11:29 -0700 (PDT) Received: from localhost.localdomain ([2a02:ab88:3711:c80:e7a7:e025:f1a5:ef78]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a7dc9ecb546sm542080366b.224.2024.08.06.05.11.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 05:11:29 -0700 (PDT) From: David Virag To: Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Alim Akhtar , Michael Turquette , Stephen Boyd , Rob Herring , Conor Dooley , David Virag Cc: stable@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 1/7] dt-bindings: clock: exynos7885: Fix duplicated binding Date: Tue, 6 Aug 2024 14:11:44 +0200 Message-ID: <20240806121157.479212-2-virag.david003@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240806121157.479212-1-virag.david003@gmail.com> References: <20240806121157.479212-1-virag.david003@gmail.com> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The numbering in Exynos7885's FSYS CMU bindings has 4 duplicated by accident, with the rest of the bindings continuing with 5. Fix this by moving CLK_MOUT_FSYS_USB30DRD_USER to the end as 11. Since CLK_MOUT_FSYS_USB30DRD_USER is not used in any device tree as of now, and there are no other clocks affected (maybe apart from CLK_MOUT_FSYS_MMC_SDIO_USER which the number was shared with, also not used in a device tree), this is the least impactful way to solve this problem. Fixes: cd268e309c29 ("dt-bindings: clock: Add bindings for Exynos7885 CMU_FSYS") Cc: stable@vger.kernel.org Signed-off-by: David Virag --- include/dt-bindings/clock/exynos7885.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dt-bindings/clock/exynos7885.h b/include/dt-bindings/clock/exynos7885.h index 255e3aa94323..54cfccff8508 100644 --- a/include/dt-bindings/clock/exynos7885.h +++ b/include/dt-bindings/clock/exynos7885.h @@ -136,12 +136,12 @@ #define CLK_MOUT_FSYS_MMC_CARD_USER 2 #define CLK_MOUT_FSYS_MMC_EMBD_USER 3 #define CLK_MOUT_FSYS_MMC_SDIO_USER 4 -#define CLK_MOUT_FSYS_USB30DRD_USER 4 #define CLK_GOUT_MMC_CARD_ACLK 5 #define CLK_GOUT_MMC_CARD_SDCLKIN 6 #define CLK_GOUT_MMC_EMBD_ACLK 7 #define CLK_GOUT_MMC_EMBD_SDCLKIN 8 #define CLK_GOUT_MMC_SDIO_ACLK 9 #define CLK_GOUT_MMC_SDIO_SDCLKIN 10 +#define CLK_MOUT_FSYS_USB30DRD_USER 11 #endif /* _DT_BINDINGS_CLOCK_EXYNOS_7885_H */ From patchwork Tue Aug 6 12:11:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Virag X-Patchwork-Id: 817310 Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 55A9D1C689A; Tue, 6 Aug 2024 12:11:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946294; cv=none; b=TakHf3Q6KeRVXRgycLAF0Eu3eLDynikm+t8L8l5F8o65JpQDTQeVhlQUBLj71kJVQxaFtsB4SfHkvVhHHQiqnO1lhN/2iVLAphTZMdsZ593qnSgX05nYMEyl9w25McBEuMnvEEIe2F9kW2GG1RFuADFRsHmAfCOjCulhoIfzipI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946294; c=relaxed/simple; bh=Fyt9dr9fRY9eNM7k6FcruT0K5N4TjeBkONEGv0G4ZxA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=a/VvRwhf+ceyJLmjp/eXQMcKVqeIECmTZgh2KTujsdJfzvaKJOBkoldOksQhrEvGvr42faxe4ZGhGYfW/EHCw4VWNi1VC/HgO/pQc4yGby+bbgsdmHCg7Sso4oEWtAIS+3ZgpuxgnruHjmjtWw2xA66t8VSxnsJdtq8L0GGw0o4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=B1dqi/0p; arc=none smtp.client-ip=209.85.208.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B1dqi/0p" Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-5ab2baf13d9so905850a12.2; Tue, 06 Aug 2024 05:11:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722946292; x=1723551092; darn=vger.kernel.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=z5rhR3+v2dU7aRSLZ6OU5clgVv9vaFNsSw8Xkl+ANI8=; b=B1dqi/0p2gccHb80RRJN6QuHrHmZCi6Ba6xfHnhndg6cqvH0rTTJZtP6ZOWKm+j7a8 uvJNDmy7WOdcUZvkugTl4YxkS0QmeDxEqCEg/Zik/laQTPtvkS/zfBDMnsZP2utZR5zj 2PbbTgXAcxDCa2RT1ou4tu7j6LXQrSaB/mHmKqo9igNFfqDbaf//eopkcwvffbKI32/4 96RQmty/BT4hVl3lRAtvZnko+cBUF8+0SglP9+sibmAY365FvdA//izsUJlm7SLr4CwI Jy+xjYQGhdSOjlenrCv0G6x0RHhtwWh4kIY93n5VkIdQfQnQE1xeN10Oeq0S6TAigJQL RI7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722946292; x=1723551092; 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=z5rhR3+v2dU7aRSLZ6OU5clgVv9vaFNsSw8Xkl+ANI8=; b=DZXXTBq2VVa77PVfeXJxksbCTrUGq8Kd9wUD/o1cKuYyqcURImNvBLoulUO4mhkzgB gaf6XQFQjGYGR1yf+7CJY3q7SgOSK/TdH9JjvtmBkmrvmpoE3VrRtocB/xBHapMEcwAE rojoCUZyC/Osglen+Q5CidMG+RxajITkqNIWPPwQbrBbd5YZLM4+0cWoMlLWCha755FX XPChTzLtoVuNbCIT3bqgduwWQMa8K7obyfUmiq77osduoJ6aXHp24APJRDEqRL+W13HD kqxt02UOMYU/woy7cZalBjLiVMj+FD3o9pRr00gVhNXkzGzyMIkKdIY5fW/b+FZV1YkG KRGw== X-Forwarded-Encrypted: i=1; AJvYcCWxJO8UG/zEbDsITAjIICmJ9vd53QnvT+1HLW7mh+UZpwgBfFkdsAO7D5iG/w03i/xeXjfGeGwTLP0TKRGJ3RYsOHeRJH+9TSn4IMD/Z1S8I6MjFaZ5SgeX5G4NMk9uV2ubdezS74aOSNbbvSH4JCwm29gMIDHlu00fmED4tMYBB7KxWg== X-Gm-Message-State: AOJu0Yxct6MeQCAnmfn/BdPwF8++sAuiMuz6taAEL6tQi+6GP9UsY0Xm IG8RKKjs6ul2WyJDUb/Xh0ziWvZDEsDn/l+/AIpZYUTdVd9tREnZ X-Google-Smtp-Source: AGHT+IHKiycZQWM8ry1aTxUrTYWujyde4/+GTPOkVnlyiUSddAcd1+nGafJEZOsseae/vrcwtntN2A== X-Received: by 2002:a17:907:7d9e:b0:a72:40b4:c845 with SMTP id a640c23a62f3a-a7dc50a2e3cmr1068710766b.51.1722946291346; Tue, 06 Aug 2024 05:11:31 -0700 (PDT) Received: from localhost.localdomain ([2a02:ab88:3711:c80:e7a7:e025:f1a5:ef78]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a7dc9ecb546sm542080366b.224.2024.08.06.05.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 05:11:31 -0700 (PDT) From: David Virag To: Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Alim Akhtar , Michael Turquette , Stephen Boyd , Rob Herring , Conor Dooley , David Virag Cc: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 2/7] dt-bindings: clock: exynos7885: Add CMU_TOP PLL MUX indices Date: Tue, 6 Aug 2024 14:11:45 +0200 Message-ID: <20240806121157.479212-3-virag.david003@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240806121157.479212-1-virag.david003@gmail.com> References: <20240806121157.479212-1-virag.david003@gmail.com> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add indices for missing MUX clocks from PLLs in CMU_TOP. Signed-off-by: David Virag --- include/dt-bindings/clock/exynos7885.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dt-bindings/clock/exynos7885.h b/include/dt-bindings/clock/exynos7885.h index 54cfccff8508..4ce86810b10d 100644 --- a/include/dt-bindings/clock/exynos7885.h +++ b/include/dt-bindings/clock/exynos7885.h @@ -69,6 +69,8 @@ #define CLK_GOUT_FSYS_MMC_EMBD 58 #define CLK_GOUT_FSYS_MMC_SDIO 59 #define CLK_GOUT_FSYS_USB30DRD 60 +#define CLK_MOUT_SHARED0_PLL 61 +#define CLK_MOUT_SHARED1_PLL 62 /* CMU_CORE */ #define CLK_MOUT_CORE_BUS_USER 1 From patchwork Tue Aug 6 12:11:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Virag X-Patchwork-Id: 817621 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (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 088FC1C7B65; Tue, 6 Aug 2024 12:11:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946296; cv=none; b=Yy6HkII3LmgZenYK0bHEUbg2sCMGih93WY8hs0tjERFUeYy4A/ch77Y78KuAtLatSPGl8k+mAnwRydKul4FuK/MVl8UwMEbTKGZGqZaIU6doQpzo1U9jExipAaTSJ/s+fMgl+1lgb++oQk6FjeL6Ne7uVrfltyxzTTa6C5jbNHg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946296; c=relaxed/simple; bh=N3zVM9WjxApsrr59Be3h9gRQpWe/tK+ERo+/QuIitcg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Helcfzn9Ji2Xba4WtRVdubOmwAhyzRq9ehmSXZbrjYuXc6VFfy2AtSy62KZNT0FpS3FIcsPmaHRPukSxvC7N5sh7MDtn583EcZk4d5WWDFdLIMAYEANOvTJAwPXqVaLENsNOCL/WjlcmpaOmKl+VdTSNLlTWFuSqHQ9pApzfAhM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RBS1vHJY; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RBS1vHJY" Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5a1c49632deso670717a12.2; Tue, 06 Aug 2024 05:11:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722946293; x=1723551093; darn=vger.kernel.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=BnqKBVLkVbPU4IXqUitU7Vb8AZX6hoKEj/nS2/Cpby8=; b=RBS1vHJYCKuhJNhRC06DYHSbLz48s2D+ws86nS38IePW8B+4WoVjT39NkEd32yxMXW tiuthv5kfZp2CaHzU4A9trvyC9MesmseteIcbtRLtaqu+I5EeR2sF3x1br7Eaw2is9AM vmBTeZ0HCRGnpz0xE3JkJxaUTWo0uo1jqzxeXkCOGVHy6knpzRd6KoP1e/bzJuTTqP26 6ADwXiwYCkuEjZkqJe1w9YgpqDDTZlz1yJ/mZ3qqMudqEIBI2U7N+E3AFulVDNiVTtH/ tMA/Fccyi23w8T+Pm34kHWSTd2DE6GbLlnEysFCdbFyFGNeCTNXOECEuBC16Bn5wTUWt TivA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722946293; x=1723551093; 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=BnqKBVLkVbPU4IXqUitU7Vb8AZX6hoKEj/nS2/Cpby8=; b=djeAfLzdPxy0cDps2ODVmLrcGXef81GH3m8J1qow+xud5LNJXPAuB7AASh8CKQo7oZ Nt6GbCcknFlb01qNCyk75B3gntXG49juvxHprVFrN4TpgwNkDv3yrUDqAYC2WYhrO52D JYwmUb4KdcVbxXwyHd/UGgW/ayRRtTGb3w6SQrBSEJc8/nBMQymDabym/fLI1zUY7AzB RtjfIAvB7+bvIHX/AnMpreS+yJWJz7M9f59ovQb/lj+9y4Evy9UDfz61kcAf91alWZBr MNkgXquzbmxt4Y2HapD7e3NnCS+Qy+T93OaMsRqjd0IuxH4XIK5THmCu/I+baedfYKN6 XcnQ== X-Forwarded-Encrypted: i=1; AJvYcCVWqVLafDbeZLmB9AJjf2oJhYS8zQxMMePXheJTK/IeaeQ8LMJXerPm68VonjEMKkM14GqHoBiaTps0p2Ok70CHp0TURnYP7WLwaE+FxSRkTUEyJ3uVO8540QSbVa9FiPGst88oAu2+CR3MLjiG5891FIxEjdsGb4/i2/YiQpyBW1fi8g== X-Gm-Message-State: AOJu0YzWiTJzReYJ5xr/HLlC1FjCSyB81I7/vOogVGkEm7eLhAy9iDzu BJDdAuEmws1pbmJkKS6eMFT7WAKql4s68S0EGpO+aBgAiJ92WfI/5miTVVnm X-Google-Smtp-Source: AGHT+IER7UQAupfaALkh21KXTUHksXS5mAGOEgSKzg1JMEgFGXs1o1YHpIeUETH6wcVoq+6kQFDQIQ== X-Received: by 2002:a17:907:2d89:b0:a7d:c9fa:e3b3 with SMTP id a640c23a62f3a-a7dc9faeb5fmr1086181066b.54.1722946293025; Tue, 06 Aug 2024 05:11:33 -0700 (PDT) Received: from localhost.localdomain ([2a02:ab88:3711:c80:e7a7:e025:f1a5:ef78]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a7dc9ecb546sm542080366b.224.2024.08.06.05.11.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 05:11:32 -0700 (PDT) From: David Virag To: Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Alim Akhtar , Michael Turquette , Stephen Boyd , Rob Herring , Conor Dooley , David Virag Cc: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 3/7] dt-bindings: clock: exynos7885: Add indices for USB clocks Date: Tue, 6 Aug 2024 14:11:46 +0200 Message-ID: <20240806121157.479212-4-virag.david003@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240806121157.479212-1-virag.david003@gmail.com> References: <20240806121157.479212-1-virag.david003@gmail.com> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Exynos7885 SoC has a DWC3 USB Controller with Exynos USB PHY which in theory supports USB3 SuperSpeed, but is only used as USB2 in all known devices. These, of course, need some clocks. Add indices for these clocks. Signed-off-by: David Virag --- include/dt-bindings/clock/exynos7885.h | 30 ++++++++++++++++---------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/include/dt-bindings/clock/exynos7885.h b/include/dt-bindings/clock/exynos7885.h index 4ce86810b10d..cfede84b46b9 100644 --- a/include/dt-bindings/clock/exynos7885.h +++ b/include/dt-bindings/clock/exynos7885.h @@ -134,16 +134,24 @@ #define CLK_GOUT_WDT1_PCLK 43 /* CMU_FSYS */ -#define CLK_MOUT_FSYS_BUS_USER 1 -#define CLK_MOUT_FSYS_MMC_CARD_USER 2 -#define CLK_MOUT_FSYS_MMC_EMBD_USER 3 -#define CLK_MOUT_FSYS_MMC_SDIO_USER 4 -#define CLK_GOUT_MMC_CARD_ACLK 5 -#define CLK_GOUT_MMC_CARD_SDCLKIN 6 -#define CLK_GOUT_MMC_EMBD_ACLK 7 -#define CLK_GOUT_MMC_EMBD_SDCLKIN 8 -#define CLK_GOUT_MMC_SDIO_ACLK 9 -#define CLK_GOUT_MMC_SDIO_SDCLKIN 10 -#define CLK_MOUT_FSYS_USB30DRD_USER 11 +#define CLK_MOUT_FSYS_BUS_USER 1 +#define CLK_MOUT_FSYS_MMC_CARD_USER 2 +#define CLK_MOUT_FSYS_MMC_EMBD_USER 3 +#define CLK_MOUT_FSYS_MMC_SDIO_USER 4 +#define CLK_GOUT_MMC_CARD_ACLK 5 +#define CLK_GOUT_MMC_CARD_SDCLKIN 6 +#define CLK_GOUT_MMC_EMBD_ACLK 7 +#define CLK_GOUT_MMC_EMBD_SDCLKIN 8 +#define CLK_GOUT_MMC_SDIO_ACLK 9 +#define CLK_GOUT_MMC_SDIO_SDCLKIN 10 +#define CLK_MOUT_FSYS_USB30DRD_USER 11 +#define CLK_MOUT_USB_PLL 12 +#define CLK_FOUT_USB_PLL 13 +#define CLK_FSYS_USB20PHY_CLKCORE 14 +#define CLK_FSYS_USB30DRD_ACLK_20PHYCTRL 15 +#define CLK_FSYS_USB30DRD_ACLK_30PHYCTRL_0 16 +#define CLK_FSYS_USB30DRD_ACLK_30PHYCTRL_1 17 +#define CLK_FSYS_USB30DRD_BUS_CLK_EARLY 18 +#define CLK_FSYS_USB30DRD_REF_CLK 19 #endif /* _DT_BINDINGS_CLOCK_EXYNOS_7885_H */ From patchwork Tue Aug 6 12:11:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Virag X-Patchwork-Id: 817309 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (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 A09801C7B85; Tue, 6 Aug 2024 12:11:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946298; cv=none; b=vGrzvvXv+ipif//VCVZ53zPpWfg+SvmMv4vV+8At1BPvuTFORyurNv6HbqyCpqBj3y6PusAXO1Qjc+Yjed3P9357UeRn0ICrpr7UrZh8BhmB0+RjJGvp9DrimY3P/1tz6XDy/QkmBPiNuoxMv85F2bZsFswc5vkvu4pc+fC2mMQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946298; c=relaxed/simple; bh=yZCPxec+Nt05+vFpfuZAEIwPsSYT72gElqKmIsVcVcs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hoeNv0qBGvo2/v7BhOVZo+87nAdfdbzB/BVBldS0kGdLW7lZYnQxY0Z2hhE5+JoTVKCU6E7XgLDgdlz/tpibGXNd10V7zZTSI1JFvus6GuDfMZrtR9ddiq40Q+9oqhCIaeRQD0BrEV/U+wGY90WyKIzDBpT98Hza0yTtysWOD2w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=T1tJDbWH; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="T1tJDbWH" Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a7d89bb07e7so62099566b.3; Tue, 06 Aug 2024 05:11:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722946295; x=1723551095; darn=vger.kernel.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=F0aRz/NvzMoGMcs/X68qWsjTCXJVKjTHjK/Kr5hohQg=; b=T1tJDbWHdi2cFDidBSlo6wc+Pln3/aWY51Um+tAzq7GRDzfB5Ze5hVk3p0vPq27Mo7 TtpC9gJXx8qRCUzvBcf2I+DN3TwGS2wSHlBddUpgoyFlTTRJQ3wk/FGtFwYJ2qKzYOzY ngh+2G3SwBOjwsBHK1v4S/tEnooQOZyzAQIIv5dMfY0nao7y1+h+0U+IdzaG9pBsEq7U 1+oFp8nTUSSBSwIdgOd6XyRiQYTxjnKxvCGT7+qapB7QJubxFIMEX6PIJdXMkO1EbhyQ GdMW3q+cP37deDDGbqcB46NlmWaVdAyocJ4xW98cuLMoopLCOqHfh79lDXYU2XTgzDSm PnOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722946295; x=1723551095; 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=F0aRz/NvzMoGMcs/X68qWsjTCXJVKjTHjK/Kr5hohQg=; b=Rem72XxpD6J2U3F/MMzLwnurpNfrQQeancxd4pOxscFN/r8xz51DLLhnUQL71zg4l8 IuhU1N82OVExKNPUDKSRpsp9EVvcdWpVUUzsuIYJLAyGAYptqbnb0sEaS6iIwZ4o0U1I 0HhMUKcvWX6u+ASYa7k4F5Xact5SKDcgW9eR8rnWSzleM1HPpOEuVBCwPhOraXbObyJP mC7Qg/EUDl8f7K7eNpm4fU/H2fvBy5sMaEZCuIimqGKgH5BVeC+U4HG/B5Qt/tefPZmZ RZdTuXrm+o4WquUdbHJFp/iCecB89FP9wbpO1IhyT6nAROr5C+7W11wvnRkGiICD/F9s Y7BA== X-Forwarded-Encrypted: i=1; AJvYcCVpHA/x4gOIm1MQ0OrvsXXzQjZe6A//gSVmHZFXuqhGeErMbuMLulP+obTNp94+DhQDbKkOlV1VeFtOjWUcBnpFNmW9YNE/zhXtI5hrwnON7nSdVMWzA78ol6znFRjr85UrmjQYWSLjHisw1dVK9VUxTm2YLbY46eVlWJ7Nvn4KHD/4gSBJvmE8jofYLSUugrm2hWcVaW1NGwNj3IOZzwpP/DPruc2Z X-Gm-Message-State: AOJu0Yx6H/tsBIUrJ7BB8MfxrYbJbfvv2See7aTLv9Jm15oNLaTuq8tq Tgn8qL8277OhSc4Pwh9ZidBxf0IWULAWLxcE2lZM/M1Ru1tWXTVT X-Google-Smtp-Source: AGHT+IE1jURrKaQSilbk7NTpniLbZ+h6z1PD5RRA56U41hrhim0QfQbdfC/eEjpHZUkMW++bMWlMXA== X-Received: by 2002:a17:907:a01:b0:a7a:b73f:7583 with SMTP id a640c23a62f3a-a7dc4da5044mr1158998766b.6.1722946294708; Tue, 06 Aug 2024 05:11:34 -0700 (PDT) Received: from localhost.localdomain ([2a02:ab88:3711:c80:e7a7:e025:f1a5:ef78]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a7dc9ecb546sm542080366b.224.2024.08.06.05.11.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 05:11:34 -0700 (PDT) From: David Virag To: Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Alim Akhtar , Michael Turquette , Stephen Boyd , Rob Herring , Conor Dooley , David Virag Cc: stable@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 4/7] clk: samsung: exynos7885: Update CLKS_NR_FSYS after bindings fix Date: Tue, 6 Aug 2024 14:11:47 +0200 Message-ID: <20240806121157.479212-5-virag.david003@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240806121157.479212-1-virag.david003@gmail.com> References: <20240806121157.479212-1-virag.david003@gmail.com> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Update CLKS_NR_FSYS to the proper value after a fix in DT bindings. This should always be the last clock in a CMU + 1. Fixes: cd268e309c29 ("dt-bindings: clock: Add bindings for Exynos7885 CMU_FSYS") Cc: stable@vger.kernel.org Signed-off-by: David Virag --- drivers/clk/samsung/clk-exynos7885.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/samsung/clk-exynos7885.c b/drivers/clk/samsung/clk-exynos7885.c index f7d7427a558b..87387d4cbf48 100644 --- a/drivers/clk/samsung/clk-exynos7885.c +++ b/drivers/clk/samsung/clk-exynos7885.c @@ -20,7 +20,7 @@ #define CLKS_NR_TOP (CLK_GOUT_FSYS_USB30DRD + 1) #define CLKS_NR_CORE (CLK_GOUT_TREX_P_CORE_PCLK_P_CORE + 1) #define CLKS_NR_PERI (CLK_GOUT_WDT1_PCLK + 1) -#define CLKS_NR_FSYS (CLK_GOUT_MMC_SDIO_SDCLKIN + 1) +#define CLKS_NR_FSYS (CLK_MOUT_FSYS_USB30DRD_USER + 1) /* ---- CMU_TOP ------------------------------------------------------------- */ From patchwork Tue Aug 6 12:11:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Virag X-Patchwork-Id: 817620 Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (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 7E6881C8239; Tue, 6 Aug 2024 12:11:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946300; cv=none; b=HI/RZK0hEIFjLiPZbGuOQT+dz/e8hR4/ZckQfbonRxF/tIaSGS5fu5d2HHVaYkKECOGoJ9XBnJGoVAmIXa+s/CnxkGGSqpGgyJnLgmjBYKHlHLhJbWbQjTAXtJAnyvq/ZJgh7gK8h881tgl+9fEmw+kgSPoO+GAdIgtDYNJ5SNs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946300; c=relaxed/simple; bh=R/zw8++6HAxfElOjT2EQc7bEpx1XnGqUafF3RUDJMjA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K8XB5ioqww8ey3Os96GQyTiuBszlWHbQtLvAyynoEbXNEEqNG1U5JmsDEl1KSSzn2wQU45OJUeb4zeEWvCPHDyFYjq14+I9KLGxYB07znMVNzQVCeccfyWd3Ks8z1NoH17q2Fsw2K7puAGnz6I37HoOoV0wyYfaGkJ1hpmFukhc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TOybDVtq; arc=none smtp.client-ip=209.85.218.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TOybDVtq" Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-a7a83a968ddso64218766b.0; Tue, 06 Aug 2024 05:11:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722946297; x=1723551097; darn=vger.kernel.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=PylIu4FUXlrxZkJ16yikQYZXRyjRIiQcGN1Zbu3DKVI=; b=TOybDVtqweyubgtuugbYjTjul2q7Nd7pDpjQ5qLSPMT75El1LA5Yi+bDX2G3t5t/Tg mabs9MqLS9Ne6UA+1c0V51UU1fQ10sUi7Vhqub5gdOpebunprvSKhee31BZ4o/lF4ljj 1JPVl7097A729GcaT5lMWVXIk81zbjxbB5mv0mWRE7ZZk4eVBCdCgkntD2SxD2eMtLKK d8Y2t/a3cM1YKglMMKsiyGXO16W3egFzk2o3MGeVBXFkeG2owEBroyQViusQlwiQgqZR SumSBQQQKMZxwSuxLuGiE3Jsg0rSfitacSvWxgcvzkWUfkoHtwgEDiV5rcviGA5nM5HH kfUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722946297; x=1723551097; 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=PylIu4FUXlrxZkJ16yikQYZXRyjRIiQcGN1Zbu3DKVI=; b=ZiquV4KxkrzZrP5L3Wl6Co5h8athU5WjWe8uuXCeL2/WE6QVef//kcAfdnv3ZPIWdk r5O9X4Db8DxBU0RcVBDvINnUnOIMvK/K0STaManq29BrPiZwnHLWHoLjztK9xfaRyHCx 2gZ2hdHIxx152SsonWmA/CjDwPTK7DPKzxnd27PfwI29T+Q+G6YwkEtP85uOZSDq8dun 0iVnIcc9+9Eyr0efUmlcU5brboi51U2AJO+A0Rfb64kjAVzFYjdaK03Snf8ZFwmozHny rRPdKnW6FrcEsL1NxY3dG/57XLdWlRqMZacQLDUtO1F8ZEkY4R2z3Be2tY6cpG8PTwWI Ic2g== X-Forwarded-Encrypted: i=1; AJvYcCVLdfhudFYYZYpNruLKCKzmo9s+JKyOZawPDSuNThD+63DYXUNMcBmG6ddtmOIorBtdUuWy1qmnB7CN+Wpisvdb46B9q/V8RQPzEMfPPEhIVbGS3qIgxm8mIsb7vEipxjYVCZzLwKQ1ylJthZC+HeyTVG6jjK87r9zddv0i6hbuq71nFQ== X-Gm-Message-State: AOJu0YymHV7iixM+e5md7F2JGwelTEcMs3YIbHn6WUUzeo9D9mCJlyKo 5QluhCCPnHt2YZOPhG9+pME2Jj1Sgw7xqa1ByLjlsyVeF55CK+r8aKgXr4ym X-Google-Smtp-Source: AGHT+IG1u1GKra0yi/oRrIoZboHwG2H7ZvyJfzmU7HoQSiwDFX3wOaGLGHUiaI7hygwPilafQet2MQ== X-Received: by 2002:a17:907:1ca2:b0:a7a:bd5a:1eb7 with SMTP id a640c23a62f3a-a7dc5105635mr1048504866b.59.1722946296637; Tue, 06 Aug 2024 05:11:36 -0700 (PDT) Received: from localhost.localdomain ([2a02:ab88:3711:c80:e7a7:e025:f1a5:ef78]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a7dc9ecb546sm542080366b.224.2024.08.06.05.11.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 05:11:36 -0700 (PDT) From: David Virag To: Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Alim Akhtar , Michael Turquette , Stephen Boyd , Rob Herring , Conor Dooley , David Virag Cc: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 5/7] clk: samsung: exynos7885: Add missing MUX clocks from PLLs in CMU_TOP Date: Tue, 6 Aug 2024 14:11:48 +0200 Message-ID: <20240806121157.479212-6-virag.david003@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240806121157.479212-1-virag.david003@gmail.com> References: <20240806121157.479212-1-virag.david003@gmail.com> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In Exynos7885 (and seemingly all modern Exynos SoCs) all PLLs have a MUX attached to them controlled by bit 4 in the PLL's CON0 register. These MUXes can select between OSCCLK or the PLL's output, essentially making the PLL bypassable. These weren't modeled in the driver because the vendor provided drivers didn't model it properly, instead setting them when updating the PMS values. Not having them modeled didn't cause any problems in this case, since these MUXes were set to the PLL's output by default, but this is not the case everywhere in this SoC. Signed-off-by: David Virag --- drivers/clk/samsung/clk-exynos7885.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos7885.c b/drivers/clk/samsung/clk-exynos7885.c index 87387d4cbf48..a0c9b7cc6942 100644 --- a/drivers/clk/samsung/clk-exynos7885.c +++ b/drivers/clk/samsung/clk-exynos7885.c @@ -17,7 +17,7 @@ #include "clk-exynos-arm64.h" /* NOTE: Must be equal to the last clock ID increased by one */ -#define CLKS_NR_TOP (CLK_GOUT_FSYS_USB30DRD + 1) +#define CLKS_NR_TOP (CLK_MOUT_SHARED1_PLL + 1) #define CLKS_NR_CORE (CLK_GOUT_TREX_P_CORE_PCLK_P_CORE + 1) #define CLKS_NR_PERI (CLK_GOUT_WDT1_PCLK + 1) #define CLKS_NR_FSYS (CLK_MOUT_FSYS_USB30DRD_USER + 1) @@ -162,6 +162,10 @@ static const struct samsung_pll_clock top_pll_clks[] __initconst = { NULL), }; +/* List of parent clocks for Muxes in CMU_TOP */ +PNAME(mout_shared0_pll_p) = { "oscclk", "fout_shared0_pll" }; +PNAME(mout_shared1_pll_p) = { "oscclk", "fout_shared1_pll" }; + /* List of parent clocks for Muxes in CMU_TOP: for CMU_CORE */ PNAME(mout_core_bus_p) = { "dout_shared0_div2", "dout_shared1_div2", "dout_shared0_div3", "dout_shared0_div3" }; @@ -189,6 +193,12 @@ PNAME(mout_fsys_mmc_sdio_p) = { "dout_shared0_div2", "dout_shared1_div2" }; PNAME(mout_fsys_usb30drd_p) = { "dout_shared0_div4", "dout_shared1_div4" }; static const struct samsung_mux_clock top_mux_clks[] __initconst = { + /* TOP */ + MUX(CLK_MOUT_SHARED0_PLL, "mout_shared0_pll", mout_shared0_pll_p, + PLL_CON0_PLL_SHARED0, 4, 1), + MUX(CLK_MOUT_SHARED1_PLL, "mout_shared1_pll", mout_shared1_pll_p, + PLL_CON0_PLL_SHARED1, 4, 1), + /* CORE */ MUX(CLK_MOUT_CORE_BUS, "mout_core_bus", mout_core_bus_p, CLK_CON_MUX_MUX_CLKCMU_CORE_BUS, 0, 2), @@ -232,17 +242,17 @@ static const struct samsung_mux_clock top_mux_clks[] __initconst = { static const struct samsung_div_clock top_div_clks[] __initconst = { /* TOP */ - DIV(CLK_DOUT_SHARED0_DIV2, "dout_shared0_div2", "fout_shared0_pll", + DIV(CLK_DOUT_SHARED0_DIV2, "dout_shared0_div2", "mout_shared0_pll", CLK_CON_DIV_PLL_SHARED0_DIV2, 0, 1), - DIV(CLK_DOUT_SHARED0_DIV3, "dout_shared0_div3", "fout_shared0_pll", + DIV(CLK_DOUT_SHARED0_DIV3, "dout_shared0_div3", "mout_shared0_pll", CLK_CON_DIV_PLL_SHARED0_DIV3, 0, 2), DIV(CLK_DOUT_SHARED0_DIV4, "dout_shared0_div4", "dout_shared0_div2", CLK_CON_DIV_PLL_SHARED0_DIV4, 0, 1), - DIV(CLK_DOUT_SHARED0_DIV5, "dout_shared0_div5", "fout_shared0_pll", + DIV(CLK_DOUT_SHARED0_DIV5, "dout_shared0_div5", "mout_shared0_pll", CLK_CON_DIV_PLL_SHARED0_DIV5, 0, 3), - DIV(CLK_DOUT_SHARED1_DIV2, "dout_shared1_div2", "fout_shared1_pll", + DIV(CLK_DOUT_SHARED1_DIV2, "dout_shared1_div2", "mout_shared1_pll", CLK_CON_DIV_PLL_SHARED1_DIV2, 0, 1), - DIV(CLK_DOUT_SHARED1_DIV3, "dout_shared1_div3", "fout_shared1_pll", + DIV(CLK_DOUT_SHARED1_DIV3, "dout_shared1_div3", "mout_shared1_pll", CLK_CON_DIV_PLL_SHARED1_DIV3, 0, 2), DIV(CLK_DOUT_SHARED1_DIV4, "dout_shared1_div4", "dout_shared1_div2", CLK_CON_DIV_PLL_SHARED1_DIV4, 0, 1), From patchwork Tue Aug 6 12:11:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Virag X-Patchwork-Id: 817308 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (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 89C3F1C8FA2; Tue, 6 Aug 2024 12:11:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946302; cv=none; b=IRgYBxTLhv7tgqhtEwekDxqzwgEOGgcgfe95fALE/Dx/hKOo8lznXMh2o7M6czAskCMFXyZO8q29askyt9vXekcR1U2P2BcN+sQzIBl0u8AxJIXmzIMqZOn8xPz6EaE9gzd64c6PHg+ldGSQyZrSC8vY6xXe6EvqVdENSibC8xU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946302; c=relaxed/simple; bh=a95p3S76YVtmYSCOzH9vh95f+kAzImk/8n+LYiGjPCI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AS8CAcVmkfARXWRtRSwSBv1O5oe8aHKZ/3KMIYuCGVekC11vBMy0JZxUmvK8s/5N6Rgan8K9KM7G0vjDGeGAg5DpAH1M07DpZ3xNdO7/Cn0qIxXGsOo3iBEjhBLlEXE9rIM1KOjXMvS7vFcygW7CB8Xh/1dtiSV3sFKQ29fzlNI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Faj61QOI; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Faj61QOI" Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5b391c8abd7so593868a12.2; Tue, 06 Aug 2024 05:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722946299; x=1723551099; darn=vger.kernel.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=/Kr9OUWJu3zpHtEvcQkSwe6meHxvcJJnyUk+tmEInzk=; b=Faj61QOIbCuHg5pSPVK50/UP2M6iSanY9Tc9BsAVUgkCgQA7jsbYIgnleKy3P/Nsle eRMBkym7GXHdtXyqfMdWpmujHAPq3S030GILFxohx5SqFJ5uL0KbDEvNVpK6PZmZe/JA itgdwaKDPbC3yopu+5kCAFBleEZUJx1JTCT5hU1PEoXmfd2c0BvkUb1304bcFiqYQZ/q fyX9FxjfxIVGQU2vN3Zmb1xkUpS9KakcEAh32TbMLPz9IKPQDYZXC5EPX1bES6YVqjMq JT806o1j7tqyETTWF+ZDmBCL0mvDnplr7JFhAie7jcYldgv4OVgSTEH/B0oJHVTfqxJV NIoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722946299; x=1723551099; 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=/Kr9OUWJu3zpHtEvcQkSwe6meHxvcJJnyUk+tmEInzk=; b=hS7hRNNOK4VnNoPNiThtjJAB3tVq75TsHTrZEnOPklbGpcit/APt7xjwnlvF240NsW uAB3Rzobg9EWnNFFNJc5x05P9c4j5C/wSTAmIqSTH45aqrM0EKpiNr6kYe71Kjj+PL9i z+Eygqpo9KYRBsjRHTM+WddGNcK9Rv0xd/4pXJPHSNS9C1XSbBsqFY9MNm8im27aMETw HiIFu7VH3vF3yFVqlDJiPqvuX7dHJLrDChpfL+QgrsgjUSFhwIfMKHxcnFnrHT6EQPUm PIVSUiMMC3iTrWsKntzqRY1rZIztiLai+i3CytuYCQpy+zu5NRR5AMtdsjezPNPBSfSX FaQw== X-Forwarded-Encrypted: i=1; AJvYcCXc494FTheGft9Tkf6Zm7tU/o+OviFx7RYg6bifwaMBivGIlPmshB7SR6iM3/qnRn8/+31iRgU8K9QkWa0psmxJo32kImaH7Ht4miitShargnC7eCnHXyqrsbtcc4ZDXjzqeuR4IFzHUgc71gN+nBd8oti1onnosV/ORuOFZSZI6wluTA== X-Gm-Message-State: AOJu0Yyu/EAuMzn977EZkmmXtge3qgbwqBASnU2BgjoPhcNWuT9SA9T6 k6zNzHmvpfATmXmAwE/nKdZ8fY2zaEqP4mRI4AbGF6y30226hTsC X-Google-Smtp-Source: AGHT+IGA2ucJtDCPuKp3eCGFeHqBMSbY7zae2XhclUVfrwb6RcTfkCOleZ56MBKoDhIw0mDUOgcL/Q== X-Received: by 2002:a17:906:4789:b0:a7a:9447:3e91 with SMTP id a640c23a62f3a-a7dc4e9b1c4mr1065307866b.39.1722946298451; Tue, 06 Aug 2024 05:11:38 -0700 (PDT) Received: from localhost.localdomain ([2a02:ab88:3711:c80:e7a7:e025:f1a5:ef78]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a7dc9ecb546sm542080366b.224.2024.08.06.05.11.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 05:11:38 -0700 (PDT) From: David Virag To: Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Alim Akhtar , Michael Turquette , Stephen Boyd , Rob Herring , Conor Dooley , David Virag Cc: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 6/7] clk: samsung: clk-pll: Add support for pll_1418x Date: Tue, 6 Aug 2024 14:11:49 +0200 Message-ID: <20240806121157.479212-7-virag.david003@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240806121157.479212-1-virag.david003@gmail.com> References: <20240806121157.479212-1-virag.david003@gmail.com> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 pll1418x is used in Exynos7885 SoC for USB PHY clock. Operation-wise it is very similar to pll0822x, except that MDIV is only 9 bits wide instead of 10, and we use the CON1 register in the PLL macro's "con" parameter instead of CON3 like this: PLL(pll_1418x, CLK_FOUT_USB_PLL, "fout_usb_pll", "oscclk", PLL_LOCKTIME_PLL_USB, PLL_CON0_PLL_USB, pll_usb_rate_table), Technically the PLL should work fine with pll0822x code if the PLL tables are correct, but it's more "correct" to actually update the mask. Signed-off-by: David Virag --- drivers/clk/samsung/clk-pll.c | 20 ++++++++++++++++---- drivers/clk/samsung/clk-pll.h | 1 + 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c index 4be879ab917e..c61a2810737c 100644 --- a/drivers/clk/samsung/clk-pll.c +++ b/drivers/clk/samsung/clk-pll.c @@ -430,6 +430,9 @@ static const struct clk_ops samsung_pll36xx_clk_min_ops = { #define PLL0822X_LOCK_STAT_SHIFT (29) #define PLL0822X_ENABLE_SHIFT (31) +/* PLL1418x is similar to PLL0822x, except that MDIV is one bit smaller */ +#define PLL1418X_MDIV_MASK (0x1FF) + static unsigned long samsung_pll0822x_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) { @@ -438,7 +441,10 @@ static unsigned long samsung_pll0822x_recalc_rate(struct clk_hw *hw, u64 fvco = parent_rate; pll_con3 = readl_relaxed(pll->con_reg); - mdiv = (pll_con3 >> PLL0822X_MDIV_SHIFT) & PLL0822X_MDIV_MASK; + if (pll->type != pll_1418x) + mdiv = (pll_con3 >> PLL0822X_MDIV_SHIFT) & PLL0822X_MDIV_MASK; + else + mdiv = (pll_con3 >> PLL0822X_MDIV_SHIFT) & PLL1418X_MDIV_MASK; pdiv = (pll_con3 >> PLL0822X_PDIV_SHIFT) & PLL0822X_PDIV_MASK; sdiv = (pll_con3 >> PLL0822X_SDIV_SHIFT) & PLL0822X_SDIV_MASK; @@ -468,9 +474,14 @@ static int samsung_pll0822x_set_rate(struct clk_hw *hw, unsigned long drate, /* Change PLL PMS values */ pll_con3 = readl_relaxed(pll->con_reg); - pll_con3 &= ~((PLL0822X_MDIV_MASK << PLL0822X_MDIV_SHIFT) | - (PLL0822X_PDIV_MASK << PLL0822X_PDIV_SHIFT) | - (PLL0822X_SDIV_MASK << PLL0822X_SDIV_SHIFT)); + if (pll->type != pll_1418x) + pll_con3 &= ~((PLL0822X_MDIV_MASK << PLL0822X_MDIV_SHIFT) | + (PLL0822X_PDIV_MASK << PLL0822X_PDIV_SHIFT) | + (PLL0822X_SDIV_MASK << PLL0822X_SDIV_SHIFT)); + else + pll_con3 &= ~((PLL1418X_MDIV_MASK << PLL0822X_MDIV_SHIFT) | + (PLL0822X_PDIV_MASK << PLL0822X_PDIV_SHIFT) | + (PLL0822X_SDIV_MASK << PLL0822X_SDIV_SHIFT)); pll_con3 |= (rate->mdiv << PLL0822X_MDIV_SHIFT) | (rate->pdiv << PLL0822X_PDIV_SHIFT) | (rate->sdiv << PLL0822X_SDIV_SHIFT); @@ -1317,6 +1328,7 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx, init.ops = &samsung_pll35xx_clk_ops; break; case pll_1417x: + case pll_1418x: case pll_0818x: case pll_0822x: case pll_0516x: diff --git a/drivers/clk/samsung/clk-pll.h b/drivers/clk/samsung/clk-pll.h index ffd3d52c0dec..1efbe4c446d0 100644 --- a/drivers/clk/samsung/clk-pll.h +++ b/drivers/clk/samsung/clk-pll.h @@ -30,6 +30,7 @@ enum samsung_pll_type { pll_2650x, pll_2650xx, pll_1417x, + pll_1418x, pll_1450x, pll_1451x, pll_1452x, From patchwork Tue Aug 6 12:11:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Virag X-Patchwork-Id: 817619 Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (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 4506B1C8FB7; Tue, 6 Aug 2024 12:11:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946304; cv=none; b=gqHd9GS2bQ4T3vf/q+jiEKVHjMYvtTrx8ryVrvmDqBLeAQF00gi0qB+UkBKZBEHN8k76xmA8OeLQNPl4JkZUmbpBIgQeisFvOj0jDWVSvmZTG6PgP842eJLZUvZHyucUwd9hNNYiU2+oAlWJS4MJCIRElAIS9FiTK9bOOh2LZlM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722946304; c=relaxed/simple; bh=8wZWTlDutoIdgkQonWtbC7fK/3x1PokJPYQxOF+5Oho=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MLFE9juGWF3cbmcqMlZiYbXVzRPV/KLtTvXPwSgRL/NmmsEjS469SIocpEhbp3AzVTa04Na7fWRTSy36YSzjEtkW2BI3B9vUM3jalgzUew/pQRK4zOA1S2cMCEJSJ3P5fDiU4uc611JH4EIrwYQ9ftp0qadigsqVPop4yjrbIhY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=E/cbiPiP; arc=none smtp.client-ip=209.85.208.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="E/cbiPiP" Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2f01e9f53e3so9255781fa.1; Tue, 06 Aug 2024 05:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722946300; x=1723551100; darn=vger.kernel.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=0if134XhdeRkEUYfkA+1CHXu+GQYSvk7tXr14DRvpMU=; b=E/cbiPiPKhpRLz7L/eHH0ZXUFDP1nlPc5M/Lr6G5dhq6z9r7MPxemZHcmfcscazZ55 6Kk3pAyw/T8hqKq+prTmB2rJNBPyqLOSBhl72uXEyXJHpvATh/ZumwJBF3Gi8Gn7qvrZ RQHWoDhFdnE7HbfBLOLEz9990BqGHkHpa4R9b5UxuPic7//PGwckoY/1HZCqDbiRI20x nTqtSdia1Np2r2GY3qbgSH6/mnAGyAUws9vjINroheMEtyZIWw403qeLws9B7P8Td76H eeeWF2KwFVYz4uRPRAxKfwMb0ita17LquqDaJr0Da4L4eCLZaTrLGOIcLyCW+di2ei77 FaSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722946300; x=1723551100; 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=0if134XhdeRkEUYfkA+1CHXu+GQYSvk7tXr14DRvpMU=; b=UXwNaTQuTvMtE8ZzqFFQBaX9iomBHG6Bqvds8NurNqeyjSZBWRNZeVQ+3KTKO0ylrd 0zXzyQC70Bvo7cGvRn5Lzi1uGML4pIdZmXVhVn0YipN1enb2kQHhHXDkKLkCsH91AEH0 Qd+tMUuPMy5IwuBWCV4p1JB/M0sY9cnYHfhFqo3AQ9+vVXTL4m+ah41RzI9nXYhdDeFb QKe61ETVBnz/vh18IizvKeeeEXRJxQyM3/lC/GzqsFOrmMX7DrbHhgoIyKep6APFlrmg 30cPYcIPsMF0LvRYc6lhwTPp3BliZaC7ueu7LtWUqNlZSwi4ggPrzZr/BJMOrMFAUq1t HToQ== X-Forwarded-Encrypted: i=1; AJvYcCXuF4OzueuVvf+ObYtgBl2IxG3xvQdibXuJTLfs026Cxx+eT88WHpaY5bNL1sVJlWPl0rSIESuwJFyUf/pPbg59XaYcLIgiUMcp4YmNucH0BteOj+b7Sf2ygl4XHWbw/i5/bj+ubHp2rRHAC5ITZ9G02m/W/lZfAgYAWy4EA5CIzWwP7w== X-Gm-Message-State: AOJu0YwcLe6pokf2WKNb77M+DSpDOq0i94wWK1zZeT2ghVzhtzGIi1T1 a4yWp7SRIKqBfER0rPhGx6sVhqopdEMRPbtRcZ7YkIpwsi/hLRlyDSLxKkxj X-Google-Smtp-Source: AGHT+IHmc+4jNVeC/deUHpKRZGlhx97wH6E6XkbGg1ilLroKPhmyzIRoqWZ0tQUgZPOVpADW7upZfw== X-Received: by 2002:a05:6512:234c:b0:52e:d0f8:2d43 with SMTP id 2adb3069b0e04-530bb3810d0mr12841061e87.17.1722946300245; Tue, 06 Aug 2024 05:11:40 -0700 (PDT) Received: from localhost.localdomain ([2a02:ab88:3711:c80:e7a7:e025:f1a5:ef78]) by smtp.googlemail.com with ESMTPSA id a640c23a62f3a-a7dc9ecb546sm542080366b.224.2024.08.06.05.11.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Aug 2024 05:11:39 -0700 (PDT) From: David Virag To: Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Alim Akhtar , Michael Turquette , Stephen Boyd , Rob Herring , Conor Dooley , David Virag Cc: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 7/7] clk: samsung: exynos7885: Add USB related clocks to CMU_FSYS Date: Tue, 6 Aug 2024 14:11:50 +0200 Message-ID: <20240806121157.479212-8-virag.david003@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240806121157.479212-1-virag.david003@gmail.com> References: <20240806121157.479212-1-virag.david003@gmail.com> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Exynos7885 SoC has a DWC3 USB Controller with Exynos USB PHY which in theory supports USB3 SuperSpeed, but is only used as USB2 in all known devices. These clocks are needed for everything related to USB. While at it, also remove the CLK_SET_RATE_PARENT capability of CLK_MOUT_FSYS_USB30DRD_USER, since it's not actually needed. Signed-off-by: David Virag --- drivers/clk/samsung/clk-exynos7885.c | 71 ++++++++++++++++++++++------ 1 file changed, 57 insertions(+), 14 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos7885.c b/drivers/clk/samsung/clk-exynos7885.c index a0c9b7cc6942..fc42251731ed 100644 --- a/drivers/clk/samsung/clk-exynos7885.c +++ b/drivers/clk/samsung/clk-exynos7885.c @@ -20,7 +20,7 @@ #define CLKS_NR_TOP (CLK_MOUT_SHARED1_PLL + 1) #define CLKS_NR_CORE (CLK_GOUT_TREX_P_CORE_PCLK_P_CORE + 1) #define CLKS_NR_PERI (CLK_GOUT_WDT1_PCLK + 1) -#define CLKS_NR_FSYS (CLK_MOUT_FSYS_USB30DRD_USER + 1) +#define CLKS_NR_FSYS (CLK_FSYS_USB30DRD_REF_CLK + 1) /* ---- CMU_TOP ------------------------------------------------------------- */ @@ -686,30 +686,56 @@ static const struct samsung_cmu_info core_cmu_info __initconst = { /* ---- CMU_FSYS ------------------------------------------------------------ */ /* Register Offset definitions for CMU_FSYS (0x13400000) */ -#define PLL_CON0_MUX_CLKCMU_FSYS_BUS_USER 0x0100 -#define PLL_CON0_MUX_CLKCMU_FSYS_MMC_CARD_USER 0x0120 -#define PLL_CON0_MUX_CLKCMU_FSYS_MMC_EMBD_USER 0x0140 -#define PLL_CON0_MUX_CLKCMU_FSYS_MMC_SDIO_USER 0x0160 -#define PLL_CON0_MUX_CLKCMU_FSYS_USB30DRD_USER 0x0180 -#define CLK_CON_GAT_GOUT_FSYS_MMC_CARD_I_ACLK 0x2030 -#define CLK_CON_GAT_GOUT_FSYS_MMC_CARD_SDCLKIN 0x2034 -#define CLK_CON_GAT_GOUT_FSYS_MMC_EMBD_I_ACLK 0x2038 -#define CLK_CON_GAT_GOUT_FSYS_MMC_EMBD_SDCLKIN 0x203c -#define CLK_CON_GAT_GOUT_FSYS_MMC_SDIO_I_ACLK 0x2040 -#define CLK_CON_GAT_GOUT_FSYS_MMC_SDIO_SDCLKIN 0x2044 +#define PLL_LOCKTIME_PLL_USB 0x0000 +#define PLL_CON0_MUX_CLKCMU_FSYS_BUS_USER 0x0100 +#define PLL_CON0_MUX_CLKCMU_FSYS_MMC_CARD_USER 0x0120 +#define PLL_CON0_MUX_CLKCMU_FSYS_MMC_EMBD_USER 0x0140 +#define PLL_CON0_MUX_CLKCMU_FSYS_MMC_SDIO_USER 0x0160 +#define PLL_CON0_MUX_CLKCMU_FSYS_USB30DRD_USER 0x0180 +#define PLL_CON0_PLL_USB 0x01a0 +#define CLK_CON_GAT_CLK_FSYS_USB20PHY_CLKCORE 0x200c +#define CLK_CON_GAT_GOUT_FSYS_MMC_CARD_I_ACLK 0x2030 +#define CLK_CON_GAT_GOUT_FSYS_MMC_CARD_SDCLKIN 0x2034 +#define CLK_CON_GAT_GOUT_FSYS_MMC_EMBD_I_ACLK 0x2038 +#define CLK_CON_GAT_GOUT_FSYS_MMC_EMBD_SDCLKIN 0x203c +#define CLK_CON_GAT_GOUT_FSYS_MMC_SDIO_I_ACLK 0x2040 +#define CLK_CON_GAT_GOUT_FSYS_MMC_SDIO_SDCLKIN 0x2044 +#define CLK_CON_GAT_GOUT_FSYS_USB30DRD_ACLK_20PHYCTRL 0x2068 +#define CLK_CON_GAT_GOUT_FSYS_USB30DRD_ACLK_30PHYCTRL_0 0x206c +#define CLK_CON_GAT_GOUT_FSYS_USB30DRD_ACLK_30PHYCTRL_1 0x2070 +#define CLK_CON_GAT_GOUT_FSYS_USB30DRD_BUS_CLK_EARLY 0x2074 +#define CLK_CON_GAT_GOUT_FSYS_USB30DRD_REF_CLK 0x2078 static const unsigned long fsys_clk_regs[] __initconst = { + PLL_LOCKTIME_PLL_USB, PLL_CON0_MUX_CLKCMU_FSYS_BUS_USER, PLL_CON0_MUX_CLKCMU_FSYS_MMC_CARD_USER, PLL_CON0_MUX_CLKCMU_FSYS_MMC_EMBD_USER, PLL_CON0_MUX_CLKCMU_FSYS_MMC_SDIO_USER, PLL_CON0_MUX_CLKCMU_FSYS_USB30DRD_USER, + PLL_CON0_PLL_USB, + CLK_CON_GAT_CLK_FSYS_USB20PHY_CLKCORE, CLK_CON_GAT_GOUT_FSYS_MMC_CARD_I_ACLK, CLK_CON_GAT_GOUT_FSYS_MMC_CARD_SDCLKIN, CLK_CON_GAT_GOUT_FSYS_MMC_EMBD_I_ACLK, CLK_CON_GAT_GOUT_FSYS_MMC_EMBD_SDCLKIN, CLK_CON_GAT_GOUT_FSYS_MMC_SDIO_I_ACLK, CLK_CON_GAT_GOUT_FSYS_MMC_SDIO_SDCLKIN, + CLK_CON_GAT_GOUT_FSYS_USB30DRD_ACLK_20PHYCTRL, + CLK_CON_GAT_GOUT_FSYS_USB30DRD_ACLK_30PHYCTRL_0, + CLK_CON_GAT_GOUT_FSYS_USB30DRD_ACLK_30PHYCTRL_1, + CLK_CON_GAT_GOUT_FSYS_USB30DRD_BUS_CLK_EARLY, + CLK_CON_GAT_GOUT_FSYS_USB30DRD_REF_CLK, +}; + +static const struct samsung_pll_rate_table pll_usb_rate_table[] __initconst = { + PLL_35XX_RATE(26 * MHZ, 50000000U, 400, 13, 4), +}; + +static const struct samsung_pll_clock fsys_pll_clks[] __initconst = { + PLL(pll_1418x, CLK_FOUT_USB_PLL, "fout_usb_pll", "oscclk", + PLL_LOCKTIME_PLL_USB, PLL_CON0_PLL_USB, + pll_usb_rate_table), }; /* List of parent clocks for Muxes in CMU_FSYS */ @@ -718,6 +744,7 @@ PNAME(mout_fsys_mmc_card_user_p) = { "oscclk", "dout_fsys_mmc_card" }; PNAME(mout_fsys_mmc_embd_user_p) = { "oscclk", "dout_fsys_mmc_embd" }; PNAME(mout_fsys_mmc_sdio_user_p) = { "oscclk", "dout_fsys_mmc_sdio" }; PNAME(mout_fsys_usb30drd_user_p) = { "oscclk", "dout_fsys_usb30drd" }; +PNAME(mout_usb_pll_p) = { "oscclk", "fout_usb_pll" }; static const struct samsung_mux_clock fsys_mux_clks[] __initconst = { MUX(CLK_MOUT_FSYS_BUS_USER, "mout_fsys_bus_user", mout_fsys_bus_user_p, @@ -731,12 +758,16 @@ static const struct samsung_mux_clock fsys_mux_clks[] __initconst = { MUX_F(CLK_MOUT_FSYS_MMC_SDIO_USER, "mout_fsys_mmc_sdio_user", mout_fsys_mmc_sdio_user_p, PLL_CON0_MUX_CLKCMU_FSYS_MMC_SDIO_USER, 4, 1, CLK_SET_RATE_PARENT, 0), - MUX_F(CLK_MOUT_FSYS_USB30DRD_USER, "mout_fsys_usb30drd_user", + MUX(CLK_MOUT_FSYS_USB30DRD_USER, "mout_fsys_usb30drd_user", mout_fsys_usb30drd_user_p, PLL_CON0_MUX_CLKCMU_FSYS_USB30DRD_USER, - 4, 1, CLK_SET_RATE_PARENT, 0), + 4, 1), + nMUX_F(CLK_MOUT_USB_PLL, "mout_usb_pll", mout_usb_pll_p, + PLL_CON0_PLL_USB, 4, 1, CLK_SET_RATE_PARENT, 0), }; static const struct samsung_gate_clock fsys_gate_clks[] __initconst = { + GATE(CLK_FSYS_USB20PHY_CLKCORE, "clk_fsys_usb20phy_clkcore", "mout_usb_pll", + CLK_CON_GAT_CLK_FSYS_USB20PHY_CLKCORE, 21, CLK_SET_RATE_PARENT, 0), GATE(CLK_GOUT_MMC_CARD_ACLK, "gout_mmc_card_aclk", "mout_fsys_bus_user", CLK_CON_GAT_GOUT_FSYS_MMC_CARD_I_ACLK, 21, 0, 0), GATE(CLK_GOUT_MMC_CARD_SDCLKIN, "gout_mmc_card_sdclkin", @@ -752,9 +783,21 @@ static const struct samsung_gate_clock fsys_gate_clks[] __initconst = { GATE(CLK_GOUT_MMC_SDIO_SDCLKIN, "gout_mmc_sdio_sdclkin", "mout_fsys_mmc_sdio_user", CLK_CON_GAT_GOUT_FSYS_MMC_SDIO_SDCLKIN, 21, CLK_SET_RATE_PARENT, 0), + GATE(CLK_FSYS_USB30DRD_ACLK_20PHYCTRL, "clk_fsys_usb30drd_aclk_20phyctrl", + "mout_fsys_bus_user", CLK_CON_GAT_GOUT_FSYS_USB30DRD_ACLK_20PHYCTRL, 21, 0, 0), + GATE(CLK_FSYS_USB30DRD_ACLK_30PHYCTRL_0, "clk_fsys_usb30drd_aclk_30phyctrl_0", + "mout_fsys_bus_user", CLK_CON_GAT_GOUT_FSYS_USB30DRD_ACLK_30PHYCTRL_0, 21, 0, 0), + GATE(CLK_FSYS_USB30DRD_ACLK_30PHYCTRL_1, "clk_fsys_usb30drd_aclk_30phyctrl_1", + "mout_fsys_bus_user", CLK_CON_GAT_GOUT_FSYS_USB30DRD_ACLK_30PHYCTRL_1, 21, 0, 0), + GATE(CLK_FSYS_USB30DRD_BUS_CLK_EARLY, "clk_fsys_usb30drd_bus_clk_early", + "mout_fsys_bus_user", CLK_CON_GAT_GOUT_FSYS_USB30DRD_BUS_CLK_EARLY, 21, 0, 0), + GATE(CLK_FSYS_USB30DRD_REF_CLK, "clk_fsys_usb30drd_ref_clk", "mout_fsys_usb30drd_user", + CLK_CON_GAT_GOUT_FSYS_USB30DRD_REF_CLK, 21, 0, 0), }; static const struct samsung_cmu_info fsys_cmu_info __initconst = { + .pll_clks = fsys_pll_clks, + .nr_pll_clks = ARRAY_SIZE(fsys_pll_clks), .mux_clks = fsys_mux_clks, .nr_mux_clks = ARRAY_SIZE(fsys_mux_clks), .gate_clks = fsys_gate_clks,