Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp2532678rdb; Wed, 21 Feb 2024 10:24:51 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXD5uSGh07IgMNhvVm3F4+Wf3hKEDGiTUQyMFQUOlS+isR0q/NjSWpK9aiKXciM+d/W1JT7iRMSFbpnPnU7PqNyttFdCwbMxK3kf0tQ0w== X-Google-Smtp-Source: AGHT+IGqHiSqRm3C4GK5ZmJpY8rkSqwEYgNDmOnyw/Sv7SvXHp6gd0NHKC85YqLECSzZwVIbJ7OS X-Received: by 2002:a05:6a21:3401:b0:1a0:c82f:f89b with SMTP id yn1-20020a056a21340100b001a0c82ff89bmr402356pzb.6.1708539891029; Wed, 21 Feb 2024 10:24:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708539891; cv=pass; d=google.com; s=arc-20160816; b=XDBqaBkuH7CUl1lIgAAA6ga41RhOozjAu14+279m0Ns+8mryn1SbMdoITLZIFGGHqA AQjlPnLAiHODeLjwHkbq+DRLJ99mQwMwm62Fj7g7R0SDxkOnGj8yabAhHPo5pcxilPho ++U5jeHvyTCpOihH8cOpQaOClSSdEqOrVyMmCXeoGMBm+jJdahbHTwbiTrlj7n3xeP7q KOgslpSYZlYnNjBUkv+EjlBP13RwYqI3EblG3inn4vZPvcKeAI8Xsc5dhOA+wCPhDpIh MneLl7BSK/CcBssWEhVydkIevmTHlC+OaO6QfCDYjeFGeIbaJs1sP5NzdoPwN8dIoUDa lwTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=qQE00hj6aCsO8HAaXmw7EJeS3I06858DGf/Z+exIm+0=; fh=x5R05joZrGxebVEAaczvDRwH1m7BAJpjuUh/Gh1YI/Y=; b=DKi/1kX+1bw6wfAeWhMFS07bqU9jJJL9S8fc+qeHeZeb9FsCrmycHezBmv2dPUbDo8 f2kzZ01SksnuCqyFUJ2GrcRDeUaiCKhBVHSPsbVso60j/8rKygJTlpHSOcdJax2yIIkE A6680bhZ4HGrUGCvVpS2QqVrccr28yZgygg7kETyuybbvmI28I7qToLSLyDMvMfCrGHI gfyhvMdR8zKLqpUMnICddzZf4X/Q/s+RzjLJMwYHLWGG6HQ5DVgDjgo1+Un22/XXLtbV 9f4bEuWoJdTiT23DHsa249zgzLLupUnTlYFSn74VZAV/nrv1V4AtPVCgAhSeMQcdSvFa 8Aug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=g+QnhhmE; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-75279-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75279-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j12-20020a634a4c000000b005dc9daed2d2si8258163pgl.429.2024.02.21.10.24.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 10:24:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75279-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=g+QnhhmE; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-75279-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75279-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com 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 B4004285691 for ; Wed, 21 Feb 2024 18:24:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA071128395; Wed, 21 Feb 2024 18:22:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="g+QnhhmE" Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (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 B17BC86ACE; Wed, 21 Feb 2024 18:22:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708539746; cv=none; b=CSZGgIN9hYDbOYMfXqN/SAgagRhBsC1ivXWXHlUDYdRGYq9r6VL5xPhmF4Zf8vgAqfoHk4GUwsUxfVnRFSULHDNpAEVeCPkl0L8mxqpWO8ur8Adt8hvSmOyLG7nqiv/xQG5zHi1C0+9I7jNNVU+k6x9nui3Ou0hggLm2oEe3ygw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708539746; c=relaxed/simple; bh=4FS3o7ZWnUfxMsTqNZlzB8T/fnOsHC/iBF7lgUCvZhA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hMTXp5zTFbco6lyci0Ra1jtP2ooztUSGKHLrpjk3cGsvJydVQl5APpnXPht3DGMyhpg2WwRZdJJVkZ+TSfc42QQoKOQ/l2jtIPjkEv/UYCbShRemrvbNUOxNeLp3McPN78F/RhI1Y04RLzj8joFYx8zYo902vFtaUQuY8o9DObo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=g+QnhhmE; arc=none smtp.client-ip=217.70.183.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id A76AB1C0009; Wed, 21 Feb 2024 18:22:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1708539742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qQE00hj6aCsO8HAaXmw7EJeS3I06858DGf/Z+exIm+0=; b=g+QnhhmE8+mjR7UghjCFIe97Z4KakC9U1IPB1jHO09pR6k3wAKjL/wTWbyyUdls5BRLpgp btMTkbEKOcZDv+T3peYWW/OVHvWWb3ZtfR6wogmH0mHJUAtR854b+pxFwYoxei+50Y2+yr AoWfGCoy/DF78gRxOlKd4Prcmk7rXyIffS1q02+G6HXuqsR8uwZ85P6tNnNPLjGqu6CsC0 8SSpm7ciVXwZ4/LzyhONK10XPlv4OzTfvo5Czt6BwHxUiKP3fzDIEuDjZFIcRojHjkUiQi WeBfMUW4WMMKDX2ikZlGxqe+CCBarPcrfKBAi2gGwBdWs5K0bDzEJ2uuAtweEw== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 21 Feb 2024 19:22:20 +0100 Subject: [PATCH v7 12/14] MIPS: mobileye: eyeq5: use OLB clocks controller node 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 Message-Id: <20240221-mbly-clk-v7-12-31d4ce3630c3@bootlin.com> References: <20240221-mbly-clk-v7-0-31d4ce3630c3@bootlin.com> In-Reply-To: <20240221-mbly-clk-v7-0-31d4ce3630c3@bootlin.com> To: Gregory CLEMENT , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Bogendoerfer , Linus Walleij , =?utf-8?q?Rafa=C5=82_Mi=C5=82ecki?= , Philipp Zabel Cc: Vladimir Kondratiev , linux-mips@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Tawfik Bayouk , linux-gpio@vger.kernel.org, =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.13.0 X-GND-Sasl: theo.lebrun@bootlin.com We add the clock controller inside the OLB syscon region and remove previous fixed devicetree nodes representing PLLs exposed by the clock controller. Signed-off-by: Théo Lebrun --- .../{eyeq5-fixed-clocks.dtsi => eyeq5-clocks.dtsi} | 54 +++++++--------------- arch/mips/boot/dts/mobileye/eyeq5.dtsi | 11 ++++- 2 files changed, 26 insertions(+), 39 deletions(-) diff --git a/arch/mips/boot/dts/mobileye/eyeq5-fixed-clocks.dtsi b/arch/mips/boot/dts/mobileye/eyeq5-clocks.dtsi similarity index 88% rename from arch/mips/boot/dts/mobileye/eyeq5-fixed-clocks.dtsi rename to arch/mips/boot/dts/mobileye/eyeq5-clocks.dtsi index 78f5533a95c6..aa6db704a786 100644 --- a/arch/mips/boot/dts/mobileye/eyeq5-fixed-clocks.dtsi +++ b/arch/mips/boot/dts/mobileye/eyeq5-clocks.dtsi @@ -3,42 +3,20 @@ * Copyright 2023 Mobileye Vision Technologies Ltd. */ +#include + / { /* Fixed clock */ - pll_cpu: pll-cpu { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <1500000000>; - }; - - pll_vdi: pll-vdi { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <1280000000>; - }; - - pll_per: pll-per { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <2000000000>; - }; - - pll_ddr0: pll-ddr0 { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-frequency = <1857210000>; - }; - - pll_ddr1: pll-ddr1 { + xtal: xtal { compatible = "fixed-clock"; #clock-cells = <0>; - clock-frequency = <1857210000>; + clock-frequency = <30000000>; }; /* PLL_CPU derivatives */ occ_cpu: occ-cpu { compatible = "fixed-factor-clock"; - clocks = <&pll_cpu>; + clocks = <&clocks EQ5C_PLL_CPU>; #clock-cells = <0>; clock-div = <1>; clock-mult = <1>; @@ -101,7 +79,7 @@ mem_clk: mem-clk { }; occ_isram: occ-isram { compatible = "fixed-factor-clock"; - clocks = <&pll_cpu>; + clocks = <&clocks EQ5C_PLL_CPU>; #clock-cells = <0>; clock-div = <2>; clock-mult = <1>; @@ -115,7 +93,7 @@ isram_clk: isram-clk { /* gate ClkRstGen_isram */ }; occ_dbu: occ-dbu { compatible = "fixed-factor-clock"; - clocks = <&pll_cpu>; + clocks = <&clocks EQ5C_PLL_CPU>; #clock-cells = <0>; clock-div = <10>; clock-mult = <1>; @@ -130,7 +108,7 @@ si_dbu_tp_pclk: si-dbu-tp-pclk { /* gate ClkRstGen_dbu */ /* PLL_VDI derivatives */ occ_vdi: occ-vdi { compatible = "fixed-factor-clock"; - clocks = <&pll_vdi>; + clocks = <&clocks EQ5C_PLL_VDI>; #clock-cells = <0>; clock-div = <2>; clock-mult = <1>; @@ -144,7 +122,7 @@ vdi_clk: vdi-clk { /* gate ClkRstGen_vdi */ }; occ_can_ser: occ-can-ser { compatible = "fixed-factor-clock"; - clocks = <&pll_vdi>; + clocks = <&clocks EQ5C_PLL_VDI>; #clock-cells = <0>; clock-div = <16>; clock-mult = <1>; @@ -158,7 +136,7 @@ can_ser_clk: can-ser-clk { /* gate ClkRstGen_can_ser */ }; i2c_ser_clk: i2c-ser-clk { compatible = "fixed-factor-clock"; - clocks = <&pll_vdi>; + clocks = <&clocks EQ5C_PLL_VDI>; #clock-cells = <0>; clock-div = <20>; clock-mult = <1>; @@ -166,7 +144,7 @@ i2c_ser_clk: i2c-ser-clk { /* PLL_PER derivatives */ occ_periph: occ-periph { compatible = "fixed-factor-clock"; - clocks = <&pll_per>; + clocks = <&clocks EQ5C_PLL_PER>; #clock-cells = <0>; clock-div = <16>; clock-mult = <1>; @@ -225,7 +203,7 @@ gpio_clk: gpio-clk { }; emmc_sys_clk: emmc-sys-clk { compatible = "fixed-factor-clock"; - clocks = <&pll_per>; + clocks = <&clocks EQ5C_PLL_PER>; #clock-cells = <0>; clock-div = <10>; clock-mult = <1>; @@ -233,7 +211,7 @@ emmc_sys_clk: emmc-sys-clk { }; ccf_ctrl_clk: ccf-ctrl-clk { compatible = "fixed-factor-clock"; - clocks = <&pll_per>; + clocks = <&clocks EQ5C_PLL_PER>; #clock-cells = <0>; clock-div = <4>; clock-mult = <1>; @@ -241,7 +219,7 @@ ccf_ctrl_clk: ccf-ctrl-clk { }; occ_mjpeg_core: occ-mjpeg-core { compatible = "fixed-factor-clock"; - clocks = <&pll_per>; + clocks = <&clocks EQ5C_PLL_PER>; #clock-cells = <0>; clock-div = <2>; clock-mult = <1>; @@ -265,7 +243,7 @@ mjpeg_core_clk: mjpeg-core-clk { /* gate ClkRstGen_mjpeg_gen */ }; fcmu_a_clk: fcmu-a-clk { compatible = "fixed-factor-clock"; - clocks = <&pll_per>; + clocks = <&clocks EQ5C_PLL_PER>; #clock-cells = <0>; clock-div = <20>; clock-mult = <1>; @@ -273,7 +251,7 @@ fcmu_a_clk: fcmu-a-clk { }; occ_pci_sys: occ-pci-sys { compatible = "fixed-factor-clock"; - clocks = <&pll_per>; + clocks = <&clocks EQ5C_PLL_PER>; #clock-cells = <0>; clock-div = <8>; clock-mult = <1>; diff --git a/arch/mips/boot/dts/mobileye/eyeq5.dtsi b/arch/mips/boot/dts/mobileye/eyeq5.dtsi index e82d2a57f6da..1a65b43e13b1 100644 --- a/arch/mips/boot/dts/mobileye/eyeq5.dtsi +++ b/arch/mips/boot/dts/mobileye/eyeq5.dtsi @@ -5,7 +5,7 @@ #include -#include "eyeq5-fixed-clocks.dtsi" +#include "eyeq5-clocks.dtsi" / { #address-cells = <2>; @@ -106,6 +106,15 @@ olb: system-controller@e00000 { ranges = <0x0 0x0 0xe00000 0x400>; #address-cells = <1>; #size-cells = <1>; + + clocks: clock-controller@e0002c { + compatible = "mobileye,eyeq5-clk"; + reg = <0x02c 0x50>, <0x11c 0x04>; + reg-names = "plls", "ospi"; + #clock-cells = <1>; + clocks = <&xtal>; + clock-names = "ref"; + }; }; gic: interrupt-controller@140000 { -- 2.43.2