[PATCH v1 1/2] dt-bindings: gpio: fairchild,74hc595: add registers-default property

Chanhong Jung
2026-04-22T16:05:13Z

The 74HC595 and 74LVC594 shift registers latch their outputs until the
first serial write, so boards that depend on a specific power-on pattern
(for example active-low indicators, reset lines, or other signals that
must come up non-zero) have no way to express that today: the Linux
driver always writes zeros from its zero-initialised buffer during
probe.

Describe a new optional 'registers-default' property that carries a u8
array - one byte per cascaded register, in the same order used by the
driver's internal buffer (first byte targets the last register in the
chain). The Linux driver change that consumes this property follows.

This property is already recognised by the corresponding U-Boot driver
(drivers/gpio/74x164_gpio.c), so documenting it here brings the two
bindings back in sync and allows boards to initialise the chain once
from the bootloader DT and keep the same value after the kernel takes
over.

Signed-off-by: Chanhong Jung <happycpu@gmail.com>
---
.../devicetree/bindings/gpio/fairchild,74hc595.yaml | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml b/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml
index 23410aeca..c6221ed75 100644
--- a/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml
+++ b/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml
@@ -45,6 +45,15 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
description: Number of daisy-chained shift registers

+ registers-default:
+ $ref: /schemas/types.yaml#/definitions/uint8-array
+ description:
+ Initial state of the daisy-chained outputs, written by the driver
+ before the gpiochip is registered. One byte per cascaded register,
+ in the same order used by the driver's buffer (the first byte
+ targets the last register in the chain). When absent, outputs come
+ up zeroed. The number of entries must match 'registers-number'.
+
enable-gpios:
description: GPIO connected to the OE (Output Enable) pin.
maxItems: 1
@@ -79,6 +88,7 @@ examples:
gpio-controller;
#gpio-cells = <2>;
registers-number = <4>;
+ registers-default = /bits/ 8 <0xff 0xff 0x00 0x00>;
spi-max-frequency = <100000>;
};
};
--
2.34.1