From: Enric Balletbo i Serra <hidden> Date: 2021-08-25 10:26:52
Dear all,
The following patchset is a reimplementation of the patch sent by Jitao
Shi [1] some time ago. As suggested by Chun-Kuang Hu, this time the
reset is done using the reset API, where the mmsys driver is the reset
controller and the mtk_dsi driver is the reset consumer.
Note that the first patch is kind of unrelated change, it's just a
cleanup but is needed if you want to apply all the following patches
cleanly.
This patchset is important in order to have the DSI panel working on some
kukui MT8183 Chromebooks (i.e Lenovo IdeaPad Duet). Without it, you just
get a black screen.
Best regards,
Enric
[1] https://lore.kernel.org/linux-arm-kernel/20210420132614.150242-4-jitao.shi@mediatek.com/
Changes in v3:
- Based on top of the patch that converts mmsys to schema
- Fix typo in the commit description
Changes in v2:
- Fix build test ERROR Reported-by: kernel test robot [off-list ref]
- Added a new patch to describe the dsi reset optional property.
Enric Balletbo i Serra (7):
arm64: dts: mediatek: Move reset controller constants into common
location
dt-bindings: mediatek: Add #reset-cells to mmsys system controller
dt-bindings: display: mediatek: add dsi reset optional property
arm64: dts: mt8173: Add the mmsys reset bit to reset the dsi0
arm64: dts: mt8183: Add the mmsys reset bit to reset the dsi0
soc: mediatek: mmsys: Add reset controller support
drm/mediatek: mtk_dsi: Reset the dsi0 hardware
.../bindings/arm/mediatek/mediatek,mmsys.yaml | 4 ++
.../display/mediatek/mediatek,dsi.txt | 6 ++
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 +
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 5 +-
drivers/gpu/drm/mediatek/mtk_dsi.c | 5 +-
drivers/soc/mediatek/mtk-mmsys.c | 69 +++++++++++++++++++
drivers/soc/mediatek/mtk-mmsys.h | 2 +
drivers/watchdog/mtk_wdt.c | 6 +-
.../mt2712-resets.h | 0
include/dt-bindings/reset/mt8173-resets.h | 2 +
.../mt8183-resets.h | 3 +
.../mt8192-resets.h | 0
12 files changed, 98 insertions(+), 6 deletions(-)
rename include/dt-bindings/{reset-controller => reset}/mt2712-resets.h (100%)
rename include/dt-bindings/{reset-controller => reset}/mt8183-resets.h (98%)
rename include/dt-bindings/{reset-controller => reset}/mt8192-resets.h (100%)
--
2.30.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
diff --git a/include/dt-bindings/reset-controller/mt2712-resets.h b/include/dt-bindings/reset/mt2712-resets.hsimilarity index 100%rename from include/dt-bindings/reset-controller/mt2712-resets.hrename to include/dt-bindings/reset/mt2712-resets.hdiff --git a/include/dt-bindings/reset-controller/mt8183-resets.h b/include/dt-bindings/reset/mt8183-resets.hsimilarity index 100%rename from include/dt-bindings/reset-controller/mt8183-resets.hrename to include/dt-bindings/reset/mt8183-resets.hdiff --git a/include/dt-bindings/reset-controller/mt8192-resets.h b/include/dt-bindings/reset/mt8192-resets.hsimilarity index 100%rename from include/dt-bindings/reset-controller/mt8192-resets.hrename to include/dt-bindings/reset/mt8192-resets.h
--
2.30.2
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Enric Balletbo i Serra <hidden> Date: 2021-08-25 10:26:55
Update device tree binding documentation for the dsi to add the optional
property to reset the dsi controller.
Signed-off-by: Enric Balletbo i Serra <redacted>
Acked-by: Rob Herring <robh@kernel.org>
---
(no changes since v2)
Changes in v2:
- Added a new patch to describe the dsi reset optional property.
.../devicetree/bindings/display/mediatek/mediatek,dsi.txt | 6 ++++++
1 file changed, 6 insertions(+)
@@ -19,6 +19,11 @@ Required properties: Documentation/devicetree/bindings/graph.txt. This port should be connected to the input port of an attached DSI panel or DSI-to-eDP encoder chip.+Optional properties:+- resets: list of phandle + reset specifier pair, as described in [1].++[1] Documentation/devicetree/bindings/reset/reset.txt+ MIPI TX Configuration Module ============================
From: Enric Balletbo i Serra <hidden> Date: 2021-08-25 10:26:58
The mmsys system controller exposes a set of memory client resets and
needs to specify the #reset-cells property in order to advertise the
number of cells needed to describe each of the resets.
Signed-off-by: Enric Balletbo i Serra <redacted>
---
Changes in v3:
- Based on top of the patch that converts mmsys to schema
.../devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml | 4 ++++
1 file changed, 4 insertions(+)
From: Enric Balletbo i Serra <hidden> Date: 2021-08-25 10:27:00
Reset the DSI hardware is needed to prevent different settings between
the bootloader and the kernel.
Signed-off-by: Enric Balletbo i Serra <redacted>
Acked-by: Rob Herring <robh@kernel.org>
---
(no changes since v1)
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 ++
include/dt-bindings/reset/mt8173-resets.h | 2 ++
2 files changed, 4 insertions(+)
From: Enric Balletbo i Serra <hidden> Date: 2021-08-25 10:27:06
Reset the DSI hardware is needed to prevent different settings between
the bootloader and the kernel.
While here, also remove the undocumented and also not used
'mediatek,syscon-dsi' property.
Signed-off-by: Enric Balletbo i Serra <redacted>
Acked-by: Rob Herring <robh@kernel.org>
---
(no changes since v1)
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 3 ++-
include/dt-bindings/reset/mt8183-resets.h | 3 +++
2 files changed, 5 insertions(+), 1 deletion(-)
From: Enric Balletbo i Serra <hidden> Date: 2021-08-25 10:27:08
Among other features the mmsys driver should implement a reset
controller to be able to reset different bits from their space.
Cc: Jitao Shi <redacted>
Suggested-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Enric Balletbo i Serra <redacted>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
---
(no changes since v1)
drivers/soc/mediatek/mtk-mmsys.c | 69 ++++++++++++++++++++++++++++++++
drivers/soc/mediatek/mtk-mmsys.h | 2 +
2 files changed, 71 insertions(+)
From: Enric Balletbo i Serra <hidden> Date: 2021-08-25 10:27:10
Reset dsi0 HW to default when power on. This prevents to have different
settingis between the bootloader and the kernel.
As not all Mediatek boards have the reset consumer configured in their
board description, also is not needed on all of them, the reset is optional,
so the change is compatible with all boards.
Cc: Jitao Shi <redacted>
Suggested-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Enric Balletbo i Serra <redacted>
Acked-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
---
Changes in v3:
- Fix typo in the commit description
drivers/gpu/drm/mediatek/mtk_dsi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
From: Philipp Zabel <p.zabel@pengutronix.de> Date: 2021-08-25 10:46:48
On Wed, 2021-08-25 at 12:26 +0200, Enric Balletbo i Serra wrote:
Among other features the mmsys driver should implement a reset
controller to be able to reset different bits from their space.
Cc: Jitao Shi <redacted>
Suggested-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Enric Balletbo i Serra <redacted>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
---
(no changes since v1)
drivers/soc/mediatek/mtk-mmsys.c | 69 ++++++++++++++++++++++++++++++++
drivers/soc/mediatek/mtk-mmsys.h | 2 +
From: Rob Herring <robh@kernel.org> Date: 2021-08-25 16:31:19
On Wed, 25 Aug 2021 12:26:27 +0200, Enric Balletbo i Serra wrote:
The mmsys system controller exposes a set of memory client resets and
needs to specify the #reset-cells property in order to advertise the
number of cells needed to describe each of the resets.
Signed-off-by: Enric Balletbo i Serra <redacted>
---
Changes in v3:
- Based on top of the patch that converts mmsys to schema
.../devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml | 4 ++++
1 file changed, 4 insertions(+)
Update device tree binding documentation for the dsi to add the optional
property to reset the dsi controller.
Reviewed-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
quoted hunk
Signed-off-by: Enric Balletbo i Serra <redacted>
Acked-by: Rob Herring <robh@kernel.org>
---
(no changes since v2)
Changes in v2:
- Added a new patch to describe the dsi reset optional property.
.../devicetree/bindings/display/mediatek/mediatek,dsi.txt | 6 ++++++
1 file changed, 6 insertions(+)
@@ -19,6 +19,11 @@ Required properties: Documentation/devicetree/bindings/graph.txt. This port should be connected to the input port of an attached DSI panel or DSI-to-eDP encoder chip.+Optional properties:+- resets: list of phandle + reset specifier pair, as described in [1].++[1] Documentation/devicetree/bindings/reset/reset.txt+ MIPI TX Configuration Module ============================
From: Chun-Kuang Hu <chunkuang.hu@kernel.org> Date: 2021-08-26 00:33:17
Philipp Zabel [off-list ref] 於 2021年8月25日 週三 下午6:46寫道:
On Wed, 2021-08-25 at 12:26 +0200, Enric Balletbo i Serra wrote:
quoted
Among other features the mmsys driver should implement a reset
controller to be able to reset different bits from their space.
Cc: Jitao Shi <redacted>
Suggested-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Enric Balletbo i Serra <redacted>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
---
(no changes since v1)
drivers/soc/mediatek/mtk-mmsys.c | 69 ++++++++++++++++++++++++++++++++
drivers/soc/mediatek/mtk-mmsys.h | 2 +
From: Enric Balletbo i Serra <hidden> Date: 2021-09-03 14:10:36
Hi Nancy,
(again in plain text, sorry for the noise)
On 26/8/21 2:33, Chun-Kuang Hu wrote:
Philipp Zabel [off-list ref] 於 2021年8月25日 週三 下午6:46寫道:
quoted
On Wed, 2021-08-25 at 12:26 +0200, Enric Balletbo i Serra wrote:
quoted
Among other features the mmsys driver should implement a reset
controller to be able to reset different bits from their space.
Cc: Jitao Shi <redacted>
Suggested-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Enric Balletbo i Serra <redacted>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
---
(no changes since v1)
drivers/soc/mediatek/mtk-mmsys.c | 69 ++++++++++++++++++++++++++++++++
drivers/soc/mediatek/mtk-mmsys.h | 2 +
Hi Enric,
On Fri, 2021-09-03 at 16:10 +0200, Enric Balletbo i Serra wrote:
Hi Nancy,
(again in plain text, sorry for the noise)
On 26/8/21 2:33, Chun-Kuang Hu wrote:
quoted
Philipp Zabel [off-list ref] 於 2021年8月25日 週三 下午6:46寫道:
quoted
On Wed, 2021-08-25 at 12:26 +0200, Enric Balletbo i Serra wrote:
quoted
Among other features the mmsys driver should implement a reset
controller to be able to reset different bits from their space.
Cc: Jitao Shi <redacted>
Suggested-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Enric Balletbo i Serra <
enric.balletbo@collabora.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
---
(no changes since v1)
drivers/soc/mediatek/mtk-mmsys.c | 69
++++++++++++++++++++++++++++++++
drivers/soc/mediatek/mtk-mmsys.h | 2 +
From: Hsin-Yi Wang <hidden> Date: 2021-09-16 06:05:54
On Wed, Aug 25, 2021 at 6:26 PM Enric Balletbo i Serra
[off-list ref] wrote:
Among other features the mmsys driver should implement a reset
controller to be able to reset different bits from their space.
Cc: Jitao Shi <redacted>
Suggested-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Signed-off-by: Enric Balletbo i Serra <redacted>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
---
(no changes since v1)
<snip>
+static int mtk_mmsys_reset_update(struct reset_controller_dev *rcdev, unsigned long id,
+ bool assert)
+{
+ struct mtk_mmsys *mmsys = container_of(rcdev, struct mtk_mmsys, rcdev);
+ unsigned long flags;
+ u32 reg;
+ int i;