summaryrefslogtreecommitdiffstats
path: root/meta-agl-refhw-gen3/recipes-kernel/linux/files
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2020-10-21 18:04:18 -0400
committerScott Murray <scott.murray@konsulko.com>2020-10-21 18:21:39 -0400
commit5b115837394e7a408638c0d46cde1b689d03832f (patch)
tree242c4e67bcd8f74b37c85dd3b28a3a677d95470f /meta-agl-refhw-gen3/recipes-kernel/linux/files
parent6c4f90cb4b4175b7256baa04f82bb12c811fe5af (diff)
Rework for AGL UCB integration
Changes include: - The provided kernel patches have been reworked to not modify the salvator-x(s) devicetree source, but to introduce new files for the reference hardware instead. There is some possibility that the reference hardware devicetree could be based off the the salvator-x with some work and perhaps splitting of the salvator-x source, but for now the aim is to avoid breaking the salvator-x(s) with the reference hardware changes. - The modifications to the r8a7795 pinctrl driver have been replaced with a splitting of the USB interface OVC pins into their own pin groups, which has previously been done for other older Renesas hardware. This allows booting the reference hardware off of the same kernel as other H3 boards, at the expense of minor devicetree modifications for them (e.g. h3ulcb). There is likely some more work required if this needs to be upstreamed, as the ulcb.dtsi changes would mean that the pinctrl drivers for M3 would also need the new pin groups. - All changes for the ST asm330lhh driver addtion have been moved to that patch to the kernel. - A machine conf file has been added for "agl-refhw-h3", and the firmware documentation updated to document how to set up a build of the firmware using it. This is required due to the firmware options from this layer's arm-trusted-firmware bbappend not being compatible with other H3 boards (eMMC versus Hyperflash boot). A definition of the COMPATIBLE_MACHINE variable has been added to that bbappend to make sure that attempting to use it with another H3 machine will trigger an error. In AGL, the bbappend will need to be masked out with BBMASK for now. - The top-level README file has been updated to reflect the expected integration in AGL. Bug-AGL: SPEC-3658 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Diffstat (limited to 'meta-agl-refhw-gen3/recipes-kernel/linux/files')
-rw-r--r--meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-add-agl-refhw.patch1418
-rw-r--r--meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-create-r8a7795-usb-ovc-pinmux-groups.patch410
-rw-r--r--meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-Introduce-dts-file-for-refhw-r-car-board.patch90
-rw-r--r--meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-add-st_asm330lhh-driver.patch (renamed from meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-add-st_asm330lhh-driver.patch)0
-rw-r--r--meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-agl-reference-hardware-sample-bsp.patch846
5 files changed, 1828 insertions, 936 deletions
diff --git a/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-add-agl-refhw.patch b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-add-agl-refhw.patch
new file mode 100644
index 0000000..d6bf869
--- /dev/null
+++ b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-add-agl-refhw.patch
@@ -0,0 +1,1418 @@
+Add AGL reference hardware support
+
+Upstream-Status: pending
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
+---
+ arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi | 912 ++++++++++++++++++++++
+ arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts | 378 +++++++++
+ drivers/media/i2c/adv748x/adv748x-core.c | 48 +-
+ drivers/media/i2c/adv748x/adv748x.h | 12 +
+ 4 files changed, 1346 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
+new file mode 100644
+index 000000000000..a35cd24b27b9
+--- /dev/null
++++ b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi
+@@ -0,0 +1,912 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * Device Tree Source for common parts of AGL Reference Hardware board variants
++ *
++ * Copyright (C) 2015-2017 Renesas Electronics Corp.
++ * Copyright (C) 2020 Konsulko Group
++ */
++
++/*
++ * This file is derived from salvator-common.dtsi
++ *
++ * It is currently unclear if the modifications made are such that they could
++ * be done on top of salvator-common.dtsi to allow removing the duplication.
++ * It is likely that the common pieces with salvator-common.dtsi would need to
++ * be factored out into a new common file, which is perhaps hard to justify.
++ */
++
++/*
++ * SSI-AK4613
++ *
++ * This command is required when Playback/Capture
++ *
++ * amixer set "DVC Out" 100%
++ * amixer set "DVC In" 100%
++ *
++ * You can use Mute
++ *
++ * amixer set "DVC Out Mute" on
++ * amixer set "DVC In Mute" on
++ *
++ * You can use Volume Ramp
++ *
++ * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps"
++ * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
++ * amixer set "DVC Out Ramp" on
++ * aplay xxx.wav &
++ * amixer set "DVC Out" 80% // Volume Down
++ * amixer set "DVC Out" 100% // Volume Up
++ */
++
++#include <dt-bindings/gpio/gpio.h>
++
++/ {
++ aliases {
++ serial0 = &scif2;
++ serial1 = &scif1;
++ serial2 = &scif5;
++ serial3 = &hscif1;
++ serial4 = &hscif0;
++ serial5 = &hscif2;
++ ethernet0 = &avb;
++ };
++
++ chosen {
++ bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
++ stdout-path = "serial0:115200n8";
++ };
++
++ audio_clkout: audio-clkout {
++ /*
++ * This is same as <&rcar_sound 0>
++ * but needed to avoid cs2000/rcar_sound probe dead-lock
++ */
++ compatible = "fixed-clock";
++ #clock-cells = <0>;
++ clock-frequency = <12288000>;
++ };
++
++ avb-mch@ec5a0100 {
++ compatible = "renesas,avb-mch-gen3";
++ reg = <0 0xec5a0100 0 0x100>; /* ADG_AVB */
++ reg-name = "adg_avb";
++
++ clocks = <&cpg CPG_MOD 922>;
++ clock-names = "adg";
++ resets = <&cpg 922>;
++ };
++
++ hdmi0-in {
++ compatible = "hdmi-connector";
++ label = "HDMI0 IN";
++ type = "a";
++
++ port {
++ hdmi_in_con: endpoint {
++ remote-endpoint = <&adv7481_hdmi>;
++ };
++ };
++ };
++
++ hdmi2-in {
++ compatible = "hdmi-connector";
++ label = "HDMI2 IN";
++ type = "a";
++
++ port {
++ hdmi_in_con2: endpoint {
++ remote-endpoint = <&adv7481_hdmi2>;
++ };
++ };
++ };
++
++ reg_1p8v: regulator0 {
++ compatible = "regulator-fixed";
++ regulator-name = "fixed-1.8V";
++ regulator-min-microvolt = <1800000>;
++ regulator-max-microvolt = <1800000>;
++ regulator-boot-on;
++ regulator-always-on;
++ };
++
++ reg_3p3v: regulator1 {
++ compatible = "regulator-fixed";
++ regulator-name = "fixed-3.3V";
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++ regulator-boot-on;
++ regulator-always-on;
++ };
++
++ reg_12v: regulator2 {
++ compatible = "regulator-fixed";
++ regulator-name = "fixed-12V";
++ regulator-min-microvolt = <12000000>;
++ regulator-max-microvolt = <12000000>;
++ regulator-boot-on;
++ regulator-always-on;
++ };
++
++ sound_card: sound {
++ compatible = "audio-graph-card";
++
++ label = "rcar-sound";
++
++ dais = <&rsnd_port0>;
++ };
++
++ vcc_sdhi0: regulator-vcc-sdhi0 {
++ compatible = "regulator-fixed";
++
++ regulator-name = "SDHI0 Vcc";
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++
++ gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
++ enable-active-high;
++ };
++
++ vccq_sdhi0: regulator-vccq-sdhi0 {
++ compatible = "regulator-gpio";
++
++ regulator-name = "SDHI0 VccQ";
++ regulator-min-microvolt = <1800000>;
++ regulator-max-microvolt = <3300000>;
++
++ gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
++ gpios-states = <1>;
++ states = <3300000 1
++ 1800000 0>;
++ };
++
++ vcc_sdhi3: regulator-vcc-sdhi3 {
++ compatible = "regulator-fixed";
++
++ regulator-name = "SDHI3 Vcc";
++ regulator-min-microvolt = <3300000>;
++ regulator-max-microvolt = <3300000>;
++
++ gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>;
++ enable-active-high;
++ };
++
++ vccq_sdhi3: regulator-vccq-sdhi3 {
++ compatible = "regulator-gpio";
++
++ regulator-name = "SDHI3 VccQ";
++ regulator-min-microvolt = <1800000>;
++ regulator-max-microvolt = <3300000>;
++
++ gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
++ gpios-states = <1>;
++ states = <3300000 1
++ 1800000 0>;
++ };
++
++ hdmi0-out {
++ compatible = "hdmi-connector";
++ label = "HDMI0 OUT";
++ type = "a";
++
++ port {
++ hdmi0_con: endpoint {
++ };
++ };
++ };
++
++ hdmi1-out {
++ compatible = "hdmi-connector";
++ label = "HDMI1 OUT";
++ type = "a";
++
++ port {
++ hdmi1_con: endpoint {
++ };
++ };
++ };
++
++ x12_clk: x12 {
++ compatible = "fixed-clock";
++ #clock-cells = <0>;
++ clock-frequency = <24576000>;
++ };
++
++ /* External DU dot clocks */
++ x21_clk: x21-clock {
++ compatible = "fixed-clock";
++ #clock-cells = <0>;
++ clock-frequency = <33000000>;
++ };
++
++ x22_clk: x22-clock {
++ compatible = "fixed-clock";
++ #clock-cells = <0>;
++ clock-frequency = <33000000>;
++ };
++
++ x23_clk: x23-clock {
++ compatible = "fixed-clock";
++ #clock-cells = <0>;
++ clock-frequency = <25000000>;
++ };
++};
++
++&a57_0 {
++ cpu-supply = <&dvfs>;
++};
++
++&audio_clk_a {
++ clock-frequency = <22579200>;
++};
++
++&avb {
++ pinctrl-0 = <&avb_pins>;
++ pinctrl-names = "default";
++ phy-handle = <&phy0>;
++ phy-mode = "rgmii-txid";
++ status = "okay";
++
++ phy0: ethernet-phy@0 {
++ rxc-skew-ps = <1500>;
++ reg = <0>;
++ interrupt-parent = <&gpio2>;
++ interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
++ reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
++ };
++};
++
++&csi40 {
++ status = "okay";
++
++ ports {
++ port@0 {
++ reg = <0>;
++
++ csi40_in: endpoint {
++ clock-lanes = <0>;
++ data-lanes = <1 2 3 4>;
++ remote-endpoint = <&adv7481_txa>;
++ };
++ };
++ };
++};
++
++&csi41 {
++ status = "okay";
++
++ ports {
++ port@0 {
++ reg = <0>;
++
++ csi41_in: endpoint {
++ clock-lanes = <0>;
++ data-lanes = <1 2 3 4>;
++ remote-endpoint = <&adv7481_txa2>;
++ };
++ };
++ };
++};
++
++&du {
++ status = "okay";
++
++};
++
++&ehci0 {
++ dr_mode = "otg";
++ status = "okay";
++};
++
++&ehci1 {
++ status = "okay";
++};
++
++&extalr_clk {
++ clock-frequency = <32768>;
++};
++
++&hscif0 {
++ pinctrl-0 = <&hscif0_pins>;
++ pinctrl-names = "default";
++ uart-has-rtscts;
++
++ status = "okay";
++};
++
++&hscif1 {
++ pinctrl-0 = <&hscif1_pins>;
++ pinctrl-names = "default";
++
++ /* Please use exclusively to the scif1 node */
++ status = "okay";
++};
++
++&hscif2 {
++ pinctrl-0 = <&hscif2_pins>;
++ pinctrl-names = "default";
++
++ status = "okay";
++};
++
++&hsusb {
++ dr_mode = "otg";
++ status = "okay";
++};
++
++&i2c2 {
++ pinctrl-0 = <&i2c2_pins>;
++ pinctrl-names = "default";
++
++ status = "okay";
++
++ clock-frequency = <100000>;
++
++ video-receiver@70 {
++ compatible = "adi,adv7481";
++ reg = <0x70>;
++
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ interrupt-parent = <&gpio0>;
++ interrupt-names = "intrq1", "intrq3";
++ interrupts = <4 IRQ_TYPE_LEVEL_LOW>,
++ <5 IRQ_TYPE_LEVEL_LOW>;
++
++ port@8 {
++ reg = <8>;
++
++ adv7481_hdmi: endpoint {
++ remote-endpoint = <&hdmi_in_con>;
++ };
++ };
++
++ port@a {
++ reg = <10>;
++
++ adv7481_txa: endpoint {
++ clock-lanes = <0>;
++ data-lanes = <1 2 3 4>;
++ remote-endpoint = <&csi40_in>;
++ };
++ };
++
++ };
++
++ video-receiver@71 {
++ compatible = "adi,adv7481";
++ reg = <0x71>;
++
++ #address-cells = <1>;
++ #size-cells = <0>;
++
++ interrupt-parent = <&gpio6>;
++ interrupt-names = "intrq1", "intrq3";
++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>,
++ <1 IRQ_TYPE_LEVEL_LOW>;
++
++ port@8 {
++ reg = <8>;
++
++ adv7481_hdmi2: endpoint {
++ remote-endpoint = <&hdmi_in_con2>;
++ };
++ };
++
++ port@a {
++ reg = <10>;
++
++ adv7481_txa2: endpoint {
++ clock-lanes = <0>;
++ data-lanes = <1 2 3 4>;
++ remote-endpoint = <&csi41_in>;
++ };
++ };
++ };
++
++ cs2000: clk_multiplier@4f {
++ #clock-cells = <0>;
++ compatible = "cirrus,cs2000-cp";
++ reg = <0x4f>;
++ clocks = <&audio_clkout>, <&x12_clk>;
++ clock-names = "clk_in", "ref_clk";
++
++ assigned-clocks = <&cs2000>;
++ assigned-clock-rates = <24576000>; /* 1/1 divide */
++ };
++};
++
++&i2c3 {
++ pinctrl-0 = <&i2c3_pins>;
++ pinctrl-names = "default";
++
++ status = "okay";
++
++ clock-frequency = <100000>;
++
++ asm330lhh@6a {
++ compatible = "st,asm330lhh";
++ reg = <0x6a>;
++
++ interrupt-names = "int1", "int2";
++ interrupts = <&gpio6 23 IRQ_TYPE_EDGE_RISING>,
++ <&gpio2 6 IRQ_TYPE_EDGE_RISING>;
++ };
++};
++
++&i2c4 {
++ status = "okay";
++
++ versaclock5: clock-generator@68 {
++ compatible = "idt,9fgv0841";
++ reg = <0x68>;
++ #clock-cells = <1>;
++ clocks = <&x23_clk>;
++ clock-names = "xin";
++ };
++};
++
++&i2c5 {
++ pinctrl-0 = <&i2c5_pins>;
++ pinctrl-names = "default";
++
++ status = "okay";
++
++ clock-frequency = <100000>;
++
++ ak4613: codec@10 {
++ compatible = "asahi-kasei,ak4613";
++ #sound-dai-cells = <0>;
++ reg = <0x10>;
++ clocks = <&rcar_sound 3>;
++
++ asahi-kasei,in1-single-end;
++ asahi-kasei,in2-single-end;
++ asahi-kasei,out1-single-end;
++ asahi-kasei,out2-single-end;
++ asahi-kasei,out3-single-end;
++ asahi-kasei,out4-single-end;
++ asahi-kasei,out5-single-end;
++ asahi-kasei,out6-single-end;
++
++ port {
++ ak4613_endpoint: endpoint {
++ remote-endpoint = <&rsnd_endpoint0>;
++ };
++ };
++ };
++};
++
++&i2c_dvfs {
++ status = "okay";
++
++ clock-frequency = <400000>;
++
++ pmic: pmic@30 {
++ pinctrl-0 = <&irq0_pins>;
++ pinctrl-names = "default";
++
++ compatible = "rohm,bd9571mwv";
++ reg = <0x30>;
++ interrupt-parent = <&intc_ex>;
++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
++ interrupt-controller;
++ #interrupt-cells = <2>;
++ gpio-controller;
++ #gpio-cells = <2>;
++ rohm,ddr-backup-power = <0xf>;
++ rohm,rstbmode-level;
++
++ regulators {
++ dvfs: dvfs {
++ regulator-name = "dvfs";
++ regulator-min-microvolt = <750000>;
++ regulator-max-microvolt = <1030000>;
++ regulator-boot-on;
++ regulator-always-on;
++ };
++ };
++ };
++
++ eeprom@50 {
++ compatible = "rohm,br24t01", "atmel,24c01";
++ reg = <0x50>;
++ pagesize = <8>;
++ };
++};
++
++&ohci0 {
++ dr_mode = "otg";
++ status = "okay";
++};
++
++&ohci1 {
++ status = "okay";
++};
++
++&pcie_bus_clk {
++ clock-frequency = <100000000>;
++ status = "okay";
++};
++
++&pciec0 {
++ status = "okay";
++};
++
++&pciec1 {
++ status = "okay";
++};
++
++&canfd {
++ pinctrl-0 = <&canfd0_pins &canfd1_pins>;
++ pinctrl-names = "default";
++
++ status = "okay";
++
++ channel0 {
++ status = "okay";
++ };
++
++ channel1 {
++ status = "okay";
++ };
++};
++
++&pfc {
++ pinctrl-0 = <&scif_clk_pins>;
++ pinctrl-names = "default";
++
++ avb_pins: avb {
++ mux {
++ groups = "avb_link", "avb_mdio", "avb_mii";
++ function = "avb";
++ };
++
++ pins_mdio {
++ groups = "avb_mdio";
++ drive-strength = <24>;
++ };
++
++ pins_mii_tx {
++ pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0",
++ "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3";
++ drive-strength = <12>;
++ };
++ };
++
++ hscif0_pins: hscif0 {
++ groups = "hscif0_data", "hscif0_ctrl";
++ function = "hscif0";
++ };
++
++ hscif1_pins: hscif1 {
++ groups = "hscif1_data_a";
++ function = "hscif1";
++ };
++
++ hscif2_pins: hscif2 {
++ groups = "hscif2_data_c";
++ function = "hscif2";
++ };
++
++ i2c2_pins: i2c2 {
++ groups = "i2c2_a";
++ function = "i2c2";
++ };
++
++ i2c3_pins: i2c3 {
++ groups = "i2c3";
++ function = "i2c3";
++ };
++
++ i2c5_pins: i2c5 {
++ groups = "i2c5";
++ function = "i2c5";
++ };
++
++ irq0_pins: irq0 {
++ groups = "intc_ex_irq0";
++ function = "intc_ex";
++ };
++
++ scif1_pins: scif1 {
++ groups = "scif1_data_b";
++ function = "scif1";
++ };
++
++ scif2_pins: scif2 {
++ groups = "scif2_data_a";
++ function = "scif2";
++ };
++
++ scif5_pins: scif5 {
++ groups = "scif5_data_a";
++ function = "scif5";
++ };
++
++ scif_clk_pins: scif_clk {
++ groups = "scif_clk_a";
++ function = "scif_clk";
++ };
++
++ sdhi0_pins: sd0 {
++ groups = "sdhi0_data4", "sdhi0_ctrl";
++ function = "sdhi0";
++ power-source = <3300>;
++ };
++
++ sdhi0_pins_uhs: sd0_uhs {
++ groups = "sdhi0_data4", "sdhi0_ctrl";
++ function = "sdhi0";
++ power-source = <1800>;
++ };
++
++ sdhi2_pins: sd2 {
++ groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
++ function = "sdhi2";
++ power-source = <3300>;
++ };
++
++ sdhi2_pins_uhs: sd2_uhs {
++ groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
++ function = "sdhi2";
++ power-source = <1800>;
++ };
++
++ sdhi3_pins: sd3 {
++ groups = "sdhi3_data4", "sdhi3_ctrl";
++ function = "sdhi3";
++ power-source = <3300>;
++ };
++
++ sdhi3_pins_uhs: sd3_uhs {
++ groups = "sdhi3_data4", "sdhi3_ctrl";
++ function = "sdhi3";
++ power-source = <1800>;
++ };
++
++ sound_pins: sound {
++ groups = "ssi349_ctrl", "ssi3_data", "ssi4_data";
++ function = "ssi";
++ };
++
++ sound_clk_pins: sound_clk {
++ groups = "audio_clk_a_a", "audio_clk_b_a",
++ "audio_clkout_a", "audio_clkout3_b";
++ function = "audio_clk";
++ };
++
++ usb0_pins: usb0 {
++ groups = "usb0";
++ function = "usb0";
++ };
++
++ usb1_pins: usb1 {
++ groups = "usb1";
++ function = "usb1";
++ };
++
++ usb30_pins: usb30 {
++ groups = "usb30", "usb30_ovc";
++ function = "usb30";
++ };
++
++ canfd0_pins: canfd0 {
++ groups = "canfd0_data_a";
++ function = "canfd0";
++ };
++
++ canfd1_pins: canfd1 {
++ groups = "canfd1_data";
++ function = "canfd1";
++ };
++};
++
++&rcar_sound {
++ pinctrl-0 = <&sound_pins &sound_clk_pins>;
++ pinctrl-names = "default";
++
++ /* Single DAI */
++ #sound-dai-cells = <0>;
++
++ /* audio_clkout0/1/2/3 */
++ #clock-cells = <1>;
++ clock-frequency = <12288000 11289600>;
++
++ status = "okay";
++
++ /* update <audio_clk_b> to <cs2000> */
++ clocks = <&cpg CPG_MOD 1005>,
++ <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
++ <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
++ <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
++ <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
++ <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
++ <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
++ <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
++ <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
++ <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
++ <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
++ <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
++ <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
++ <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
++ <&audio_clk_a>, <&cs2000>,
++ <&audio_clk_c>,
++ <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
++
++ ports {
++ #address-cells = <1>;
++ #size-cells = <0>;
++ rsnd_port0: port@0 {
++ reg = <0>;
++ rsnd_endpoint0: endpoint {
++ remote-endpoint = <&ak4613_endpoint>;
++
++ dai-format = "left_j";
++ bitclock-master = <&rsnd_endpoint0>;
++ frame-master = <&rsnd_endpoint0>;
++
++ playback = <&ssi3>; //ssi0 -> ssi3
++ capture = <&ssi4>; //ssi1 -> ssi4
++ };
++ };
++ };
++};
++
++&rwdt {
++ timeout-sec = <60>;
++ status = "okay";
++};
++
++&scif1 {
++ pinctrl-0 = <&scif1_pins>;
++ pinctrl-names = "default";
++
++ uart-has-rtscts;
++ /* Please use exclusively to the hscif1 node */
++ status = "okay";
++};
++
++&scif2 {
++ pinctrl-0 = <&scif2_pins>;
++ pinctrl-names = "default";
++
++ status = "okay";
++};
++
++&scif5 {
++ pinctrl-0 = <&scif5_pins>;
++ pinctrl-names = "default";
++
++ status = "okay";
++};
++
++&scif_clk {
++ clock-frequency = <14745600>;
++};
++
++&sdhi0 {
++ pinctrl-0 = <&sdhi0_pins>;
++ pinctrl-1 = <&sdhi0_pins_uhs>;
++ pinctrl-names = "default", "state_uhs";
++
++ vmmc-supply = <&vcc_sdhi0>;
++ vqmmc-supply = <&vccq_sdhi0>;
++ cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
++ wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
++ bus-width = <4>;
++ sd-uhs-sdr50;
++ sd-uhs-sdr104;
++ status = "okay";
++};
++
++&sdhi2 {
++ /* used for on-board 8bit eMMC */
++ pinctrl-0 = <&sdhi2_pins>;
++ pinctrl-1 = <&sdhi2_pins_uhs>;
++ pinctrl-names = "default", "state_uhs";
++
++ iommus = <&ipmmu_ds1 34>;
++
++ vmmc-supply = <&reg_3p3v>;
++ vqmmc-supply = <&reg_1p8v>;
++ bus-width = <8>;
++ mmc-hs200-1_8v;
++ mmc-hs400-1_8v;
++ no-sd;
++ no-sdio;
++ non-removable;
++ fixed-emmc-driver-type = <1>;
++ status = "okay";
++};
++
++&sdhi3 {
++ pinctrl-0 = <&sdhi3_pins>;
++ pinctrl-1 = <&sdhi3_pins_uhs>;
++ pinctrl-names = "default", "state_uhs";
++
++ vmmc-supply = <&vcc_sdhi3>;
++ vqmmc-supply = <&vccq_sdhi3>;
++ cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
++ wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
++ bus-width = <4>;
++ sd-uhs-sdr50;
++ sd-uhs-sdr104;
++ status = "okay";
++};
++
++&ssi4 {
++ shared-pin;
++};
++
++&usb_extal_clk {
++ clock-frequency = <50000000>;
++};
++
++&usb2_phy0 {
++ pinctrl-0 = <&usb0_pins>;
++ pinctrl-names = "default";
++
++ status = "okay";
++};
++
++&usb2_phy1 {
++ pinctrl-0 = <&usb1_pins>;
++ pinctrl-names = "default";
++
++ status = "okay";
++};
++
++&usb3_peri0 {
++ phys = <&usb3_phy0>;
++ phy-names = "usb";
++
++ status = "okay";
++};
++
++&usb3_phy0 {
++ status = "okay";
++};
++
++&usb3s0_clk {
++ clock-frequency = <100000000>;
++};
++
++&vin0 {
++ status = "okay";
++};
++
++&vin1 {
++ status = "okay";
++};
++
++&vin2 {
++ status = "okay";
++};
++
++&vin3 {
++ status = "okay";
++};
++
++&vin4 {
++ status = "okay";
++};
++
++&vin5 {
++ status = "okay";
++};
++
++&vin6 {
++ status = "okay";
++};
++
++&vin7 {
++ status = "okay";
++};
++
++&xhci0 {
++ pinctrl-0 = <&usb30_pins>;
++ pinctrl-names = "default";
++
++ status = "okay";
++};
+diff --git a/arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts b/arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts
+new file mode 100644
+index 000000000000..0a63d2e7a64b
+--- /dev/null
++++ b/arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts
+@@ -0,0 +1,378 @@
++/*
++ * Device Tree Source for the AGL reference hardware board with R-Car H3 ES3.0
++ *
++ * Copyright (C) 2019 Panasonic Corp.
++ * Copyright (C) 2020 Konsulko Group
++ *
++ * This file is licensed under the terms of the GNU General Public License
++ * version 2. This program is licensed "as is" without any warranty of any
++ * kind, whether express or implied.
++ */
++
++/*
++ * This file is for the most part derived from:
++ *
++ * - r8a7795-salvator-xs-4x2g.dts
++ * - r8a7795-salvator-xs.dts
++ * - salvator-xs.dtsi
++ *
++ * With agl-refhw-common.dtsi replacing (and derived from) salvator-common.dtsi.
++ */
++
++/dts-v1/;
++#include "r8a7795.dtsi"
++#include "agl-refhw-common.dtsi"
++
++/ {
++ model = "AGL Reference Hardware based on r8a7795 ES3.0+ with 8GiB (4 x 2 GiB)";
++ compatible = "agl,refhw-h3", "renesas,r8a7795";
++
++ memory@48000000 {
++ device_type = "memory";
++ /* first 128MB is reserved for secure area. */
++ reg = <0x0 0x48000000 0x0 0x78000000>;
++ };
++
++ memory@500000000 {
++ device_type = "memory";
++ reg = <0x5 0x00000000 0x0 0x80000000>;
++ };
++
++ memory@600000000 {
++ device_type = "memory";
++ reg = <0x6 0x00000000 0x0 0x80000000>;
++ };
++
++ memory@700000000 {
++ device_type = "memory";
++ reg = <0x7 0x00000000 0x0 0x80000000>;
++ };
++
++ reserved-memory {
++ #address-cells = <2>;
++ #size-cells = <2>;
++ ranges;
++
++ /* device specific region for Lossy Decompression */
++ lossy_decompress: linux,lossy_decompress@54000000 {
++ no-map;
++ reg = <0x00000000 0x54000000 0x0 0x03000000>;
++ };
++
++ /* For Audio DSP */
++ adsp_reserved: linux,adsp@57000000 {
++ compatible = "shared-dma-pool";
++ reusable;
++ reg = <0x00000000 0x57000000 0x0 0x01000000>;
++ };
++
++ /* global autoconfigured region for contiguous allocations */
++ linux,cma@58000000 {
++ compatible = "shared-dma-pool";
++ reusable;
++ reg = <0x00000000 0x58000000 0x0 0x18000000>;
++ linux,cma-default;
++ };
++
++ /* device specific region for contiguous allocations */
++ mmp_reserved: linux,multimedia@70000000 {
++ compatible = "shared-dma-pool";
++ reusable;
++ reg = <0x00000000 0x70000000 0x0 0x10000000>;
++ };
++ };
++
++ mmngr {
++ compatible = "renesas,mmngr";
++ memory-region = <&mmp_reserved>, <&lossy_decompress>;
++ };
++
++ mmngrbuf {
++ compatible = "renesas,mmngrbuf";
++ };
++
++ vspm_if {
++ compatible = "renesas,vspm_if";
++ };
++
++ vga {
++ port {
++ vga_in: endpoint {
++ /delete-property/remote-endpoint;
++ };
++ };
++ };
++
++ vga-encoder {
++ ports {
++ port@0 {
++ adv7123_in: endpoint {
++ /delete-property/remote-endpoint;
++ };
++ };
++
++ port@1 {
++ adv7123_out: endpoint {
++ /delete-property/remote-endpoint;
++ };
++ };
++ };
++ };
++
++};
++
++&adsp {
++ status = "okay";
++ memory-region = <&adsp_reserved>;
++};
++
++&du {
++ clocks = <&cpg CPG_MOD 724>,
++ <&cpg CPG_MOD 723>,
++ <&cpg CPG_MOD 722>,
++ <&cpg CPG_MOD 721>,
++ <&versaclock6 1>,
++ <&x21_clk>,
++ <&x22_clk>,
++ <&versaclock6 2>;
++ clock-names = "du.0", "du.1", "du.2", "du.3",
++ "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
++};
++
++&ehci2 {
++ status = "okay";
++};
++
++&ehci3 {
++ dr_mode = "otg";
++ status = "okay";
++};
++
++&hsusb3 {
++ dr_mode = "otg";
++ status = "okay";
++};
++
++&sound_card {
++ dais = <&rsnd_port0 /* ak4613 */
++ &rsnd_port1 /* HDMI0 */
++ &rsnd_port2>; /* HDMI1 */
++};
++
++&hdmi0 {
++ status = "okay";
++
++ ports {
++ port@1 {
++ reg = <1>;
++ rcar_dw_hdmi0_out: endpoint {
++ remote-endpoint = <&hdmi0_con>;
++ };
++ };
++ port@2 {
++ reg = <2>;
++ dw_hdmi0_snd_in: endpoint {
++ remote-endpoint = <&rsnd_endpoint1>;
++ };
++ };
++ };
++};
++
++&hdmi0_con {
++ remote-endpoint = <&rcar_dw_hdmi0_out>;
++};
++
++&hdmi1 {
++ status = "okay";
++
++ ports {
++ port@1 {
++ reg = <1>;
++ rcar_dw_hdmi1_out: endpoint {
++ remote-endpoint = <&hdmi1_con>;
++ };
++ };
++ port@2 {
++ reg = <2>;
++ dw_hdmi1_snd_in: endpoint {
++ remote-endpoint = <&rsnd_endpoint2>;
++ };
++ };
++ };
++};
++
++&hdmi1_con {
++ remote-endpoint = <&rcar_dw_hdmi1_out>;
++};
++
++&ohci2 {
++ status = "okay";
++};
++
++&ohci3 {
++ dr_mode = "otg";
++ status = "okay";
++};
++
++&rcar_sound {
++ ports {
++ /* rsnd_port0 is on salvator-common */
++ rsnd_port1: port@1 {
++ reg = <1>;
++ rsnd_endpoint1: endpoint {
++ remote-endpoint = <&dw_hdmi0_snd_in>;
++
++ dai-format = "i2s";
++ bitclock-master = <&rsnd_endpoint1>;
++ frame-master = <&rsnd_endpoint1>;
++
++ playback = <&ssi2>;
++ };
++ };
++ rsnd_port2: port@2 {
++ reg = <2>;
++ rsnd_endpoint2: endpoint {
++ remote-endpoint = <&dw_hdmi1_snd_in>;
++
++ dai-format = "i2s";
++ bitclock-master = <&rsnd_endpoint2>;
++ frame-master = <&rsnd_endpoint2>;
++
++ playback = <&ssi3>;
++ };
++ };
++ };
++};
++
++&pfc {
++ usb2_pins: usb2 {
++ groups = "usb2", "usb2_ovc";
++ function = "usb2";
++ };
++
++ /*
++ * - On Salvator-X[S], GP6_3[01] are connected to ADV7482 as irq pins
++ * (when SW31 is the default setting on Salvator-XS).
++ * - If SW31 is the default setting, you cannot use USB2.0 ch3 on
++ * r8a7795 with Salvator-XS.
++ * Hence the SW31 setting must be changed like 2) below.
++ * 1) Default setting of SW31: ON-ON-OFF-OFF-OFF-OFF:
++ * - Connect GP6_3[01] to ADV7842.
++ * 2) Changed setting of SW31: OFF-OFF-ON-ON-ON-ON:
++ * - Connect GP6_3[01] to BD082065 (USB2.0 ch3's host power).
++ * - Connect GP6_{04,21} to ADV7842.
++ */
++ usb2_ch3_pins: usb2_ch3 {
++ groups = "usb2_ch3";
++ function = "usb2_ch3";
++ };
++};
++
++&usb2_phy2 {
++ pinctrl-0 = <&usb2_pins>;
++ pinctrl-names = "default";
++
++ status = "okay";
++};
++
++&usb2_phy3 {
++ pinctrl-0 = <&usb2_ch3_pins>;
++ pinctrl-names = "default";
++
++ status = "okay";
++};
++
++&vspbc {
++ status = "okay";
++};
++
++&vspbd {
++ status = "okay";
++};
++
++&vspi0 {
++ status = "okay";
++};
++
++&vspi1 {
++ status = "okay";
++};
++
++/* End r8a7795-salvator-xs.dts content */
++
++
++/* Start r8a7795-salvator-xs-4x2g.dts content */
++
++&pciec0 {
++ /* Map all possible DDR as inbound ranges */
++ dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
++};
++
++&pciec1 {
++ /* Map all possible DDR as inbound ranges */
++ dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000>;
++};
++
++/* End r8a7795-salvator-xs-4x2g.dts content */
++
++
++/* Start salvator-xs.dts content */
++
++&extal_clk {
++ clock-frequency = <16640000>;
++};
++
++&i2c4 {
++ clock-frequency = <400000>;
++
++ versaclock6: clock-generator@6a {
++ compatible = "idt,5p49v6901";
++ reg = <0x6a>;
++ #clock-cells = <1>;
++ clocks = <&x23_clk>;
++ clock-names = "xin";
++ };
++};
++
++/* End salvator-xs.dts content */
++
++
++/* Start reference hardware specific tweaks */
++
++&du {
++ ports {
++ port@0 {
++ endpoint {
++ /delete-property/remote-endpoint;
++ };
++ };
++
++ port@3 {
++ endpoint {
++ /delete-property/remote-endpoint;
++ };
++ };
++ };
++};
++
++&lvds0 {
++ status = "disabled";
++};
++
++&pwm1 {
++ status = "disabled";
++};
++
++&scif_clk {
++ clock-frequency = <0>;
++};
++
++&sdhi0 {
++ /delete-property/ wp-gpios;
++ non-removable;
++};
++
++&sdhi3 {
++ /delete-property/ wp-gpios;
++ non-removable;
++};
+diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c
+index da8f0621a10b..c2b37f70f711 100644
+--- a/drivers/media/i2c/adv748x/adv748x-core.c
++++ b/drivers/media/i2c/adv748x/adv748x-core.c
+@@ -165,6 +165,21 @@ static int adv748x_i2c_addresses[ADV748X_PAGE_MAX] = {
+ ADV748X_I2C_TXA,
+ };
+
++/* Default addresses for the I2C pages 0x71*/
++static int adv748x_i2c_addresses2[ADV748X_PAGE_MAX] = {
++ ADV748X_I2C_IO2,
++ ADV748X_I2C_DPLL2,
++ ADV748X_I2C_CP2,
++ ADV748X_I2C_HDMI2,
++ ADV748X_I2C_EDID2,
++ ADV748X_I2C_REPEATER2,
++ ADV748X_I2C_INFOFRAME2,
++ ADV748X_I2C_CEC2,
++ ADV748X_I2C_SDP2,
++ ADV748X_I2C_TXB2,
++ ADV748X_I2C_TXA2,
++};
++
+ static int adv748x_read_check(struct adv748x_state *state,
+ int client_page, u8 reg)
+ {
+@@ -238,9 +253,16 @@ static int adv748x_initialise_clients(struct adv748x_state *state)
+ int ret;
+
+ for (i = ADV748X_PAGE_DPLL; i < ADV748X_PAGE_MAX; ++i) {
+- state->i2c_clients[i] =
+- adv748x_dummy_client(state, adv748x_i2c_addresses[i],
+- ADV748X_IO_SLAVE_ADDR_BASE + i);
++ if((state->client->addr << 1) == 0xe0) {
++ state->i2c_clients[i] =
++ adv748x_dummy_client(state, adv748x_i2c_addresses[i],
++ ADV748X_IO_SLAVE_ADDR_BASE + i);
++ } else {
++ state->i2c_clients[i] =
++ adv748x_dummy_client(state, adv748x_i2c_addresses2[i],
++ ADV748X_IO_SLAVE_ADDR_BASE + i);
++ }
++
+ if (state->i2c_clients[i] == NULL) {
+ adv_err(state, "failed to create i2c client %u\n", i);
+ return -ENOMEM;
+@@ -508,6 +530,20 @@ static const struct adv748x_reg_value adv748x_set_slave_address[] = {
+ {ADV748X_PAGE_EOR, 0xff, 0xff} /* End of register table */
+ };
+
++static const struct adv748x_reg_value adv748x_set_slave_address2[] = {
++ {ADV748X_PAGE_IO, 0xf3, ADV748X_I2C_DPLL2 << 1},
++ {ADV748X_PAGE_IO, 0xf4, ADV748X_I2C_CP2 << 1},
++ {ADV748X_PAGE_IO, 0xf5, ADV748X_I2C_HDMI2 << 1},
++ {ADV748X_PAGE_IO, 0xf6, ADV748X_I2C_EDID2 << 1},
++ {ADV748X_PAGE_IO, 0xf7, ADV748X_I2C_REPEATER2 << 1},
++ {ADV748X_PAGE_IO, 0xf8, ADV748X_I2C_INFOFRAME2 << 1},
++ {ADV748X_PAGE_IO, 0xfa, ADV748X_I2C_CEC2 << 1},
++ {ADV748X_PAGE_IO, 0xfb, ADV748X_I2C_SDP2 << 1},
++ {ADV748X_PAGE_IO, 0xfc, ADV748X_I2C_TXB2 << 1},
++ {ADV748X_PAGE_IO, 0xfd, ADV748X_I2C_TXA2 << 1},
++ {ADV748X_PAGE_EOR, 0xff, 0xff} /* End of register table */
++};
++
+ /* Supported Formats For Script Below */
+ /* - 01-29 HDMI to MIPI TxA CSI 4-Lane - RGB888: */
+ static const struct adv748x_reg_value adv748x_init_txa_4lane[] = {
+@@ -683,7 +719,11 @@ static int adv748x_reset(struct adv748x_state *state)
+ if (ret < 0)
+ return ret;
+
+- ret = adv748x_write_regs(state, adv748x_set_slave_address);
++ if((state->client->addr << 1) == 0xe0) {
++ ret = adv748x_write_regs(state, adv748x_set_slave_address); //i2c address 0x70
++ } else {
++ ret = adv748x_write_regs(state, adv748x_set_slave_address2); //i2c address 0x71
++ }
+ if (ret < 0)
+ return ret;
+
+diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h
+index fb30bfade946..ac50a9e41b08 100644
+--- a/drivers/media/i2c/adv748x/adv748x.h
++++ b/drivers/media/i2c/adv748x/adv748x.h
+@@ -40,6 +40,18 @@
+ #define ADV748X_I2C_TXB 0x48 /* CSI-TXB Map */
+ #define ADV748X_I2C_TXA 0x4a /* CSI-TXA Map */
+
++#define ADV748X_I2C_IO2 0x71 /* IO Map */
++#define ADV748X_I2C_DPLL2 0x27 /* DPLL Map */
++#define ADV748X_I2C_CP2 0x23 /* CP Map */
++#define ADV748X_I2C_HDMI2 0x35 /* HDMI Map */
++#define ADV748X_I2C_EDID2 0x37 /* EDID Map */
++#define ADV748X_I2C_REPEATER2 0x33 /* HDMI RX Repeater Map */
++#define ADV748X_I2C_INFOFRAME2 0x30 /* HDMI RX InfoFrame Map */
++#define ADV748X_I2C_CEC2 0x42 /* CEC Map */
++#define ADV748X_I2C_SDP2 0x78 /* SDP Map */
++#define ADV748X_I2C_TXB2 0x49 /* CSI-TXB Map */
++#define ADV748X_I2C_TXA2 0x4b /* CSI-TXA Map */
++
+ enum adv748x_page {
+ ADV748X_PAGE_IO,
+ ADV748X_PAGE_DPLL,
diff --git a/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-create-r8a7795-usb-ovc-pinmux-groups.patch b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-create-r8a7795-usb-ovc-pinmux-groups.patch
new file mode 100644
index 0000000..da49e7f
--- /dev/null
+++ b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-create-r8a7795-usb-ovc-pinmux-groups.patch
@@ -0,0 +1,410 @@
+Create r8a7795 USB OVC pin groups
+
+Split the r8a7795 USB pin groups to create separate groups for the
+OVC pins. This is required for the AGL reference hardware boards,
+which use some of the OVC pins in other pinmux modes.
+
+Upstream-Status: pending
+
+Signed-off-by: Scott Murray <scott.murray@konsulko.com>
+
+---
+ .../boot/dts/renesas/r8a7795-es1-salvator-x.dts | 2 +-
+ arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 2 +-
+ .../arm64/boot/dts/renesas/r8a7795-salvator-xs.dts | 4 +-
+ arch/arm64/boot/dts/renesas/salvator-common.dtsi | 6 +-
+ arch/arm64/boot/dts/renesas/ulcb-kf.dtsi | 2 +-
+ arch/arm64/boot/dts/renesas/ulcb.dtsi | 2 +-
+ drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c | 75 +++++++++++++++++-----
+ drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 75 +++++++++++++++++-----
+ 8 files changed, 129 insertions(+), 39 deletions(-)
+
+diff --git a/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
+index 5c3935ef4fb9..07d3f03274e3 100644
+--- a/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
++++ b/arch/arm64/boot/dts/renesas/r8a7795-es1-salvator-x.dts
+@@ -202,7 +202,7 @@
+
+ &pfc {
+ usb2_pins: usb2 {
+- groups = "usb2";
++ groups = "usb2", "usb2_ovc";
+ function = "usb2";
+ };
+ };
+diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+index 6928afbd8e06..9c229b1bbb59 100644
+--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
++++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+@@ -202,7 +202,7 @@
+
+ &pfc {
+ usb2_pins: usb2 {
+- groups = "usb2";
++ groups = "usb2", "usb2_ovc";
+ function = "usb2";
+ };
+ };
+diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
+index 498f78875dbd..abd1d480292e 100644
+--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
++++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
+@@ -217,7 +217,7 @@
+
+ &pfc {
+ usb2_pins: usb2 {
+- groups = "usb2";
++ groups = "usb2", "usb2_ovc";
+ function = "usb2";
+ };
+
+@@ -234,7 +234,7 @@
+ * - Connect GP6_{04,21} to ADV7842.
+ */
+ usb2_ch3_pins: usb2_ch3 {
+- groups = "usb2_ch3";
++ groups = "usb2_ch3", "usb2_ch3_ovc";
+ function = "usb2_ch3";
+ };
+ };
+diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
+index 878ed7caca77..a9e2d0a02fe1 100644
+--- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi
++++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
+@@ -690,13 +690,13 @@
+ };
+
+ usb0_pins: usb0 {
+- groups = "usb0";
++ groups = "usb0", "usb0_ovc";
+ function = "usb0";
+ };
+
+ usb1_pins: usb1 {
+ mux {
+- groups = "usb1";
++ groups = "usb1", "usb1_ovc";
+ function = "usb1";
+ };
+
+@@ -712,7 +712,7 @@
+ };
+
+ usb30_pins: usb30 {
+- groups = "usb30";
++ groups = "usb30", "usb30_ovc";
+ function = "usb30";
+ };
+ };
+diff --git a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
+index 1b316d79df88..9d44b5ef4f63 100644
+--- a/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
++++ b/arch/arm64/boot/dts/renesas/ulcb-kf.dtsi
+@@ -170,7 +170,7 @@
+ };
+
+ usb0_pins: usb0 {
+- groups = "usb0";
++ groups = "usb0", "usb0_ovc";
+ function = "usb0";
+ };
+ };
+diff --git a/arch/arm64/boot/dts/renesas/ulcb.dtsi b/arch/arm64/boot/dts/renesas/ulcb.dtsi
+index b60fd45f0a17..6f054ab8e611 100644
+--- a/arch/arm64/boot/dts/renesas/ulcb.dtsi
++++ b/arch/arm64/boot/dts/renesas/ulcb.dtsi
+@@ -366,7 +366,7 @@
+ };
+
+ usb1_pins: usb1 {
+- groups = "usb1";
++ groups = "usb1", "usb1_ovc";
+ function = "usb1";
+ };
+ };
+diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c
+index 9f302f60297f..55f99fe4d8ac 100644
+--- a/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c
++++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795-es1.c
+@@ -3822,44 +3822,79 @@ static const unsigned int tmu_tclk2_b_mux[] = {
+
+ /* - USB0 ------------------------------------------------------------------- */
+ static const unsigned int usb0_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
++ /* PWEN */
++ RCAR_GP_PIN(6, 24),
+ };
+ static const unsigned int usb0_mux[] = {
+- USB0_PWEN_MARK, USB0_OVC_MARK,
++ USB0_PWEN_MARK,
++};
++static const unsigned int usb0_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 25),
++};
++static const unsigned int usb0_ovc_mux[] = {
++ USB0_OVC_MARK,
+ };
+ /* - USB1 ------------------------------------------------------------------- */
+ static const unsigned int usb1_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
++ /* PWEN */
++ RCAR_GP_PIN(6, 26),
+ };
+ static const unsigned int usb1_mux[] = {
+- USB1_PWEN_MARK, USB1_OVC_MARK,
++ USB1_PWEN_MARK,
++};
++static const unsigned int usb1_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 27),
++};
++static const unsigned int usb1_ovc_mux[] = {
++ USB1_OVC_MARK,
+ };
+ /* - USB2 ------------------------------------------------------------------- */
+ static const unsigned int usb2_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15),
++ /* PWEN */
++ RCAR_GP_PIN(6, 14),
+ };
+ static const unsigned int usb2_mux[] = {
+- USB2_PWEN_MARK, USB2_OVC_MARK,
++ USB2_PWEN_MARK,
++};
++static const unsigned int usb2_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 15),
++};
++static const unsigned int usb2_ovc_mux[] = {
++ USB2_OVC_MARK,
+ };
+
+ /* - USB30 ------------------------------------------------------------------ */
+ static const unsigned int usb30_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 28), RCAR_GP_PIN(6, 29),
++ /* PWEN */
++ RCAR_GP_PIN(6, 28),
+ };
+ static const unsigned int usb30_mux[] = {
+- USB30_PWEN_MARK, USB30_OVC_MARK,
++ USB30_PWEN_MARK,
++};
++static const unsigned int usb30_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 29),
++};
++static const unsigned int usb30_ovc_mux[] = {
++ USB30_OVC_MARK,
+ };
+ /* - USB31 ------------------------------------------------------------------ */
+ static const unsigned int usb31_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 30), RCAR_GP_PIN(6, 31),
++ /* PWEN */
++ RCAR_GP_PIN(6, 30),
+ };
+ static const unsigned int usb31_mux[] = {
+- USB31_PWEN_MARK, USB31_OVC_MARK,
++ USB31_PWEN_MARK,
++};
++static const unsigned int usb31_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 31),
++};
++static const unsigned int usb31_ovc_mux[] = {
++ USB31_OVC_MARK,
+ };
+
+ /* - VIN4 ------------------------------------------------------------------- */
+@@ -4486,10 +4521,15 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
+ SH_PFC_PIN_GROUP(tmu_tclk2_a),
+ SH_PFC_PIN_GROUP(tmu_tclk2_b),
+ SH_PFC_PIN_GROUP(usb0),
++ SH_PFC_PIN_GROUP(usb0_ovc),
+ SH_PFC_PIN_GROUP(usb1),
++ SH_PFC_PIN_GROUP(usb1_ovc),
+ SH_PFC_PIN_GROUP(usb2),
++ SH_PFC_PIN_GROUP(usb2_ovc),
+ SH_PFC_PIN_GROUP(usb30),
++ SH_PFC_PIN_GROUP(usb30_ovc),
+ SH_PFC_PIN_GROUP(usb31),
++ SH_PFC_PIN_GROUP(usb31_ovc),
+ SH_PFC_PIN_GROUP(vin4_data8_a),
+ SH_PFC_PIN_GROUP(vin4_data16_a),
+ SH_PFC_PIN_GROUP(vin4_data18_a),
+@@ -4977,22 +5017,27 @@ static const char * const tmu_groups[] = {
+
+ static const char * const usb0_groups[] = {
+ "usb0",
++ "usb0_ovc",
+ };
+
+ static const char * const usb1_groups[] = {
+ "usb1",
++ "usb1_ovc",
+ };
+
+ static const char * const usb2_groups[] = {
+ "usb2",
++ "usb2_ovc",
+ };
+
+ static const char * const usb30_groups[] = {
+ "usb30",
++ "usb30_ovc",
+ };
+
+ static const char * const usb31_groups[] = {
+ "usb31",
++ "usb31_ovc",
+ };
+
+ static const char * const vin4_groups[] = {
+diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
+index 3ebe8deb24d6..745f93884fe1 100644
+--- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
++++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
+@@ -3911,44 +3911,79 @@ static const unsigned int tmu_tclk2_b_mux[] = {
+
+ /* - USB0 ------------------------------------------------------------------- */
+ static const unsigned int usb0_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
++ /* PWEN */
++ RCAR_GP_PIN(6, 24),
+ };
+ static const unsigned int usb0_mux[] = {
+- USB0_PWEN_MARK, USB0_OVC_MARK,
++ USB0_PWEN_MARK,
++};
++static const unsigned int usb0_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 25),
++};
++static const unsigned int usb0_ovc_mux[] = {
++ USB0_OVC_MARK,
+ };
+ /* - USB1 ------------------------------------------------------------------- */
+ static const unsigned int usb1_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
++ /* PWEN */
++ RCAR_GP_PIN(6, 26),
+ };
+ static const unsigned int usb1_mux[] = {
+- USB1_PWEN_MARK, USB1_OVC_MARK,
++ USB1_PWEN_MARK,
++};
++static const unsigned int usb1_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 27),
++};
++static const unsigned int usb1_ovc_mux[] = {
++ USB1_OVC_MARK,
+ };
+ /* - USB2 ------------------------------------------------------------------- */
+ static const unsigned int usb2_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 14), RCAR_GP_PIN(6, 15),
++ /* PWEN */
++ RCAR_GP_PIN(6, 14),
+ };
+ static const unsigned int usb2_mux[] = {
+- USB2_PWEN_MARK, USB2_OVC_MARK,
++ USB2_PWEN_MARK,
++};
++static const unsigned int usb2_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 15),
++};
++static const unsigned int usb2_ovc_mux[] = {
++ USB2_OVC_MARK,
+ };
+ /* - USB2_CH3 --------------------------------------------------------------- */
+ static const unsigned int usb2_ch3_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 30), RCAR_GP_PIN(6, 31),
++ /* PWEN */
++ RCAR_GP_PIN(6, 30),
+ };
+ static const unsigned int usb2_ch3_mux[] = {
+- USB2_CH3_PWEN_MARK, USB2_CH3_OVC_MARK,
++ USB2_CH3_PWEN_MARK,
++};
++static const unsigned int usb2_ch3_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 31),
++};
++static const unsigned int usb2_ch3_ovc_mux[] = {
++ USB2_CH3_OVC_MARK,
+ };
+
+ /* - USB30 ------------------------------------------------------------------ */
+ static const unsigned int usb30_pins[] = {
+- /* PWEN, OVC */
+- RCAR_GP_PIN(6, 28), RCAR_GP_PIN(6, 29),
++ /* PWEN */
++ RCAR_GP_PIN(6, 28),
+ };
+ static const unsigned int usb30_mux[] = {
+- USB30_PWEN_MARK, USB30_OVC_MARK,
++ USB30_PWEN_MARK,
++};
++static const unsigned int usb30_ovc_pins[] = {
++ /* OVC */
++ RCAR_GP_PIN(6, 29),
++};
++static const unsigned int usb30_ovc_mux[] = {
++ USB30_OVC_MARK,
+ };
+
+ /* - VIN4 ------------------------------------------------------------------- */
+@@ -4528,10 +4563,15 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
+ SH_PFC_PIN_GROUP(tmu_tclk2_a),
+ SH_PFC_PIN_GROUP(tmu_tclk2_b),
+ SH_PFC_PIN_GROUP(usb0),
++ SH_PFC_PIN_GROUP(usb0_ovc),
+ SH_PFC_PIN_GROUP(usb1),
++ SH_PFC_PIN_GROUP(usb1_ovc),
+ SH_PFC_PIN_GROUP(usb2),
++ SH_PFC_PIN_GROUP(usb2_ovc),
+ SH_PFC_PIN_GROUP(usb2_ch3),
++ SH_PFC_PIN_GROUP(usb2_ch3_ovc),
+ SH_PFC_PIN_GROUP(usb30),
++ SH_PFC_PIN_GROUP(usb30_ovc),
+ VIN_DATA_PIN_GROUP(vin4_data_a, 8),
+ VIN_DATA_PIN_GROUP(vin4_data_a, 10),
+ VIN_DATA_PIN_GROUP(vin4_data_a, 12),
+@@ -5026,22 +5066,27 @@ static const char * const tmu_groups[] = {
+
+ static const char * const usb0_groups[] = {
+ "usb0",
++ "usb0_ovc",
+ };
+
+ static const char * const usb1_groups[] = {
+ "usb1",
++ "usb1_ovc",
+ };
+
+ static const char * const usb2_groups[] = {
+ "usb2",
++ "usb2_ovc",
+ };
+
+ static const char * const usb2_ch3_groups[] = {
+ "usb2_ch3",
++ "usb2_ch3_ovc",
+ };
+
+ static const char * const usb30_groups[] = {
+ "usb30",
++ "usb30_ovc",
+ };
+
+ static const char * const vin4_groups[] = {
diff --git a/meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-Introduce-dts-file-for-refhw-r-car-board.patch b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-Introduce-dts-file-for-refhw-r-car-board.patch
deleted file mode 100644
index cefd7cd..0000000
--- a/meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-Introduce-dts-file-for-refhw-r-car-board.patch
+++ /dev/null
@@ -1,90 +0,0 @@
----
- arch/arm64/boot/dts/renesas/r8a7795-refhw.dts | 76 +++++++++++++++++++++++++++
- 1 file changed, 76 insertions(+)
- create mode 100644 arch/arm64/boot/dts/renesas/r8a7795-refhw.dts
-
-diff --git a/arch/arm64/boot/dts/renesas/r8a7795-refhw.dts b/arch/arm64/boot/dts/renesas/r8a7795-refhw.dts
-new file mode 100644
-index 0000000..d586c4c
---- /dev/null
-+++ b/arch/arm64/boot/dts/renesas/r8a7795-refhw.dts
-@@ -0,0 +1,76 @@
-+/*
-+ * Device Tree Source for the reference hardware board with R-Car H3 ES3.0
-+ *
-+ * Copyright (C) 2019 Panasonic Corp.
-+ *
-+ * This file is licensed under the terms of the GNU General Public License
-+ * version 2. This program is licensed "as is" without any warranty of any
-+ * kind, whether express or implied.
-+ */
-+
-+#include "r8a7795-salvator-xs-4x2g.dts"
-+
-+/ {
-+ vga {
-+ port {
-+ vga_in: endpoint {
-+ /delete-property/remote-endpoint;
-+ };
-+ };
-+ };
-+
-+ vga-encoder {
-+ ports {
-+ port@0 {
-+ adv7123_in: endpoint {
-+ /delete-property/remote-endpoint;
-+ };
-+ };
-+
-+ port@1 {
-+ adv7123_out: endpoint {
-+ /delete-property/remote-endpoint;
-+ };
-+ };
-+ };
-+ };
-+
-+};
-+
-+&du {
-+ ports {
-+ port@0 {
-+ endpoint {
-+ /delete-property/remote-endpoint;
-+ };
-+ };
-+
-+ port@3 {
-+ endpoint {
-+ /delete-property/remote-endpoint;
-+ };
-+ };
-+ };
-+};
-+
-+&lvds0 {
-+ status = "disabled";
-+};
-+
-+&pwm1 {
-+ status = "disabled";
-+};
-+
-+&scif_clk {
-+ clock-frequency = <0>;
-+};
-+
-+&sdhi0 {
-+ /delete-property/ wp-gpios;
-+ non-removable;
-+};
-+
-+&sdhi3 {
-+ /delete-property/ wp-gpios;
-+ non-removable;
-+};
---
-2.7.4
-
diff --git a/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-add-st_asm330lhh-driver.patch b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-add-st_asm330lhh-driver.patch
index c779b39..c779b39 100644
--- a/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-add-st_asm330lhh-driver.patch
+++ b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-add-st_asm330lhh-driver.patch
diff --git a/meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-agl-reference-hardware-sample-bsp.patch b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-agl-reference-hardware-sample-bsp.patch
deleted file mode 100644
index 6763558..0000000
--- a/meta-agl-refhw-gen3/recipes-kernel/linux/files/0002-agl-reference-hardware-sample-bsp.patch
+++ /dev/null
@@ -1,846 +0,0 @@
----
- .../arm64/boot/dts/renesas/r8a7795-salvator-xs.dts | 10 -
- arch/arm64/boot/dts/renesas/salvator-common.dtsi | 431 ++++++++++-----------
- drivers/iio/imu/Kconfig | 1 +
- drivers/iio/imu/Makefile | 1 +
- drivers/media/i2c/adv748x/adv748x-core.c | 48 ++-
- drivers/media/i2c/adv748x/adv748x.h | 12 +
- drivers/pinctrl/sh-pfc/pfc-r8a7795.c | 6 +-
- 7 files changed, 260 insertions(+), 249 deletions(-)
-
-diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
-index 498f788..b4236a5 100644
---- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
-+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-xs.dts
-@@ -166,16 +166,6 @@
- remote-endpoint = <&rcar_dw_hdmi1_out>;
- };
-
--&lvds0 {
-- ports {
-- port@1 {
-- lvds0_out: endpoint {
-- remote-endpoint = <&lvds_in>;
-- };
-- };
-- };
--};
--
- &ohci2 {
- status = "okay";
- };
-diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
-index 878ed7c..32d19d9 100644
---- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi
-+++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
-@@ -34,6 +34,10 @@
- aliases {
- serial0 = &scif2;
- serial1 = &scif1;
-+ serial2 = &scif5;
-+ serial3 = &hscif1;
-+ serial4 = &hscif0;
-+ serial5 = &hscif2;
- ethernet0 = &avb;
- };
-
-@@ -62,65 +66,26 @@
- resets = <&cpg 922>;
- };
-
-- backlight: backlight {
-- compatible = "pwm-backlight";
-- pwms = <&pwm1 0 50000>;
--
-- brightness-levels = <256 128 64 16 8 4 0>;
-- default-brightness-level = <6>;
--
-- power-supply = <&reg_12v>;
-- enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
-- };
--
-- cvbs-in {
-- compatible = "composite-video-connector";
-- label = "CVBS IN";
--
-- port {
-- cvbs_con: endpoint {
-- remote-endpoint = <&adv7482_ain7>;
-- };
-- };
-- };
--
-- hdmi-in {
-+ hdmi0-in {
- compatible = "hdmi-connector";
-- label = "HDMI IN";
-+ label = "HDMI0 IN";
- type = "a";
-
- port {
- hdmi_in_con: endpoint {
-- remote-endpoint = <&adv7482_hdmi>;
-+ remote-endpoint = <&adv7481_hdmi>;
- };
- };
- };
-
-- lvds {
-- compatible = "panel-lvds";
--
-- width-mm = <210>;
-- height-mm = <158>;
--
-- data-mapping = "jeida-24";
-- enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
--
-- panel-timing {
-- /* 1024x768 @60Hz */
-- clock-frequency = <65000000>;
-- hactive = <1024>;
-- vactive = <768>;
-- hsync-len = <136>;
-- hfront-porch = <20>;
-- hback-porch = <160>;
-- vfront-porch = <3>;
-- vback-porch = <29>;
-- vsync-len = <6>;
-- };
-+ hdmi2-in {
-+ compatible = "hdmi-connector";
-+ label = "HDMI2 IN";
-+ type = "a";
-
- port {
-- lvds_in: endpoint {
-- remote-endpoint = <&lvds0_out>;
-+ hdmi_in_con2: endpoint {
-+ remote-endpoint = <&adv7481_hdmi2>;
- };
- };
- };
-@@ -160,17 +125,6 @@
- dais = <&rsnd_port0>;
- };
-
-- vbus0_usb2: regulator-vbus0-usb2 {
-- compatible = "regulator-fixed";
--
-- regulator-name = "USB20_VBUS0";
-- regulator-min-microvolt = <5000000>;
-- regulator-max-microvolt = <5000000>;
--
-- gpio = <&gpio6 16 GPIO_ACTIVE_HIGH>;
-- enable-active-high;
-- };
--
- vcc_sdhi0: regulator-vcc-sdhi0 {
- compatible = "regulator-fixed";
-
-@@ -241,40 +195,6 @@
- };
- };
-
-- vga {
-- compatible = "vga-connector";
-- no-use-ddc;
-- max-pixelclock = <100000>;
--
-- port {
-- vga_in: endpoint {
-- remote-endpoint = <&adv7123_out>;
-- };
-- };
-- };
--
-- vga-encoder {
-- compatible = "adi,adv7123";
--
-- ports {
-- #address-cells = <1>;
-- #size-cells = <0>;
--
-- port@0 {
-- reg = <0>;
-- adv7123_in: endpoint {
-- remote-endpoint = <&du_out_rgb>;
-- };
-- };
-- port@1 {
-- reg = <1>;
-- adv7123_out: endpoint {
-- remote-endpoint = <&vga_in>;
-- };
-- };
-- };
-- };
--
- x12_clk: x12 {
- compatible = "fixed-clock";
- #clock-cells = <0>;
-@@ -325,49 +245,41 @@
- };
- };
-
--&csi20 {
-+&csi40 {
- status = "okay";
-
- ports {
- port@0 {
- reg = <0>;
-- csi20_in: endpoint {
-+
-+ csi40_in: endpoint {
- clock-lanes = <0>;
-- data-lanes = <1>;
-- remote-endpoint = <&adv7482_txb>;
-+ data-lanes = <1 2 3 4>;
-+ remote-endpoint = <&adv7481_txa>;
- };
- };
- };
- };
-
--&csi40 {
-+&csi41 {
- status = "okay";
-
- ports {
- port@0 {
- reg = <0>;
-
-- csi40_in: endpoint {
-+ csi41_in: endpoint {
- clock-lanes = <0>;
- data-lanes = <1 2 3 4>;
-- remote-endpoint = <&adv7482_txa>;
-+ remote-endpoint = <&adv7481_txa2>;
- };
- };
- };
- };
-
- &du {
-- pinctrl-0 = <&du_pins>;
-- pinctrl-names = "default";
- status = "okay";
-
-- ports {
-- port@0 {
-- endpoint {
-- remote-endpoint = <&adv7123_in>;
-- };
-- };
-- };
- };
-
- &ehci0 {
-@@ -383,12 +295,27 @@
- clock-frequency = <32768>;
- };
-
-+&hscif0 {
-+ pinctrl-0 = <&hscif0_pins>;
-+ pinctrl-names = "default";
-+ uart-has-rtscts;
-+
-+ status = "okay";
-+};
-+
- &hscif1 {
- pinctrl-0 = <&hscif1_pins>;
- pinctrl-names = "default";
-
- /* Please use exclusively to the scif1 node */
-- /* status = "okay"; */
-+ status = "okay";
-+};
-+
-+&hscif2 {
-+ pinctrl-0 = <&hscif2_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
- };
-
- &hsusb {
-@@ -404,24 +331,65 @@
-
- clock-frequency = <100000>;
-
-- ak4613: codec@10 {
-- compatible = "asahi-kasei,ak4613";
-- #sound-dai-cells = <0>;
-- reg = <0x10>;
-- clocks = <&rcar_sound 3>;
-+ video-receiver@70 {
-+ compatible = "adi,adv7481";
-+ reg = <0x70>;
-
-- asahi-kasei,in1-single-end;
-- asahi-kasei,in2-single-end;
-- asahi-kasei,out1-single-end;
-- asahi-kasei,out2-single-end;
-- asahi-kasei,out3-single-end;
-- asahi-kasei,out4-single-end;
-- asahi-kasei,out5-single-end;
-- asahi-kasei,out6-single-end;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-
-- port {
-- ak4613_endpoint: endpoint {
-- remote-endpoint = <&rsnd_endpoint0>;
-+ interrupt-parent = <&gpio0>;
-+ interrupt-names = "intrq1", "intrq3";
-+ interrupts = <4 IRQ_TYPE_LEVEL_LOW>,
-+ <5 IRQ_TYPE_LEVEL_LOW>;
-+
-+ port@8 {
-+ reg = <8>;
-+
-+ adv7481_hdmi: endpoint {
-+ remote-endpoint = <&hdmi_in_con>;
-+ };
-+ };
-+
-+ port@a {
-+ reg = <10>;
-+
-+ adv7481_txa: endpoint {
-+ clock-lanes = <0>;
-+ data-lanes = <1 2 3 4>;
-+ remote-endpoint = <&csi40_in>;
-+ };
-+ };
-+
-+ };
-+
-+ video-receiver@71 {
-+ compatible = "adi,adv7481";
-+ reg = <0x71>;
-+
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ interrupt-parent = <&gpio6>;
-+ interrupt-names = "intrq1", "intrq3";
-+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>,
-+ <1 IRQ_TYPE_LEVEL_LOW>;
-+
-+ port@8 {
-+ reg = <8>;
-+
-+ adv7481_hdmi2: endpoint {
-+ remote-endpoint = <&hdmi_in_con2>;
-+ };
-+ };
-+
-+ port@a {
-+ reg = <10>;
-+
-+ adv7481_txa2: endpoint {
-+ clock-lanes = <0>;
-+ data-lanes = <1 2 3 4>;
-+ remote-endpoint = <&csi41_in>;
- };
- };
- };
-@@ -438,75 +406,62 @@
- };
- };
-
--&i2c4 {
-+&i2c3 {
-+ pinctrl-0 = <&i2c3_pins>;
-+ pinctrl-names = "default";
-+
- status = "okay";
-
-- pca9654: gpio@20 {
-- compatible = "onnn,pca9654";
-- reg = <0x20>;
-- gpio-controller;
-- #gpio-cells = <2>;
-- };
-+ clock-frequency = <100000>;
-
-- csa_vdd: adc@7c {
-- compatible = "maxim,max9611";
-- reg = <0x7c>;
-+ asm330lhh@6a {
-+ compatible = "st,asm330lhh";
-+ reg = <0x6a>;
-
-- shunt-resistor-micro-ohms = <5000>;
-+ interrupt-names = "int1", "int2";
-+ interrupts = <&gpio6 23 IRQ_TYPE_EDGE_RISING>,
-+ <&gpio2 6 IRQ_TYPE_EDGE_RISING>;
- };
-+};
-
-- csa_dvfs: adc@7f {
-- compatible = "maxim,max9611";
-- reg = <0x7f>;
-+&i2c4 {
-+ status = "okay";
-
-- shunt-resistor-micro-ohms = <5000>;
-+ versaclock5: clock-generator@68 {
-+ compatible = "idt,9fgv0841";
-+ reg = <0x68>;
-+ #clock-cells = <1>;
-+ clocks = <&x23_clk>;
-+ clock-names = "xin";
- };
-+};
-
-- video-receiver@70 {
-- compatible = "adi,adv7482";
-- reg = <0x70>;
--
-- #address-cells = <1>;
-- #size-cells = <0>;
--
-- interrupt-parent = <&gpio6>;
-- interrupt-names = "intrq1", "intrq2";
-- interrupts = <30 IRQ_TYPE_LEVEL_LOW>,
-- <31 IRQ_TYPE_LEVEL_LOW>;
--
-- port@7 {
-- reg = <7>;
--
-- adv7482_ain7: endpoint {
-- remote-endpoint = <&cvbs_con>;
-- };
-- };
--
-- port@8 {
-- reg = <8>;
-+&i2c5 {
-+ pinctrl-0 = <&i2c5_pins>;
-+ pinctrl-names = "default";
-
-- adv7482_hdmi: endpoint {
-- remote-endpoint = <&hdmi_in_con>;
-- };
-- };
-+ status = "okay";
-
-- port@a {
-- reg = <10>;
-+ clock-frequency = <100000>;
-
-- adv7482_txa: endpoint {
-- clock-lanes = <0>;
-- data-lanes = <1 2 3 4>;
-- remote-endpoint = <&csi40_in>;
-- };
-- };
-+ ak4613: codec@10 {
-+ compatible = "asahi-kasei,ak4613";
-+ #sound-dai-cells = <0>;
-+ reg = <0x10>;
-+ clocks = <&rcar_sound 3>;
-
-- port@b {
-- reg = <11>;
-+ asahi-kasei,in1-single-end;
-+ asahi-kasei,in2-single-end;
-+ asahi-kasei,out1-single-end;
-+ asahi-kasei,out2-single-end;
-+ asahi-kasei,out3-single-end;
-+ asahi-kasei,out4-single-end;
-+ asahi-kasei,out5-single-end;
-+ asahi-kasei,out6-single-end;
-
-- adv7482_txb: endpoint {
-- clock-lanes = <0>;
-- data-lanes = <1>;
-- remote-endpoint = <&csi20_in>;
-+ port {
-+ ak4613_endpoint: endpoint {
-+ remote-endpoint = <&rsnd_endpoint0>;
- };
- };
- };
-@@ -550,10 +505,6 @@
- };
- };
-
--&lvds0 {
-- status = "okay";
--};
--
- &ohci0 {
- dr_mode = "otg";
- status = "okay";
-@@ -565,6 +516,7 @@
-
- &pcie_bus_clk {
- clock-frequency = <100000000>;
-+ status = "okay";
- };
-
- &pciec0 {
-@@ -575,6 +527,21 @@
- status = "okay";
- };
-
-+&canfd {
-+ pinctrl-0 = <&canfd0_pins &canfd1_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+
-+ channel0 {
-+ status = "okay";
-+ };
-+
-+ channel1 {
-+ status = "okay";
-+ };
-+};
-+
- &pfc {
- pinctrl-0 = <&scif_clk_pins>;
- pinctrl-names = "default";
-@@ -597,38 +564,43 @@
- };
- };
-
-- du_pins: du {
-- groups = "du_rgb888", "du_sync", "du_oddf", "du_clk_out_0";
-- function = "du";
-+ hscif0_pins: hscif0 {
-+ groups = "hscif0_data", "hscif0_ctrl";
-+ function = "hscif0";
- };
-
- hscif1_pins: hscif1 {
-- groups = "hscif1_data_a", "hscif1_ctrl_a";
-+ groups = "hscif1_data_a";
- function = "hscif1";
- };
-
-+ hscif2_pins: hscif2 {
-+ groups = "hscif2_data_c";
-+ function = "hscif2";
-+ };
-+
- i2c2_pins: i2c2 {
- groups = "i2c2_a";
- function = "i2c2";
- };
-
-- irq0_pins: irq0 {
-- groups = "intc_ex_irq0";
-- function = "intc_ex";
-+ i2c3_pins: i2c3 {
-+ groups = "i2c3";
-+ function = "i2c3";
- };
-
-- pwm1_pins: pwm1 {
-- groups = "pwm1_a";
-- function = "pwm1";
-+ i2c5_pins: i2c5 {
-+ groups = "i2c5";
-+ function = "i2c5";
- };
-
-- pwm2_pins: pwm2 {
-- groups = "pwm2_a";
-- function = "pwm2";
-+ irq0_pins: irq0 {
-+ groups = "intc_ex_irq0";
-+ function = "intc_ex";
- };
-
- scif1_pins: scif1 {
-- groups = "scif1_data_a", "scif1_ctrl";
-+ groups = "scif1_data_b";
- function = "scif1";
- };
-
-@@ -637,6 +609,11 @@
- function = "scif2";
- };
-
-+ scif5_pins: scif5 {
-+ groups = "scif5_data_a";
-+ function = "scif5";
-+ };
-+
- scif_clk_pins: scif_clk {
- groups = "scif_clk_a";
- function = "scif_clk";
-@@ -679,13 +656,13 @@
- };
-
- sound_pins: sound {
-- groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
-+ groups = "ssi349_ctrl", "ssi3_data", "ssi4_data";
- function = "ssi";
- };
-
- sound_clk_pins: sound_clk {
-- groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a",
-- "audio_clkout_a", "audio_clkout3_a";
-+ groups = "audio_clk_a_a", "audio_clk_b_a",
-+ "audio_clkout_a", "audio_clkout3_b";
- function = "audio_clk";
- };
-
-@@ -695,40 +672,24 @@
- };
-
- usb1_pins: usb1 {
-- mux {
-- groups = "usb1";
-- function = "usb1";
-- };
--
-- ovc {
-- pins = "GP_6_27";
-- bias-pull-up;
-- };
--
-- pwen {
-- pins = "GP_6_26";
-- bias-pull-down;
-- };
-+ groups = "usb1";
-+ function = "usb1";
- };
-
- usb30_pins: usb30 {
- groups = "usb30";
- function = "usb30";
- };
--};
--
--&pwm1 {
-- pinctrl-0 = <&pwm1_pins>;
-- pinctrl-names = "default";
--
-- status = "okay";
--};
-
--&pwm2 {
-- pinctrl-0 = <&pwm2_pins>;
-- pinctrl-names = "default";
-+ canfd0_pins: canfd0 {
-+ groups = "canfd0_data_a";
-+ function = "canfd0";
-+ };
-
-- status = "okay";
-+ canfd1_pins: canfd1 {
-+ groups = "canfd1_data";
-+ function = "canfd1";
-+ };
- };
-
- &rcar_sound {
-@@ -775,8 +736,8 @@
- bitclock-master = <&rsnd_endpoint0>;
- frame-master = <&rsnd_endpoint0>;
-
-- playback = <&ssi0 &src0 &dvc0>;
-- capture = <&ssi1 &src1 &dvc1>;
-+ playback = <&ssi3>; //ssi0 -> ssi3
-+ capture = <&ssi4>; //ssi1 -> ssi4
- };
- };
- };
-@@ -803,6 +764,13 @@
- status = "okay";
- };
-
-+&scif5 {
-+ pinctrl-0 = <&scif5_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+};
-+
- &scif_clk {
- clock-frequency = <14745600>;
- };
-@@ -857,7 +825,7 @@
- status = "okay";
- };
-
--&ssi1 {
-+&ssi4 {
- shared-pin;
- };
-
-@@ -869,7 +837,6 @@
- pinctrl-0 = <&usb0_pins>;
- pinctrl-names = "default";
-
-- vbus-supply = <&vbus0_usb2>;
- status = "okay";
- };
-
-diff --git a/drivers/iio/imu/Kconfig b/drivers/iio/imu/Kconfig
-index 156630a..463210d 100644
---- a/drivers/iio/imu/Kconfig
-+++ b/drivers/iio/imu/Kconfig
-@@ -40,6 +40,7 @@ config KMX61
-
- source "drivers/iio/imu/inv_mpu6050/Kconfig"
- source "drivers/iio/imu/st_lsm6dsx/Kconfig"
-+source "drivers/iio/imu/st_asm330lhh/Kconfig"
-
- endmenu
-
-diff --git a/drivers/iio/imu/Makefile b/drivers/iio/imu/Makefile
-index 68629c68..349a7de 100644
---- a/drivers/iio/imu/Makefile
-+++ b/drivers/iio/imu/Makefile
-@@ -20,3 +20,4 @@ obj-y += inv_mpu6050/
- obj-$(CONFIG_KMX61) += kmx61.o
-
- obj-y += st_lsm6dsx/
-+obj-y += st_asm330lhh/
-diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c
-index da8f062..c2b37f7 100644
---- a/drivers/media/i2c/adv748x/adv748x-core.c
-+++ b/drivers/media/i2c/adv748x/adv748x-core.c
-@@ -165,6 +165,21 @@ static int adv748x_i2c_addresses[ADV748X_PAGE_MAX] = {
- ADV748X_I2C_TXA,
- };
-
-+/* Default addresses for the I2C pages 0x71*/
-+static int adv748x_i2c_addresses2[ADV748X_PAGE_MAX] = {
-+ ADV748X_I2C_IO2,
-+ ADV748X_I2C_DPLL2,
-+ ADV748X_I2C_CP2,
-+ ADV748X_I2C_HDMI2,
-+ ADV748X_I2C_EDID2,
-+ ADV748X_I2C_REPEATER2,
-+ ADV748X_I2C_INFOFRAME2,
-+ ADV748X_I2C_CEC2,
-+ ADV748X_I2C_SDP2,
-+ ADV748X_I2C_TXB2,
-+ ADV748X_I2C_TXA2,
-+};
-+
- static int adv748x_read_check(struct adv748x_state *state,
- int client_page, u8 reg)
- {
-@@ -238,9 +253,16 @@ static int adv748x_initialise_clients(struct adv748x_state *state)
- int ret;
-
- for (i = ADV748X_PAGE_DPLL; i < ADV748X_PAGE_MAX; ++i) {
-- state->i2c_clients[i] =
-- adv748x_dummy_client(state, adv748x_i2c_addresses[i],
-- ADV748X_IO_SLAVE_ADDR_BASE + i);
-+ if((state->client->addr << 1) == 0xe0) {
-+ state->i2c_clients[i] =
-+ adv748x_dummy_client(state, adv748x_i2c_addresses[i],
-+ ADV748X_IO_SLAVE_ADDR_BASE + i);
-+ } else {
-+ state->i2c_clients[i] =
-+ adv748x_dummy_client(state, adv748x_i2c_addresses2[i],
-+ ADV748X_IO_SLAVE_ADDR_BASE + i);
-+ }
-+
- if (state->i2c_clients[i] == NULL) {
- adv_err(state, "failed to create i2c client %u\n", i);
- return -ENOMEM;
-@@ -508,6 +530,20 @@ static const struct adv748x_reg_value adv748x_set_slave_address[] = {
- {ADV748X_PAGE_EOR, 0xff, 0xff} /* End of register table */
- };
-
-+static const struct adv748x_reg_value adv748x_set_slave_address2[] = {
-+ {ADV748X_PAGE_IO, 0xf3, ADV748X_I2C_DPLL2 << 1},
-+ {ADV748X_PAGE_IO, 0xf4, ADV748X_I2C_CP2 << 1},
-+ {ADV748X_PAGE_IO, 0xf5, ADV748X_I2C_HDMI2 << 1},
-+ {ADV748X_PAGE_IO, 0xf6, ADV748X_I2C_EDID2 << 1},
-+ {ADV748X_PAGE_IO, 0xf7, ADV748X_I2C_REPEATER2 << 1},
-+ {ADV748X_PAGE_IO, 0xf8, ADV748X_I2C_INFOFRAME2 << 1},
-+ {ADV748X_PAGE_IO, 0xfa, ADV748X_I2C_CEC2 << 1},
-+ {ADV748X_PAGE_IO, 0xfb, ADV748X_I2C_SDP2 << 1},
-+ {ADV748X_PAGE_IO, 0xfc, ADV748X_I2C_TXB2 << 1},
-+ {ADV748X_PAGE_IO, 0xfd, ADV748X_I2C_TXA2 << 1},
-+ {ADV748X_PAGE_EOR, 0xff, 0xff} /* End of register table */
-+};
-+
- /* Supported Formats For Script Below */
- /* - 01-29 HDMI to MIPI TxA CSI 4-Lane - RGB888: */
- static const struct adv748x_reg_value adv748x_init_txa_4lane[] = {
-@@ -683,7 +719,11 @@ static int adv748x_reset(struct adv748x_state *state)
- if (ret < 0)
- return ret;
-
-- ret = adv748x_write_regs(state, adv748x_set_slave_address);
-+ if((state->client->addr << 1) == 0xe0) {
-+ ret = adv748x_write_regs(state, adv748x_set_slave_address); //i2c address 0x70
-+ } else {
-+ ret = adv748x_write_regs(state, adv748x_set_slave_address2); //i2c address 0x71
-+ }
- if (ret < 0)
- return ret;
-
-diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h
-index fb30bfa..ac50a9e 100644
---- a/drivers/media/i2c/adv748x/adv748x.h
-+++ b/drivers/media/i2c/adv748x/adv748x.h
-@@ -40,6 +40,18 @@
- #define ADV748X_I2C_TXB 0x48 /* CSI-TXB Map */
- #define ADV748X_I2C_TXA 0x4a /* CSI-TXA Map */
-
-+#define ADV748X_I2C_IO2 0x71 /* IO Map */
-+#define ADV748X_I2C_DPLL2 0x27 /* DPLL Map */
-+#define ADV748X_I2C_CP2 0x23 /* CP Map */
-+#define ADV748X_I2C_HDMI2 0x35 /* HDMI Map */
-+#define ADV748X_I2C_EDID2 0x37 /* EDID Map */
-+#define ADV748X_I2C_REPEATER2 0x33 /* HDMI RX Repeater Map */
-+#define ADV748X_I2C_INFOFRAME2 0x30 /* HDMI RX InfoFrame Map */
-+#define ADV748X_I2C_CEC2 0x42 /* CEC Map */
-+#define ADV748X_I2C_SDP2 0x78 /* SDP Map */
-+#define ADV748X_I2C_TXB2 0x49 /* CSI-TXB Map */
-+#define ADV748X_I2C_TXA2 0x4b /* CSI-TXA Map */
-+
- enum adv748x_page {
- ADV748X_PAGE_IO,
- ADV748X_PAGE_DPLL,
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
-index 3ebe8de..546761c 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7795.c
-@@ -3912,7 +3912,7 @@ static const unsigned int tmu_tclk2_b_mux[] = {
- /* - USB0 ------------------------------------------------------------------- */
- static const unsigned int usb0_pins[] = {
- /* PWEN, OVC */
-- RCAR_GP_PIN(6, 24), RCAR_GP_PIN(6, 25),
-+ RCAR_GP_PIN(6, 24),
- };
- static const unsigned int usb0_mux[] = {
- USB0_PWEN_MARK, USB0_OVC_MARK,
-@@ -3920,7 +3920,7 @@ static const unsigned int usb0_mux[] = {
- /* - USB1 ------------------------------------------------------------------- */
- static const unsigned int usb1_pins[] = {
- /* PWEN, OVC */
-- RCAR_GP_PIN(6, 26), RCAR_GP_PIN(6, 27),
-+ RCAR_GP_PIN(6, 27),
- };
- static const unsigned int usb1_mux[] = {
- USB1_PWEN_MARK, USB1_OVC_MARK,
-@@ -3936,7 +3936,7 @@ static const unsigned int usb2_mux[] = {
- /* - USB2_CH3 --------------------------------------------------------------- */
- static const unsigned int usb2_ch3_pins[] = {
- /* PWEN, OVC */
-- RCAR_GP_PIN(6, 30), RCAR_GP_PIN(6, 31),
-+ RCAR_GP_PIN(6, 30),
- };
- static const unsigned int usb2_ch3_mux[] = {
- USB2_CH3_PWEN_MARK, USB2_CH3_OVC_MARK,
---
-2.7.4
-