diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-10-12 16:06:25 +0200 |
---|---|---|
committer | James Cameron <quozl@laptop.org> | 2020-03-12 14:17:55 +1100 |
commit | 6174f068081c13080125c012820b02bf4d5f405b (patch) | |
tree | 4edebb2884a71fed4b169e4a6b427269effb618c | |
parent | 166f1b8b67d04a79b0643060abcad3acac65995e (diff) | |
download | openfirmware-6174f068081c13080125c012820b02bf4d5f405b.tar.gz |
olpc/dcon: add gpio and ports to /dcon node
This will allow the driver to discover how is the DCON connected in the
system.
-rw-r--r-- | dev/olpc/dcon/dcon.fth | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/dev/olpc/dcon/dcon.fth b/dev/olpc/dcon/dcon.fth index 5a70d035..e5f05117 100644 --- a/dev/olpc/dcon/dcon.fth +++ b/dev/olpc/dcon/dcon.fth @@ -3,8 +3,55 @@ new-device " dcon" device-name " olpc,xo1-dcon" +compatible +" himax,hx8837" +compatible h# 0d " reg" integer-property +" /isa" encode-phandle + dcon-stat0-gpio# encode-int encode+ + 0 encode-int encode+ +" /isa" encode-phandle encode+ + dcon-stat1-gpio# encode-int encode+ + 0 encode-int encode+ +" stat-gpios" property + +" /isa" encode-phandle + dcon-load-gpio# encode-int encode+ + 0 encode-int encode+ +" load-gpios" property + +" /isa" encode-phandle " interrupt-parent" property + +dcon-irq-gpio# encode-int +2 encode-int encode+ \ IRQ_TYPE_EDGE_FALLING +" interrupts" property + +new-device + " ports" device-name + 1 " #address-cells" integer-property + 0 " #size-cells" integer-property + + : decode-unit ( adr len -- phys ) $number if 0 then ; + : encode-unit ( phys -- adr len ) (u.) ; + : open ( -- true ) true ; + : close ( -- ) ; + + new-device + " port" device-name + 0 " reg" integer-property + new-device + " endpoint" device-name + finish-device + finish-device + + new-device + " port" device-name + 1 " reg" integer-property + new-device + " endpoint" device-name + finish-device + finish-device +finish-device + \ DCON internal registers, accessed via I2C \ 0 constant DCON_ID \ 1 constant DCON_MODE |