From patchwork Fri Jan 10 08:14:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 205891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 804B2C33CA2 for ; Fri, 10 Jan 2020 08:14:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4FD012073A for ; Fri, 10 Jan 2020 08:14:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GMcisQ9a" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726561AbgAJIOy (ORCPT ); Fri, 10 Jan 2020 03:14:54 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:41592 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726549AbgAJIOy (ORCPT ); Fri, 10 Jan 2020 03:14:54 -0500 Received: by mail-lf1-f65.google.com with SMTP id m30so769477lfp.8 for ; Fri, 10 Jan 2020 00:14:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vu5pZrGVWV+F+Z9ZVUAzowNazkPEg3KOIUjTjFIkErE=; b=GMcisQ9amaS34fIthUecflepm50B1uWjJDtbxOPvqoZ/36/4IU2GPRgjwWAq7EJxj2 lhXZhRG4v6pZUm00cL77GDbqV4QHMOihNRv1r7fKyUHW9r1llBy2PpSNR+x5W9k3Mxbk z0vS+/dYWyl9do8g3CRKc4Ma7tV0BLMyPgHdyieBRu34os1r7G+GRypk96I1XRDceBZG 3XzCaCbpf+OlrrJNwwtHqbmUHQqCqNBbTjnbVlUZKpAkuskaUtQs3m/p51azuoJYeyPa Eo9cJmHVssRCV1BjKz400ZLAamxgGxffwZ1PO7kQ6Yq5s07tUBgy9dgophpOZGICRKGl glzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vu5pZrGVWV+F+Z9ZVUAzowNazkPEg3KOIUjTjFIkErE=; b=MmgBtNVfpQso2sm+8RPV0sn6Le/95XYwjlFoWx7KRCf+AQdtzu8hJZ+rDjHZCKY2pK yEiDhqUTuyULMBOoQuXBc809+zL0cdfWRRRPA3OVxd2AJ7TXI2zjrlmRU/XdSBsrOl/u sIalEjk9f+ZAy0lcQpCG8I/fp+C2pxePuMNvNCtVNaCCqnoyYUvV+ALjJPWh3VJyYCKH J3hTjJh+HVwkEeznWAM/DsTVbsaDhohcJKcCj//IEAGjZMR9fGp1F2+364Q42ffheAsX PeoQlH6CgZmDR0biGemFIlLfS/Wo6uWNXZDuFaZd6XCCX5EyVa828+QDi/ElcJErjldn F1Bg== X-Gm-Message-State: APjAAAVOL7UOuCU4fU4Ulujdk0GDqZ/qOnrz93D3bJoQy+qw6GjnoiCk AULthJhAXvAvMloZSmTTnCCcxA== X-Google-Smtp-Source: APXvYqzDinwDz72/xXRbkcBAs4ET4X1I2qV5Pwg0o+UfqzZswBcw8YQThvrupnrF3gM+YJRvDt+3IQ== X-Received: by 2002:a19:48c5:: with SMTP id v188mr1446391lfa.100.1578644092720; Fri, 10 Jan 2020 00:14:52 -0800 (PST) Received: from linux.local (c-5ac9225c.014-348-6c756e10.bbcust.telenor.se. [92.34.201.90]) by smtp.gmail.com with ESMTPSA id r15sm592496ljh.11.2020.01.10.00.14.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2020 00:14:52 -0800 (PST) From: Linus Walleij To: Rob Herring , devicetree@vger.kernel.org, Jens Axboe Cc: linux-ide@vger.kernel.org, Linus Walleij Subject: [PATCH 1/2 v3] dt-bindings: Create DT bindings for PATA controllers Date: Fri, 10 Jan 2020 09:14:10 +0100 Message-Id: <20200110081411.9806-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org I need to create subnodes for drives connected to PATA host controllers, and this needs to be supported generally, so create a common YAML binding for "ide" that will support subnodes with ports. This has been designed as a subset of ata/ahci-platform.txt with the bare essentials and should be possible to extend or superset to cover the common bindings. Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Only support PATA controllers for now since it is all I need right now. SATA controller have complex topology and might need more elaborate subnodes, possibly a subnode for the multiplier itself, so I will split that off into its own RFC patch. ChangeLog v1->v2: - Use ide@ and sata@ as node names. - Use ide-port@ and sata-port@ for the ports toward the drives, rather than letting the subnodes be the drives themselves. --- .../devicetree/bindings/ata/pata-common.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/ata/pata-common.yaml diff --git a/Documentation/devicetree/bindings/ata/pata-common.yaml b/Documentation/devicetree/bindings/ata/pata-common.yaml new file mode 100644 index 000000000000..fc5ebbe7108d --- /dev/null +++ b/Documentation/devicetree/bindings/ata/pata-common.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/ata/pata-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common Properties for Parallel AT attachment (PATA) controllers + +maintainers: + - Linus Walleij + +description: | + This document defines device tree properties common to most Parallel + ATA (PATA, also known as IDE) AT attachment storage devices. + It doesn't constitue a device tree binding specification by itself but is + meant to be referenced by device tree bindings. + + The PATA (IDE) controller-specific device tree bindings are responsible for + defining whether each property is required or optional. + +properties: + $nodename: + pattern: "^ide(@.*)?$" + description: + Specifies the host controller node. PATA host controller nodes are named + "ide". + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^ide-port@[0-1]$": + description: | + DT nodes for ports connected on the PATA host. The master drive will have + ID number 0 and the slave drive will have ID number 1. The PATA port + nodes will be named "ide-port". + type: object + + properties: + reg: + minimum: 0 + maximum: 1 + description: + The ID number of the drive port, 0 for the master port and 1 for the + slave port. + +...