diff mbox series

[2/2] dt-bindings: arm: sunxi: Fix Orange Pi Zero bindings

Message ID e657976d8bb1bb627c983321fe9c61de5bc003b7.1602182270.git.msuchanek@suse.de (mailing list archive)
State New, archived
Headers show
Series [1/2] ARM: dts: sun8i: h2+: Fix Orange Pi Zero device description. | expand

Commit Message

Michal Suchanek Oct. 8, 2020, 6:40 p.m. UTC
There are two models of Orange Pi zero which are confusingly marketed
under the same name. Old model comes without a flash memory and current
model does have a flash memory. Add bindings for each model.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
 Documentation/devicetree/bindings/arm/sunxi.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Maxime Ripard Oct. 12, 2020, 2:47 p.m. UTC | #1
On Thu, Oct 08, 2020 at 08:40:06PM +0200, Michal Suchanek wrote:
> There are two models of Orange Pi zero which are confusingly marketed
> under the same name. Old model comes without a flash memory and current
> model does have a flash memory. Add bindings for each model.
> 
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>

Unfortunately, changing a compatible or a DT filename is not an option

Maxime
Michal Suchanek Oct. 12, 2020, 6:04 p.m. UTC | #2
On Mon, Oct 12, 2020 at 04:47:53PM +0200, Maxime Ripard wrote:
> On Thu, Oct 08, 2020 at 08:40:06PM +0200, Michal Suchanek wrote:
> > There are two models of Orange Pi zero which are confusingly marketed
> > under the same name. Old model comes without a flash memory and current
> > model does have a flash memory. Add bindings for each model.
> > 
> > Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> 
> Unfortunately, changing a compatible or a DT filename is not an option

So how do you handle the situation when you find out that there are two
different devices marketed under the same name?

Surely the device tree is labaled by the device name but now you need
two device trees that describe the two devices.

Thanks

Michal
Ondřej Jirman Oct. 12, 2020, 8:03 p.m. UTC | #3
Hello Michal,

On Mon, Oct 12, 2020 at 08:04:02PM +0200, Michal Suchánek wrote:
> On Mon, Oct 12, 2020 at 04:47:53PM +0200, Maxime Ripard wrote:
> > On Thu, Oct 08, 2020 at 08:40:06PM +0200, Michal Suchanek wrote:
> > > There are two models of Orange Pi zero which are confusingly marketed
> > > under the same name. Old model comes without a flash memory and current
> > > model does have a flash memory. Add bindings for each model.
> > > 
> > > Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> > 
> > Unfortunately, changing a compatible or a DT filename is not an option
> 
> So how do you handle the situation when you find out that there are two
> different devices marketed under the same name?
> 
> Surely the device tree is labaled by the device name but now you need
> two device trees that describe the two devices.

You can for example make the new DT name *-flash.dts, instead
of changing the name of existing DT to *-noflash.dts. Or if there's
a version number on the PCB that differs from the older variant,
use that version to differentiate the newer board DT.

regards,
	o.

> Thanks
> 
> Michal
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
index efc9118233b4..7e76ea544bf7 100644
--- a/Documentation/devicetree/bindings/arm/sunxi.yaml
+++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
@@ -864,8 +864,15 @@  properties:
           - const: xunlong,orangepi-win
           - const: allwinner,sun50i-a64
 
+      - description: Xunlong OrangePi Zero  (old model without flash memory)
+        items:
+          - const: xunlong,orangepi-zero-no-flash
+          - const: xunlong,orangepi-zero
+          - const: allwinner,sun8i-h2-plus
+
       - description: Xunlong OrangePi Zero
         items:
+          - const: xunlong,orangepi-zero-with-flash
           - const: xunlong,orangepi-zero
           - const: allwinner,sun8i-h2-plus