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

usb: dt-bindings: ti,twl4030-usb: convert to DT schema

Convert the legacy TXT binding for the TWL4030 USB module
to the modern YAML DT schema format. This adds formal validation
and improves documentation using a conditional schema.

Remove the twl4030 section from the obsolete .txt binding file

Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250824112338.64953-2-jihed.chaibi.dev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jihed Chaibi and committed by
Greg Kroah-Hartman
7d3f7801 c79bf528

+74 -22
+74
Documentation/devicetree/bindings/usb/ti,twl4030-usb.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/usb/ti,twl4030-usb.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Texas Instruments TWL4030 USB PHY and Comparator 8 + 9 + maintainers: 10 + - Peter Ujfalusi <peter.ujfalusi@gmail.com> 11 + 12 + description: 13 + Bindings for the USB PHY and comparator module found within the 14 + TWL4030 family of companion chips. If a sibling node is compatible with 15 + "ti,twl4030-bci", the driver for that node will query this device for 16 + USB power status. 17 + 18 + properties: 19 + compatible: 20 + const: ti,twl4030-usb 21 + 22 + interrupts: 23 + minItems: 1 24 + items: 25 + - description: OTG interrupt number for ID events. 26 + - description: USB interrupt number for VBUS events. 27 + 28 + usb1v5-supply: 29 + description: Phandle to the vusb1v5 regulator. 30 + 31 + usb1v8-supply: 32 + description: Phandle to the vusb1v8 regulator. 33 + 34 + usb3v1-supply: 35 + description: Phandle to the vusb3v1 regulator. 36 + 37 + usb_mode: 38 + description: | 39 + The mode used by the PHY to connect to the controller: 40 + 1: ULPI mode 41 + 2: CEA2011_3PIN mode 42 + $ref: /schemas/types.yaml#/definitions/uint32 43 + enum: [1, 2] 44 + 45 + '#phy-cells': 46 + const: 0 47 + 48 + required: 49 + - compatible 50 + - interrupts 51 + - usb1v5-supply 52 + - usb1v8-supply 53 + - usb3v1-supply 54 + - usb_mode 55 + 56 + additionalProperties: false 57 + 58 + examples: 59 + - | 60 + #include <dt-bindings/interrupt-controller/irq.h> 61 + 62 + usb-phy { 63 + compatible = "ti,twl4030-usb"; 64 + 65 + interrupts = <10 IRQ_TYPE_LEVEL_HIGH>; 66 + interrupt-parent = <&gic>; 67 + 68 + usb1v5-supply = <&reg_vusb1v5>; 69 + usb1v8-supply = <&reg_vusb1v8>; 70 + usb3v1-supply = <&reg_vusb3v1>; 71 + usb_mode = <1>; 72 + 73 + #phy-cells = <0>; 74 + };
-22
Documentation/devicetree/bindings/usb/twlxxxx-usb.txt
··· 19 19 &twl6030-usb { 20 20 usb-supply = <&vusb>; 21 21 }; 22 - 23 - TWL4030 USB PHY AND COMPARATOR 24 - - compatible : Should be "ti,twl4030-usb" 25 - - interrupts : The interrupt numbers to the cpu should be specified. First 26 - interrupt number is the otg interrupt number that raises ID interrupts 27 - and VBUS interrupts. The second interrupt number is optional. 28 - - <supply-name>-supply : phandle to the regulator device tree node. 29 - <supply-name> should be vusb1v5, vusb1v8 and vusb3v1 30 - - usb_mode : The mode used by the phy to connect to the controller. "1" 31 - specifies "ULPI" mode and "2" specifies "CEA2011_3PIN" mode. 32 - 33 - If a sibling node is compatible "ti,twl4030-bci", then it will find 34 - this device and query it for USB power status. 35 - 36 - twl4030-usb { 37 - compatible = "ti,twl4030-usb"; 38 - interrupts = < 10 4 >; 39 - usb1v5-supply = <&vusb1v5>; 40 - usb1v8-supply = <&vusb1v8>; 41 - usb3v1-supply = <&vusb3v1>; 42 - usb_mode = <1>; 43 - };