Skip to content

Commit abfffb4

Browse files
Charan-Pedumurugregkh
authored andcommitted
dt-bindings: usb: atmel,at91rm9200-udc: convert to DT schema
Convert Atmel AT91 USB Device Controller (UDC) binding to DT schema. Changes during conversion: - Include "atmel,pullup-gpio" and "atmel,matrix" in the properties since they are required by existing in-tree DTS definitions. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Charan Pedumuru <charan.pedumuru@gmail.com> Link: https://patch.msgid.link/20260327-atmel-usb-v4-4-eb8b6e49b29d@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 02d58df commit abfffb4

2 files changed

Lines changed: 76 additions & 28 deletions

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/usb/atmel,at91rm9200-udc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Atmel AT91 USB Device Controller (UDC)
8+
9+
maintainers:
10+
- Nicolas Ferre <nicolas.ferre@microchip.com>
11+
- Alexandre Belloni <alexandre.belloni@bootlin.com>
12+
13+
description:
14+
The Atmel AT91 USB Device Controller provides USB gadget (device-mode)
15+
functionality on AT91 SoCs. It requires a peripheral clock and an AHB
16+
clock for operation and may optionally control VBUS power through a GPIO.
17+
18+
properties:
19+
compatible:
20+
enum:
21+
- atmel,at91rm9200-udc
22+
- atmel,at91sam9260-udc
23+
- atmel,at91sam9261-udc
24+
- atmel,at91sam9263-udc
25+
26+
reg:
27+
maxItems: 1
28+
29+
interrupts:
30+
maxItems: 1
31+
32+
clocks:
33+
maxItems: 2
34+
35+
clock-names:
36+
items:
37+
- const: pclk
38+
- const: hclk
39+
40+
atmel,vbus-gpio:
41+
description: GPIO used to enable or control VBUS power for the USB bus.
42+
maxItems: 1
43+
44+
atmel,matrix:
45+
$ref: /schemas/types.yaml#/definitions/phandle
46+
description: Phandle to the Atmel bus matrix controller.
47+
48+
atmel,pullup-gpio:
49+
description:
50+
GPIO controlling the USB D+ pull-up resistor used to signal device
51+
connection to the host.
52+
maxItems: 1
53+
54+
required:
55+
- compatible
56+
- reg
57+
- interrupts
58+
- clocks
59+
- clock-names
60+
61+
additionalProperties: false
62+
63+
examples:
64+
- |
65+
#include <dt-bindings/interrupt-controller/irq.h>
66+
#include <dt-bindings/clock/at91.h>
67+
#include <dt-bindings/gpio/gpio.h>
68+
gadget@fffa4000 {
69+
compatible = "atmel,at91rm9200-udc";
70+
reg = <0xfffa4000 0x4000>;
71+
interrupts = <11 IRQ_TYPE_LEVEL_HIGH 2>;
72+
clocks = <&udc_clk>, <&udpck>;
73+
clock-names = "pclk", "hclk";
74+
atmel,vbus-gpio = <&pioC 5 GPIO_ACTIVE_HIGH>;
75+
};
76+
...

Documentation/devicetree/bindings/usb/atmel-usb.txt

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,5 @@
11
Atmel SOC USB controllers
22

3-
AT91 USB device controller
4-
5-
Required properties:
6-
- compatible: Should be one of the following
7-
"atmel,at91rm9200-udc"
8-
"atmel,at91sam9260-udc"
9-
"atmel,at91sam9261-udc"
10-
"atmel,at91sam9263-udc"
11-
- reg: Address and length of the register set for the device
12-
- interrupts: Should contain macb interrupt
13-
- clocks: Should reference the peripheral and the AHB clocks
14-
- clock-names: Should contain two strings
15-
"pclk" for the peripheral clock
16-
"hclk" for the AHB clock
17-
18-
Optional properties:
19-
- atmel,vbus-gpio: If present, specifies a gpio that needs to be
20-
activated for the bus to be powered.
21-
22-
usb1: gadget@fffa4000 {
23-
compatible = "atmel,at91rm9200-udc";
24-
reg = <0xfffa4000 0x4000>;
25-
interrupts = <10 4>;
26-
clocks = <&udc_clk>, <&udpck>;
27-
clock-names = "pclk", "hclk";
28-
atmel,vbus-gpio = <&pioC 5 0>;
29-
};
30-
313
Atmel High-Speed USB device controller
324

335
Required properties:

0 commit comments

Comments
 (0)