Skip to content

MT6577#53

Draft
akku1139 wants to merge 32 commits into
TeamYogaBlade2:mainlinefrom
arzam16:mt6577
Draft

MT6577#53
akku1139 wants to merge 32 commits into
TeamYogaBlade2:mainlinefrom
arzam16:mt6577

Conversation

@akku1139

Copy link
Copy Markdown
Member

No description provided.

arzam16 added 30 commits July 5, 2022 01:34
It's 99% similar to Acer Iconia B1-A71 except the UART clock rate.
This requires proper clock setup flow!
This patch makes some constants SoC-dependent to support more watchdogs
in the future. It adds shifts of WDT_MODE_KEY and SWSYSRST_KEY to
mtk_wdt_data struct. This is done to bring support for various Mediatek
watchdogs which use same register structure but slightly different field
offsets in the UNLOCK_KEY registers. For example, mt6577 watchdog has
WDT_MODE_KEY and SWSYSRST_KEY at [15:8] instead of currently (and only)
supported [31:24].
Moreover, this patch adds SWSYSRST_KEY value to mtk_wdt_data because this
value also depends on specific SoC watchdog, for example mt6577 uses 0x15
instead of 0x88.
Add support for Mediatek mt6577 SoC to device tree binding
documentation.
This patch adds support for watchdog used by mt6577 and related SoCs such
as mt6575 and mt8317. These watchdogs are known for having shifted WDT_MODE
and SWSYSRST registers and using different SWSYSRST_KEY value.
2nd CPU core can be powered on and used.
Core kill/disable/poweroff isn't supported yet.
// TODO Create a devicetree binding doc
arzam16 added 2 commits July 5, 2022 01:34
It is based on Qualcomm socinfo driver. It serves absolutely no real purpose
in its current state. I was just trying myself in writing Linux drivers.
The mt6577 compatibility was introduced back in 2014 in commit 8452c80d5b4b
("I2C: mediatek: Add driver for MediaTek I2C controller") by Xudong Chen.

The i2c-mt65xx driver relies on DMA since it was first introduced. mt6577 does
not support DMA [1] for I2C and doesn't have dedicated DMA engines for I2C.
Moreover, the entire mt65xx Cortex-A9 SoC family (mt6515, mt6517, mt6575,
and mt6577) which share the same I2C IP doesn't support I2C DMA at all which
makes this particular driver incompatible with these SoCs.

The existing code used mt6577 as a "generic" configuration to be used with
other SoCs such as mt6589 (for quirks), and mt2701/mt6797/mt7623 (in general).

This patch makes mt2701 (which is *actually* supported by this driver) a new
placeholder for generic Mediatek I2C bus configuration.

[1] see references in
https://lists.infradead.org/pipermail/linux-mediatek/2021-October/030333.html

Signed-off-by: Boris Lysov <arzamas-16@mail.ee>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants