2021-02-10 11:18:11

by Heiko Stübner

[permalink] [raw]
Subject: [PATCH v2 0/6] Support second Image Signal Processor on rk3399

The rk3399 has two ISPs and right now only the first one is usable.
The second ISP is connected to the TXRX dphy on the soc.

The phy of ISP1 is only accessible through the DSI controller's
io-memory, so this series adds support for simply using the dsi
controller is a phy if needed.

That solution is needed at least on rk3399 and rk3288 but no-one
has looked at camera support on rk3288 at all, so right now
only implement the rk3399 specifics.

changes in v2:
- enable grf-clock also for init callback
to not break if for example hdmi is connected on boot
and disabled the grf clock during its probe
- add Sebastian's Tested-by
- add Rob's Ack for the phy-cells property

Heiko Stuebner (6):
drm/rockchip: dsi: add own additional pclk handling
dt-bindings: display: rockchip-dsi: add optional #phy-cells property
drm/rockchip: dsi: add ability to work as a phy instead of full dsi
arm64: dts: rockchip: add #phy-cells to mipi-dsi1
arm64: dts: rockchip: add cif clk-control pinctrl for rk3399
arm64: dts: rockchip: add isp1 node on rk3399

.../display/rockchip/dw_mipi_dsi_rockchip.txt | 1 +
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 39 ++
drivers/gpu/drm/rockchip/Kconfig | 2 +
.../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 349 ++++++++++++++++++
4 files changed, 391 insertions(+)

--
2.29.2


2021-02-10 11:19:14

by Heiko Stübner

[permalink] [raw]
Subject: [PATCH 6/6] arm64: dts: rockchip: add isp1 node on rk3399

From: Heiko Stuebner <[email protected]>

ISP1 is supplied by the tx1rx1 dphy, that is controlled from
inside the dsi1 controller, so include the necessary phy-link
for it.

Signed-off-by: Heiko Stuebner <[email protected]>
Tested-by: Sebastian Fricke <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 26 ++++++++++++++++++++++++
1 file changed, 26 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 7c661d84df25..98cec9387300 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -1756,6 +1756,32 @@ isp0_mmu: iommu@ff914000 {
rockchip,disable-mmu-reset;
};

+ isp1: isp1@ff920000 {
+ compatible = "rockchip,rk3399-cif-isp";
+ reg = <0x0 0xff920000 0x0 0x4000>;
+ interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru SCLK_ISP1>,
+ <&cru ACLK_ISP1_WRAPPER>,
+ <&cru HCLK_ISP1_WRAPPER>;
+ clock-names = "isp", "aclk", "hclk";
+ iommus = <&isp1_mmu>;
+ phys = <&mipi_dsi1>;
+ phy-names = "dphy";
+ power-domains = <&power RK3399_PD_ISP1>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+ };
+
isp1_mmu: iommu@ff924000 {
compatible = "rockchip,iommu";
reg = <0x0 0xff924000 0x0 0x100>, <0x0 0xff925000 0x0 0x100>;
--
2.29.2

2021-02-10 11:19:14

by Heiko Stübner

[permalink] [raw]
Subject: Re: [PATCH v2 0/6] Support second Image Signal Processor on rk3399

Am Mittwoch, 10. Februar 2021, 12:10:14 CET schrieb Heiko Stuebner:
> The rk3399 has two ISPs and right now only the first one is usable.
> The second ISP is connected to the TXRX dphy on the soc.
>
> The phy of ISP1 is only accessible through the DSI controller's
> io-memory, so this series adds support for simply using the dsi
> controller is a phy if needed.
>
> That solution is needed at least on rk3399 and rk3288 but no-one
> has looked at camera support on rk3288 at all, so right now
> only implement the rk3399 specifics.
>
> changes in v2:
> - enable grf-clock also for init callback
> to not break if for example hdmi is connected on boot
> and disabled the grf clock during its probe
> - add Sebastian's Tested-by
> - add Rob's Ack for the phy-cells property
>
> Heiko Stuebner (6):
> drm/rockchip: dsi: add own additional pclk handling
> dt-bindings: display: rockchip-dsi: add optional #phy-cells property
> drm/rockchip: dsi: add ability to work as a phy instead of full dsi
> arm64: dts: rockchip: add #phy-cells to mipi-dsi1
> arm64: dts: rockchip: add cif clk-control pinctrl for rk3399
> arm64: dts: rockchip: add isp1 node on rk3399

of course everything was meant to be v2 in the subject.


Heiko


2021-02-14 04:56:03

by Sebastian Fricke

[permalink] [raw]
Subject: Re: [PATCH v2 0/6] Support second Image Signal Processor on rk3399

Hey Heiko,

I have tested your series and it successfully fixes the problem with the
2nd camera when HDMI is connected at boot. Besides that the patch looks
good and my tests have confirmed that both cameras have the same output
quality when I exchange the connected ISP instances.

Tested-by: Sebastian Fricke <[email protected]>

Greetings,
Sebastian

On 10.02.2021 12:10, Heiko Stuebner wrote:
>The rk3399 has two ISPs and right now only the first one is usable.
>The second ISP is connected to the TXRX dphy on the soc.
>
>The phy of ISP1 is only accessible through the DSI controller's
>io-memory, so this series adds support for simply using the dsi
>controller is a phy if needed.
>
>That solution is needed at least on rk3399 and rk3288 but no-one
>has looked at camera support on rk3288 at all, so right now
>only implement the rk3399 specifics.
>
>changes in v2:
>- enable grf-clock also for init callback
> to not break if for example hdmi is connected on boot
> and disabled the grf clock during its probe
>- add Sebastian's Tested-by
>- add Rob's Ack for the phy-cells property
>
>Heiko Stuebner (6):
> drm/rockchip: dsi: add own additional pclk handling
> dt-bindings: display: rockchip-dsi: add optional #phy-cells property
> drm/rockchip: dsi: add ability to work as a phy instead of full dsi
> arm64: dts: rockchip: add #phy-cells to mipi-dsi1
> arm64: dts: rockchip: add cif clk-control pinctrl for rk3399
> arm64: dts: rockchip: add isp1 node on rk3399
>
> .../display/rockchip/dw_mipi_dsi_rockchip.txt | 1 +
> arch/arm64/boot/dts/rockchip/rk3399.dtsi | 39 ++
> drivers/gpu/drm/rockchip/Kconfig | 2 +
> .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 349 ++++++++++++++++++
> 4 files changed, 391 insertions(+)
>
>--
>2.29.2
>

2021-07-25 23:03:29

by Heiko Stübner

[permalink] [raw]
Subject: Re: [PATCH v2 0/6] Support second Image Signal Processor on rk3399

Am Mittwoch, 10. Februar 2021, 12:10:14 CEST schrieb Heiko Stuebner:
> The rk3399 has two ISPs and right now only the first one is usable.
> The second ISP is connected to the TXRX dphy on the soc.
>
> The phy of ISP1 is only accessible through the DSI controller's
> io-memory, so this series adds support for simply using the dsi
> controller is a phy if needed.
>
> That solution is needed at least on rk3399 and rk3288 but no-one
> has looked at camera support on rk3288 at all, so right now
> only implement the rk3399 specifics.
>
> changes in v2:
> - enable grf-clock also for init callback
> to not break if for example hdmi is connected on boot
> and disabled the grf clock during its probe
> - add Sebastian's Tested-by
> - add Rob's Ack for the phy-cells property

finally found the time and applied patches 1-3 to drmmisc-next
after fixing the alphabetical kconfig ordering Helen pointed out
and also applied patches 4-6 to my rockchip tree for 5.15


>
> Heiko Stuebner (6):
> drm/rockchip: dsi: add own additional pclk handling
> dt-bindings: display: rockchip-dsi: add optional #phy-cells property
> drm/rockchip: dsi: add ability to work as a phy instead of full dsi
> arm64: dts: rockchip: add #phy-cells to mipi-dsi1
> arm64: dts: rockchip: add cif clk-control pinctrl for rk3399
> arm64: dts: rockchip: add isp1 node on rk3399
>
> .../display/rockchip/dw_mipi_dsi_rockchip.txt | 1 +
> arch/arm64/boot/dts/rockchip/rk3399.dtsi | 39 ++
> drivers/gpu/drm/rockchip/Kconfig | 2 +
> .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 349 ++++++++++++++++++
> 4 files changed, 391 insertions(+)
>
>