From patchwork Mon Feb 24 02:52:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dharma Balasubiramani X-Patchwork-Id: 868372 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4894B19DF41; Mon, 24 Feb 2025 02:53:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740365588; cv=none; b=TOtda2CTyQ1P146MDEYs+A+POm2t4P0FYD3B9N7yXZAoLs2Xccu1UyYI5IKfSxFpvpGFq1djGu1ro3yKdp895S47P7SYnRP+0Otw8UlrMZCKgwXr5RAJzGZQzc0/dwDs7+2m789WlTz0y1bgPhjZVKAw7Ebm/sBvYLqbYSot3T8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740365588; c=relaxed/simple; bh=3eVMKywF0GaSEC41UUuoCtEBQjw9Zj8/cE5TkbR4uxs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=JBxtbCuDrNZrkqlVmDkmk7lT9A+lIrv/9kGEH7tSk69uWwhHQadM/UPzih2hWu9XzQgtArxVo/BVGQhNIVZRR3elqfwJXlztX5HSFya7uRGUU6VIG6xWJLpDvuo0hfHZhCLlT5QVA+UcruR7JUTssE1x02jy5FQo23rEM8TYHzY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=VQ7pCd7J; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="VQ7pCd7J" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1740365586; x=1771901586; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=3eVMKywF0GaSEC41UUuoCtEBQjw9Zj8/cE5TkbR4uxs=; b=VQ7pCd7JFbdBo6qrYpnc5fbxW+bPsdAhGxhZauwI4hOCsfPlxEbmfgkA MZp2pEoe/8ytwCT6Fbvp5Zs1hA7VgjYAIuTH+TuEUa+TMNuAge0byRE9L TUoI2JbFpCSvHek4ybdf/H5gqnrJiETRycwpNhmWf8+DLnvxgksK3uAnG 7TH9n45pHIvEdiwMQEaFE4Qu+yNWqs71xme0w+OOcFxtHiGzA/GTH//M4 MsB0UnoA9L/r8LDC3xQ2YBICup2zA6H6xs2FAZTsXT+UR9lXZm8y9ZOmU U3lF3+Cj0I3RKN/cyRfchhNywUa3j1iOa78PyYhtaGyYVdPP/3C45/sK6 g==; X-CSE-ConnectionGUID: 6rVg96LVQkmrqYQWG6Firw== X-CSE-MsgGUID: Zw74jTgxQ/y0pQphYJJidw== X-IronPort-AV: E=Sophos;i="6.13,309,1732604400"; d="scan'208";a="42149828" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Feb 2025 19:52:58 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Sun, 23 Feb 2025 19:52:44 -0700 Received: from [127.0.0.1] (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Sun, 23 Feb 2025 19:52:40 -0700 From: Dharma Balasubiramani Date: Mon, 24 Feb 2025 08:22:28 +0530 Subject: [PATCH v4 2/2] dt-bindings: mmc: atmel,hsmci: Convert to json schema Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20250224-mmc-slot-v4-2-231620a31e88@microchip.com> References: <20250224-mmc-slot-v4-0-231620a31e88@microchip.com> In-Reply-To: <20250224-mmc-slot-v4-0-231620a31e88@microchip.com> To: Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neil Armstrong , Kevin Hilman , Jerome Brunet , "Martin Blumenstingl" CC: , , , , , Dharma Balasubiramani X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1740365548; l=4816; i=dharma.b@microchip.com; s=20240209; h=from:subject:message-id; bh=3eVMKywF0GaSEC41UUuoCtEBQjw9Zj8/cE5TkbR4uxs=; b=SrErEyLdwcdKKkfZs5W5zETReahLtwrZI3FgSRMZnEK2OWsy7Jdn9NMpYCITs8wJKEtVderMQ bvgZlFpSqVKA4nEmIBY5v0T26CXoqDTwft7jmuDrn8VO7m792NdCHjv X-Developer-Key: i=dharma.b@microchip.com; a=ed25519; pk=kCq31LcpLAe9HDfIz9ZJ1U7T+osjOi7OZSbe0gqtyQ4= Convert atmel,hsmci documentation to yaml format. The new file will inherit from mmc-controller.yaml. Signed-off-by: Dharma Balasubiramani Reviewed-by: Rob Herring (Arm) --- .../devicetree/bindings/mmc/atmel,hsmci.yaml | 106 +++++++++++++++++++++ .../devicetree/bindings/mmc/atmel-hsmci.txt | 73 -------------- 2 files changed, 106 insertions(+), 73 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/atmel,hsmci.yaml b/Documentation/devicetree/bindings/mmc/atmel,hsmci.yaml new file mode 100644 index 000000000000..151b414b9d27 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/atmel,hsmci.yaml @@ -0,0 +1,106 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mmc/atmel,hsmci.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Atmel High-Speed MultiMedia Card Interface (HSMCI) + +description: + The Atmel HSMCI controller provides an interface for MMC, SD, and SDIO memory + cards. + +maintainers: + - Nicolas Ferre + - Aubin Constans + +allOf: + - $ref: mmc-controller.yaml + +properties: + compatible: + const: atmel,hsmci + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + dmas: + maxItems: 1 + + dma-names: + const: rxtx + + clocks: + maxItems: 1 + + clock-names: + const: mci_clk + + "#address-cells": + const: 1 + description: Used for slot IDs. + + "#size-cells": + const: 0 + +patternProperties: + "slot@[0-2]$": + $ref: mmc-slot.yaml + description: A slot node representing an MMC, SD, or SDIO slot. + + properties: + reg: + enum: [0, 1] + + required: + - reg + - bus-width + + unevaluatedProperties: false + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - "#address-cells" + - "#size-cells" + +anyOf: + - required: + - slot@0 + - required: + - slot@1 + +unevaluatedProperties: false + +examples: + - | + #include + #include + mmc@f0008000 { + compatible = "atmel,hsmci"; + reg = <0xf0008000 0x600>; + interrupts = <12 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&mci0_clk>; + clock-names = "mci_clk"; + #address-cells = <1>; + #size-cells = <0>; + + slot@0 { + reg = <0>; + bus-width = <4>; + cd-gpios = <&pioD 15 0>; + cd-inverted; + }; + + slot@1 { + reg = <1>; + bus-width = <4>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt b/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt deleted file mode 100644 index 07ad02075a93..000000000000 --- a/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt +++ /dev/null @@ -1,73 +0,0 @@ -* Atmel High Speed MultiMedia Card Interface - -This controller on atmel products provides an interface for MMC, SD and SDIO -types of memory cards. - -This file documents differences between the core properties described -by mmc.txt and the properties used by the atmel-mci driver. - -1) MCI node - -Required properties: -- compatible: should be "atmel,hsmci" -- #address-cells: should be one. The cell is the slot id. -- #size-cells: should be zero. -- at least one slot node -- clock-names: tuple listing input clock names. - Required elements: "mci_clk" -- clocks: phandles to input clocks. - -The node contains child nodes for each slot that the platform uses - -Example MCI node: - -mmc0: mmc@f0008000 { - compatible = "atmel,hsmci"; - reg = <0xf0008000 0x600>; - interrupts = <12 4>; - #address-cells = <1>; - #size-cells = <0>; - clock-names = "mci_clk"; - clocks = <&mci0_clk>; - - [ child node definitions...] -}; - -2) slot nodes - -Required properties: -- reg: should contain the slot id. -- bus-width: number of data lines connected to the controller - -Optional properties: -- cd-gpios: specify GPIOs for card detection -- cd-inverted: invert the value of external card detect gpio line -- wp-gpios: specify GPIOs for write protection - -Example slot node: - -slot@0 { - reg = <0>; - bus-width = <4>; - cd-gpios = <&pioD 15 0> - cd-inverted; -}; - -Example full MCI node: -mmc0: mmc@f0008000 { - compatible = "atmel,hsmci"; - reg = <0xf0008000 0x600>; - interrupts = <12 4>; - #address-cells = <1>; - #size-cells = <0>; - slot@0 { - reg = <0>; - bus-width = <4>; - cd-gpios = <&pioD 15 0> - cd-inverted; - }; - slot@1 { - reg = <1>; - bus-width = <4>; - }; -};