Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2833317imw; Sun, 10 Jul 2022 16:49:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1su7nC04Tpu3pHrWlRNNkyVRyL+Xl1R7s1tv2n0OLc6f1tfuoCKHrxeUZgC34H6kceVRETb X-Received: by 2002:a17:90b:390e:b0:1ed:1133:8711 with SMTP id ob14-20020a17090b390e00b001ed11338711mr14181991pjb.90.1657496942997; Sun, 10 Jul 2022 16:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657496942; cv=none; d=google.com; s=arc-20160816; b=aRzh6cOuZcV5kJEouCB+VhSVSom7qAxJPPTZrEhp228NBuoDagnG8ZpddhxmDkxS0+ GbGSSL7Z1hVKXZnsjlFFoAiN/bdKzWkjasMTFJJtMBZHLXJfs7ZgL3Uj4Qs90UNUJZXN SF8On0RRsDyGevrlilaJCaEe8bUcwX77KGh7K8/eKSHZjH6E3/HPX8fF11F5O5pnOJ0t YdHIWy8dlzUa2r9DCh4BBis7E3eGvAlGQKKIQy7cpS3jgBUiRJam/PVmnQqjdgpLGWDd lFVhUQV3zkzj6Yud3hQQ3jISKkb1cJqQwEAT8NPG/pVREH3+g/POVgnilTZZwsJyrsuQ yRTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature :wdcironportexception:ironport-sdr:ironport-sdr:dkim-signature; bh=ZKy1b7jtSWh4KwogrilrEX+6JmOiHLfbhq5NbwT8Xik=; b=PFL+Bqlw4Tv+JMF9aUJxuvhnQhIPc7I9v+mcjRdtf8fO6wIgCItz4eCNZQcBSVJt2d xN0fCrIrA9lXolCO2IWAhDYM4kh63AC7+i349udOxWsFx+3b3RgbQxM0S97gHioCI3c9 bIYvJ52epPQc8Gd4o8csjIZkSLwrcVfoecktDDHUqTMlYD1mD8gccRuSZU8bAzPX1sEH NROIrzRDCBJL8Pn7y0FMD3I3Pah5aWk4b0EQno2dHDRKROz/pi+HkBDMcbqDqAGo6jTp 24RYS0FShkjOncJefHE6Z4F+/FbYGd1iWuPUwQ+omGYxB3l3E+SnhMYtiXullXApm0mK KjKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=IkPgbY+b; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b=kxS1F6L5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c7-20020a630d07000000b0040cc512db07si7302751pgl.230.2022.07.10.16.48.51; Sun, 10 Jul 2022 16:49:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=IkPgbY+b; dkim=pass header.i=@opensource.wdc.com header.s=dkim header.b=kxS1F6L5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=opensource.wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229521AbiGJXVX (ORCPT + 99 others); Sun, 10 Jul 2022 19:21:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbiGJXVV (ORCPT ); Sun, 10 Jul 2022 19:21:21 -0400 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C86E13DED for ; Sun, 10 Jul 2022 16:21:21 -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=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="203957772" 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:19 +0800 IronPort-SDR: DravGiq8zRFVKQtm68larEHcfLWZn5WDRXCdyh5OuTNJ8PQR1xazdei/KgHYOUfj5kdGP951jY B/HM2QS9lh4B13FTBi1Wm75YprIqc884XOKTxsndDOGUrH9v8lrGDQXvRf/sp4vW8+G9JIHL48 caj4f7AH7A3m9jl5KWdakvu+mpI4/VvHidoCuXyuKCEBxFd4aNKlM4v3Q2VeYJl9LXd2QlDvX7 x5xdayr6IiATIQ5T/PgXuf7FLB61c50VOeZBxbecppA1PJjpchYiUnEpegScTQdr2UdHbghgA7 TtbPMa12jRvdTO9mPQgOl6iM 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:57 -0700 IronPort-SDR: Bp4mKIu9Wf4yD+wXbevWd7SPkOaSYk2PUJ//lNfSrSYl6HXXffdEL0hmy4w92DXWj/hvUlTLll +E/dW6uAQMumyGKaMV38isz2bSqQ8+3gz4CBVMbz+at3iVncaoNYoFyWSEg0u2HW+GtOl0rNPM eLp+ATX1iOyLUXWSII11iZkFYNtj29ZR1qVEBpGP1F8a6a7weNR8bG4B7GzoOYWOUClkzbjW6D o4zs3uL7dPIOJycWU1fBEfZkxO1uIvQ5e6vVJfzcREmaSLxehWyEwpjg8U7lXHmIoHH9xaSTEg qKc= 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 4Lh31B4bqbz1Rws7 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 w1Scb0dn4JbR 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: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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