From 6174f068081c13080125c012820b02bf4d5f405b Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Sat, 12 Oct 2019 16:06:25 +0200 Subject: olpc/dcon: add gpio and ports to /dcon node This will allow the driver to discover how is the DCON connected in the system. --- dev/olpc/dcon/dcon.fth | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) 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 -- cgit 1.2.3-korg