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>
7 [asm330lhh interrupt fix]
8 Signed-off-by: Hiroyuki Ishii <ishii.hiroyuki002@jp.panasonic.com>
11 arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi | 919 ++++++++++++++++++++++
12 arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts | 392 +++++++++
13 drivers/media/i2c/adv748x/adv748x-core.c | 24 +-
14 3 files changed, 1334 insertions(+), 1 deletion(-)
16 diff --git a/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
18 index 000000000000..7474ed578c21
20 +++ b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
22 +// SPDX-License-Identifier: GPL-2.0
24 + * Device Tree Source for common parts of AGL Reference Hardware board variants
26 + * Copyright (C) 2015-2017 Renesas Electronics Corp.
27 + * Copyright (C) 2020 Konsulko Group
31 + * This file is derived from salvator-common.dtsi
33 + * It is currently unclear if the modifications made are such that they could
34 + * be done on top of salvator-common.dtsi to allow removing the duplication.
35 + * It is likely that the common pieces with salvator-common.dtsi would need to
36 + * be factored out into a new common file, which is perhaps hard to justify.
42 + * This command is required when Playback/Capture
44 + * amixer set "DVC Out" 100%
45 + * amixer set "DVC In" 100%
49 + * amixer set "DVC Out Mute" on
50 + * amixer set "DVC In Mute" on
52 + * You can use Volume Ramp
54 + * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps"
55 + * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
56 + * amixer set "DVC Out Ramp" on
58 + * amixer set "DVC Out" 80% // Volume Down
59 + * amixer set "DVC Out" 100% // Volume Up
62 +#include <dt-bindings/gpio/gpio.h>
76 + bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
77 + stdout-path = "serial0:115200n8";
80 + audio_clkout: audio-clkout {
82 + * This is same as <&rcar_sound 0>
83 + * but needed to avoid cs2000/rcar_sound probe dead-lock
85 + compatible = "fixed-clock";
87 + clock-frequency = <12288000>;
91 + compatible = "renesas,avb-mch-gen3";
92 + reg = <0 0xec5a0100 0 0x100>; /* ADG_AVB */
93 + reg-name = "adg_avb";
95 + clocks = <&cpg CPG_MOD 922>;
96 + clock-names = "adg";
97 + resets = <&cpg 922>;
101 + compatible = "hdmi-connector";
102 + label = "HDMI0 IN";
106 + hdmi_in_con: endpoint {
107 + remote-endpoint = <&adv7481_hdmi>;
113 + compatible = "hdmi-connector";
114 + label = "HDMI2 IN";
118 + hdmi_in_con2: endpoint {
119 + remote-endpoint = <&adv7481_hdmi2>;
124 + reg_1p8v: regulator0 {
125 + compatible = "regulator-fixed";
126 + regulator-name = "fixed-1.8V";
127 + regulator-min-microvolt = <1800000>;
128 + regulator-max-microvolt = <1800000>;
130 + regulator-always-on;
133 + reg_3p3v: regulator1 {
134 + compatible = "regulator-fixed";
135 + regulator-name = "fixed-3.3V";
136 + regulator-min-microvolt = <3300000>;
137 + regulator-max-microvolt = <3300000>;
139 + regulator-always-on;
142 + reg_12v: regulator2 {
143 + compatible = "regulator-fixed";
144 + regulator-name = "fixed-12V";
145 + regulator-min-microvolt = <12000000>;
146 + regulator-max-microvolt = <12000000>;
148 + regulator-always-on;
151 + sound_card: sound {
152 + compatible = "audio-graph-card";
156 + dais = <&rsnd_port0>;
159 + vcc_sdhi0: regulator-vcc-sdhi0 {
160 + compatible = "regulator-fixed";
162 + regulator-name = "SDHI0 Vcc";
163 + regulator-min-microvolt = <3300000>;
164 + regulator-max-microvolt = <3300000>;
166 + gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
167 + enable-active-high;
170 + vccq_sdhi0: regulator-vccq-sdhi0 {
171 + compatible = "regulator-gpio";
173 + regulator-name = "SDHI0 VccQ";
174 + regulator-min-microvolt = <1800000>;
175 + regulator-max-microvolt = <3300000>;
177 + gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
178 + gpios-states = <1>;
179 + states = <3300000 1
183 + vcc_sdhi3: regulator-vcc-sdhi3 {
184 + compatible = "regulator-fixed";
186 + regulator-name = "SDHI3 Vcc";
187 + regulator-min-microvolt = <3300000>;
188 + regulator-max-microvolt = <3300000>;
190 + gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>;
191 + enable-active-high;
194 + vccq_sdhi3: regulator-vccq-sdhi3 {
195 + compatible = "regulator-gpio";
197 + regulator-name = "SDHI3 VccQ";
198 + regulator-min-microvolt = <1800000>;
199 + regulator-max-microvolt = <3300000>;
201 + gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
202 + gpios-states = <1>;
203 + states = <3300000 1
208 + compatible = "hdmi-connector";
209 + label = "HDMI0 OUT";
213 + hdmi0_con: endpoint {
219 + compatible = "hdmi-connector";
220 + label = "HDMI1 OUT";
224 + hdmi1_con: endpoint {
230 + compatible = "fixed-clock";
231 + #clock-cells = <0>;
232 + clock-frequency = <24576000>;
235 + /* External DU dot clocks */
236 + x21_clk: x21-clock {
237 + compatible = "fixed-clock";
238 + #clock-cells = <0>;
239 + clock-frequency = <33000000>;
242 + x22_clk: x22-clock {
243 + compatible = "fixed-clock";
244 + #clock-cells = <0>;
245 + clock-frequency = <33000000>;
248 + x23_clk: x23-clock {
249 + compatible = "fixed-clock";
250 + #clock-cells = <0>;
251 + clock-frequency = <25000000>;
256 + cpu-supply = <&dvfs>;
260 + clock-frequency = <22579200>;
264 + pinctrl-0 = <&avb_pins>;
265 + pinctrl-names = "default";
266 + phy-handle = <&phy0>;
267 + phy-mode = "rgmii-txid";
270 + phy0: ethernet-phy@0 {
271 + rxc-skew-ps = <1500>;
273 + interrupt-parent = <&gpio2>;
274 + interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
275 + reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
286 + csi40_in: endpoint {
288 + data-lanes = <1 2 3 4>;
289 + remote-endpoint = <&adv7481_txa>;
302 + csi41_in: endpoint {
304 + data-lanes = <1 2 3 4>;
305 + remote-endpoint = <&adv7481_txa2>;
326 + clock-frequency = <32768>;
330 + pinctrl-0 = <&hscif0_pins>;
331 + pinctrl-names = "default";
338 + pinctrl-0 = <&hscif1_pins>;
339 + pinctrl-names = "default";
341 + /* Please use exclusively to the scif1 node */
346 + pinctrl-0 = <&hscif2_pins>;
347 + pinctrl-names = "default";
358 + pinctrl-0 = <&i2c2_pins>;
359 + pinctrl-names = "default";
363 + clock-frequency = <100000>;
365 + video-receiver@70 {
366 + compatible = "adi,adv7481";
367 + reg = <0x70 0x26 0x22 0x34 0x36 0x32
368 + 0x31 0x30 0x41 0x79 0x4a 0x48>;
369 + reg-names = "main", "dpll", "cp", "hdmi", "edid", "repeater",
370 + "infoframe", "cbus", "cec", "sdp", "txa", "txb" ;
372 + #address-cells = <1>;
375 + interrupt-parent = <&gpio0>;
376 + interrupt-names = "intrq1", "intrq3";
377 + interrupts = <4 IRQ_TYPE_LEVEL_LOW>,
378 + <5 IRQ_TYPE_LEVEL_LOW>;
383 + adv7481_hdmi: endpoint {
384 + remote-endpoint = <&hdmi_in_con>;
391 + adv7481_txa: endpoint {
393 + data-lanes = <1 2 3 4>;
394 + remote-endpoint = <&csi40_in>;
400 + video-receiver@71 {
401 + compatible = "adi,adv7481";
402 + reg = <0x71 0x27 0x23 0x35 0x37 0x33
403 + 0x28 0x29 0x42 0x78 0x4b 0x49>;
404 + reg-names = "main", "dpll", "cp", "hdmi", "edid", "repeater",
405 + "infoframe", "cbus", "cec", "sdp", "txa", "txb" ;
407 + #address-cells = <1>;
410 + interrupt-parent = <&gpio6>;
411 + interrupt-names = "intrq1", "intrq3";
412 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>,
413 + <1 IRQ_TYPE_LEVEL_LOW>;
418 + adv7481_hdmi2: endpoint {
419 + remote-endpoint = <&hdmi_in_con2>;
426 + adv7481_txa2: endpoint {
428 + data-lanes = <1 2 3 4>;
429 + remote-endpoint = <&csi41_in>;
434 + cs2000: clk_multiplier@4f {
435 + #clock-cells = <0>;
436 + compatible = "cirrus,cs2000-cp";
438 + clocks = <&audio_clkout>, <&x12_clk>;
439 + clock-names = "clk_in", "ref_clk";
441 + assigned-clocks = <&cs2000>;
442 + assigned-clock-rates = <24576000>; /* 1/1 divide */
447 + pinctrl-0 = <&i2c3_pins>;
448 + pinctrl-names = "default";
452 + clock-frequency = <400000>;
455 + compatible = "st,asm330lhh";
458 + interrupt-names = "int1", "int2";
459 + interrupts-extended = <&gpio6 23 IRQ_TYPE_EDGE_RISING>,
460 + <&gpio2 6 IRQ_TYPE_EDGE_RISING>;
461 + st,drdy-int-pin = <1>;
468 + versaclock5: clock-generator@68 {
469 + compatible = "idt,9fgv0841";
471 + #clock-cells = <1>;
472 + clocks = <&x23_clk>;
473 + clock-names = "xin";
478 + pinctrl-0 = <&i2c5_pins>;
479 + pinctrl-names = "default";
483 + clock-frequency = <100000>;
486 + compatible = "asahi-kasei,ak4613";
487 + #sound-dai-cells = <0>;
489 + clocks = <&rcar_sound 3>;
491 + asahi-kasei,in1-single-end;
492 + asahi-kasei,in2-single-end;
493 + asahi-kasei,out1-single-end;
494 + asahi-kasei,out2-single-end;
495 + asahi-kasei,out3-single-end;
496 + asahi-kasei,out4-single-end;
497 + asahi-kasei,out5-single-end;
498 + asahi-kasei,out6-single-end;
501 + ak4613_endpoint: endpoint {
502 + remote-endpoint = <&rsnd_endpoint0>;
511 + clock-frequency = <400000>;
514 + pinctrl-0 = <&irq0_pins>;
515 + pinctrl-names = "default";
517 + compatible = "rohm,bd9571mwv";
519 + interrupt-parent = <&intc_ex>;
520 + interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
521 + interrupt-controller;
522 + #interrupt-cells = <2>;
525 + rohm,ddr-backup-power = <0xf>;
526 + rohm,rstbmode-level;
530 + regulator-name = "dvfs";
531 + regulator-min-microvolt = <750000>;
532 + regulator-max-microvolt = <1030000>;
534 + regulator-always-on;
540 + compatible = "rohm,br24t01", "atmel,24c01";
556 + clock-frequency = <100000000>;
569 + pinctrl-0 = <&canfd0_pins &canfd1_pins>;
570 + pinctrl-names = "default";
584 + pinctrl-0 = <&scif_clk_pins>;
585 + pinctrl-names = "default";
589 + groups = "avb_link", "avb_mdio", "avb_mii";
594 + groups = "avb_mdio";
595 + drive-strength = <24>;
599 + pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0",
600 + "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3";
601 + drive-strength = <12>;
605 + hscif0_pins: hscif0 {
606 + groups = "hscif0_data", "hscif0_ctrl";
607 + function = "hscif0";
610 + hscif1_pins: hscif1 {
611 + groups = "hscif1_data_a";
612 + function = "hscif1";
615 + hscif2_pins: hscif2 {
616 + groups = "hscif2_data_c";
617 + function = "hscif2";
636 + groups = "intc_ex_irq0";
637 + function = "intc_ex";
640 + scif1_pins: scif1 {
641 + groups = "scif1_data_b";
642 + function = "scif1";
645 + scif2_pins: scif2 {
646 + groups = "scif2_data_a";
647 + function = "scif2";
650 + scif5_pins: scif5 {
651 + groups = "scif5_data_a";
652 + function = "scif5";
655 + scif_clk_pins: scif_clk {
656 + groups = "scif_clk_a";
657 + function = "scif_clk";
661 + groups = "sdhi0_data4", "sdhi0_ctrl";
662 + function = "sdhi0";
663 + power-source = <3300>;
666 + sdhi0_pins_uhs: sd0_uhs {
667 + groups = "sdhi0_data4", "sdhi0_ctrl";
668 + function = "sdhi0";
669 + power-source = <1800>;
673 + groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
674 + function = "sdhi2";
675 + power-source = <3300>;
678 + sdhi2_pins_uhs: sd2_uhs {
679 + groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
680 + function = "sdhi2";
681 + power-source = <1800>;
685 + groups = "sdhi3_data4", "sdhi3_ctrl";
686 + function = "sdhi3";
687 + power-source = <3300>;
690 + sdhi3_pins_uhs: sd3_uhs {
691 + groups = "sdhi3_data4", "sdhi3_ctrl";
692 + function = "sdhi3";
693 + power-source = <1800>;
696 + sound_pins: sound {
697 + groups = "ssi349_ctrl", "ssi3_data", "ssi4_data";
701 + sound_clk_pins: sound_clk {
702 + groups = "audio_clk_a_a", "audio_clk_b_a",
703 + "audio_clkout_a", "audio_clkout3_b";
704 + function = "audio_clk";
713 + groups = "usb1_ovc";
717 + usb30_pins: usb30 {
718 + groups = "usb30", "usb30_ovc";
719 + function = "usb30";
722 + canfd0_pins: canfd0 {
723 + groups = "canfd0_data_a";
724 + function = "canfd0";
727 + canfd1_pins: canfd1 {
728 + groups = "canfd1_data";
729 + function = "canfd1";
734 + pinctrl-0 = <&sound_pins &sound_clk_pins>;
735 + pinctrl-names = "default";
738 + #sound-dai-cells = <0>;
740 + /* audio_clkout0/1/2/3 */
741 + #clock-cells = <1>;
742 + clock-frequency = <12288000 11289600>;
746 + /* update <audio_clk_b> to <cs2000> */
747 + clocks = <&cpg CPG_MOD 1005>,
748 + <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
749 + <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
750 + <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
751 + <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
752 + <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
753 + <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
754 + <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
755 + <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
756 + <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
757 + <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
758 + <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
759 + <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
760 + <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
761 + <&audio_clk_a>, <&cs2000>,
763 + <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
766 + #address-cells = <1>;
768 + rsnd_port0: port@0 {
770 + rsnd_endpoint0: endpoint {
771 + remote-endpoint = <&ak4613_endpoint>;
773 + dai-format = "left_j";
774 + bitclock-master = <&rsnd_endpoint0>;
775 + frame-master = <&rsnd_endpoint0>;
777 + playback = <&ssi3>; //ssi0 -> ssi3
778 + capture = <&ssi4>; //ssi1 -> ssi4
785 + timeout-sec = <60>;
790 + pinctrl-0 = <&scif1_pins>;
791 + pinctrl-names = "default";
794 + /* Please use exclusively to the hscif1 node */
799 + pinctrl-0 = <&scif2_pins>;
800 + pinctrl-names = "default";
806 + pinctrl-0 = <&scif5_pins>;
807 + pinctrl-names = "default";
813 + clock-frequency = <14745600>;
817 + pinctrl-0 = <&sdhi0_pins>;
818 + pinctrl-1 = <&sdhi0_pins_uhs>;
819 + pinctrl-names = "default", "state_uhs";
821 + vmmc-supply = <&vcc_sdhi0>;
822 + vqmmc-supply = <&vccq_sdhi0>;
823 + cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
824 + wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
832 + /* used for on-board 8bit eMMC */
833 + pinctrl-0 = <&sdhi2_pins>;
834 + pinctrl-1 = <&sdhi2_pins_uhs>;
835 + pinctrl-names = "default", "state_uhs";
837 + iommus = <&ipmmu_ds1 34>;
839 + vmmc-supply = <®_3p3v>;
840 + vqmmc-supply = <®_1p8v>;
847 + fixed-emmc-driver-type = <1>;
852 + pinctrl-0 = <&sdhi3_pins>;
853 + pinctrl-1 = <&sdhi3_pins_uhs>;
854 + pinctrl-names = "default", "state_uhs";
856 + vmmc-supply = <&vcc_sdhi3>;
857 + vqmmc-supply = <&vccq_sdhi3>;
858 + cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
859 + wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
871 + clock-frequency = <50000000>;
875 + pinctrl-0 = <&usb0_pins>;
876 + pinctrl-names = "default";
882 + pinctrl-0 = <&usb1_pins>;
883 + pinctrl-names = "default";
889 + phys = <&usb3_phy0>;
900 + clock-frequency = <100000000>;
936 + pinctrl-0 = <&usb30_pins>;
937 + pinctrl-names = "default";
941 diff --git a/arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts b/arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts
943 index 000000000000..6c846a94afe2
945 +++ b/arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts
948 + * Device Tree Source for the AGL reference hardware board with R-Car H3 ES3.0
950 + * Copyright (C) 2019 Panasonic Corp.
951 + * Copyright (C) 2020 Konsulko Group
953 + * This file is licensed under the terms of the GNU General Public License
954 + * version 2. This program is licensed "as is" without any warranty of any
955 + * kind, whether express or implied.
959 + * This file is for the most part derived from:
961 + * - r8a7795-salvator-xs-4x2g.dts
962 + * - r8a7795-salvator-xs.dts
963 + * - salvator-xs.dtsi
965 + * With agl-refhw-common.dtsi replacing (and derived from) salvator-common.dtsi.
969 +#include "r8a7795.dtsi"
970 +#include "agl-refhw-common.dtsi"
973 + model = "AGL Reference Hardware based on r8a7795 ES3.0+ with 8GiB (4 x 2 GiB)";
974 + compatible = "agl,refhw-h3", "renesas,r8a7795";
977 + device_type = "memory";
978 + /* first 128MB is reserved for secure area. */
979 + reg = <0x0 0x48000000 0x0 0x78000000>;
983 + device_type = "memory";
984 + reg = <0x5 0x00000000 0x0 0x80000000>;
988 + device_type = "memory";
989 + reg = <0x6 0x00000000 0x0 0x80000000>;
993 + device_type = "memory";
994 + reg = <0x7 0x00000000 0x0 0x80000000>;
998 + #address-cells = <2>;
1002 + /* device specific region for Lossy Decompression */
1003 + lossy_decompress: linux,lossy_decompress@54000000 {
1005 + reg = <0x00000000 0x54000000 0x0 0x03000000>;
1008 + /* For Audio DSP */
1009 + adsp_reserved: linux,adsp@57000000 {
1010 + compatible = "shared-dma-pool";
1012 + reg = <0x00000000 0x57000000 0x0 0x01000000>;
1015 + /* global autoconfigured region for contiguous allocations */
1016 + linux,cma@58000000 {
1017 + compatible = "shared-dma-pool";
1019 + reg = <0x00000000 0x58000000 0x0 0x18000000>;
1020 + linux,cma-default;
1023 + /* device specific region for contiguous allocations */
1024 + mmp_reserved: linux,multimedia@70000000 {
1025 + compatible = "shared-dma-pool";
1027 + reg = <0x00000000 0x70000000 0x0 0x10000000>;
1032 + compatible = "renesas,mmngr";
1033 + memory-region = <&mmp_reserved>, <&lossy_decompress>;
1037 + compatible = "renesas,mmngrbuf";
1041 + compatible = "renesas,vspm_if";
1046 + vga_in: endpoint {
1047 + /delete-property/remote-endpoint;
1055 + adv7123_in: endpoint {
1056 + /delete-property/remote-endpoint;
1061 + adv7123_out: endpoint {
1062 + /delete-property/remote-endpoint;
1072 + memory-region = <&adsp_reserved>;
1076 + clocks = <&cpg CPG_MOD 724>,
1077 + <&cpg CPG_MOD 723>,
1078 + <&cpg CPG_MOD 722>,
1079 + <&cpg CPG_MOD 721>,
1084 + clock-names = "du.0", "du.1", "du.2", "du.3",
1085 + "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
1103 + dais = <&rsnd_port0 /* ak4613 */
1104 + &rsnd_port1 /* HDMI0 */
1105 + &rsnd_port2>; /* HDMI1 */
1114 + rcar_dw_hdmi0_out: endpoint {
1115 + remote-endpoint = <&hdmi0_con>;
1120 + dw_hdmi0_snd_in: endpoint {
1121 + remote-endpoint = <&rsnd_endpoint1>;
1128 + remote-endpoint = <&rcar_dw_hdmi0_out>;
1137 + rcar_dw_hdmi1_out: endpoint {
1138 + remote-endpoint = <&hdmi1_con>;
1143 + dw_hdmi1_snd_in: endpoint {
1144 + remote-endpoint = <&rsnd_endpoint2>;
1151 + remote-endpoint = <&rcar_dw_hdmi1_out>;
1165 + /* rsnd_port0 is on salvator-common */
1166 + rsnd_port1: port@1 {
1168 + rsnd_endpoint1: endpoint {
1169 + remote-endpoint = <&dw_hdmi0_snd_in>;
1171 + dai-format = "i2s";
1172 + bitclock-master = <&rsnd_endpoint1>;
1173 + frame-master = <&rsnd_endpoint1>;
1175 + playback = <&ssi2>;
1178 + rsnd_port2: port@2 {
1180 + rsnd_endpoint2: endpoint {
1181 + remote-endpoint = <&dw_hdmi1_snd_in>;
1183 + dai-format = "i2s";
1184 + bitclock-master = <&rsnd_endpoint2>;
1185 + frame-master = <&rsnd_endpoint2>;
1187 + playback = <&ssi3>;
1195 + groups = "usb2", "usb2_ovc";
1196 + function = "usb2";
1200 + * - On Salvator-X[S], GP6_3[01] are connected to ADV7482 as irq pins
1201 + * (when SW31 is the default setting on Salvator-XS).
1202 + * - If SW31 is the default setting, you cannot use USB2.0 ch3 on
1203 + * r8a7795 with Salvator-XS.
1204 + * Hence the SW31 setting must be changed like 2) below.
1205 + * 1) Default setting of SW31: ON-ON-OFF-OFF-OFF-OFF:
1206 + * - Connect GP6_3[01] to ADV7842.
1207 + * 2) Changed setting of SW31: OFF-OFF-ON-ON-ON-ON:
1208 + * - Connect GP6_3[01] to BD082065 (USB2.0 ch3's host power).
1209 + * - Connect GP6_{04,21} to ADV7842.
1211 + usb2_ch3_pins: usb2_ch3 {
1212 + groups = "usb2_ch3";
1213 + function = "usb2_ch3";
1218 + pinctrl-0 = <&usb2_pins>;
1219 + pinctrl-names = "default";
1225 + pinctrl-0 = <&usb2_ch3_pins>;
1226 + pinctrl-names = "default";
1247 +/* End r8a7795-salvator-xs.dts content */
1250 +/* Start r8a7795-salvator-xs-4x2g.dts content */
1253 + /* Map all possible DDR as inbound ranges */
1254 + dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
1258 + /* Map all possible DDR as inbound ranges */
1259 + dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
1262 +/* End r8a7795-salvator-xs-4x2g.dts content */
1265 +/* Start salvator-xs.dts content */
1268 + clock-frequency = <16640000>;
1272 + clock-frequency = <400000>;
1274 + versaclock6: clock-generator@6a {
1275 + compatible = "idt,5p49v6901";
1277 + #clock-cells = <1>;
1278 + clocks = <&x23_clk>;
1279 + clock-names = "xin";
1283 +/* End salvator-xs.dts content */
1286 +/* Start reference hardware specific tweaks */
1292 + /delete-property/remote-endpoint;
1298 + /delete-property/remote-endpoint;
1305 + status = "disabled";
1309 + status = "disabled";
1313 + clock-frequency = <0>;
1317 + /delete-property/ wp-gpios;
1322 + /delete-property/ wp-gpios;
1327 + /* Enable the CAN 1 & 2 transceivers */
1328 + can-1-transceiver-stb {
1330 + gpios = <21 GPIO_ACTIVE_HIGH>;
1333 + can-2-transceiver-stb {
1335 + gpios = <12 GPIO_ACTIVE_HIGH>;
1339 diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c
1340 index 87092ce5ba73..357c334113aa 100644
1341 --- a/drivers/media/i2c/adv748x/adv748x-core.c
1342 +++ b/drivers/media/i2c/adv748x/adv748x-core.c
1343 @@ -97,6 +97,21 @@ static const struct adv748x_register_map adv748x_default_addresses[] = {
1344 [ADV748X_PAGE_TXA] = { "txa", 0x4a },
1347 +static const struct adv748x_register_map adv748x_default_addresses2[] = {
1348 + [ADV748X_PAGE_IO] = { "main", 0x71 },
1349 + [ADV748X_PAGE_DPLL] = { "dpll", 0x27 },
1350 + [ADV748X_PAGE_CP] = { "cp", 0x23 },
1351 + [ADV748X_PAGE_HDMI] = { "hdmi", 0x35 },
1352 + [ADV748X_PAGE_EDID] = { "edid", 0x37 },
1353 + [ADV748X_PAGE_REPEATER] = { "repeater", 0x33 },
1354 + [ADV748X_PAGE_INFOFRAME] = { "infoframe", 0x28 },
1355 + [ADV748X_PAGE_CBUS] = { "cbus", 0x29 },
1356 + [ADV748X_PAGE_CEC] = { "cec", 0x42 },
1357 + [ADV748X_PAGE_SDP] = { "sdp", 0x78 },
1358 + [ADV748X_PAGE_TXB] = { "txb", 0x49 },
1359 + [ADV748X_PAGE_TXA] = { "txa", 0x4b },
1362 static int adv748x_read_check(struct adv748x_state *state,
1363 int client_page, u8 reg)
1365 @@ -183,10 +198,17 @@ static int adv748x_initialise_clients(struct adv748x_state *state)
1368 for (i = ADV748X_PAGE_DPLL; i < ADV748X_PAGE_MAX; ++i) {
1369 - state->i2c_clients[i] = i2c_new_ancillary_device(
1370 + if ((state->client->addr << 1) == 0xe0) {
1371 + state->i2c_clients[i] = i2c_new_ancillary_device(
1373 adv748x_default_addresses[i].name,
1374 adv748x_default_addresses[i].default_addr);
1376 + state->i2c_clients[i] = i2c_new_ancillary_device(
1378 + adv748x_default_addresses2[i].name,
1379 + adv748x_default_addresses2[i].default_addr);
1382 if (IS_ERR(state->i2c_clients[i])) {
1383 adv_err(state, "failed to create i2c client %u\n", i);