diff mbox series

[v3,1/2] dt-bindings: usb: Add microchip USB5807 HUB

Message ID 20230522074510.16367-1-mike.looijmans@topic.nl
State New
Headers show
Series [v3,1/2] dt-bindings: usb: Add microchip USB5807 HUB | expand

Commit Message

Mike Looijmans May 22, 2023, 7:45 a.m. UTC
The USB5807 is a 7-port USB 3.1 hub that can be configured by I2C.
This driver resets the chip, optionally allows D+/D- lines to be
swapped in the devicetree config, and then sends an ATTACH command to
put the device in operational mode.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>

---

Changes in v3:
Add minItems

Changes in v2:
Rename to microchip,usb5807.yaml
Remove reset-gpios description
Add maxItems
Add vddXX-supply properties

 .../bindings/usb/microchip,usb5807.yaml       | 58 +++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/microchip,usb5807.yaml

Comments

Rob Herring (Arm) May 22, 2023, 8:28 a.m. UTC | #1
On Mon, 22 May 2023 09:45:09 +0200, Mike Looijmans wrote:
> The USB5807 is a 7-port USB 3.1 hub that can be configured by I2C.
> This driver resets the chip, optionally allows D+/D- lines to be
> swapped in the devicetree config, and then sends an ATTACH command to
> put the device in operational mode.
> 
> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
> 
> ---
> 
> Changes in v3:
> Add minItems
> 
> Changes in v2:
> Rename to microchip,usb5807.yaml
> Remove reset-gpios description
> Add maxItems
> Add vddXX-supply properties
> 
>  .../bindings/usb/microchip,usb5807.yaml       | 58 +++++++++++++++++++
>  1 file changed, 58 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/usb/microchip,usb5807.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/usb251xb.example.dtb: usb-hub@2d: swap-dx-lanes: size is 32, expected 8
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/usb251xb.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230522074510.16367-1-mike.looijmans@topic.nl

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Mike Looijmans Nov. 21, 2024, 9:54 a.m. UTC | #2
Hi Akash,

I was planning to, but the project was terminated so there was no budget to 
finalize it. You're free to take over and make the required changes.

M.

On 21-11-2024 09:34, AKASH KUMAR wrote:
> Hi @Mike
>
> Do you have plans to mainline this change?
>
> We are using microchip hub in one of our project and we need this driver,
> we have taken your change and able to enable usb hub.
> Please check if you can push updated patchset addressing the comments from Rob.
>
> On 5/22/2023 1:58 PM, Rob Herring wrote:
>> On Mon, 22 May 2023 09:45:09 +0200, Mike Looijmans wrote:
>>> The USB5807 is a 7-port USB 3.1 hub that can be configured by I2C.
>>> This driver resets the chip, optionally allows D+/D- lines to be
>>> swapped in the devicetree config, and then sends an ATTACH command to
>>> put the device in operational mode.
>>>
>>> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
>>>
>>> ---
>>>
>>> Changes in v3:
>>> Add minItems
>>>
>>> Changes in v2:
>>> Rename to microchip,usb5807.yaml
>>> Remove reset-gpios description
>>> Add maxItems
>>> Add vddXX-supply properties
>>>
>>>   .../bindings/usb/microchip,usb5807.yaml       | 58 +++++++++++++++++++
>>>   1 file changed, 58 insertions(+)
>>>   create mode 100644 
>>> Documentation/devicetree/bindings/usb/microchip,usb5807.yaml
>>>
>> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
>> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>>
>> yamllint warnings/errors:
>>
>> dtschema/dtc warnings/errors:
>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/usb251xb.example.dtb: 
>> usb-hub@2d: swap-dx-lanes: size is 32, expected 8
>>     From schema: 
>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/usb251xb.yaml
>>
>> doc reference errors (make refcheckdocs):
>>
>> See 
>> https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230522074510.16367-1-mike.looijmans@topic.nl
>>
>> The base for the series is generally the latest rc1. A different dependency
>> should be noted in *this* patch.
>>
>> If you already ran 'make dt_binding_check' and didn't see the above
>> error(s), then make sure 'yamllint' is installed and dt-schema is up to
>> date:
>>
>> pip3 install dtschema --upgrade
>>
>> Please check and re-submit after running the above command yourself. Note
>> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
>> your schema. However, it must be unset to test all examples with your schema.
> Thanks,
> Akash
AKASH KUMAR Nov. 21, 2024, 3:26 p.m. UTC | #3
On 11/21/2024 3:24 PM, Mike Looijmans wrote:

> Hi Akash,
>
> I was planning to, but the project was terminated so there was no 
> budget to finalize it. You're free to take over and make the required 
> changes.
>
> M.
Thanks for quick response, will push the updated patchset.
Akash
>
> On 21-11-2024 09:34, AKASH KUMAR wrote:
>> Hi @Mike
>>
>> Do you have plans to mainline this change?
>>
>> We are using microchip hub in one of our project and we need this 
>> driver,
>> we have taken your change and able to enable usb hub.
>> Please check if you can push updated patchset addressing the comments 
>> from Rob.
>>
>> On 5/22/2023 1:58 PM, Rob Herring wrote:
>>> On Mon, 22 May 2023 09:45:09 +0200, Mike Looijmans wrote:
>>>> The USB5807 is a 7-port USB 3.1 hub that can be configured by I2C.
>>>> This driver resets the chip, optionally allows D+/D- lines to be
>>>> swapped in the devicetree config, and then sends an ATTACH command to
>>>> put the device in operational mode.
>>>>
>>>> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
>>>>
>>>> ---
>>>>
>>>> Changes in v3:
>>>> Add minItems
>>>>
>>>> Changes in v2:
>>>> Rename to microchip,usb5807.yaml
>>>> Remove reset-gpios description
>>>> Add maxItems
>>>> Add vddXX-supply properties
>>>>
>>>>   .../bindings/usb/microchip,usb5807.yaml       | 58 
>>>> +++++++++++++++++++
>>>>   1 file changed, 58 insertions(+)
>>>>   create mode 100644 
>>>> Documentation/devicetree/bindings/usb/microchip,usb5807.yaml
>>>>
>>> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
>>> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>>>
>>> yamllint warnings/errors:
>>>
>>> dtschema/dtc warnings/errors:
>>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/usb251xb.example.dtb: 
>>> usb-hub@2d: swap-dx-lanes: size is 32, expected 8
>>>     From schema: 
>>> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/usb251xb.yaml
>>>
>>> doc reference errors (make refcheckdocs):
>>>
>>> See 
>>> https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230522074510.16367-1-mike.looijmans@topic.nl
>>>
>>> The base for the series is generally the latest rc1. A different 
>>> dependency
>>> should be noted in *this* patch.
>>>
>>> If you already ran 'make dt_binding_check' and didn't see the above
>>> error(s), then make sure 'yamllint' is installed and dt-schema is up to
>>> date:
>>>
>>> pip3 install dtschema --upgrade
>>>
>>> Please check and re-submit after running the above command yourself. 
>>> Note
>>> that DT_SCHEMA_FILES can be set to your schema file to speed up 
>>> checking
>>> your schema. However, it must be unset to test all examples with 
>>> your schema.
>>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/microchip,usb5807.yaml b/Documentation/devicetree/bindings/usb/microchip,usb5807.yaml
new file mode 100644
index 000000000000..0a92b2f9802e
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/microchip,usb5807.yaml
@@ -0,0 +1,58 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/microchip,usb5807.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip USB 3.1 SuperSpeed Hub Controller
+
+maintainers:
+  - Mike Looijmans <mike.looijmans@topic.nl>
+
+properties:
+  compatible:
+    enum:
+      - microchip,usb5807
+
+  reg:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+
+  vdd12-supply:
+    description: core power supply (1.2V)
+
+  vdd33-supply:
+    description: main power supply (3.3V)
+
+  swap-dx-lanes:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    minItems: 1
+    maxItems: 8
+    description:
+      Specifies the ports which will swap the differential-pair (D+/D-),
+      default is not-swapped.
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      usb-hub@2d {
+        compatible = "microchip,usb5807";
+        reg = <0x2d>;
+        reset-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
+        /* Swapped D+/D- on port 0 */
+        swap-dx-lanes = <0>;
+      };
+    };