From patchwork Fri Nov 2 19:26:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Faiz Abbas X-Patchwork-Id: 992533 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="W3GSQCd1"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42msTX4DMwzB4Yy for ; Sat, 3 Nov 2018 06:24:48 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728140AbeKCEca (ORCPT ); Sat, 3 Nov 2018 00:32:30 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:54064 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727952AbeKCEc3 (ORCPT ); Sat, 3 Nov 2018 00:32:29 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id wA2JNvDx078018; Fri, 2 Nov 2018 14:23:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1541186637; bh=7rqeRlMU/MryScBAG/F9EVyizjBgZJ6+Y03xj5k0G6g=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=W3GSQCd1EaNCmslfZ9lBuDRWEiySuQz/n8XAJNKkgLPyoV2w55tW6YNcKlMv6ySIh o3L0OIj+C4SN7BOdRUtOOps0s4jWdDJj2MS2WTEwcIlR2XGvf671jnw/lYx6vxXrNZ 1YR3xKLBobbYaUJnsUMsDv9KS48taH0G6+gZ5V1I= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wA2JNvXh117580 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 2 Nov 2018 14:23:57 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Fri, 2 Nov 2018 14:23:56 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Fri, 2 Nov 2018 14:23:57 -0500 Received: from a0230074-OptiPlex-7010.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id wA2JNfvY000522; Fri, 2 Nov 2018 14:23:54 -0500 From: Faiz Abbas To: , , , CC: , , , , , Subject: [PATCH 4/6] dt-bindings: can: m_can: Document transceiver implementation as a phy Date: Sat, 3 Nov 2018 00:56:14 +0530 Message-ID: <20181102192616.28291-5-faiz_abbas@ti.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181102192616.28291-1-faiz_abbas@ti.com> References: <20181102192616.28291-1-faiz_abbas@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Some transceivers need a configuration step (for example, pulling a standby line low) for them to start sending messages. Instead of a parent child relationship, the transceiver can be implemented as a phy with the configuration done in the phy driver. The bitrate limitations can then be obtained by the driver using said phy node. Document the above implementation. Signed-off-by: Faiz Abbas --- .../devicetree/bindings/net/can/m_can.txt | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/net/can/m_can.txt b/Documentation/devicetree/bindings/net/can/m_can.txt index ed614383af9c..c11548e74278 100644 --- a/Documentation/devicetree/bindings/net/can/m_can.txt +++ b/Documentation/devicetree/bindings/net/can/m_can.txt @@ -42,12 +42,14 @@ Required properties: Please refer to 2.4.1 Message RAM Configuration in Bosch M_CAN user manual for details. +Optional properties: +- phy-names : must be "can_transceiver". The transceiver + typically limits the maximum bitrate of the + system. The phy node is used to discover this + limitation. +- phys : phandle to the transceiver implemented as a phy + node. -Optional Subnode: -- can-transceiver : Can-transceiver subnode describing maximum speed - that can be used for CAN/CAN-FD modes. See - Documentation/devicetree/bindings/net/can/can-transceiver.txt - for details. Example: SoC dtsi: m_can1: can@20e8000 { @@ -64,12 +66,18 @@ m_can1: can@20e8000 { }; Board dts: + &m_can1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_m_can1>; status = "enabled"; + phy-names = "can_transceiver"; + phys = <&transceiver1>; +}; - can-transceiver { - max-bitrate = <5000000>; - }; +transceiver1: can-transceiver { + compatible = "simple-phy"; + max-bitrate = <5000000>; + pwr-supply = <&transceiver1_fixed>; + #phy-cells = <0>; };