Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp288335rdb; Mon, 22 Jan 2024 04:25:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFM7pLDUyMq/FgxpU2TVBTcG477+yeJyianL3gll6mzZolGf1r5SfjgkEwVTyLOcPyzXEvh X-Received: by 2002:a05:6870:3b19:b0:210:75f7:ef1c with SMTP id gh25-20020a0568703b1900b0021075f7ef1cmr6221659oab.70.1705926321059; Mon, 22 Jan 2024 04:25:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705926321; cv=pass; d=google.com; s=arc-20160816; b=V3dIXRMDqT5vpq6ImDPoQu7Nn+NYygFLR98YcUtRG+4egpW639mP3zXdXQae+i8EXN XEEDy+B0TvzMPsBg0ZH7a8kuHKePiKkX3+AovwMR3nx5XObukVguGcu2pTG4FZIWbimF JCgTzZXiA1PkBSbvvAJgsZfrAV76LRtmlkG1CPcaiwq/ZmTq/vn3+kBoR8Vj88OqtUVo YGg5jOOvWVBcU4BvssAj9FGg497CXJFCSLRibrxUVQs6+a1OyXXsMkmm8v+Yw+wu/BWA ysmQYqWaeM/HD019J9BbLAFE6dO3JUPNNkhekUuvWjrUJ1rkvC587RRPEfk1QDwbSv4G Dowg== 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=kF36HxKMb6qVPvXRO+bMI1COqZxTodLSwtV6LxR754o=; fh=7owW42T6ZLRf2RzLwZvq8R8LNTe7zgMt8CKJpj74120=; b=y6MUBwMJp6MFCAA5GtP9srWYCEW8duYrrSBh90rAd6w+aPanRj02Zuh1ZRhfJYESse T0qjaqGOmzdpTwOwATE4OnvDFNPp6Z50Sy/HWurHvYb8yhzaCfrvpQ/HLvhHctQqJNmh 6GTFh9klKzy6YvGEIeohYZjpFiuIi8AX6RDulISIefeNc2zc8hFjkbhM67rF3Jj1dNp2 kUuzepcXXX4iFxmIFh3VOrObmtnmGuFmIT8eZ3V0Hu54TngKsUTNaNPD4ururOiIpv/r zkxPkmC2PBB8/sWFoOcd5odDYiPK6lbd0zY9zlVox6um8+ATI2ors5pr2q0JhcCymx/R LLOg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ob2Qox9R; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32996-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 w32-20020a634760000000b00585999a38a6si7764210pgk.793.2024.01.22.04.25.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 04:25:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32996-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=@kernel.org header.s=k20201202 header.b=ob2Qox9R; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-32996-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 6E3322825E1 for ; Mon, 22 Jan 2024 12:20:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05CF73BB31; Mon, 22 Jan 2024 12:20:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ob2Qox9R" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20FE73B2B6; Mon, 22 Jan 2024 12:20:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705926012; cv=none; b=AWAQksmf3k3Pgoil3Vy+F3M2MTP3QiHAzTABwvnbxiu8k6nixXSCwIJ5/UMxUahEYbhXRPN+hLUaJuDBKuwfG9s3+ZpopE6P5PZ7BkLtG8yr57xpcnB51rkqEo6rb129G9bXQSoPkRd+bW5+DwXZ48ivT6F7cGsCDsDEJEJDBWM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705926012; c=relaxed/simple; bh=IlLNZwCv119gs+G1XZGQUJ/nTZHJ2OxfZVk+jo076AY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tf0K9iQ6JZtzsOzi1fZU2jJJToDlr0uBxFPDp07GGgKhUiHQIzIZjqLYf4xeu4KdGkRznftM6MQ4cOxg48Csr/7eC0V5OFQd+lKdVTy7qnBZYa1NUHDJ2CBi89eOdl5I7WN0L2w/nXDmB+/zvxsHuRr194xp3fup/l3k0xa+ma0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ob2Qox9R; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3934FC433F1; Mon, 22 Jan 2024 12:20:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705926011; bh=IlLNZwCv119gs+G1XZGQUJ/nTZHJ2OxfZVk+jo076AY=; h=From:To:Cc:Subject:Date:From; b=ob2Qox9Rq4r16y13ck9Hpq/TMnEm3RnAjWh84mJdSYOZTkruw2jb+VCPFnb0Lh4YU pS5oIzblRyjnRjjqPfAHjKIZKxL9x42SXUb8gB1lQbEUn+1l+lMIUcaAV95xVZGoUU P2XGfjHWsDWVYKJuf3CompvjiOERgDFSqMsfHP5LatjVDA5SEfF20l6DqbM7sIlXi8 RV6aXp4F2GBCs1WO8rmakFi3XVxuIQUthGmGg/B3KKVmCmgRzoVZl6cS3czqWGreXt 2FZGSOYl7DWpB/B9+H/v/gNjlgs6z/gBcfpU6eBBKBhJk55mR7KOgsYj8TsM5AK61G EdbigUbi7JqxQ== From: Conor Dooley To: linux-riscv@lists.infradead.org Cc: conor@kernel.org, Conor Dooley , Daire McNamara , Wolfgang Grandegger , Marc Kleine-Budde , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Michael Turquette , Stephen Boyd , linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH v2 0/7] MPFS clock fixes required for correct CAN clock modeling Date: Mon, 22 Jan 2024 12:19:48 +0000 Message-ID: <20240122-catty-roast-d3625dbb02fe@spud> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2564; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=LljwZDfMNfbMVLp7XtH+2mdlVEJFVNUoZZukL9HDn4g=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDKnrYpNPeB3Nb1kttaDRUG6G2KQrfo9W/pvGmv1XWTDCd +Zr1hbbjlIWBjEOBlkxRZbE230tUuv/uOxw7nkLM4eVCWQIAxenAEyEjZvhfzE3J/uknFOdS1IO rBILU2HdXCJ24FX6s1di79+EBT29fpqRYfPeFnMmbcM8vdZjkyPudL37ZpvB+vux3oJDb74//3y ligUA X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C Content-Transfer-Encoding: 8bit From: Conor Dooley While reviewing a CAN driver internally for MPFS [1], I realised that the modeling of the MSSPLL such that only one of its outputs could be used was not correct. The CAN controllers on MPFS take 2 input clocks - one that is the bus clock, acquired from the main MSSPLL and a second clock for the AHB interface to the result of the SoC. Currently the binding for the CAN controllers and the represetnation of the MSSPLL only allows for one of these clocks. Modify the binding and devicetree to expect two clocks and rework the main clock controller driver for MPFS such that it is capable of providing multiple outputs from the MSSPLL. Cheers, Conor. 1 - Hopefully that'll show up on the lists soon, once we are happy with it ourselves. (As of v2, that's not happened yet, Christmas etc gettin in the way, soonTM). Changes in v2: - Swap MSSPLL out for MSSPLL0 in the driver, there's no functional change there. - drop the unneeded maxItems from clocks. CC: Conor Dooley CC: Daire McNamara CC: Wolfgang Grandegger CC: Marc Kleine-Budde CC: "David S. Miller" CC: Eric Dumazet CC: Jakub Kicinski CC: Paolo Abeni CC: Rob Herring CC: Krzysztof Kozlowski CC: Paul Walmsley CC: Palmer Dabbelt CC: Albert Ou CC: Michael Turquette CC: Stephen Boyd CC: linux-riscv@lists.infradead.org CC: linux-can@vger.kernel.org CC: netdev@vger.kernel.org CC: devicetree@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: linux-clk@vger.kernel.org Conor Dooley (7): dt-bindings: clock: mpfs: add more MSSPLL output definitions dt-bindings: can: mpfs: add missing required clock clk: microchip: mpfs: split MSSPLL in two clk: microchip: mpfs: setup for using other mss pll outputs clk: microchip: mpfs: add missing MSSPLL outputs clk: microchip: mpfs: convert MSSPLL outputs to clk_divider riscv: dts: microchip: add missing CAN bus clocks .../bindings/net/can/microchip,mpfs-can.yaml | 6 +- arch/riscv/boot/dts/microchip/mpfs.dtsi | 4 +- drivers/clk/microchip/clk-mpfs.c | 154 ++++++++++-------- .../dt-bindings/clock/microchip,mpfs-clock.h | 5 + 4 files changed, 98 insertions(+), 71 deletions(-) -- 2.43.0