1 Add AGL reference hardware support
3 Upstream-Status: pending
5 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
6 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
9 arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi | 912 ++++++++++++++++++++++
10 arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts | 378 +++++++++
11 drivers/media/i2c/adv748x/adv748x-core.c | 48 +-
12 drivers/media/i2c/adv748x/adv748x.h | 12 +
13 4 files changed, 1346 insertions(+), 4 deletions(-)
15 diff --git a/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
17 index 000000000000..a35cd24b27b9
19 +++ b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
21 +// SPDX-License-Identifier: GPL-2.0
23 + * Device Tree Source for common parts of AGL Reference Hardware board variants
25 + * Copyright (C) 2015-2017 Renesas Electronics Corp.
26 + * Copyright (C) 2020 Konsulko Group
30 + * This file is derived from salvator-common.dtsi
32 + * It is currently unclear if the modifications made are such that they could
33 + * be done on top of salvator-common.dtsi to allow removing the duplication.
34 + * It is likely that the common pieces with salvator-common.dtsi would need to
35 + * be factored out into a new common file, which is perhaps hard to justify.
41 + * This command is required when Playback/Capture
43 + * amixer set "DVC Out" 100%
44 + * amixer set "DVC In" 100%
48 + * amixer set "DVC Out Mute" on
49 + * amixer set "DVC In Mute" on
51 + * You can use Volume Ramp
53 + * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps"
54 + * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
55 + * amixer set "DVC Out Ramp" on
57 + * amixer set "DVC Out" 80% // Volume Down
58 + * amixer set "DVC Out" 100% // Volume Up
61 +#include <dt-bindings/gpio/gpio.h>
75 + bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
76 + stdout-path = "serial0:115200n8";
79 + audio_clkout: audio-clkout {
81 + * This is same as <&rcar_sound 0>
82 + * but needed to avoid cs2000/rcar_sound probe dead-lock
84 + compatible = "fixed-clock";
86 + clock-frequency = <12288000>;
90 + compatible = "renesas,avb-mch-gen3";
91 + reg = <0 0xec5a0100 0 0x100>; /* ADG_AVB */
92 + reg-name = "adg_avb";
94 + clocks = <&cpg CPG_MOD 922>;
95 + clock-names = "adg";
96 + resets = <&cpg 922>;
100 + compatible = "hdmi-connector";
101 + label = "HDMI0 IN";
105 + hdmi_in_con: endpoint {
106 + remote-endpoint = <&adv7481_hdmi>;
112 + compatible = "hdmi-connector";
113 + label = "HDMI2 IN";
117 + hdmi_in_con2: endpoint {
118 + remote-endpoint = <&adv7481_hdmi2>;
123 + reg_1p8v: regulator0 {
124 + compatible = "regulator-fixed";
125 + regulator-name = "fixed-1.8V";
126 + regulator-min-microvolt = <1800000>;
127 + regulator-max-microvolt = <1800000>;
129 + regulator-always-on;
132 + reg_3p3v: regulator1 {
133 + compatible = "regulator-fixed";
134 + regulator-name = "fixed-3.3V";
135 + regulator-min-microvolt = <3300000>;
136 + regulator-max-microvolt = <3300000>;
138 + regulator-always-on;
141 + reg_12v: regulator2 {
142 + compatible = "regulator-fixed";
143 + regulator-name = "fixed-12V";
144 + regulator-min-microvolt = <12000000>;
145 + regulator-max-microvolt = <12000000>;
147 + regulator-always-on;
150 + sound_card: sound {
151 + compatible = "audio-graph-card";
153 + label = "rcar-sound";
155 + dais = <&rsnd_port0>;
158 + vcc_sdhi0: regulator-vcc-sdhi0 {
159 + compatible = "regulator-fixed";
161 + regulator-name = "SDHI0 Vcc";
162 + regulator-min-microvolt = <3300000>;
163 + regulator-max-microvolt = <3300000>;
165 + gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
166 + enable-active-high;
169 + vccq_sdhi0: regulator-vccq-sdhi0 {
170 + compatible = "regulator-gpio";
172 + regulator-name = "SDHI0 VccQ";
173 + regulator-min-microvolt = <1800000>;
174 + regulator-max-microvolt = <3300000>;
176 + gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
177 + gpios-states = <1>;
178 + states = <3300000 1
182 + vcc_sdhi3: regulator-vcc-sdhi3 {
183 + compatible = "regulator-fixed";
185 + regulator-name = "SDHI3 Vcc";
186 + regulator-min-microvolt = <3300000>;
187 + regulator-max-microvolt = <3300000>;
189 + gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>;
190 + enable-active-high;
193 + vccq_sdhi3: regulator-vccq-sdhi3 {
194 + compatible = "regulator-gpio";
196 + regulator-name = "SDHI3 VccQ";
197 + regulator-min-microvolt = <1800000>;
198 + regulator-max-microvolt = <3300000>;
200 + gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
201 + gpios-states = <1>;
202 + states = <3300000 1
207 + compatible = "hdmi-connector";
208 + label = "HDMI0 OUT";
212 + hdmi0_con: endpoint {
218 + compatible = "hdmi-connector";
219 + label = "HDMI1 OUT";
223 + hdmi1_con: endpoint {
229 + compatible = "fixed-clock";
230 + #clock-cells = <0>;
231 + clock-frequency = <24576000>;
234 + /* External DU dot clocks */
235 + x21_clk: x21-clock {
236 + compatible = "fixed-clock";
237 + #clock-cells = <0>;
238 + clock-frequency = <33000000>;
241 + x22_clk: x22-clock {
242 + compatible = "fixed-clock";
243 + #clock-cells = <0>;
244 + clock-frequency = <33000000>;
247 + x23_clk: x23-clock {
248 + compatible = "fixed-clock";
249 + #clock-cells = <0>;
250 + clock-frequency = <25000000>;
255 + cpu-supply = <&dvfs>;
259 + clock-frequency = <22579200>;
263 + pinctrl-0 = <&avb_pins>;
264 + pinctrl-names = "default";
265 + phy-handle = <&phy0>;
266 + phy-mode = "rgmii-txid";
269 + phy0: ethernet-phy@0 {
270 + rxc-skew-ps = <1500>;
272 + interrupt-parent = <&gpio2>;
273 + interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
274 + reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
285 + csi40_in: endpoint {
287 + data-lanes = <1 2 3 4>;
288 + remote-endpoint = <&adv7481_txa>;
301 + csi41_in: endpoint {
303 + data-lanes = <1 2 3 4>;
304 + remote-endpoint = <&adv7481_txa2>;
325 + clock-frequency = <32768>;
329 + pinctrl-0 = <&hscif0_pins>;
330 + pinctrl-names = "default";
337 + pinctrl-0 = <&hscif1_pins>;
338 + pinctrl-names = "default";
340 + /* Please use exclusively to the scif1 node */
345 + pinctrl-0 = <&hscif2_pins>;
346 + pinctrl-names = "default";
357 + pinctrl-0 = <&i2c2_pins>;
358 + pinctrl-names = "default";
362 + clock-frequency = <100000>;
364 + video-receiver@70 {
365 + compatible = "adi,adv7481";
366 + reg = <0x70 0x26 0x22 0x34 0x36 0x32
367 + 0x31 0x30 0x41 0x79 0x4a 0x48>;
368 + reg-names = "main", "dpll", "cp", "hdmi", "edid", "repeater",
369 + "infoframe", "cbus", "cec", "sdp", "txa", "txb" ;
371 + #address-cells = <1>;
374 + interrupt-parent = <&gpio0>;
375 + interrupt-names = "intrq1", "intrq3";
376 + interrupts = <4 IRQ_TYPE_LEVEL_LOW>,
377 + <5 IRQ_TYPE_LEVEL_LOW>;
382 + adv7481_hdmi: endpoint {
383 + remote-endpoint = <&hdmi_in_con>;
390 + adv7481_txa: endpoint {
392 + data-lanes = <1 2 3 4>;
393 + remote-endpoint = <&csi40_in>;
399 + video-receiver@71 {
400 + compatible = "adi,adv7481";
401 + reg = <0x71 0x27 0x23 0x35 0x37 0x33
402 + 0x28 0x29 0x42 0x78 0x4b 0x49>;
403 + reg-names = "main", "dpll", "cp", "hdmi", "edid", "repeater",
404 + "infoframe", "cbus", "cec", "sdp", "txa", "txb" ;
406 + #address-cells = <1>;
409 + interrupt-parent = <&gpio6>;
410 + interrupt-names = "intrq1", "intrq3";
411 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>,
412 + <1 IRQ_TYPE_LEVEL_LOW>;
417 + adv7481_hdmi2: endpoint {
418 + remote-endpoint = <&hdmi_in_con2>;
425 + adv7481_txa2: endpoint {
427 + data-lanes = <1 2 3 4>;
428 + remote-endpoint = <&csi41_in>;
433 + cs2000: clk_multiplier@4f {
434 + #clock-cells = <0>;
435 + compatible = "cirrus,cs2000-cp";
437 + clocks = <&audio_clkout>, <&x12_clk>;
438 + clock-names = "clk_in", "ref_clk";
440 + assigned-clocks = <&cs2000>;
441 + assigned-clock-rates = <24576000>; /* 1/1 divide */
446 + pinctrl-0 = <&i2c3_pins>;
447 + pinctrl-names = "default";
451 + clock-frequency = <100000>;
454 + compatible = "st,asm330lhh";
457 + interrupt-names = "int1", "int2";
458 + interrupts = <&gpio6 23 IRQ_TYPE_EDGE_RISING>,
459 + <&gpio2 6 IRQ_TYPE_EDGE_RISING>;
466 + versaclock5: clock-generator@68 {
467 + compatible = "idt,9fgv0841";
469 + #clock-cells = <1>;
470 + clocks = <&x23_clk>;
471 + clock-names = "xin";
476 + pinctrl-0 = <&i2c5_pins>;
477 + pinctrl-names = "default";
481 + clock-frequency = <100000>;
484 + compatible = "asahi-kasei,ak4613";
485 + #sound-dai-cells = <0>;
487 + clocks = <&rcar_sound 3>;
489 + asahi-kasei,in1-single-end;
490 + asahi-kasei,in2-single-end;
491 + asahi-kasei,out1-single-end;
492 + asahi-kasei,out2-single-end;
493 + asahi-kasei,out3-single-end;
494 + asahi-kasei,out4-single-end;
495 + asahi-kasei,out5-single-end;
496 + asahi-kasei,out6-single-end;
499 + ak4613_endpoint: endpoint {
500 + remote-endpoint = <&rsnd_endpoint0>;
509 + clock-frequency = <400000>;
512 + pinctrl-0 = <&irq0_pins>;
513 + pinctrl-names = "default";
515 + compatible = "rohm,bd9571mwv";
517 + interrupt-parent = <&intc_ex>;
518 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
519 + interrupt-controller;
520 + #interrupt-cells = <2>;
523 + rohm,ddr-backup-power = <0xf>;
524 + rohm,rstbmode-level;
528 + regulator-name = "dvfs";
529 + regulator-min-microvolt = <750000>;
530 + regulator-max-microvolt = <1030000>;
532 + regulator-always-on;
538 + compatible = "rohm,br24t01", "atmel,24c01";
554 + clock-frequency = <100000000>;
567 + pinctrl-0 = <&canfd0_pins &canfd1_pins>;
568 + pinctrl-names = "default";
582 + pinctrl-0 = <&scif_clk_pins>;
583 + pinctrl-names = "default";
587 + groups = "avb_link", "avb_mdio", "avb_mii";
592 + groups = "avb_mdio";
593 + drive-strength = <24>;
597 + pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0",
598 + "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3";
599 + drive-strength = <12>;
603 + hscif0_pins: hscif0 {
604 + groups = "hscif0_data", "hscif0_ctrl";
605 + function = "hscif0";
608 + hscif1_pins: hscif1 {
609 + groups = "hscif1_data_a";
610 + function = "hscif1";
613 + hscif2_pins: hscif2 {
614 + groups = "hscif2_data_c";
615 + function = "hscif2";
634 + groups = "intc_ex_irq0";
635 + function = "intc_ex";
638 + scif1_pins: scif1 {
639 + groups = "scif1_data_b";
640 + function = "scif1";
643 + scif2_pins: scif2 {
644 + groups = "scif2_data_a";
645 + function = "scif2";
648 + scif5_pins: scif5 {
649 + groups = "scif5_data_a";
650 + function = "scif5";
653 + scif_clk_pins: scif_clk {
654 + groups = "scif_clk_a";
655 + function = "scif_clk";
659 + groups = "sdhi0_data4", "sdhi0_ctrl";
660 + function = "sdhi0";
661 + power-source = <3300>;
664 + sdhi0_pins_uhs: sd0_uhs {
665 + groups = "sdhi0_data4", "sdhi0_ctrl";
666 + function = "sdhi0";
667 + power-source = <1800>;
671 + groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
672 + function = "sdhi2";
673 + power-source = <3300>;
676 + sdhi2_pins_uhs: sd2_uhs {
677 + groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
678 + function = "sdhi2";
679 + power-source = <1800>;
683 + groups = "sdhi3_data4", "sdhi3_ctrl";
684 + function = "sdhi3";
685 + power-source = <3300>;
688 + sdhi3_pins_uhs: sd3_uhs {
689 + groups = "sdhi3_data4", "sdhi3_ctrl";
690 + function = "sdhi3";
691 + power-source = <1800>;
694 + sound_pins: sound {
695 + groups = "ssi349_ctrl", "ssi3_data", "ssi4_data";
699 + sound_clk_pins: sound_clk {
700 + groups = "audio_clk_a_a", "audio_clk_b_a",
701 + "audio_clkout_a", "audio_clkout3_b";
702 + function = "audio_clk";
715 + usb30_pins: usb30 {
716 + groups = "usb30", "usb30_ovc";
717 + function = "usb30";
720 + canfd0_pins: canfd0 {
721 + groups = "canfd0_data_a";
722 + function = "canfd0";
725 + canfd1_pins: canfd1 {
726 + groups = "canfd1_data";
727 + function = "canfd1";
732 + pinctrl-0 = <&sound_pins &sound_clk_pins>;
733 + pinctrl-names = "default";
736 + #sound-dai-cells = <0>;
738 + /* audio_clkout0/1/2/3 */
739 + #clock-cells = <1>;
740 + clock-frequency = <12288000 11289600>;
744 + /* update <audio_clk_b> to <cs2000> */
745 + clocks = <&cpg CPG_MOD 1005>,
746 + <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
747 + <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
748 + <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
749 + <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
750 + <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
751 + <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
752 + <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
753 + <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
754 + <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
755 + <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
756 + <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
757 + <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
758 + <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
759 + <&audio_clk_a>, <&cs2000>,
761 + <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
764 + #address-cells = <1>;
766 + rsnd_port0: port@0 {
768 + rsnd_endpoint0: endpoint {
769 + remote-endpoint = <&ak4613_endpoint>;
771 + dai-format = "left_j";
772 + bitclock-master = <&rsnd_endpoint0>;
773 + frame-master = <&rsnd_endpoint0>;
775 + playback = <&ssi3>; //ssi0 -> ssi3
776 + capture = <&ssi4>; //ssi1 -> ssi4
783 + timeout-sec = <60>;
788 + pinctrl-0 = <&scif1_pins>;
789 + pinctrl-names = "default";
792 + /* Please use exclusively to the hscif1 node */
797 + pinctrl-0 = <&scif2_pins>;
798 + pinctrl-names = "default";
804 + pinctrl-0 = <&scif5_pins>;
805 + pinctrl-names = "default";
811 + clock-frequency = <14745600>;
815 + pinctrl-0 = <&sdhi0_pins>;
816 + pinctrl-1 = <&sdhi0_pins_uhs>;
817 + pinctrl-names = "default", "state_uhs";
819 + vmmc-supply = <&vcc_sdhi0>;
820 + vqmmc-supply = <&vccq_sdhi0>;
821 + cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
822 + wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
830 + /* used for on-board 8bit eMMC */
831 + pinctrl-0 = <&sdhi2_pins>;
832 + pinctrl-1 = <&sdhi2_pins_uhs>;
833 + pinctrl-names = "default", "state_uhs";
835 + iommus = <&ipmmu_ds1 34>;
837 + vmmc-supply = <®_3p3v>;
838 + vqmmc-supply = <®_1p8v>;
845 + fixed-emmc-driver-type = <1>;
850 + pinctrl-0 = <&sdhi3_pins>;
851 + pinctrl-1 = <&sdhi3_pins_uhs>;
852 + pinctrl-names = "default", "state_uhs";
854 + vmmc-supply = <&vcc_sdhi3>;
855 + vqmmc-supply = <&vccq_sdhi3>;
856 + cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
857 + wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
869 + clock-frequency = <50000000>;
873 + pinctrl-0 = <&usb0_pins>;
874 + pinctrl-names = "default";
880 + pinctrl-0 = <&usb1_pins>;
881 + pinctrl-names = "default";
887 + phys = <&usb3_phy0>;
898 + clock-frequency = <100000000>;
934 + pinctrl-0 = <&usb30_pins>;
935 + pinctrl-names = "default";
939 diff --git a/arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts b/arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts
941 index 000000000000..0a63d2e7a64b
943 +++ b/arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts
946 + * Device Tree Source for the AGL reference hardware board with R-Car H3 ES3.0
948 + * Copyright (C) 2019 Panasonic Corp.
949 + * Copyright (C) 2020 Konsulko Group
951 + * This file is licensed under the terms of the GNU General Public License
952 + * version 2. This program is licensed "as is" without any warranty of any
953 + * kind, whether express or implied.
957 + * This file is for the most part derived from:
959 + * - r8a7795-salvator-xs-4x2g.dts
960 + * - r8a7795-salvator-xs.dts
961 + * - salvator-xs.dtsi
963 + * With agl-refhw-common.dtsi replacing (and derived from) salvator-common.dtsi.
967 +#include "r8a7795.dtsi"
968 +#include "agl-refhw-common.dtsi"
971 + model = "AGL Reference Hardware based on r8a7795 ES3.0+ with 8GiB (4 x 2 GiB)";
972 + compatible = "agl,refhw-h3", "renesas,r8a7795";
975 + device_type = "memory";
976 + /* first 128MB is reserved for secure area. */
977 + reg = <0x0 0x48000000 0x0 0x78000000>;
981 + device_type = "memory";
982 + reg = <0x5 0x00000000 0x0 0x80000000>;
986 + device_type = "memory";
987 + reg = <0x6 0x00000000 0x0 0x80000000>;
991 + device_type = "memory";
992 + reg = <0x7 0x00000000 0x0 0x80000000>;
996 + #address-cells = <2>;
1000 + /* device specific region for Lossy Decompression */
1001 + lossy_decompress: linux,lossy_decompress@54000000 {
1003 + reg = <0x00000000 0x54000000 0x0 0x03000000>;
1006 + /* For Audio DSP */
1007 + adsp_reserved: linux,adsp@57000000 {
1008 + compatible = "shared-dma-pool";
1010 + reg = <0x00000000 0x57000000 0x0 0x01000000>;
1013 + /* global autoconfigured region for contiguous allocations */
1014 + linux,cma@58000000 {
1015 + compatible = "shared-dma-pool";
1017 + reg = <0x00000000 0x58000000 0x0 0x18000000>;
1018 + linux,cma-default;
1021 + /* device specific region for contiguous allocations */
1022 + mmp_reserved: linux,multimedia@70000000 {
1023 + compatible = "shared-dma-pool";
1025 + reg = <0x00000000 0x70000000 0x0 0x10000000>;
1030 + compatible = "renesas,mmngr";
1031 + memory-region = <&mmp_reserved>, <&lossy_decompress>;
1035 + compatible = "renesas,mmngrbuf";
1039 + compatible = "renesas,vspm_if";
1044 + vga_in: endpoint {
1045 + /delete-property/remote-endpoint;
1053 + adv7123_in: endpoint {
1054 + /delete-property/remote-endpoint;
1059 + adv7123_out: endpoint {
1060 + /delete-property/remote-endpoint;
1070 + memory-region = <&adsp_reserved>;
1074 + clocks = <&cpg CPG_MOD 724>,
1075 + <&cpg CPG_MOD 723>,
1076 + <&cpg CPG_MOD 722>,
1077 + <&cpg CPG_MOD 721>,
1082 + clock-names = "du.0", "du.1", "du.2", "du.3",
1083 + "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
1101 + dais = <&rsnd_port0 /* ak4613 */
1102 + &rsnd_port1 /* HDMI0 */
1103 + &rsnd_port2>; /* HDMI1 */
1112 + rcar_dw_hdmi0_out: endpoint {
1113 + remote-endpoint = <&hdmi0_con>;
1118 + dw_hdmi0_snd_in: endpoint {
1119 + remote-endpoint = <&rsnd_endpoint1>;
1126 + remote-endpoint = <&rcar_dw_hdmi0_out>;
1135 + rcar_dw_hdmi1_out: endpoint {
1136 + remote-endpoint = <&hdmi1_con>;
1141 + dw_hdmi1_snd_in: endpoint {
1142 + remote-endpoint = <&rsnd_endpoint2>;
1149 + remote-endpoint = <&rcar_dw_hdmi1_out>;
1163 + /* rsnd_port0 is on salvator-common */
1164 + rsnd_port1: port@1 {
1166 + rsnd_endpoint1: endpoint {
1167 + remote-endpoint = <&dw_hdmi0_snd_in>;
1169 + dai-format = "i2s";
1170 + bitclock-master = <&rsnd_endpoint1>;
1171 + frame-master = <&rsnd_endpoint1>;
1173 + playback = <&ssi2>;
1176 + rsnd_port2: port@2 {
1178 + rsnd_endpoint2: endpoint {
1179 + remote-endpoint = <&dw_hdmi1_snd_in>;
1181 + dai-format = "i2s";
1182 + bitclock-master = <&rsnd_endpoint2>;
1183 + frame-master = <&rsnd_endpoint2>;
1185 + playback = <&ssi3>;
1193 + groups = "usb2", "usb2_ovc";
1194 + function = "usb2";
1198 + * - On Salvator-X[S], GP6_3[01] are connected to ADV7482 as irq pins
1199 + * (when SW31 is the default setting on Salvator-XS).
1200 + * - If SW31 is the default setting, you cannot use USB2.0 ch3 on
1201 + * r8a7795 with Salvator-XS.
1202 + * Hence the SW31 setting must be changed like 2) below.
1203 + * 1) Default setting of SW31: ON-ON-OFF-OFF-OFF-OFF:
1204 + * - Connect GP6_3[01] to ADV7842.
1205 + * 2) Changed setting of SW31: OFF-OFF-ON-ON-ON-ON:
1206 + * - Connect GP6_3[01] to BD082065 (USB2.0 ch3's host power).
1207 + * - Connect GP6_{04,21} to ADV7842.
1209 + usb2_ch3_pins: usb2_ch3 {
1210 + groups = "usb2_ch3";
1211 + function = "usb2_ch3";
1216 + pinctrl-0 = <&usb2_pins>;
1217 + pinctrl-names = "default";
1223 + pinctrl-0 = <&usb2_ch3_pins>;
1224 + pinctrl-names = "default";
1245 +/* End r8a7795-salvator-xs.dts content */
1248 +/* Start r8a7795-salvator-xs-4x2g.dts content */
1251 + /* Map all possible DDR as inbound ranges */
1252 + dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
1256 + /* Map all possible DDR as inbound ranges */
1257 + dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
1260 +/* End r8a7795-salvator-xs-4x2g.dts content */
1263 +/* Start salvator-xs.dts content */
1266 + clock-frequency = <16640000>;
1270 + clock-frequency = <400000>;
1272 + versaclock6: clock-generator@6a {
1273 + compatible = "idt,5p49v6901";
1275 + #clock-cells = <1>;
1276 + clocks = <&x23_clk>;
1277 + clock-names = "xin";
1281 +/* End salvator-xs.dts content */
1284 +/* Start reference hardware specific tweaks */
1290 + /delete-property/remote-endpoint;
1296 + /delete-property/remote-endpoint;
1303 + status = "disabled";
1307 + status = "disabled";
1311 + clock-frequency = <0>;
1315 + /delete-property/ wp-gpios;
1320 + /delete-property/ wp-gpios;
1323 diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c
1324 index da8f0621a10b..c2b37f70f711 100644
1325 --- a/drivers/media/i2c/adv748x/adv748x-core.c
1326 +++ b/drivers/media/i2c/adv748x/adv748x-core.c
1327 @@ -97,6 +97,21 @@ static const struct adv748x_register_map
1328 [ADV748X_PAGE_TXA] = { "txa", 0x4a },
1331 +static const struct adv748x_register_map adv748x_default_addresses2[] = {
1332 + [ADV748X_PAGE_IO] = { "main", 0x71 },
1333 + [ADV748X_PAGE_DPLL] = { "dpll", 0x27 },
1334 + [ADV748X_PAGE_CP] = { "cp", 0x23 },
1335 + [ADV748X_PAGE_HDMI] = { "hdmi", 0x35 },
1336 + [ADV748X_PAGE_EDID] = { "edid", 0x37 },
1337 + [ADV748X_PAGE_REPEATER] = { "repeater", 0x33 },
1338 + [ADV748X_PAGE_INFOFRAME] = { "infoframe", 0x28 },
1339 + [ADV748X_PAGE_CBUS] = { "cbus", 0x29 },
1340 + [ADV748X_PAGE_CEC] = { "cec", 0x42 },
1341 + [ADV748X_PAGE_SDP] = { "sdp", 0x78 },
1342 + [ADV748X_PAGE_TXB] = { "txb", 0x49 },
1343 + [ADV748X_PAGE_TXA] = { "txa", 0x4b },
1346 static int adv748x_read_check(struct adv748x_state *state,
1347 int client_page, u8 reg)
1349 @@ -183,10 +198,17 @@ static int adv748x_initialise_clients(st
1352 for (i = ADV748X_PAGE_DPLL; i < ADV748X_PAGE_MAX; ++i) {
1353 - state->i2c_clients[i] = i2c_new_ancillary_device(
1354 + if ((state->client->addr << 1) == 0xe0) {
1355 + state->i2c_clients[i] = i2c_new_ancillary_device(
1357 adv748x_default_addresses[i].name,
1358 adv748x_default_addresses[i].default_addr);
1360 + state->i2c_clients[i] = i2c_new_ancillary_device(
1362 + adv748x_default_addresses2[i].name,
1363 + adv748x_default_addresses2[i].default_addr);
1366 if (IS_ERR(state->i2c_clients[i])) {
1367 adv_err(state, "failed to create i2c client %u\n", i);