aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-02-18 23:01:44 +0100
committerLubomir Rintel <lkundrak@v3.sk>2019-04-19 07:28:33 +0200
commit37b0a8a33833d84d0181f6ed4555b883aab51f06 (patch)
tree9a538d407caba6cd130c2bb899c89deade9fb85f
parent92c2d67990d4686ed2e835b9f99b449527a3c69b (diff)
downloadopenfirmware-37b0a8a33833d84d0181f6ed4555b883aab51f06.tar.gz
olpc/gpio-i2c: use zero #size-cells
The I2C devices are addressed with a single address number and i2c/i2c-gpio.txt bindings say so too.
-rw-r--r--cpu/arm/olpc/gpio-i2c.fth16
-rw-r--r--dev/olpc/dcon/mmp2dcon.fth2
-rw-r--r--dev/olpc/mmp2camera/loadpkg.fth2
3 files changed, 10 insertions, 10 deletions
diff --git a/cpu/arm/olpc/gpio-i2c.fth b/cpu/arm/olpc/gpio-i2c.fth
index 2c216833..87f20242 100644
--- a/cpu/arm/olpc/gpio-i2c.fth
+++ b/cpu/arm/olpc/gpio-i2c.fth
@@ -15,10 +15,10 @@ purpose: Device tree nodes for I2C buses implemented with GPIOs
;
: make-sensor-node ( name$ i2c-addr -- )
- " /camera-i2c" find-device ( name$ i2c-addr )
- new-device ( name$ i2c-addr )
- 1 reg ( name$ )
- +compatible ( )
+ " /camera-i2c" find-device ( name$ i2c-addr )
+ new-device ( name$ i2c-addr )
+ " reg" integer-property ( name$ )
+ +compatible ( )
" image-sensor" device-name
0 0 encode-bytes
cam-pwr-gpio# 0 encode-gpio
@@ -33,7 +33,7 @@ dev /
" camera-i2c" device-name
" i2c-gpio" +compatible
1 " #address-cells" integer-property
- 1 " #size-cells" integer-property
+ 0 " #size-cells" integer-property
0 0 reg \ So linux will assign a static device name
@@ -81,7 +81,7 @@ dev /
" dcon-i2c" device-name
" i2c-gpio" +compatible
1 " #address-cells" integer-property
- 1 " #size-cells" integer-property
+ 0 " #size-cells" integer-property
0 0 reg \ So linux will assign a static device name
@@ -120,7 +120,7 @@ dev /
0 0 reg
" i2c-gpio" +compatible
1 " #address-cells" integer-property
- 1 " #size-cells" integer-property
+ 0 " #size-cells" integer-property
: encode-unit ( phys.. -- str ) push-hex (u.) pop-base ;
: decode-unit ( str -- phys.. ) push-hex $number if 0 then pop-base ;
@@ -146,7 +146,7 @@ dev /
new-device
" hdmi-ddc" device-name
- h# 50 1 reg
+ h# 50 " reg" integer-property
" eeprom" +compatible
: close ( -- ) ;
h# 80 constant /edid-chunk
diff --git a/dev/olpc/dcon/mmp2dcon.fth b/dev/olpc/dcon/mmp2dcon.fth
index 154baa07..24eca70d 100644
--- a/dev/olpc/dcon/mmp2dcon.fth
+++ b/dev/olpc/dcon/mmp2dcon.fth
@@ -11,7 +11,7 @@
" dcon" device-name
" olpc,xo1-dcon" +compatible
" olpc,xo1.75-dcon" +compatible
-my-space 1 reg
+my-space " reg" integer-property
0 0 encode-bytes
dcon-stat0-gpio# 0 encode-gpio
diff --git a/dev/olpc/mmp2camera/loadpkg.fth b/dev/olpc/mmp2camera/loadpkg.fth
index 1aaecc70..a3b06bf1 100644
--- a/dev/olpc/mmp2camera/loadpkg.fth
+++ b/dev/olpc/mmp2camera/loadpkg.fth
@@ -45,7 +45,7 @@
my-self >r 0 to my-self
" /image-sensor" find-device ( name$ i2c-addr )
" reg" get-property if ( name$ i2c-addr )
- 1 reg ( name$ )
+ " reg" integer-property ( name$ )
+compatible ( )
else ( name$ i2c-addr regval$ )
2drop 3drop ( )