From patchwork Fri Aug 30 08:19:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dharma Balasubiramani X-Patchwork-Id: 13784549 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 6ABB3CA0EED for ; Fri, 30 Aug 2024 08:24:47 +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:CC:To:In-Reply-To:References :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ppJSWWE+u4Ec3dRXifrc4BoANgfYRE3ohrgAdlp7q+o=; b=Gp0u1JSaS/oRNGuCYQ0u10rYwY U95ODqnTdaQj9AiFRn/L+Sc4u0LYqaD43y10cA869RsrR/+KjOYPFZilEfp2Pa2TC0nZMIzmj6L5s MR5/z2EbJfrr+J4KHaPPGpGlpnnP7Z3Xi7jtpEZ2gOZYQQVYPao7VhTYx5Fm0vlaTbiwDaQO7wHRI qQY/BHaOwKNPVHt6KrmP27ska7Uem+Qr64e2hkI0AqWPsWsbv7OQowMtt+00JjYkwwrav7z4HKFaS buSexZEuRn2Y/5eDm6SEigiAY1WuKaiqfSevan3G4koWfO5zSIbZTTZcPvp4jeqZnfCv2GAELYxDS DaiM46EQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjwvq-00000005Kbb-1efD; Fri, 30 Aug 2024 08:24:34 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjwrp-00000005JPV-1CzI for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2024 08:20:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1725006025; x=1756542025; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=UzbISEjJbeJYIzdRh5vu4UtMWF3hngm+ARmtvyIeqms=; b=b2ou+cMtLx42YYaa/0UvtIXBBResKUwqipYjmSk8vYog/VGYbF4rcrCL p4k5eHZ4IcBZzaXJ9aTHaouqrnW8FQSPfmkF02e4KVBLjhi/6fzqXU9Yq WUKx9uPCwNCMyxd0uKeQYZoHDI7CflKhj7rDnq4tk/OApNEWdr2za36G4 KafVV/Na3m1vJ/oysj/ao306N9a1B0NNbE7Vsiq70Zuc1KFHqTTyr8gab o2EsTMMPa4f7yXgDEBmquiR1Zg/fOCN5V+MJOLMEwsiWHbOMCrkVF5nff 5b1Rp4yrNrOqfABjwDfrAgSNuZ/InhPRQQALlfRcDAQrcxOs8wqFJmnfn Q==; X-CSE-ConnectionGUID: Ea7i2hfpR3mZRIVK2YOgEg== X-CSE-MsgGUID: zqTxmHW8Szeuc7+Ss1tooA== X-IronPort-AV: E=Sophos;i="6.10,188,1719903600"; d="scan'208";a="262037840" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 30 Aug 2024 01:20:22 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 30 Aug 2024 01:19:59 -0700 Received: from che-lt-i70843lx.mchp-main.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Fri, 30 Aug 2024 01:19:55 -0700 From: Dharma Balasubiramani Date: Fri, 30 Aug 2024 13:49:42 +0530 Subject: [PATCH v2 1/2] dt-bindings: mmc: sdhci-atmel: Convert to json schema MIME-Version: 1.0 Message-ID: <20240830-atmel-sdhci-v2-1-b7f58973f3fc@microchip.com> References: <20240830-atmel-sdhci-v2-0-b7f58973f3fc@microchip.com> In-Reply-To: <20240830-atmel-sdhci-v2-0-b7f58973f3fc@microchip.com> To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Aubin Constans CC: , , , , Dharma Balasubiramani X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1725005989; l=4972; i=dharma.b@microchip.com; s=20240209; h=from:subject:message-id; bh=UzbISEjJbeJYIzdRh5vu4UtMWF3hngm+ARmtvyIeqms=; b=f4Gg2dkfLysB4IWisSN8yeAX4xXLjipH9Pu9Z0IDs5H3V8e+6+utcfh+8hYaQHzLKpNS3+oHj F093w/S88BqCijqrgkSb6a/VrmS256kojJMtUk1y3Cw1FFNL1dyaOdT X-Developer-Key: i=dharma.b@microchip.com; a=ed25519; pk=kCq31LcpLAe9HDfIz9ZJ1U7T+osjOi7OZSbe0gqtyQ4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_012025_568642_2C0E03D4 X-CRM114-Status: GOOD ( 17.81 ) 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 Convert sdhci-atmel documentation to yaml format. The new file will inherit from sdhci-common.yaml. Note: Add microchip,sama7g5-sdhci to compatible list as we already use it in the DT. Signed-off-by: Dharma Balasubiramani --- .../bindings/mmc/atmel,sama5d2-sdhci.yaml | 98 ++++++++++++++++++++++ .../devicetree/bindings/mmc/sdhci-atmel.txt | 35 -------- 2 files changed, 98 insertions(+), 35 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/atmel,sama5d2-sdhci.yaml b/Documentation/devicetree/bindings/mmc/atmel,sama5d2-sdhci.yaml new file mode 100644 index 000000000000..91d18b2545e1 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/atmel,sama5d2-sdhci.yaml @@ -0,0 +1,98 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/atmel,sama5d2-sdhci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Atmel SDHCI controller + +maintainers: + - Aubin Constans + - Nicolas Ferre + +description: + Bindings for the SDHCI controller found in Atmel/Microchip SoCs. + +properties: + compatible: + oneOf: + - enum: + - atmel,sama5d2-sdhci + - atmel,sama5d3-sdhci + - atmel,sama5d4-sdhci + - microchip,sam9x60-sdhci + - items: + - enum: + - microchip,sama7g5-sdhci + - const: microchip,sam9x60-sdhci + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + minItems: 2 + maxItems: 3 + description: | + The sama5d2 family includes three clocks: `hclock`, `multclk`, and `baseclk`. + For other families, including sam9x60 and sam9x7, only `hclock` and `multclk` are used. + + clock-names: + minItems: 2 + maxItems: 3 + + microchip,sdcal-inverted: + type: boolean + description: + When present, polarity on the SDCAL SoC pin is inverted. + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +allOf: + - $ref: sdhci-common.yaml# + - if: + properties: + compatible: + contains: + enum: + - atmel,sama5d2-sdhci + then: + properties: + clocks: + maxItems: 3 + clock-names: + items: + - const: hclock + - const: multclk + - const: baseclk + else: + properties: + clocks: + maxItems: 2 + clock-names: + items: + - const: hclock + - const: multclk + +unevaluatedProperties: false + +examples: + - | + #include + #include + mmc@a0000000 { + compatible = "atmel,sama5d2-sdhci"; + reg = <0xa0000000 0x300>; + interrupts = <31 IRQ_TYPE_LEVEL_HIGH 0>; + clocks = <&sdmmc0_hclk>, <&sdmmc0_gclk>, <&main>; + clock-names = "hclock", "multclk", "baseclk"; + assigned-clocks = <&sdmmc0_gclk>; + assigned-clock-rates = <480000000>; + }; diff --git a/Documentation/devicetree/bindings/mmc/sdhci-atmel.txt b/Documentation/devicetree/bindings/mmc/sdhci-atmel.txt deleted file mode 100644 index a9fb0a91245f..000000000000 --- a/Documentation/devicetree/bindings/mmc/sdhci-atmel.txt +++ /dev/null @@ -1,35 +0,0 @@ -* Atmel SDHCI controller - -This file documents the differences between the core properties in -Documentation/devicetree/bindings/mmc/mmc.txt and the properties used by the -sdhci-of-at91 driver. - -Required properties: -- compatible: Must be "atmel,sama5d2-sdhci" or "microchip,sam9x60-sdhci" - or "microchip,sam9x7-sdhci", "microchip,sam9x60-sdhci". -- clocks: Phandlers to the clocks. -- clock-names: Must be "hclock", "multclk", "baseclk" for - "atmel,sama5d2-sdhci". - Must be "hclock", "multclk" for "microchip,sam9x60-sdhci". - Must be "hclock", "multclk" for "microchip,sam9x7-sdhci". - -Optional properties: -- assigned-clocks: The same with "multclk". -- assigned-clock-rates The rate of "multclk" in order to not rely on the - gck configuration set by previous components. -- microchip,sdcal-inverted: when present, polarity on the SDCAL SoC pin is - inverted. The default polarity for this signal is described in the datasheet. - For instance on SAMA5D2, the pin is usually tied to the GND with a resistor - and a capacitor (see "SDMMC I/O Calibration" chapter). - -Example: - -mmc0: sdio-host@a0000000 { - compatible = "atmel,sama5d2-sdhci"; - reg = <0xa0000000 0x300>; - interrupts = <31 IRQ_TYPE_LEVEL_HIGH 0>; - clocks = <&sdmmc0_hclk>, <&sdmmc0_gclk>, <&main>; - clock-names = "hclock", "multclk", "baseclk"; - assigned-clocks = <&sdmmc0_gclk>; - assigned-clock-rates = <480000000>; -};