* [PATCH v2 0/4] Add support for Maxim MAX735x/MAX736x variants @ 2022-01-08 18:57 Patrick Rudolph 2022-01-08 18:57 ` [PATCH v2 1/4] dt-bindings: i2c: Add " Patrick Rudolph 2022-01-08 18:57 ` [PATCH v2 3/4] dt-bindings: i2c: Add regulator to pca954x and max735x Patrick Rudolph 0 siblings, 2 replies; 5+ messages in thread From: Patrick Rudolph @ 2022-01-08 18:57 UTC (permalink / raw) To: Laurent Pinchart, linux-i2c, linux-kernel; +Cc: Patrick Rudolph, devicetree v2: - Move dt-bindings to separate file - Added support for MAX736x as they are very similar - Fixed an issue found by kernel test robot - Dropped max735x property and custom IRQ check - Added MAX7357 config register defines instead of magic values - Renamed vcc-supply to vdd-supply Patrick Rudolph (4): dt-bindings: i2c: Add Maxim MAX735x/MAX736x variants i2c: muxes: pca954x: Add MAX735x/MAX736x support dt-bindings: i2c: Add regulator to pca954x and max735x i2c: muxes: pca954x: Add regulator support .../bindings/i2c/i2c-mux-max735x.yaml | 106 +++++++++++++++ .../bindings/i2c/i2c-mux-pca954x.yaml | 5 + drivers/i2c/muxes/Kconfig | 4 +- drivers/i2c/muxes/i2c-mux-pca954x.c | 124 ++++++++++++++++-- 4 files changed, 228 insertions(+), 11 deletions(-) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml -- 2.33.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/4] dt-bindings: i2c: Add Maxim MAX735x/MAX736x variants 2022-01-08 18:57 [PATCH v2 0/4] Add support for Maxim MAX735x/MAX736x variants Patrick Rudolph @ 2022-01-08 18:57 ` Patrick Rudolph 2022-01-08 23:14 ` Laurent Pinchart 2022-01-08 18:57 ` [PATCH v2 3/4] dt-bindings: i2c: Add regulator to pca954x and max735x Patrick Rudolph 1 sibling, 1 reply; 5+ messages in thread From: Patrick Rudolph @ 2022-01-08 18:57 UTC (permalink / raw) To: Peter Rosin, Laurent Pinchart Cc: Patrick Rudolph, Rob Herring, linux-i2c, devicetree, linux-kernel Add the Maxim MAX735x/MAX736x as supported chip and give an example how to use it. The functionality will be provided by the exisintg pca954x driver. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> --- .../bindings/i2c/i2c-mux-max735x.yaml | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml new file mode 100644 index 000000000000..dc924ec934ca --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml @@ -0,0 +1,101 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/i2c/i2c-mux-max735x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim MAX735x/MAX736x I2C bus switch + +maintainers: + - Laurent Pinchart <laurent.pinchart@ideasonboard.com> + +description: + The binding supports Maxim MAX735x and MAX736x I2C mux/switch devices. + +allOf: + - $ref: /schemas/i2c/i2c-mux.yaml# + - if: + properties: + compatible: + contains: + enum: + - maxim,max7367 + - maxim,max7369 + then: + properties: + interrupts: true + + "#interrupt-cells": + const: 2 + + interrupt-controller: true + +properties: + compatible: + oneOf: + - enum: + - maxim,max7356 + - maxim,max7357 + - maxim,max7358 + - maxim,max7367 + - maxim,max7368 + - maxim,max7369 + + reg: + maxItems: 1 + + reset-gpios: + maxItems: 1 + + i2c-mux-idle-disconnect: + type: boolean + description: Forces mux to disconnect all children in idle state. This is + necessary for example, if there are several multiplexers on the bus and + the devices behind them use same I2C addresses. + + idle-state: + description: if present, overrides i2c-mux-idle-disconnect + $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + i2c-mux@74 { + compatible = "maxim,max7357"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x74>; + + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + eeprom@54 { + compatible = "atmel,24c08"; + reg = <0x54>; + }; + }; + + i2c@7 { + #address-cells = <1>; + #size-cells = <0>; + reg = <7>; + + rtc@51 { + compatible = "nxp,pcf8563"; + reg = <0x51>; + }; + }; + }; + }; +... -- 2.33.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/4] dt-bindings: i2c: Add Maxim MAX735x/MAX736x variants 2022-01-08 18:57 ` [PATCH v2 1/4] dt-bindings: i2c: Add " Patrick Rudolph @ 2022-01-08 23:14 ` Laurent Pinchart 0 siblings, 0 replies; 5+ messages in thread From: Laurent Pinchart @ 2022-01-08 23:14 UTC (permalink / raw) To: Patrick Rudolph Cc: Peter Rosin, Rob Herring, linux-i2c, devicetree, linux-kernel Hi Patrick, Thank you for the patch. On Sat, Jan 08, 2022 at 07:57:55PM +0100, Patrick Rudolph wrote: > Add the Maxim MAX735x/MAX736x as supported chip and give an example > how to use it. The functionality will be provided by the exisintg > pca954x driver. While DT bindings and drivers are decoupled, the fact that the same driver provides support for the MAX735x/MAX736x indicates there's some similarity between those and the PCA954x chips. Would they be similar enough to have a single DT binding schema file ? This file looks very similar to Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml. > Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> > --- > .../bindings/i2c/i2c-mux-max735x.yaml | 101 ++++++++++++++++++ > 1 file changed, 101 insertions(+) > create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml > > diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml > new file mode 100644 > index 000000000000..dc924ec934ca > --- /dev/null > +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml > @@ -0,0 +1,101 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/i2c/i2c-mux-max735x.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Maxim MAX735x/MAX736x I2C bus switch > + > +maintainers: > + - Laurent Pinchart <laurent.pinchart@ideasonboard.com> > + > +description: > + The binding supports Maxim MAX735x and MAX736x I2C mux/switch devices. > + > +allOf: > + - $ref: /schemas/i2c/i2c-mux.yaml# > + - if: > + properties: > + compatible: > + contains: > + enum: > + - maxim,max7367 > + - maxim,max7369 > + then: > + properties: > + interrupts: true > + > + "#interrupt-cells": > + const: 2 > + > + interrupt-controller: true > + > +properties: > + compatible: > + oneOf: > + - enum: > + - maxim,max7356 > + - maxim,max7357 > + - maxim,max7358 > + - maxim,max7367 > + - maxim,max7368 > + - maxim,max7369 > + > + reg: > + maxItems: 1 > + > + reset-gpios: > + maxItems: 1 > + > + i2c-mux-idle-disconnect: > + type: boolean > + description: Forces mux to disconnect all children in idle state. This is > + necessary for example, if there are several multiplexers on the bus and > + the devices behind them use same I2C addresses. > + > + idle-state: > + description: if present, overrides i2c-mux-idle-disconnect > + $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state > + > +required: > + - compatible > + - reg > + > +unevaluatedProperties: false > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + i2c-mux@74 { > + compatible = "maxim,max7357"; > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <0x74>; > + > + i2c@1 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <1>; > + > + eeprom@54 { > + compatible = "atmel,24c08"; > + reg = <0x54>; > + }; > + }; > + > + i2c@7 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <7>; > + > + rtc@51 { > + compatible = "nxp,pcf8563"; > + reg = <0x51>; > + }; > + }; > + }; > + }; > +... -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 3/4] dt-bindings: i2c: Add regulator to pca954x and max735x 2022-01-08 18:57 [PATCH v2 0/4] Add support for Maxim MAX735x/MAX736x variants Patrick Rudolph 2022-01-08 18:57 ` [PATCH v2 1/4] dt-bindings: i2c: Add " Patrick Rudolph @ 2022-01-08 18:57 ` Patrick Rudolph 2022-01-08 23:17 ` Laurent Pinchart 1 sibling, 1 reply; 5+ messages in thread From: Patrick Rudolph @ 2022-01-08 18:57 UTC (permalink / raw) To: Peter Rosin, Laurent Pinchart Cc: Patrick Rudolph, Rob Herring, linux-i2c, devicetree, linux-kernel Add a regulator called vdd also present in datasheets of PCA954x and MAX735x and update the examples. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> --- Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml | 5 +++++ Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml index dc924ec934ca..93eda07718e8 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml @@ -57,6 +57,9 @@ properties: description: if present, overrides i2c-mux-idle-disconnect $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state + vdd-supply: + description: A voltage regulator supplying power to the chip. + required: - compatible - reg @@ -75,6 +78,8 @@ examples: #size-cells = <0>; reg = <0x74>; + vdd-supply = <&p3v3>; + i2c@1 { #address-cells = <1>; #size-cells = <0>; diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml index 9f1726d0356b..b28d05dc956d 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml @@ -59,6 +59,9 @@ properties: description: if present, overrides i2c-mux-idle-disconnect $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state + vdd-supply: + description: A voltage regulator supplying power to the chip. + required: - compatible - reg @@ -79,6 +82,8 @@ examples: #size-cells = <0>; reg = <0x74>; + vdd-supply = <&p3v3>; + interrupt-parent = <&ipic>; interrupts = <17 IRQ_TYPE_LEVEL_LOW>; interrupt-controller; -- 2.33.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 3/4] dt-bindings: i2c: Add regulator to pca954x and max735x 2022-01-08 18:57 ` [PATCH v2 3/4] dt-bindings: i2c: Add regulator to pca954x and max735x Patrick Rudolph @ 2022-01-08 23:17 ` Laurent Pinchart 0 siblings, 0 replies; 5+ messages in thread From: Laurent Pinchart @ 2022-01-08 23:17 UTC (permalink / raw) To: Patrick Rudolph Cc: Peter Rosin, Rob Herring, linux-i2c, devicetree, linux-kernel Hi Patrick, Thank you for the patch. On Sat, Jan 08, 2022 at 07:57:57PM +0100, Patrick Rudolph wrote: > Add a regulator called vdd also present in datasheets of PCA954x > and MAX735x and update the examples. > > Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> > --- > Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml | 5 +++++ > Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml | 5 +++++ > 2 files changed, 10 insertions(+) > > diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml > index dc924ec934ca..93eda07718e8 100644 > --- a/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml > +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-max735x.yaml > @@ -57,6 +57,9 @@ properties: > description: if present, overrides i2c-mux-idle-disconnect > $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state > > + vdd-supply: > + description: A voltage regulator supplying power to the chip. > + > required: > - compatible > - reg > @@ -75,6 +78,8 @@ examples: > #size-cells = <0>; > reg = <0x74>; > > + vdd-supply = <&p3v3>; > + > i2c@1 { > #address-cells = <1>; > #size-cells = <0>; This should be part of patch 1/4 (or better in my opinion, the two binding files should be merged into a single one). > diff --git a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml > index 9f1726d0356b..b28d05dc956d 100644 > --- a/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml > +++ b/Documentation/devicetree/bindings/i2c/i2c-mux-pca954x.yaml > @@ -59,6 +59,9 @@ properties: > description: if present, overrides i2c-mux-idle-disconnect > $ref: /schemas/mux/mux-controller.yaml#/properties/idle-state > > + vdd-supply: > + description: A voltage regulator supplying power to the chip. > + > required: > - compatible > - reg > @@ -79,6 +82,8 @@ examples: > #size-cells = <0>; > reg = <0x74>; > > + vdd-supply = <&p3v3>; > + > interrupt-parent = <&ipic>; > interrupts = <17 IRQ_TYPE_LEVEL_LOW>; > interrupt-controller; For this part, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-01-08 23:17 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-01-08 18:57 [PATCH v2 0/4] Add support for Maxim MAX735x/MAX736x variants Patrick Rudolph 2022-01-08 18:57 ` [PATCH v2 1/4] dt-bindings: i2c: Add " Patrick Rudolph 2022-01-08 23:14 ` Laurent Pinchart 2022-01-08 18:57 ` [PATCH v2 3/4] dt-bindings: i2c: Add regulator to pca954x and max735x Patrick Rudolph 2022-01-08 23:17 ` Laurent Pinchart
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).