From patchwork Sun Jan 12 11:17:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 205842 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 E8938C32771 for ; Sun, 12 Jan 2020 11:17:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA03721569 for ; Sun, 12 Jan 2020 11:17:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DyPsmZuk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732660AbgALLR6 (ORCPT ); Sun, 12 Jan 2020 06:17:58 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:41487 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732659AbgALLR6 (ORCPT ); Sun, 12 Jan 2020 06:17:58 -0500 Received: by mail-lj1-f195.google.com with SMTP id h23so6858881ljc.8 for ; Sun, 12 Jan 2020 03:17:56 -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=Zo6fx5Wpa4UMlaqNMt4nQ/pXNoj/+8/OnmUYzSrIJJE=; b=DyPsmZukkzw850ogUhzgDd3fFknJ/kGmrY3kVMyx0lkBEXBJrfPzYFv3YRfTvmp8kl Bd669W98WgYBXQUZ9lpDKpzpBBtn8jUJySSE+SWf2P5xJTgKjV6ZyDsGzae0sLlZoRMl MU2EhHSIzspbscM9QYgYgeIkhPM8I+eFl3N81hz1uyzDPEiAMngVEEHSzr1Yci+xg+XD nm0h+GMlgU19HBieQ76BJ3D51r+faDsQYH7fNEOMrzznPrYi+F70AN3nFybpw6yS0CGE H7jouGtjkyKkfB98gFMMwrPthJ9K6B264dxg3w0oGjORZ8L6OtUM7mYiBaBL/VYKBiLK PRzA== 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=Zo6fx5Wpa4UMlaqNMt4nQ/pXNoj/+8/OnmUYzSrIJJE=; b=FtXszpXHX2anAxZIvm0AELsyD2/ZKlPsDbrZtCpDtHvw1OnqQdcem85cx0jCzh9Aaa dUCsUdr1JRN/UWuyu5WQRA4GtP8QKiI84GGkJ5Vhs0YC9WndK1040wnCAX+bc0jvOAGl xc4hgi/Wc8+sU/x9l2QlqPTbD+sxcMrTOypBqo6UzFZVjtw/20SmsTK14WDSwlin/3fh KHmI7rQLmYZ8C6hgi/IKOsWvIRIz5opPeZGA3JUhhXLD6ERaqwU2JaygEW70JpqXl2vf QxhQ8DCSBr+LwfgO8DCLQFHQT91LNhltTuKe1HCaHbnN+HqwkbJPEQbZ5HR+p38KZ8wi 8I2w== X-Gm-Message-State: APjAAAXoCU7zDm90OdCKYc/dri8ExBQNPgxWxxJnn5LRfYdKuT5Mq97T 6E4QCttbYuMXCoUCKqimB4yKHw== X-Google-Smtp-Source: APXvYqzhz5rajwXrtmQnWaXrB6kf+ymA5yEzq0l3+mPMYaB/HfAmav4FzTq3fEayQq83TQ/qOJeDgQ== X-Received: by 2002:a2e:8197:: with SMTP id e23mr7796249ljg.250.1578827876139; Sun, 12 Jan 2020 03:17:56 -0800 (PST) Received: from localhost.bredbandsbolaget (c-5ac9225c.014-348-6c756e10.bbcust.telenor.se. [92.34.201.90]) by smtp.gmail.com with ESMTPSA id z13sm4040385lfi.69.2020.01.12.03.17.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2020 03:17:55 -0800 (PST) From: Linus Walleij To: Rob Herring , devicetree@vger.kernel.org, Jens Axboe Cc: linux-ide@vger.kernel.org, Linus Walleij , Sergei Shtylyov Subject: [PATCH v4] dt-bindings: Create DT bindings for SATA controllers Date: Sun, 12 Jan 2020 12:17:51 +0100 Message-Id: <20200112111751.21984-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 SATA host controllers, and this needs to be supported generally, so create a common YAML binding for "sata" 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 Cc: Sergei Shtylyov Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - Drop any master/slave terminology: SATA has one drive per port or up to 15 drives behind a multiplexer. - Drop RFC notation, this feels pretty finished. ChangeLog v2->v3: - Split off into its own RFC patch - Only support sata-port@ in this binding - Opt to support devices 0..14 on the sata-port in line with ahci-platforn.txt not modeling the port multiplier in the device tree at all. 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/sata-common.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/ata/sata-common.yaml diff --git a/Documentation/devicetree/bindings/ata/sata-common.yaml b/Documentation/devicetree/bindings/ata/sata-common.yaml new file mode 100644 index 000000000000..41f590629fbf --- /dev/null +++ b/Documentation/devicetree/bindings/ata/sata-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/sata-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common Properties for Serial AT attachment (SATA) controllers + +maintainers: + - Linus Walleij + +description: | + This document defines device tree properties common to most Serial + AT attachment (SATA) storage devices. It doesn't constitute a device tree + binding specification by itself but is meant to be referenced by device + tree bindings. + + The SATA controller-specific device tree bindings are responsible for + defining whether each property is required or optional. + +properties: + $nodename: + pattern: "^sata(@.*)?$" + description: + Specifies the host controller node. SATA host controller nodes are named + "sata" + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^sata-port@[0-1]$": + description: | + DT nodes for ports connected on the SATA host. The SATA port + nodes will be named "sata-port". + type: object + + properties: + reg: + minimum: 0 + maximum: 14 + description: + The ID number of the drive port SATA can potentially use a port + multiplier making it possible to connect up to 15 disks to a single + SATA port. + +...