From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9AFAAC3DA7F for ; Wed, 7 Aug 2024 11:21:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6SdX9elpwmR+9dA4zlJpVzZhgDrBRlEYA0P/uGF5Q18=; b=SbG3nc4aNz5rj0K9CZ0sL841hV nKkFQ5sr/YI0G32UIKASYALTNIW+xeqEosRIp6ntKVegmwM8ogwqYj6yAdoaFJPkAa/M0//syP4cq vYJqfIouXAW9pRRCA4ZNAdtvM2hS17zGFdtei25UNwat/QZ+l9NZVwSMhu/LQfU5sH3m24KN1Xnow +z+8Ru4/q2hYoZ9a/fMnDeq6ooWkYPdaP5gthvhk0T2peC+SqGvoT6vWytgkj4/6dDluolv7Jhuhw GIFvGLA2yGpcY9mYvXJOqyykJIy1cqUBp+/kEi6LwiXYh5atOntqy6AcSyOzpUSVte9QqyKdZ8fr2 lx3fsy1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbejL-00000004qq0-49D1; Wed, 07 Aug 2024 11:21:23 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbeiN-00000004qdN-193s for linux-arm-kernel@lists.infradead.org; Wed, 07 Aug 2024 11:20:24 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-52ef95ec938so1999315e87.3 for ; Wed, 07 Aug 2024 04:20:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723029621; x=1723634421; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6SdX9elpwmR+9dA4zlJpVzZhgDrBRlEYA0P/uGF5Q18=; b=U8dESemT2EmQ09l7WyoD8nYiUG29BGV9sPL5twz2+wt2aQz8P0TiD65Zd8YUUh3x2M uElSVfcQ1dGzgjWf4RyeWnxv9smd/p2/OaGboDVJ/a89XCapf5Gek7FfKgroZDJJTxrg 73V/sphLComBoYFB2DuuXwJFdhkW3nZSsJ/LzohVhiKu34l/danQvhEngGPCka4+7WzK G6n9sOfIPYSL6xMXu8ne9Zio9i8+GruxzbfhZwVG6uths83dDY6iADwb/azHLNOk71dd RUlLj1xCbCfRSVgA9B4+fTe5X2rojkA7XIsFofzkWtcZ4vV7ZZPpP7slPZqLDrNkDpbj HnwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723029621; x=1723634421; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6SdX9elpwmR+9dA4zlJpVzZhgDrBRlEYA0P/uGF5Q18=; b=wyYBansjP8TBhmJONUc9NgtOl+78gJ9vzZ34Y3u+fYsy/zLMBwFOBom7GdrSFs/Msy bA6DYnhpdfWpqfFuMSUM0BHhbwwfMWvvz8V3ufSo5zB9W0F5ElnaGs+9DaKYwrZCx7Iy sX9LJIN1VDWyEh9B507aVc3Srd3J8FXOU7+rKZsSJUT1E1JGt1luN7fSSsFD2kBTlq2y nUnZk1QPhlYQQ7Elnp4L/9l0Mi4VOqcmGeYECPhfOKMY/QJi29rXbs6vz/U7qfA/1cz4 XqMyv1Zxdm7JDD+PVY8PvPcHFWL9smmc92UdSACLmGXIdnBBMMCRItG4NgjUwBY70IYS VmjQ== X-Forwarded-Encrypted: i=1; AJvYcCVJd4qif0W+aT9u3O4fBJD06+jqqJ7unG6JSOwj/nvjgX6Ul9hq5QmU3Fn6VkKXp6L4tvNBu1o/dEtVVVFWqmTpr09SNfcprFzV+YhLjEKnbpR5cqo= X-Gm-Message-State: AOJu0YxVgtbitqdyBjKD4qjUxDKFIpnLQ9wtqpMfb5yIXCWW44yiO9h0 blYlwSjuGVxhVcJYeK4MiPMTXFxezRO/U9+fUWUbtb35jz/A0CxF X-Google-Smtp-Source: AGHT+IFa9AgX8unKF88MadhcDPZ/jUepJlRmfLyQ0lvePZMIMoDyDMB0tqOi5A0+RBgdr38BzgZl0A== X-Received: by 2002:a05:6512:131e:b0:52c:952a:67da with SMTP id 2adb3069b0e04-530bb4d6d4fmr12055574e87.55.1723029620773; Wed, 07 Aug 2024 04:20:20 -0700 (PDT) Received: from [192.168.1.106] (91-139-201-119.stz.ddns.bulsat.com. [91.139.201.119]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5baff14989fsm4376789a12.55.2024.08.07.04.20.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Aug 2024 04:20:20 -0700 (PDT) Message-ID: <5274b8a1-b81c-3979-ed6c-3572f6a6cfc2@gmail.com> Date: Wed, 7 Aug 2024 14:20:18 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v1 08/10] arm64: dts: exynos: Add initial support for exynos8895 SoC Content-Language: en-US To: Krzysztof Kozlowski , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar , Sylwester Nawrocki , Linus Walleij , Rob Herring Cc: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240807082843.352937-1-ivo.ivanov.ivanov1@gmail.com> <20240807082843.352937-9-ivo.ivanov.ivanov1@gmail.com> From: Ivaylo Ivanov In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240807_042023_355383_65C58DFE X-CRM114-Status: GOOD ( 26.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 8/7/24 12:20, Krzysztof Kozlowski wrote: > On 07/08/2024 10:28, ivo.ivanov.ivanov1@gmail.com wrote: >> From: Ivaylo Ivanov >> >> Exynos 8895 SoC is an ARMv8 mobile SoC found in the Samsung Galaxy >> S8 (dreamlte), S8 Plus (dream2lte), Note 8 (greatlte) and the Meizu >> 15 Plus (m1891). Add minimal support for that SoC, including: >> >> - All 8 cores via PSCI >> - ChipID >> - Generic ARMV8 Timer >> - Enumarate all pinctrl nodes >> >> Further platform support will be added over time. >> >> Signed-off-by: Ivaylo Ivanov >> --- >> .../boot/dts/exynos/exynos8895-pinctrl.dtsi | 1378 +++++++++++++++++ >> arch/arm64/boot/dts/exynos/exynos8895.dtsi | 253 +++ >> 2 files changed, 1631 insertions(+) >> create mode 100644 arch/arm64/boot/dts/exynos/exynos8895-pinctrl.dtsi >> create mode 100644 arch/arm64/boot/dts/exynos/exynos8895.dtsi >> >> diff --git a/arch/arm64/boot/dts/exynos/exynos8895-pinctrl.dtsi b/arch/arm64/boot/dts/exynos/exynos8895-pinctrl.dtsi >> new file mode 100644 >> index 000000000..1dcb61e2e >> --- /dev/null >> +++ b/arch/arm64/boot/dts/exynos/exynos8895-pinctrl.dtsi >> @@ -0,0 +1,1378 @@ >> +// SPDX-License-Identifier: BSD-3-Clause >> +/* >> + * Samsung's Exynos 8895 SoC pin-mux and pin-config device tree source >> + * >> + * Copyright (c) 2024, Ivaylo Ivanov >> + */ >> + >> +#include >> +#include "exynos-pinctrl.h" >> + >> +&pinctrl_alive { >> + gpa0: gpa0 { > I do not believe this was tested. See maintainer SoC profile for Samsung > Exynos. > > Limited review follows due to lack of testing. > > >> +}; >> diff --git a/arch/arm64/boot/dts/exynos/exynos8895.dtsi b/arch/arm64/boot/dts/exynos/exynos8895.dtsi >> new file mode 100644 >> index 000000000..3ed381ee5 >> --- /dev/null >> +++ b/arch/arm64/boot/dts/exynos/exynos8895.dtsi >> @@ -0,0 +1,253 @@ >> +// SPDX-License-Identifier: BSD-3-Clause >> +/* >> + * Samsung's Exynos 8895 SoC device tree source >> + * >> + * Copyright (c) 2024, Ivaylo Ivanov >> + */ >> + >> +#include >> + >> +/ { >> + compatible = "samsung,exynos8895"; >> + #address-cells = <2>; >> + #size-cells = <1>; >> + >> + interrupt-parent = <&gic>; >> + >> + aliases { >> + pinctrl0 = &pinctrl_alive; >> + pinctrl1 = &pinctrl_abox; >> + pinctrl2 = &pinctrl_vts; >> + pinctrl3 = &pinctrl_fsys0; >> + pinctrl4 = &pinctrl_fsys1; >> + pinctrl5 = &pinctrl_busc; >> + pinctrl6 = &pinctrl_peric0; >> + pinctrl7 = &pinctrl_peric1; >> + }; >> + >> + arm-a53-pmu { > Are there two pmus? Hm. The Downstream kernel has them all under one node with compatible 'arm,armv8-pmuv3', same as with Exynos 7885. So it should have two PMUs, one for each cluster. Considering the second cluster consists of Samsung's custom Mongoose M2 cores, what would be the most adequate thing to do? Keep the first PMU as "arm,cortex-a53-pmu" and use the SW model "arm,armv8-pmuv3" for the second PMU? I doubt guessing if these mongoose cores are based on already existing cortex cores is a great idea. >> + compatible = "arm,cortex-a53-pmu"; >> + interrupts = , >> + , >> + , >> + , >> + , >> + , >> + , >> + ; >> + interrupt-affinity = <&cpu0>, >> + <&cpu1>, >> + <&cpu2>, >> + <&cpu3>, >> + <&cpu4>, >> + <&cpu5>, >> + <&cpu6>, >> + <&cpu7>; >> + }; >> + >> + cpus { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + cpu-map { >> + cluster0 { >> + core0 { >> + cpu = <&cpu0>; >> + }; >> + core1 { >> + cpu = <&cpu1>; >> + }; >> + core2 { >> + cpu = <&cpu2>; >> + }; >> + core3 { >> + cpu = <&cpu3>; >> + }; >> + }; >> + >> + cluster1 { >> + core0 { >> + cpu = <&cpu4>; >> + }; >> + core1 { >> + cpu = <&cpu5>; >> + }; >> + core2 { >> + cpu = <&cpu6>; >> + }; >> + core3 { >> + cpu = <&cpu7>; >> + }; >> + }; >> + }; >> + >> + cpu0: cpu@100 { >> + device_type = "cpu"; >> + compatible = "arm,cortex-a53"; >> + reg = <0x100>; >> + enable-method = "psci"; >> + }; >> + >> + cpu1: cpu@101 { >> + device_type = "cpu"; >> + compatible = "arm,cortex-a53"; >> + reg = <0x101>; >> + enable-method = "psci"; >> + }; >> + >> + cpu2: cpu@102 { >> + device_type = "cpu"; >> + compatible = "arm,cortex-a53"; >> + reg = <0x102>; >> + enable-method = "psci"; >> + }; >> + >> + cpu3: cpu@103 { >> + device_type = "cpu"; >> + compatible = "arm,cortex-a53"; >> + reg = <0x103>; >> + enable-method = "psci"; >> + }; >> + >> + cpu4: cpu@0 { >> + device_type = "cpu"; >> + compatible = "samsung,mongoose-m2"; >> + reg = <0x0>; >> + enable-method = "psci"; >> + }; >> + >> + cpu5: cpu@1 { >> + device_type = "cpu"; >> + compatible = "samsung,mongoose-m2"; >> + reg = <0x1>; >> + enable-method = "psci"; >> + }; >> + >> + cpu6: cpu@2 { >> + device_type = "cpu"; >> + compatible = "samsung,mongoose-m2"; >> + reg = <0x2>; >> + enable-method = "psci"; >> + }; >> + >> + cpu7: cpu@3 { >> + device_type = "cpu"; >> + compatible = "samsung,mongoose-m2"; >> + reg = <0x3>; >> + enable-method = "psci"; >> + }; >> + }; >> + >> + psci { >> + compatible = "arm,psci"; >> + method = "smc"; >> + cpu_suspend = <0xc4000001>; >> + cpu_off = <0x84000002>; >> + cpu_on = <0xc4000003>; >> + }; >> + >> + timer { >> + compatible = "arm,armv8-timer"; >> + /* Hypervisor Virtual Timer interrupt is not wired to GIC */ >> + interrupts = , >> + , >> + , >> + ; >> + clock-frequency = <26000000>; > Hm? I think this was explicitly disallowed. It's weird. Without the clock-frequency property it fails early during the boot process and I can't get any logs from pstore or simple-framebuffer. Yet it's not set on similar platforms (exynos7885, autov9). Perhaps I could alias the node and set it in the board device tree..? That doesn't sound right. Best regards, Ivaylo >> + }; >> + >> + fixed-rate-clocks { > Keep order of properties, just like DTS coding style asks. > > Anyway, fixed-rate-clocks wrapper is not needed, drop. > >> + oscclk: osc-clock { >> + compatible = "fixed-clock"; >> + #clock-cells = <0>; >> + clock-output-names = "oscclk"; >> + }; >> + }; >> + >> + soc: soc@0 { >> + compatible = "simple-bus"; >> + #address-cells = <1>; >> + #size-cells = <1>; >> + ranges = <0x0 0x0 0x0 0x20000000>; >> + >> + chipid@10000000 { >> + compatible = "samsung,exynos8895-chipid", >> + "samsung,exynos850-chipid"; >> + reg = <0x10000000 0x24>; >> + }; >> + >> + gic: interrupt-controller@10200000 { >> + compatible = "arm,gic-400"; >> + #interrupt-cells = <3>; >> + #address-cells = <0>; >> + interrupt-controller; >> + reg = <0x10201000 0x1000>, >> + <0x10202000 0x1000>, >> + <0x10204000 0x2000>, >> + <0x10206000 0x2000>; >> + interrupts = > + IRQ_TYPE_LEVEL_HIGH)>; >> + }; >> + >> + pinctrl_alive: pinctrl@164b0000 { >> + compatible = "samsung,exynos8895-pinctrl"; >> + reg = <0x164b0000 0x1000>; >> + >> + wakeup-interrupt-controller { >> + compatible = "samsung,exynos8895-wakeup-eint", >> + "samsung,exynos7-wakeup-eint"; >> + interrupt-parent = <&gic>; >> + interrupts = ; >> + }; >> + }; >> + >> + pinctrl_abox: pinctrl@13e60000 { > This does not look ordered. See DTS coding style. > > Best regards, > Krzysztof >