[v2,2/2] dt-bindings: i2c: add loongson i2c

Message ID 20221128130025.23184-2-zhuyinbo@loongson.cn
State New
Headers
Series [v2,1/2] i2c: loongson: add bus driver for the loongson i2c controller |

Commit Message

Yinbo Zhu Nov. 28, 2022, 1 p.m. UTC
  Add the Loongson platform i2c binding with DT schema format using
json-schema.

Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Change in v2:
		1. Removed the "#address-cells" and "#size-cells" in requied.
		2. Add the reviewed-by information.

 .../bindings/i2c/loongson,ls-i2c.yaml         | 47 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 48 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml
  

Comments

Krzysztof Kozlowski Nov. 28, 2022, 2:11 p.m. UTC | #1
On 28/11/2022 14:00, Yinbo Zhu wrote:
> Add the Loongson platform i2c binding with DT schema format using
> json-schema.
> 
> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
> Reviewed-by: Rob Herring <robh@kernel.org>
> ---
> Change in v2:
> 		1. Removed the "#address-cells" and "#size-cells" in requied.
> 		2. Add the reviewed-by information.
> 
>  .../bindings/i2c/loongson,ls-i2c.yaml         | 47 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  2 files changed, 48 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml
> 
> diff --git a/Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml b/Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml
> new file mode 100644
> index 000000000000..0e4aee9146f3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml
> @@ -0,0 +1,47 @@
> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/i2c/loongson,ls-i2c.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Loongson I2C controller
> +
> +maintainers:
> +  - Yinbo Zhu <zhuyinbo@loongson.cn>
> +
> +allOf:
> +  - $ref: /schemas/i2c/i2c-controller.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - loongson,ls2k-i2c
> +      - loongson,ls7a-i2c

Why do we have the same bindings twice, with different people and file
names?

https://lore.kernel.org/all/57339e73b6c0bfe446e19a7f55a48b7ca640b9ec.1669359515.git.zhoubinbin@loongson.cn/

Best regards,
Krzysztof
  
Yinbo Zhu Nov. 28, 2022, 11:51 p.m. UTC | #2
在 2022/11/28 22:11, Krzysztof Kozlowski 写道:
> On 28/11/2022 14:00, Yinbo Zhu wrote:
>> Add the Loongson platform i2c binding with DT schema format using
>> json-schema.
>>
>> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
>> Reviewed-by: Rob Herring <robh@kernel.org>
>> ---
>> Change in v2:
>> 		1. Removed the "#address-cells" and "#size-cells" in requied.
>> 		2. Add the reviewed-by information.
>>
>>   .../bindings/i2c/loongson,ls-i2c.yaml         | 47 +++++++++++++++++++
>>   MAINTAINERS                                   |  1 +
>>   2 files changed, 48 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml b/Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml
>> new file mode 100644
>> index 000000000000..0e4aee9146f3
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml
>> @@ -0,0 +1,47 @@
>> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/i2c/loongson,ls-i2c.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Loongson I2C controller
>> +
>> +maintainers:
>> +  - Yinbo Zhu <zhuyinbo@loongson.cn>
>> +
>> +allOf:
>> +  - $ref: /schemas/i2c/i2c-controller.yaml#
>> +
>> +properties:
>> +  compatible:
>> +    enum:
>> +      - loongson,ls2k-i2c
>> +      - loongson,ls7a-i2c
> Why do we have the same bindings twice, with different people and file
> names?
>
> https://lore.kernel.org/all/57339e73b6c0bfe446e19a7f55a48b7ca640b9ec.1669359515.git.zhoubinbin@loongson.cn/
>
> Best regards,
> Krzysztof

Inthe previous internal discussion, I was assigned to go to upstream for 
i2c, but I

don't know why other people are also working on the patch. I will go to

internal communication.
  
Yinbo Zhu Nov. 29, 2022, 6:56 a.m. UTC | #3
在 2022/11/29 7:51, Yinbo Zhu 写道:
>
> 在 2022/11/28 22:11, Krzysztof Kozlowski 写道:
>> On 28/11/2022 14:00, Yinbo Zhu wrote:
>>> Add the Loongson platform i2c binding with DT schema format using
>>> json-schema.
>>>
>>> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn>
>>> Reviewed-by: Rob Herring <robh@kernel.org>
>>> ---
>>> Change in v2:
>>>         1. Removed the "#address-cells" and "#size-cells" in requied.
>>>         2. Add the reviewed-by information.
>>>
>>>   .../bindings/i2c/loongson,ls-i2c.yaml         | 47 
>>> +++++++++++++++++++
>>>   MAINTAINERS                                   |  1 +
>>>   2 files changed, 48 insertions(+)
>>>   create mode 100644 
>>> Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml
>>>
>>> diff --git 
>>> a/Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml 
>>> b/Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml
>>> new file mode 100644
>>> index 000000000000..0e4aee9146f3
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml
>>> @@ -0,0 +1,47 @@
>>> +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/i2c/loongson,ls-i2c.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Loongson I2C controller
>>> +
>>> +maintainers:
>>> +  - Yinbo Zhu <zhuyinbo@loongson.cn>
>>> +
>>> +allOf:
>>> +  - $ref: /schemas/i2c/i2c-controller.yaml#
>>> +
>>> +properties:
>>> +  compatible:
>>> +    enum:
>>> +      - loongson,ls2k-i2c
>>> +      - loongson,ls7a-i2c
>> Why do we have the same bindings twice, with different people and file
>> names?
>>
>> https://lore.kernel.org/all/57339e73b6c0bfe446e19a7f55a48b7ca640b9ec.1669359515.git.zhoubinbin@loongson.cn/ 
>>
>>
>> Best regards,
>> Krzysztof
>
> Inthe previous internal discussion, I was assigned to go to upstream 
> for i2c, but I
>
> don't know why other people are also working on the patch. I will go to
>
> internal communication.

Hi

please follow zhoubinbin's loongson i2c series patch.

I will not cover it.


Thanks,

Yinbo.
  

Patch

diff --git a/Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml b/Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml
new file mode 100644
index 000000000000..0e4aee9146f3
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml
@@ -0,0 +1,47 @@ 
+# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/loongson,ls-i2c.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Loongson I2C controller
+
+maintainers:
+  - Yinbo Zhu <zhuyinbo@loongson.cn>
+
+allOf:
+  - $ref: /schemas/i2c/i2c-controller.yaml#
+
+properties:
+  compatible:
+    enum:
+      - loongson,ls2k-i2c
+      - loongson,ls7a-i2c
+
+  interrupts:
+    maxItems: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c0: i2c@1fe21000 {
+        compatible = "loongson,ls2k-i2c";
+        reg = <0x1fe21000 0x8>;
+        interrupt-parent = <&liointc0>;
+        interrupts = <22 IRQ_TYPE_LEVEL_LOW>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+        pinctrl-names = "default";
+        pinctrl-0 = <&i2c0_pins_default>;
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index 95f26184e17c..9f70f4997afc 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12062,6 +12062,7 @@  LOONGSON I2C DRIVER
 M:	Yinbo Zhu <zhuyinbo@loongson.cn>
 L:	linux-i2c@vger.kernel.org
 S:	Maintained
+F:	Documentation/devicetree/bindings/i2c/loongson,ls-i2c.yaml
 F:	drivers/i2c/busses/i2c-loongson.c
 
 LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)