aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-02-19 22:01:02 +0100
committerLubomir Rintel <lkundrak@v3.sk>2019-04-19 07:28:33 +0200
commit9d98b6d0737884065080074c09ac99c9f5f25dba (patch)
treeaa1456c49f01062ef8d8960f2ec9b2a9b3319ef8
parentd7d4125b170cea52511682900425aeed898a57b0 (diff)
downloadopenfirmware-9d98b6d0737884065080074c09ac99c9f5f25dba.tar.gz
olpc: add /port nodes to /dcon
This adds port nodes, following the bindings/graph.txt binding, needed for constructing the device graph from the LCDC to the panel.
-rw-r--r--dev/olpc/dcon/mmp2dcon.fth27
1 files changed, 27 insertions, 0 deletions
diff --git a/dev/olpc/dcon/mmp2dcon.fth b/dev/olpc/dcon/mmp2dcon.fth
index 24eca70d..65414a40 100644
--- a/dev/olpc/dcon/mmp2dcon.fth
+++ b/dev/olpc/dcon/mmp2dcon.fth
@@ -26,6 +26,33 @@ dcon-irq-gpio# 0 encode-gpio
" irq" encode-string encode+
" gpio-names" 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