From patchwork Fri Jul 1 19:22:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 12903660 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 72407CCA479 for ; Fri, 1 Jul 2022 19:24:20 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NeLSpGFzR5E4E/k0gS5quQAHIUeuKrwHGA/5zI27iKo=; b=kGRydkF3TH2RMK xmlKCNVVejEmsYufEAM4fLgWeMQY8duO5AbG13ZcfDAqVGFdRUTAOCjv8AdbNEKyLc8qFcwnHjUxB YW1238vHNmkaxVs7jdvnQ8SUYi4nQfDmPUVMCtPNAzVQptC19tVSPoqWqF6FFaimdYo7qTvcu5ZCk 0c2NWqPFqSiuKcIGDnGfJFUnGqa1VTTuH9qkfsr8ygKYVOITS/jXzgnynt42Wt9LWKOHPFzdfNG42 Q6Tbtkc+PXPHTUjRhGYGjgTk9sYIkyJkv55LnaKNAUpjyaQ9E6e5X+Mx2opnXnRIUvf4kzwtG7Q3i GeRYFqGSHftYwp0m2iXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7MFO-006XPO-UQ; Fri, 01 Jul 2022 19:24:10 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o7MFL-006XM8-Co for linux-riscv@lists.infradead.org; Fri, 01 Jul 2022 19:24:08 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 02B3261F72; Fri, 1 Jul 2022 19:24:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EFC7C341C8; Fri, 1 Jul 2022 19:24:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656703445; bh=p4PQCazigD+xmM5i27kOnGV9rsiuwNDpKW4UIqTXJfI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kUBm2m0/La9PmkaEPbAsuSfP6dZwjsuaeiPTbuUAJk5tIsVOpXtDngNwIqrBzt6ut mzxx5PsisykiMAj6f5V4p0kGj6Uk74t8zFgFh0cX7/vBvhep7u3IGKnljr6fbA368C ZS5SG3jCRkRW1lf3v893YwzS2pslqlh5ANGVF6ze3UNgonSjmumqc90lGKJ/ZjuF+c 13AVgK15YjcoJ0o+Wqs40RQAVXuS//1Evjx3MH/hzkRYYPJ+pAxsk5FqNkuIILiHB1 TUvuEo6eRCFm6SJcJ8PazdbKKMeokz7OxKr4WCT0MyNfaokdWQdbMgWuoLbLadS+3m 67c6YRmTiRaBQ== From: Conor Dooley To: David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Thierry Reding , Sam Ravnborg , Eugeniy Paltsev , Vinod Koul , Liam Girdwood , Mark Brown , Serge Semin , Daniel Lezcano , Palmer Dabbelt , Palmer Dabbelt Cc: Paul Walmsley , Albert Ou , Conor Dooley , Masahiro Yamada , Damien Le Moal , Geert Uytterhoeven , Niklas Cassel , Dillon Min , Jose Abreu , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, alsa-devel@alsa-project.org, linux-riscv@lists.infradead.org Subject: [PATCH v4 05/14] dt-bindings: memory-controllers: add canaan k210 sram controller Date: Fri, 1 Jul 2022 20:22:51 +0100 Message-Id: <20220701192300.2293643-6-conor@kernel.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220701192300.2293643-1-conor@kernel.org> References: <20220701192300.2293643-1-conor@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220701_122407_612660_0394CD7F X-CRM114-Status: GOOD ( 15.55 ) 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: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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..82be32757713 --- /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 initialised and programmed by + firmware, but an OS might want to read its registers for error reporting + purposes and to learn about the DRAM topology. + +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"; + };