From patchwork Mon Mar 10 16:22:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 328611 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C46AE2C0081 for ; Tue, 11 Mar 2014 03:23:40 +1100 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WN2zA-0005AC-Od; Mon, 10 Mar 2014 16:23:28 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WN2z8-0003eX-GJ; Mon, 10 Mar 2014 16:23:26 +0000 Received: from mail-bk0-f49.google.com ([209.85.214.49]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WN2z4-0003dE-IA for linux-arm-kernel@lists.infradead.org; Mon, 10 Mar 2014 16:23:24 +0000 Received: by mail-bk0-f49.google.com with SMTP id my13so1191787bkb.22 for ; Mon, 10 Mar 2014 09:23:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=W3+kf+m4N9IggdH5iwqxPhIS5s7YwkpcVTz49ffNqrs=; b=Tsf3ucWBIZuwQxZ0JoSNmNQlM6hfGqS6XsYm4SJoYBuJBDifwN+pz7Xd+yvi2Rx1kY hPb6G3ecGfPjdz7eQ1hRooQ3ePBI6tBtY3M+3GXlcK6t4N9ufMiqqzw3QkgBwkkzG1mX mhb0YFxdzCq4448XEEOFH3BRvAc77nvrof0zMRfcIiXrsibVK5HCDIO5aLZv86l+6JLM 4CNbq6U76a16ArqZ7+Rat5Mo/Xove6K9WYMtPEAxLlyatfofMolKey0WHZxeIAxvMDrC TIqrcHLPRVJY5CKfrGoq4FIa6a5IY1Y5qMhy/0l9U8Z4IkZkhKE9T0PKeKcxEJJHL1af UbKA== X-Gm-Message-State: ALoCoQlaPJvtGgtrMMZpmA22MN7TbvAabN4jL8zxzd7n/EKZfcJS5LwvXeZHaTCXgNy2D1rB6577 X-Received: by 10.204.103.131 with SMTP id k3mr29943bko.81.1394468580272; Mon, 10 Mar 2014 09:23:00 -0700 (PDT) Received: from lee--X1 (host109-148-116-196.range109-148.btcentralplus.com. [109.148.116.196]) by mx.google.com with ESMTPSA id ci7sm12251661bkc.0.2014.03.10.09.22.57 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 10 Mar 2014 09:22:59 -0700 (PDT) Date: Mon, 10 Mar 2014 16:22:54 +0000 From: Lee Jones To: mark.rutland@arm.com Subject: [PATCH v2 1/4] phy: miphy365x: Add Device Tree bindings for the MiPHY365x Message-ID: <20140310162254.GG13661@lee--X1> References: <1392377036-12816-1-git-send-email-lee.jones@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1392377036-12816-1-git-send-email-lee.jones@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140310_122322_723696_17AE753F X-CRM114-Status: GOOD ( 12.38 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.214.49 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alexandre.torgue@st.com, linux-arm-kernel@lists.infradead.org, Srinivas Kandagatla X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org phy: miphy365x: Add Device Tree bindings for the MiPHY365x 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. Cc: devicetree@vger.kernel.org Cc: Srinivas Kandagatla Signed-off-by: Lee Jones Acked-by: Mark Rutland diff --git a/Documentation/devicetree/bindings/phy/phy-miphy365x.txt b/Documentation/devicetree/bindings/phy/phy-miphy365x.txt new file mode 100644 index 0000000..15d105a --- /dev/null +++ b/Documentation/devicetree/bindings/phy/phy-miphy365x.txt @@ -0,0 +1,62 @@ +STMicroelectronics STi MIPHY365x PHY binding +============================================ + +This binding describes a miphy device that is used to control PHY hardware +for SATA and PCIe. + +Required properties: +- compatible : Should be "st,miphy365x-phy" +- #phy-cells : Should be 2 (See second example) + First cell is the port number from: + - MIPHY_PORT_0 + - MIPHY_PORT_1 + Second cell 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", from: + - sata0: For SATA port 0 registers + - sata1: For SATA port 1 registers + - pcie0: For PCIE port 0 registers + - pcie1: For PCIE port 1 registers +- st,syscfg : Should be a phandle of the system configuration register group + which contain the SATA, PCIe mode setting bits + +Optional properties: +- 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@0 { + compatible = "st,miphy365x-phy"; + #phy-cells = <2>; + reg = <0xfe382000 0x100>, + <0xfe38a000 0x100>, + <0xfe394000 0x100>, + <0xfe804000 0x100>; + reg-names = "sata0", "sata1", "pcie0", "pcie1"; + st,syscfg = <&syscfg_rear>; + }; + +Specifying phy control of devices +================================= + +Device nodes should specify the configuration required in their "phys" +property, containing a phandle to the miphy device node, a port number +and a device type. + +Example: + +#include + + sata0: sata@fe380000 { + ... + phys = <&miphy365x_phy MIPHY_PORT_0 MIPHY_TYPE_SATA>; + ... + };