Message ID | 20220920174736.9766-9-asmaa@nvidia.com |
---|---|
State | New |
Headers | show |
Series | None | expand |
Hi, > I have a question for you and Wolfram, we don’t use device trees and > are not planning to use device trees; we only use ACPI tables. But I > think when Khalil submitted the first version of the i2c-mlxbf.c > driver, it was requested from him to add devicetree support. Do you > know why? Is it possible to remove the device tree support and so this > doc? or is devicetree support a requirement regardless of the actual > implementation? The first version sent from Khalil to the public I2C mailing list already had DT bindings [1]. I don't see a sign of someone of the public list requesting DT bindings. Maybe it was company internal? Technically, there is no requirement to support DT, especially since you have working ACPI. I don't know the process, though, of removing DT support. You would basically need to be sure that no user made use of the DT bindings introduced before. I don't know to what degree you can assume that. Maybe the DT list has more to add here? Happy hacking, Wolfram [1] http://patchwork.ozlabs.org/project/linux-i2c/list/?series=73827&state=*
Thanks for your reply Wolfram. All customers using BlueField hardware need to install our internal Firmware (proprietary) before booting any customized OS so they will always use ACPI tables. So I think it is safe to remove it. Any feedback from the DT list would be greatly appreciated! -----Original Message----- From: Wolfram Sang <wsa+renesas@sang-engineering.com> Sent: Wednesday, September 21, 2022 4:02 PM To: Asmaa Mnebhi <asmaa@nvidia.com> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>; linux-kernel@vger.kernel.org; robh@kernel.org; devicetree@vger.kernel.org; linux-i2c@vger.kernel.org; Khalil Blaiech <kblaiech@nvidia.com> Subject: How to remove DT support from a driver? (was Re: [PATCH v5 8/8] i2c: i2c-mlxbf.c: Update binding devicetree) Hi, > I have a question for you and Wolfram, we don’t use device trees and > are not planning to use device trees; we only use ACPI tables. But I > think when Khalil submitted the first version of the i2c-mlxbf.c > driver, it was requested from him to add devicetree support. Do you > know why? Is it possible to remove the device tree support and so this > doc? or is devicetree support a requirement regardless of the actual > implementation? The first version sent from Khalil to the public I2C mailing list already had DT bindings [1]. I don't see a sign of someone of the public list requesting DT bindings. Maybe it was company internal? Technically, there is no requirement to support DT, especially since you have working ACPI. I don't know the process, though, of removing DT support. You would basically need to be sure that no user made use of the DT bindings introduced before. I don't know to what degree you can assume that. Maybe the DT list has more to add here? Happy hacking, Wolfram [1] http://patchwork.ozlabs.org/project/linux-i2c/list/?series=73827&state=*
diff --git a/Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml b/Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml index 93198d5d43a6..24ab70c987fe 100644 --- a/Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml +++ b/Documentation/devicetree/bindings/i2c/mellanox,i2c-mlxbf.yaml @@ -8,6 +8,7 @@ title: Mellanox I2C SMBus on BlueField SoCs maintainers: - Khalil Blaiech <kblaiech@nvidia.com> + - Asmaa Mnebhi <asmaa@nvidia.com> allOf: - $ref: /schemas/i2c/i2c-controller.yaml# @@ -17,6 +18,7 @@ properties: enum: - mellanox,i2c-mlxbf1 - mellanox,i2c-mlxbf2 + - mellanox,i2c-mlxbf3 reg: minItems: 3 @@ -25,6 +27,9 @@ properties: - description: Cause master registers - description: Cause slave registers - description: Cause coalesce registers + - description: Smbus timer registers + - description: Smbus master registers + - description: Smbus slave registers interrupts: maxItems: 1 @@ -35,6 +40,13 @@ properties: bus frequency used to configure timing registers; The frequency is expressed in Hz. Default is 100000. + resource_version: + enum: [ 0, 1 ] + description: + Version of the device tree. resource_version = 0 when the driver uses + Smbus block resource. resource_version = 1 when the driver uses Smbus + timer, Smbus master and Smbus slave resources. + required: - compatible - reg @@ -42,18 +54,6 @@ required: unevaluatedProperties: false -if: - properties: - compatible: - contains: - enum: - - mellanox,i2c-mlxbf1 - -then: - properties: - reg: - maxItems: 3 - examples: - | i2c@2804000 { @@ -61,8 +61,13 @@ examples: reg = <0x02804000 0x800>, <0x02801200 0x020>, <0x02801260 0x020>; + <0x00000001 0x1>; + <0x02804000 0x40>, + <0x02804200 0x200>, + <0x02804400 0x200>, interrupts = <57>; clock-frequency = <100000>; + resource_version = <1>; }; - | @@ -72,6 +77,25 @@ examples: <0x02808e00 0x020>, <0x02808e20 0x020>, <0x02808e40 0x010>; + <0x02808800 0x040>; + <0x02808a00 0x200>, + <0x02808c00 0x200>, interrupts = <57>; clock-frequency = <400000>; + resource_version = <1>; + }; + + - | + i2c@2808800 { + compatible = "mellanox,i2c-mlxbf3"; + reg = <0x00000001 0x1>, + <0x13404400 0x020>, + <0x13404420 0x020>, + <0x13404440 0x010>; + <0x13404480 0x40>, + <0x13404200 0x200>, + <0x13404000 0x200>, + interrupts = <35>; + clock-frequency = <400000>; + resource_version = <1>; };