From patchwork Thu Jul 10 09:09:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 33410 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DDDBA203C0 for ; Thu, 10 Jul 2014 09:10:20 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id a41sf34505623yho.5 for ; Thu, 10 Jul 2014 02:10:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :references:mime-version:in-reply-to:user-agent:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe :content-type:content-disposition; bh=QLdjn0FPUzeoQ++vvHVAEDR2qXuUmX4sYRHQsHgIjgg=; b=XXB+kjygycevjF6ydvePtKZxdc1yiUMs0JnDw6ioaPpwqLPTy5mEY/zUuTAr5bjMAf wrHPKKrof/MLoby0Xni8Mmq0hp6X2pU4qHjdpbuoD2NUkDkXAovJcbvi7Dm8IVDyU/Cl mGjoaWe7RmoQ0b8wVH8wO08YNrZa2h/HaVbclq59mTWTfvQC4uCtAzjb1/YP7HACsrRz leFtCUra7dqO+wE+qAbfDlR3peBF1AKOsYCqvpy5mWvKfAFEuDifxdD3XobvmeCL1anM IhliY0klTrturHBeYAu0/xufvmsqvkpT/ieOtpzUuSaNLw2lJyJ7zzJB4yIeYtfkmbQJ iveQ== X-Gm-Message-State: ALoCoQmiNjz7t3jUJgGFVlx5Rt+wHdwrnxkgVBQwCqaCA1bvW5XdPaR/K5AeDvUN2pkUORkGR3ml X-Received: by 10.52.230.71 with SMTP id sw7mr12373573vdc.9.1404983420387; Thu, 10 Jul 2014 02:10:20 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.1 with SMTP id p1ls9033qga.97.gmail; Thu, 10 Jul 2014 02:10:20 -0700 (PDT) X-Received: by 10.52.123.232 with SMTP id md8mr37384050vdb.10.1404983420273; Thu, 10 Jul 2014 02:10:20 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id wr7si22726317vcb.15.2014.07.10.02.10.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Jul 2014 02:10:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id hy4so9874520vcb.20 for ; Thu, 10 Jul 2014 02:10:20 -0700 (PDT) X-Received: by 10.220.92.135 with SMTP id r7mr43632675vcm.11.1404983420183; Thu, 10 Jul 2014 02:10:20 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp116749vcb; Thu, 10 Jul 2014 02:10:19 -0700 (PDT) X-Received: by 10.66.100.231 with SMTP id fb7mr44089204pab.94.1404983418676; Thu, 10 Jul 2014 02:10:18 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l4si6284653pdo.177.2014.07.10.02.09.48; Thu, 10 Jul 2014 02:09:48 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752193AbaGJJJj (ORCPT + 28 others); Thu, 10 Jul 2014 05:09:39 -0400 Received: from mail-ig0-f171.google.com ([209.85.213.171]:58626 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751344AbaGJJJg (ORCPT ); Thu, 10 Jul 2014 05:09:36 -0400 Received: by mail-ig0-f171.google.com with SMTP id l13so2451817iga.4 for ; Thu, 10 Jul 2014 02:09:36 -0700 (PDT) X-Received: by 10.42.201.84 with SMTP id ez20mr9527944icb.74.1404983375941; Thu, 10 Jul 2014 02:09:35 -0700 (PDT) Received: from lee--X1 (host86-181-29-22.range86-181.btcentralplus.com. [86.181.29.22]) by mx.google.com with ESMTPSA id jc2sm23427613igb.19.2014.07.10.02.09.34 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 10 Jul 2014 02:09:35 -0700 (PDT) Date: Thu, 10 Jul 2014 10:09:31 +0100 From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kishon@ti.com Cc: kernel@stlinux.com Subject: [PATCH v3+1 1/5] phy: miphy365x: Add Device Tree bindings for the MiPHY365x Message-ID: <20140710090931.GA11948@lee--X1> References: <1404906074-31992-1-git-send-email-lee.jones@linaro.org> <1404906074-31992-2-git-send-email-lee.jones@linaro.org> MIME-Version: 1.0 In-Reply-To: <1404906074-31992-2-git-send-email-lee.jones@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Content-Disposition: inline The MiPHY365x is a Generic PHY which can serve various SATA or PCIe devices. It has 2 ports which it can use for either; both SATA, both PCIe or one of each in any configuration. Acked-by: Mark Rutland Acked-by: Alexandre Torgue Signed-off-by: Lee Jones --- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/Documentation/devicetree/bindings/phy/phy-miphy365x.txt b/Documentation/devicetree/bindings/phy/phy-miphy365x.txt new file mode 100644 index 0000000..42c88088 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/phy-miphy365x.txt @@ -0,0 +1,76 @@ +STMicroelectronics STi MIPHY365x PHY binding +============================================ + +This binding describes a miphy device that is used to control PHY hardware +for SATA and PCIe. + +Required properties (controller (parent) node): +- compatible : Should be "st,miphy365x-phy" +- st,syscfg : Should be a phandle of the system configuration register group + which contain the SATA, PCIe mode setting bits + +Required nodes : A sub-node is required for each channel the controller + provides. Address range information including the usual + 'reg' and 'reg-names' properties are used inside these + nodes to describe the controller's topology. These nodes + are translated by the driver's .xlate() function. + +Required properties (port (child) node): +- #phy-cells : Should be 1 (See second example) + Cell after port phandle is device type from: + - MIPHY_TYPE_SATA + - MIPHY_TYPE_PCI +- reg : Address and length of register sets for each device in + "reg-names" +- reg-names : The names of the register addresses corresponding to the + registers filled in "reg": + - sata: For SATA devices + - pcie: For PCIe devices + - syscfg: To specify the syscfg based config register + +Optional properties (port (child) node): +- st,sata-gen : Generation of locally attached SATA IP. Expected values + are {1,2,3). If not supplied generation 1 hardware will + be expected +- st,pcie-tx-pol-inv : Bool property to invert the polarity PCIe Tx (Txn/Txp) +- st,sata-tx-pol-inv : Bool property to invert the polarity SATA Tx (Txn/Txp) + +Example: + + miphy365x_phy: miphy365x@fe382000 { + compatible = "st,miphy365x-phy"; + st,syscfg = <&syscfg_rear>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + phy_port0: port@fe382000 { + reg = <0xfe382000 0x100>, <0xfe394000 0x100>, <0x824 0x4>; + reg-names = "sata", "pcie", "syscfg"; + #phy-cells = <1>; + st,sata-gen = <3>; + }; + + phy_port1: port@fe38a000 { + reg = <0xfe38a000 0x100>, <0xfe804000 0x100>, <0x828 0x4>;; + reg-names = "sata", "pcie", "syscfg"; + #phy-cells = <1>; + st,pcie-tx-pol-inv; + }; + }; + +Specifying phy control of devices +================================= + +Device nodes should specify the configuration required in their "phys" +property, containing a phandle to the phy port node and a device type. + +Example: + +#include + + sata0: sata@fe380000 { + ... + phys = <&phy_port0 MIPHY_TYPE_SATA>; + ... + };