Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp399746rdb; Thu, 5 Oct 2023 09:02:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGex+hCyh+4hQM/lrlE8aKJQ3pMK1qOaqFHM9yK88uIWVXjLr759oy3ooGbxvDgFxd+BF0U X-Received: by 2002:a05:6a20:4411:b0:15e:1486:1e08 with SMTP id ce17-20020a056a20441100b0015e14861e08mr7364102pzb.19.1696521779572; Thu, 05 Oct 2023 09:02:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696521779; cv=none; d=google.com; s=arc-20160816; b=rlIdhk/hkJg/nee3F68M29kJCWlbQZx1WaHgkOmkvi6QDrxQN8DZSS79wB5R9qPvHc wflAlqpFyPpQjpmtkQx5APDqe8QPTbtMZNN1rORfnVaPQXORgSsWW8npJKFGoGpZZtV1 8HlyOcvpPjmJ9btIn2VYoQUSLyaMax5CBw3VVRhilsVAJU6o1hIIPOOvZcl+QWiVd+On oPXpV20a+PPdhii3skoQPoS39ufErFBsgaadrYD+WR14eCQohrkh/Mto6vrAd+b9bTIR VZABvoa75V/mrYxNni/J/M5jpVj32836ez0xqbDigZFJO9Ld0zt52fx6QRR8MMVavCG2 Za+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=nvH8TojWLX5PBOVWWWtrIYBix9PjUxHjvbmCvPQRWkE=; fh=BlGEIBqPrjJf0lRYpVWGPYQ9+rcA9U/kAHv58ZHiyek=; b=ROrXDKZ7Od6JZWxroJ05//SJEdDBFYlPrxevlZSarwIyLysA4LrAF3ZoPAJZHFKpLK sf2NGoC7kxFV+m1BF4+xFMiN+Fx1G58qwcmYa1WJZJG3AXGo0FMqCiVLgpmbaqcA22DC hfm/yiYT1/8KPn/u/eNwOuG4SOBgI5y7fGm7+6rdkWUO5Z+rTIg9v0eEOISYJXZdytZx gp7/Usy5WWS8nTa55I6pZJFthiKRBizdoe51dFVYGYd9aTz1rhl4XucLeDUq57pTHlo4 h/tryfgUfluECebXGtcOMfgalX49DlUnDEQfGkGoLnryzC7YQohw3BL6AND7tum03La9 Kf4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="iuj2Hf/o"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id p24-20020a637418000000b0058978136252si855813pgc.484.2023.10.05.09.02.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:02:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="iuj2Hf/o"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 886618083B00; Thu, 5 Oct 2023 09:02:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235616AbjJEQAX (ORCPT + 99 others); Thu, 5 Oct 2023 12:00:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234704AbjJEP5n (ORCPT ); Thu, 5 Oct 2023 11:57:43 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86FBA4695; Thu, 5 Oct 2023 08:17:49 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3EE6BE0010; Thu, 5 Oct 2023 15:17:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696519067; 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=nvH8TojWLX5PBOVWWWtrIYBix9PjUxHjvbmCvPQRWkE=; b=iuj2Hf/o0T6P92uvZ0fWwcbUtAvIpStnI6H/7KBQEoGLMSa1VL4jOjF+/UvE1MfEYUy/CW 77vDVJjOyLBExgbxDHtiDz84KzSrxp3OnDH+RvgMWW+PaKOR0N+Sjkdqcu+LDW2WeSyKBh bF2Z1+LMcDuCzLOuc9adjddmWhISxGvg3ZxBXv0r72M42BjJrjumsUd+hiXqfC5FJe+nyP XBviODz8fWkbFSsvFRLMsF1gul/fpCcTg8JKUzTmPzq++AkUeUwpynPlDGhFJ28rZKMIwJ AvUgu8nqDCysAe5zC98Kc/DYZ0G255+S9tRU5m/hfK5DZ5tT849KxdSphJZFfA== From: Gregory CLEMENT To: Rob Herring Cc: Paul Burton , Thomas Bogendoerfer , linux-mips@vger.kernel.org, Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Kondratiev , Tawfik Bayouk , Alexandre Belloni , =?utf-8?Q?Th=C3=A9o?= Lebrun , Thomas Petazzoni Subject: Re: [PATCH 08/11] MIPS: mobileye: Add EyeQ5 dtsi In-Reply-To: References: <20231004161038.2818327-1-gregory.clement@bootlin.com> <20231004161038.2818327-9-gregory.clement@bootlin.com> Date: Thu, 05 Oct 2023 17:17:45 +0200 Message-ID: <87mswxcd46.fsf@BL-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: gregory.clement@bootlin.com X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 05 Oct 2023 09:02:39 -0700 (PDT) Hello Rob, > On Wed, Oct 4, 2023 at 11:11=E2=80=AFAM Gregory CLEMENT > wrote: >> >> Add a device tree include file for the Mobileye EyeQ5 SoC. >> >> Based on the work of Slava Samsonov >> >> Signed-off-by: Gregory CLEMENT >> --- >> arch/mips/boot/dts/Makefile | 1 + >> arch/mips/boot/dts/mobileye/Makefile | 4 + >> .../boot/dts/mobileye/eyeq5-fixed-clocks.dtsi | 315 ++++++++++++++++++ >> arch/mips/boot/dts/mobileye/eyeq5.dtsi | 138 ++++++++ >> 4 files changed, 458 insertions(+) >> create mode 100644 arch/mips/boot/dts/mobileye/Makefile >> create mode 100644 arch/mips/boot/dts/mobileye/eyeq5-fixed-clocks.dtsi >> create mode 100644 arch/mips/boot/dts/mobileye/eyeq5.dtsi >> >> diff --git a/arch/mips/boot/dts/Makefile b/arch/mips/boot/dts/Makefile >> index 928f38a79dff..edb8e8dee758 100644 >> --- a/arch/mips/boot/dts/Makefile >> +++ b/arch/mips/boot/dts/Makefile >> @@ -8,6 +8,7 @@ subdir-$(CONFIG_LANTIQ) +=3D lantiq >> subdir-$(CONFIG_MACH_LOONGSON64) +=3D loongson >> subdir-$(CONFIG_SOC_VCOREIII) +=3D mscc >> subdir-$(CONFIG_MIPS_MALTA) +=3D mti >> +subdir-$(CONFIG_SOC_EYEQ5) +=3D mobileye >> subdir-$(CONFIG_LEGACY_BOARD_SEAD3) +=3D mti >> subdir-$(CONFIG_FIT_IMAGE_FDT_NI169445) +=3D ni >> subdir-$(CONFIG_MACH_PIC32) +=3D pic32 >> diff --git a/arch/mips/boot/dts/mobileye/Makefile b/arch/mips/boot/dts/m= obileye/Makefile >> new file mode 100644 >> index 000000000000..99c4124fd4c0 >> --- /dev/null >> +++ b/arch/mips/boot/dts/mobileye/Makefile >> @@ -0,0 +1,4 @@ >> +# SPDX-License-Identifier: GPL-2.0-only >> +# Copyright 2023 Mobileye Vision Technologies Ltd. >> + >> +obj-$(CONFIG_BUILTIN_DTB) +=3D $(addsuffix .o, $(dtb-y)) > > You didn't add anything to 'dtb-y'. Did you test this? Initially yes, and finally we switch on the FIT image generation, so we don't use it anymore > > Also, CONFIG_BUILTIN_DTB is supposed to be for legacy bootloaders > which don't understand DT. For a new SoC, fix the bootloader. I can remove it > >> diff --git a/arch/mips/boot/dts/mobileye/eyeq5-fixed-clocks.dtsi b/arch/= mips/boot/dts/mobileye/eyeq5-fixed-clocks.dtsi >> new file mode 100644 >> index 000000000000..a0066465ac8b >> --- /dev/null >> +++ b/arch/mips/boot/dts/mobileye/eyeq5-fixed-clocks.dtsi >> @@ -0,0 +1,315 @@ >> +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +/* >> + * Copyright 2023 Mobileye Vision Technologies Ltd. >> + */ > > I assume these aren't all really fixed, but just 'I don't have a clock > driver yet'. That creates an ABI issue when you add the clock > driver(s). Just FYI. Indeed they aren't all fixed. The plan is to replace the relevant ones by a real clock driver when ready. In this case some part of the dts file will be modified. But is it a real issue ? Booting with a new kernel with an old dtb will still continue to work in the same way. it's only new tdb with old kernel that won't work, but we are not supposed to support this case. > >> + >> +/ { >> + /* Fixed clock */ >> + pll_cpu: pll_cpu { > > Don't use _ in node names. OK [...] >> +/* PLL_CPU derivatives */ >> + occ_cpu: occ_cpu { >> + compatible =3D "fixed-factor-clock"; >> + clocks =3D <&pll_cpu>; >> + #clock-cells =3D <0>; >> + clock-div =3D <1>; >> + clock-mult =3D <1>; >> + clock-output-names =3D "occ_cpu"; > > Isn't the default name the node name? Drop these unless you really > have a need and they aren't redundant. indeed it's not used, I remove them too. [...] >> --- /dev/null >> +++ b/arch/mips/boot/dts/mobileye/eyeq5.dtsi >> @@ -0,0 +1,138 @@ >> +// SPDX-License-Identifier: GPL-2.0 > > Doesn't match eyeq5-fixed-clocks.dtsi OK > >> +/* >> + * Copyright 2023 Mobileye Vision Technologies Ltd. >> + */ >> + >> +#include >> +#include >> + >> +/memreserve/ 0x40000000 0xc0000000; /* DDR32 */ >> +/memreserve/ 0x08000000 0x08000000; /* DDR_LOW */ >> + >> +#include "eyeq5-fixed-clocks.dtsi" >> + >> +/* almost all GIC IRQs has the same characteristics. provide short form= */ > > Maybe so, but I prefer not having 2 levels of lookup to figure out values. > >> +#define GIC_IRQ(x) GIC_SHARED (x) IRQ_TYPE_LEVEL_HIGH OK I remove it. >> + >> +/ { >> + #address-cells =3D <2>; >> + #size-cells =3D <2>; >> + cpus { >> + #address-cells =3D <1>; >> + #size-cells =3D <0>; >> + cpu@0 { >> + device_type =3D "cpu"; >> + compatible =3D "mti,i6500"; >> + reg =3D <0>; >> + clocks =3D <&core0_clk>; >> + }; >> + }; >> + >> + reserved-memory { >> + #address-cells =3D <2>; >> + #size-cells =3D <2>; >> + ranges; >> + >> +/* These reserved memory regions are also defined in bootmanager >> + * for configuring inbound translation for BARS, don't change >> + * these without syncing with bootmanager >> + */ > > Indent with the rest of the node. OK Thanks, Gregory --=20 Gregory Clement, Bootlin Embedded Linux and Kernel engineering http://bootlin.com