Skip to contentSkip to conversation

dt-bindings: gpio: fairchild,74hc595: add support for nxp,74lv164

PATCH Applied Christian Marangi 4 participants 5 messages Oct 23 – Nov 4

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dt-bindings: gpio: fairchild,74hc595: add support for nxp,74lv164

Document support for nxp,74lv164 as a variant of the currently supported 8-bit shift register with the only difference of not having an Output Enable pin and a simulated Chip Select pin.

These basic 8-bit shift register chips directly change the outputs as bits are shifted in. Particularly used to handle multiple LED for basic state feedback.

---
 .../bindings/gpio/fairchild,74hc595.yaml       | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml +15 -3
index 451538df63f7..0d5596af0ced 100644
@@ -7,9 +7,9 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Generic 8-bit shift register
 
 description: |
-  NOTE: These chips nominally don't have a chip select pin. They do however
-  have a rising-edge triggered latch clock (or storage register clock) pin,
-  which behaves like an active-low chip select.
+  NOTE: These chips nominally don't have a chip select pin. 59x chip family
+  do however have a rising-edge triggered latch clock (or storage register
+  clock) pin, which behaves like an active-low chip select.
 
   After the bits are shifted into the shift register, CS# is driven high, which
   the 74HC595 sees as a rising edge on the latch clock that results in a
@@ -22,6 +22,9 @@ description: |
                  ___                     ________
   chip select#      |___________________|
 
+  Other chip family (namely 164) directly change the outputs as bits are shifted
+  in.
+
 maintainers:
   - Maxime Ripard <[email protected]>
 
@@ -29,6 +32,7 @@ properties:
   compatible:
     enum:
       - fairchild,74hc595
+      - nxp,74lv164
       - nxp,74lvc594
 
   reg:
@@ -76,6 +80,14 @@ required:
 
 allOf:
   - $ref: /schemas/spi/spi-peripheral-props.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: nxp,74lv164
+    then:
+      properties:
+        enable-gpios: false
 
 unevaluatedProperties: false
 
Signature · 1 line
2.55.0
#1 lore raw

PATCH 2/2 gpio: 74x164: add support for 74lv164 shift register variant

Add compatible and spi define to support 74lv164 shift register variant. These work the same way as the 59x chip family with the only difference of not having a "storage" feature by directly changing the outputs as bits are shifted in without having to toggle extra pins.

---
 drivers/gpio/gpio-74x164.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpio/gpio-74x164.c +2 -0
index 5ca61cf5206a..46562c348c9c 100644
@@ -181,6 +181,7 @@ static int gen_74x164_probe(struct spi_device *spi)
 
 static const struct spi_device_id gen_74x164_spi_ids[] = {
 	{ .name = "74hc595" },
+	{ .name = "74lv164" },
 	{ .name = "74lvc594" },
 	{},
 };
@@ -188,6 +189,7 @@ MODULE_DEVICE_TABLE(spi, gen_74x164_spi_ids);
 
 static const struct of_device_id gen_74x164_dt_ids[] = {
 	{ .compatible = "fairchild,74hc595" },
+	{ .compatible = "nxp,74lv164" },
 	{ .compatible = "nxp,74lvc594" },
 	{},
 };
Signature · 1 line
2.55.0
maintainer Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] gpio: 74x164: add support for 74lv164 shift register variant

Quoted 6 lines · Christian Marangi

Add compatible and spi define to support 74lv164 shift register variant. These work the same way as the 59x chip family with the only difference of not having a "storage" feature by directly changing the outputs as bits are shifted in without having to toggle extra pins.

Yours,
Linus Walleij

Reviewed-by on v1 1/2
#3 lore raw
In reply to Christian Marangi
Quoted 4 lines · Christian Marangi

Document support for nxp,74lv164 as a variant of the currently supported 8-bit shift register with the only difference of not having an Output Enable pin and a simulated Chip Select pin.

Quoted 8 lines

These basic 8-bit shift register chips directly change the outputs as bits are shifted in. Particularly used to handle multiple LED for basic state feedback.

---
 .../bindings/gpio/fairchild,74hc595.yaml       | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

Best regards,
Krzysztof

#4 lore raw
In reply to Christian Marangi
Quoted 9 lines · Christian Marangi

Document support for nxp,74lv164 as a variant of the currently supported 8-bit shift register with the only difference of not having an Output Enable pin and a simulated Chip Select pin.

These basic 8-bit shift register chips directly change the outputs as bits are shifted in. Particularly used to handle multiple LED for basic state feedback.

[...]

Applied, thanks!

[1/2] dt-bindings: gpio: fairchild,74hc595: add support for nxp,74lv164

      https://git.kernel.org/brgl/c/861f010bf9b9daad85536d838257cdb690d94a30
[2/2] gpio: 74x164: add support for 74lv164 shift register variant
      https://git.kernel.org/brgl/c/d66b6b86d5a6278ca930112c634d03725beb7d9a

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>