Message ID | 20220828154904.20477-2-farbere@amazon.com |
---|---|
State | Changes Requested |
Delegated to: | Bartosz Golaszewski |
Headers | show |
Series | add power-supply control to enable eeprom usage | expand |
On Sun, Aug 28, 2022 at 10:49 AM Eliav Farber <farbere@amazon.com> wrote: > > Boards using the AT24 EEPROMs might have a GPIO that controls the power > supply of the chip, and it must be set to enable the usage of it. > > Add a new optional property to the device tree binding document, which > allows to specify a GPIO regulator for the pin that controls the power. > > On Linux this means that we need to enable the GPIO at the beginning of > probe function, before trying to access the chip. > > Signed-off-by: Eliav Farber <farbere@amazon.com> > --- > V2 -> V3: > Apply on top of v6.0-rc1 > > Documentation/devicetree/bindings/eeprom/at24.yaml | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml > index d14e0accbda8..82f0046f67a9 100644 > --- a/Documentation/devicetree/bindings/eeprom/at24.yaml > +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml > @@ -179,6 +179,10 @@ properties: > description: > phandle of the regulator that provides the supply voltage. > > + power-supply: The datasheets I looked at say the supply name is 'VCC', so vcc-supply. > + description: > + phandle of the gpio regulator that provides the supply voltage. What the connection is is outside the scope of the binding. IOW, it might not be a GPIO controlled regulator. So drop the description. > + > required: > - compatible > - reg > -- > 2.37.1 >
diff --git a/Documentation/devicetree/bindings/eeprom/at24.yaml b/Documentation/devicetree/bindings/eeprom/at24.yaml index d14e0accbda8..82f0046f67a9 100644 --- a/Documentation/devicetree/bindings/eeprom/at24.yaml +++ b/Documentation/devicetree/bindings/eeprom/at24.yaml @@ -179,6 +179,10 @@ properties: description: phandle of the regulator that provides the supply voltage. + power-supply: + description: + phandle of the gpio regulator that provides the supply voltage. + required: - compatible - reg
Boards using the AT24 EEPROMs might have a GPIO that controls the power supply of the chip, and it must be set to enable the usage of it. Add a new optional property to the device tree binding document, which allows to specify a GPIO regulator for the pin that controls the power. On Linux this means that we need to enable the GPIO at the beginning of probe function, before trying to access the chip. Signed-off-by: Eliav Farber <farbere@amazon.com> --- V2 -> V3: Apply on top of v6.0-rc1 Documentation/devicetree/bindings/eeprom/at24.yaml | 4 ++++ 1 file changed, 4 insertions(+)