Skip to content

Commit 0805662

Browse files
6by9popcornmix
authored andcommitted
dtoverlays: Create Pi5 variant of tc358743 overlay
The Pi0-4 variant wants to change the compatible string for the CSI2 node to "brcm,bcm2835-unicam-legacy" to disable Media Controller by default, which would switch to Unicam when Pi5 needs the CFE driver. Split the overlay into an include and base pi0-4 and pi5 overlay files Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 74070d0 commit 0805662

File tree

6 files changed

+138
-100
lines changed

6 files changed

+138
-100
lines changed

arch/arm/boot/dts/overlays/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
302302
sx150x.dtbo \
303303
tc358743.dtbo \
304304
tc358743-audio.dtbo \
305+
tc358743-pi5.dtbo \
305306
tinylcd35.dtbo \
306307
tpm-slb9670.dtbo \
307308
tpm-slb9673.dtbo \

arch/arm/boot/dts/overlays/README

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5078,6 +5078,21 @@ Load: dtoverlay=tc358743-audio,<param>=<val>
50785078
Params: card-name Override the default, "tc358743", card name.
50795079

50805080

5081+
Name: tc358743-pi5
5082+
Info: Toshiba TC358743 HDMI to CSI-2 bridge chip for Pi5.
5083+
Uses Unicam 1, which is the standard camera connector on most Pi
5084+
variants.
5085+
Load: dtoverlay=tc358743-pi5,<param>=<val>
5086+
Params: 4lane Use 4 lanes (only applicable to Compute Modules
5087+
CAM1 connector).
5088+
5089+
link-frequency Set the link frequency. Only values of 297000000
5090+
(574Mbit/s) and 486000000 (972Mbit/s - default)
5091+
are supported by the driver.
5092+
cam0 Adopt the default configuration for CAM0 on a
5093+
Compute Module (CSI0, i2c_vc, and cam0_reg).
5094+
5095+
50815096
Name: tinylcd35
50825097
Info: 3.5" Color TFT Display by www.tinylcd.com
50835098
Options: Touch, RTC, keypad

arch/arm/boot/dts/overlays/overlay_map.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,12 @@
402402
bcm2711;
403403
};
404404

405+
tc358743 {
406+
bcm2835;
407+
bcm2711;
408+
bcm2712 = "tc358743-pi5";
409+
};
410+
405411
uart0 {
406412
bcm2835;
407413
bcm2711;

arch/arm/boot/dts/overlays/tc358743-overlay.dts

Lines changed: 5 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -3,114 +3,19 @@
33
/dts-v1/;
44
/plugin/;
55

6-
/{
7-
compatible = "brcm,bcm2835";
8-
9-
i2c_frag: fragment@0 {
10-
target = <&i2c_csi_dsi>;
11-
__overlay__ {
12-
#address-cells = <1>;
13-
#size-cells = <0>;
14-
status = "okay";
15-
16-
tc358743: tc358743@f {
17-
compatible = "toshiba,tc358743";
18-
reg = <0x0f>;
19-
status = "okay";
20-
21-
clocks = <&cam1_clk>;
22-
clock-names = "refclk";
23-
24-
port {
25-
tc358743_0: endpoint {
26-
remote-endpoint = <&csi1_ep>;
27-
clock-lanes = <0>;
28-
clock-noncontinuous;
29-
link-frequencies =
30-
/bits/ 64 <486000000>;
31-
};
32-
};
33-
};
34-
};
35-
};
36-
37-
csi_frag: fragment@1 {
38-
target = <&csi1>;
39-
csi: __overlay__ {
40-
status = "okay";
41-
42-
port {
43-
csi1_ep: endpoint {
44-
remote-endpoint = <&tc358743_0>;
45-
};
46-
};
47-
};
48-
};
49-
50-
fragment@2 {
51-
target = <&tc358743_0>;
52-
__overlay__ {
53-
data-lanes = <1 2>;
54-
};
55-
};
56-
57-
fragment@3 {
58-
target = <&tc358743_0>;
59-
__dormant__ {
60-
data-lanes = <1 2 3 4>;
61-
};
62-
};
6+
#include "tc358743.dtsi"
637

64-
fragment@4 {
65-
target = <&i2c0if>;
66-
__overlay__ {
67-
status = "okay";
68-
};
69-
};
70-
71-
fragment@5 {
72-
target = <&i2c0mux>;
73-
__overlay__ {
74-
status = "okay";
75-
};
76-
};
77-
78-
clk_frag: fragment@6 {
79-
target = <&cam1_clk>;
80-
__overlay__ {
81-
status = "okay";
82-
clock-frequency = <27000000>;
83-
};
84-
};
85-
86-
fragment@7 {
87-
target = <&csi1_ep>;
88-
__overlay__ {
89-
data-lanes = <1 2>;
90-
};
91-
};
92-
93-
fragment@8 {
94-
target = <&csi1_ep>;
95-
__dormant__ {
96-
data-lanes = <1 2 3 4>;
97-
};
98-
};
8+
/ {
9+
compatible = "brcm,bcm2835";
9910

100-
fragment@9 {
11+
fragment@100 {
10112
target = <&csi1>;
10213
__overlay__ {
10314
compatible = "brcm,bcm2835-unicam-legacy";
10415
};
10516
};
10617

10718
__overrides__ {
108-
4lane = <0>, "-2+3-7+8";
109-
link-frequency = <&tc358743_0>,"link-frequencies#0";
110-
media-controller = <0>,"!9";
111-
cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
112-
<&csi_frag>, "target:0=",<&csi0>,
113-
<&clk_frag>, "target:0=",<&cam0_clk>,
114-
<&tc358743>, "clocks:0=",<&cam0_clk>;
19+
media-controller = <0>,"!100";
11520
};
11621
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
// Definitions for Toshiba TC358743 HDMI to CSI2 bridge on VC I2C bus. Pi5 variant
3+
/dts-v1/;
4+
/plugin/;
5+
6+
#include "tc358743.dtsi"
7+
8+
/ {
9+
compatible = "brcm,bcm2712";
10+
};
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
/ {
2+
i2c_frag: fragment@0 {
3+
target = <&i2c_csi_dsi>;
4+
__overlay__ {
5+
#address-cells = <1>;
6+
#size-cells = <0>;
7+
status = "okay";
8+
9+
tc358743: tc358743@f {
10+
compatible = "toshiba,tc358743";
11+
reg = <0x0f>;
12+
status = "okay";
13+
14+
clocks = <&cam1_clk>;
15+
clock-names = "refclk";
16+
17+
port {
18+
tc358743_0: endpoint {
19+
remote-endpoint = <&csi1_ep>;
20+
clock-lanes = <0>;
21+
clock-noncontinuous;
22+
link-frequencies =
23+
/bits/ 64 <486000000>;
24+
};
25+
};
26+
};
27+
};
28+
};
29+
30+
csi_frag: fragment@1 {
31+
target = <&csi1>;
32+
csi: __overlay__ {
33+
status = "okay";
34+
35+
port {
36+
csi1_ep: endpoint {
37+
remote-endpoint = <&tc358743_0>;
38+
};
39+
};
40+
};
41+
};
42+
43+
fragment@2 {
44+
target = <&tc358743_0>;
45+
__overlay__ {
46+
data-lanes = <1 2>;
47+
};
48+
};
49+
50+
fragment@3 {
51+
target = <&tc358743_0>;
52+
__dormant__ {
53+
data-lanes = <1 2 3 4>;
54+
};
55+
};
56+
57+
fragment@4 {
58+
target = <&i2c0if>;
59+
__overlay__ {
60+
status = "okay";
61+
};
62+
};
63+
64+
fragment@5 {
65+
target = <&i2c0mux>;
66+
__overlay__ {
67+
status = "okay";
68+
};
69+
};
70+
71+
clk_frag: fragment@6 {
72+
target = <&cam1_clk>;
73+
__overlay__ {
74+
status = "okay";
75+
clock-frequency = <27000000>;
76+
};
77+
};
78+
79+
fragment@7 {
80+
target = <&csi1_ep>;
81+
__overlay__ {
82+
data-lanes = <1 2>;
83+
};
84+
};
85+
86+
fragment@8 {
87+
target = <&csi1_ep>;
88+
__dormant__ {
89+
data-lanes = <1 2 3 4>;
90+
};
91+
};
92+
93+
__overrides__ {
94+
4lane = <0>, "-2+3-7+8";
95+
link-frequency = <&tc358743_0>,"link-frequencies#0";
96+
cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
97+
<&csi_frag>, "target:0=",<&csi0>,
98+
<&clk_frag>, "target:0=",<&cam0_clk>,
99+
<&tc358743>, "clocks:0=",<&cam0_clk>;
100+
};
101+
};

0 commit comments

Comments
 (0)