Documentation / devicetree / bindings / usb / smsc,usb3503.yaml


Based on kernel version 6.11. Page generated on 2024-09-24 08:21 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/smsc,usb3503.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: SMSC USB3503 High-Speed Hub Controller

maintainers:
  - Dongjin Kim <tobetter@gmail.com>

properties:
  compatible:
    enum:
      - smsc,usb3503
      - smsc,usb3503a
      - smsc,usb3803

  reg:
    maxItems: 1

  connect-gpios:
    maxItems: 1
    description: >
      GPIO for connect

  intn-gpios:
    maxItems: 1
    description: >
      GPIO for interrupt

  reset-gpios:
    maxItems: 1
    description: >
      GPIO for reset

  bypass-gpios:
    maxItems: 1
    description: >
      GPIO for bypass.
      Control signal to select between HUB MODE and BYPASS MODE.

  disabled-ports:
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 3
    items:
      minimum: 1
      maximum: 3
    description: >
      Specifies the ports unused using their port number. Do not describe this
      property if all ports have to be enabled.

  initial-mode:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: >
      Specifies initial mode. 1 for Hub mode, 2 for standby mode and 3 for bypass mode.
      In bypass mode the downstream port 3 is connected to the upstream port with low
      switch resistance R_on.

  clocks:
    maxItems: 1
    description: >
      Clock used for driving REFCLK signal. If not provided the driver assumes
      that clock signal is always available, its rate is specified by REF_SEL
      pins and a value from the primary reference clock frequencies table is
      used.

  clock-names:
    const: refclk

  refclk-frequency:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: >
      Frequency of the REFCLK signal as defined by REF_SEL pins. If not
      provided, driver will not set rate of the REFCLK signal and assume that a
      value from the primary reference clock frequencies table is used.

required:
  - compatible

allOf:
  - if:
      not:
        properties:
          compatible:
            enum:
              - smsc,usb3803
    then:
      properties:
        bypass-gpios: false

  - if:
      required:
        - bypass-gpios
    then:
      properties:
        initial-mode:
          enum: [1, 2, 3]
    else:
      properties:
        initial-mode:
          enum: [1, 2]

additionalProperties: false

examples:
  - |
      i2c {
          #address-cells = <1>;
          #size-cells = <0>;
 
          usb-hub@8 {
              compatible = "smsc,usb3503";
              reg = <0x08>;
              connect-gpios = <&gpx3 0 1>;
              disabled-ports = <2 3>;
              intn-gpios = <&gpx3 4 1>;
              reset-gpios = <&gpx3 5 1>;
              initial-mode = <1>;
              clocks = <&clks 80>;
              clock-names = "refclk";
          };
      };

  - |
      i2c {
          #address-cells = <1>;
          #size-cells = <0>;
 
          usb-hub@8 {
              compatible = "smsc,usb3803";
              reg = <0x08>;
              connect-gpios = <&gpx3 0 1>;
              disabled-ports = <2 3>;
              intn-gpios = <&gpx3 4 1>;
              reset-gpios = <&gpx3 5 1>;
              bypass-gpios = <&gpx3 6 1>;
              initial-mode = <3>;
              clocks = <&clks 80>;
              clock-names = "refclk";
          };
      };

  - |
      #include <dt-bindings/gpio/gpio.h>
 
      usb-hub {
          /* I2C is not connected */
          compatible = "smsc,usb3503";
          initial-mode = <1>; /* initialize in HUB mode */
          disabled-ports = <1>;
          intn-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
          reset-gpios = <&pio 4 16 GPIO_ACTIVE_LOW>; /* PE16 */
          connect-gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
          refclk-frequency = <19200000>;
      };

...