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

dt-bindings: phy: meson-g12a-usb2-phy: convert to yaml

Now that we have the DT validation in place, let's convert the device tree
bindings for the Amlogic G12A USB2 PHY over to a YAML schemas.

While the original phy bindings specifies phy-supply as required,
the examples and implementations makes it optional, thus phy-supply
is not in the required list of attributes.

Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Neil Armstrong and committed by
Rob Herring
da86d286 f50ffbc5

+63 -22
+63
Documentation/devicetree/bindings/phy/amlogic,meson-g12a-usb2-phy.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + # Copyright 2019 BayLibre, SAS 3 + %YAML 1.2 4 + --- 5 + $id: "http://devicetree.org/schemas/phy/amlogic,meson-g12a-usb2-phy.yaml#" 6 + $schema: "http://devicetree.org/meta-schemas/core.yaml#" 7 + 8 + title: Amlogic G12A USB2 PHY 9 + 10 + maintainers: 11 + - Neil Armstrong <narmstrong@baylibre.com> 12 + 13 + properties: 14 + compatible: 15 + enum: 16 + - amlogic,meson-g12a-usb2-phy 17 + 18 + reg: 19 + maxItems: 1 20 + 21 + clocks: 22 + maxItems: 1 23 + 24 + clock-names: 25 + items: 26 + - const: xtal 27 + 28 + resets: 29 + maxItems: 1 30 + 31 + reset-names: 32 + items: 33 + - const: phy 34 + 35 + "#phy-cells": 36 + const: 0 37 + 38 + phy-supply: 39 + maxItems: 1 40 + description: 41 + Phandle to a regulator that provides power to the PHY. This 42 + regulator will be managed during the PHY power on/off sequence. 43 + 44 + required: 45 + - compatible 46 + - reg 47 + - clocks 48 + - clock-names 49 + - resets 50 + - reset-names 51 + - "#phy-cells" 52 + 53 + examples: 54 + - | 55 + phy@36000 { 56 + compatible = "amlogic,meson-g12a-usb2-phy"; 57 + reg = <0x36000 0x2000>; 58 + clocks = <&xtal>; 59 + clock-names = "xtal"; 60 + resets = <&phy_reset>; 61 + reset-names = "phy"; 62 + #phy-cells = <0>; 63 + };
-22
Documentation/devicetree/bindings/phy/meson-g12a-usb2-phy.txt
··· 1 - * Amlogic G12A USB2 PHY binding 2 - 3 - Required properties: 4 - - compatible: Should be "amlogic,meson-g12a-usb2-phy" 5 - - reg: The base address and length of the registers 6 - - #phys-cells: must be 0 (see phy-bindings.txt in this directory) 7 - - clocks: a phandle to the clock of this PHY 8 - - clock-names: must be "xtal" 9 - - resets: a phandle to the reset line of this PHY 10 - - reset-names: must be "phy" 11 - - phy-supply: see phy-bindings.txt in this directory 12 - 13 - Example: 14 - usb2_phy0: phy@36000 { 15 - compatible = "amlogic,g12a-usb2-phy"; 16 - reg = <0x0 0x36000 0x0 0x2000>; 17 - clocks = <&xtal>; 18 - clock-names = "xtal"; 19 - resets = <&reset RESET_USB_PHY21>; 20 - reset-names = "phy"; 21 - #phy-cells = <0>; 22 - };