Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: phy: Convert AM654 SERDES bindings to YAML

Convert SERDES dt-bindings for TI's AM654 SoC to YAML binding.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210723135605.23572-1-kishon@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Kishon Vijay Abraham I and committed by
Vinod Koul
b70ee49c 1633802c

+103 -82
-82
Documentation/devicetree/bindings/phy/ti,phy-am654-serdes.txt
··· 1 - TI AM654 SERDES 2 - 3 - Required properties: 4 - - compatible: Should be "ti,phy-am654-serdes" 5 - - reg : Address and length of the register set for the device. 6 - - #phy-cells: determine the number of cells that should be given in the 7 - phandle while referencing this phy. Should be "2". The 1st cell 8 - corresponds to the phy type (should be one of the types specified in 9 - include/dt-bindings/phy/phy.h) and the 2nd cell should be the serdes 10 - lane function. 11 - If SERDES0 is referenced 2nd cell should be: 12 - 0 - USB3 13 - 1 - PCIe0 Lane0 14 - 2 - ICSS2 SGMII Lane0 15 - If SERDES1 is referenced 2nd cell should be: 16 - 0 - PCIe1 Lane0 17 - 1 - PCIe0 Lane1 18 - 2 - ICSS2 SGMII Lane1 19 - - power-domains: As documented by the generic PM domain bindings in 20 - Documentation/devicetree/bindings/power/power_domain.txt. 21 - - clocks: List of clock-specifiers representing the input to the SERDES. 22 - Should have 3 items representing the left input clock, external 23 - reference clock and right input clock in that order. 24 - - clock-output-names: List of clock names for each of the clock outputs of 25 - SERDES. Should have 3 items for CMU reference clock, 26 - left output clock and right output clock in that order. 27 - - assigned-clocks: As defined in 28 - Documentation/devicetree/bindings/clock/clock-bindings.txt 29 - - assigned-clock-parents: As defined in 30 - Documentation/devicetree/bindings/clock/clock-bindings.txt 31 - - #clock-cells: Should be <1> to choose between the 3 output clocks. 32 - Defined in Documentation/devicetree/bindings/clock/clock-bindings.txt 33 - 34 - The following macros are defined in dt-bindings/phy/phy-am654-serdes.h 35 - for selecting the correct reference clock. This can be used while 36 - specifying the clocks created by SERDES. 37 - => AM654_SERDES_CMU_REFCLK 38 - => AM654_SERDES_LO_REFCLK 39 - => AM654_SERDES_RO_REFCLK 40 - 41 - - mux-controls: Phandle to the multiplexer that is used to select the lane 42 - function. See #phy-cells above to see the multiplex values. 43 - 44 - Example: 45 - 46 - Example for SERDES0 is given below. It has 3 clock inputs; 47 - left input reference clock as indicated by <&k3_clks 153 4>, external 48 - reference clock as indicated by <&k3_clks 153 1> and right input 49 - reference clock as indicated by <&serdes1 AM654_SERDES_LO_REFCLK>. (The 50 - right input of SERDES0 is connected to the left output of SERDES1). 51 - 52 - SERDES0 registers 3 clock outputs as indicated in clock-output-names. The 53 - first refers to the CMU reference clock, second refers to the left output 54 - reference clock and the third refers to the right output reference clock. 55 - 56 - The assigned-clocks and assigned-clock-parents is used here to set the 57 - parent of left input reference clock to MAINHSDIV_CLKOUT4 and parent of 58 - CMU reference clock to left input reference clock. 59 - 60 - serdes0: serdes@900000 { 61 - compatible = "ti,phy-am654-serdes"; 62 - reg = <0x0 0x900000 0x0 0x2000>; 63 - reg-names = "serdes"; 64 - #phy-cells = <2>; 65 - power-domains = <&k3_pds 153>; 66 - clocks = <&k3_clks 153 4>, <&k3_clks 153 1>, 67 - <&serdes1 AM654_SERDES_LO_REFCLK>; 68 - clock-output-names = "serdes0_cmu_refclk", "serdes0_lo_refclk", 69 - "serdes0_ro_refclk"; 70 - assigned-clocks = <&k3_clks 153 4>, <&serdes0 AM654_SERDES_CMU_REFCLK>; 71 - assigned-clock-parents = <&k3_clks 153 8>, <&k3_clks 153 4>; 72 - ti,serdes-clk = <&serdes0_clk>; 73 - mux-controls = <&serdes_mux 0>; 74 - #clock-cells = <1>; 75 - }; 76 - 77 - Example for PCIe consumer node using the SERDES PHY specifier is given below. 78 - &pcie0_rc { 79 - num-lanes = <2>; 80 - phys = <&serdes0 PHY_TYPE_PCIE 1>, <&serdes1 PHY_TYPE_PCIE 1>; 81 - phy-names = "pcie-phy0", "pcie-phy1"; 82 - };
+103
Documentation/devicetree/bindings/phy/ti,phy-am654-serdes.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/phy/ti,phy-am654-serdes.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: TI AM654 SERDES binding 8 + 9 + description: 10 + This binding describes the TI AM654 SERDES. AM654 SERDES can be configured 11 + to be used with either PCIe or USB or SGMII. 12 + 13 + maintainers: 14 + - Kishon Vijay Abraham I <kishon@ti.com> 15 + 16 + properties: 17 + compatible: 18 + enum: 19 + - ti,phy-am654-serdes 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + reg-names: 25 + items: 26 + - const: serdes 27 + 28 + power-domains: 29 + maxItems: 1 30 + 31 + clocks: 32 + maxItems: 3 33 + description: 34 + Three input clocks referring to left input reference clock, refclk and right input reference 35 + clock. 36 + 37 + assigned-clocks: 38 + $ref: "/schemas/types.yaml#/definitions/phandle-array" 39 + assigned-clock-parents: 40 + $ref: "/schemas/types.yaml#/definitions/phandle-array" 41 + 42 + '#phy-cells': 43 + const: 2 44 + description: 45 + The 1st cell corresponds to the phy type (should be one of the types specified in 46 + include/dt-bindings/phy/phy.h) and the 2nd cell should be the serdes lane function. 47 + 48 + ti,serdes-clk: 49 + description: Phandle to the SYSCON entry required for configuring SERDES clock selection. 50 + $ref: /schemas/types.yaml#/definitions/phandle 51 + 52 + '#clock-cells': 53 + const: 1 54 + 55 + mux-controls: 56 + maxItems: 1 57 + description: Phandle to the SYSCON entry required for configuring SERDES lane function. 58 + 59 + clock-output-names: 60 + oneOf: 61 + - description: Clock output names for SERDES 0 62 + items: 63 + - const: serdes0_cmu_refclk 64 + - const: serdes0_lo_refclk 65 + - const: serdes0_ro_refclk 66 + - description: Clock output names for SERDES 1 67 + items: 68 + - const: serdes1_cmu_refclk 69 + - const: serdes1_lo_refclk 70 + - const: serdes1_ro_refclk 71 + 72 + required: 73 + - compatible 74 + - reg 75 + - power-domains 76 + - clocks 77 + - assigned-clocks 78 + - assigned-clock-parents 79 + - ti,serdes-clk 80 + - mux-controls 81 + - clock-output-names 82 + 83 + additionalProperties: false 84 + 85 + examples: 86 + - | 87 + #include <dt-bindings/phy/phy-am654-serdes.h> 88 + 89 + serdes0: serdes@900000 { 90 + compatible = "ti,phy-am654-serdes"; 91 + reg = <0x900000 0x2000>; 92 + reg-names = "serdes"; 93 + #phy-cells = <2>; 94 + power-domains = <&k3_pds 153>; 95 + clocks = <&k3_clks 153 4>, <&k3_clks 153 1>, 96 + <&serdes1 AM654_SERDES_LO_REFCLK>; 97 + clock-output-names = "serdes0_cmu_refclk", "serdes0_lo_refclk", "serdes0_ro_refclk"; 98 + assigned-clocks = <&k3_clks 153 4>, <&serdes0 AM654_SERDES_CMU_REFCLK>; 99 + assigned-clock-parents = <&k3_clks 153 8>, <&k3_clks 153 4>; 100 + ti,serdes-clk = <&serdes0_clk>; 101 + mux-controls = <&serdes_mux 0>; 102 + #clock-cells = <1>; 103 + };