2019-12-11 14:04:19

by Benoit Parrot

[permalink] [raw]
Subject: [Patch v4 00/10] ARM: dts: dra7: add cal nodes

This patch series adds the needed clkctrl and ty-sysc nodes for CAL module.
It also adds support for the module in related dtsi and dts for DRA72,
DRA76 and AM654 SoC.

Changes since v3:
- Added Tony's ack
- Added Rob's ack
- In all 3 .dts patch removed unneeded cal 'status = "ok"' lines

Changes since v2:
- Add non-standard clock node naming to commit message as per Tony's
comment

Changes since v1:
- Fix clock name to make it generic
- Updated the binding to use ti,camerrx-control instead of sycon_camerrx
- Split off the clk code into its own patch
- Add clk mailing list as requested

Benoit Parrot (10):
clk: ti: dra7: add cam clkctrl data
ARM: dts: dra7: add cam clkctrl node
ARM: OMAP: DRA7xx: Make CAM clock domain SWSUP only
ARM: dts: dra7-l4: Add ti-sysc node for CAM
ARM: dts: DRA72: Add CAL dtsi node
arm: dts: dra72-evm-common: Add entries for the CSI2 cameras
arm: dtsi: dra76x: Add CAL dtsi node
arm: dts: dra76-evm: Add CAL and OV5640 nodes
arm64: dts: k3-am65-main Add CAL node
arm64: dts: k3-am654-base-board: Add CSI2 OV5640 camera

arch/arm/boot/dts/dra7-l4.dtsi | 43 ++++++++++++++++---
arch/arm/boot/dts/dra72-evm-common.dtsi | 31 +++++++++++++
arch/arm/boot/dts/dra72x.dtsi | 42 ++++++++++++++++++
arch/arm/boot/dts/dra76-evm.dts | 35 +++++++++++++++
arch/arm/boot/dts/dra76x.dtsi | 42 ++++++++++++++++++
arch/arm/boot/dts/dra7xx-clocks.dtsi | 14 ++++++
arch/arm/mach-omap2/clockdomains7xx_data.c | 2 +-
arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 22 ++++++++++
.../arm64/boot/dts/ti/k3-am654-base-board.dts | 32 ++++++++++++++
drivers/clk/ti/clk-7xx.c | 19 ++++++++
include/dt-bindings/clock/dra7.h | 10 +++++
11 files changed, 285 insertions(+), 7 deletions(-)

--
2.17.1


2019-12-11 14:04:24

by Benoit Parrot

[permalink] [raw]
Subject: [Patch v4 09/10] arm64: dts: k3-am65-main Add CAL node

Add CAL dtsi node for AM654 device. Including proper power-domains and
clock properties.

Signed-off-by: Benoit Parrot <[email protected]>
---
arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index efb24579922c..551adcefcc83 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -624,4 +624,26 @@
dma-coherent;
interrupts = <GIC_SPI 355 IRQ_TYPE_EDGE_RISING>;
};
+
+ cal: cal@6f03000 {
+ compatible = "ti,am654-cal";
+ reg = <0x0 0x06f03000 0x0 0x400>,
+ <0x0 0x06f03800 0x0 0x40>;
+ reg-names = "cal_top",
+ "cal_rx_core0";
+ interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
+ ti,camerrx-control = <&scm_conf 0x40c0>;
+ clock-names = "fck";
+ clocks = <&k3_clks 2 0>;
+ power-domains = <&k3_pds 2 TI_SCI_PD_EXCLUSIVE>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi2_0: port@0 {
+ reg = <0>;
+ };
+ };
+ };
};
--
2.17.1

2019-12-11 14:05:23

by Benoit Parrot

[permalink] [raw]
Subject: [Patch v4 05/10] ARM: dts: DRA72: Add CAL dtsi node

This patch adds the required dtsi node to support the Camera
Adaptation Layer (CAL) for the DRA72 family of devices.

Signed-off-by: Benoit Parrot <[email protected]>
---
arch/arm/boot/dts/dra72x.dtsi | 42 +++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)

diff --git a/arch/arm/boot/dts/dra72x.dtsi b/arch/arm/boot/dts/dra72x.dtsi
index f5762709c853..82b57a35abc0 100644
--- a/arch/arm/boot/dts/dra72x.dtsi
+++ b/arch/arm/boot/dts/dra72x.dtsi
@@ -17,6 +17,48 @@
};
};

+&l4_per2 {
+ target-module@5b000 { /* 0x4845b000, ap 59 46.0 */
+ compatible = "ti,sysc-omap4", "ti,sysc";
+ reg = <0x5b000 0x4>,
+ <0x5b010 0x4>;
+ reg-names = "rev", "sysc";
+ ti,sysc-midle = <SYSC_IDLE_FORCE>,
+ <SYSC_IDLE_NO>;
+ ti,sysc-sidle = <SYSC_IDLE_FORCE>,
+ <SYSC_IDLE_NO>;
+ clocks = <&cam_clkctrl DRA7_CAM_VIP2_CLKCTRL 0>;
+ clock-names = "fck";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0x0 0x5b000 0x1000>;
+
+ cal: cal@0 {
+ compatible = "ti,dra72-cal";
+ reg = <0x0000 0x400>,
+ <0x0800 0x40>,
+ <0x0900 0x40>;
+ reg-names = "cal_top",
+ "cal_rx_core0",
+ "cal_rx_core1";
+ interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
+ ti,camerrx-control = <&scm_conf 0xE94>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi2_0: port@0 {
+ reg = <0>;
+ };
+ csi2_1: port@1 {
+ reg = <1>;
+ };
+ };
+ };
+ };
+};
+
&dss {
reg = <0x58000000 0x80>,
<0x58004054 0x4>,
--
2.17.1

2019-12-11 14:06:09

by Benoit Parrot

[permalink] [raw]
Subject: [Patch v4 02/10] ARM: dts: dra7: add cam clkctrl node

Add clkctrl nodes for CAM domain.

Note that because of the current dts node name dependency for mapping to
clock domain, we must still use "cam-clkctrl@" naming instead of generic
"clock@" naming for the node. And because of this, it's probably best to
apply the dts node addition together along with the other clock changes.

Signed-off-by: Benoit Parrot <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
---
arch/arm/boot/dts/dra7xx-clocks.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/dra7xx-clocks.dtsi b/arch/arm/boot/dts/dra7xx-clocks.dtsi
index d1c2406ec71c..199f8d483f75 100644
--- a/arch/arm/boot/dts/dra7xx-clocks.dtsi
+++ b/arch/arm/boot/dts/dra7xx-clocks.dtsi
@@ -1734,6 +1734,20 @@
};
};

+ cam_cm: cam-cm@1000 {
+ compatible = "ti,omap4-cm";
+ reg = <0x1000 0x100>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges = <0 0x1000 0x100>;
+
+ cam_clkctrl: cam-clkctrl@20 {
+ compatible = "ti,clkctrl";
+ reg = <0x20 0x2c>;
+ #clock-cells = <2>;
+ };
+ };
+
dss_cm: dss-cm@1100 {
compatible = "ti,omap4-cm";
reg = <0x1100 0x100>;
--
2.17.1

2019-12-11 14:06:39

by Benoit Parrot

[permalink] [raw]
Subject: [Patch v4 08/10] arm: dts: dra76-evm: Add CAL and OV5640 nodes

Add device nodes for CSI2 camera board OV5640.
Add the CAL port nodes with the necessary linkage to the ov5640 nodes.

Signed-off-by: Benoit Parrot <[email protected]>
---
arch/arm/boot/dts/dra76-evm.dts | 35 +++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

diff --git a/arch/arm/boot/dts/dra76-evm.dts b/arch/arm/boot/dts/dra76-evm.dts
index 1fb6f13fb5e2..a17d4875bb2e 100644
--- a/arch/arm/boot/dts/dra76-evm.dts
+++ b/arch/arm/boot/dts/dra76-evm.dts
@@ -116,6 +116,12 @@
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
+
+ clk_ov5640_fixed: clock {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <24000000>;
+ };
};

&i2c1 {
@@ -317,6 +323,27 @@
};
};

+&i2c5 {
+ status = "okay";
+ clock-frequency = <400000>;
+
+ ov5640@3c {
+ compatible = "ovti,ov5640";
+ reg = <0x3c>;
+
+ clocks = <&clk_ov5640_fixed>;
+ clock-names = "xclk";
+
+ port {
+ csi2_cam0: endpoint {
+ remote-endpoint = <&csi2_phy0>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+ };
+ };
+};
+
&cpu0 {
vdd-supply = <&buck10_reg>;
};
@@ -447,3 +474,11 @@
max-bitrate = <5000000>;
};
};
+
+&csi2_0 {
+ csi2_phy0: endpoint {
+ remote-endpoint = <&csi2_cam0>;
+ clock-lanes = <0>;
+ data-lanes = <1 2>;
+ };
+};
--
2.17.1

2020-01-23 17:20:54

by Tony Lindgren

[permalink] [raw]
Subject: Re: [Patch v4 00/10] ARM: dts: dra7: add cal nodes

* Benoit Parrot <[email protected]> [191211 06:03]:
> This patch series adds the needed clkctrl and ty-sysc nodes for CAL module.
> It also adds support for the module in related dtsi and dts for DRA72,
> DRA76 and AM654 SoC.

Applying these into omap-for-v5.6/ti-sysc-dt-cam on top of Tero's
for-5.6-ti-clk branch. It might be too later for v5.6, but we'll
see.

Regards,

Tony

2020-01-23 17:28:11

by Tony Lindgren

[permalink] [raw]
Subject: Re: [Patch v4 00/10] ARM: dts: dra7: add cal nodes

* Tony Lindgren <[email protected]> [200123 17:18]:
> * Benoit Parrot <[email protected]> [191211 06:03]:
> > This patch series adds the needed clkctrl and ty-sysc nodes for CAL module.
> > It also adds support for the module in related dtsi and dts for DRA72,
> > DRA76 and AM654 SoC.
>
> Applying these into omap-for-v5.6/ti-sysc-dt-cam on top of Tero's
> for-5.6-ti-clk branch. It might be too later for v5.6, but we'll
> see.

Actually I'll leave out the k3-am65 dts changes as I don't see
acks for those. Tero can pick up those later.

Regards,

Tony

2020-01-24 07:27:38

by Tero Kristo

[permalink] [raw]
Subject: Re: [Patch v4 00/10] ARM: dts: dra7: add cal nodes

On 24/01/2020 09:21, Tero Kristo wrote:
> On 23/01/2020 19:26, Tony Lindgren wrote:
>> * Tony Lindgren <[email protected]> [200123 17:18]:
>>> * Benoit Parrot <[email protected]> [191211 06:03]:
>>>> This patch series adds the needed clkctrl and ty-sysc nodes for CAL
>>>> module.
>>>> It also adds support for the module in related dtsi and dts for DRA72,
>>>> DRA76 and AM654 SoC.
>>>
>>> Applying these into omap-for-v5.6/ti-sysc-dt-cam on top of Tero's
>>> for-5.6-ti-clk branch. It might be too later for v5.6, but we'll
>>> see.
>>
>> Actually I'll leave out the k3-am65 dts changes as I don't see
>> acks for those. Tero can pick up those later.
>>
>> Regards,
>>
>> Tony
>>
>
> Right, I think I also missed the cal clkctrl patch in this series. This
> series is imho applying against too many different trees (three if I am
> not mistaken) and should be split up to avoid confusion / not to get
> lost in mailboxes.

Not cal clkctrl but the cal k3 patches. I just assumed all dts patches
in this series were against omaps.

Anyways, I am planning to send k3 dts pull v2 today due to dma patches
from Peter, so I think I can sneak these also in with that...

-Tero
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

2020-01-24 07:47:09

by Tero Kristo

[permalink] [raw]
Subject: Re: [Patch v4 00/10] ARM: dts: dra7: add cal nodes

On 23/01/2020 19:26, Tony Lindgren wrote:
> * Tony Lindgren <[email protected]> [200123 17:18]:
>> * Benoit Parrot <[email protected]> [191211 06:03]:
>>> This patch series adds the needed clkctrl and ty-sysc nodes for CAL module.
>>> It also adds support for the module in related dtsi and dts for DRA72,
>>> DRA76 and AM654 SoC.
>>
>> Applying these into omap-for-v5.6/ti-sysc-dt-cam on top of Tero's
>> for-5.6-ti-clk branch. It might be too later for v5.6, but we'll
>> see.
>
> Actually I'll leave out the k3-am65 dts changes as I don't see
> acks for those. Tero can pick up those later.
>
> Regards,
>
> Tony
>

Right, I think I also missed the cal clkctrl patch in this series. This
series is imho applying against too many different trees (three if I am
not mistaken) and should be split up to avoid confusion / not to get
lost in mailboxes.

-Tero
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

2020-01-24 11:39:55

by Tero Kristo

[permalink] [raw]
Subject: Re: [Patch v4 09/10] arm64: dts: k3-am65-main Add CAL node

On 11/12/2019 16:05, Benoit Parrot wrote:
> Add CAL dtsi node for AM654 device. Including proper power-domains and
> clock properties.
>
> Signed-off-by: Benoit Parrot <[email protected]>

Queued this and patch #10 up for 5.6, thanks.

-Tero

> ---
> arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> index efb24579922c..551adcefcc83 100644
> --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
> @@ -624,4 +624,26 @@
> dma-coherent;
> interrupts = <GIC_SPI 355 IRQ_TYPE_EDGE_RISING>;
> };
> +
> + cal: cal@6f03000 {
> + compatible = "ti,am654-cal";
> + reg = <0x0 0x06f03000 0x0 0x400>,
> + <0x0 0x06f03800 0x0 0x40>;
> + reg-names = "cal_top",
> + "cal_rx_core0";
> + interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
> + ti,camerrx-control = <&scm_conf 0x40c0>;
> + clock-names = "fck";
> + clocks = <&k3_clks 2 0>;
> + power-domains = <&k3_pds 2 TI_SCI_PD_EXCLUSIVE>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + csi2_0: port@0 {
> + reg = <0>;
> + };
> + };
> + };
> };
>

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki