Properly describe mt6589 and mt8167 toprgu resets
v3 cover Properly describe mt6589 and mt8167 toprgu resets
Currently mt8167 inherits its watchdog from the included mt8516 dtsi, which in turn falls back on mt6589-wdt, which does not support toprgu resets yet. This series adds support for mt6589 toprgu resets with bit definitions obtained from Android stock sources.
However, according to its data sheet, mt8167 has 15 sw resets instead of 12, and its reset bits point to different subsystems than the mt6589 ones. If the number of resets varies between SoCs, the watchdog driver becomes incompatible.
Therefore in the first three patches we improve the description of the, resets for mt6589 using the definitions obtained from Android sources.
Then we introduce a dedicated mediatek,mt8167-wdt compatible for the watchdog driver that describes correctly this SoC's resets. Also while we're touching the bindings reset header, we add constants for the MMSYS resets.
In the 7th patch we add a node for the mt8167 watchdog referring to the new compatible in the SoC dtsi.
In the last patch, we define the mmsys reset table for the SoC. According to the datasheet, there are 28 mmsys reset bits divided across two adjacent registers.
Changes in v3 [3]:
- Improved explanations in the commit messages;
- Added the #reset-cells property to mt6589 watchdog node;
- Included the mediatek,mt6589-resets.h file in mt6589.dtsi;
- Included the mediatek,mt8167-resets.h file in mt8167.dtsi;
- Moved the mmsys reset table from the mt8167-mmsys.h header file to the mmsys driver implementation.
Changes in v2 [2]:
- Sashiko pointed out correctly a missing entry in the mmsys reset table in the last patch.
Initial version: [1]
[1] https://lore.kernel.org/linux-mediatek/[email protected]/
[2] https://lore.kernel.org/linux-mediatek/[email protected]/
Luca Leonardo Scorcia (8):
dt-bindings: reset: Add mt6589 toprgu reset IDs
watchdog: mediatek: Add wdt/toprgu resets for MT6589
arm: dts: mediatek: mt6589: Enable toprgu reset controller
dt-bindings: watchdog: Add compatible for MediaTek mt8167
dt-bindings: reset: Add reset controller constants for mt8167
watchdog: mediatek: Add support for mt8167 TOPRGU/WDT
arm64: dts: mt8167: Properly describe the SoC watchdog
soc: mediatek: mtk-mmsys: Add resets for mt8167
.../bindings/watchdog/mediatek,mtk-wdt.yaml | 1 + arch/arm/boot/dts/mediatek/mt6589.dtsi | 2 + arch/arm64/boot/dts/mediatek/mt8167.dtsi | 8 +++ drivers/soc/mediatek/mt8167-mmsys.h | 3 ++ drivers/soc/mediatek/mtk-mmsys.c | 38 +++++++++++++ drivers/watchdog/mtk_wdt.c | 13 ++++- .../reset/mediatek,mt6589-resets.h | 24 +++++++++ .../reset/mediatek,mt8167-resets.h | 53 +++++++++++++++++++ 8 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/reset/mediatek,mt6589-resets.h create mode 100644 include/dt-bindings/reset/mediatek,mt8167-resets.h
Signature · 1 line
2.43.0
PATCH v3 1/8 dt-bindings: reset: Add mt6589 toprgu reset IDs
Currently mt6589 watchdog driver implements the watchdog feature, but not the reset controller feature, which is actually supported by the hardware.
Add the bit definitions for the 12 mt6589 toprgu resets, which will be used in the following patch to enable the reset controller. Values determined from stock Android sources.
--- .../reset/mediatek,mt6589-resets.h | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/dt-bindings/reset/mediatek,mt6589-resets.h
include/dt-bindings/reset/mediatek,mt6589-resets.h new file +24 -0
@@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* +* Author: Luca Leonardo Scorcia <[email protected]> +*/ + +#ifndef _DT_BINDINGS_RESET_CONTROLLER_MT6589 +#define _DT_BINDINGS_RESET_CONTROLLER_MT6589 + +/* TOPRGU resets */ +#define MT6589_TOPRGU_INFRA_SW_RST 0 +#define MT6589_TOPRGU_MM_SW_RST 1 +#define MT6589_TOPRGU_MFG_SW_RST 2 +#define MT6589_TOPRGU_VENC_SW_RST 3 +#define MT6589_TOPRGU_VDEC_SW_RST 4 +#define MT6589_TOPRGU_IMG_SW_RST 5 +#define MT6589_TOPRGU_DDRPHY_SW_RST 6 +#define MT6589_TOPRGU_MD_SW_RST 7 +#define MT6589_TOPRGU_INFRA_AO_SW_RST 8 +#define MT6589_TOPRGU_MD_LITE_SW_RST 9 +#define MT6589_TOPRGU_APMIXED_SW_RST 10 +#define MT6589_TOPRGU_PWRAP_SPI_CTL_RST 11 +#define MT6589_TOPRGU_SW_RST_NUM 12 + +#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT6589 */
Signature · 1 line
2.43.0
Re: [PATCH v3 1/8] dt-bindings: reset: Add mt6589 toprgu reset IDs
Quoted 1 line · Luca Leonardo Scorcia
Currently mt6589 watchdog driver implements the watchdog feature, but
Driver is not really relevant here. If device does not have resets, why would you add them?
Quoted 2 lines
not the reset controller feature, which is actually supported by the hardware.
So binding already has reset-cells or not?
I already asked at v1 to clearly express why you are doing this. You will get the same comments if you do not improve commits.
Quoted 2 lines
Add the bit definitions for the 12 mt6589 toprgu resets, which will be
We do not take bits, but identifiers of resets.
If these are bits, then not really a binding, so drop entire header.
Quoted 2 lines
used in the following patch to enable the reset controller. Values determined from stock Android sources.
Nope, Android does not matter here. We do not add bindings for other, unreviewed projects with poor quality and poor processes.
include/dt-bindings/reset/mediatek,mt6589-resets.h
Quoted 12 lines
Signed-off-by Luca Leonardo Scorcia <[email protected]>--- .../reset/mediatek,mt6589-resets.h | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/dt-bindings/reset/mediatek,mt6589-resets.hinclude/dt-bindings/reset/mediatek,mt6589-resets.h new file +0
-0
Filename must match compatible.
include/dt-bindings/reset/mediatek,mt6589-resets.h line 7
Quoted 8 lines
include/dt-bindings/reset/mediatek,mt6589-resets.h new file +7
-0@@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* +* Author: Luca Leonardo Scorcia <[email protected]> +*/ + +#ifndef _DT_BINDINGS_RESET_CONTROLLER_MT6589 +#define _DT_BINDINGS_RESET_CONTROLLER_MT6589
Best regards,
Krzysztof
Re: [PATCH v3 1/8] dt-bindings: reset: Add mt6589 toprgu reset IDs
Hello Krzystof,
thank you for your patience, I really appreciate it.
I think that a lot of my confusion comes from the fact that I'm trying to follow the structure that is already upstream, but the whole driver and bindings could probably be refactored in a more straightforward way.
Quoted 1 line
So binding already has reset-cells or not?
The watchdog binding at mediatek,mtk-wdt.yaml [1] already declares the reset-cells property (optional).
Inside this document the various SoC compatibles are divided into two lists - one that falls back onto "mediatek,mt6589-wdt" and another one of explicitly declared devices.
If I am not grossly mistaken, looking at the mtk_wdt.c [2] driver that handles all these compatibles there aren't really any different behaviors between any of those watchdogs/reset generators. In every one of them the .data object only provides the total number of reset bits in each SoC toprgu, plus a single "has_swsysrst_en" flag for mt7988 only.
For mt6589 the number of resets is missing, which means its reset controller isn't enabled (and therefore it's not enabled in any of the "compatible" devices). We know that this SoC supports watchdog resets, so there really is no difference between all the SoCs. Both the total number of resets and the "has_swsysrst_en" flag could become properties in the binding document and be added to device trees.
This change would avoid lots of redundant compatibles, but it would break existing dtbs and I don't see a way to keep compatibility. Maybe an entire new binding+driver and deprecating the current one...? Still I'd feel more comfortable hearing the voice of experts before proceeding in this direction.
Quoted 1 line
We do not take bits, but identifiers of resets.
Currently the existing mtk_wdt.c driver does not use a reset table that binds identifiers to bits for any of the existing devices. There are a bunch of mediatek,mt*.h files under dt-bindings/reset [3] that point directly to reset bits instead of being indexes.
I can introduce a reset table in the driver, but it would break existing devices as those bits are referred in device trees and they are often non-contiguous (e.g. [4]). As before, it could be done by creating a new driver and deprecating the current one, but maybe I completely misunderstood your point, in which case I apologize.
Thank you for your help,
[1] https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/watchdog/mediatek%2Cmtk-wdt.yaml
[2] https://github.com/torvalds/linux/blob/master/drivers/watchdog/mtk_wdt.c
[3] https://github.com/torvalds/linux/tree/master/include/dt-bindings/reset
[4] https://github.com/torvalds/linux/blob/master/include/dt-bindings/reset/mt8195-resets.h
--
Luca Leonardo Scorcia
[email protected]
Re: [PATCH v3 1/8] dt-bindings: reset: Add mt6589 toprgu reset IDs
Quoted 7 lines · Luca Leonardo Scorcia
Quoted 2 lines
We do not take bits, but identifiers of resets.
Currently the existing
mtk_wdt.cdriver does not use a reset table that binds identifiers to bits for any of the existing devices. There are a bunch of mediatek,mt*.h files under dt-bindings/reset [3] that point directly to reset bits instead of being indexes.
Many got accepted unnoticed, many times we did not care, but the point is still valid - pure hardware numbers do not belong to the bindings, because they do not bind any pieces of code. The proper binding header constants bind DTS with SW implementation, so two pieces of code. Not applicable here.
Quoted 3 lines
I can introduce a reset table in the driver, but it would break existing devices as those bits are referred in device trees and they are often non-contiguous (e.g. [4]). As before, it could be done by
Then these bits stay as is in DTS but bindings header is not needed. You can have of course DTS header, as we did in the past multiple times for such hardware constants.
Best regards,
Krzysztof
Re: [PATCH v3 1/8] dt-bindings: reset: Add mt6589 toprgu reset IDs
Quoted 15 lines · Krzysztof Kozlowski
Quoted 7 lines · Luca Leonardo Scorcia
Quoted 2 lines
We do not take bits, but identifiers of resets.
Currently the existing
mtk_wdt.cdriver does not use a reset table that binds identifiers to bits for any of the existing devices. There are a bunch of mediatek,mt*.h files under dt-bindings/reset [3] that point directly to reset bits instead of being indexes.Many got accepted unnoticed, many times we did not care, but the point is still valid - pure hardware numbers do not belong to the bindings, because they do not bind any pieces of code. The proper binding header constants bind DTS with SW implementation, so two pieces of code. Not applicable here.
Quoted 7 lines
Quoted 3 lines
I can introduce a reset table in the driver, but it would break existing devices as those bits are referred in device trees and they are often non-contiguous (e.g. [4]). As before, it could be done by
Then these bits stay as is in DTS but bindings header is not needed. You can have of course DTS header, as we did in the past multiple times for such hardware constants.
So I wrote above this to myself and can be ignored completely? Then why would we not ignore your patches?
Best regards,
Krzysztof
Re: [PATCH v3 1/8] dt-bindings: reset: Add mt6589 toprgu reset IDs
Quoted 6 lines
Quoted 3 lines
Then these bits stay as is in DTS but bindings header is not needed. You can have of course DTS header, as we did in the past multiple times for such hardware constants.
So I wrote above this to myself and can be ignored completely? Then why would we not ignore your patches?
I am sorry, I'm definitely not ignoring reviews and I'm actually trying to understand and fix my mistakes.
This reply refers to v3, but in v4 you reviewed earlier today I added reset table support in the driver, therefore in v4 those constants are IDs instead of bits (and it should help cleanup the other MediaTek existing bindings if deemed necessary).
If they're IDs that describe actual hardware capabilities, shouldn't they be located under devicetree/? (Again, I understood my mistake in v3, but in v4 it should be fixed).
I feel like I am missing something that's very clear to experienced kernel devs about the boundary between kernel sources and device trees, but I can't seem to figure out what exactly. I'll try reading the kernel docs again.
Thank you for your time and patience.
--
Luca Leonardo Scorcia
[email protected]
Re: [PATCH v3 1/8] dt-bindings: reset: Add mt6589 toprgu reset IDs
Quoted 7 lines · Luca Leonardo Scorcia
Quoted 6 lines
Quoted 3 lines
Then these bits stay as is in DTS but bindings header is not needed. You can have of course DTS header, as we did in the past multiple times for such hardware constants.
So I wrote above this to myself and can be ignored completely? Then why would we not ignore your patches?
Quoted 9 lines
I am sorry, I'm definitely not ignoring reviews and I'm actually trying to understand and fix my mistakes.
This reply refers to v3, but in v4 you reviewed earlier today I added reset table support in the driver, therefore in v4 those constants are IDs instead of bits (and it should help cleanup the other MediaTek existing bindings if deemed necessary).
If they're IDs that describe actual hardware capabilities, shouldn't they be located under devicetree/? (Again, I understood my mistake in v3, but in v4 it should be fixed).
The IDs do not describe hardware capabilities, but ABI between hardware (DTS) and software (Linux). If you do not have them in the software, then the ABI is not used. I looked at your driver patch and did not find usage of these. I found usage of mt8167 only, so mt8167 is fine. The one here is not fine.
Best regards,
Krzysztof
Re: [PATCH v3 1/8] dt-bindings: reset: Add mt6589 toprgu reset IDs
Quoted 4 lines
The IDs do not describe hardware capabilities, but ABI between hardware (DTS) and software (Linux). If you do not have them in the software, then the ABI is not used. I looked at your driver patch and did not find usage of these.
Thank you for the clarification.
Since I'm not adding resets to any mt6589 DTS node here I can completely omit this patch in the next revision. If anyone in the future wants to specify a toprgu reset for a mt6589 DTS node, they may submit the binding header together with the actual DTS reference.
Thank you,
Signature · 2 lines
Luca Leonardo Scorcia [email protected]
PATCH v3 2/8 watchdog: mediatek: Add wdt/toprgu resets for MT6589
In reply to Luca Leonardo ScorciaAccording to Android sources, MT6589 has 12 reset bits in the WDT_SWSYSRST register. Populate toprgu_sw_rst_num to allow toprgu resets in device trees of the many compatible devices.
--- drivers/watchdog/mtk_wdt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/watchdog/mtk_wdt.c +6 -1
@@ -10,6 +10,7 @@*/ #include <dt-bindings/reset/mt2712-resets.h> +#include <dt-bindings/reset/mediatek,mt6589-resets.h> #include <dt-bindings/reset/mediatek,mt6735-wdt.h> #include <dt-bindings/reset/mediatek,mt6795-resets.h> #include <dt-bindings/reset/mt7986-resets.h>
@@ -88,6 +89,10 @@ static const struct mtk_wdt_data mt2712_data = { .toprgu_sw_rst_num = MT2712_TOPRGU_SW_RST_NUM, }; +static const struct mtk_wdt_data mt6589_data = { + .toprgu_sw_rst_num =MT6589_TOPRGU_SW_RST_NUM , +}; +static const struct mtk_wdt_data mt6735_data = { .toprgu_sw_rst_num =MT6735_TOPRGU_RST_NUM , };
@@ -493,7 +498,7 @@ static int mtk_wdt_resume(struct device *dev)static const struct of_device_id mtk_wdt_dt_ids[] = { { .compatible ="mediatek,mt2712-wdt" , .data = &mt2712_data }, - { .compatible ="mediatek,mt6589-wdt" }, + { .compatible ="mediatek,mt6589-wdt" , .data = &mt6589_data }, { .compatible ="mediatek,mt6735-wdt" , .data = &mt6735_data }, { .compatible ="mediatek,mt6795-wdt" , .data = &mt6795_data }, { .compatible ="mediatek,mt7986-wdt" , .data = &mt7986_data },
Signature · 1 line
2.43.0
[email protected]
AI reviewRe: [PATCH v3 2/8] watchdog: mediatek: Add wdt/toprgu resets for MT6589
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Pre-existing issues:
- [High] Device configuration properties are parsed from the device tree after the watchdog device is registered and exposed to userspace.
- [High] The pretimeout interrupt service routine does not clear the hardware interrupt status, leading to an interrupt storm. --
--- Patch [2]: [PATCH v3 2/8] watchdog: mediatek: Add wdt/toprgu resets for MT6589 --- commit b68277d0ead460e42db1066fa50165b7b3c50d48
Author: Luca Leonardo Scorcia <[email protected]>
watchdog: mediatek: Add wdt/toprgu resets for MT6589
This commit populates the toprgu_sw_rst_num field for the MT6589 watchdog to allow toprgu resets in the device tree for compatible devices.
Quoted 4 lines
drivers/watchdog/mtk_wdt.c +0
-0
[ ... ]
drivers/watchdog/mtk_wdt.c:mtk_wdt_probe() {
...
err = devm_watchdog_register_device(dev, &mtk_wdt->wdt_dev);
if (unlikely(err))
return err;
dev_info(dev, "Watchdog enabled (timeout=%d sec, nowayout=%d)\n",
mtk_wdt->wdt_dev.timeout, nowayout);
wdt_data = of_device_get_match_data(dev);
if (wdt_data) {
err = toprgu_register_reset_controller(pdev,
wdt_data->toprgu_sw_rst_num);
if (err)
return err;
mtk_wdt->has_swsysrst_en = wdt_data->has_swsysrst_en;
}
mtk_wdt->disable_wdt_extrst =
of_property_read_bool(dev->of_node, "mediatek,disable-extrst");
...
}[Severity: High]
This isn't a bug introduced by this patch, but could this cause the watchdog hardware to be misconfigured if it's opened immediately after registration?
The watchdog character device is fully registered and exposed to userspace before the configuration flags (like mediatek,disable-extrst and mediatek,reset-by-toprgu) are parsed from the device tree.
If a userspace process opens /dev/watchdog and starts it right after devm_watchdog_register_device() completes, but before mtk_wdt_probe() finishes parsing these properties, could the system fail to reset properly when the watchdog triggers?
drivers/watchdog/mtk_wdt.c:mtk_wdt_isr() {
struct watchdog_device *wdd = arg;
watchdog_notify_pretimeout(wdd);
return IRQ_HANDLED;
}[Severity: High]
This is a pre-existing issue, but does this interrupt handler need to clear the hardware interrupt status?
It successfully notifies the core but returns IRQ_HANDLED without interacting with the device registers (like calling mtk_wdt_ping()) to acknowledge and clear the interrupt source.
Since this is a level-triggered IRQ, could returning IRQ_HANDLED without explicitly clearing the hardware interrupt status cause the CPU to endlessly loop servicing the unacknowledged interrupt, leading to an interrupt storm and system hang?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
PATCH v3 3/8 arm: dts: mediatek: mt6589: Enable toprgu reset controller
In reply to Luca Leonardo ScorciaEnable the toprgu reset controller feature for the mt6589 SoC. This allows generating reset signals for the 12 subsystems managed by its top reset generation unit.
--- arch/arm/boot/dts/mediatek/mt6589.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/boot/dts/mediatek/mt6589.dtsi +2 -0
@@ -7,6 +7,7 @@ #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/reset/mediatek,mt6589-resets.h> / { #address-cells = <1>;
@@ -147,6 +148,7 @@ uart3: serial@11009000 { wdt: watchdog@10000000 { compatible = "mediatek,mt6589-wdt"; reg = <0x10000000 0x44>; + #reset-cells = <1>; }; }; };
Signature · 1 line
2.43.0
Re: [PATCH v3 3/8] arm: dts: mediatek: mt6589: Enable toprgu reset controller
Quoted 9 lines · Luca Leonardo Scorcia
Enable the toprgu reset controller feature for the mt6589 SoC. This allows generating reset signals for the 12 subsystems managed by its top reset generation unit.
Signed-off-by Akari Tsuyukusa <[email protected]>Signed-off-by Luca Leonardo Scorcia <[email protected]>--- arch/arm/boot/dts/mediatek/mt6589.dtsi | 2 ++ 1 file changed, 2 insertions(+)
I provided "Acked-by", not "Signed-off-by"...
https://lore.kernel.org/linux-mediatek/amEBgRmQktZ44jc1@buffalo-ssd/
PS: I am also fine with this patch carrying my Signed-off-by.
Best Regards,
Akari
Re: [PATCH v3 3/8] arm: dts: mediatek: mt6589: Enable toprgu reset controller
I apologize for the mistake - if a new revision will be necessary I'll correct it with the Acked-by tag.
Thank you!
Il giorno dom 9 ago 2026 alle ore 19:04 Akari Tsuyukusa <[email protected]> ha scritto:
Quoted 20 lines · Luca Leonardo Scorcia
Quoted 9 lines
Enable the toprgu reset controller feature for the mt6589 SoC. This allows generating reset signals for the 12 subsystems managed by its top reset generation unit.
Signed-off-by Akari Tsuyukusa <[email protected]>Signed-off-by Luca Leonardo Scorcia <[email protected]>--- arch/arm/boot/dts/mediatek/mt6589.dtsi | 2 ++ 1 file changed, 2 insertions(+)I provided "Acked-by", not "Signed-off-by"...
https://lore.kernel.org/linux-mediatek/amEBgRmQktZ44jc1@buffalo-ssd/PS: I am also fine with this patch carrying my Signed-off-by.
Signed-off-by Akari Tsuyukusa <[email protected]>Best Regards,
Akari
Signature · 2 lines
Luca Leonardo Scorcia [email protected]
Re: [PATCH v3 3/8] arm: dts: mediatek: mt6589: Enable toprgu reset controller
Hi Luca,
Quoted 24 lines · Luca Leonardo Scorcia
I apologize for the mistake - if a new revision will be necessary I'll correct it with the Acked-by tag.
Thank you!Il giorno dom 9 ago 2026 alle ore 19:04 Akari Tsuyukusa <[email protected]> ha scritto:
Quoted 17 lines · Luca Leonardo Scorcia
Quoted 9 lines
Enable the toprgu reset controller feature for the mt6589 SoC. This allows generating reset signals for the 12 subsystems managed by its top reset generation unit.
Signed-off-by Akari Tsuyukusa <[email protected]>Signed-off-by Luca Leonardo Scorcia <[email protected]>--- arch/arm/boot/dts/mediatek/mt6589.dtsi | 2 ++ 1 file changed, 2 insertions(+)I provided "Acked-by", not "Signed-off-by"...
https://lore.kernel.org/linux-mediatek/amEBgRmQktZ44jc1@buffalo-ssd/PS: I am also fine with this patch carrying my Signed-off-by.
Signed-off-by Akari Tsuyukusa <[email protected]>
Sorry, I made a mistake in my previous email.
The Acked-by I mentioned was for patch 1 of the series, not this patch. I did not provide an Acked-by for this patch.
The Signed-off-by was not what I originally provided, but I am fine with keeping it for this patch.
Sorry for the confusion.
Best Regards,
Akari
Guenter Roeck
maintainerRe: [PATCH v3 3/8] arm: dts: mediatek: mt6589: Enable toprgu reset controller
In reply to Akari TsuyukusaQuoted 11 lines · Akari Tsuyukusa
Quoted 9 lines · Luca Leonardo Scorcia
Enable the toprgu reset controller feature for the mt6589 SoC. This allows generating reset signals for the 12 subsystems managed by its top reset generation unit.
Signed-off-by Akari Tsuyukusa <[email protected]>Signed-off-by Luca Leonardo Scorcia <[email protected]>--- arch/arm/boot/dts/mediatek/mt6589.dtsi | 2 ++ 1 file changed, 2 insertions(+)
Quoted 6 lines
I provided "Acked-by", not "Signed-off-by"...
https://lore.kernel.org/linux-mediatek/amEBgRmQktZ44jc1@buffalo-ssd/PS: I am also fine with this patch carrying my Signed-off-by.
Signed-off-by Akari Tsuyukusa <[email protected]>
That is completely inappropriate and unacceptable. You are not in the Sign-off chain.
Guenter
Re: [PATCH v3 3/8] arm: dts: mediatek: mt6589: Enable toprgu reset controller
Hi,
I added his Signed-off tag as he provided basically this same patch in a separate series [1] slightly before this submission and I wanted to acknowledge his work. As far as I understand, this attribution is within the guidelines.
[1] https://lore.kernel.org/linux-mediatek/[email protected]/
Il giorno dom 9 ago 2026 alle ore 19:49 Guenter Roeck <[email protected]> ha scritto:
Quoted 25 lines · Akari Tsuyukusa
Quoted 11 lines · Luca Leonardo Scorcia
Quoted 9 lines
Enable the toprgu reset controller feature for the mt6589 SoC. This allows generating reset signals for the 12 subsystems managed by its top reset generation unit.
Signed-off-by Akari Tsuyukusa <[email protected]>Signed-off-by Luca Leonardo Scorcia <[email protected]>--- arch/arm/boot/dts/mediatek/mt6589.dtsi | 2 ++ 1 file changed, 2 insertions(+)Quoted 6 lines
I provided "Acked-by", not "Signed-off-by"...
https://lore.kernel.org/linux-mediatek/amEBgRmQktZ44jc1@buffalo-ssd/PS: I am also fine with this patch carrying my Signed-off-by.
Signed-off-by Akari Tsuyukusa <[email protected]>That is completely inappropriate and unacceptable. You are not in the Sign-off chain.
Guenter
Signature · 2 lines
Luca Leonardo Scorcia [email protected]
Guenter Roeck
maintainerRe: [PATCH v3 3/8] arm: dts: mediatek: mt6589: Enable toprgu reset controller
Quoted 6 lines · Luca Leonardo Scorcia
Hi,
I added his Signed-off tag as he provided basically this same patch in a separate series [1] slightly before this submission and I wanted to acknowledge his work. As far as I understand, this attribution is within the guidelines.
From Documentation/process/submitting-patches.rst:
Any further SoBs (Signed-off-by:'s) following the author's SoB are from people handling and transporting the patch, but were not involved in its
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
development. SoB chains should reflect the **real** route a patch took ^^^^^^^^^^^
as it was propagated to the maintainers and ultimately to Linus, with the first SoB entry signalling primary authorship of a single author.
I won't apply this patch anyway, so it is for others to decide if "this attribution is within the guidelines". I stand by earlier statement.
Thanks,
Guenter
PATCH v3 4/8 dt-bindings: watchdog: Add compatible for MediaTek mt8167
In reply to Luca Leonardo ScorciaCurrently mt8167 inherits its watchdog from the included mt8516 dtsi, which in turn falls back on mt6589-wdt. However according to the data sheet mt8167 has 15 sw resets instead of 12, and the systems to which each reset bit corresponds are different from mt6589, so the reset bit constants are different too.
If the number of resets varies between SoCs, the watchdog driver becomes incompatible. Update the wdt binding to add a dedicated compatible for mt8167.
--- Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml +1 -0
@@ -26,6 +26,7 @@ properties: - mediatek,mt6795-wdt - mediatek,mt7986-wdt - mediatek,mt7988-wdt + - mediatek,mt8167-wdt - mediatek,mt8183-wdt - mediatek,mt8186-wdt - mediatek,mt8188-wdt
Signature · 1 line
2.43.0
[email protected]
AI reviewRe: [PATCH v3 4/8] dt-bindings: watchdog: Add compatible for MediaTek mt8167
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] The `mediatek,mt8167-wdt` compatible string is introduced as a standalone compatible in the…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The mediatek,mt8167-wdt compatible string is introduced as a standalone compatible in the bindings but is not added to the watchdog driver's match table.
- [Medium] The commit message claims the reset bit constants are different for mt8167, but the corresponding dt-bindings header file is missing. --
--- Patch [4]: [PATCH v3 4/8] dt-bindings: watchdog: Add compatible for MediaTek mt8167 --- commit 801a3249de93e217207cdaff898bd46c2e41daba
Author: Luca Leonardo Scorcia <[email protected]>
dt-bindings: watchdog: Add compatible for MediaTek mt8167
This commit adds a standalone compatible string mediatek,mt8167-wdt to the MediaTek watchdog binding. The commit message notes that mt8167 has different reset lines compared to the mt6589 fallback.
Quoted 5 lines
Currently mt8167 inherits its watchdog from the included mt8516 dtsi, which in turn falls back on mt6589-wdt. However according to the data sheet mt8167 has 15 sw resets instead of 12, and the systems to which each reset bit corresponds are different from mt6589, so the reset bit constants are different too.
[Severity: Medium]
The commit message mentions that the reset bit constants are different, but this commit does not seem to include the corresponding dt-bindings header file (e.g., include/dt-bindings/reset/mt8167-resets.h). Are these constants defined in another patch in this series, or were they inadvertently omitted, leaving device tree authors unable to utilize the MT8167 reset controller?
Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml properties: · line 29
Quoted 9 lines
Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml +1
-0@@ -26,6 +26,7 @@ properties: - mediatek,mt6795-wdt - mediatek,mt7986-wdt - mediatek,mt7988-wdt + - mediatek,mt8167-wdt
[Severity: Medium]
Does adding this as a standalone compatible string without a fallback cause a regression in probe behavior?
Looking at drivers/watchdog/mtk_wdt.c, the mtk_wdt_dt_ids match table does not appear to have an entry for mediatek,mt8167-wdt:
drivers/watchdog/mtk_wdt.c:mtk_wdt_dt_ids[] {
{ .compatible = "mediatek,mt2712-wdt", .data = &mt2712_data },
...
};If a device tree is updated to use this new compatible string as specified by this binding, will the kernel driver fail to probe, breaking watchdog and reset functionality? Is a corresponding driver patch missing, or should this binding retain a fallback compatible?
Quoted 3 lines
Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml +0
-0- mediatek,mt8183-wdt - mediatek,mt8186-wdt - mediatek,mt8188-wdt
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
PATCH v3 5/8 dt-bindings: reset: Add reset controller constants for mt8167
In reply to Luca Leonardo ScorciaAdd the various bits that identify watchdog and mmsys resets. IDs for mmsys resets restart from zero as they are used in a different device.
--- .../reset/mediatek,mt8167-resets.h | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 include/dt-bindings/reset/mediatek,mt8167-resets.h
include/dt-bindings/reset/mediatek,mt8167-resets.h new file +53 -0
@@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ +#ifndef _DT_BINDINGS_RESET_CONTROLLER_MT8167 +#define _DT_BINDINGS_RESET_CONTROLLER_MT8167 + +/* TOPRGU resets, these are actual bits in the register */ +#define MT8167_TOPRGU_DDRPHY_FLASH_RST 0 +#define MT8167_TOPRGU_AUD_PAD_RST 1 +#define MT8167_TOPRGU_MM_RST 2 +#define MT8167_TOPRGU_MFG_RST 3 +#define MT8167_TOPRGU_MDSYS_RST 4 +#define MT8167_TOPRGU_CONN_RST 5 +#define MT8167_TOPRGU_PAD2CAM_DIG_MIPI_RX_RST 6 +#define MT8167_TOPRGU_DIG_MIPI_TX_RST 7 +#define MT8167_TOPRGU_SPI_PAD_MACRO_RST 8 +/* The data sheet describes bit 9 as "reserved, unused" */ +#define MT8167_TOPRGU_APMIXED_RST 10 +#define MT8167_TOPRGU_VDEC_RST 11 +#define MT8167_TOPRGU_CONN_MCU_RST 12 +#define MT8167_TOPRGU_EFUSE_RST 13 +#define MT8167_TOPRGU_PWRAP_SPICTL_RST 14 +#define MT8167_TOPRGU_SW_RST_NUM 15 + +/* MMSYS resets, these are IDs */ +#define MT8167_MMSYS_SW0_RST_B_SMI_COMMON 0 +#define MT8167_MMSYS_SW0_RST_B_SMI_LARB0 1 +#define MT8167_MMSYS_SW0_RST_B_CAM_MDP 2 +#define MT8167_MMSYS_SW0_RST_B_MDP_RDMA0 3 +#define MT8167_MMSYS_SW0_RST_B_MDP_RSZ0 4 +#define MT8167_MMSYS_SW0_RST_B_MDP_RSZ1 5 +#define MT8167_MMSYS_SW0_RST_B_MDP_TDSHP0 6 +#define MT8167_MMSYS_SW0_RST_B_MDP_WDMA 7 +#define MT8167_MMSYS_SW0_RST_B_MDP_WROT0 8 +#define MT8167_MMSYS_SW0_RST_B_FAKE_ENG 9 +#define MT8167_MMSYS_SW0_RST_B_MUTEX 10 +#define MT8167_MMSYS_SW0_RST_B_DISP_OVL0 11 +#define MT8167_MMSYS_SW0_RST_B_DISP_RDMA0 12 +#define MT8167_MMSYS_SW0_RST_B_DISP_RDMA1 13 +#define MT8167_MMSYS_SW0_RST_B_DISP_WDMA0 14 +#define MT8167_MMSYS_SW0_RST_B_DISP_COLOR 15 +#define MT8167_MMSYS_SW0_RST_B_DISP_CCORR 16 +#define MT8167_MMSYS_SW0_RST_B_DISP_AAL 17 +#define MT8167_MMSYS_SW0_RST_B_DISP_GAMMA 18 +#define MT8167_MMSYS_SW0_RST_B_DISP_DITHER 19 +#define MT8167_MMSYS_SW0_RST_B_DISP_UFOE 20 +#define MT8167_MMSYS_SW0_RST_B_DISP_PWM 21 +#define MT8167_MMSYS_SW0_RST_B_DSI0 22 +#define MT8167_MMSYS_SW0_RST_B_DPI0 23 +#define MT8167_MMSYS_SW0_RST_B_MIPI_TX_CONFIG 24 +#define MT8167_MMSYS_SW1_RST_B_LVDS_ENCODER 25 +#define MT8167_MMSYS_SW1_RST_B_DPI1 26 +#define MT8167_MMSYS_SW1_RST_B_HDMI 27 + +#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT8167 */
Signature · 1 line
2.43.0
[email protected]
AI reviewRe: [PATCH v3 5/8] dt-bindings: reset: Add reset controller constants for mt8167
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Missing `#reset-cells` in the `required` list for the MT8167 watchdog and MMSYS bindings. --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Missing #reset-cells in the required list for the MT8167 watchdog and MMSYS bindings. --
--- Patch [5]: [PATCH v3 5/8] dt-bindings: reset: Add reset controller constants for mt8167 --- commit 226fd0fca4b3ef6d17665690b5633d8884780bcb
Author: Luca Leonardo Scorcia <[email protected]>
dt-bindings: reset: Add reset controller constants for mt8167
This commit adds reset ID constants for the MT8167 watchdog (TOPRGU) and MMSYS devices.
Quoted 12 lines
include/dt-bindings/reset/mediatek,mt8167-resets.h new file +6
-0@@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ +#ifndef _DT_BINDINGS_RESET_CONTROLLER_MT8167 +#define _DT_BINDINGS_RESET_CONTROLLER_MT8167 + +/* TOPRGU resets, these are actual bits in the register */ +#define MT8167_TOPRGU_DDRPHY_FLASH_RST 0
[ ... ]
Quoted 4 lines
include/dt-bindings/reset/mediatek,mt8167-resets.h new file +4
-0+#define MT8167_TOPRGU_SW_RST_NUM 15 + +/* MMSYS resets, these are IDs */ +#define MT8167_MMSYS_SW0_RST_B_SMI_COMMON 0
[ ... ]
include/dt-bindings/reset/mediatek,mt8167-resets.h line 53
Quoted 3 lines
include/dt-bindings/reset/mediatek,mt8167-resets.h new file +3
-0+#define MT8167_MMSYS_SW1_RST_B_HDMI 27 + +#endif /* _DT_BINDINGS_RESET_CONTROLLER_MT8167 */
[Severity: Medium]
Since this header adds reset provider capabilities for the MT8167 watchdog and MMSYS, shouldn't the corresponding YAML schemas also be updated?
When a hardware variant gains reset capabilities, the #reset-cells property typically needs to be added to the required list in the schema. Without updates to mediatek,mtk-wdt.yaml and mediatek,mmsys.yaml to conditionally require #reset-cells for mediatek,mt8167-wdt and mediatek,mt8167-mmsys, incomplete device tree nodes will silently pass dt_binding_check validation.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
Re: [PATCH v3 5/8] dt-bindings: reset: Add reset controller constants for mt8167
In reply to Luca Leonardo ScorciaQuoted 15 lines · Luca Leonardo Scorcia
Add the various bits that identify watchdog and mmsys resets. IDs for mmsys resets restart from zero as they are used in a different device.
Signed-off-by Luca Leonardo Scorcia <[email protected]>--- .../reset/mediatek,mt8167-resets.h | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 include/dt-bindings/reset/mediatek,mt8167-resets.hinclude/dt-bindings/reset/mediatek,mt8167-resets.h new file +0
-0
include/dt-bindings/reset/mediatek,mt8167-resets.h line 5
Quoted 5 lines
include/dt-bindings/reset/mediatek,mt8167-resets.h new file +5
-0@@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ +#ifndef _DT_BINDINGS_RESET_CONTROLLER_MT8167 +#define _DT_BINDINGS_RESET_CONTROLLER_MT8167 + +/* TOPRGU resets, these are actual bits in the register */
Not a binding, drop these.
include/dt-bindings/reset/mediatek,mt8167-resets.h line 15
Quoted 10 lines
include/dt-bindings/reset/mediatek,mt8167-resets.h new file +10
-0+#define MT8167_TOPRGU_DDRPHY_FLASH_RST 0 +#define MT8167_TOPRGU_AUD_PAD_RST 1 +#define MT8167_TOPRGU_MM_RST 2 +#define MT8167_TOPRGU_MFG_RST 3 +#define MT8167_TOPRGU_MDSYS_RST 4 +#define MT8167_TOPRGU_CONN_RST 5 +#define MT8167_TOPRGU_PAD2CAM_DIG_MIPI_RX_RST 6 +#define MT8167_TOPRGU_DIG_MIPI_TX_RST 7 +#define MT8167_TOPRGU_SPI_PAD_MACRO_RST 8 +/* The data sheet describes bit 9 as "reserved, unused" */
ID cannot be unused. If it is unused, then just use next one here, so MT8167_TOPRGU_APMIXED_RST=9.
Best regards,
Krzysztof
PATCH v3 6/8 watchdog: mediatek: Add support for mt8167 TOPRGU/WDT
In reply to Luca Leonardo ScorciaAdd support for the Top Reset Generation Unit/Watchdog Timer found on mt8167.
--- drivers/watchdog/mtk_wdt.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/watchdog/mtk_wdt.c +6 -0
@@ -13,6 +13,7 @@#include <dt-bindings/reset/mediatek,mt6589-resets.h> #include <dt-bindings/reset/mediatek,mt6735-wdt.h> #include <dt-bindings/reset/mediatek,mt6795-resets.h> +#include <dt-bindings/reset/mediatek,mt8167-resets.h> #include <dt-bindings/reset/mt7986-resets.h> #include <dt-bindings/reset/mt8183-resets.h> #include <dt-bindings/reset/mt8186-resets.h>
@@ -110,6 +111,10 @@ static const struct mtk_wdt_data mt7988_data = { .has_swsysrst_en = true, }; +static const struct mtk_wdt_data mt8167_data = { + .toprgu_sw_rst_num =MT8167_TOPRGU_SW_RST_NUM , +}; +static const struct mtk_wdt_data mt8183_data = { .toprgu_sw_rst_num =MT8183_TOPRGU_SW_RST_NUM , };
@@ -503,6 +508,7 @@ static const struct of_device_id mtk_wdt_dt_ids[] = { { .compatible = "mediatek,mt6795-wdt", .data = &mt6795_data }, { .compatible = "mediatek,mt7986-wdt", .data = &mt7986_data }, { .compatible = "mediatek,mt7988-wdt", .data = &mt7988_data }, + { .compatible = "mediatek,mt8167-wdt", .data = &mt8167_data }, { .compatible = "mediatek,mt8183-wdt", .data = &mt8183_data }, { .compatible = "mediatek,mt8186-wdt", .data = &mt8186_data }, { .compatible = "mediatek,mt8188-wdt", .data = &mt8188_data },
Signature · 1 line
2.43.0
PATCH v3 7/8 arm64: dts: mt8167: Properly describe the SoC watchdog
In reply to Luca Leonardo ScorciaCurrently mt8167 inherits its watchdog from the included mt8516 dtsi, which in turn falls back on mt6589-wdt. However according to the data sheet mt8167 has 15 sw resets instead of 12, and the reset bits are different from mt6589.
Use the dedicated mediatek,mt8167-wdt compatible for the watchdog driver, as it correctly describes the SoC resets.
--- arch/arm64/boot/dts/mediatek/mt8167.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/mediatek/mt8167.dtsi +8 -0
@@ -8,6 +8,7 @@ #include <dt-bindings/clock/mt8167-clk.h> #include <dt-bindings/memory/mt8167-larb-port.h> #include <dt-bindings/power/mt8167-power.h> +#include <dt-bindings/reset/mediatek,mt8167-resets.h> #include "mt8167-pinfunc.h"
@@ -95,6 +96,13 @@ power-domain@MT8167_POWER_DOMAIN_CONN { }; }; + watchdog: watchdog@10007000 { + compatible = "mediatek,mt8167-wdt"; + reg = <0 0x10007000 0 0x1000>; + interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>; + #reset-cells = <1>; + }; + pio: pinctrl@1000b000 { compatible = "mediatek,mt8167-pinctrl"; reg = <0 0x1000b000 0 0x1000>;
Signature · 1 line
2.43.0
PATCH v3 8/8 soc: mediatek: mtk-mmsys: Add resets for mt8167
In reply to Luca Leonardo ScorciaThe mt8167 SoC has 64 MMSYS resets, split in two contiguous 32-bits registers, MMSYS_SW0_RST_B (0x140) and MMSYS_SW1_RST_B (0x144), as also stated in the downstream kernel for the Lenovo Smart Clock in the ddp_reg.h header.
--- drivers/soc/mediatek/mt8167-mmsys.h | 3 +++ drivers/soc/mediatek/mtk-mmsys.c | 38 +++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+)
drivers/soc/mediatek/mt8167-mmsys.h +3 -0
@@ -3,6 +3,9 @@#ifndef __SOC_MEDIATEK_MT8167_MMSYS_H#define __SOC_MEDIATEK_MT8167_MMSYS_H +#define MT8167_MMSYS_SW0_RST_B 0x140 +#define MT8167_MMSYS_SW1_RST_B 0x144 +#define MT8167_DISP_REG_CONFIG_DISP_OVL0_MOUT_EN 0x030#define MT8167_DISP_REG_CONFIG_DISP_DITHER_MOUT_EN 0x038#define MT8167_DISP_REG_CONFIG_DISP_COLOR0_SEL_IN 0x058
drivers/soc/mediatek/mtk-mmsys.c +38 -0
@@ -4,6 +4,7 @@* Author: James Liao <[email protected]> */ +#include <dt-bindings/reset/mediatek,mt8167-resets.h> #include <linux/delay.h> #include <linux/device.h> #include <linux/io.h>
@@ -53,10 +54,47 @@ static const struct mtk_mmsys_driver_data mt6797_mmsys_driver_data = { .clk_driver = "clk-mt6797-mm", }; +static const u8 mmsys_mt8167_rst_tb[] = { + [MT8167_MMSYS_SW0_RST_B_SMI_COMMON ] =MMSYS_RST_NR (0 ,0 ), + [MT8167_MMSYS_SW0_RST_B_SMI_LARB0 ] =MMSYS_RST_NR (0 ,1 ), + [MT8167_MMSYS_SW0_RST_B_CAM_MDP ] =MMSYS_RST_NR (0 ,2 ), + [MT8167_MMSYS_SW0_RST_B_MDP_RDMA0 ] =MMSYS_RST_NR (0 ,3 ), + [MT8167_MMSYS_SW0_RST_B_MDP_RSZ0 ] =MMSYS_RST_NR (0 ,4 ), + [MT8167_MMSYS_SW0_RST_B_MDP_RSZ1 ] =MMSYS_RST_NR (0 ,5 ), + [MT8167_MMSYS_SW0_RST_B_MDP_TDSHP0 ] =MMSYS_RST_NR (0 ,6 ), + [MT8167_MMSYS_SW0_RST_B_MDP_WDMA ] =MMSYS_RST_NR (0 ,7 ), + [MT8167_MMSYS_SW0_RST_B_MDP_WROT0 ] =MMSYS_RST_NR (0 ,8 ), + [MT8167_MMSYS_SW0_RST_B_FAKE_ENG ] =MMSYS_RST_NR (0 ,9 ), + [MT8167_MMSYS_SW0_RST_B_MUTEX ] =MMSYS_RST_NR (0 ,10 ), + [MT8167_MMSYS_SW0_RST_B_DISP_OVL0 ] =MMSYS_RST_NR (0 ,11 ), + [MT8167_MMSYS_SW0_RST_B_DISP_RDMA0 ] =MMSYS_RST_NR (0 ,12 ), + [MT8167_MMSYS_SW0_RST_B_DISP_RDMA1 ] =MMSYS_RST_NR (0 ,13 ), + [MT8167_MMSYS_SW0_RST_B_DISP_WDMA0 ] =MMSYS_RST_NR (0 ,14 ), + [MT8167_MMSYS_SW0_RST_B_DISP_COLOR ] =MMSYS_RST_NR (0 ,15 ), + [MT8167_MMSYS_SW0_RST_B_DISP_CCORR ] =MMSYS_RST_NR (0 ,16 ), + [MT8167_MMSYS_SW0_RST_B_DISP_AAL ] =MMSYS_RST_NR (0 ,17 ), + [MT8167_MMSYS_SW0_RST_B_DISP_GAMMA ] =MMSYS_RST_NR (0 ,18 ), + [MT8167_MMSYS_SW0_RST_B_DISP_DITHER ] =MMSYS_RST_NR (0 ,19 ), + [MT8167_MMSYS_SW0_RST_B_DISP_UFOE ] =MMSYS_RST_NR (0 ,20 ), + [MT8167_MMSYS_SW0_RST_B_DISP_PWM ] =MMSYS_RST_NR (0 ,21 ), + [MT8167_MMSYS_SW0_RST_B_DSI0 ] =MMSYS_RST_NR (0 ,22 ), + [MT8167_MMSYS_SW0_RST_B_DPI0 ] =MMSYS_RST_NR (0 ,23 ), +/* bit 24 is SMI_COMMON again according to data sheet */ +/* bit 25 is SMI_LARB0 again according to data sheet */ + [MT8167_MMSYS_SW0_RST_B_MIPI_TX_CONFIG ] =MMSYS_RST_NR (0 ,26 ), +/* all other bits are not described in data sheet */ + [MT8167_MMSYS_SW1_RST_B_LVDS_ENCODER ] =MMSYS_RST_NR (1 ,2 ), + [MT8167_MMSYS_SW1_RST_B_DPI1 ] =MMSYS_RST_NR (1 ,3 ), + [MT8167_MMSYS_SW1_RST_B_HDMI ] =MMSYS_RST_NR (1 ,4 ), +}; +static const struct mtk_mmsys_driver_data mt8167_mmsys_driver_data = { .clk_driver ="clk-mt8167-mm" , .routes = mt8167_mmsys_routing_table, .num_routes =ARRAY_SIZE (mt8167_mmsys_routing_table), + .sw0_rst_offset =MT8167_MMSYS_SW0_RST_B , + .rst_tb = mmsys_mt8167_rst_tb, + .num_resets =ARRAY_SIZE (mmsys_mt8167_rst_tb), };static const struct mtk_mmsys_driver_data mt8173_mmsys_driver_data = {
Signature · 1 line
2.43.0