From patchwork Fri Jan 10 08:17:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 205890 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=unavailable 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 B43E5C33CA4 for ; Fri, 10 Jan 2020 08:18:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 87C4C2073A for ; Fri, 10 Jan 2020 08:18:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="d7bksC9D" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbgAJISZ (ORCPT ); Fri, 10 Jan 2020 03:18:25 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45560 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726583AbgAJISZ (ORCPT ); Fri, 10 Jan 2020 03:18:25 -0500 Received: by mail-lf1-f66.google.com with SMTP id 203so764162lfa.12 for ; Fri, 10 Jan 2020 00:18:24 -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=CV2HYfwcjdvq9OchALW99WXIpSU7h5uftpPM+rOvokc=; b=d7bksC9DIxve1KRyf1cNcEBne0RM0Suj1cS2FIxPPkH0q4rcV3AW2anr+0TIXbB3VX ol9up7JIpc4iTLSZAJvTmZvKAFTMj2FQHjPeb3K5PrcaBds7F5X7XRfeUmOP+OSnPqF4 A3bqVWfBVqRv5PvqQ5umNuBTZlZS3re2eUtgYv8P+pc0wp8W+Li3FnONTbpzbZ6NsYhM oaWOKq+/Jm7C7Q2AdWH2UKs7nWOBmxEAlrKyxhr/Do5QUy3T+3CrSe7PhgdOudqOwzt1 WiPaSlgnnuxhW8ETMPaR4KhcJKbgns9oByGi40AgaKwA78WAvtVStYa0pgl05D4thiHi C9pA== 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=CV2HYfwcjdvq9OchALW99WXIpSU7h5uftpPM+rOvokc=; b=FvRWYS817MmH7KiuhaAz0G6vAFwU31s0C/tba2VAXqTRCSup8Vn9kqeBU+AMIj2u1n w5rTsTQPh5nPt9vaRTes+IlEy2NmLT6oPCk5jZhvw4p2ZNKPhOhx/SyVcmRu9wdTuKFy IhQtS5w+s9QNdPUF9byTblkTb7GZzs2jHAkgduBBOvQZSPK3G/M+Q1gjqMR+IU0Wqrjw Y2PSgvMGTFeuQatpJLK1WqJ4dA9om9+iJiRStQoGf5fpCmLKK7I45Vpe9HvtN64S3sp6 LkLOg5ZfxzTzmbPTWdCBGVke51TtRA0TFHLkM8jKhP4vZPM/vIs897r2IWSTKDgJ5qAO VeMw== X-Gm-Message-State: APjAAAVbQqzpaELh+JGhP3u6B5yFLDmNHDNzT+IQvjfDgglxjlD5G8LE 1JMLn364Emt8kfqfvBlg0QWb9ga9Z6qy8A== X-Google-Smtp-Source: APXvYqxVfW4F73xDHXDApf1ti2CA/XxjeNivvnUUp4pXInLJgvwzouhqx81SoZBKMba2NdqAX6KlGw== X-Received: by 2002:a19:4208:: with SMTP id p8mr1408253lfa.160.1578644303346; Fri, 10 Jan 2020 00:18:23 -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 s4sm591308ljd.94.2020.01.10.00.18.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2020 00:18:22 -0800 (PST) From: Linus Walleij To: Rob Herring , devicetree@vger.kernel.org, Jens Axboe Cc: linux-ide@vger.kernel.org, Linus Walleij Subject: [PATCH v3] RFC: dt-bindings: Create DT bindings for SATA controllers Date: Fri, 10 Jan 2020 09:17:43 +0100 Message-Id: <20200110081743.10086-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 Signed-off-by: Linus Walleij --- 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 | 51 +++++++++++++++++++ 1 file changed, 51 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..9f6718a69dfd --- /dev/null +++ b/Documentation/devicetree/bindings/ata/sata-common.yaml @@ -0,0 +1,51 @@ +# 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 constitue 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 master drive will have + ID number 0 and the slave drive will have ID number 1. 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. + +...