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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F635C433EF for ; Sun, 10 Jul 2022 23:21:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229512AbiGJXVV (ORCPT ); Sun, 10 Jul 2022 19:21:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbiGJXVU (ORCPT ); Sun, 10 Jul 2022 19:21:20 -0400 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9672013DDF for ; Sun, 10 Jul 2022 16:21:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1657495279; x=1689031279; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=2bOuAF8hy4hQXexxGrNRideeT3L1vDk2fxucN4Onkrw=; b=J0Ix4y7nPfwEbfpJBcPHVcFH1dRL8op8ZKJyOHi/GXhiRUvbDRztXOZ8 00+y9GbAZzzoFUUSz//4oudp39RHX/moFgI16JKdDcm/ETbPiYl/Hz/u3 gs58p1dIVTrBuQ1QylrMIexdeaEEAggRKeIgQn1Z+/NRCmzkZA4QY2kgW RPSpLnzOk8C6UNeqQpXhvH5i1QI8fh7J2FJhPVOeqZt792R/yejvGX5CP c1l1whsOZK6r4Y6rXe5vfcmlXCbH+5ITjqCximxkTNugawUjagxyGjNBV co3MrM/OuuzeD4m3hDcs7YizV83CVaExHNAPQqlCoQErhhCv80E3hj7aZ g==; X-IronPort-AV: E=Sophos;i="5.92,261,1650902400"; d="scan'208";a="203957768" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 11 Jul 2022 07:21:18 +0800 IronPort-SDR: e4/oocBBaS2xC0MXbwQuS2PucC08CjcdeymSiqRTOgeBqEnRAFFyAHNBT9CHCKQWjGd85ORCMA UJiakjG25YfoqWhor8UzKxy+A4z/IsU3fp+snnkNRsbtKHLzkiNzpdAhdu2d7nfIkmS3kWbL8a NGFxa8c4ca+mpI1XOQnswsLMM+aO9Q0G7DKvjNJ7VhmHu0M1k10+R4x4NpUVCH0HLlbnLIAysJ 5Wu6PH3Y6Zv4gj7L6zGIIY+/rqEb2MaQQ8LViAC3oQTfQdRt80z6oUJSSMD2QfIwYuryE7P2La C1IDMfyKB9+wviwkDWB/UZoo Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 10 Jul 2022 15:42:56 -0700 IronPort-SDR: bPYCubOm9Az718mll43jnrvV0nDfrOg4PZdTmEnzwFyoLLd/q2rH3IK3txFAya8j9anv0j8A9V 7OOMMvq72MBw8ET5v4+qlvaI64+C/06C4+51HwIax9+ELv3cQQMJoy2SJgFT1rk8/+Xq9LG5wg 5V2yMF2vCXuUAmHxwvmevXzg+69Npydm+bQAG54pB0dsK4MlHQx0lrT1fVWPrY1BZzeR8C3hOG 17KFMxgXdG9ivgbZAzKfDSZ/jklUKx7uvUJejfOKiG63ktIsJZ87sslvMfgVb9ckZ0IUCIRZTg 7EA= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 10 Jul 2022 16:21:18 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4Lh31971SFz1Rwqy for ; Sun, 10 Jul 2022 16:21:17 -0700 (PDT) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1657495276; x=1660087277; bh=2bOuAF8hy4hQXexxGrNRideeT3L1vDk2fxu cN4Onkrw=; b=iY63mouJ51j7XgRwIzOQn2aNTZVGHkHmYlbv3oLuDn/RDNSJ7js fnWlCx5bkYECfSDwfPKXZH28vOy4xBFbYfUEkxA1Bk0W2tEB7xhgqTeJ+Ap/DWQg hnU2JJ6onNNBChD6gz9Kl/vSpx1TSHHOgot2/Uqfdxc4DnIvZSx6VX+6PdzkD70r YVqYdcosyHDk94OS6MzUxZOSvEXaAvw/o45nGZ12hsI/wy+QaFd1V1Sg5eJIOY1P zhOxlrFrGxL9GVwUBo0k2YY10LMCSiITH68OuumTq2EHMgRnenXg9PofTScTe5mF NsDo8QkwxLeJkbWK48XERzZy97CMD3y6pOA== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id SAZMR3E9O9cG for ; Sun, 10 Jul 2022 16:21:16 -0700 (PDT) Received: from [10.225.163.114] (unknown [10.225.163.114]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4Lh31457fMz1RtVk; Sun, 10 Jul 2022 16:21:12 -0700 (PDT) Message-ID: Date: Mon, 11 Jul 2022 08:21:11 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v5 04/13] dt-bindings: memory-controllers: add canaan k210 sram controller Content-Language: en-US To: Conor.Dooley@microchip.com, krzysztof.kozlowski+dt@linaro.org Cc: daniel.lezcano@linaro.org, Eugeniy.Paltsev@synopsys.com, sam@ravnborg.org, daniel@ffwll.ch, paul.walmsley@sifive.com, vkoul@kernel.org, palmer@rivosinc.com, airlied@linux.ie, palmer@dabbelt.com, aou@eecs.berkeley.edu, robh+dt@kernel.org, masahiroy@kernel.org, geert@linux-m68k.org, niklas.cassel@wdc.com, dillon.minfei@gmail.com, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-riscv@lists.infradead.org, fancer.lancer@gmail.com, thierry.reding@gmail.com, mail@conchuod.ie References: <20220705215213.1802496-1-mail@conchuod.ie> <20220705215213.1802496-5-mail@conchuod.ie> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 7/11/22 04:39, Conor.Dooley@microchip.com wrote: > Damien, Krzysztof, > > I know this particular version has not been posted for all that > long, but this binding is (functionally) unchanged for a few > versions now. Are you happy with this approach Damien? > U-Boot only cares about the compatible & the clocks property, > not the regs etc. > > I (lazily) tested it in U-Boot with the following diff: If both the kernel and u-boot still work as expected with this change, I am OK with it. > > diff --git a/arch/riscv/dts/k210.dtsi b/arch/riscv/dts/k210.dtsi > index 3cc8379133..314db88340 100644 > --- a/arch/riscv/dts/k210.dtsi > +++ b/arch/riscv/dts/k210.dtsi > @@ -82,11 +82,14 @@ > > sram: memory@80000000 { > device_type = "memory"; > + reg = <0x80000000 0x400000>, /* sram0 4 MiB */ > + <0x80400000 0x200000>, /* sram1 2 MiB */ > + <0x80600000 0x200000>; /* aisram 2 MiB */ > + u-boot,dm-pre-reloc; > + }; > + > + sram_controller: memory-controller { > compatible = "canaan,k210-sram"; > - reg = <0x80000000 0x400000>, > - <0x80400000 0x200000>, > - <0x80600000 0x200000>; > - reg-names = "sram0", "sram1", "aisram"; > clocks = <&sysclk K210_CLK_SRAM0>, > <&sysclk K210_CLK_SRAM1>, > <&sysclk K210_CLK_AI>; > > If so, could you queue this for 5.20 please Krzysztof, unless > you've got concerns about it? > > Thanks, > Conor. > > On 05/07/2022 22:52, Conor Dooley wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >> >> From: Conor Dooley >> >> The k210 U-Boot port has been using the clocks defined in the >> devicetree to bring up the board's SRAM, but this violates the >> dt-schema. As such, move the clocks to a dedicated node with >> the same compatible string & document it. >> >> Signed-off-by: Conor Dooley >> --- >> .../memory-controllers/canaan,k210-sram.yaml | 52 +++++++++++++++++++ >> 1 file changed, 52 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/memory-controllers/canaan,k210-sram.yaml >> >> diff --git a/Documentation/devicetree/bindings/memory-controllers/canaan,k210-sram.yaml b/Documentation/devicetree/bindings/memory-controllers/canaan,k210-sram.yaml >> new file mode 100644 >> index 000000000000..f81fb866e319 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/memory-controllers/canaan,k210-sram.yaml >> @@ -0,0 +1,52 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/memory-controllers/canaan,k210-sram.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Canaan K210 SRAM memory controller >> + >> +description: >> + The Canaan K210 SRAM memory controller is responsible for the system's 8 MiB >> + of SRAM. The controller is initialised by the bootloader, which configures >> + its clocks, before OS bringup. >> + >> +maintainers: >> + - Conor Dooley >> + >> +properties: >> + compatible: >> + enum: >> + - canaan,k210-sram >> + >> + clocks: >> + minItems: 1 >> + items: >> + - description: sram0 clock >> + - description: sram1 clock >> + - description: aisram clock >> + >> + clock-names: >> + minItems: 1 >> + items: >> + - const: sram0 >> + - const: sram1 >> + - const: aisram >> + >> +required: >> + - compatible >> + - clocks >> + - clock-names >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include >> + memory-controller { >> + compatible = "canaan,k210-sram"; >> + clocks = <&sysclk K210_CLK_SRAM0>, >> + <&sysclk K210_CLK_SRAM1>, >> + <&sysclk K210_CLK_AI>; >> + clock-names = "sram0", "sram1", "aisram"; >> + }; >> -- >> 2.37.0 >> > -- Damien Le Moal Western Digital Research 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 7BECAC43334 for ; Sun, 10 Jul 2022 23:21:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7509F8A801; Sun, 10 Jul 2022 23:21:22 +0000 (UTC) Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6D7C68A80A for ; Sun, 10 Jul 2022 23:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1657495278; x=1689031278; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=2bOuAF8hy4hQXexxGrNRideeT3L1vDk2fxucN4Onkrw=; b=UCMS0riGhOxQ5wNuHTdB5Z4VOj08tOA+e/ydmXplTq1uxWac8z6e4N+b kAHddfmeFCE2Iy8Bf1Qzee6xkur49e7GqzEpHe+zQfTriwUWH0cSrtqQn c+K1EWasfgcemEe3FJvLIqzMD/x2QSUn0OF2cqHqnh6cMiI2E6Ms2K3kU 1LFo3Jqi5+20V393Z/xBHm8qmPpntK0V0ApXRHSwMCC0N+aALc+M3Ah5K hXuVJeF5Wze/zhMvQv8HRwNUFCYbnxTAugYr/aqaVXUjT1wdGMJVqW0+y 0ZQaor6IvixVPCh5Krv/mROcWtBI1hgYIKkaAVvjuw2TZpDFWOYTP/Psn A==; X-IronPort-AV: E=Sophos;i="5.92,261,1650902400"; d="scan'208";a="210243194" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 11 Jul 2022 07:21:17 +0800 IronPort-SDR: nnrdEybXqWi6P+dIitKGEizDrM2ea5A5nRDpc/Ci322hTUPnoCezWaZ5rG0s54e4eavEgGVu25 Kw+mGM8UcEXZ9tU9Av3hrApzKUBh+DasDT6nYPNelGTpWEqtBKk3ttlAEysPjYD+XsnbQwAqUc ZZs17UBNPlCzXVyRRiXUM/X+DYnnkudiSE4w4rXjS+WzcWhI+eaPMP2k/mFYmrBwIKQvsjZkq4 72KqWuabp+MdBIAIekHd1WiOFqIFMBcs88MdggXeZG6Ix4k+wY0KHi7xPxbB5N6rufZRHJQP4X CkxR4h5fFnd5fSTtQLgsetAn Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 10 Jul 2022 15:42:56 -0700 IronPort-SDR: c9HHVWJDcZZ4WsTMnQmhYr1xUhGeE7aZ6CzvU2PdMcqWzK7qaWnlNB91pGmON3D4BNvbXLIO00 izn4+A3MlNJvmMRZAV4lnY8aWSWm5Te2OUOuTyO5hkuLVXJfZTSU6kHyxKZ3Bnm6kJkWtYgGHZ YJs/81RENsvjhV9zr5vAWQlgP6Fis4uhfJjflPMvOE5SX8w+mqpKLJyYWpR8xZEQ2qiDvyQRG7 93Q218EF3faNoJ2W/3326ZXPBZBsqyEET0efvKwTLHUIMQULS0hwV3PHg6XaUeinK3RHB86BD1 TCY= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 10 Jul 2022 16:21:18 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4Lh31B2ctmz1Rws0 for ; Sun, 10 Jul 2022 16:21:18 -0700 (PDT) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1657495276; x=1660087277; bh=2bOuAF8hy4hQXexxGrNRideeT3L1vDk2fxu cN4Onkrw=; b=iY63mouJ51j7XgRwIzOQn2aNTZVGHkHmYlbv3oLuDn/RDNSJ7js fnWlCx5bkYECfSDwfPKXZH28vOy4xBFbYfUEkxA1Bk0W2tEB7xhgqTeJ+Ap/DWQg hnU2JJ6onNNBChD6gz9Kl/vSpx1TSHHOgot2/Uqfdxc4DnIvZSx6VX+6PdzkD70r YVqYdcosyHDk94OS6MzUxZOSvEXaAvw/o45nGZ12hsI/wy+QaFd1V1Sg5eJIOY1P zhOxlrFrGxL9GVwUBo0k2YY10LMCSiITH68OuumTq2EHMgRnenXg9PofTScTe5mF NsDo8QkwxLeJkbWK48XERzZy97CMD3y6pOA== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id HhQR4Gm2WjPV for ; Sun, 10 Jul 2022 16:21:16 -0700 (PDT) Received: from [10.225.163.114] (unknown [10.225.163.114]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4Lh31457fMz1RtVk; Sun, 10 Jul 2022 16:21:12 -0700 (PDT) Message-ID: Date: Mon, 11 Jul 2022 08:21:11 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v5 04/13] dt-bindings: memory-controllers: add canaan k210 sram controller Content-Language: en-US To: Conor.Dooley@microchip.com, krzysztof.kozlowski+dt@linaro.org References: <20220705215213.1802496-1-mail@conchuod.ie> <20220705215213.1802496-5-mail@conchuod.ie> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: niklas.cassel@wdc.com, airlied@linux.ie, palmer@rivosinc.com, thierry.reding@gmail.com, linux-riscv@lists.infradead.org, sam@ravnborg.org, masahiroy@kernel.org, daniel.lezcano@linaro.org, geert@linux-m68k.org, Eugeniy.Paltsev@synopsys.com, devicetree@vger.kernel.org, aou@eecs.berkeley.edu, robh+dt@kernel.org, dri-devel@lists.freedesktop.org, paul.walmsley@sifive.com, mail@conchuod.ie, dillon.minfei@gmail.com, linux-kernel@vger.kernel.org, fancer.lancer@gmail.com, vkoul@kernel.org, palmer@dabbelt.com, dmaengine@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 7/11/22 04:39, Conor.Dooley@microchip.com wrote: > Damien, Krzysztof, > > I know this particular version has not been posted for all that > long, but this binding is (functionally) unchanged for a few > versions now. Are you happy with this approach Damien? > U-Boot only cares about the compatible & the clocks property, > not the regs etc. > > I (lazily) tested it in U-Boot with the following diff: If both the kernel and u-boot still work as expected with this change, I am OK with it. > > diff --git a/arch/riscv/dts/k210.dtsi b/arch/riscv/dts/k210.dtsi > index 3cc8379133..314db88340 100644 > --- a/arch/riscv/dts/k210.dtsi > +++ b/arch/riscv/dts/k210.dtsi > @@ -82,11 +82,14 @@ > > sram: memory@80000000 { > device_type = "memory"; > + reg = <0x80000000 0x400000>, /* sram0 4 MiB */ > + <0x80400000 0x200000>, /* sram1 2 MiB */ > + <0x80600000 0x200000>; /* aisram 2 MiB */ > + u-boot,dm-pre-reloc; > + }; > + > + sram_controller: memory-controller { > compatible = "canaan,k210-sram"; > - reg = <0x80000000 0x400000>, > - <0x80400000 0x200000>, > - <0x80600000 0x200000>; > - reg-names = "sram0", "sram1", "aisram"; > clocks = <&sysclk K210_CLK_SRAM0>, > <&sysclk K210_CLK_SRAM1>, > <&sysclk K210_CLK_AI>; > > If so, could you queue this for 5.20 please Krzysztof, unless > you've got concerns about it? > > Thanks, > Conor. > > On 05/07/2022 22:52, Conor Dooley wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >> >> From: Conor Dooley >> >> The k210 U-Boot port has been using the clocks defined in the >> devicetree to bring up the board's SRAM, but this violates the >> dt-schema. As such, move the clocks to a dedicated node with >> the same compatible string & document it. >> >> Signed-off-by: Conor Dooley >> --- >> .../memory-controllers/canaan,k210-sram.yaml | 52 +++++++++++++++++++ >> 1 file changed, 52 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/memory-controllers/canaan,k210-sram.yaml >> >> diff --git a/Documentation/devicetree/bindings/memory-controllers/canaan,k210-sram.yaml b/Documentation/devicetree/bindings/memory-controllers/canaan,k210-sram.yaml >> new file mode 100644 >> index 000000000000..f81fb866e319 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/memory-controllers/canaan,k210-sram.yaml >> @@ -0,0 +1,52 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/memory-controllers/canaan,k210-sram.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Canaan K210 SRAM memory controller >> + >> +description: >> + The Canaan K210 SRAM memory controller is responsible for the system's 8 MiB >> + of SRAM. The controller is initialised by the bootloader, which configures >> + its clocks, before OS bringup. >> + >> +maintainers: >> + - Conor Dooley >> + >> +properties: >> + compatible: >> + enum: >> + - canaan,k210-sram >> + >> + clocks: >> + minItems: 1 >> + items: >> + - description: sram0 clock >> + - description: sram1 clock >> + - description: aisram clock >> + >> + clock-names: >> + minItems: 1 >> + items: >> + - const: sram0 >> + - const: sram1 >> + - const: aisram >> + >> +required: >> + - compatible >> + - clocks >> + - clock-names >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include >> + memory-controller { >> + compatible = "canaan,k210-sram"; >> + clocks = <&sysclk K210_CLK_SRAM0>, >> + <&sysclk K210_CLK_SRAM1>, >> + <&sysclk K210_CLK_AI>; >> + clock-names = "sram0", "sram1", "aisram"; >> + }; >> -- >> 2.37.0 >> > -- Damien Le Moal Western Digital Research 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 5F193C43334 for ; Sun, 10 Jul 2022 23:21:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id: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=/AA259z7mmKI1W2o8CeXFVaEBPDFhO3lSc3PUcTTx0Y=; b=fTkLzEE3/70Vhn N0bq30mE27mdzH7WaRJDShwqtWl5MnSJZKKzf/29WMVk26+bQR8o4uiF7bfqXlx/J30s5rdwDa9PE muj2+5p6Q0mmgSYU4zznYN9mwCcnD8WdQpoGdjSAzHBGIznTim6A1dWijNFhJD75Xo3Q6vo3+Ybsr z8gcHleopXxVWe0dg9Oh4kTaC2AbeqQKfvb+IkdLQnL6SeblpmDvzoydm3Tq5+lOuMtgY+CC9zp8B 5U9h+epWkfdc4q9Abiiy+SwJQ4th4gvPtYaS+YebiEeOBFZT5Ifd/vf0LEvNJTukQHRDi5QoDxHIU gSqNbY81gSEa4W6acxzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAgEu-00EET6-Tq; Sun, 10 Jul 2022 23:21:24 +0000 Received: from esa5.hgst.iphmx.com ([216.71.153.144]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAgEr-00EERB-QN for linux-riscv@lists.infradead.org; Sun, 10 Jul 2022 23:21:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1657495280; x=1689031280; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=2bOuAF8hy4hQXexxGrNRideeT3L1vDk2fxucN4Onkrw=; b=IkPgbY+bFu8TN7C1SgTEdc8wEgy1tVic6r6D+wPCPw4ILUNvVvG0jGuj 4EiudP2RLqwKABVeSgG4enjTLoU5zrQ2YQjwTl9AoVmf5b6leigVZpCfJ yVa4343dGloXkudGmJVeoH4qJdWdETrqp6cvz65bWQamyUE/AN/wPFnRv y7+igniMFYeENBZYS8d7PYq0FEd9FP1V9UtCvMeOekFEAQ5antWVmhlPx Tf1cbcM5vvtyAOoIJU9v2Rf+WWbHOxoTJ54gLiNSXEOELbGUMPXuZb5Z9 jgiIjuQ/+QqHNbSJoqdUzLZdf298JpRweiH0UP4Un/UlFj1n0tjuMmK76 w==; X-IronPort-AV: E=Sophos;i="5.92,261,1650902400"; d="scan'208";a="205310603" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 11 Jul 2022 07:21:19 +0800 IronPort-SDR: yAOBXal1FNopj8ONuX5+lGbk//nuYidge1woBHOHG1FcNI3h7ZVI4h2MhtapwbR7hmkCQxG2P3 G7+/H/GGZlJQwFB6iTsGf5TrXnVe7HHmBhYMmHNJqL0oA3r1Ej4KLLEMa3hDnayzApk3hn2MbJ hTZ0SguA22Fv4eZoHhzu+LXSiltVxtXWX5jeWUz3Yesl7HzBNGwg1GpEHeDKG6VxYp61u6U90b /TxzSiJAjhH0JrGLLcQ1tk55tjV4DuP0pgcCEF/7dk9xH7ug0o2QHDfBBVd8IaR0QIytChCA1g i1ZPOeKPfAq2r7Tzji9nj1WW Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 10 Jul 2022 15:38:19 -0700 IronPort-SDR: 9rF9WJ/7JwsWTzKCrL9kGptmPo/qxOfWzOrhQnpiKd48DxPNPYnIrZ1GABLbc+Gy8p60EteAK6 SNHJuYM/z52kEy1+ngP91o1zd0CnJ54XJycZt/qQYeSyBteVYS7kcTm5QyWEI0DuS7RMWZi9GH xKzKEEixnhJH9jzV6AdMcPLn4K24vxp2aY3xlSk/YcPuy//T55ZIOHxspONsbEdLlKgOS+u29U 0oHzvzW+Pe6kYcmMOII0j2TKSWd5g1iEeC+pfjT/Qx01sRxllT9fQ90jO6lgzvQnee4BNkidxL sjg= WDCIronportException: Internal Received: from usg-ed-osssrv.wdc.com ([10.3.10.180]) by uls-op-cesaip02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 10 Jul 2022 16:21:19 -0700 Received: from usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTP id 4Lh31B4m38z1Rws9 for ; Sun, 10 Jul 2022 16:21:18 -0700 (PDT) Authentication-Results: usg-ed-osssrv.wdc.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=opensource.wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= opensource.wdc.com; h=content-transfer-encoding:content-type :in-reply-to:organization:from:references:to:content-language :subject:user-agent:mime-version:date:message-id; s=dkim; t= 1657495277; x=1660087278; bh=2bOuAF8hy4hQXexxGrNRideeT3L1vDk2fxu cN4Onkrw=; b=kxS1F6L5H2NuC1e0EsIrSS2qOKt1uW1gnwr4/ZYgc/u51C5hUcj Yt0EDzPhgnwjcHMctndopkXeXDdwTCtKnxbpyWirRuwVpR+7EwFsaTPRkQIhnqZ8 7mCwyW4FJMnnppCjhv4TliQpoICRu3gOfhB9Es0z2pXiadJ5kyxxmInzP4hEHKg+ e1NRnJmCoXF1OAC+iwzHAVF9C5RXdGhhseyYlkIFdlIqzXgfXYDkniSA+7ZNbCof UJfmLMSVLcqwkW8fFO2Tlz1pBVnkNKr9+aiB6XSCFHS3cPiYGauGATquDaUvoyg+ sDBx9W5QT5vDXVVeDvqOJjEnn6mwueYk91Q== X-Virus-Scanned: amavisd-new at usg-ed-osssrv.wdc.com Received: from usg-ed-osssrv.wdc.com ([127.0.0.1]) by usg-ed-osssrv.wdc.com (usg-ed-osssrv.wdc.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kRPp9oSZuxrW for ; Sun, 10 Jul 2022 16:21:17 -0700 (PDT) Received: from [10.225.163.114] (unknown [10.225.163.114]) by usg-ed-osssrv.wdc.com (Postfix) with ESMTPSA id 4Lh31457fMz1RtVk; Sun, 10 Jul 2022 16:21:12 -0700 (PDT) Message-ID: Date: Mon, 11 Jul 2022 08:21:11 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v5 04/13] dt-bindings: memory-controllers: add canaan k210 sram controller Content-Language: en-US To: Conor.Dooley@microchip.com, krzysztof.kozlowski+dt@linaro.org Cc: daniel.lezcano@linaro.org, Eugeniy.Paltsev@synopsys.com, sam@ravnborg.org, daniel@ffwll.ch, paul.walmsley@sifive.com, vkoul@kernel.org, palmer@rivosinc.com, airlied@linux.ie, palmer@dabbelt.com, aou@eecs.berkeley.edu, robh+dt@kernel.org, masahiroy@kernel.org, geert@linux-m68k.org, niklas.cassel@wdc.com, dillon.minfei@gmail.com, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-riscv@lists.infradead.org, fancer.lancer@gmail.com, thierry.reding@gmail.com, mail@conchuod.ie References: <20220705215213.1802496-1-mail@conchuod.ie> <20220705215213.1802496-5-mail@conchuod.ie> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220710_162121_898717_7B7E544F X-CRM114-Status: GOOD ( 27.88 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 7/11/22 04:39, Conor.Dooley@microchip.com wrote: > Damien, Krzysztof, > > I know this particular version has not been posted for all that > long, but this binding is (functionally) unchanged for a few > versions now. Are you happy with this approach Damien? > U-Boot only cares about the compatible & the clocks property, > not the regs etc. > > I (lazily) tested it in U-Boot with the following diff: If both the kernel and u-boot still work as expected with this change, I am OK with it. > > diff --git a/arch/riscv/dts/k210.dtsi b/arch/riscv/dts/k210.dtsi > index 3cc8379133..314db88340 100644 > --- a/arch/riscv/dts/k210.dtsi > +++ b/arch/riscv/dts/k210.dtsi > @@ -82,11 +82,14 @@ > > sram: memory@80000000 { > device_type = "memory"; > + reg = <0x80000000 0x400000>, /* sram0 4 MiB */ > + <0x80400000 0x200000>, /* sram1 2 MiB */ > + <0x80600000 0x200000>; /* aisram 2 MiB */ > + u-boot,dm-pre-reloc; > + }; > + > + sram_controller: memory-controller { > compatible = "canaan,k210-sram"; > - reg = <0x80000000 0x400000>, > - <0x80400000 0x200000>, > - <0x80600000 0x200000>; > - reg-names = "sram0", "sram1", "aisram"; > clocks = <&sysclk K210_CLK_SRAM0>, > <&sysclk K210_CLK_SRAM1>, > <&sysclk K210_CLK_AI>; > > If so, could you queue this for 5.20 please Krzysztof, unless > you've got concerns about it? > > Thanks, > Conor. > > On 05/07/2022 22:52, Conor Dooley wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe >> >> From: Conor Dooley >> >> The k210 U-Boot port has been using the clocks defined in the >> devicetree to bring up the board's SRAM, but this violates the >> dt-schema. As such, move the clocks to a dedicated node with >> the same compatible string & document it. >> >> Signed-off-by: Conor Dooley >> --- >> .../memory-controllers/canaan,k210-sram.yaml | 52 +++++++++++++++++++ >> 1 file changed, 52 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/memory-controllers/canaan,k210-sram.yaml >> >> diff --git a/Documentation/devicetree/bindings/memory-controllers/canaan,k210-sram.yaml b/Documentation/devicetree/bindings/memory-controllers/canaan,k210-sram.yaml >> new file mode 100644 >> index 000000000000..f81fb866e319 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/memory-controllers/canaan,k210-sram.yaml >> @@ -0,0 +1,52 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/memory-controllers/canaan,k210-sram.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Canaan K210 SRAM memory controller >> + >> +description: >> + The Canaan K210 SRAM memory controller is responsible for the system's 8 MiB >> + of SRAM. The controller is initialised by the bootloader, which configures >> + its clocks, before OS bringup. >> + >> +maintainers: >> + - Conor Dooley >> + >> +properties: >> + compatible: >> + enum: >> + - canaan,k210-sram >> + >> + clocks: >> + minItems: 1 >> + items: >> + - description: sram0 clock >> + - description: sram1 clock >> + - description: aisram clock >> + >> + clock-names: >> + minItems: 1 >> + items: >> + - const: sram0 >> + - const: sram1 >> + - const: aisram >> + >> +required: >> + - compatible >> + - clocks >> + - clock-names >> + >> +additionalProperties: false >> + >> +examples: >> + - | >> + #include >> + memory-controller { >> + compatible = "canaan,k210-sram"; >> + clocks = <&sysclk K210_CLK_SRAM0>, >> + <&sysclk K210_CLK_SRAM1>, >> + <&sysclk K210_CLK_AI>; >> + clock-names = "sram0", "sram1", "aisram"; >> + }; >> -- >> 2.37.0 >> > -- Damien Le Moal Western Digital Research _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv