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

dt-bindings: usb: usb-nop-xceiv: Convert to DT schema

Convert the usb-nop-xceiv binding to DT schema.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210327202816.545282-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Rob Herring and committed by
Greg Kroah-Hartman
487adc54 cc27bb4e

+64 -43
-43
Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt
··· 1 - USB NOP PHY 2 - 3 - Required properties: 4 - - compatible: should be usb-nop-xceiv 5 - - #phy-cells: Must be 0 6 - 7 - Optional properties: 8 - - clocks: phandle to the PHY clock. Use as per Documentation/devicetree 9 - /bindings/clock/clock-bindings.txt 10 - This property is required if clock-frequency is specified. 11 - 12 - - clock-names: Should be "main_clk" 13 - 14 - - clock-frequency: the clock frequency (in Hz) that the PHY clock must 15 - be configured to. 16 - 17 - - vcc-supply: phandle to the regulator that provides power to the PHY. 18 - 19 - - reset-gpios: Should specify the GPIO for reset. 20 - 21 - - vbus-detect-gpio: should specify the GPIO detecting a VBus insertion 22 - (see Documentation/devicetree/bindings/gpio/gpio.txt) 23 - - vbus-regulator : should specifiy the regulator supplying current drawn from 24 - the VBus line (see Documentation/devicetree/bindings/regulator/regulator.txt). 25 - 26 - Example: 27 - 28 - hsusb1_phy { 29 - compatible = "usb-nop-xceiv"; 30 - clock-frequency = <19200000>; 31 - clocks = <&osc 0>; 32 - clock-names = "main_clk"; 33 - vcc-supply = <&hsusb1_vcc_regulator>; 34 - reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; 35 - vbus-detect-gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>; 36 - vbus-regulator = <&vbus_regulator>; 37 - #phy-cells = <0>; 38 - }; 39 - 40 - hsusb1_phy is a NOP USB PHY device that gets its clock from an oscillator 41 - and expects that clock to be configured to 19.2MHz by the NOP PHY driver. 42 - hsusb1_vcc_regulator provides power to the PHY and GPIO 7 controls RESET. 43 - GPIO 13 detects VBus insertion, and accordingly notifies the vbus-regulator.
+64
Documentation/devicetree/bindings/usb/usb-nop-xceiv.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/usb/usb-nop-xceiv.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: USB NOP PHY 8 + 9 + maintainers: 10 + - Rob Herring <robh@kernel.org> 11 + 12 + properties: 13 + compatible: 14 + const: usb-nop-xceiv 15 + 16 + clocks: 17 + maxItems: 1 18 + 19 + clock-names: 20 + const: main_clk 21 + 22 + clock-frequency: true 23 + 24 + '#phy-cells': 25 + const: 0 26 + 27 + vcc-supply: 28 + description: phandle to the regulator that provides power to the PHY. 29 + 30 + reset-gpios: 31 + maxItems: 1 32 + 33 + vbus-detect-gpio: 34 + description: Should specify the GPIO detecting a VBus insertion 35 + maxItems: 1 36 + 37 + vbus-regulator: 38 + description: Should specifiy the regulator supplying current drawn from 39 + the VBus line. 40 + $ref: /schemas/types.yaml#/definitions/phandle 41 + 42 + required: 43 + - compatible 44 + - '#phy-cells' 45 + 46 + additionalProperties: false 47 + 48 + examples: 49 + - | 50 + #include <dt-bindings/gpio/gpio.h> 51 + 52 + hsusb1_phy { 53 + compatible = "usb-nop-xceiv"; 54 + clock-frequency = <19200000>; 55 + clocks = <&osc 0>; 56 + clock-names = "main_clk"; 57 + vcc-supply = <&hsusb1_vcc_regulator>; 58 + reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; 59 + vbus-detect-gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>; 60 + vbus-regulator = <&vbus_regulator>; 61 + #phy-cells = <0>; 62 + }; 63 + 64 + ...