The ROHM BD79100G is a 12-bit ADC which can be read over SPI. Device has
no MOSI pin. ADC results can be read from MISO by clocking in 16 bits.
The 4 leading bits will be zero, last 12 containig the data.
Device has only VCC supply pin, which acts also as a VFS, determining the
voltage for full 12-bits. Specifying it is mandatory.
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
---
Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml
index 44c671eeda73..10fb6e14c2d0 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml
@@ -46,6 +46,7 @@ properties:
- ti,ads7867
- ti,ads7868
- lltc,ltc2314-14
+ - rohm,bu79100g
reg:
maxItems: 1
@@ -96,6 +97,7 @@ allOf:
- ti,adc121s
- ti,ads7866
- ti,ads7868
+ - rohm,bu79100g
then:
required:
- vcc-supply
--
2.49.0
On Tue, May 13, 2025 at 11:26:27AM +0300, Matti Vaittinen wrote: > The ROHM BD79100G is a 12-bit ADC which can be read over SPI. Device has > no MOSI pin. ADC results can be read from MISO by clocking in 16 bits. > The 4 leading bits will be zero, last 12 containig the data. I think it is probably worth mentioning why a rohm device is going into this binding (clone?) and that the 12-bit thing is a differentiator that is why you're not using a fallback. > > Device has only VCC supply pin, which acts also as a VFS, determining the > voltage for full 12-bits. Specifying it is mandatory. > > Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> > --- > Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml > index 44c671eeda73..10fb6e14c2d0 100644 > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml > @@ -46,6 +46,7 @@ properties: > - ti,ads7867 > - ti,ads7868 > - lltc,ltc2314-14 > + - rohm,bu79100g > > reg: > maxItems: 1 > @@ -96,6 +97,7 @@ allOf: > - ti,adc121s > - ti,ads7866 > - ti,ads7868 > + - rohm,bu79100g > then: > required: > - vcc-supply > -- > 2.49.0 >
On 13/05/2025 17:39, Conor Dooley wrote: > On Tue, May 13, 2025 at 11:26:27AM +0300, Matti Vaittinen wrote: >> The ROHM BD79100G is a 12-bit ADC which can be read over SPI. Device has >> no MOSI pin. ADC results can be read from MISO by clocking in 16 bits. >> The 4 leading bits will be zero, last 12 containig the data. > > I think it is probably worth mentioning why a rohm device is going into > this binding (clone?) and that the 12-bit thing is a differentiator that > is why you're not using a fallback. Thanks for mentioning the fallback option Conor! You're a hero :) Now that you mentioned using a fallback, I believe I can ditch the driver changes and make BU79100G to use adc101s as a fallback! I didn't even consider if some of the existing devices were (from SW perspective) identical. I was just happy when I found there was a driver supporting these simple SPI ADCs. Then I picked the right macro for doing register data conversion and correct shift, dumped in the bit width and extended the longish list of devices. I never checked if another device in the driver had similar set of "IC specific values". Yours, -- Matti
On 14/05/2025 08:36, Matti Vaittinen wrote: > On 13/05/2025 17:39, Conor Dooley wrote: >> On Tue, May 13, 2025 at 11:26:27AM +0300, Matti Vaittinen wrote: >>> The ROHM BD79100G is a 12-bit ADC which can be read over SPI. Device has >>> no MOSI pin. ADC results can be read from MISO by clocking in 16 bits. >>> The 4 leading bits will be zero, last 12 containig the data. >> >> I think it is probably worth mentioning why a rohm device is going into >> this binding (clone?) and that the 12-bit thing is a differentiator that >> is why you're not using a fallback. > > Thanks for mentioning the fallback option Conor! You're a hero :) > > Now that you mentioned using a fallback, I believe I can ditch the > driver changes and make BU79100G to use adc101s as a fallback! I mean, ads7866 as a fallback. Sorry. > > I didn't even consider if some of the existing devices were (from SW > perspective) identical. I was just happy when I found there was a driver > supporting these simple SPI ADCs. Then I picked the right macro for > doing register data conversion and correct shift, dumped in the bit > width and extended the longish list of devices. I never checked if > another device in the driver had similar set of "IC specific values". > > Yours, > -- Matti
On Tue, May 13, 2025 at 03:39:11PM +0100, Conor Dooley wrote: > On Tue, May 13, 2025 at 11:26:27AM +0300, Matti Vaittinen wrote: > > The ROHM BD79100G is a 12-bit ADC which can be read over SPI. Device has > > no MOSI pin. ADC results can be read from MISO by clocking in 16 bits. > > The 4 leading bits will be zero, last 12 containig the data. > > I think it is probably worth mentioning why a rohm device is going into > this binding (clone?) and that the 12-bit thing is a differentiator that > is why you're not using a fallback. Sent too soon, meant to say: with that Acked-by: Conor Dooley <conor.dooley@microchip.com> > > > > > Device has only VCC supply pin, which acts also as a VFS, determining the > > voltage for full 12-bits. Specifying it is mandatory. > > > > Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> > > --- > > Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml > > index 44c671eeda73..10fb6e14c2d0 100644 > > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml > > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml > > @@ -46,6 +46,7 @@ properties: > > - ti,ads7867 > > - ti,ads7868 > > - lltc,ltc2314-14 > > + - rohm,bu79100g > > > > reg: > > maxItems: 1 > > @@ -96,6 +97,7 @@ allOf: > > - ti,adc121s > > - ti,ads7866 > > - ti,ads7868 > > + - rohm,bu79100g > > then: > > required: > > - vcc-supply > > -- > > 2.49.0 > > > >
© 2016 - 2026 Red Hat, Inc.