diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-02-22 22:46:44 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2019-04-19 07:28:33 +0200 |
commit | c273fe9138cefb9b73b5fa976e4b5a1f752322de (patch) | |
tree | a4637a5ddafd90a8e9edcc8d8d6bf9a257d1e227 | |
parent | 37b0a8a33833d84d0181f6ed4555b883aab51f06 (diff) | |
download | openfirmware-c273fe9138cefb9b73b5fa976e4b5a1f752322de.tar.gz |
olpc/gpio-i2c: mark SDA and SCL lines open drain
Otherwise Linux's disgruntled i2c-gpio driver logs a warning.
-rw-r--r-- | cpu/arm/olpc/gpio-i2c.fth | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/cpu/arm/olpc/gpio-i2c.fth b/cpu/arm/olpc/gpio-i2c.fth index 87f20242..a4ce0912 100644 --- a/cpu/arm/olpc/gpio-i2c.fth +++ b/cpu/arm/olpc/gpio-i2c.fth @@ -1,5 +1,7 @@ purpose: Device tree nodes for I2C buses implemented with GPIOs +\ 6 constant GPIO_OPEN_DRAIN + : encode-gpio ( propval$ gpio# low? -- propval$' ) >r >r ( propval$ r: low? gpio# ) " /gpio" encode-phandle encode+ ( propval$' r: low? gpio# ) @@ -39,10 +41,10 @@ dev / : encode-unit ( phys.. -- str ) push-hex (u.) pop-base ; : decode-unit ( str -- phys.. ) push-hex $number if 0 then pop-base ; - + 0 0 encode-bytes - cam-sda-gpio# 0 encode-gpio - cam-scl-gpio# 0 encode-gpio + cam-sda-gpio# 6 encode-gpio + cam-scl-gpio# 6 encode-gpio " gpios" property 0 instance value slave-address @@ -89,8 +91,8 @@ dev / : decode-unit ( str -- phys.. ) push-hex $number if 0 then pop-base ; 0 0 encode-bytes - dcon-sda-gpio# 0 encode-gpio - dcon-scl-gpio# 0 encode-gpio + dcon-sda-gpio# 6 encode-gpio + dcon-scl-gpio# 6 encode-gpio " gpios" property 0 instance value slave-address @@ -123,10 +125,10 @@ dev / 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 ; - + 0 0 encode-bytes - hdmi-sda-gpio# 0 encode-gpio - hdmi-scl-gpio# 0 encode-gpio + hdmi-sda-gpio# 6 encode-gpio + hdmi-scl-gpio# 6 encode-gpio " gpios" property h# 50 instance value slave-address |