Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 2021 23:03:16 +0300
From:      Priit Trees <trees@neti.ee>
To:        freebsd-mips@freebsd.org
Subject:   Some drivers for Mediatek. 
Message-ID:  <8912E486-5A25-49F3-A645-E583FB59737E@neti.ee>

next in thread | raw e-mail | index | archive | help

--Apple-Mail=_E107CB57-855F-46CE-B336-A3C5E163B144
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Hi,

I wrote my first drivers for FreeBSD. I don=E2=80=99t know how good =
quality they are. I'm not a programmer.  But the drivers work when I =
test them on my development boards. Maybe someone is interested in them.

MMC for  MT7620,7621,76[2|8]8
=
https://github.com/freebsd/freebsd-src/compare/main...priittrees:mediatek_=
mmc =
<https://github.com/freebsd/freebsd-src/compare/main...priittrees:mediatek=
_mmc>

IIC for MT7620, MT7621, MT76[2|8]8, RT5350 =
<https://github.com/freebsd/freebsd-src/commit/16c366c73897aad963e817f934d=
14756bbe9b376>=20
=
https://github.com/freebsd/freebsd-src/compare/main...priittrees:mediatek_=
iic =
<https://github.com/freebsd/freebsd-src/compare/main...priittrees:mediatek=
_iic>

GDMA for MT7620, MT7621, MT76[2|8]8, RT5350 =
<https://github.com/freebsd/freebsd-src/commit/16c366c73897aad963e817f934d=
14756bbe9b376> and maybe some more devices
=
https://github.com/freebsd/freebsd-src/compare/main...priittrees:mediatek_=
gdma =
<https://github.com/freebsd/freebsd-src/compare/main...priittrees:mediatek=
_gdma>

Simple I2S for MT76[2|8]8 and RT5350 =
<https://github.com/freebsd/freebsd-src/commit/16c366c73897aad963e817f934d=
14756bbe9b376>. Maybe future i can tested it on  MT7620, MT7621 =
<https://github.com/freebsd/freebsd-src/commit/16c366c73897aad963e817f934d=
14756bbe9b376>. I use SoC audio framework =
https://reviews.freebsd.org/D27830 <https://reviews.freebsd.org/D27830>; =
and patch it for use it with DMA channal. It not good patch but it work =
for me.
=
https://github.com/freebsd/freebsd-src/commit/17f9656d45497ca32b0ea070898a=
d7dca8c15d1f =
<https://github.com/freebsd/freebsd-src/commit/17f9656d45497ca32b0ea070898=
ad7dca8c15d1f>
=
https://github.com/freebsd/freebsd-src/compare/main...priittrees:mediatek_=
i2s =
<https://github.com/freebsd/freebsd-src/compare/main...priittrees:mediatek=
_i2s>

and Simple WM8960 Stereo CODEC =
<https://github.com/freebsd/freebsd-src/commit/0042c6e4eea742498c26f603f94=
f34fd360308fa>
=
https://github.com/freebsd/freebsd-src/compare/main...priittrees:wm8960_co=
dec =
<https://github.com/freebsd/freebsd-src/compare/main...priittrees:wm8960_c=
odec>

Best Regard
Priit Trees=

--Apple-Mail=_E107CB57-855F-46CE-B336-A3C5E163B144
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><div =
class=3D"">Hi,</div><div class=3D""><br class=3D""></div>I wrote my =
first drivers for FreeBSD. I don=E2=80=99t know how good quality they =
are. I'm not a programmer. &nbsp;But the drivers work when I test them =
on my development boards. Maybe someone is interested in them.<div =
class=3D""><br class=3D""></div><div class=3D"">MMC =
for&nbsp;&nbsp;MT7620,7621,76[2|8]8</div><div class=3D""><a =
href=3D"https://github.com/freebsd/freebsd-src/compare/main...priittrees:m=
ediatek_mmc" =
class=3D"">https://github.com/freebsd/freebsd-src/compare/main...priittree=
s:mediatek_mmc</a></div><div class=3D""><br class=3D""></div><div =
class=3D"">IIC for&nbsp;<a title=3D"Added iic support for MT7620, =
MT7621, MT76[2|8]8, RT5350

When scanning slave devices with the MTK_IIC v1 driver, not all slave =
devices are found. Example BME680. Support up to 64 read sequential =
bytes. Max  sequential byte write is depends device addressing width. It =
support together address and data up to 64 bytes sequential. Example: 2 =
bytes address + 62 data bytes.

Tested with WyBox-7620(MT7620) and RT5350F-OLINUXINO-EVB(RT5350F) with =
lm75 and AT24C1

MTK_IIC v2 driver is tested with U7621(MT7621), BOJINGnet(MT7688) and =
lm75 and AT24C12
8 EEPROM." data-pjax=3D"true" class=3D"Link--secondary markdown-title" =
href=3D"https://github.com/freebsd/freebsd-src/commit/16c366c73897aad963e8=
17f934d14756bbe9b376" style=3D"box-sizing: border-box; text-decoration: =
none; font-family: SFMono-Regular, Consolas, &quot;Liberation =
Mono&quot;, Menlo, monospace; color: var(--color-text-secondary)  =
!important;">MT7620, MT7621, MT76[2|8]8, RT5350</a><span class=3D"" =
style=3D"caret-color: rgb(68, 77, 86); color: rgb(68, 77, 86); =
font-family: SFMono-Regular, Consolas, &quot;Liberation Mono&quot;, =
Menlo, monospace; background-color: rgb(255, 255, =
255);">&nbsp;</span></div><div class=3D""><a =
href=3D"https://github.com/freebsd/freebsd-src/compare/main...priittrees:m=
ediatek_iic" =
class=3D"">https://github.com/freebsd/freebsd-src/compare/main...priittree=
s:mediatek_iic</a></div><div class=3D""><br class=3D""></div><div =
class=3D"">GDMA for&nbsp;<a title=3D"Added iic support for MT7620, =
MT7621, MT76[2|8]8, RT5350

When scanning slave devices with the MTK_IIC v1 driver, not all slave =
devices are found. Example BME680. Support up to 64 read sequential =
bytes. Max  sequential byte write is depends device addressing width. It =
support together address and data up to 64 bytes sequential. Example: 2 =
bytes address + 62 data bytes.

Tested with WyBox-7620(MT7620) and RT5350F-OLINUXINO-EVB(RT5350F) with =
lm75 and AT24C1

MTK_IIC v2 driver is tested with U7621(MT7621), BOJINGnet(MT7688) and =
lm75 and AT24C12
8 EEPROM." data-pjax=3D"true" class=3D"Link--secondary markdown-title" =
href=3D"https://github.com/freebsd/freebsd-src/commit/16c366c73897aad963e8=
17f934d14756bbe9b376" style=3D"box-sizing: border-box; text-decoration: =
none; font-family: SFMono-Regular, Consolas, &quot;Liberation =
Mono&quot;, Menlo, monospace; color: var(--color-text-secondary)  =
!important;">MT7620, MT7621, MT76[2|8]8, RT5350</a>&nbsp;and maybe some =
more devices</div><div class=3D""><a =
href=3D"https://github.com/freebsd/freebsd-src/compare/main...priittrees:m=
ediatek_gdma" =
class=3D"">https://github.com/freebsd/freebsd-src/compare/main...priittree=
s:mediatek_gdma</a></div><div class=3D""><br class=3D""></div><div =
class=3D"">Simple I2S for&nbsp;<a title=3D"Added iic support for MT7620, =
MT7621, MT76[2|8]8, RT5350

When scanning slave devices with the MTK_IIC v1 driver, not all slave =
devices are found. Example BME680. Support up to 64 read sequential =
bytes. Max  sequential byte write is depends device addressing width. It =
support together address and data up to 64 bytes sequential. Example: 2 =
bytes address + 62 data bytes.

Tested with WyBox-7620(MT7620) and RT5350F-OLINUXINO-EVB(RT5350F) with =
lm75 and AT24C1

MTK_IIC v2 driver is tested with U7621(MT7621), BOJINGnet(MT7688) and =
lm75 and AT24C12
8 EEPROM." data-pjax=3D"true" class=3D"Link--secondary markdown-title" =
href=3D"https://github.com/freebsd/freebsd-src/commit/16c366c73897aad963e8=
17f934d14756bbe9b376" style=3D"box-sizing: border-box; text-decoration: =
none; font-family: SFMono-Regular, Consolas, &quot;Liberation =
Mono&quot;, Menlo, monospace; color: var(--color-text-secondary)  =
!important;">MT76[2|8]8 and RT5350</a>. Maybe future i can tested it on =
&nbsp;<a title=3D"Added iic support for MT7620, MT7621, MT76[2|8]8, =
RT5350

When scanning slave devices with the MTK_IIC v1 driver, not all slave =
devices are found. Example BME680. Support up to 64 read sequential =
bytes. Max  sequential byte write is depends device addressing width. It =
support together address and data up to 64 bytes sequential. Example: 2 =
bytes address + 62 data bytes.

Tested with WyBox-7620(MT7620) and RT5350F-OLINUXINO-EVB(RT5350F) with =
lm75 and AT24C1

MTK_IIC v2 driver is tested with U7621(MT7621), BOJINGnet(MT7688) and =
lm75 and AT24C12
8 EEPROM." data-pjax=3D"true" class=3D"Link--secondary markdown-title" =
href=3D"https://github.com/freebsd/freebsd-src/commit/16c366c73897aad963e8=
17f934d14756bbe9b376" style=3D"box-sizing: border-box; text-decoration: =
none; font-family: SFMono-Regular, Consolas, &quot;Liberation =
Mono&quot;, Menlo, monospace; color: var(--color-text-secondary)  =
!important;">MT7620, MT7621</a>. I use&nbsp;<span class=3D"" =
style=3D"color: var(--color-auto-gray-7); font-family: SFMono-Regular, =
Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; white-space: =
pre-wrap;">SoC audio framework </span><font face=3D"SFMono-Regular, =
Consolas, Liberation Mono, Menlo, monospace" class=3D""><span class=3D"" =
style=3D"white-space: pre-wrap; box-sizing: border-box; color: =
var(--color-text-link);"><a href=3D"https://reviews.freebsd.org/D27830" =
class=3D"">https://reviews.freebsd.org/D27830</a>; and patch it for use =
it with DMA channal. It not good patch but it work for =
me.</span></font></div><div class=3D""><a =
href=3D"https://github.com/freebsd/freebsd-src/commit/17f9656d45497ca32b0e=
a070898ad7dca8c15d1f" class=3D"" style=3D"font-family: SFMono-Regular, =
Consolas, &quot;Liberation Mono&quot;, Menlo, monospace; white-space: =
pre-wrap;">https://github.com/freebsd/freebsd-src/commit/17f9656d45497ca32=
b0ea070898ad7dca8c15d1f</a></div><div class=3D""><span class=3D"" =
style=3D"box-sizing: border-box; white-space: pre-wrap;"><font =
face=3D"SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace" =
class=3D""><a =
href=3D"https://github.com/freebsd/freebsd-src/compare/main...priittrees:m=
ediatek_i2s" =
class=3D"">https://github.com/freebsd/freebsd-src/compare/main...priittree=
s:mediatek_i2s</a></font></span></div><div class=3D""></div><div =
class=3D""><br class=3D""></div><div class=3D"">and Simple =
WM8960&nbsp;<a title=3D"Added WM8960 Stereo CODEC

Use SoC audio framework https://reviews.freebsd.org/D27830

Tested with board BOJINGnet. WM8960 Audio HAT should be work" =
data-pjax=3D"true" class=3D"Link--secondary markdown-title" =
href=3D"https://github.com/freebsd/freebsd-src/commit/0042c6e4eea742498c26=
f603f94f34fd360308fa" style=3D"box-sizing: border-box; text-decoration: =
none; font-family: SFMono-Regular, Consolas, &quot;Liberation =
Mono&quot;, Menlo, monospace; color: var(--color-text-secondary)  =
!important;">Stereo CODEC</a></div><div class=3D""><a =
href=3D"https://github.com/freebsd/freebsd-src/compare/main...priittrees:w=
m8960_codec" =
class=3D"">https://github.com/freebsd/freebsd-src/compare/main...priittree=
s:wm8960_codec</a></div><div class=3D""><br class=3D""></div><div =
class=3D"">Best Regard</div><div class=3D"">Priit =
Trees</div></body></html>=

--Apple-Mail=_E107CB57-855F-46CE-B336-A3C5E163B144--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8912E486-5A25-49F3-A645-E583FB59737E>